@vkontakte/videoplayer 1.1.63-beta.2 → 1.1.64-dev.1ed690e2.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/esnext.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @vkontakte/videoplayer v1.1.63-beta.2
3
- * Mon, 02 Jun 2025 14:19:50 GMT
4
- * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-63/doc/
2
+ * @vkontakte/videoplayer v1.1.64-dev.1ed690e2.0
3
+ * Mon, 09 Jun 2025 13:41:52 GMT
4
+ * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-64/doc/
5
5
  */
6
6
  "use strict";var V1=Object.create;var Gd=Object.defineProperty;var R1=Object.getOwnPropertyDescriptor;var N1=Object.getOwnPropertyNames;var D1=Object.getPrototypeOf,B1=Object.prototype.hasOwnProperty;var O1=(t,e)=>{for(var i in e)Gd(t,i,{get:e[i],enumerable:!0})},Wm=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of N1(e))!B1.call(t,n)&&n!==i&&Gd(t,n,{get:()=>e[n],enumerable:!(o=R1(e,n))||o.enumerable});return t};var Km=(t,e,i)=>(i=t!=null?V1(D1(t)):{},Wm(e||!t||!t.__esModule?Gd(i,"default",{value:t,enumerable:!0}):i,t)),H1=t=>Wm(Gd({},"__esModule",{value:!0}),t);var W3={};O1(W3,{ControlButtonType:()=>cd,GridTypes:()=>mr,InterfaceLanguage:()=>ll.InterfaceLanguage,MenuItemType:()=>Qs,PlayerPhase:()=>Lr,VERSION:()=>Ha,VKNumericLanguage:()=>ll.VKNumericLanguage,VideoFormat:()=>hu.VideoFormat,VideoQuality:()=>hu.VideoQuality,loadVKLangPack:()=>ll.loadVKLangPack,registerPlayerWebComponent:()=>q3});module.exports=H1(W3);var ea="[",xa="[!",wa="]",Br={};var gi=Symbol(),ri=Symbol("filename"),Qm=Symbol("hmr"),Gm="http://www.w3.org/1999/xhtml",wu="http://www.w3.org/2000/svg";var jd=!0;var jm=globalThis.process?.env?.NODE_ENV,ke=jm&&!jm.toLowerCase().startsWith("prod");var yo=Symbol("$state"),Or=Symbol("$state metadata"),ml=Symbol("legacy props"),Ym=Symbol("");var sr=Array.isArray,Zm=Array.prototype.indexOf,vl=Array.from,Su=Object.keys,Ui=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,Yd=Object.getOwnPropertyDescriptors,Cu=Object.prototype,Xm=Array.prototype,Hr=Object.getPrototypeOf;function ta(t){return typeof t=="function"}var te=()=>{};function Jm(t){return t()}function ia(t){for(var e=0;e<t.length;e++)t[e]()}var gl=[],ku=[];function ev(){var t=gl;gl=[],ia(t)}function F1(){var t=ku;ku=[],ia(t)}function Ro(t){gl.length===0&&queueMicrotask(ev),gl.push(t)}function Tu(){gl.length>0&&ev(),ku.length>0&&F1()}function Zd(t){return t===this.v}function bs(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function tv(t,e){return t!==e}function $s(t){return!bs(t,this.v)}function iv(){if(ke){let t=new Error(`derived_references_self
7
7
  A derived value cannot reference itself recursively
@@ -45,7 +45,7 @@ ${l}in ${u}`).join("")}
45
45
  `)){let o=X1.exec(i)??J1.exec(i);o&&e.push({file:o[1],line:+o[2],column:+o[3]})}return e}function Uv(){let t=e0()?.slice(4);if(!t)return null;for(let e=0;e<t.length;e++){let i=t[e],o=Z1[i.file];if(!o){if(e===0)return null;continue}for(let n of o){if(n.end==null)return null;if(n.start.line<i.line&&n.end.line>i.line)return n.component}}return null}var pc=Symbol("ADD_OWNER");function Ku(t,e,i=!1,o=!1){if(t&&!i){let n=Fo,a=t[Or];if(a&&!Qu(a,n)){let s=Gu(a);e&&e[ri]!==n[ri]&&!o&&Sv(n[ri],e[ri],s[ri])}}fc(t,e,new Set)}function Nu(t,e){if(e.owners!==null)for(;t;){if(t.owners===null){e.owners=null;break}for(let i of t.owners)e.owners.add(i);t=t.parent}}function fc(t,e,i){let o=t?.[Or];if(o)"owners"in o&&o.owners!=null&&(e?o.owners.add(e):o.owners=null);else if(t&&typeof t=="object"){if(i.has(t))return;if(i.add(t),pc in t&&t[pc])to(()=>{t[pc](e)});else{var n=Hr(t);if(n===Object.prototype)for(let a in t)if(Object.getOwnPropertyDescriptor(t,a)?.get){let s=gi;to(()=>{let d=t[a];s!==d&&(s=d,fc(d,e,i))})}else fc(t[a],e,i);else if(n===Array.prototype)for(let a=0;a<t.length;a+=1)fc(t[a],e,i)}}}function Qu(t,e){return t.owners===null?!0:t.owners.has(e)||ri in e&&[...t.owners].some(i=>i[ri]===e[ri])||t.parent!==null&&Qu(t.parent,e)}function Gu(t){return t?.owners?.values().next().value??Gu(t.parent)}var t0=!1;function kv(t){if(t0)return;let e=Uv();if(e&&!Qu(t,e)){let i=Gu(t);i[ri]!==e[ri]?Ru(e[ri],i[ri]):Ru()}}function Ps(t){if(ke){let e=new Error(`lifecycle_outside_component
46
46
  \`${t}(...)\` can only be used during component initialisation
47
47
  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 Tt=null;function kl(t){Tt=t}var Fo=null;function Tl(t){Fo=t}function As(t){return ju("getContext").get(t)}function Ms(t,e){let i=ju("setContext");return ke&&vt(()=>Ku(e,null,!0)),i.set(t,e),e}function El(){return ju("getAllContexts")}function H(t,e=!1,i){var o=Tt={p:Tt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};Tr&&!e&&(Tt.l={s:null,u:null,r1:[],r2:Ei(!1)}),Uo(()=>{o.d=!0}),ke&&(Tt.function=i,Fo=i)}function F(t){let e=Tt;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 n=0;n<s.length;n++){var a=s[n];zi(a.effect),Ji(a.reaction),sn(a.fn)}}finally{zi(i),Ji(o)}}Tt=e.p,ke&&(Fo=e.p?.function??null),e.m=!0}return t||{}}function Er(){return!Tr||Tt!==null&&Tt.l===null}function ju(t){return Tt===null&&Ps(t),Tt.c??=new Map(o0(Tt)||void 0)}function o0(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var n0=/\r/g;function zv(t){t=t.replace(n0,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function qv(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var r0=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Wv(t){return r0.includes(t)}var a0=["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 s0={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 Kv(t){return t=t.toLowerCase(),s0[t]??t}var W5=[...a0,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var l0=["touchstart","touchmove"];function Qv(t){return l0.includes(t)}var d0=["textarea","script","style","title"];function Gv(t){return d0.includes(t)}function Yu(t){return t?.replace(/\//g,"/\u200B")}var jv=new Map;function Yv(t,e){var i=jv.get(t);i||(i=new Set,jv.set(t,i)),i.add(e)}function Zu(t,e){if(e){let i=document.body;t.autofocus=!0,Ro(()=>{document.activeElement===i&&t.focus()})}}function Pl(t){var e=Lt,i=bt;Ji(null),zi(null);try{return t()}finally{Ji(e),zi(i)}}var Xu=new Set,mc=new Set;function La(t){if(!Ge)return;t.onload&&t.removeAttribute("onload"),t.onerror&&t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function Ju(t,e,i,o={}){function n(a){if(o.capture||Ls.call(e,a),!a.cancelBubble)return Pl(()=>i?.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Ro(()=>{e.addEventListener(t,n,o)}):e.addEventListener(t,n,o),n}function _t(t,e,i,o,n){var a={capture:o,passive:n},s=Ju(t,e,i,a);(e===document.body||e===window||e===document)&&Uo(()=>{e.removeEventListener(t,s,a)})}function ot(t){for(var e=0;e<t.length;e++)Xu.add(t[e]);for(var i of mc)i(t)}function Ls(t){var e=this,i=e.ownerDocument,o=t.type,n=t.composedPath?.()||[],a=n[0]||t.target,s=0,d=t.__root;if(d){var l=n.indexOf(d);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var c=n.indexOf(e);if(c===-1)return;l<=c&&(s=l)}if(a=n[s]||t.target,a!==e){Ui(t,"currentTarget",{configurable:!0,get(){return a||i}});var u=Lt,b=bt;Ji(null),zi(null);try{for(var p,$=[];a!==null;){var w=a.assignedSlot||a.parentNode||a.host||null;try{var x=a["__"+o];if(x!=null&&(!a.disabled||t.target===a))if(sr(x)){var[k,...C]=x;k.apply(a,[t,...C])}else x.call(a,t)}catch(E){p?$.push(E):p=E}if(t.cancelBubble||w===e||w===null)break;a=w}if(p){for(let E of $)queueMicrotask(()=>{throw E});throw p}}finally{t.__root=e,delete t.currentTarget,Ji(u),zi(b)}}}var u0;function Zv(){u0=void 0}function Vs(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function io(t,e){var i=bt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function M(t,e){var i=(e&1)!==0,o=(e&2)!==0,n,a=!t.startsWith("<!>");return()=>{if(Ge)return io(dt,null),dt;n===void 0&&(n=Vs(a?t:"<!>"+t),i||(n=si(n)));var s=o||$l?document.importNode(n,!0):n.cloneNode(!0);if(i){var d=si(s),l=s.lastChild;io(d,l)}else io(s,s);return s}}function ve(t,e,i="svg"){var o=!t.startsWith("<!>"),n=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,s;return()=>{if(Ge)return io(dt,null),dt;if(!s){var d=Vs(a),l=si(d);if(n)for(s=document.createDocumentFragment();si(l);)s.appendChild(si(l));else s=si(l)}var c=s.cloneNode(!0);if(n){var u=si(c),b=c.lastChild;io(u,b)}else io(c,c);return c}}function Pr(t=""){if(!Ge){var e=Oo(t+"");return io(e,e),e}var i=dt;return i.nodeType!==3&&(i.before(i=Oo()),ai(i)),io(i,i),i}function Be(){if(Ge)return io(dt,null),dt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Oo();return t.append(e,i),io(e,i),t}function _(t,e){if(Ge){bt.nodes_end=dt,wi();return}t!==null&&t.before(e)}var Al=!0;function vc(t){Al=t}function ue(t,e){var i=e==null?"":typeof e=="object"?e+"":e;i!==(t.__t??=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function Kr(t,e){return Jv(t,e)}function tp(t,e){ic(),e.intro=e.intro??!1;let i=e.target,o=Ge,n=dt;try{for(var a=si(i);a&&(a.nodeType!==8||a.data!==ea);)a=po(a);if(!a)throw Br;Wi(!0),ai(a),wi();let s=Jv(t,{...e,anchor:a});if(dt===null||dt.nodeType!==8||dt.data!==wa)throw Ea(),Br;return Wi(!1),s}catch(s){if(s===Br)return e.recover===!1&&sv(),ic(),yl(i),Wi(!1),Kr(t,e);throw s}finally{Wi(o),ai(n),Zv()}}var Rs=new Map;function Jv(t,{target:e,anchor:i,props:o={},events:n,context:a,intro:s=!0}){ic();var d=new Set,l=b=>{for(var p=0;p<b.length;p++){var $=b[p];if(!d.has($)){d.add($);var w=Qv($);e.addEventListener($,Ls,{passive:w});var x=Rs.get($);x===void 0?(document.addEventListener($,Ls,{passive:w}),Rs.set($,1)):Rs.set($,x+1)}}};l(vl(Xu)),mc.add(l);var c=void 0,u=Hv(()=>{var b=i??e.appendChild(Oo());return Pi(()=>{if(a){H({});var p=Tt;p.c=a}n&&(o.$$events=n),Ge&&io(b,null),Al=s,c=t(b,o)||{},Al=!0,Ge&&(bt.nodes_end=dt),a&&F()}),()=>{for(var p of d){e.removeEventListener(p,Ls);var $=Rs.get(p);--$===0?(document.removeEventListener(p,Ls),Rs.delete(p)):Rs.set(p,$)}mc.delete(l),b!==i&&b.parentNode?.removeChild(b)}});return ep.set(c,u),c}var ep=new WeakMap;function Va(t,e){let i=ep.get(t);return i?(ep.delete(t),i(e)):(ke&&wv(),Promise.resolve())}function V(t,e,[i,o]=[0,0]){Ge&&i===0&&wi();var n=t,a=null,s=null,d=gi,l=i>0?65536:0,c=!1;let u=(p,$=!0)=>{c=!0,b($,p)},b=(p,$)=>{if(d===(d=p))return;let w=!1;if(Ge&&o!==-1){if(i===0){let k=n.data;k===ea?o=0:k===xa?o=1/0:(o=parseInt(k.substring(1)),o!==o&&(o=d?1/0:-1))}let x=o>i;!!d===x&&(n=Cs(),ai(n),Wi(!1),w=!0,o=-1)}d?(a?Wr(a):$&&(a=Pi(()=>$(n))),s&&ln(s,()=>{s=null})):(s?Wr(s):$&&(s=Pi(()=>$(n,[i+1,o]))),a&&ln(a,()=>{a=null})),w&&Wi(!0)};Ki(()=>{c=!1,e(u),c||b(null,null)},l),Ge&&(n=dt)}function Ra(t,e,i){Ge&&wi();var o=t,n=gi,a,s=Er()?tv:bs;Ki(()=>{s(n,n=e())&&(a&&ln(a),a=Pi(()=>i(o)))}),Ge&&(o=dt)}var ra=null;function np(t){ra=t}function Ml(t,e){return e}function v0(t,e,i,o){for(var n=[],a=e.length,s=0;s<a;s++)uc(e[s].e,n,!0);var d=a>0&&n.length===0&&i!==null;if(d){var l=i.parentNode;yl(l),l.append(i),o.clear(),na(t,e[0].prev,e[a-1].next)}Wu(n,()=>{for(var c=0;c<a;c++){var u=e[c];d||(o.delete(u.k),na(t,u.prev,u.next)),qi(u.e,!d)}})}function ui(t,e,i,o,n,a=null){var s=t,d={flags:e,items:new Map,first:null},l=(e&4)!==0;if(l){var c=t;s=Ge?ai(si(c)):c.appendChild(Oo())}Ge&&wi();var u=null,b=!1,p=cr(()=>{var $=i();return sr($)?$:$==null?[]:vl($)});Ki(()=>{var $=r(p),w=$.length;if(b&&w===0)return;b=w===0;let x=!1;if(Ge){var k=s.data===xa;k!==(w===0)&&(s=Cs(),ai(s),Wi(!1),x=!0)}if(Ge){for(var C=null,E,A=0;A<w;A++){if(dt.nodeType===8&&dt.data===wa){s=dt,x=!0,Wi(!1);break}var L=$[A],I=o(L,A);E=ig(dt,d,C,null,L,I,A,n,e,i),d.items.set(I,E),C=E}w>0&&ai(Cs())}Ge||g0($,d,s,n,e,o,i),a!==null&&(w===0?u?Wr(u):u=Pi(()=>a(s)):u!==null&&ln(u,()=>{u=null})),x&&Wi(!0),r(p)}),Ge&&(s=dt)}function g0(t,e,i,o,n,a,s){var d=(n&8)!==0,l=(n&3)!==0,c=t.length,u=e.items,b=e.first,p=b,$,w=null,x,k=[],C=[],E,A,L,I;if(d)for(I=0;I<c;I+=1)E=t[I],A=a(E,I),L=u.get(A),L!==void 0&&(L.a?.measure(),(x??=new Set).add(L));for(I=0;I<c;I+=1){if(E=t[I],A=a(E,I),L=u.get(A),L===void 0){var N=p?p.e.nodes_start:i;w=ig(N,e,w,w===null?e.first:w.next,E,A,I,o,n,s),u.set(A,w),k=[],C=[],p=w.next;continue}if(l&&h0(L,E,I,n),(L.e.f&8192)!==0&&(Wr(L.e),d&&(L.a?.unfix(),(x??=new Set).delete(L))),L!==p){if($!==void 0&&$.has(L)){if(k.length<C.length){var W=C[0],Q;w=W.prev;var j=k[0],re=k[k.length-1];for(Q=0;Q<k.length;Q+=1)eg(k[Q],W,i);for(Q=0;Q<C.length;Q+=1)$.delete(C[Q]);na(e,j.prev,re.next),na(e,w,j),na(e,re,W),p=W,w=re,I-=1,k=[],C=[]}else $.delete(L),eg(L,p,i),na(e,L.prev,L.next),na(e,L,w===null?e.first:w.next),na(e,w,L),w=L;continue}for(k=[],C=[];p!==null&&p.k!==A;)(p.e.f&8192)===0&&($??=new Set).add(p),C.push(p),p=p.next;if(p===null)continue;L=p}k.push(L),w=L,p=L.next}if(p!==null||$!==void 0){for(var ce=$===void 0?[]:vl($);p!==null;)(p.e.f&8192)===0&&ce.push(p),p=p.next;var X=ce.length;if(X>0){var ge=(n&4)!==0&&c===0?i:null;if(d){for(I=0;I<X;I+=1)ce[I].a?.measure();for(I=0;I<X;I+=1)ce[I].a?.fix()}v0(e,ce,ge,u)}}d&&Ro(()=>{if(x!==void 0)for(L of x)L.a?.apply()}),bt.first=e.first&&e.first.e,bt.last=w&&w.e}function h0(t,e,i,o){(o&1)!==0&&xs(t.v,e),(o&2)!==0?xs(t.i,i):t.i=i}function ig(t,e,i,o,n,a,s,d,l,c){var u=ra,b=(l&1)!==0,p=(l&16)===0,$=b?p?zr(n):Ei(n):n,w=(l&2)===0?s:Ei(s);ke&&b&&($.debug=()=>{var k=typeof w=="number"?s:w.v;c()[k]});var x={i:w,v:$,k:a,a:null,e:null,prev:i,next:o};ra=x;try{return x.e=Pi(()=>d(t,$,w,c),Ge),x.e.prev=i&&i.e,x.e.next=o&&o.e,i===null?e.first=x:(i.next=x,i.e.next=x.e),o!==null&&(o.prev=x,o.e.prev=x.e),x}finally{ra=u}}function eg(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,n=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var s=po(a);n.before(a),a=s}}function na(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 _0(t,e,i){if(!e||e===zv(String(i??"")))return;let o,n=t.__svelte_meta?.loc;n?o=`near ${n.file}:${n.line}:${n.column}`:Fo?.[ri]&&(o=`in ${Fo[ri]}`),xv(Yu(o))}function Ll(t,e,i,o,n){var a=t,s="",d;Ki(()=>{if(s===(s=e()??"")){Ge&&wi();return}d!==void 0&&(qi(d),d=void 0),s!==""&&(d=Pi(()=>{if(Ge){for(var l=dt.data,c=wi(),u=c;c!==null&&(c.nodeType!==8||c.data!=="");)u=c,c=po(c);if(c===null)throw Ea(),Br;ke&&!n&&_0(c.parentNode,l,s),io(dt,u),a=ai(c);return}var b=s+"";i?b=`<svg>${b}</svg>`:o&&(b=`<math>${b}</math>`);var p=Vs(b);if((i||o)&&(p=si(p)),io(si(p),p.lastChild),i||o)for(;si(p);)a.before(si(p));else a.before(p)}))})}function pe(t,e,...i){var o=t,n=te,a;Ki(()=>{n!==(n=e())&&(a&&(qi(a),a=null),ke&&n==null&&lv(),a=Pi(()=>n(o,...i)))},65536),Ge&&(o=dt)}function pi(t,e,i){Ge&&wi();var o=t,n,a;Ki(()=>{n!==(n=e())&&(a&&(ln(a),a=null),n&&(a=Pi(()=>i(o,n))))},65536),Ge&&(o=dt)}function Na(t,e,i,o,n,a){let s=Ge;Ge&&wi();var d=ke&&a&&Tt?.function[ri],l,c,u=null;Ge&&dt.nodeType===1&&(u=dt,wi());var b=Ge?dt:t,p,$=ra;Ki(()=>{let w=e()||null;var x=n?n():i||w==="svg"?wu:null;if(w!==l){var k=ra;np($),p&&(w===null?ln(p,()=>{p=null,c=null}):w===c?Wr(p):(qi(p),vc(!1))),w&&w!==c&&(p=Pi(()=>{if(u=Ge?u:x?document.createElementNS(x,w):document.createElement(w),ke&&a&&(u.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),io(u,u),o){Ge&&Gv(w)&&u.append(document.createComment(""));var C=Ge?si(u):u.appendChild(Oo());Ge&&(C===null?Wi(!1):ai(C)),o(u,C)}bt.nodes_end=u,b.before(u)})),l=w,l&&(c=l),vc(!0),np(k)}},65536),s&&(Wi(!0),ai(b))}var ap;function og(t){return ap=t.target,new rp(t)}var rp=class{#t;#e;constructor(e){var i=new Map,o=(a,s)=>{var d=zr(s);return i.set(a,d),d};let n=new Proxy({...e.props||{},$$events:{}},{get(a,s){return r(i.get(s)??o(s,Reflect.get(a,s)))},has(a,s){return s===ml?!0:(r(i.get(s)??o(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,d){return D(i.get(s)??o(s,d),d),Reflect.set(a,s,d)}});this.#e=(e.hydrate?tp:Kr)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&Is(),this.#t=n.$$events;for(let a of Object.keys(this.#e))a==="$set"||a==="$destroy"||a==="$on"||Ui(this,a,{get(){return this.#e[a]},set(s){this.#e[a]=s},enumerable:!0});this.#e.$set=a=>{Object.assign(n,a)},this.#e.$destroy=()=>{Va(this.#e)}}$set(e){this.#e.$set(e)}$on(e,i){this.#t[e]=this.#t[e]||[];let o=(...n)=>i.call(this,...n);return this.#t[e].push(o),()=>{this.#t[e]=this.#t[e].filter(n=>n!==o)}}$destroy(){this.#e.$destroy()}};function z(t,e){Ro(()=>{var i=t.getRootNode(),o=i.host?i:i.head??i.ownerDocument.head??ap?.parentNode;if(!o?.querySelector("#"+e.hash)){let n=document.createElement("style");n.id=e.hash,n.textContent=e.code,o.appendChild(n),ke&&Yv(e.hash,n)}})}function ng(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(i=ng(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function rg(){for(var t,e,i=0,o="",n=arguments.length;i<n;i++)(t=arguments[i])&&(e=ng(t))&&(o&&(o+=" "),o+=e);return o}function Vl(t){return typeof t=="object"?rg(t):t??""}var ag=[...`
48
- \r\f\xA0\v\uFEFF`];function lg(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var n in i)if(i[n])o=o?o+" "+n:n;else if(o.length)for(var a=n.length,s=0;(s=o.indexOf(n,s))>=0;){var d=s+a;(s===0||ag.includes(o[s-1]))&&(d===o.length||ag.includes(o[d]))?o=(s===0?"":o.substring(0,s))+o.substring(d+1):s=d}}return o===""?null:o}function sg(t,e=!1){var i=e?" !important;":";",o="";for(var n in t){var a=t[n];a!=null&&a!==""&&(o+=" "+n+": "+a+i)}return o}function sp(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function dg(t,e){if(e){var i="",o,n;if(Array.isArray(e)?(o=e[0],n=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,s=0,d=!1,l=[];o&&l.push(...Object.keys(o).map(sp)),n&&l.push(...Object.keys(n).map(sp));var c=0,u=-1;let x=t.length;for(var b=0;b<x;b++){var p=t[b];if(d?p==="/"&&t[b-1]==="*"&&(d=!1):a?a===p&&(a=!1):p==="/"&&t[b+1]==="*"?d=!0:p==='"'||p==="'"?a=p:p==="("?s++:p===")"&&s--,!d&&a===!1&&s===0){if(p===":"&&u===-1)u=b;else if(p===";"||b===x-1){if(u!==-1){var $=sp(t.substring(c,u).trim());if(!l.includes($)){p!==";"&&b++;var w=t.substring(c,b).trim();i+=" "+w+";"}}c=b+1,u=-1}}}}return o&&(i+=sg(o)),n&&(i+=sg(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function J(t,e,i,o,n,a){var s=t.__className;if(Ge||s!==i){var d=lg(i,o,a);(!Ge||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&n!==a)for(var l in a){var c=!!a[l];(n==null||c!==!!n[l])&&t.classList.toggle(l,c)}return a}function lp(t,e={},i,o){for(var n in i){var a=i[n];e[n]!==a&&(i[n]==null?t.style.removeProperty(n):t.style.setProperty(n,a,o))}}function tt(t,e,i,o){var n=t.__style;if(Ge||n!==e){var a=dg(e,o);(!Ge||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(lp(t,i?.[0],o[0]),lp(t,i?.[1],o[1],"important")):lp(t,i,o));return o}var Ns=Symbol("class"),Ds=Symbol("style"),pg=Symbol("is custom element"),fg=Symbol("is html");function mg(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function De(t,e,i,o){var n=vg(t);if(Ge&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||C0(t,e,i??"");return}n[e]!==(n[e]=i)&&(e==="loading"&&(t[Ym]=i),i==null?t.removeAttribute(e):typeof i!="string"&&gg(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function $e(t,e,i,o,n=!1){var a=vg(t),s=a[pg],d=!a[fg];let l=Ge&&s;l&&Wi(!1);var c=e||{},u=t.tagName==="OPTION";for(var b in e)b in i||(i[b]=null);i.class?i.class=Vl(i.class):(o||i[Ns])&&(i.class=null),i[Ds]&&(i.style??=null);var p=gg(t);for(let L in i){let I=i[L];if(u&&L==="value"&&I==null){t.value=t.__value="",c[L]=I;continue}if(L==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";J(t,$,I,o,e?.[Ns],i[Ns]),c[L]=I,c[Ns]=i[Ns];continue}if(L==="style"){tt(t,I,e?.[Ds],i[Ds]),c[L]=I,c[Ds]=i[Ds];continue}var w=c[L];if(I!==w){c[L]=I;var x=L[0]+L[1];if(x!=="$$")if(x==="on"){let N={},W="$$"+L,Q=L.slice(2);var k=Wv(Q);if(qv(Q)&&(Q=Q.slice(0,-7),N.capture=!0),!k&&w){if(I!=null)continue;t.removeEventListener(Q,c[W],N),c[W]=null}if(I!=null)if(k)t[`__${Q}`]=I,ot([Q]);else{let j=function(re){c[L].call(this,re)};var A=j;c[W]=Ju(Q,t,j,N)}else k&&(t[`__${Q}`]=void 0)}else if(L==="style")De(t,L,I);else if(L==="autofocus")Zu(t,!!I);else if(!s&&(L==="__value"||L==="value"&&I!=null))t.value=t.__value=I;else if(L==="selected"&&u)mg(t,I);else{var C=L;d||(C=Kv(C));var E=C==="defaultValue"||C==="defaultChecked";if(I==null&&!s&&!E)if(a[L]=null,C==="value"||C==="checked"){let N=t,W=e===void 0;if(C==="value"){let Q=N.defaultValue;N.removeAttribute(C),N.defaultValue=Q,N.value=N.__value=W?Q:null}else{let Q=N.defaultChecked;N.removeAttribute(C),N.defaultChecked=Q,N.checked=W?Q:!1}}else t.removeAttribute(L);else E||p.includes(C)&&(s||typeof I!="string")?t[C]=I:typeof I!="function"&&De(t,C,I,n)}}}return l&&Wi(!0),c}function vg(t){return t.__attributes??={[pg]:t.nodeName.includes("-"),[fg]:t.namespaceURI===Gm}}var cg=new Map;function gg(t){var e=cg.get(t.nodeName);if(e)return e;cg.set(t.nodeName,e=[]);for(var i,o=t,n=Element.prototype;n!==o;){i=Yd(o);for(var a in i)i[a].set&&e.push(a);o=Hr(o)}return e}function C0(t,e,i){ke&&(e==="srcset"&&k0(t,i)||dp(t.getAttribute(e)??"",i)||yv(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function dp(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function ug(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function k0(t,e){var i=ug(t.srcset),o=ug(e);return o.length===i.length&&o.every(([n,a],s)=>a===i[s][1]&&(dp(i[s][0],n)||dp(n,i[s][0])))}var T0=jd?()=>performance.now():()=>Date.now(),pr={tick:t=>(jd?requestAnimationFrame:te)(t),now:()=>T0(),tasks:new Set};function hg(){let t=pr.now();pr.tasks.forEach(e=>{e.c(t)||(pr.tasks.delete(e),e.f())}),pr.tasks.size!==0&&pr.tick(hg)}function _g(t){let e;return pr.tasks.size===0&&pr.tick(hg),{promise:new Promise(i=>{pr.tasks.add(e={c:t,f:i})}),abort(){pr.tasks.delete(e)}}}function gc(t,e){Pl(()=>{t.dispatchEvent(new CustomEvent(e))})}function A0(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 bg(t){let e={},i=t.split(";");for(let o of i){let[n,a]=o.split(":");if(!n||a===void 0)break;let s=A0(n.trim());e[s]=a.trim()}return e}var M0=t=>t;function up(t,e,i,o){var n=(t&1)!==0,a=(t&2)!==0,s=n&&a,d=(t&4)!==0,l=s?"both":n?"in":"out",c,u=e.inert,b=e.style.overflow,p,$;function w(){var A=Lt,L=bt;Ji(null),zi(null);try{return c??=i()(e,o?.()??{},{direction:l})}finally{Ji(A),zi(L)}}var x={is_global:d,in(){if(e.inert=u,!n){$?.abort(),$?.reset?.();return}a||p?.abort(),gc(e,"introstart"),p=cp(e,w(),$,1,()=>{gc(e,"introend"),p?.abort(),p=c=void 0,e.style.overflow=b})},out(A){if(!a){A?.(),c=void 0;return}e.inert=!0,gc(e,"outrostart"),$=cp(e,w(),p,0,()=>{gc(e,"outroend"),A?.()})},stop:()=>{p?.abort(),$?.abort()}},k=bt;if((k.transitions??=[]).push(x),n&&Al){var C=d;if(!C){for(var E=k.parent;E&&(E.f&65536)!==0;)for(;(E=E.parent)&&(E.f&16)===0;);C=!E||(E.f&32768)!==0}C&&sn(()=>{vt(()=>x.in())})}}function cp(t,e,i,o,n){var a=o===1;if(ta(e)){var s,d=!1;return Ro(()=>{if(!d){var k=e({direction:a?"in":"out"});s=cp(t,k,i,o,n)}}),{abort:()=>{d=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(i?.deactivate(),!e?.duration)return n(),{abort:te,deactivate:te,reset:te,t:()=>o};let{delay:l=0,css:c,tick:u,easing:b=M0}=e;var p=[];if(a&&i===void 0&&(u&&u(0,1),c)){var $=bg(c(0,1));p.push($,$)}var w=()=>1-o,x=t.animate(p,{duration:l});return x.onfinish=()=>{var k=i?.t()??1-o;i?.abort();var C=o-k,E=e.duration*Math.abs(C),A=[];if(E>0){var L=!1;if(c)for(var I=Math.ceil(E/16.666666666666668),N=0;N<=I;N+=1){var W=k+C*b(N/I),Q=bg(c(W,1-W));A.push(Q),L||=Q.overflow==="hidden"}L&&(t.style.overflow="hidden"),w=()=>{var j=x.currentTime;return k+C*b(j/E)},u&&_g(()=>{if(x.playState!=="running")return!1;var j=w();return u(j,1-j),!0})}x=t.animate(A,{duration:E,fill:"forwards"}),x.onfinish=()=>{w=()=>o,u?.(o,1-o),n()}},{abort:()=>{x&&(x.cancel(),x.effect=null,x.onfinish=te)},deactivate:()=>{n=te},reset:()=>{o===0&&u?.(1,0)},t:()=>w()}}var pp=class t{#t=new WeakMap;#e;#i;static entries=new WeakMap;constructor(e){this.#i=e}observe(e,i){var o=this.#t.get(e)||new Set;return o.add(i),this.#t.set(e,o),this.#o().observe(e,this.#i),()=>{var n=this.#t.get(e);n.delete(i),n.size===0&&(this.#t.delete(e),this.#e.unobserve(e))}}#o(){return this.#e??(this.#e=new ResizeObserver(e=>{for(var i of e){t.entries.set(i.target,i);for(var o of this.#t.get(i.target)||[])o(i)}}))}};var R0=new pp({box:"border-box"});function Ar(t,e,i){var o=R0.observe(t,()=>i(t[e]));sn(()=>(vt(()=>i(t[e])),o))}function $g(t,e){return t===e||t?.[yo]===e}function st(t={},e,i,o){return sn(()=>{var n,a;return to(()=>{n=a,a=o?.()||[],vt(()=>{t!==i(...a)&&(e(t,...a),n&&$g(i(...n),t)&&e(null,...n))})}),()=>{Ro(()=>{a&&$g(i(...a),t)&&e(null,...a)})}}),t}function fr(t=!1){let e=Tt,i=e.l.u;if(!i)return;let o=()=>lc(e.s);if(t){let n=0,a={},s=v(()=>{let d=!1,l=e.s;for(let c in l)l[c]!==a[c]&&(a[c]=l[c],d=!0);return d&&n++,n});o=()=>r(s)}i.b.length&&Es(()=>{yg(e,o),ia(i.b)}),He(()=>{let n=vt(()=>i.m.map(Jm));return()=>{for(let a of n)typeof a=="function"&&a()}}),i.a.length&&He(()=>{yg(e,o),ia(i.a)})}function yg(t,e){if(t.l.s)for(let i of t.l.s)r(i);e()}if(ke){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;uv(e)},set:o=>{i=o}})}};D0=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var D0;function Vt(t){Tt===null&&Ps("onMount"),Tr&&Tt.l!==null?N0(Tt).m.push(t):He(()=>{let e=vt(t);if(typeof e=="function")return e})}function dn(t){Tt===null&&Ps("onDestroy"),Vt(()=>()=>vt(t))}function N0(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function Rl(t,e,i){if(t==null)return e(void 0),i&&i(void 0),te;let o=vt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Bs=[];function Gn(t,e){return{subscribe:ne(t,e).subscribe}}function ne(t,e=te){let i=null,o=new Set;function n(d){if(bs(t,d)&&(t=d,i)){let l=!Bs.length;for(let c of o)c[1](),Bs.push(c,t);if(l){for(let c=0;c<Bs.length;c+=2)Bs[c][0](Bs[c+1]);Bs.length=0}}}function a(d){n(d(t))}function s(d,l=te){let c=[d,l];return o.add(c),o.size===1&&(i=e(n,a)||te),d(t),()=>{o.delete(c),o.size===0&&i&&(i(),i=null)}}return{set:n,update:a,subscribe:s}}function li(t,e,i){let o=!Array.isArray(t),n=o?[t]:t;if(!n.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Gn(i,(s,d)=>{let l=!1,c=[],u=0,b=te,p=()=>{if(u)return;b();let w=e(o?c[0]:c,s,d);a?s(w):b=typeof w=="function"?w:te},$=n.map((w,x)=>Rl(w,k=>{c[x]=k,u&=~(1<<x),l&&p()},()=>{u|=1<<x}));return l=!0,p(),function(){ia($),b(),l=!1}})}function _e(t){let e;return Rl(t,i=>e=i)(),e}var _c=!1,fp=Symbol();function y(t,e,i){let o=i[e]??={store:null,source:zr(void 0),unsubscribe:te};if(o.store!==t&&!(fp in i))if(o.unsubscribe(),o.store=t??null,t==null)o.source.v=void 0,o.unsubscribe=te;else{var n=!0;o.unsubscribe=Rl(t,a=>{n?o.source.v=a:D(o.source,a)}),n=!1}return t&&fp in i?_e(t):r(o.source)}function Le(){let t={};function e(){Uo(()=>{for(var i in t)t[i].unsubscribe();Ui(t,fp,{enumerable:!1,value:!0})})}return[t,e]}function mp(t){var e=_c;try{return _c=!1,[t(),_c]}finally{_c=e}}var q0={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return ke&&cv(`${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 Te(t,e,i){return new Proxy(ke?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},q0)}var W0={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(ta(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 n=t.props[o];ta(n)&&(n=n());let a=kn(n,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(ta(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let n=kn(o,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===yo||e===ml)return!1;for(let i of t.props)if(ta(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props){ta(i)&&(i=i());for(let o in i)e.includes(o)||e.push(o)}return e}};function Qr(...t){return new Proxy({props:t},W0)}function xg(t){return t.ctx?.d??!1}function m(t,e,i,o){var n=(i&1)!==0,a=!Tr||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,l=!1,c;s?[c,l]=mp(()=>t[e]):c=t[e];var u=yo in t||ml in t,b=s&&(kn(t,e)?.set??(u&&e in t&&(W=>t[e]=W)))||void 0,p=o,$=!0,w=!1,x=()=>(w=!0,$&&($=!1,d?p=vt(o):p=o),p);c===void 0&&o!==void 0&&(b&&a&&dv(e),c=x(),b&&b(c));var k;if(a)k=()=>{var W=t[e];return W===void 0?x():($=!0,w=!1,W)};else{var C=(n?v:cr)(()=>t[e]);C.f|=131072,k=()=>{var W=r(C);return W!==void 0&&(p=void 0),W===void 0?p:W}}if((i&4)===0)return k;if(b){var E=t.$$legacy;return function(W,Q){return arguments.length>0?((!a||!Q||E||l)&&b(Q?k():W),W):k()}}var A=!1,L=!1,I=zr(c),N=v(()=>{var W=k(),Q=r(I);return A?(A=!1,L=!0,Q):(L=!1,I.v=W)});return s&&r(N),n||(N.equals=$s),function(W,Q){if(_l!==null&&(A=L,k(),r(I)),arguments.length>0){let j=Q?r(N):a&&s?le(W):W;if(!N.equals(j)){if(A=!0,D(I,j),w&&p!==void 0&&(p=j),xg(N))return W;vt(()=>r(N))}return W}return xg(N)?N.v:r(N)}}var K0;typeof HTMLElement=="function"&&(K0=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,i){super(),this.$$ctor=t,this.$$s=e,i&&this.attachShadow({mode:"open"})}addEventListener(t,e,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){let o=this.$$c.$on(t,e);this.$$l_u.set(e,o)}super.addEventListener(t,e,i)}removeEventListener(t,e,i){if(super.removeEventListener(t,e,i),this.$$c){let o=this.$$l_u.get(e);o&&(o(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return a=>{let s=document.createElement("slot");n!=="default"&&(s.name=n),_(a,s)}};var t=e;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let i={},o=Q0(this);for(let n of this.$$s)n in o&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),i.default=!0):i[n]=e(n));for(let n of this.attributes){let a=this.$$g_p(n.name);a in this.$$d||(this.$$d[a]=vp(a,n.value,this.$$p_d,"toProp"))}for(let n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=og({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:i,$$host:this}}),this.$$me=cc(()=>{to(()=>{this.$$r=!0;for(let n of Su(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];let a=vp(n,this.$$d[n],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,a)}this.$$r=!1})});for(let n in this.$$l)for(let a of this.$$l[n]){let s=this.$$c.$on(n,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(t,e,i){this.$$r||(t=this.$$g_p(t),this.$$d[t]=vp(t,i,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Su(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function vp(t,e,i,o){let n=i[t]?.type;if(e=n==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(n){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(n){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Q0(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var wg="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(wg);var au=require("@vkontakte/videoplayer-core"),eQ=require("@vkontakte/videoplayer-core"),ps=require("@vkontakte/videoplayer-shared"),$1=require("@vkontakte/videoplayer-statistics");var Da=require("@vkontakte/videoplayer-shared");var j0={isMobile:void 0,debugLog:!1,devNullLog:!1,defaultLanguage:Da.InterfaceLanguage.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:Da.VideoQuality.Q_480P,highQualityLimit:Da.VideoQuality.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,sentry:!0,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,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,skipInitialPlaybackRateValue:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusAnimationDuration:1e3,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,playbackStatusNextVideoAnimationDuration:1e3},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,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null}},Sg=t=>(0,Da.fillWithDefault)(t,j0),Cg=t=>Ms("ui-config",t),Rt=()=>As("ui-config");var Nl="vk_player_debug_panel_opened";var kg="videoplayer",Tg="videoplayer";var Mr={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Ig=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Eg=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Pg=new Set(["ShiftRight","ShiftLeft"]);var Ag=["TIMELINE"],Dl=[...Ag,"GRAPH_BUTTON"],gp=[...Ag,"PLAY_BUTTON"],Bl=[...Dl,"PLAY_BUTTON"];var mr=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(mr||{}),Oa={xs:0,s:1,m:2,l:3,xl:4};var Ol=require("@vkontakte/videoplayer-shared"),Mg=require("@vkontakte/videoplayer-core"),Lg=require("@vkontakte/videoplayer-statistics");var bc="prod",Ha="1.1.63-beta.2";var Fa=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Vg=Symbol("storeContext"),Rg=Symbol("microStoresContext"),Ng=(t,e)=>{Ms(Vg,t),Ms(Rg,e),bc==="dev"&&(window.app={store:t,microStores:e})},be=()=>{let t=As(Vg);return(0,Ol.assertNonNullable)(t,"Store context is empty!"),t},Qi=()=>{let t=As(Rg);return(0,Ol.assertNonNullable)(t,"MicroStores context is empty!"),t},Ut=(t,e)=>yc(t,t.getValue(),e),yc=(t,e,i)=>Gn(e,o=>{let n=t.subscribe(a=>{o(a),i?.(a)});return()=>n.unsubscribe()}),Dg=(t,e,i)=>{let o=t.info,{width:n,height:a}=_e(i.ui.playerSize),s=o.throughputEstimation$.getValue()?.toFixed(0)??0,d=o.rttEstimation$.getValue()?.toFixed(0)??0,l=o.isAutoQualityEnabled$.getValue()?"auto":"manual",c=`${Ha} (core: ${Mg.VERSION}, stat: ${Lg.VERSION}, shared: ${Ol.VERSION})`,u=_e(i.state.errorLog$),b=u.length?`
48
+ \r\f\xA0\v\uFEFF`];function lg(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var n in i)if(i[n])o=o?o+" "+n:n;else if(o.length)for(var a=n.length,s=0;(s=o.indexOf(n,s))>=0;){var d=s+a;(s===0||ag.includes(o[s-1]))&&(d===o.length||ag.includes(o[d]))?o=(s===0?"":o.substring(0,s))+o.substring(d+1):s=d}}return o===""?null:o}function sg(t,e=!1){var i=e?" !important;":";",o="";for(var n in t){var a=t[n];a!=null&&a!==""&&(o+=" "+n+": "+a+i)}return o}function sp(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function dg(t,e){if(e){var i="",o,n;if(Array.isArray(e)?(o=e[0],n=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,s=0,d=!1,l=[];o&&l.push(...Object.keys(o).map(sp)),n&&l.push(...Object.keys(n).map(sp));var c=0,u=-1;let x=t.length;for(var b=0;b<x;b++){var p=t[b];if(d?p==="/"&&t[b-1]==="*"&&(d=!1):a?a===p&&(a=!1):p==="/"&&t[b+1]==="*"?d=!0:p==='"'||p==="'"?a=p:p==="("?s++:p===")"&&s--,!d&&a===!1&&s===0){if(p===":"&&u===-1)u=b;else if(p===";"||b===x-1){if(u!==-1){var $=sp(t.substring(c,u).trim());if(!l.includes($)){p!==";"&&b++;var w=t.substring(c,b).trim();i+=" "+w+";"}}c=b+1,u=-1}}}}return o&&(i+=sg(o)),n&&(i+=sg(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function J(t,e,i,o,n,a){var s=t.__className;if(Ge||s!==i){var d=lg(i,o,a);(!Ge||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&n!==a)for(var l in a){var c=!!a[l];(n==null||c!==!!n[l])&&t.classList.toggle(l,c)}return a}function lp(t,e={},i,o){for(var n in i){var a=i[n];e[n]!==a&&(i[n]==null?t.style.removeProperty(n):t.style.setProperty(n,a,o))}}function tt(t,e,i,o){var n=t.__style;if(Ge||n!==e){var a=dg(e,o);(!Ge||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(lp(t,i?.[0],o[0]),lp(t,i?.[1],o[1],"important")):lp(t,i,o));return o}var Ns=Symbol("class"),Ds=Symbol("style"),pg=Symbol("is custom element"),fg=Symbol("is html");function mg(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ve(t,e,i,o){var n=vg(t);if(Ge&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||C0(t,e,i??"");return}n[e]!==(n[e]=i)&&(e==="loading"&&(t[Ym]=i),i==null?t.removeAttribute(e):typeof i!="string"&&gg(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function $e(t,e,i,o,n=!1){var a=vg(t),s=a[pg],d=!a[fg];let l=Ge&&s;l&&Wi(!1);var c=e||{},u=t.tagName==="OPTION";for(var b in e)b in i||(i[b]=null);i.class?i.class=Vl(i.class):(o||i[Ns])&&(i.class=null),i[Ds]&&(i.style??=null);var p=gg(t);for(let L in i){let I=i[L];if(u&&L==="value"&&I==null){t.value=t.__value="",c[L]=I;continue}if(L==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";J(t,$,I,o,e?.[Ns],i[Ns]),c[L]=I,c[Ns]=i[Ns];continue}if(L==="style"){tt(t,I,e?.[Ds],i[Ds]),c[L]=I,c[Ds]=i[Ds];continue}var w=c[L];if(I!==w){c[L]=I;var x=L[0]+L[1];if(x!=="$$")if(x==="on"){let N={},W="$$"+L,Q=L.slice(2);var k=Wv(Q);if(qv(Q)&&(Q=Q.slice(0,-7),N.capture=!0),!k&&w){if(I!=null)continue;t.removeEventListener(Q,c[W],N),c[W]=null}if(I!=null)if(k)t[`__${Q}`]=I,ot([Q]);else{let j=function(re){c[L].call(this,re)};var A=j;c[W]=Ju(Q,t,j,N)}else k&&(t[`__${Q}`]=void 0)}else if(L==="style")Ve(t,L,I);else if(L==="autofocus")Zu(t,!!I);else if(!s&&(L==="__value"||L==="value"&&I!=null))t.value=t.__value=I;else if(L==="selected"&&u)mg(t,I);else{var C=L;d||(C=Kv(C));var E=C==="defaultValue"||C==="defaultChecked";if(I==null&&!s&&!E)if(a[L]=null,C==="value"||C==="checked"){let N=t,W=e===void 0;if(C==="value"){let Q=N.defaultValue;N.removeAttribute(C),N.defaultValue=Q,N.value=N.__value=W?Q:null}else{let Q=N.defaultChecked;N.removeAttribute(C),N.defaultChecked=Q,N.checked=W?Q:!1}}else t.removeAttribute(L);else E||p.includes(C)&&(s||typeof I!="string")?t[C]=I:typeof I!="function"&&Ve(t,C,I,n)}}}return l&&Wi(!0),c}function vg(t){return t.__attributes??={[pg]:t.nodeName.includes("-"),[fg]:t.namespaceURI===Gm}}var cg=new Map;function gg(t){var e=cg.get(t.nodeName);if(e)return e;cg.set(t.nodeName,e=[]);for(var i,o=t,n=Element.prototype;n!==o;){i=Yd(o);for(var a in i)i[a].set&&e.push(a);o=Hr(o)}return e}function C0(t,e,i){ke&&(e==="srcset"&&k0(t,i)||dp(t.getAttribute(e)??"",i)||yv(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function dp(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function ug(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function k0(t,e){var i=ug(t.srcset),o=ug(e);return o.length===i.length&&o.every(([n,a],s)=>a===i[s][1]&&(dp(i[s][0],n)||dp(n,i[s][0])))}var T0=jd?()=>performance.now():()=>Date.now(),pr={tick:t=>(jd?requestAnimationFrame:te)(t),now:()=>T0(),tasks:new Set};function hg(){let t=pr.now();pr.tasks.forEach(e=>{e.c(t)||(pr.tasks.delete(e),e.f())}),pr.tasks.size!==0&&pr.tick(hg)}function _g(t){let e;return pr.tasks.size===0&&pr.tick(hg),{promise:new Promise(i=>{pr.tasks.add(e={c:t,f:i})}),abort(){pr.tasks.delete(e)}}}function gc(t,e){Pl(()=>{t.dispatchEvent(new CustomEvent(e))})}function A0(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 bg(t){let e={},i=t.split(";");for(let o of i){let[n,a]=o.split(":");if(!n||a===void 0)break;let s=A0(n.trim());e[s]=a.trim()}return e}var M0=t=>t;function up(t,e,i,o){var n=(t&1)!==0,a=(t&2)!==0,s=n&&a,d=(t&4)!==0,l=s?"both":n?"in":"out",c,u=e.inert,b=e.style.overflow,p,$;function w(){var A=Lt,L=bt;Ji(null),zi(null);try{return c??=i()(e,o?.()??{},{direction:l})}finally{Ji(A),zi(L)}}var x={is_global:d,in(){if(e.inert=u,!n){$?.abort(),$?.reset?.();return}a||p?.abort(),gc(e,"introstart"),p=cp(e,w(),$,1,()=>{gc(e,"introend"),p?.abort(),p=c=void 0,e.style.overflow=b})},out(A){if(!a){A?.(),c=void 0;return}e.inert=!0,gc(e,"outrostart"),$=cp(e,w(),p,0,()=>{gc(e,"outroend"),A?.()})},stop:()=>{p?.abort(),$?.abort()}},k=bt;if((k.transitions??=[]).push(x),n&&Al){var C=d;if(!C){for(var E=k.parent;E&&(E.f&65536)!==0;)for(;(E=E.parent)&&(E.f&16)===0;);C=!E||(E.f&32768)!==0}C&&sn(()=>{vt(()=>x.in())})}}function cp(t,e,i,o,n){var a=o===1;if(ta(e)){var s,d=!1;return Ro(()=>{if(!d){var k=e({direction:a?"in":"out"});s=cp(t,k,i,o,n)}}),{abort:()=>{d=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(i?.deactivate(),!e?.duration)return n(),{abort:te,deactivate:te,reset:te,t:()=>o};let{delay:l=0,css:c,tick:u,easing:b=M0}=e;var p=[];if(a&&i===void 0&&(u&&u(0,1),c)){var $=bg(c(0,1));p.push($,$)}var w=()=>1-o,x=t.animate(p,{duration:l});return x.onfinish=()=>{var k=i?.t()??1-o;i?.abort();var C=o-k,E=e.duration*Math.abs(C),A=[];if(E>0){var L=!1;if(c)for(var I=Math.ceil(E/16.666666666666668),N=0;N<=I;N+=1){var W=k+C*b(N/I),Q=bg(c(W,1-W));A.push(Q),L||=Q.overflow==="hidden"}L&&(t.style.overflow="hidden"),w=()=>{var j=x.currentTime;return k+C*b(j/E)},u&&_g(()=>{if(x.playState!=="running")return!1;var j=w();return u(j,1-j),!0})}x=t.animate(A,{duration:E,fill:"forwards"}),x.onfinish=()=>{w=()=>o,u?.(o,1-o),n()}},{abort:()=>{x&&(x.cancel(),x.effect=null,x.onfinish=te)},deactivate:()=>{n=te},reset:()=>{o===0&&u?.(1,0)},t:()=>w()}}var pp=class t{#t=new WeakMap;#e;#i;static entries=new WeakMap;constructor(e){this.#i=e}observe(e,i){var o=this.#t.get(e)||new Set;return o.add(i),this.#t.set(e,o),this.#o().observe(e,this.#i),()=>{var n=this.#t.get(e);n.delete(i),n.size===0&&(this.#t.delete(e),this.#e.unobserve(e))}}#o(){return this.#e??(this.#e=new ResizeObserver(e=>{for(var i of e){t.entries.set(i.target,i);for(var o of this.#t.get(i.target)||[])o(i)}}))}};var R0=new pp({box:"border-box"});function Ar(t,e,i){var o=R0.observe(t,()=>i(t[e]));sn(()=>(vt(()=>i(t[e])),o))}function $g(t,e){return t===e||t?.[yo]===e}function st(t={},e,i,o){return sn(()=>{var n,a;return to(()=>{n=a,a=o?.()||[],vt(()=>{t!==i(...a)&&(e(t,...a),n&&$g(i(...n),t)&&e(null,...n))})}),()=>{Ro(()=>{a&&$g(i(...a),t)&&e(null,...a)})}}),t}function fr(t=!1){let e=Tt,i=e.l.u;if(!i)return;let o=()=>lc(e.s);if(t){let n=0,a={},s=v(()=>{let d=!1,l=e.s;for(let c in l)l[c]!==a[c]&&(a[c]=l[c],d=!0);return d&&n++,n});o=()=>r(s)}i.b.length&&Es(()=>{yg(e,o),ia(i.b)}),He(()=>{let n=vt(()=>i.m.map(Jm));return()=>{for(let a of n)typeof a=="function"&&a()}}),i.a.length&&He(()=>{yg(e,o),ia(i.a)})}function yg(t,e){if(t.l.s)for(let i of t.l.s)r(i);e()}if(ke){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;uv(e)},set:o=>{i=o}})}};D0=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var D0;function Vt(t){Tt===null&&Ps("onMount"),Tr&&Tt.l!==null?N0(Tt).m.push(t):He(()=>{let e=vt(t);if(typeof e=="function")return e})}function dn(t){Tt===null&&Ps("onDestroy"),Vt(()=>()=>vt(t))}function N0(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function Rl(t,e,i){if(t==null)return e(void 0),i&&i(void 0),te;let o=vt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Bs=[];function Gn(t,e){return{subscribe:ne(t,e).subscribe}}function ne(t,e=te){let i=null,o=new Set;function n(d){if(bs(t,d)&&(t=d,i)){let l=!Bs.length;for(let c of o)c[1](),Bs.push(c,t);if(l){for(let c=0;c<Bs.length;c+=2)Bs[c][0](Bs[c+1]);Bs.length=0}}}function a(d){n(d(t))}function s(d,l=te){let c=[d,l];return o.add(c),o.size===1&&(i=e(n,a)||te),d(t),()=>{o.delete(c),o.size===0&&i&&(i(),i=null)}}return{set:n,update:a,subscribe:s}}function li(t,e,i){let o=!Array.isArray(t),n=o?[t]:t;if(!n.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Gn(i,(s,d)=>{let l=!1,c=[],u=0,b=te,p=()=>{if(u)return;b();let w=e(o?c[0]:c,s,d);a?s(w):b=typeof w=="function"?w:te},$=n.map((w,x)=>Rl(w,k=>{c[x]=k,u&=~(1<<x),l&&p()},()=>{u|=1<<x}));return l=!0,p(),function(){ia($),b(),l=!1}})}function _e(t){let e;return Rl(t,i=>e=i)(),e}var _c=!1,fp=Symbol();function y(t,e,i){let o=i[e]??={store:null,source:zr(void 0),unsubscribe:te};if(o.store!==t&&!(fp in i))if(o.unsubscribe(),o.store=t??null,t==null)o.source.v=void 0,o.unsubscribe=te;else{var n=!0;o.unsubscribe=Rl(t,a=>{n?o.source.v=a:D(o.source,a)}),n=!1}return t&&fp in i?_e(t):r(o.source)}function Le(){let t={};function e(){Uo(()=>{for(var i in t)t[i].unsubscribe();Ui(t,fp,{enumerable:!1,value:!0})})}return[t,e]}function mp(t){var e=_c;try{return _c=!1,[t(),_c]}finally{_c=e}}var q0={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return ke&&cv(`${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 Te(t,e,i){return new Proxy(ke?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},q0)}var W0={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(ta(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 n=t.props[o];ta(n)&&(n=n());let a=kn(n,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(ta(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let n=kn(o,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===yo||e===ml)return!1;for(let i of t.props)if(ta(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props){ta(i)&&(i=i());for(let o in i)e.includes(o)||e.push(o)}return e}};function Qr(...t){return new Proxy({props:t},W0)}function xg(t){return t.ctx?.d??!1}function m(t,e,i,o){var n=(i&1)!==0,a=!Tr||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,l=!1,c;s?[c,l]=mp(()=>t[e]):c=t[e];var u=yo in t||ml in t,b=s&&(kn(t,e)?.set??(u&&e in t&&(W=>t[e]=W)))||void 0,p=o,$=!0,w=!1,x=()=>(w=!0,$&&($=!1,d?p=vt(o):p=o),p);c===void 0&&o!==void 0&&(b&&a&&dv(e),c=x(),b&&b(c));var k;if(a)k=()=>{var W=t[e];return W===void 0?x():($=!0,w=!1,W)};else{var C=(n?v:cr)(()=>t[e]);C.f|=131072,k=()=>{var W=r(C);return W!==void 0&&(p=void 0),W===void 0?p:W}}if((i&4)===0)return k;if(b){var E=t.$$legacy;return function(W,Q){return arguments.length>0?((!a||!Q||E||l)&&b(Q?k():W),W):k()}}var A=!1,L=!1,I=zr(c),N=v(()=>{var W=k(),Q=r(I);return A?(A=!1,L=!0,Q):(L=!1,I.v=W)});return s&&r(N),n||(N.equals=$s),function(W,Q){if(_l!==null&&(A=L,k(),r(I)),arguments.length>0){let j=Q?r(N):a&&s?le(W):W;if(!N.equals(j)){if(A=!0,D(I,j),w&&p!==void 0&&(p=j),xg(N))return W;vt(()=>r(N))}return W}return xg(N)?N.v:r(N)}}var K0;typeof HTMLElement=="function"&&(K0=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,i){super(),this.$$ctor=t,this.$$s=e,i&&this.attachShadow({mode:"open"})}addEventListener(t,e,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){let o=this.$$c.$on(t,e);this.$$l_u.set(e,o)}super.addEventListener(t,e,i)}removeEventListener(t,e,i){if(super.removeEventListener(t,e,i),this.$$c){let o=this.$$l_u.get(e);o&&(o(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return a=>{let s=document.createElement("slot");n!=="default"&&(s.name=n),_(a,s)}};var t=e;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let i={},o=Q0(this);for(let n of this.$$s)n in o&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),i.default=!0):i[n]=e(n));for(let n of this.attributes){let a=this.$$g_p(n.name);a in this.$$d||(this.$$d[a]=vp(a,n.value,this.$$p_d,"toProp"))}for(let n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=og({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:i,$$host:this}}),this.$$me=cc(()=>{to(()=>{this.$$r=!0;for(let n of Su(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];let a=vp(n,this.$$d[n],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,a)}this.$$r=!1})});for(let n in this.$$l)for(let a of this.$$l[n]){let s=this.$$c.$on(n,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(t,e,i){this.$$r||(t=this.$$g_p(t),this.$$d[t]=vp(t,i,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return Su(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function vp(t,e,i,o){let n=i[t]?.type;if(e=n==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(n){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(n){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Q0(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var wg="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(wg);var au=require("@vkontakte/videoplayer-core"),eQ=require("@vkontakte/videoplayer-core"),ps=require("@vkontakte/videoplayer-shared"),$1=require("@vkontakte/videoplayer-statistics");var Da=require("@vkontakte/videoplayer-shared");var j0={isMobile:void 0,debugLog:!1,devNullLog:!1,defaultLanguage:Da.InterfaceLanguage.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:Da.VideoQuality.Q_480P,highQualityLimit:Da.VideoQuality.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,sentry:!0,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,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,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,skipInitialPlaybackRateValue:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusAnimationDuration:1e3,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,playbackStatusNextVideoAnimationDuration:1e3},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,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null}},Sg=t=>(0,Da.fillWithDefault)(t,j0),Cg=t=>Ms("ui-config",t),Rt=()=>As("ui-config");var Nl="vk_player_debug_panel_opened";var kg="videoplayer",Tg="videoplayer";var Mr={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Ig=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Eg=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Pg=new Set(["ShiftRight","ShiftLeft"]);var Ag=["TIMELINE"],Dl=[...Ag,"GRAPH_BUTTON"],gp=[...Ag,"PLAY_BUTTON"],Bl=[...Dl,"PLAY_BUTTON"];var mr=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(mr||{}),Oa={xs:0,s:1,m:2,l:3,xl:4};var Ol=require("@vkontakte/videoplayer-shared"),Mg=require("@vkontakte/videoplayer-core"),Lg=require("@vkontakte/videoplayer-statistics");var bc="prod",Ha="1.1.64-dev.1ed690e2.0";var Fa=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Vg=Symbol("storeContext"),Rg=Symbol("microStoresContext"),Ng=(t,e)=>{Ms(Vg,t),Ms(Rg,e),bc==="dev"&&(window.app={store:t,microStores:e})},be=()=>{let t=As(Vg);return(0,Ol.assertNonNullable)(t,"Store context is empty!"),t},Qi=()=>{let t=As(Rg);return(0,Ol.assertNonNullable)(t,"MicroStores context is empty!"),t},Ut=(t,e)=>yc(t,t.getValue(),e),yc=(t,e,i)=>Gn(e,o=>{let n=t.subscribe(a=>{o(a),i?.(a)});return()=>n.unsubscribe()}),Dg=(t,e,i)=>{let o=t.info,{width:n,height:a}=_e(i.ui.playerSize),s=o.throughputEstimation$.getValue()?.toFixed(0)??0,d=o.rttEstimation$.getValue()?.toFixed(0)??0,l=o.isAutoQualityEnabled$.getValue()?"auto":"manual",c=`${Ha} (core: ${Mg.VERSION}, stat: ${Lg.VERSION}, shared: ${Ol.VERSION})`,u=_e(i.state.errorLog$),b=u.length?`
49
49
  `+u.map((C,E)=>{let A=`${E}) Type: ${C.id}
50
50
  `,L=`Message: ${C.message} (${C.thrown})
51
51
  `,I=`Trace: ${C.thrown?.stack}
@@ -67,7 +67,7 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
67
67
  rgba(0, 0, 0, 0.5) 77%,
68
68
  rgba(0, 0, 0, 0.55) 88%,
69
69
  rgba(0, 0, 0, 0.65) 100%
70
- );}`};function ql(t,e){H(e,!0),z(t,h_);let[i,o]=Le(),n=()=>y(Q,"$canSkipAd",i),a=()=>y(W,"$adPlaybackState",i),s=()=>y(E,"$isMobile",i),d=()=>y(j,"$adPosition",i),l=()=>y(re,"$secondsToWatchBeforeSkipAd",i),c=()=>y(C,"$isVideoEnded",i),u=m(e,"adsSlotId",3,void 0),b=m(e,"adsParams",3,void 0),p=m(e,"adsPreviewParam",3,void 0),$=m(e,"adsAutoplayParam",3,void 0),w=m(e,"duration",3,0),x=be(),k=Rt(),C=x.state.isEnded$,E=x.ui.isMobile,A=k.ads.isMobileGoToSiteButton,L=Z(void 0),I=Z(void 0),N=!1,W=x.ads.playbackState,Q=x.ads.canSkip,j=x.ads.position,re=x.ads.secondsToWatchBeforeSkip,ce=v(()=>n()&&a()!=="inactive"),X=v(()=>s()&&a()!=="inactive"&&A);Vt(()=>{let de=x.getAdmanWrapper();if(Us.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[(0,Us.now)(),u()]}),!u()){de.onAdmanLoadingError();return}let Ke=Ne=>{de.initAdman(Ne),N=!0},oe=new AbortController,U=()=>{oe.abort()},{width:Y,height:Ae}=_e(x.ui.playerSize),We=_e(x.ui.isFullscreen),Fe=$()??_e(x.ui.isAutoplay),ye={width:Y,height:Ae,isFullscreen:We,isAutoplay:Fe,adsContainer:r(L),adsVideoElement:r(I),slotId:u(),params:b(),previewParam:p(),duration:w()};return window.AdmanHTML?Ke(ye):de.loadAdman(oe.signal).then(()=>{Ke(ye)}).catch(()=>{de.onAdmanLoadingError()}),()=>{Us.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[(0,Us.now)(),u()]}),!N&&U()}});var ge=g_(),ee=h(ge);{var Me=de=>{var Ke=v_();_(de,Ke)};V(ee,de=>{s()&&de(Me)})}var Pe=P(ee,2);st(Pe,de=>D(I,de),()=>r(I));var Ve=P(Pe,2);{var fe=de=>{Rp(de,{get position(){return d()},get secondsToWatchBeforeSkip(){return l()},get skipAd(){return x.actions.internal.skipAd}})};V(Ve,de=>{r(ce)&&de(fe)})}var Oe=P(Ve,2);{var ie=de=>{Vp(de,{})};V(Oe,de=>{c()&&de(ie)})}var R=P(Oe,2);{var Re=de=>{Np(de,{})};V(R,de=>{r(X)&&de(Re)})}g(ge),st(ge,de=>D(L,de),()=>r(L)),_(t,ge),F(),o()}var zo=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 n=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(n=`${i}:${n}`),n};var __=ve('<svg><!><path fill="none" stroke="var(--btn-color, #fff)" stroke-width="2" d="M6.41 1A6.46 6.46 0 0 0 3 1.55 3.5 3.5 0 0 0 1.55 3 6.46 6.46 0 0 0 1 6.41v7.18A6.46 6.46 0 0 0 1.55 17 3.5 3.5 0 0 0 3 18.45a6.46 6.46 0 0 0 3.41.55h29.18a6.46 6.46 0 0 0 3.41-.55A3.5 3.5 0 0 0 40.45 17a6.46 6.46 0 0 0 .55-3.41V6.41A6.46 6.46 0 0 0 40.45 3 3.5 3.5 0 0 0 39 1.55 6.46 6.46 0 0 0 35.59 1z"></path><path fill="var(--btn-color, #f0f2f5)" fill-rule="evenodd" d="M8 5a1 1 0 0 1 1 1v7h3a1 1 0 0 1 1 .88V14a1 1 0 0 1-1 1H8a1 1 0 0 1-1-.77v-.11A.5.5 0 0 1 7 14V6a1 1 0 0 1 .88-1zm8 0a1 1 0 0 1 1 1v8a1 1 0 0 1-.88 1H16a1 1 0 0 1-1-1V6a1 1 0 0 1 .88-1zm18 0a1 1 0 0 1 1 .88V6a1 1 0 0 1-1 1h-3v2h3a1 1 0 0 1 1 .88V10a1 1 0 0 1-1 1h-3v2h3a1 1 0 0 1 1 .88V14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-.77v-.11a.5.5 0 0 1 0-.12V6a1 1 0 0 1 .56-.9A1 1 0 0 1 30 5zm-8 0a1 1 0 0 1 1 1v.1a.9.9 0 0 1-.11.35l-2.47 7.57a1.48 1.48 0 0 1-1.32.98h-.2a1.48 1.48 0 0 1-1.31-.95l-2.47-7.57a.9.9 0 0 1-.12-.36V6a1 1 0 0 1 .88-1H20a1 1 0 0 1 1 1v-.1l2 6.4 2-6.4a1 1 0 0 1 1-.9"></path></svg>');function Dp(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=__();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"42",height:"20","aria-hidden":"true","data-testid":"live-icon",role:"img",...i})),_(t,o)}var b_=ve('<svg><!><rect width="42" height="20" fill="var(--timeline-slider-filled-active-live-bg, #FF3347)" rx="5"></rect><path fill="#F2F3F5" fill-rule="evenodd" d="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.325 9.31-2.55-7.824a1 1 0 0 1-.117-.363L19 6.1h.005a1 1 0 1 1 1.99-.199L21 5.9l2 6.4 2-6.4h.005a1 1 0 0 1 1.99.2H27l-.008.023a1 1 0 0 1-.118.363l-2.55 7.824a1 1 0 0 1-.95.69h-.748a1 1 0 0 1-.95-.69z" clip-rule="evenodd"></path></svg>');function Bp(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=b_();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"42",height:"20",fill:"none","aria-hidden":"true","data-testid":"live-active-icon",role:"img",...i})),_(t,o)}function Wl(t,e){let i=m(e,"isActive",3,!1);var o=Be(),n=se(o);{var a=d=>{Bp(d,{})},s=d=>{Dp(d,{})};V(n,d=>{i()?d(a):d(s,!1)})}_(t,o)}var $_=M('<div class="equalizer svelte-1s15d2i"><div class="col svelte-1s15d2i"></div> <div class="col svelte-1s15d2i"></div> <div class="col svelte-1s15d2i"></div></div>'),y_=M('<div class="live-icon svelte-1s15d2i"><!></div>'),x_=M('<span class="text svelte-1s15d2i"> </span>'),w_=M("<div><!> <!></div>"),S_={hash:"svelte-1s15d2i",code:`.wrapper.svelte-1s15d2i {padding:2px 6px;white-space:nowrap;border-radius:4px;background-color:var(--black-alpha-40);transition:visibility var(--controls-transition-duration),
70
+ );}`};function ql(t,e){H(e,!0),z(t,h_);let[i,o]=Le(),n=()=>y(Q,"$canSkipAd",i),a=()=>y(W,"$adPlaybackState",i),s=()=>y(E,"$isMobile",i),d=()=>y(j,"$adPosition",i),l=()=>y(re,"$secondsToWatchBeforeSkipAd",i),c=()=>y(C,"$isVideoEnded",i),u=m(e,"adsSlotId",3,void 0),b=m(e,"adsParams",3,void 0),p=m(e,"adsPreviewParam",3,void 0),$=m(e,"adsAutoplayParam",3,void 0),w=m(e,"duration",3,0),x=be(),k=Rt(),C=x.state.isEnded$,E=x.ui.isMobile,A=k.ads.isMobileGoToSiteButton,L=Z(void 0),I=Z(void 0),N=!1,W=x.ads.playbackState,Q=x.ads.canSkip,j=x.ads.position,re=x.ads.secondsToWatchBeforeSkip,ce=v(()=>n()&&a()!=="inactive"),X=v(()=>s()&&a()!=="inactive"&&A);Vt(()=>{let de=x.getAdmanWrapper();if(Us.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[(0,Us.now)(),u()]}),!u()){de.onAdmanLoadingError();return}let Ke=De=>{de.initAdman(De),N=!0},oe=new AbortController,U=()=>{oe.abort()},{width:Y,height:Ae}=_e(x.ui.playerSize),We=_e(x.ui.isFullscreen),Fe=$()??_e(x.ui.isAutoplay),ye={width:Y,height:Ae,isFullscreen:We,isAutoplay:Fe,adsContainer:r(L),adsVideoElement:r(I),slotId:u(),params:b(),previewParam:p(),duration:w()};return window.AdmanHTML?Ke(ye):de.loadAdman(oe.signal).then(()=>{Ke(ye)}).catch(()=>{de.onAdmanLoadingError()}),()=>{Us.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[(0,Us.now)(),u()]}),!N&&U()}});var ge=g_(),ee=h(ge);{var Me=de=>{var Ke=v_();_(de,Ke)};V(ee,de=>{s()&&de(Me)})}var Pe=P(ee,2);st(Pe,de=>D(I,de),()=>r(I));var Re=P(Pe,2);{var fe=de=>{Rp(de,{get position(){return d()},get secondsToWatchBeforeSkip(){return l()},get skipAd(){return x.actions.internal.skipAd}})};V(Re,de=>{r(ce)&&de(fe)})}var Oe=P(Re,2);{var ie=de=>{Vp(de,{})};V(Oe,de=>{c()&&de(ie)})}var R=P(Oe,2);{var Ne=de=>{Np(de,{})};V(R,de=>{r(X)&&de(Ne)})}g(ge),st(ge,de=>D(L,de),()=>r(L)),_(t,ge),F(),o()}var zo=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 n=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(n=`${i}:${n}`),n};var __=ve('<svg><!><path fill="none" stroke="var(--btn-color, #fff)" stroke-width="2" d="M6.41 1A6.46 6.46 0 0 0 3 1.55 3.5 3.5 0 0 0 1.55 3 6.46 6.46 0 0 0 1 6.41v7.18A6.46 6.46 0 0 0 1.55 17 3.5 3.5 0 0 0 3 18.45a6.46 6.46 0 0 0 3.41.55h29.18a6.46 6.46 0 0 0 3.41-.55A3.5 3.5 0 0 0 40.45 17a6.46 6.46 0 0 0 .55-3.41V6.41A6.46 6.46 0 0 0 40.45 3 3.5 3.5 0 0 0 39 1.55 6.46 6.46 0 0 0 35.59 1z"></path><path fill="var(--btn-color, #f0f2f5)" fill-rule="evenodd" d="M8 5a1 1 0 0 1 1 1v7h3a1 1 0 0 1 1 .88V14a1 1 0 0 1-1 1H8a1 1 0 0 1-1-.77v-.11A.5.5 0 0 1 7 14V6a1 1 0 0 1 .88-1zm8 0a1 1 0 0 1 1 1v8a1 1 0 0 1-.88 1H16a1 1 0 0 1-1-1V6a1 1 0 0 1 .88-1zm18 0a1 1 0 0 1 1 .88V6a1 1 0 0 1-1 1h-3v2h3a1 1 0 0 1 1 .88V10a1 1 0 0 1-1 1h-3v2h3a1 1 0 0 1 1 .88V14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-.77v-.11a.5.5 0 0 1 0-.12V6a1 1 0 0 1 .56-.9A1 1 0 0 1 30 5zm-8 0a1 1 0 0 1 1 1v.1a.9.9 0 0 1-.11.35l-2.47 7.57a1.48 1.48 0 0 1-1.32.98h-.2a1.48 1.48 0 0 1-1.31-.95l-2.47-7.57a.9.9 0 0 1-.12-.36V6a1 1 0 0 1 .88-1H20a1 1 0 0 1 1 1v-.1l2 6.4 2-6.4a1 1 0 0 1 1-.9"></path></svg>');function Dp(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=__();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"42",height:"20","aria-hidden":"true","data-testid":"live-icon",role:"img",...i})),_(t,o)}var b_=ve('<svg><!><rect width="42" height="20" fill="var(--timeline-slider-filled-active-live-bg, #FF3347)" rx="5"></rect><path fill="#F2F3F5" fill-rule="evenodd" d="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.325 9.31-2.55-7.824a1 1 0 0 1-.117-.363L19 6.1h.005a1 1 0 1 1 1.99-.199L21 5.9l2 6.4 2-6.4h.005a1 1 0 0 1 1.99.2H27l-.008.023a1 1 0 0 1-.118.363l-2.55 7.824a1 1 0 0 1-.95.69h-.748a1 1 0 0 1-.95-.69z" clip-rule="evenodd"></path></svg>');function Bp(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=b_();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"42",height:"20",fill:"none","aria-hidden":"true","data-testid":"live-active-icon",role:"img",...i})),_(t,o)}function Wl(t,e){let i=m(e,"isActive",3,!1);var o=Be(),n=se(o);{var a=d=>{Bp(d,{})},s=d=>{Dp(d,{})};V(n,d=>{i()?d(a):d(s,!1)})}_(t,o)}var $_=M('<div class="equalizer svelte-1s15d2i"><div class="col svelte-1s15d2i"></div> <div class="col svelte-1s15d2i"></div> <div class="col svelte-1s15d2i"></div></div>'),y_=M('<div class="live-icon svelte-1s15d2i"><!></div>'),x_=M('<span class="text svelte-1s15d2i"> </span>'),w_=M("<div><!> <!></div>"),S_={hash:"svelte-1s15d2i",code:`.wrapper.svelte-1s15d2i {padding:2px 6px;white-space:nowrap;border-radius:4px;background-color:var(--black-alpha-40);transition:visibility var(--controls-transition-duration),
71
71
  opacity var(--controls-transition-duration);}.wrapper.live.svelte-1s15d2i {font-size:0;line-height:20px;height:20px;border-radius:2px;background:var(--red);padding:0 7px;}.equalizer.svelte-1s15d2i {display:inline-block;vertical-align:middle;position:relative;width:10px;height:10px;margin-top:-4px;margin-right:4px;}.live.svelte-1s15d2i .equalizer:where(.svelte-1s15d2i) {margin-top:-2px;}.equalizer.svelte-1s15d2i .col:where(.svelte-1s15d2i) {width:2px;height:10px;margin-right:2px;background:var(--btn-color, --white);position:absolute;bottom:0;transform-origin:50% 100%;
72
72
  animation: 1.5s infinite linear alternate;animation-play-state:paused;}.playing.svelte-1s15d2i .equalizer:where(.svelte-1s15d2i) .col:where(.svelte-1s15d2i) {animation-play-state:running;}.equalizer.svelte-1s15d2i .col:where(.svelte-1s15d2i):nth-child(1) {left:0;
73
73
  animation-name: svelte-1s15d2i-thumb-timer-equalizer-col1;}.equalizer.svelte-1s15d2i .col:where(.svelte-1s15d2i):nth-child(2) {left:3px;
@@ -139,9 +139,9 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
139
139
  transform: scaleY(0.6);
140
140
  }
141
141
  }.text.svelte-1s15d2i {font-size:13px;line-height:16px;color:var(--controls-time);font-weight:500;}`};function Kl(t,e){z(t,S_);let i=m(e,"withEqualizer",3,!1),o=m(e,"isLive",3,!1),n=m(e,"isPlaying",3,!1);var a=w_();let s;var d=h(a);{var l=p=>{var $=$_();_(p,$)};V(d,p=>{i()&&p(l)})}var c=P(d,2);{var u=p=>{var $=y_(),w=h($);Wl(w,{isActive:!0}),g($),_(p,$)},b=p=>{var $=x_(),w=h($,!0);g($),S(()=>ue(w,e.time)),_(p,$)};V(c,p=>{o()?p(u):p(b,!1)})}g(a),S(p=>s=J(a,1,"wrapper svelte-1s15d2i",null,s,p),[()=>({live:o(),playing:n()})]),_(t,a)}var C_=M('<div role="timer" data-testid="thumb-timer"><!></div>'),k_={hash:"svelte-1b40w20",code:`.thumb-timer.svelte-1b40w20 {position:absolute;z-index:var(--thumb-timer-z-index);bottom:0;right:0;margin:8px;transition:visibility var(--controls-transition-duration),
142
- opacity var(--controls-transition-duration);}.thumb-timer.hidden.svelte-1b40w20 {visibility:hidden;opacity:0;}`};function Ql(t,e){H(e,!0),z(t,k_);let i=m(e,"isHidden",3,!1),o=m(e,"isLive",3,!1),n=m(e,"isPlaying",3,!1),a=v(()=>zo(e.duration-e.position));var s=C_();let d;var l=h(s);Kl(l,{get time(){return r(a)},get isLive(){return o()},get isPlaying(){return n()},withEqualizer:!0}),g(s),S(c=>d=J(s,1,"thumb-timer svelte-1b40w20",null,d,c),[()=>({hidden:i()})]),_(t,s),F()}var zs=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)}}};var yh=require("@vkontakte/videoplayer-core");var Op=require("@vkontakte/videoplayer-core"),jn=t=>{t.stopPropagation(),t.preventDefault()},I_=t=>{let e=t.previousElementSibling;e||(e=t.parentNode?.lastElementChild),e?.focus()},E_=t=>{let e=t.nextElementSibling;e||(e=t.parentNode?.firstElementChild),e?.focus()},P_=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},A_=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},fh=t=>t.code==="Escape",M_=t=>t.code==="ArrowLeft",Gl=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},mh=t=>{if(P_(t)){jn(t),E_(t.target);return}A_(t)&&(jn(t),I_(t.target))},da=t=>!Op.clientChecker.device.isAndroid&&t?.detail===0||Op.clientChecker.device.isAndroid&&t?.pointerType==="",qs=async(t,e,i)=>{await eo(),t&&!t.classList.contains("opened")&&!e&&_e(i)&&(await eo(),i.set(!1),t.focus())},vh=async(t,e,i)=>{await eo(),t&&!e&&_e(i)&&(i.set(!1),t.focus())},Ws=async(t,e,i)=>{await eo(),!!t&&e&&i&&t.children[0]?.focus()},gh=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},Lc=(t,e)=>{mh(t),fh(t)&&(jn(t),e())},Vc=async(t,e)=>{Gl(t,["ArrowRight"])&&(jn(t),e())},hh=async(t,e,i)=>{if(mh(t),M_(t)){jn(t),e();return}fh(t)&&(jn(t),i())},Ks=(t,e)=>{Gl(t)&&(jn(t),e())},_h=(t,e,i)=>{if(Gl(t))jn(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),jn(t);return}o==="ArrowRight"&&!e&&(i(!0),jn(t))}},bh=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,n=e.top+i;return{right:o,bottom:n}},$h=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,n=e.left+o;return{bottom:e.bottom+i,left:n}};var Ga=require("@vkontakte/videoplayer-shared");var vr={"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};var Hp=require("@vkontakte/videoplayer-shared");var V_=(t,e)=>{Ks(t,()=>e())},R_=M('<li class="item svelte-1hm4mm9" role="menuitem" tabindex="0"> </li>'),N_={hash:"svelte-1hm4mm9",code:".item.svelte-1hm4mm9 {padding:8px 16px;cursor:pointer;position:relative;display:block;color:rgba(255, 255, 255, 0.72);font-size:13px;line-height:18px;letter-spacing:-0.14px;white-space:nowrap;}.item.svelte-1hm4mm9:hover {background:rgba(66, 66, 66, .5);color:var(--white);}"};function Fp(t,e){H(e,!0),z(t,N_);let i=m(e,"onClick",3,Hp.noop),o=m(e,"closeContextMenu",3,Hp.noop),n=d=>{d?.stopPropagation(),i()(),o()()};var a=R_();a.__click=n,a.__keydown=[V_,n];var s=h(a,!0);g(a),S(()=>{De(a,"aria-label",e.ariaLabel??e.label),De(a,"data-testid",e.id),ue(s,e.label)}),_(t,a),F()}ot(["click","keydown"]);var Qa=(t,e)=>t.weight-e.weight;var Qs=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Qs||{});var D_=(t,e)=>{Lc(t,e)},B_=t=>{t.preventDefault()},O_=M('<ul role="menu" class="svelte-1p5ukkp"></ul>'),H_={hash:"svelte-1p5ukkp",code:"ul.svelte-1p5ukkp {position:absolute;z-index:var(--context-menu-z-index);border-radius:8px;background:rgba(0, 0, 0, 0.72);transition:visibility .1s,opacity .1s;list-style:none;margin:0;padding:6px 0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;}"};function Up(t,e){H(e,!0),z(t,H_);let[i,o]=Le(),n=()=>y(X,"$isLive$",i),a=()=>y(Pe,"$isPiPEnabled$",i),s=()=>y(ce,"$chromecastState$",i),d=()=>y(Ve,"$pictureInPictureApiIsActive$",i),l=()=>y(Me,"$isLooped$",i),c=()=>y(ge,"$positionExact$",i),u=()=>y(W,"$debugPanelVisible",i),b=()=>y(Q,"$additionalContextMenuItems$",i),p=m(e,"visible",3,!1),$=m(e,"position",19,()=>({top:0,left:0})),w=m(e,"playerContainerRef",3,void 0),x=m(e,"controlsContainerRef",3,void 0),k=m(e,"menuElementRef",15,void 0),C=Z(0),E=Z(0),A=be(),{pictureInPicture$:L}=Qi(),I=Rt(),N=A.ui.contextMenu.visible$,W=A.ui.debugPanelVisible,Q=A.ui.additionalContextMenuItems$,j=A.ui.t,re=A.actions.internal.togglePictureInPicture,ce=A.state.chromecastState$,X=A.state.isLive$,ge=A.state.positionExact$,ee=A.state.isInteractive,Me=A.state.looped$,{isEnabled$:Pe,isActive$:Ve}=L,fe=v(()=>I.features.copyVideoLink&&A.callbacks?.onCopyVideoLink),Oe=v(()=>r(fe)&&!n()&&!ee),ie=v(()=>!!A.callbacks?.onCopyEmbedCodeClicked),R=v(()=>a()&&s()!==yh.ChromecastState.CONNECTED&&!ee),Re=v(()=>I.features.videoRotate&&!ee),de=v(()=>I.showSupport&&!d()),Ke=v(()=>I.features.saveTraceInfoToFile),oe=()=>{N.set(!1),e.returnFocus?.()},U=(Ye,Ee)=>{if(!k()||!w()||!x())return;let lt=k().getBoundingClientRect(),gt=w().getBoundingClientRect();D(C,Ye-gt.left),D(E,Ee-gt.top),r(C)+lt.width>gt.width&&D(C,gt.width-lt.width),r(E)+lt.height>gt.height&&D(E,gt.height-lt.height),D(C,le(Math.max(r(C),0))),D(E,le(Math.max(r(E),0)))};He(()=>{(async()=>{if(k()&&w()&&x()){await eo();let{top:Ee,left:lt,bottom:gt,right:St}=$(),oi=lt??0,ti=Ee??0,Bi=k().getBoundingClientRect();(0,Ga.isNullable)(lt)&&!(0,Ga.isNullable)(St)&&(oi=St-Bi.width),(0,Ga.isNullable)(Ee)&&!(0,Ga.isNullable)(gt)&&(ti=gt-Bi.height),oi=Math.max(oi,0),ti=Math.max(ti,0),U(oi,ti)}})()});let Y=()=>{A.actions.internal.videoRotate()},Ae=()=>{(0,Ga.isValidURL)(e.supportLink)&&window.open(e.supportLink,"_blank"),A.actions.internal.reportProblem(),A.actions.internal.pause()},We=()=>{let Ye=A.actions.internal.getDebugTextData();if(I.features.saveDebugInfoToFile){let Ee=new Blob([...Ye],{type:"plain/text"}),lt=window.URL.createObjectURL(Ee);Fa(lt,"vk_player_debug_info","txt")}else zs(A.actions.internal.getDebugTextData())},Fe=()=>{let Ye=A.actions.internal.getTraceTextData(),Ee=new Blob([...Ye],{type:"application/json"}),lt=window.URL.createObjectURL(Ee);Fa(lt,"vk_player_trace_info","json")},ye=()=>{W.set(!0)},Ne=async()=>{try{re()}finally{e.returnFocus?.()}},je=()=>{A.actions.internal.setLooped(!l())},et=()=>{if(r(ie)){let Ye=A.callbacks?.onCopyEmbedCodeClicked?.();Ye&&zs(Ye)}},ct=(Ye=!1)=>{if(A.callbacks?.onCopyVideoLink){let Ee=A.callbacks?.onCopyVideoLink(Ye,c());Ee&&zs(Ee)}},mt=v(()=>I.features.saveDebugInfoToFile?j("menu_save_debug"):j("menu_copy_debug")),Je=v(()=>r(fe)?{id:"copy-link",weight:vr["copy-link"],label:j("menu_copy_video_link"),onClick:()=>ct()}:void 0),ut=v(()=>r(Oe)?{id:"copy-link-timestamp",weight:vr["copy-link-timestamp"],label:j("menu_copy_video_link_with_timestamp"),onClick:()=>ct(!0)}:void 0),$t=v(()=>r(ie)?{id:"copy-embed-code",weight:vr["copy-embed-code"],label:j("menu_copy_embed_code"),onClick:et}:void 0),Ot=v(()=>r(R)?{id:"pip",weight:vr.pip,label:j("menu_pip"),onClick:Ne}:void 0),we=v(()=>({id:"video-loop",weight:vr["video-loop"],label:l()?j("menu_video_loop_off"):j("menu_video_loop_on"),ariaLabel:j("aria_label_menu_loop"),onClick:je})),Dt=v(()=>r(Re)?{id:"rotate",weight:vr.rotate,label:j("menu_video_rotate"),ariaLabel:j("aria_label_menu_rotate"),onClick:Y}:void 0),ft=v(()=>r(de)?{id:"report",weight:vr.report,label:j("menu_report"),ariaLabel:`${j("menu_report")}. ${j("aria_label_new_tab_alert")}`,onClick:Ae}:void 0),K=v(()=>({id:"save-debug",weight:vr["save-debug"],label:r(mt),onClick:We})),he=v(()=>r(Ke)?{id:"save-trace",weight:vr["save-trace"],label:j("menu_save_debug"),onClick:Fe}:void 0),ae=v(()=>({id:"debug-info",weight:vr["debug-info"],label:j("menu_debug_overlay"),ariaLabel:u()?j("aria_label_menu_debug_overlay_disable"):j("aria_label_menu_debug_overlay_enable"),onClick:ye})),qe=v(()=>[r(Je),r(ut),r($t),r(Ot),r(we),r(Dt),r(ft),r(K),r(he),r(ae),...b()].filter(Ye=>!!Ye).sort(Qa));var Xe=Be(),Ue=se(Xe);{var Se=Ye=>{var Ee=O_();Ee.__contextmenu=[B_],Ee.__keydown=[D_,oe],ui(Ee,21,()=>r(qe),lt=>lt.id,(lt,gt)=>{Fp(lt,{get id(){return r(gt).id},get label(){return r(gt).label},get ariaLabel(){return r(gt).ariaLabel},get onClick(){return r(gt).onClick},closeContextMenu:oe})}),g(Ee),st(Ee,lt=>k(lt),()=>k()),S(()=>tt(Ee,`top: ${r(E)??""}px; left: ${r(C)??""}px;`)),_(Ye,Ee)};V(Ue,Ye=>{p()&&Ye(Se)})}_(t,Xe),F(),o()}ot(["contextmenu","keydown"]);var Rc=class{constructor(e){this.value=e,this.next=null}};var Gs=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Rc(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 F_=M('<div class="container svelte-1ssl9eb"><canvas class="svelte-1ssl9eb"></canvas></div>'),U_={hash:"svelte-1ssl9eb",code:".container.svelte-1ssl9eb {display:inline-block;width:120px;height:16px;}canvas.svelte-1ssl9eb {transform:scale(1, -1);margin-top:2px;}"};function jl(t,e){H(e,!0),z(t,U_);let i=m(e,"values",19,()=>[]),o=Z(void 0),n=Z(null),a=16,s=120,d=60,l=s/d;Vt(()=>{r(o).width=s,r(o).height=a,D(n,le(r(o).getContext("2d")))});function c(p,$,w,x,k){k===0&&(k=1),p.fillStyle="#fff",p.fillRect($,w,x,k)}He(()=>{let p="";if(r(n)){let $=i()[0];for(let x=1;x<i().length;x++)i()[x]>$&&($=i()[x]);r(n).clearRect(0,0,s,a);let w=d-1;for(let x=i().length-1;x>=0;x--){let k=w*l,C=$>0?a*(i()[x]/$):0;c(r(n),k,0,l,C),p=C+" "+p,w--}}});var u=F_(),b=h(u);st(b,p=>D(o,p),()=>r(o)),g(u),_(t,u),F()}var zp=require("@vkontakte/videoplayer-shared");var z_=(t,e)=>{t.stopPropagation(),zp.safeStorage.remove(Nl),e.set(!1)},q_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Video id</div> <span> </span></div>'),W_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">VSID</div> <span> </span></div>'),K_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Provider</div> <span> </span></div>'),Q_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Streams</div> <span> </span></div>'),G_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Viewport</div> <span> </span></div>'),j_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Video size</div> <span> </span></div>'),Y_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">CDN host</div> <span> </span></div>'),Z_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Volume</div> <span> </span></div>'),X_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Buffer</div> <span> </span></div>'),J_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Live latency</div> <span> </span></div>'),eb=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Segment</div> <span> </span></div>'),tb=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Network</div> <!> <span> </span></div>'),ib=M('<div class="svelte-4deykz"><div class="svelte-4deykz">V bitrate</div> <!> <span> </span></div>'),ob=M('<div role="region"><button class="close svelte-4deykz" title="\u0437\u0430\u043A\u0440\u044B\u0442\u044C">[x]</button> <div class="content svelte-4deykz"><div class="svelte-4deykz"><div class="svelte-4deykz">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="svelte-4deykz"><div class="svelte-4deykz">Dropped</div> <span> </span></div> <!> <!> <div class="svelte-4deykz"><div class="svelte-4deykz">FPS</div> <!> <span> </span></div></div></div>'),nb={hash:"svelte-4deykz",code:".container.svelte-4deykz {background:rgba(28, 28, 28, 0.8);border-radius:4px;color:#fff;left:20px;position:absolute;z-index:var(--debug-panel-z-index);top:45px;min-width:160px;font-size:10px;text-align:left;user-select:text;}.container-mobile.svelte-4deykz {top:16px;left:16px;}button.svelte-4deykz {position:absolute;right:5px;top:3px;cursor:pointer;outline:0;border:none;background-color:transparent;padding:0;color:#fff;}.content.svelte-4deykz {padding:5px;}.content.svelte-4deykz > div:where(.svelte-4deykz) > div:where(.svelte-4deykz) {display:inline-block;text-align:right;width:60px;padding:0 5px;}"};function Yl(t,e){H(e,!0),z(t,nb);let[i,o]=Le(),n=()=>y(d,"$isMobile",i),a=be(),s=a.ui.debugPanelVisible,d=a.ui.isMobile,l=Z(le(a.actions.internal.getDebugPanelData())),c=a.actions.internal.getVideoElement(),u=Z(0),b=Z(0),p=Z(0),$=new Gs(60),w=new Gs(60),x=new Gs(60),k=Z(le([])),C=Z(le([])),E=Z(le([])),A=O("aria_label_debug_panel");Vt(()=>{zp.safeStorage.set(Nl,"true"),a.actions.internal.startLogging(),c&&(D(b,le(c.getVideoPlaybackQuality().droppedVideoFrames)),D(u,le(c.getVideoPlaybackQuality().totalVideoFrames)));let K=window.setInterval(()=>{D(l,le(a.actions.internal.getDebugPanelData()))},500),he;return c&&(he=window.setInterval(()=>{if(c){D(b,le(c.getVideoPlaybackQuality().droppedVideoFrames));let ae=c.getVideoPlaybackQuality().totalVideoFrames;D(p,ae-r(u)),D(u,le(ae)),$.push(r(p)),r(l).speed&&w.push(r(l).speed),r(l).bitrate&&x.push(r(l).bitrate),D(k,le($.getValuesFromBottom())),D(C,le(w.getValuesFromBottom())),D(E,le(x.getValuesFromBottom()))}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(K),he&&clearInterval(he)}});var L=ob();let I;De(L,"aria-label",A);var N=h(L);N.__click=[z_,s];var W=P(N,2),Q=h(W),j=P(h(Q),2),re=h(j,!0);g(j),g(Q);var ce=P(Q,2);{var X=K=>{var he=q_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).id)),_(K,he)};V(ce,K=>{r(l).id&&K(X)})}var ge=P(ce,2);{var ee=K=>{var he=W_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).vsid)),_(K,he)};V(ge,K=>{r(l).vsid&&K(ee)})}var Me=P(ge,2);{var Pe=K=>{var he=K_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).provider)),_(K,he)};V(Me,K=>{r(l).provider&&K(Pe)})}var Ve=P(Me,2);{var fe=K=>{var he=Q_(),ae=P(h(he),2),qe=h(ae);g(ae),g(he),S(()=>ue(qe,`Video: ${r(l).videoCodec||""} ${(r(l).hdr?"(HDR)":"")??""}
142
+ opacity var(--controls-transition-duration);}.thumb-timer.hidden.svelte-1b40w20 {visibility:hidden;opacity:0;}`};function Ql(t,e){H(e,!0),z(t,k_);let i=m(e,"isHidden",3,!1),o=m(e,"isLive",3,!1),n=m(e,"isPlaying",3,!1),a=v(()=>zo(e.duration-e.position));var s=C_();let d;var l=h(s);Kl(l,{get time(){return r(a)},get isLive(){return o()},get isPlaying(){return n()},withEqualizer:!0}),g(s),S(c=>d=J(s,1,"thumb-timer svelte-1b40w20",null,d,c),[()=>({hidden:i()})]),_(t,s),F()}var zs=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)}}};var yh=require("@vkontakte/videoplayer-core");var Op=require("@vkontakte/videoplayer-core"),jn=t=>{t.stopPropagation(),t.preventDefault()},I_=t=>{let e=t.previousElementSibling;e||(e=t.parentNode?.lastElementChild),e?.focus()},E_=t=>{let e=t.nextElementSibling;e||(e=t.parentNode?.firstElementChild),e?.focus()},P_=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},A_=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},fh=t=>t.code==="Escape",M_=t=>t.code==="ArrowLeft",Gl=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},mh=t=>{if(P_(t)){jn(t),E_(t.target);return}A_(t)&&(jn(t),I_(t.target))},da=t=>!Op.clientChecker.device.isAndroid&&t?.detail===0||Op.clientChecker.device.isAndroid&&t?.pointerType==="",qs=async(t,e,i)=>{await eo(),t&&!t.classList.contains("opened")&&!e&&_e(i)&&(await eo(),i.set(!1),t.focus())},vh=async(t,e,i)=>{await eo(),t&&!e&&_e(i)&&(i.set(!1),t.focus())},Ws=async(t,e,i)=>{await eo(),!!t&&e&&i&&t.children[0]?.focus()},gh=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},Lc=(t,e)=>{mh(t),fh(t)&&(jn(t),e())},Vc=async(t,e)=>{Gl(t,["ArrowRight"])&&(jn(t),e())},hh=async(t,e,i)=>{if(mh(t),M_(t)){jn(t),e();return}fh(t)&&(jn(t),i())},Ks=(t,e)=>{Gl(t)&&(jn(t),e())},_h=(t,e,i)=>{if(Gl(t))jn(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),jn(t);return}o==="ArrowRight"&&!e&&(i(!0),jn(t))}},bh=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,n=e.top+i;return{right:o,bottom:n}},$h=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,n=e.left+o;return{bottom:e.bottom+i,left:n}};var Ga=require("@vkontakte/videoplayer-shared");var vr={"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};var Hp=require("@vkontakte/videoplayer-shared");var V_=(t,e)=>{Ks(t,()=>e())},R_=M('<li class="item svelte-1hm4mm9" role="menuitem" tabindex="0"> </li>'),N_={hash:"svelte-1hm4mm9",code:".item.svelte-1hm4mm9 {padding:8px 16px;cursor:pointer;position:relative;display:block;color:rgba(255, 255, 255, 0.72);font-size:13px;line-height:18px;letter-spacing:-0.14px;white-space:nowrap;}.item.svelte-1hm4mm9:hover {background:rgba(66, 66, 66, .5);color:var(--white);}"};function Fp(t,e){H(e,!0),z(t,N_);let i=m(e,"onClick",3,Hp.noop),o=m(e,"closeContextMenu",3,Hp.noop),n=d=>{d?.stopPropagation(),i()(),o()()};var a=R_();a.__click=n,a.__keydown=[V_,n];var s=h(a,!0);g(a),S(()=>{Ve(a,"aria-label",e.ariaLabel??e.label),Ve(a,"data-testid",e.id),ue(s,e.label)}),_(t,a),F()}ot(["click","keydown"]);var Qa=(t,e)=>t.weight-e.weight;var Qs=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Qs||{});var D_=(t,e)=>{Lc(t,e)},B_=t=>{t.preventDefault()},O_=M('<ul role="menu" class="svelte-1p5ukkp"></ul>'),H_={hash:"svelte-1p5ukkp",code:"ul.svelte-1p5ukkp {position:absolute;z-index:var(--context-menu-z-index);border-radius:8px;background:rgba(0, 0, 0, 0.72);transition:visibility .1s,opacity .1s;list-style:none;margin:0;padding:6px 0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;}"};function Up(t,e){H(e,!0),z(t,H_);let[i,o]=Le(),n=()=>y(X,"$isLive$",i),a=()=>y(Pe,"$isPiPEnabled$",i),s=()=>y(ce,"$chromecastState$",i),d=()=>y(Re,"$pictureInPictureApiIsActive$",i),l=()=>y(Me,"$isLooped$",i),c=()=>y(ge,"$positionExact$",i),u=()=>y(W,"$debugPanelVisible",i),b=()=>y(Q,"$additionalContextMenuItems$",i),p=m(e,"visible",3,!1),$=m(e,"position",19,()=>({top:0,left:0})),w=m(e,"playerContainerRef",3,void 0),x=m(e,"controlsContainerRef",3,void 0),k=m(e,"menuElementRef",15,void 0),C=Z(0),E=Z(0),A=be(),{pictureInPicture$:L}=Qi(),I=Rt(),N=A.ui.contextMenu.visible$,W=A.ui.debugPanelVisible,Q=A.ui.additionalContextMenuItems$,j=A.ui.t,re=A.actions.internal.togglePictureInPicture,ce=A.state.chromecastState$,X=A.state.isLive$,ge=A.state.positionExact$,ee=A.state.isInteractive,Me=A.state.looped$,{isEnabled$:Pe,isActive$:Re}=L,fe=v(()=>I.features.copyVideoLink&&A.callbacks?.onCopyVideoLink),Oe=v(()=>r(fe)&&!n()&&!ee),ie=v(()=>!!A.callbacks?.onCopyEmbedCodeClicked),R=v(()=>a()&&s()!==yh.ChromecastState.CONNECTED&&!ee),Ne=v(()=>I.features.videoRotate&&!ee),de=v(()=>I.showSupport&&!d()),Ke=v(()=>I.features.saveTraceInfoToFile),oe=()=>{N.set(!1),e.returnFocus?.()},U=(Ye,Ee)=>{if(!k()||!w()||!x())return;let lt=k().getBoundingClientRect(),gt=w().getBoundingClientRect();D(C,Ye-gt.left),D(E,Ee-gt.top),r(C)+lt.width>gt.width&&D(C,gt.width-lt.width),r(E)+lt.height>gt.height&&D(E,gt.height-lt.height),D(C,le(Math.max(r(C),0))),D(E,le(Math.max(r(E),0)))};He(()=>{(async()=>{if(k()&&w()&&x()){await eo();let{top:Ee,left:lt,bottom:gt,right:St}=$(),oi=lt??0,ti=Ee??0,Bi=k().getBoundingClientRect();(0,Ga.isNullable)(lt)&&!(0,Ga.isNullable)(St)&&(oi=St-Bi.width),(0,Ga.isNullable)(Ee)&&!(0,Ga.isNullable)(gt)&&(ti=gt-Bi.height),oi=Math.max(oi,0),ti=Math.max(ti,0),U(oi,ti)}})()});let Y=()=>{A.actions.internal.videoRotate()},Ae=()=>{(0,Ga.isValidURL)(e.supportLink)&&window.open(e.supportLink,"_blank"),A.actions.internal.reportProblem(),A.actions.internal.pause()},We=()=>{let Ye=A.actions.internal.getDebugTextData();if(I.features.saveDebugInfoToFile){let Ee=new Blob([...Ye],{type:"plain/text"}),lt=window.URL.createObjectURL(Ee);Fa(lt,"vk_player_debug_info","txt")}else zs(A.actions.internal.getDebugTextData())},Fe=()=>{let Ye=A.actions.internal.getTraceTextData(),Ee=new Blob([...Ye],{type:"application/json"}),lt=window.URL.createObjectURL(Ee);Fa(lt,"vk_player_trace_info","json")},ye=()=>{W.set(!0)},De=async()=>{try{re()}finally{e.returnFocus?.()}},je=()=>{A.actions.internal.setLooped(!l())},et=()=>{if(r(ie)){let Ye=A.callbacks?.onCopyEmbedCodeClicked?.();Ye&&zs(Ye)}},ct=(Ye=!1)=>{if(A.callbacks?.onCopyVideoLink){let Ee=A.callbacks?.onCopyVideoLink(Ye,c());Ee&&zs(Ee)}},mt=v(()=>I.features.saveDebugInfoToFile?j("menu_save_debug"):j("menu_copy_debug")),Je=v(()=>r(fe)?{id:"copy-link",weight:vr["copy-link"],label:j("menu_copy_video_link"),onClick:()=>ct()}:void 0),ut=v(()=>r(Oe)?{id:"copy-link-timestamp",weight:vr["copy-link-timestamp"],label:j("menu_copy_video_link_with_timestamp"),onClick:()=>ct(!0)}:void 0),$t=v(()=>r(ie)?{id:"copy-embed-code",weight:vr["copy-embed-code"],label:j("menu_copy_embed_code"),onClick:et}:void 0),Ot=v(()=>r(R)?{id:"pip",weight:vr.pip,label:j("menu_pip"),onClick:De}:void 0),we=v(()=>({id:"video-loop",weight:vr["video-loop"],label:l()?j("menu_video_loop_off"):j("menu_video_loop_on"),ariaLabel:j("aria_label_menu_loop"),onClick:je})),Dt=v(()=>r(Ne)?{id:"rotate",weight:vr.rotate,label:j("menu_video_rotate"),ariaLabel:j("aria_label_menu_rotate"),onClick:Y}:void 0),ft=v(()=>r(de)?{id:"report",weight:vr.report,label:j("menu_report"),ariaLabel:`${j("menu_report")}. ${j("aria_label_new_tab_alert")}`,onClick:Ae}:void 0),K=v(()=>({id:"save-debug",weight:vr["save-debug"],label:r(mt),onClick:We})),he=v(()=>r(Ke)?{id:"save-trace",weight:vr["save-trace"],label:j("menu_save_debug"),onClick:Fe}:void 0),ae=v(()=>({id:"debug-info",weight:vr["debug-info"],label:j("menu_debug_overlay"),ariaLabel:u()?j("aria_label_menu_debug_overlay_disable"):j("aria_label_menu_debug_overlay_enable"),onClick:ye})),qe=v(()=>[r(Je),r(ut),r($t),r(Ot),r(we),r(Dt),r(ft),r(K),r(he),r(ae),...b()].filter(Ye=>!!Ye).sort(Qa));var Xe=Be(),Ue=se(Xe);{var Se=Ye=>{var Ee=O_();Ee.__contextmenu=[B_],Ee.__keydown=[D_,oe],ui(Ee,21,()=>r(qe),lt=>lt.id,(lt,gt)=>{Fp(lt,{get id(){return r(gt).id},get label(){return r(gt).label},get ariaLabel(){return r(gt).ariaLabel},get onClick(){return r(gt).onClick},closeContextMenu:oe})}),g(Ee),st(Ee,lt=>k(lt),()=>k()),S(()=>tt(Ee,`top: ${r(E)??""}px; left: ${r(C)??""}px;`)),_(Ye,Ee)};V(Ue,Ye=>{p()&&Ye(Se)})}_(t,Xe),F(),o()}ot(["contextmenu","keydown"]);var Rc=class{constructor(e){this.value=e,this.next=null}};var Gs=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Rc(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 F_=M('<div class="container svelte-1ssl9eb"><canvas class="svelte-1ssl9eb"></canvas></div>'),U_={hash:"svelte-1ssl9eb",code:".container.svelte-1ssl9eb {display:inline-block;width:120px;height:16px;}canvas.svelte-1ssl9eb {transform:scale(1, -1);margin-top:2px;}"};function jl(t,e){H(e,!0),z(t,U_);let i=m(e,"values",19,()=>[]),o=Z(void 0),n=Z(null),a=16,s=120,d=60,l=s/d;Vt(()=>{r(o).width=s,r(o).height=a,D(n,le(r(o).getContext("2d")))});function c(p,$,w,x,k){k===0&&(k=1),p.fillStyle="#fff",p.fillRect($,w,x,k)}He(()=>{let p="";if(r(n)){let $=i()[0];for(let x=1;x<i().length;x++)i()[x]>$&&($=i()[x]);r(n).clearRect(0,0,s,a);let w=d-1;for(let x=i().length-1;x>=0;x--){let k=w*l,C=$>0?a*(i()[x]/$):0;c(r(n),k,0,l,C),p=C+" "+p,w--}}});var u=F_(),b=h(u);st(b,p=>D(o,p),()=>r(o)),g(u),_(t,u),F()}var zp=require("@vkontakte/videoplayer-shared");var z_=(t,e)=>{t.stopPropagation(),zp.safeStorage.remove(Nl),e.set(!1)},q_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Video id</div> <span> </span></div>'),W_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">VSID</div> <span> </span></div>'),K_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Provider</div> <span> </span></div>'),Q_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Streams</div> <span> </span></div>'),G_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Viewport</div> <span> </span></div>'),j_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Video size</div> <span> </span></div>'),Y_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">CDN host</div> <span> </span></div>'),Z_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Volume</div> <span> </span></div>'),X_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Buffer</div> <span> </span></div>'),J_=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Live latency</div> <span> </span></div>'),eb=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Segment</div> <span> </span></div>'),tb=M('<div class="svelte-4deykz"><div class="svelte-4deykz">Network</div> <!> <span> </span></div>'),ib=M('<div class="svelte-4deykz"><div class="svelte-4deykz">V bitrate</div> <!> <span> </span></div>'),ob=M('<div role="region"><button class="close svelte-4deykz" title="\u0437\u0430\u043A\u0440\u044B\u0442\u044C">[x]</button> <div class="content svelte-4deykz"><div class="svelte-4deykz"><div class="svelte-4deykz">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="svelte-4deykz"><div class="svelte-4deykz">Dropped</div> <span> </span></div> <!> <!> <div class="svelte-4deykz"><div class="svelte-4deykz">FPS</div> <!> <span> </span></div></div></div>'),nb={hash:"svelte-4deykz",code:".container.svelte-4deykz {background:rgba(28, 28, 28, 0.8);border-radius:4px;color:#fff;left:20px;position:absolute;z-index:var(--debug-panel-z-index);top:45px;min-width:160px;font-size:10px;text-align:left;user-select:text;}.container-mobile.svelte-4deykz {top:16px;left:16px;}button.svelte-4deykz {position:absolute;right:5px;top:3px;cursor:pointer;outline:0;border:none;background-color:transparent;padding:0;color:#fff;}.content.svelte-4deykz {padding:5px;}.content.svelte-4deykz > div:where(.svelte-4deykz) > div:where(.svelte-4deykz) {display:inline-block;text-align:right;width:60px;padding:0 5px;}"};function Yl(t,e){H(e,!0),z(t,nb);let[i,o]=Le(),n=()=>y(d,"$isMobile",i),a=be(),s=a.ui.debugPanelVisible,d=a.ui.isMobile,l=Z(le(a.actions.internal.getDebugPanelData())),c=a.actions.internal.getVideoElement(),u=Z(0),b=Z(0),p=Z(0),$=new Gs(60),w=new Gs(60),x=new Gs(60),k=Z(le([])),C=Z(le([])),E=Z(le([])),A=O("aria_label_debug_panel");Vt(()=>{zp.safeStorage.set(Nl,"true"),a.actions.internal.startLogging(),c&&(D(b,le(c.getVideoPlaybackQuality().droppedVideoFrames)),D(u,le(c.getVideoPlaybackQuality().totalVideoFrames)));let K=window.setInterval(()=>{D(l,le(a.actions.internal.getDebugPanelData()))},500),he;return c&&(he=window.setInterval(()=>{if(c){D(b,le(c.getVideoPlaybackQuality().droppedVideoFrames));let ae=c.getVideoPlaybackQuality().totalVideoFrames;D(p,ae-r(u)),D(u,le(ae)),$.push(r(p)),r(l).speed&&w.push(r(l).speed),r(l).bitrate&&x.push(r(l).bitrate),D(k,le($.getValuesFromBottom())),D(C,le(w.getValuesFromBottom())),D(E,le(x.getValuesFromBottom()))}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(K),he&&clearInterval(he)}});var L=ob();let I;Ve(L,"aria-label",A);var N=h(L);N.__click=[z_,s];var W=P(N,2),Q=h(W),j=P(h(Q),2),re=h(j,!0);g(j),g(Q);var ce=P(Q,2);{var X=K=>{var he=q_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).id)),_(K,he)};V(ce,K=>{r(l).id&&K(X)})}var ge=P(ce,2);{var ee=K=>{var he=W_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).vsid)),_(K,he)};V(ge,K=>{r(l).vsid&&K(ee)})}var Me=P(ge,2);{var Pe=K=>{var he=K_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).provider)),_(K,he)};V(Me,K=>{r(l).provider&&K(Pe)})}var Re=P(Me,2);{var fe=K=>{var he=Q_(),ae=P(h(he),2),qe=h(ae);g(ae),g(he),S(()=>ue(qe,`Video: ${r(l).videoCodec||""} ${(r(l).hdr?"(HDR)":"")??""}
143
143
  &
144
- Audio: ${r(l).audioCodec||""} ${(r(l).audioLanguage?`(${r(l).audioLanguage})`:"")??""}`)),_(K,he)};V(Ve,K=>{(r(l).videoCodec||r(l).audioCodec)&&K(fe)})}var Oe=P(Ve,2);{var ie=K=>{var he=G_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).viewport)),_(K,he)};V(Oe,K=>{r(l).viewport&&K(ie)})}var R=P(Oe,2);{var Re=K=>{var he=j_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).videoSize)),_(K,he)};V(R,K=>{r(l).videoSize&&K(Re)})}var de=P(R,2);{var Ke=K=>{var he=Y_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).cdn)),_(K,he)};V(de,K=>{r(l).cdn&&K(Ke)})}var oe=P(de,2);{var U=K=>{var he=Z_(),ae=P(h(he),2),qe=h(ae);g(ae),g(he),S(()=>ue(qe,`${r(l).volume??""} %`)),_(K,he)};V(oe,K=>{r(l).volume&&K(U)})}var Y=P(oe,2);{var Ae=K=>{var he=X_(),ae=P(h(he),2),qe=h(ae);g(ae),g(he),S(Xe=>ue(qe,`${Xe??""} s`),[()=>r(l).buffer.toFixed(2)]),_(K,he)};V(Y,K=>{r(l).buffer&&K(Ae)})}var We=P(Y,2);{var Fe=K=>{var he=J_(),ae=P(h(he),2),qe=h(ae);g(ae),g(he),S(Xe=>ue(qe,`${Xe??""} s`),[()=>r(l).liveLatency.toFixed(2)]),_(K,he)};V(We,K=>{r(l).liveLatency&&K(Fe)})}var ye=P(We,2);{var Ne=K=>{var he=eb(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(Xe=>ue(qe,Xe),[()=>[{value:r(l).currentVideoSegmentLength,title:"Video:"},{value:r(l).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Xe})=>Xe).map(({value:Xe,title:Ue})=>`${Ue} ${((Xe??0)/1e3).toFixed(2)} s`).join(" & ")]),_(K,he)};V(ye,K=>{(r(l).currentVideoSegmentLength||r(l).currentAudioSegmentLength)&&K(Ne)})}var je=P(ye,2),et=P(h(je),2),ct=h(et);g(et),g(je);var mt=P(je,2);{var Je=K=>{var he=tb(),ae=P(h(he),2);jl(ae,{get values(){return r(C)}});var qe=P(ae,2),Xe=h(qe);g(qe),g(he),S(Ue=>ue(Xe,`${Ue??""} Kbps`),[()=>r(l).speed.toFixed(2)]),_(K,he)};V(mt,K=>{r(l).speed&&K(Je)})}var ut=P(mt,2);{var $t=K=>{var he=ib(),ae=P(h(he),2);jl(ae,{get values(){return r(E)}});var qe=P(ae,2),Xe=h(qe);g(qe),g(he),S(Ue=>ue(Xe,`${Ue??""} Kbps`),[()=>r(l).bitrate.toFixed(2)]),_(K,he)};V(ut,K=>{r(l).bitrate&&K($t)})}var Ot=P(ut,2),we=P(h(Ot),2);jl(we,{get values(){return r(k)}});var Dt=P(we,2),ft=h(Dt,!0);g(Dt),g(Ot),g(W),g(L),S(K=>{I=J(L,1,"container svelte-4deykz",null,I,K),ue(re,r(l).version),ue(ct,`${r(b)??""} / ${r(u)??""} frames`),ue(ft,r(p))},[()=>({"container-mobile":n()})]),_(t,L),F(),o()}ot(["click"]);var xh=require("@vkontakte/videoplayer-shared"),rb=(t,e)=>{t.stopPropagation(),e()()},ab=M('<div class="close svelte-1ome55p"></div>'),sb={hash:"svelte-1ome55p",code:".close.svelte-1ome55p {cursor:pointer;opacity:0.8;transition:opacity 0.2s;position:relative;width:16px;height:16px;}.close.svelte-1ome55p:hover {opacity:1;}.close.svelte-1ome55p:before, .close.svelte-1ome55p:after {position:absolute;left:8px;content:' ';height:16px;width:2px;background-color:var(--white);}.close.svelte-1ome55p:before {transform:rotate(45deg);}.close.svelte-1ome55p:after {transform:rotate(-45deg);}"};function ja(t,e){H(e,!0),z(t,sb);let i=m(e,"onClick",3,xh.noop);var o=ab();o.__click=[rb,i],_(t,o),F()}ot(["click"]);var wh=require("@vkontakte/videoplayer-shared"),lb=M('<div class="timer svelte-8jhsry"><canvas class="timer-canvas svelte-8jhsry" width="100" height="100"></canvas> <svg class="timer-play-icon svelte-8jhsry" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill-rule="nonzero"><path class="_play" d="m8.13340613 5.10548415 10.49681277 6.24354325c.3559987.2117494.472936.6720001.2611866 1.0279989-.0638111.1072809-.1533894.1969388-.2606135.2608453l-10.4968128 6.256187c-.35581027.2120659-.81616483.095538-1.02823068-.2602722-.06921066-.1161237-.10574852-.2487949-.10574852-.3839792v-12.49973035c0-.41421357.33578644-.75.75-.75.13495801 0 .26741554.03641567.38340613.1054073z" fill="var(--btn-color, #fff)"></path></g></g></svg></div>'),db={hash:"svelte-8jhsry",code:".timer.svelte-8jhsry {border-radius:50%;transition:background .2s;background:rgba(31, 31, 31, .65);width:50px;height:50px;display:flex;align-items:center;justify-content:space-around;}.timer.svelte-8jhsry:hover {background:rgba(31, 31, 31, .85)}.timer-canvas.svelte-8jhsry {width:50px;height:50px;position:absolute;}.timer-play-icon.svelte-8jhsry {width:22px;height:26px;}"};function Zl(t,e){H(e,!0),z(t,db);let i=m(e,"isRunning",3,!0),o=m(e,"onTimerEnded",3,wh.noop),n=5e3,a=Z(void 0),s,d,l=Z(0),c;He(()=>{i()&&(d=Date.now(),D(l,le(requestAnimationFrame(b))))});let u=()=>{r(l)&&(cancelAnimationFrame(r(l)),D(l,0))},b=()=>{if(!i()){u();return}c=(Date.now()-d)/n,c<1?(s?.clearRect(0,0,100,100),s?.beginPath(),s?.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*c),s?.stroke(),D(l,le(requestAnimationFrame(b)))):o()()};Vt(()=>{if(s=r(a).getContext("2d"),!!s)return s.lineWidth=6,s.lineCap="round",s.strokeStyle="#fff",()=>{u()}}),dn(()=>{u()});var p=lb(),$=h(p);st($,w=>D(a,w),()=>r(a)),me(2),g(p),_(t,p),F()}var cb=(t,e,i)=>{e(!1),i()},ub=M('<div class="overlay svelte-jfbaax"></div> <div class="next-video svelte-jfbaax"><div class="top svelte-jfbaax"><div class="caption svelte-jfbaax"> </div> <!></div> <div class="row svelte-jfbaax"><div class="column svelte-jfbaax"><div class="thumb svelte-jfbaax"><div></div> <!></div></div> <div class="column svelte-jfbaax"><div class="title svelte-jfbaax"> </div></div></div></div>',1),pb={hash:"svelte-jfbaax",code:".overlay.svelte-jfbaax {width:100%;height:100%;background:rgba(0, 0, 0, 0.72);position:absolute;}.next-video.svelte-jfbaax {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;width:362px;flex-direction:column;}.top.svelte-jfbaax {display:flex;justify-content:space-between;}.caption.svelte-jfbaax {font-size:11px;font-weight:bold;color:var(--white);text-transform:uppercase;opacity:0.8;}.row.svelte-jfbaax {height:102px;background:rgba(48, 48, 48, .8);cursor:pointer;margin-top:6px;display:flex;flex-direction:row;width:100%;}.column.svelte-jfbaax {display:flex;flex-direction:column;flex-basis:50%;}.thumb.svelte-jfbaax {width:100%;height:100%;background:no-repeat center;background-size:cover;display:flex;align-items:center;position:relative;justify-content:space-around;}.thumb-overlay.svelte-jfbaax {width:100%;height:100%;position:absolute;}.thumb-overlay.withOpacity.svelte-jfbaax {background:var(--black);opacity:0.3;}.title.svelte-jfbaax {padding:10px 16px;font-size:12px;font-weight:bold;color:var(--white);line-height:1.6;max-height:52px;overflow:hidden;}"};function qp(t,e){H(e,!0),z(t,pb);let[i,o]=Le(),n=()=>y(d,"$autoplayNextEnabled$",i),a=()=>y(l,"$timerNextVideoRunning$",i),s=be(),d=s.ui.autoplayNextEnabled$,l=s.ui.timerNextVideoRunning$,c=s.actions.internal.nextVideoClick,u=s.actions.internal.nextVideoAnnouncementShow,b=s.actions.internal.nextVideoAnnouncementClick,p=s.actions.internal.nextVideoAnnouncementAuto,$=s.actions.internal.nextVideoAnnouncementCancel,w=()=>{n()&&(c(!1),p())},x=()=>{e.clickCloseIcon(),$()};Vt(()=>{e.isHide||u(),e.isHide&&n()&&(c(!1),p())});var k=Be(),C=se(k);{var E=A=>{var L=ub(),I=P(se(L),2),N=h(I),W=h(N),Q=h(W,!0);g(W);var j=P(W,2);ja(j,{onClick:x}),g(N);var re=P(N,2);re.__click=[cb,c,b];var ce=h(re),X=h(ce),ge=h(X);let ee;var Me=P(ge,2);{var Pe=ie=>{let R=v(()=>a()&&n());Zl(ie,{get isRunning(){return r(R)},onTimerEnded:w})};V(Me,ie=>{n()&&ie(Pe)})}g(X),g(ce);var Ve=P(ce,2),fe=h(Ve),Oe=h(fe,!0);g(fe),g(Ve),g(re),g(I),S((ie,R)=>{ue(Q,ie),tt(X,`background-image: url('${e.thumb}')`),ee=J(ge,1,"thumb-overlay svelte-jfbaax",null,ee,R),ue(Oe,e.title)},[()=>O("end_screen_next_video"),()=>({withOpacity:n()})]),_(A,L)};V(C,A=>{e.isHide||A(E)})}_(t,k),F(),o()}ot(["click"]);var ua=require("@vkontakte/videoplayer-core"),Sh=require("@vkontakte/videoplayer-shared"),qo=require("@vkontakte/videoplayer-statistics");var Wp=(t,e)=>Math.min(+(t+e).toFixed(2),1),Kp=(t,e)=>Math.max(+(t-e).toFixed(2),0),Nc=(t,e,i)=>{let o=Wp(e,i);e<1&&t.actions.internal.setVolume(o)},Dc=(t,e,i)=>{let o=Kp(e,i);e>0&&t.actions.internal.setVolume(o)};var ca=({isAudioDisabled:t,audioDisabledHintCallback:e,isAudioAvailable:i,audioIsNotExistHintCallback:o})=>t?(e?.(),!1):i?!0:(o?.(),!1);var mb=M('<div class="keyboard-controls svelte-10kkmxz" tabindex="-1" role="region"><!></div>'),vb={hash:"svelte-10kkmxz",code:".keyboard-controls.svelte-10kkmxz {position:absolute;left:0;right:0;top:0;bottom:0;}"};function Qp(t,e){H(e,!0),z(t,vb);let[i,o]=Le(),n=()=>y(Q,"$playbackState$",i),a=()=>y(j,"$adPlaybackState",i),s=()=>y(ge,"$disabledControls$",i),d=()=>y(re,"$positionExact$",i),l=()=>y(ce,"$duration$",i),c=()=>y(U,"$isAudioAvailable$",i),u=()=>y(X,"$volume$",i),b=()=>y(Ve,"$availablePlaybackRates$",i),p=()=>y(Pe,"$currentPlaybackRate$",i),$=()=>y(Ae,"$isInteractiveTime$",i),w=()=>y(We,"$showInteractiveTimeIndicatorTooltip$",i),x=()=>y(Re,"$isEnded$",i),k=()=>y(ee,"$muted$",i),C=()=>y(Me,"$currentSubtitle$",i),E=()=>y(de,"$overlayContainer$",i),A=m(e,"nextButtonActive",3,!1),L=m(e,"prevButtonActive",3,!1),I=be(),N=Rt(),W=I.getLogger().createComponentLog("KeyboardControls component"),Q=I.state.playbackState$,j=I.ads.playbackState,re=I.state.positionExact$,ce=I.state.duration$,X=I.state.volume$,ge=I.ui.controls.disabledControls$,ee=I.state.muted$,Me=I.state.currentSubtitle$,Pe=I.state.currentPlaybackRate$,Ve=I.state.availablePlaybackRates$,fe=I.ui.contextMenu.openedByHotKey$,Oe=I.ui.contextMenu.lastActiveElem$,ie=I.ui.contextMenu.visible$,R=I.ui.contextMenu.position$,Re=I.state.isEnded$,de=I.ui.overlayContainer$,Ke=I.callbacks?.onAudioDoesNotExistHint,oe=I.callbacks?.onAudioDisabledHint,U=I.state.isAudioAvailable$,Y=I.state.isAudioDisabled,Ae=I.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:We}=Qi(),Fe=0,ye=!0,Ne=Z(void 0),je=()=>r(Ne)?.focus(),et=we=>(we!==ye&&(ye=we,Fe=0),Fe+=1,(N.controls.seekStepKeyboard+N.controls.seekStepKeyboard*Fe)/1e3),ct=we=>{let Dt=we.target,ft=Dt?.getAttribute("role")?.includes("menuitem"),K=Dt.classList.contains("btn"),he=we.code;if(K&&he==="Space")return;let ae=Eg.has(he);if(ft&&ae)return;let qe=!Ig.has(he);if(we.ctrlKey&&qe||we.altKey&&qe||we.metaKey)return;let Xe=ft&&he==="Escape";Pg.has(he)||Xe||e.hideContextMenu();let Ue=n()===ua.PlaybackState.PLAYING||n()===ua.PlaybackState.PAUSED,Se=e.isAds&&(a()==="paused"||a()==="playing"),Ye=!Se&&!s().has("TIMELINE");if(Ue||Se)switch(W({message:`key down, code: ${he}`}),he){case"KeyJ":case"ArrowLeft":{if(!Ye)break;if(we.ctrlKey||we.altKey){let Ee=I.actions.internal.getPrevEpisode();I.actions.internal.seekToPrevEpisode(Ee),Ee&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:Ee.text}),we.preventDefault()}else{let Ee=we.shiftKey?et(!1):N.controls.seekStepKeyboard/1e3,lt=Math.max(d()-Ee,0);d()>0&&(I.actions.internal.seekTime(lt,qo.SeekAction.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:Ee.toString()}),we.preventDefault())}break}case"KeyL":case"ArrowRight":{if(!Ye)break;if(we.ctrlKey||we.altKey){let Ee=I.actions.internal.getNextEpisode();I.actions.internal.seekToNextEpisode(Ee),Ee&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:Ee.text}),we.preventDefault()}else{let Ee=we.shiftKey?et(!0):N.controls.seekStepKeyboard/1e3,lt=Math.min(d()+Ee,l());Math.round(d())<Math.round(l())&&(I.actions.internal.seekTime(lt,qo.SeekAction.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:Ee.toString()}),we.preventDefault())}break}case"ArrowUp":{if(ca({isAudioDisabled:Y,audioDisabledHintCallback:oe,isAudioAvailable:c(),audioIsNotExistHintCallback:Ke})){let Ee=u(),lt=N.controls.volumeStepKeyboard,gt=Ee<=1;if(Nc(I,Ee,lt),gt){let St=Math.round(Wp(Ee,lt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:St}})}}we.preventDefault();break}case"ArrowDown":{if(ca({isAudioDisabled:Y,audioDisabledHintCallback:oe,isAudioAvailable:c(),audioIsNotExistHintCallback:Ke})){let Ee=u(),lt=N.controls.volumeStepKeyboard,gt=Ee>=0;if(Dc(I,Ee,lt),gt){let St=Math.round(Kp(Ee,lt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:St}})}}we.preventDefault();break}case"Comma":{if(we.shiftKey){I.actions.internal.decrementPlaybackRate();let Ee=b().find(lt=>lt.value===p());e.showHotKeyHelpers({type:"RATE_DOWN",text:Ee?.displayValue}),we.preventDefault()}else{if(Se||n()!==ua.PlaybackState.PAUSED)break;let Ee=Math.max(d()-N.controls.seekStepFrame/1e3,0);d()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),I.actions.internal.clearDelayedBufferingCheckTimeout(),I.actions.internal.seekTime(Ee,qo.SeekAction.DOUBLE_TAP),we.preventDefault())}break}case"Period":{if(we.shiftKey){I.actions.internal.incrementPlaybackRate();let Ee=b().find(lt=>lt.value===p());e.showHotKeyHelpers({type:"RATE_UP",text:Ee?.displayValue}),we.preventDefault()}else{if(Se||n()!==ua.PlaybackState.PAUSED)break;let Ee=Math.min(d()+N.controls.seekStepFrame/1e3,l());d()<l()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),I.actions.internal.clearDelayedBufferingCheckTimeout(),I.actions.internal.seekTime(Ee,qo.SeekAction.DOUBLE_TAP),we.preventDefault())}break}case"KeyK":case"Space":if(!s().has("PLAY_BUTTON"))if($()&&w()&&We.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{I.actions.internal.togglePlay();let Ee="PLAY";n()===ua.PlaybackState.PAUSED?Ee="PAUSE":x()&&(Ee="REPLAY"),e.showHotKeyHelpers({type:Ee})}we.preventDefault();break;case"KeyM":{ca({isAudioDisabled:Y,audioDisabledHintCallback:oe,isAudioAvailable:c(),audioIsNotExistHintCallback:Ke})&&(e.showHotKeyHelpers({type:k()?"VOLUME":"MUTE"}),I.actions.internal.toggleMuted()),we.preventDefault();break}case"KeyF":e.toggleFullscreen(),we.preventDefault();break;case"KeyC":I.actions.internal.toggleSubtitle(),C().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:C()?.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),we.preventDefault();break;case"KeyI":I.actions.internal.togglePictureInPicture(),we.preventDefault();break;case"Digit1":case"Numpad1":if(we.shiftKey){let Ee=$h(E());R.set(Ee),Oe.set(Dt),fe.set(!0),ie.set(!0),we.preventDefault();break}e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.1,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.2,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.3,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.4,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.5,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.6,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.7,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.8,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.9,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(0,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Slash":{we.shiftKey&&N.features.hotKeyMapModal&&(e.showKeyMap(),we.preventDefault());break}case"KeyN":we.shiftKey&&A()&&I.actions.internal.nextVideoClick();break;case"KeyP":we.shiftKey&&L()&&I.actions.internal.prevVideoClick();break;case"ShiftLeft":case"ShiftRight":we.preventDefault();break;case"Tab":case"Escape":case"Enter":break;default:(0,Sh.checkNever)(he);break}},mt=we=>{let Dt=we.code;if(we.ctrlKey||we.altKey||we.metaKey)return;let ft=n()===ua.PlaybackState.PLAYING||n()===ua.PlaybackState.PAUSED,K=e.isAds&&(a()==="paused"||a()==="playing");if(ft||K)switch(Dt){case"ShiftLeft":case"ShiftRight":Fe=0;break}},Je=O("aria_label_video_player");var ut=mb();ut.__keyup=mt,ut.__keydown=ct,De(ut,"aria-label",Je);var $t=h(ut);pe($t,()=>e.children??te),g(ut),st(ut,we=>D(Ne,we),()=>r(Ne)),_(t,ut);var Ot=F({focus:je});return o(),Ot}ot(["keyup","keydown"]);var gb=M('<div class="container svelte-1dbnjb1"><div class="dot svelte-1dbnjb1"></div> <div class="dot svelte-1dbnjb1"></div> <div class="dot svelte-1dbnjb1"></div></div>'),hb={hash:"svelte-1dbnjb1",code:`.container.svelte-1dbnjb1 {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;display:flex;}.dot.svelte-1dbnjb1:nth-child(1) {animation-delay:calc(0 * 180ms);}.dot.svelte-1dbnjb1:nth-child(2) {animation-delay:calc(1 * 180ms);}.dot.svelte-1dbnjb1:nth-child(3) {animation-delay:calc(2 * 180ms);}
144
+ Audio: ${r(l).audioCodec||""} ${(r(l).audioLanguage?`(${r(l).audioLanguage})`:"")??""}`)),_(K,he)};V(Re,K=>{(r(l).videoCodec||r(l).audioCodec)&&K(fe)})}var Oe=P(Re,2);{var ie=K=>{var he=G_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).viewport)),_(K,he)};V(Oe,K=>{r(l).viewport&&K(ie)})}var R=P(Oe,2);{var Ne=K=>{var he=j_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).videoSize)),_(K,he)};V(R,K=>{r(l).videoSize&&K(Ne)})}var de=P(R,2);{var Ke=K=>{var he=Y_(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(()=>ue(qe,r(l).cdn)),_(K,he)};V(de,K=>{r(l).cdn&&K(Ke)})}var oe=P(de,2);{var U=K=>{var he=Z_(),ae=P(h(he),2),qe=h(ae);g(ae),g(he),S(()=>ue(qe,`${r(l).volume??""} %`)),_(K,he)};V(oe,K=>{r(l).volume&&K(U)})}var Y=P(oe,2);{var Ae=K=>{var he=X_(),ae=P(h(he),2),qe=h(ae);g(ae),g(he),S(Xe=>ue(qe,`${Xe??""} s`),[()=>r(l).buffer.toFixed(2)]),_(K,he)};V(Y,K=>{r(l).buffer&&K(Ae)})}var We=P(Y,2);{var Fe=K=>{var he=J_(),ae=P(h(he),2),qe=h(ae);g(ae),g(he),S(Xe=>ue(qe,`${Xe??""} s`),[()=>r(l).liveLatency.toFixed(2)]),_(K,he)};V(We,K=>{r(l).liveLatency&&K(Fe)})}var ye=P(We,2);{var De=K=>{var he=eb(),ae=P(h(he),2),qe=h(ae,!0);g(ae),g(he),S(Xe=>ue(qe,Xe),[()=>[{value:r(l).currentVideoSegmentLength,title:"Video:"},{value:r(l).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Xe})=>Xe).map(({value:Xe,title:Ue})=>`${Ue} ${((Xe??0)/1e3).toFixed(2)} s`).join(" & ")]),_(K,he)};V(ye,K=>{(r(l).currentVideoSegmentLength||r(l).currentAudioSegmentLength)&&K(De)})}var je=P(ye,2),et=P(h(je),2),ct=h(et);g(et),g(je);var mt=P(je,2);{var Je=K=>{var he=tb(),ae=P(h(he),2);jl(ae,{get values(){return r(C)}});var qe=P(ae,2),Xe=h(qe);g(qe),g(he),S(Ue=>ue(Xe,`${Ue??""} Kbps`),[()=>r(l).speed.toFixed(2)]),_(K,he)};V(mt,K=>{r(l).speed&&K(Je)})}var ut=P(mt,2);{var $t=K=>{var he=ib(),ae=P(h(he),2);jl(ae,{get values(){return r(E)}});var qe=P(ae,2),Xe=h(qe);g(qe),g(he),S(Ue=>ue(Xe,`${Ue??""} Kbps`),[()=>r(l).bitrate.toFixed(2)]),_(K,he)};V(ut,K=>{r(l).bitrate&&K($t)})}var Ot=P(ut,2),we=P(h(Ot),2);jl(we,{get values(){return r(k)}});var Dt=P(we,2),ft=h(Dt,!0);g(Dt),g(Ot),g(W),g(L),S(K=>{I=J(L,1,"container svelte-4deykz",null,I,K),ue(re,r(l).version),ue(ct,`${r(b)??""} / ${r(u)??""} frames`),ue(ft,r(p))},[()=>({"container-mobile":n()})]),_(t,L),F(),o()}ot(["click"]);var xh=require("@vkontakte/videoplayer-shared"),rb=(t,e)=>{t.stopPropagation(),e()()},ab=M('<div class="close svelte-1ome55p"></div>'),sb={hash:"svelte-1ome55p",code:".close.svelte-1ome55p {cursor:pointer;opacity:0.8;transition:opacity 0.2s;position:relative;width:16px;height:16px;}.close.svelte-1ome55p:hover {opacity:1;}.close.svelte-1ome55p:before, .close.svelte-1ome55p:after {position:absolute;left:8px;content:' ';height:16px;width:2px;background-color:var(--white);}.close.svelte-1ome55p:before {transform:rotate(45deg);}.close.svelte-1ome55p:after {transform:rotate(-45deg);}"};function ja(t,e){H(e,!0),z(t,sb);let i=m(e,"onClick",3,xh.noop);var o=ab();o.__click=[rb,i],_(t,o),F()}ot(["click"]);var wh=require("@vkontakte/videoplayer-shared"),lb=M('<div class="timer svelte-8jhsry"><canvas class="timer-canvas svelte-8jhsry" width="100" height="100"></canvas> <svg class="timer-play-icon svelte-8jhsry" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill-rule="nonzero"><path class="_play" d="m8.13340613 5.10548415 10.49681277 6.24354325c.3559987.2117494.472936.6720001.2611866 1.0279989-.0638111.1072809-.1533894.1969388-.2606135.2608453l-10.4968128 6.256187c-.35581027.2120659-.81616483.095538-1.02823068-.2602722-.06921066-.1161237-.10574852-.2487949-.10574852-.3839792v-12.49973035c0-.41421357.33578644-.75.75-.75.13495801 0 .26741554.03641567.38340613.1054073z" fill="var(--btn-color, #fff)"></path></g></g></svg></div>'),db={hash:"svelte-8jhsry",code:".timer.svelte-8jhsry {border-radius:50%;transition:background .2s;background:rgba(31, 31, 31, .65);width:50px;height:50px;display:flex;align-items:center;justify-content:space-around;}.timer.svelte-8jhsry:hover {background:rgba(31, 31, 31, .85)}.timer-canvas.svelte-8jhsry {width:50px;height:50px;position:absolute;}.timer-play-icon.svelte-8jhsry {width:22px;height:26px;}"};function Zl(t,e){H(e,!0),z(t,db);let i=m(e,"isRunning",3,!0),o=m(e,"onTimerEnded",3,wh.noop),n=5e3,a=Z(void 0),s,d,l=Z(0),c;He(()=>{i()&&(d=Date.now(),D(l,le(requestAnimationFrame(b))))});let u=()=>{r(l)&&(cancelAnimationFrame(r(l)),D(l,0))},b=()=>{if(!i()){u();return}c=(Date.now()-d)/n,c<1?(s?.clearRect(0,0,100,100),s?.beginPath(),s?.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*c),s?.stroke(),D(l,le(requestAnimationFrame(b)))):o()()};Vt(()=>{if(s=r(a).getContext("2d"),!!s)return s.lineWidth=6,s.lineCap="round",s.strokeStyle="#fff",()=>{u()}}),dn(()=>{u()});var p=lb(),$=h(p);st($,w=>D(a,w),()=>r(a)),me(2),g(p),_(t,p),F()}var cb=(t,e,i)=>{e(!1),i()},ub=M('<div class="overlay svelte-jfbaax"></div> <div class="next-video svelte-jfbaax"><div class="top svelte-jfbaax"><div class="caption svelte-jfbaax"> </div> <!></div> <div class="row svelte-jfbaax"><div class="column svelte-jfbaax"><div class="thumb svelte-jfbaax"><div></div> <!></div></div> <div class="column svelte-jfbaax"><div class="title svelte-jfbaax"> </div></div></div></div>',1),pb={hash:"svelte-jfbaax",code:".overlay.svelte-jfbaax {width:100%;height:100%;background:rgba(0, 0, 0, 0.72);position:absolute;}.next-video.svelte-jfbaax {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;width:362px;flex-direction:column;}.top.svelte-jfbaax {display:flex;justify-content:space-between;}.caption.svelte-jfbaax {font-size:11px;font-weight:bold;color:var(--white);text-transform:uppercase;opacity:0.8;}.row.svelte-jfbaax {height:102px;background:rgba(48, 48, 48, .8);cursor:pointer;margin-top:6px;display:flex;flex-direction:row;width:100%;}.column.svelte-jfbaax {display:flex;flex-direction:column;flex-basis:50%;}.thumb.svelte-jfbaax {width:100%;height:100%;background:no-repeat center;background-size:cover;display:flex;align-items:center;position:relative;justify-content:space-around;}.thumb-overlay.svelte-jfbaax {width:100%;height:100%;position:absolute;}.thumb-overlay.withOpacity.svelte-jfbaax {background:var(--black);opacity:0.3;}.title.svelte-jfbaax {padding:10px 16px;font-size:12px;font-weight:bold;color:var(--white);line-height:1.6;max-height:52px;overflow:hidden;}"};function qp(t,e){H(e,!0),z(t,pb);let[i,o]=Le(),n=()=>y(d,"$autoplayNextEnabled$",i),a=()=>y(l,"$timerNextVideoRunning$",i),s=be(),d=s.ui.autoplayNextEnabled$,l=s.ui.timerNextVideoRunning$,c=s.actions.internal.nextVideoClick,u=s.actions.internal.nextVideoAnnouncementShow,b=s.actions.internal.nextVideoAnnouncementClick,p=s.actions.internal.nextVideoAnnouncementAuto,$=s.actions.internal.nextVideoAnnouncementCancel,w=()=>{n()&&(c(!1),p())},x=()=>{e.clickCloseIcon(),$()};Vt(()=>{e.isHide||u(),e.isHide&&n()&&(c(!1),p())});var k=Be(),C=se(k);{var E=A=>{var L=ub(),I=P(se(L),2),N=h(I),W=h(N),Q=h(W,!0);g(W);var j=P(W,2);ja(j,{onClick:x}),g(N);var re=P(N,2);re.__click=[cb,c,b];var ce=h(re),X=h(ce),ge=h(X);let ee;var Me=P(ge,2);{var Pe=ie=>{let R=v(()=>a()&&n());Zl(ie,{get isRunning(){return r(R)},onTimerEnded:w})};V(Me,ie=>{n()&&ie(Pe)})}g(X),g(ce);var Re=P(ce,2),fe=h(Re),Oe=h(fe,!0);g(fe),g(Re),g(re),g(I),S((ie,R)=>{ue(Q,ie),tt(X,`background-image: url('${e.thumb}')`),ee=J(ge,1,"thumb-overlay svelte-jfbaax",null,ee,R),ue(Oe,e.title)},[()=>O("end_screen_next_video"),()=>({withOpacity:n()})]),_(A,L)};V(C,A=>{e.isHide||A(E)})}_(t,k),F(),o()}ot(["click"]);var ua=require("@vkontakte/videoplayer-core"),Sh=require("@vkontakte/videoplayer-shared"),qo=require("@vkontakte/videoplayer-statistics");var Wp=(t,e)=>Math.min(+(t+e).toFixed(2),1),Kp=(t,e)=>Math.max(+(t-e).toFixed(2),0),Nc=(t,e,i)=>{let o=Wp(e,i);e<1&&t.actions.internal.setVolume(o)},Dc=(t,e,i)=>{let o=Kp(e,i);e>0&&t.actions.internal.setVolume(o)};var ca=({isAudioDisabled:t,audioDisabledHintCallback:e,isAudioAvailable:i,audioIsNotExistHintCallback:o})=>t?(e?.(),!1):i?!0:(o?.(),!1);var mb=M('<div class="keyboard-controls svelte-10kkmxz" tabindex="-1" role="region"><!></div>'),vb={hash:"svelte-10kkmxz",code:".keyboard-controls.svelte-10kkmxz {position:absolute;left:0;right:0;top:0;bottom:0;}"};function Qp(t,e){H(e,!0),z(t,vb);let[i,o]=Le(),n=()=>y(Q,"$playbackState$",i),a=()=>y(j,"$adPlaybackState",i),s=()=>y(ge,"$disabledControls$",i),d=()=>y(re,"$positionExact$",i),l=()=>y(ce,"$duration$",i),c=()=>y(U,"$isAudioAvailable$",i),u=()=>y(X,"$volume$",i),b=()=>y(Re,"$availablePlaybackRates$",i),p=()=>y(Pe,"$currentPlaybackRate$",i),$=()=>y(Ae,"$isInteractiveTime$",i),w=()=>y(We,"$showInteractiveTimeIndicatorTooltip$",i),x=()=>y(Ne,"$isEnded$",i),k=()=>y(ee,"$muted$",i),C=()=>y(Me,"$currentSubtitle$",i),E=()=>y(de,"$overlayContainer$",i),A=m(e,"nextButtonActive",3,!1),L=m(e,"prevButtonActive",3,!1),I=be(),N=Rt(),W=I.getLogger().createComponentLog("KeyboardControls component"),Q=I.state.playbackState$,j=I.ads.playbackState,re=I.state.positionExact$,ce=I.state.duration$,X=I.state.volume$,ge=I.ui.controls.disabledControls$,ee=I.state.muted$,Me=I.state.currentSubtitle$,Pe=I.state.currentPlaybackRate$,Re=I.state.availablePlaybackRates$,fe=I.ui.contextMenu.openedByHotKey$,Oe=I.ui.contextMenu.lastActiveElem$,ie=I.ui.contextMenu.visible$,R=I.ui.contextMenu.position$,Ne=I.state.isEnded$,de=I.ui.overlayContainer$,Ke=I.callbacks?.onAudioDoesNotExistHint,oe=I.callbacks?.onAudioDisabledHint,U=I.state.isAudioAvailable$,Y=I.state.isAudioDisabled,Ae=I.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:We}=Qi(),Fe=0,ye=!0,De=Z(void 0),je=()=>r(De)?.focus(),et=we=>(we!==ye&&(ye=we,Fe=0),Fe+=1,(N.controls.seekStepKeyboard+N.controls.seekStepKeyboard*Fe)/1e3),ct=we=>{let Dt=we.target,ft=Dt?.getAttribute("role")?.includes("menuitem"),K=Dt.classList.contains("btn"),he=we.code;if(K&&he==="Space")return;let ae=Eg.has(he);if(ft&&ae)return;let qe=!Ig.has(he);if(we.ctrlKey&&qe||we.altKey&&qe||we.metaKey)return;let Xe=ft&&he==="Escape";Pg.has(he)||Xe||e.hideContextMenu();let Ue=n()===ua.PlaybackState.PLAYING||n()===ua.PlaybackState.PAUSED,Se=e.isAds&&(a()==="paused"||a()==="playing"),Ye=!Se&&!s().has("TIMELINE");if(Ue||Se)switch(W({message:`key down, code: ${he}`}),he){case"KeyJ":case"ArrowLeft":{if(!Ye)break;if(we.ctrlKey||we.altKey){let Ee=I.actions.internal.getPrevEpisode();I.actions.internal.seekToPrevEpisode(Ee),Ee&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:Ee.text}),we.preventDefault()}else{let Ee=we.shiftKey?et(!1):N.controls.seekStepKeyboard/1e3,lt=Math.max(d()-Ee,0);d()>0&&(I.actions.internal.seekTime(lt,qo.SeekAction.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:Ee.toString()}),we.preventDefault())}break}case"KeyL":case"ArrowRight":{if(!Ye)break;if(we.ctrlKey||we.altKey){let Ee=I.actions.internal.getNextEpisode();I.actions.internal.seekToNextEpisode(Ee),Ee&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:Ee.text}),we.preventDefault()}else{let Ee=we.shiftKey?et(!0):N.controls.seekStepKeyboard/1e3,lt=Math.min(d()+Ee,l());Math.round(d())<Math.round(l())&&(I.actions.internal.seekTime(lt,qo.SeekAction.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:Ee.toString()}),we.preventDefault())}break}case"ArrowUp":{if(ca({isAudioDisabled:Y,audioDisabledHintCallback:oe,isAudioAvailable:c(),audioIsNotExistHintCallback:Ke})){let Ee=u(),lt=N.controls.volumeStepKeyboard,gt=Ee<=1;if(Nc(I,Ee,lt),gt){let St=Math.round(Wp(Ee,lt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:St}})}}we.preventDefault();break}case"ArrowDown":{if(ca({isAudioDisabled:Y,audioDisabledHintCallback:oe,isAudioAvailable:c(),audioIsNotExistHintCallback:Ke})){let Ee=u(),lt=N.controls.volumeStepKeyboard,gt=Ee>=0;if(Dc(I,Ee,lt),gt){let St=Math.round(Kp(Ee,lt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:St}})}}we.preventDefault();break}case"Comma":{if(we.shiftKey){I.actions.internal.decrementPlaybackRate();let Ee=b().find(lt=>lt.value===p());e.showHotKeyHelpers({type:"RATE_DOWN",text:Ee?.displayValue}),we.preventDefault()}else{if(Se||n()!==ua.PlaybackState.PAUSED)break;let Ee=Math.max(d()-N.controls.seekStepFrame/1e3,0);d()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),I.actions.internal.clearDelayedBufferingCheckTimeout(),I.actions.internal.seekTime(Ee,qo.SeekAction.DOUBLE_TAP),we.preventDefault())}break}case"Period":{if(we.shiftKey){I.actions.internal.incrementPlaybackRate();let Ee=b().find(lt=>lt.value===p());e.showHotKeyHelpers({type:"RATE_UP",text:Ee?.displayValue}),we.preventDefault()}else{if(Se||n()!==ua.PlaybackState.PAUSED)break;let Ee=Math.min(d()+N.controls.seekStepFrame/1e3,l());d()<l()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),I.actions.internal.clearDelayedBufferingCheckTimeout(),I.actions.internal.seekTime(Ee,qo.SeekAction.DOUBLE_TAP),we.preventDefault())}break}case"KeyK":case"Space":if(!s().has("PLAY_BUTTON"))if($()&&w()&&We.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{I.actions.internal.togglePlay();let Ee="PLAY";n()===ua.PlaybackState.PAUSED?Ee="PAUSE":x()&&(Ee="REPLAY"),e.showHotKeyHelpers({type:Ee})}we.preventDefault();break;case"KeyM":{ca({isAudioDisabled:Y,audioDisabledHintCallback:oe,isAudioAvailable:c(),audioIsNotExistHintCallback:Ke})&&(e.showHotKeyHelpers({type:k()?"VOLUME":"MUTE"}),I.actions.internal.toggleMuted()),we.preventDefault();break}case"KeyF":e.toggleFullscreen(),we.preventDefault();break;case"KeyC":I.actions.internal.toggleSubtitle(),C().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:C()?.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),we.preventDefault();break;case"KeyI":I.actions.internal.togglePictureInPicture(),we.preventDefault();break;case"Digit1":case"Numpad1":if(we.shiftKey){let Ee=$h(E());R.set(Ee),Oe.set(Dt),fe.set(!0),ie.set(!0),we.preventDefault();break}e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.1,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.2,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.3,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.4,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.5,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.6,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.7,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.8,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.9,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(0,qo.SeekAction.DOUBLE_TAP),we.preventDefault();break;case"Slash":{we.shiftKey&&N.features.hotKeyMapModal&&(e.showKeyMap(),we.preventDefault());break}case"KeyN":we.shiftKey&&A()&&I.actions.internal.nextVideoClick();break;case"KeyP":we.shiftKey&&L()&&I.actions.internal.prevVideoClick();break;case"ShiftLeft":case"ShiftRight":we.preventDefault();break;case"Tab":case"Escape":case"Enter":break;default:(0,Sh.checkNever)(he);break}},mt=we=>{let Dt=we.code;if(we.ctrlKey||we.altKey||we.metaKey)return;let ft=n()===ua.PlaybackState.PLAYING||n()===ua.PlaybackState.PAUSED,K=e.isAds&&(a()==="paused"||a()==="playing");if(ft||K)switch(Dt){case"ShiftLeft":case"ShiftRight":Fe=0;break}},Je=O("aria_label_video_player");var ut=mb();ut.__keyup=mt,ut.__keydown=ct,Ve(ut,"aria-label",Je);var $t=h(ut);pe($t,()=>e.children??te),g(ut),st(ut,we=>D(De,we),()=>r(De)),_(t,ut);var Ot=F({focus:je});return o(),Ot}ot(["keyup","keydown"]);var gb=M('<div class="container svelte-1dbnjb1"><div class="dot svelte-1dbnjb1"></div> <div class="dot svelte-1dbnjb1"></div> <div class="dot svelte-1dbnjb1"></div></div>'),hb={hash:"svelte-1dbnjb1",code:`.container.svelte-1dbnjb1 {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;display:flex;}.dot.svelte-1dbnjb1:nth-child(1) {animation-delay:calc(0 * 180ms);}.dot.svelte-1dbnjb1:nth-child(2) {animation-delay:calc(1 * 180ms);}.dot.svelte-1dbnjb1:nth-child(3) {animation-delay:calc(2 * 180ms);}
145
145
 
146
146
  @keyframes svelte-1dbnjb1-dot_animation {
147
147
  0% {
@@ -162,18 +162,18 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
162
162
  /* mobile */
163
163
  /* container mobile */.btn-m.svelte-wr0kwr {position:absolute;left:12px;top:50%;transform:translateY(-50%);height:44px;width:44px;border-radius:12px;background-color:rgba(0, 0, 0, 0.56);transition:opacity var(--controls-transition-duration);display:flex;align-items:center;justify-content:center;}.btn-m--play.svelte-wr0kwr {width:var(--big-play-size);height:var(--big-play-size);display:flex;align-items:center;justify-content:center;position:relative;padding:16px;}.btn-m--play.svelte-wr0kwr svg {transform:scale(2);}.btn-m--prev.svelte-wr0kwr,
164
164
  .btn-m--next.svelte-wr0kwr {position:absolute;width:50px;height:50px;}.btn-m--prev.svelte-wr0kwr {right:calc(100% + 35px);}.btn-m--next.svelte-wr0kwr {left:calc(100% + 35px);}.btn.svelte-wr0kwr:disabled {cursor:default;
165
- /* \u043D\u0443\u0436\u043D\u043E \u0434\u043B\u044F \u0442\u043E\u0433\u043E, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0434\u0430\u0432\u0430\u0442\u044C \u0441\u043E\u0431\u044B\u0442\u0438\u044F\u043C \u043A\u043B\u0438\u043A\u0430 \u043E\u0442\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0442\u044C \u043D\u0430 \u0437\u0430\u0431\u043B\u043E\u0447\u0435\u043D\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 */pointer-events:none;}.btn.svelte-wr0kwr:not(.btn-full-opacity):disabled {opacity:0.4;}.btn.svelte-wr0kwr:not(:disabled):hover {opacity:0.8;}.pr-0.svelte-wr0kwr {padding-right:0;}.pl-0.svelte-wr0kwr {padding-left:0;}`};function At(t,e){H(e,!0),z(t,yb);let i=m(e,"className",3,""),o=m(e,"style",3,""),n=m(e,"disabled",3,void 0),a=m(e,"testId",3,void 0),s=m(e,"ariaHidden",3,void 0),d=m(e,"ariaLabel",3,void 0),l=m(e,"ref",15,void 0),c=m(e,"ariaKeyShortCut",3,void 0),u=m(e,"ariaExpanded",3,void 0),b=m(e,"tabIndex",3,0),p=m(e,"click",3,Za.noop),$=m(e,"focus",3,Za.noop),w=m(e,"blur",3,Za.noop),x=v(()=>p()===Za.noop?null:L=>{L.stopPropagation(),p()(L)}),k=v(()=>$()===Za.noop?null:L=>{L.preventDefault(),$()()}),C=v(()=>w()===Za.noop?null:L=>{L.preventDefault(),w()()});var E=$b();E.__pointerdown=[bb],E.__click=function(...L){r(x)?.apply(this,L)};var A=h(E);pe(A,()=>e.children??te),g(E),st(E,L=>l(L),()=>l()),S(()=>{J(E,1,`btn ${i()??""}`,"svelte-wr0kwr"),tt(E,o()||null),E.disabled=n()??null,De(E,"aria-hidden",s()??null),De(E,"aria-label",d()??null),De(E,"aria-keyshortcuts",c()??null),De(E,"aria-expanded",u()??null),De(E,"data-testid",a()??null),De(E,"tabindex",b())}),_t("focus",E,function(...L){r(k)?.apply(this,L)}),_t("blur",E,function(...L){r(C)?.apply(this,L)}),_(t,E),F()}ot(["pointerdown","click"]);var xb=M('<div class="modal-header svelte-1witlsj"><h3 class="modal-title svelte-1witlsj"> </h3> <!></div>'),wb=M('<div class="modal-overlay svelte-1witlsj"><div class="modal-container svelte-1witlsj"><!> <div class="modal-scroll svelte-1witlsj"><div class="modal-main svelte-1witlsj"><!></div></div></div></div>'),Sb={hash:"svelte-1witlsj",code:".modal-overlay.svelte-1witlsj {position:absolute;top:0;bottom:0;left:0;right:0;background:transparent;display:flex;align-items:center;justify-content:center;}.modal-container.svelte-1witlsj {display:flex;flex-direction:column;width:calc(100% - 32px);max-width:600px;height:calc(100% - 24px);max-height:490px;background:var(--mobile-settings-bg);color:var(--white);border-radius:8px;}.modal-header.svelte-1witlsj {box-sizing:border-box;display:flex;justify-content:space-between;align-items:start;height:40px;padding:8px 10px;border-bottom:1px solid var(--white-alpha-24);}.modal-title.svelte-1witlsj {margin:3px 0 0 6px;color:var(--white);font-feature-settings:'clig' off, 'liga' off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;}.modal-scroll.svelte-1witlsj {overflow-y:auto;overflow-x:hidden;margin:8px 4px 8px 0;height:100%;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar {width:8px;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-track {box-shadow:none;background-color:transparent;border-radius:4px;margin-right:2px;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-thumb {min-height:40px;border-radius:5px;background-color:#666;border:1px solid transparent;background-clip:padding-box;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-thumb:hover {background-color:#777;}.modal-main.svelte-1witlsj {margin:-8px -4px 0 0;}"};function jp(t,e){H(e,!0),z(t,Sb);let i=m(e,"showHeader",3,!0),o=m(e,"showCloseCross",3,!0),n=O("hotkey_map_modal_close_btn_text");var a=wb(),s=h(a),d=h(s);{var l=p=>{var $=xb(),w=h($),x=h(w,!0);g(w);var k=P(w,2);{var C=E=>{At(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",ariaLabel:n,children:(A,L)=>{Gp(A,{})},$$slots:{default:!0}})};V(k,E=>{o()&&E(C)})}g($),S(()=>ue(x,e.title)),_(p,$)};V(d,p=>{i()&&p(l)})}var c=P(d,2),u=h(c),b=h(u);pe(b,()=>e.children??te),g(u),g(c),g(s),g(a),_(t,a),F()}var Cb=new Set(["BR"]),Ch=t=>{let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let n=i[o],a=n.tagName;Cb.has(a)||n.parentElement?.removeChild(n)}return e.innerHTML};var kb=M('<li class="hot-key-map-item svelte-quklnq"><span class="hot-key-map-item-description svelte-quklnq"><!></span> <span class="hot-key-map-item-value svelte-quklnq"> </span></li>'),Tb=M('<div class="hot-key-map-group svelte-quklnq"><h5 class="hot-key-map-group-title svelte-quklnq"> </h5> <ul class="hot-key-map-group-items svelte-quklnq"></ul></div>'),Ib=M('<div class="hot-key-map svelte-quklnq"></div>'),Eb={hash:"svelte-quklnq",code:`.hot-key-map.svelte-quklnq {color:var(--black);box-sizing:border-box;overflow-x:hidden;}.hot-key-map-group.svelte-quklnq {border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px;}.hot-key-map-group.svelte-quklnq:last-child {border-bottom:none;}.hot-key-map-group-title.svelte-quklnq {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.svelte-quklnq,
165
+ /* \u043D\u0443\u0436\u043D\u043E \u0434\u043B\u044F \u0442\u043E\u0433\u043E, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0434\u0430\u0432\u0430\u0442\u044C \u0441\u043E\u0431\u044B\u0442\u0438\u044F\u043C \u043A\u043B\u0438\u043A\u0430 \u043E\u0442\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0442\u044C \u043D\u0430 \u0437\u0430\u0431\u043B\u043E\u0447\u0435\u043D\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 */pointer-events:none;}.btn.svelte-wr0kwr:not(.btn-full-opacity):disabled {opacity:0.4;}.btn.svelte-wr0kwr:not(:disabled):hover {opacity:0.8;}.pr-0.svelte-wr0kwr {padding-right:0;}.pl-0.svelte-wr0kwr {padding-left:0;}`};function At(t,e){H(e,!0),z(t,yb);let i=m(e,"className",3,""),o=m(e,"style",3,""),n=m(e,"disabled",3,void 0),a=m(e,"testId",3,void 0),s=m(e,"ariaHidden",3,void 0),d=m(e,"ariaLabel",3,void 0),l=m(e,"ref",15,void 0),c=m(e,"ariaKeyShortCut",3,void 0),u=m(e,"ariaExpanded",3,void 0),b=m(e,"tabIndex",3,0),p=m(e,"click",3,Za.noop),$=m(e,"focus",3,Za.noop),w=m(e,"blur",3,Za.noop),x=v(()=>p()===Za.noop?null:L=>{L.stopPropagation(),p()(L)}),k=v(()=>$()===Za.noop?null:L=>{L.preventDefault(),$()()}),C=v(()=>w()===Za.noop?null:L=>{L.preventDefault(),w()()});var E=$b();E.__pointerdown=[bb],E.__click=function(...L){r(x)?.apply(this,L)};var A=h(E);pe(A,()=>e.children??te),g(E),st(E,L=>l(L),()=>l()),S(()=>{J(E,1,`btn ${i()??""}`,"svelte-wr0kwr"),tt(E,o()||null),E.disabled=n()??null,Ve(E,"aria-hidden",s()??null),Ve(E,"aria-label",d()??null),Ve(E,"aria-keyshortcuts",c()??null),Ve(E,"aria-expanded",u()??null),Ve(E,"data-testid",a()??null),Ve(E,"tabindex",b())}),_t("focus",E,function(...L){r(k)?.apply(this,L)}),_t("blur",E,function(...L){r(C)?.apply(this,L)}),_(t,E),F()}ot(["pointerdown","click"]);var xb=M('<div class="modal-header svelte-1witlsj"><h3 class="modal-title svelte-1witlsj"> </h3> <!></div>'),wb=M('<div class="modal-overlay svelte-1witlsj"><div class="modal-container svelte-1witlsj"><!> <div class="modal-scroll svelte-1witlsj"><div class="modal-main svelte-1witlsj"><!></div></div></div></div>'),Sb={hash:"svelte-1witlsj",code:".modal-overlay.svelte-1witlsj {position:absolute;top:0;bottom:0;left:0;right:0;background:transparent;display:flex;align-items:center;justify-content:center;}.modal-container.svelte-1witlsj {display:flex;flex-direction:column;width:calc(100% - 32px);max-width:600px;height:calc(100% - 24px);max-height:490px;background:var(--mobile-settings-bg);color:var(--white);border-radius:8px;}.modal-header.svelte-1witlsj {box-sizing:border-box;display:flex;justify-content:space-between;align-items:start;height:40px;padding:8px 10px;border-bottom:1px solid var(--white-alpha-24);}.modal-title.svelte-1witlsj {margin:3px 0 0 6px;color:var(--white);font-feature-settings:'clig' off, 'liga' off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;}.modal-scroll.svelte-1witlsj {overflow-y:auto;overflow-x:hidden;margin:8px 4px 8px 0;height:100%;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar {width:8px;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-track {box-shadow:none;background-color:transparent;border-radius:4px;margin-right:2px;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-thumb {min-height:40px;border-radius:5px;background-color:#666;border:1px solid transparent;background-clip:padding-box;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-thumb:hover {background-color:#777;}.modal-main.svelte-1witlsj {margin:-8px -4px 0 0;}"};function jp(t,e){H(e,!0),z(t,Sb);let i=m(e,"showHeader",3,!0),o=m(e,"showCloseCross",3,!0),n=O("hotkey_map_modal_close_btn_text");var a=wb(),s=h(a),d=h(s);{var l=p=>{var $=xb(),w=h($),x=h(w,!0);g(w);var k=P(w,2);{var C=E=>{At(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",ariaLabel:n,children:(A,L)=>{Gp(A,{})},$$slots:{default:!0}})};V(k,E=>{o()&&E(C)})}g($),S(()=>ue(x,e.title)),_(p,$)};V(d,p=>{i()&&p(l)})}var c=P(d,2),u=h(c),b=h(u);pe(b,()=>e.children??te),g(u),g(c),g(s),g(a),_(t,a),F()}var Cb=new Set(["BR"]),Ch=t=>{let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let n=i[o],a=n.tagName;Cb.has(a)||n.parentElement?.removeChild(n)}return e.innerHTML};var kb=M('<li class="hot-key-map-item svelte-quklnq"><span class="hot-key-map-item-description svelte-quklnq"><!></span> <span class="hot-key-map-item-value svelte-quklnq"> </span></li>'),Tb=M('<div class="hot-key-map-group svelte-quklnq"><h5 class="hot-key-map-group-title svelte-quklnq"> </h5> <ul class="hot-key-map-group-items svelte-quklnq"></ul></div>'),Ib=M('<div class="hot-key-map svelte-quklnq"></div>'),Eb={hash:"svelte-quklnq",code:`.hot-key-map.svelte-quklnq {color:var(--black);box-sizing:border-box;overflow-x:hidden;}.hot-key-map-group.svelte-quklnq {border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px;}.hot-key-map-group.svelte-quklnq:last-child {border-bottom:none;}.hot-key-map-group-title.svelte-quklnq {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.svelte-quklnq,
166
166
  .hot-key-map-item.svelte-quklnq {padding:12px 0;margin:0;width:100%;}.hot-key-map-group-items.svelte-quklnq {box-sizing:border-box;list-style:none;padding:0;margin:0;}.hot-key-map-item.svelte-quklnq {box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;--videoplayer-hotkey-item-value-width: 156px;--videoplayer-hotkey-item-value-padding-left: 24px;}.hot-key-map-item-description.svelte-quklnq {color:var(--white-alpha-72);width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left));max-width:388px;}.hot-key-map-item-value.svelte-quklnq {color:var(--white);width:var(--videoplayer-hotkey-item-value-width);padding-left:var(--videoplayer-hotkey-item-value-padding-left);letter-spacing:-0.14px;}.hot-key-map-item-description.svelte-quklnq,
167
- .hot-key-map-item-value.svelte-quklnq {font-feature-settings:'clig' off, 'liga' off;font-size:13px;font-style:normal;font-weight:400;line-height:16px;}`};function Yp(t,e){H(e,!1),z(t,Eb);let[i,o]=Le(),n=()=>y(s,"$data",i),a=be(),{data:s,show:d}=a.ui.modals.hotKeyMap,l=()=>{d.set(!1)};fr(),jp(t,{get title(){return n().title},onClose:l,children:(c,u)=>{var b=Ib();ui(b,5,()=>n().groups,({title:p,items:$})=>p,(p,$)=>{let w=()=>r($).title,x=()=>r($).items;var k=Tb(),C=h(k),E=h(C,!0);g(C);var A=P(C,2);ui(A,5,x,({description:L,value:I})=>I,(L,I)=>{let N=()=>r(I).description,W=()=>r(I).value;var Q=kb(),j=h(Q),re=h(j);Ll(re,()=>Ch(N()),!1,!1),g(j);var ce=P(j,2),X=h(ce,!0);g(ce),g(Q),S(()=>ue(X,W())),_(L,Q)}),g(A),g(k),S(()=>ue(E,w())),_(p,k)}),g(b),_(c,b)},$$slots:{default:!0}}),F(),o()}var qf=require("@vkontakte/videoplayer-shared");var rs=require("@vkontakte/videoplayer-core");var LM=require("@vkontakte/videoplayer-shared");var Pb=M('<div class="pillow svelte-1oe0j8n"><!></div>'),Ab={hash:"svelte-1oe0j8n",code:".pillow.svelte-1oe0j8n {background-color:#679FF8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;padding:2px 4px;border-radius:12px;}"};function Zp(t,e){z(t,Ab);var i=Pb(),o=h(i);pe(o,()=>e.children??te),g(i),_(t,i)}var js=require("@vkontakte/videoplayer-shared");var Mb=ve('<svg><!><path fill="currentColor" d="M5.517 5c.325 0 .516-.198.516-.536v-.97l.492-.517 1.46 1.74c.16.205.304.283.516.283A.49.49 0 0 0 9 4.501c0-.14-.068-.287-.222-.478l-1.47-1.73L8.818.868C8.949.731 9 .618 9 .475A.474.474 0 0 0 8.515 0c-.171 0-.301.065-.445.222L6.064 2.25h-.03V.54c0-.342-.192-.54-.517-.54s-.516.198-.516.54v3.924c0 .338.191.536.516.536"></path><path fill="currentColor" fill-rule="evenodd" d="m2.551 1.052-1.51 2.052h1.51zM3.5 3.104V.832c0-.81-1.089-1.14-1.556-.48L.139 2.821a.75.75 0 0 0 .612 1.183h1.8v.55c0 .248.25.45.499.45a.45.45 0 0 0 .45-.45v-.55h.052a.45.45 0 0 0 0-.9z" clip-rule="evenodd"></path></svg>');function Xp(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Mb();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img",...i})),_(t,o)}var Lb=ve('<svg><!><path fill="currentColor" d="M5.513 5c.323 0 .513-.198.513-.537v-.97l.49-.516L7.99 4.715c.16.205.302.284.513.284A.49.49 0 0 0 9 4.5c0-.14-.068-.287-.22-.478L7.293 2.293 8.82.868C8.949.731 9 .618 9 .475A.473.473 0 0 0 8.517 0c-.17 0-.299.065-.441.222L6.056 2.25h-.03V.54c0-.342-.19-.54-.513-.54S5 .198 5 .54v3.923c0 .339.19.537.513.537"></path><path fill="currentColor" fill-rule="evenodd" d="M2 0q-.53 0-.952.173a1.5 1.5 0 0 0-.654.484q-.23.312-.23.71c0 .423.208.756.613.995a1.46 1.46 0 0 0-.547.44q-.23.305-.23.71 0 .432.252.778l.001.001q.26.336.712.523Q1.418 5.001 2 5q.582 0 1.035-.186.451-.187.705-.524.26-.346.26-.777 0-.406-.23-.711a1.45 1.45 0 0 0-.552-.44c.409-.235.618-.569.618-.994a1.14 1.14 0 0 0-.238-.711 1.44 1.44 0 0 0-.653-.484A2.4 2.4 0 0 0 2 0m-.573.964C1.563.86 1.75.804 2 .804s.434.055.564.16h.001a.51.51 0 0 1 .204.43.52.52 0 0 1-.204.437c-.13.105-.315.161-.565.161s-.437-.056-.573-.161a.52.52 0 0 1-.203-.437q.002-.276.203-.43m-.345 2.522c0-.217.08-.381.233-.503.16-.122.385-.188.685-.188s.522.066.677.188q.24.181.24.503a.63.63 0 0 1-.24.523c-.155.122-.377.188-.677.188s-.524-.065-.684-.187a.64.64 0 0 1-.234-.524" clip-rule="evenodd"></path></svg>');function Jp(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Lb();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img",...i})),_(t,o)}var Vb=ve('<svg><!><path fill="currentColor" d="M5.516 5h1.107C8.103 5 9 4.065 9 2.5S8.103 0 6.623 0H5.516C5.191 0 5 .2 5 .537V4.46c0 .342.191.54.516.54m.516-.854V.852H6.5C7.41.852 8 1.468 8 2.5c0 1.066-.577 1.646-1.5 1.646zM.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S4 4.802 4 4.464V.54C4 .198 3.809 0 3.484 0s-.516.198-.516.54v1.531H1.032V.54C1.032.198.841 0 .516 0S0 .198 0 .54v3.989C0 4.867.191 5 .516 5"></path></svg>');function ef(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Vb();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img",...i})),_(t,o)}var Rb=ve('<svg><!><path fill="currentColor" d="M9.516 5h1.107C12.103 5 13 4.065 13 2.5S12.103 0 10.623 0H9.516C9.191 0 9 .2 9 .537V4.46c0 .342.191.54.516.54m.516-.854V.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646zM4.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S8 4.802 8 4.464V.54C8 .198 7.809 0 7.484 0s-.516.198-.516.54v1.531H5.032V.54c0-.342-.191-.54-.516-.54S4 .198 4 .54v3.989c0 .338.191.471.516.471m-4 0c.325 0 .516-.198.516-.537V3h1.332c.27 0 .441-.154.441-.41 0-.253-.174-.407-.44-.407H1.031V.854h1.5c.28 0 .468-.16.468-.427C3 .161 2.815 0 2.532 0H.516C.191 0 0 .198 0 .537v3.926C0 4.802.191 5 .516 5"></path></svg>');function Xl(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Rb();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"none",role:"img",...i})),_(t,o)}var Nb=ve('<svg><!><path fill="currentColor" d="M11.516 5.75h1.107c1.48 0 2.377-.935 2.377-2.5s-.897-2.5-2.377-2.5h-1.107c-.325 0-.516.199-.516.537V5.21c0 .342.191.54.516.54m.516-.854V1.602h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646zm-5.516.854c.325 0 .516-.198.516-.536V3.672h1.936v1.542c0 .338.191.536.516.536S10 5.552 10 5.214V1.29c0-.342-.191-.54-.516-.54s-.516.198-.516.54v1.531H7.032V1.29c0-.342-.191-.54-.516-.54S6 .948 6 1.29v3.989c0 .338.191.471.516.471"></path><path fill="currentColor" fill-rule="evenodd" d="M3.338 5.659a4 4 0 0 1-.838.091C1.037 5.75 0 4.885 0 3.303 0 1.733 1.037.75 2.5.75 3.96.75 5 1.734 5 3.303c0 .863-.274 1.46-.778 1.88l.194.29a.5.5 0 0 1-.832.554zm-.52-.78-.234-.352a.5.5 0 1 1 .832-.554l.245.367c.184-.26.286-.615.286-1.037 0-1.036-.64-1.653-1.447-1.653-.81 0-1.447.617-1.447 1.653 0 1.032.637 1.596 1.447 1.596.08 0 .208-.007.318-.02" clip-rule="evenodd"></path></svg>');function Jl(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Nb();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"none",role:"img",...i})),_(t,o)}var Bc=t=>{switch(t){case js.VideoQuality.Q_720P:return ef;case js.VideoQuality.Q_1080P:return Xl;case js.VideoQuality.Q_1440P:return Jl;case js.VideoQuality.Q_2160P:return Xp;case js.VideoQuality.Q_4320P:return Jp}};var Db=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M12.722 2.213c1.208.037 1.994.702 2.408 1.954l.065.215.051.191q.027.111.068.235l.058.159.034.017.069-.023.133-.051.156-.068c1.414-.658 2.502-.536 3.387.437l.125.145.82 1.017c.732.962.71 1.99-.004 3.1l-.125.187-.117.16a3 3 0 0 0-.142.205l-.07.115-.034.057.004.02.091.06.127.077.153.083c1.39.71 1.963 1.641 1.742 2.936l-.038.188-.244 1.058c-.158.685-.282 1.01-.77 1.454-.475.432-1.016.61-1.732.67l-.22.014-.198.006q-.116.002-.246.015l-.181.021.013.142.013.096.033.179c.323 1.526-.04 2.558-1.188 3.202l-.17.09-1.175.57c-1.102.495-2.099.242-3.02-.702l-.153-.164-.13-.15a3 3 0 0 0-.17-.186l-.097-.096-.05-.046-.09.087-.106.108-.118.133c-.952 1.134-1.957 1.54-3.176 1.067l-.175-.074-1.052-.51-.312-.16c-.476-.26-.743-.51-1.004-1.061-.275-.58-.294-1.15-.16-1.883l.044-.225q.024-.114.041-.242l.019-.172-.004-.004-.104-.014-.146-.013-.174-.008c-1.56-.028-2.484-.614-2.853-1.877l-.049-.185-.292-1.274c-.235-1.185.236-2.1 1.364-2.785l.194-.112.175-.093a3 3 0 0 0 .216-.12l.155-.102.004-.019-.063-.108-.08-.125-.103-.143c-.937-1.246-1.044-2.335-.276-3.404l.115-.153.824-1.013c.79-.915 1.8-1.107 3.034-.64l.208.083.181.081q.103.048.222.093l.136.048.036-.017.033-.089.045-.138.046-.166c.36-1.436 1.085-2.242 2.39-2.35l.19-.011h1.39Zm-.056 1.799h-1.333l-.14.01c-.285.037-.472.191-.652.832l-.041.156-.057.206a6.3 6.3 0 0 1-.468 1.134 6 6 0 0 0-1.147.558 6.5 6.5 0 0 1-1.16-.35l-.35-.154c-.248-.107-.435-.161-.583-.175l-.084-.003a.55.55 0 0 0-.408.193l-.068.074-.789.973-.095.125c-.183.264-.21.5.195 1.075l.228.316c.212.31.425.692.598 1.102q-.195.577-.27 1.201c-.334.29-.69.537-1.013.72l-.343.184c-.617.34-.695.563-.646.881l.013.075.28 1.22.04.152c.096.308.265.475.968.509l.388.014c.37.024.798.09 1.223.204q.337.526.776.968a6.3 6.3 0 0 1-.118 1.445c-.201.95-.014 1.102.383 1.3l1.126.547a.8.8 0 0 0 .337.089l.067-.006c.181-.028.382-.162.67-.485l.258-.295a6.5 6.5 0 0 1 .949-.837l.298.023L12 18l.302-.008.298-.022c.363.263.691.559.948.837l.258.295c.325.364.538.488.737.49l.066-.003a.8.8 0 0 0 .178-.046l.093-.039 1.126-.548.139-.073c.3-.175.42-.395.245-1.226a6.2 6.2 0 0 1-.117-1.445q.436-.442.775-.97a6.5 6.5 0 0 1 1.223-.202l.387-.014c.812-.04.912-.256 1.008-.66l.264-1.142c.09-.406.095-.643-.617-1.035l-.342-.183a6.4 6.4 0 0 1-1.014-.722 6 6 0 0 0-.27-1.201c.174-.41.386-.791.598-1.1l.228-.317c.406-.575.378-.81.195-1.075l-.045-.062-.787-.974c-.14-.171-.259-.294-.452-.322l-.076-.007c-.16-.003-.368.05-.667.178l-.35.155a6.4 6.4 0 0 1-1.158.348 6 6 0 0 0-1.15-.556 6.5 6.5 0 0 1-.454-1.093l-.113-.414c-.192-.678-.393-.805-.714-.828zM12 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></svg>');function tf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Db();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"settings-mobile-icon",role:"img",...i})),_(t,o)}var Bb=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.5.5 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.5.5 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.5.5 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438q.063.016.12.05c1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.5.5 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.6.6 0 0 0-.413-.519 7.5 7.5 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.58.58 0 0 0 .633-.44 7.5 7.5 0 0 1 .749-1.967" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M13.25 2.833c.225.751.383 1.502 1.63 2.222 1.399.38 2.082.003 2.718-.42.663-.443.86-.315 1.124-.054l.644.643c.294.294.412.412 0 1.178-.372.69-.792 1.333-.418 2.726.72 1.255 1.47 1.472 2.219 1.622.78.156.83.386.833.757v.91c0 .416 0 .583-.833.833-.751.225-1.502.383-2.222 1.63-.38 1.399-.003 2.082.42 2.718.443.663.315.86.054 1.124l-.643.644c-.294.294-.412.412-1.178 0-.69-.372-1.333-.792-2.726-.418-1.255.72-1.472 1.47-1.622 2.219-.156.78-.386.83-.757.833h-.91c-.416 0-.583 0-.833-.833-.225-.751-.383-1.502-1.63-2.222-1.399-.38-2.082-.003-2.718.42-.663.443-.86.315-1.124.054l-.644-.643c-.294-.294-.412-.412 0-1.178.372-.69.792-1.333.418-2.726-.72-1.255-1.47-1.472-2.219-1.622-.78-.156-.83-.386-.833-.757v-.91c0-.416 0-.583.833-.833.751-.225 1.502-.383 2.222-1.63.38-1.399.003-2.082-.42-2.718-.443-.663-.315-.86-.054-1.124l.643-.644c.294-.294.412-.412 1.178 0 .69.372 1.333.792 2.726.418 1.255-.72 1.472-1.47 1.622-2.219.156-.78.386-.83.757-.833h.91c.416 0 .583 0 .833.833M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5" class="_full"></path></svg>');function of(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Bb();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","data-testid":"settings-icon",role:"img",...i})),_(t,o)}var Ob=M('<div aria-hidden="true"><!> <!></div>'),Hb={hash:"svelte-8t5w85",code:'.icon.svelte-8t5w85 {display:flex;position:relative;width:24px;height:24px;}.icon.svelte-8t5w85 .pillow {position:absolute;top:1px;right:-9px;}.icon.triple.svelte-8t5w85 .pillow {right:-13px;}.icon.svelte-8t5w85 svg[data-testid="settings-icon--labeled"] ._full {visibility:hidden;opacity:0;}'};function ed(t,e){H(e,!0),z(t,Hb);let i=m(e,"isMobile",3,!1),o=m(e,"currentQuality",3,void 0),n=v(()=>Bc(o())),a=v(()=>!!r(n)&&[Xl,Jl].includes(r(n)));var s=Be(),d=se(s);{var l=u=>{tf(u,{})},c=u=>{var b=Ob();let p;var $=h(b);{var w=C=>{Zp(C,{children:(E,A)=>{var L=Be(),I=se(L);pi(I,()=>r(n),(N,W)=>{W(N,{})}),_(E,L)},$$slots:{default:!0}})};V($,C=>{r(n)&&C(w)})}var x=P($,2);let k=v(()=>r(n)?"settings-icon--labeled":"settings-icon");of(x,{get"data-testid"(){return r(k)},fill:"var(--btn-color, #fff)"}),g(b),S(C=>p=J(b,1,"icon svelte-8t5w85",null,p,C),[()=>({triple:r(a)})]),_(u,b)};V(d,u=>{i()?u(l):u(c,!1)})}_(t,s),F()}var Fb=M('<span class="settings-icon-wrapper svelte-d9t49t"><!></span>'),Ub={hash:"svelte-d9t49t",code:".settings-icon-wrapper.svelte-d9t49t {position:relative;width:24px;}"};function Ys(t,e){H(e,!0),z(t,Ub);let[i,o]=Le(),n=()=>y(e.ref$,"$ref$",i),a=()=>y(u,"$settingsMenuVisible",i),s=()=>y($,"$isMobile",i),d=()=>y(c,"$currentQuality",i),l=be(),c=l.state.currentQuality$,u=l.ui.settingsMenu.visible$,b=l.actions.internal.openSettingsMenu,p=l.actions.internal.closeSettingsMenu,$=l.ui.isMobile,w=l.ui.t,x=Z(void 0);He(()=>{n()&&vt(()=>{e.ref$.set(r(x))})});let k=v(()=>a()?w("tooltip_settings_on"):w("tooltip_settings_off"));async function C(A){let L=da(A);a()?p():b(L,eo)}let E=v(()=>a()?"opened":"");At(t,{get className(){return r(E)},testId:"btn-settings",click:C,get ariaLabel(){return r(k)},get ariaExpanded(){return a()},get ref(){return r(x)},set ref(A){D(x,le(A))},children:(A,L)=>{var I=Fb(),N=h(I);ed(N,{get isMobile(){return s()},get currentQuality(){return d()}}),g(I),_(A,I)},$$slots:{default:!0}}),F(),o()}var zb=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M3 0h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3m1 9h2a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2m5 0h7a1 1 0 1 0 0-2H9a1 1 0 0 0 0 2m-5 4h7a1 1 0 1 0 0-2H4a1 1 0 1 0 0 2m10 0h2a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2"></path></svg>');function nf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=zb();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"16",fill:"none","aria-hidden":"true","data-testid":"subtitle-pained-icon",role:"img",...i})),_(t,o)}var qb=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M14.692.428c2.293 0 3.124.24 3.962.687a4.67 4.67 0 0 1 1.944 1.944c.449.839.687 1.67.687 3.962v3.958c0 2.292-.238 3.123-.687 3.961a4.67 4.67 0 0 1-1.944 1.944c-.838.449-1.67.687-3.962.687H7.307c-2.293 0-3.124-.238-3.962-.687A4.67 4.67 0 0 1 1.4 14.94c-.448-.838-.687-1.669-.687-3.961V7.02c0-2.292.239-3.123.687-3.962a4.67 4.67 0 0 1 1.944-1.944C4.183.667 5.015.428 7.307.428zm.243 1.716-7.628-.001c-1.832 0-2.484.126-3.154.484a2.96 2.96 0 0 0-1.24 1.24c-.343.64-.473 1.264-.484 2.912v4.2c0 1.83.125 2.483.483 3.153q.433.809 1.241 1.24c.67.36 1.322.485 3.154.485h7.385c1.832 0 2.484-.126 3.154-.484a2.96 2.96 0 0 0 1.24-1.241c.36-.67.485-1.322.485-3.153V7.02c0-1.831-.126-2.483-.484-3.153a2.96 2.96 0 0 0-1.241-1.24c-.64-.343-1.263-.473-2.911-.484ZM11 10.714a.857.857 0 1 1 0 1.714H5.857a.857.857 0 0 1 0-1.714zm5.142 0a.857.857 0 1 1 0 1.714h-1.714a.857.857 0 0 1 0-1.714zm0-3.428a.857.857 0 1 1 0 1.714H11a.857.857 0 1 1 0-1.714zm-8.571 0a.857.857 0 0 1 0 1.714H5.857a.857.857 0 0 1 0-1.714z"></path></svg>');function td(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=qb();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"18",fill:"none","aria-hidden":"true","data-testid":"subtitle-empty-icon",role:"img",...i})),_(t,o)}function rf(t,e){H(e,!0);let i=m(e,"isSubtitlesEnabled",3,!1),n=be().ui.t,a=v(()=>i()?n("tooltip_subtitles_on"):n("tooltip_subtitles_off"));At(t,{testId:"btn-Subtitles",get ariaLabel(){return r(a)},get click(){return e.click},get ariaKeyShortCut(){return Mr.KeyC},children:(s,d)=>{var l=Be(),c=se(l);{var u=p=>{nf(p,{})},b=p=>{td(p,{})};V(c,p=>{i()?p(u):p(b,!1)})}_(s,l)},$$slots:{default:!0}}),F()}var Wb=M('<span class="duration svelte-sz9er7"> </span>'),Kb=M('<div><span class="current svelte-sz9er7"> </span> <!></div>'),Qb={hash:"svelte-sz9er7",code:".time.svelte-sz9er7 {display:flex;align-items:center;font-weight:500;font-variant-numeric:tabular-nums;padding:12px 6px;color:var(--controls-time);}.time.mobile.svelte-sz9er7 {padding:0 0 0 8px;}.current.svelte-sz9er7 {position:relative;}.duration.svelte-sz9er7 {opacity:0.7;}.duration.svelte-sz9er7:before {content:' / ';white-space:pre;}"};function id(t,e){H(e,!0),z(t,Qb);let i=m(e,"isMobile",3,!1),o=m(e,"showDuration",3,!0),n=m(e,"ref",15),a=v(()=>zo(e.duration)),s=v(()=>zo(e.position));var d=Kb();let l;var c=h(d),u=h(c,!0);g(c);var b=P(c,2);{var p=$=>{var w=Wb(),x=h(w,!0);g(w),S(()=>ue(x,r(a))),_($,w)};V(b,$=>{o()&&$(p)})}g(d),st(d,$=>n($),()=>n()),S($=>{l=J(d,1,"time svelte-sz9er7",null,l,$),ue(u,r(s))},[()=>({mobile:i()})]),_(t,d),F()}var nd=require("@vkontakte/videoplayer-shared");var Gb=ve('<svg xmlns="http://www.w3.org/2000/svg" class="icon svelte-1n5yyua" aria-hidden="true"><g fill="var(--btn-color, #fff)" fill-rule="evenodd"><path class="wave2 svelte-1n5yyua" d="M12.98 18.823c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963zm2.901-8.704A.875.875 0 1 1 17.12 8.88c.176.177.41.47.64.872.384.671.616 1.425.616 2.247s-.232 1.576-.615 2.247a4.23 4.23 0 0 1-.641.872.875.875 0 1 1-1.238-1.238c.074-.073.214-.249.36-.503.241-.423.384-.887.384-1.378s-.143-.955-.385-1.378a2.597 2.597 0 0 0-.359-.503zm3-2A.875.875 0 1 1 20.12 6.88c.263.264.62.74.966 1.432.517 1.033.843 2.255.89 3.716-.047 1.403-.373 2.625-.89 3.658-.346.692-.703 1.168-.966 1.432a.875.875 0 1 1-1.238-1.238c.138-.137.383-.464.639-.976.407-.814.667-1.79.705-2.876-.038-1.144-.298-2.12-.705-2.934-.256-.512-.501-.839-.639-.976z"></path><path class="wave1 svelte-1n5yyua" d="M12.98 18.823c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963zm2.901-8.704A.875.875 0 1 1 17.12 8.88c.176.177.41.47.64.872.384.671.616 1.425.616 2.247s-.232 1.576-.615 2.247a4.23 4.23 0 0 1-.641.872.875.875 0 1 1-1.238-1.238c.074-.073.214-.249.36-.503.241-.423.384-.887.384-1.378s-.143-.955-.385-1.378a2.597 2.597 0 0 0-.359-.503z"></path><path class="cross svelte-1n5yyua" d="m20 10.763 2.381-2.382A.875.875 0 1 1 23.62 9.62L21.237 12l2.382 2.381a.875.875 0 1 1-1.238 1.238L20 13.237l-2.381 2.382a.875.875 0 1 1-1.238-1.238L18.763 12 16.38 9.619A.875.875 0 1 1 17.62 8.38zm-7.02 8.06c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963z"></path></g></svg>'),jb={hash:"svelte-1n5yyua",code:`.icon.svelte-1n5yyua {display:block;width:24px;height:24px;}.icon.svelte-1n5yyua .cross:where(.svelte-1n5yyua) {visibility:hidden;}.icon[data-value='off'].svelte-1n5yyua .wave1:where(.svelte-1n5yyua),
167
+ .hot-key-map-item-value.svelte-quklnq {font-feature-settings:'clig' off, 'liga' off;font-size:13px;font-style:normal;font-weight:400;line-height:16px;}`};function Yp(t,e){H(e,!1),z(t,Eb);let[i,o]=Le(),n=()=>y(s,"$data",i),a=be(),{data:s,show:d}=a.ui.modals.hotKeyMap,l=()=>{d.set(!1)};fr(),jp(t,{get title(){return n().title},onClose:l,children:(c,u)=>{var b=Ib();ui(b,5,()=>n().groups,({title:p,items:$})=>p,(p,$)=>{let w=()=>r($).title,x=()=>r($).items;var k=Tb(),C=h(k),E=h(C,!0);g(C);var A=P(C,2);ui(A,5,x,({description:L,value:I})=>I,(L,I)=>{let N=()=>r(I).description,W=()=>r(I).value;var Q=kb(),j=h(Q),re=h(j);Ll(re,()=>Ch(N()),!1,!1),g(j);var ce=P(j,2),X=h(ce,!0);g(ce),g(Q),S(()=>ue(X,W())),_(L,Q)}),g(A),g(k),S(()=>ue(E,w())),_(p,k)}),g(b),_(c,b)},$$slots:{default:!0}}),F(),o()}var qf=require("@vkontakte/videoplayer-shared");var rs=require("@vkontakte/videoplayer-core");var LM=require("@vkontakte/videoplayer-shared");var Pb=M('<div class="pillow svelte-1oe0j8n"><!></div>'),Ab={hash:"svelte-1oe0j8n",code:".pillow.svelte-1oe0j8n {background-color:#679FF8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;padding:2px 4px;border-radius:12px;}"};function Zp(t,e){z(t,Ab);var i=Pb(),o=h(i);pe(o,()=>e.children??te),g(i),_(t,i)}var js=require("@vkontakte/videoplayer-shared");var Mb=ve('<svg><!><path fill="currentColor" d="M5.517 5c.325 0 .516-.198.516-.536v-.97l.492-.517 1.46 1.74c.16.205.304.283.516.283A.49.49 0 0 0 9 4.501c0-.14-.068-.287-.222-.478l-1.47-1.73L8.818.868C8.949.731 9 .618 9 .475A.474.474 0 0 0 8.515 0c-.171 0-.301.065-.445.222L6.064 2.25h-.03V.54c0-.342-.192-.54-.517-.54s-.516.198-.516.54v3.924c0 .338.191.536.516.536"></path><path fill="currentColor" fill-rule="evenodd" d="m2.551 1.052-1.51 2.052h1.51zM3.5 3.104V.832c0-.81-1.089-1.14-1.556-.48L.139 2.821a.75.75 0 0 0 .612 1.183h1.8v.55c0 .248.25.45.499.45a.45.45 0 0 0 .45-.45v-.55h.052a.45.45 0 0 0 0-.9z" clip-rule="evenodd"></path></svg>');function Xp(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Mb();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img",...i})),_(t,o)}var Lb=ve('<svg><!><path fill="currentColor" d="M5.513 5c.323 0 .513-.198.513-.537v-.97l.49-.516L7.99 4.715c.16.205.302.284.513.284A.49.49 0 0 0 9 4.5c0-.14-.068-.287-.22-.478L7.293 2.293 8.82.868C8.949.731 9 .618 9 .475A.473.473 0 0 0 8.517 0c-.17 0-.299.065-.441.222L6.056 2.25h-.03V.54c0-.342-.19-.54-.513-.54S5 .198 5 .54v3.923c0 .339.19.537.513.537"></path><path fill="currentColor" fill-rule="evenodd" d="M2 0q-.53 0-.952.173a1.5 1.5 0 0 0-.654.484q-.23.312-.23.71c0 .423.208.756.613.995a1.46 1.46 0 0 0-.547.44q-.23.305-.23.71 0 .432.252.778l.001.001q.26.336.712.523Q1.418 5.001 2 5q.582 0 1.035-.186.451-.187.705-.524.26-.346.26-.777 0-.406-.23-.711a1.45 1.45 0 0 0-.552-.44c.409-.235.618-.569.618-.994a1.14 1.14 0 0 0-.238-.711 1.44 1.44 0 0 0-.653-.484A2.4 2.4 0 0 0 2 0m-.573.964C1.563.86 1.75.804 2 .804s.434.055.564.16h.001a.51.51 0 0 1 .204.43.52.52 0 0 1-.204.437c-.13.105-.315.161-.565.161s-.437-.056-.573-.161a.52.52 0 0 1-.203-.437q.002-.276.203-.43m-.345 2.522c0-.217.08-.381.233-.503.16-.122.385-.188.685-.188s.522.066.677.188q.24.181.24.503a.63.63 0 0 1-.24.523c-.155.122-.377.188-.677.188s-.524-.065-.684-.187a.64.64 0 0 1-.234-.524" clip-rule="evenodd"></path></svg>');function Jp(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Lb();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img",...i})),_(t,o)}var Vb=ve('<svg><!><path fill="currentColor" d="M5.516 5h1.107C8.103 5 9 4.065 9 2.5S8.103 0 6.623 0H5.516C5.191 0 5 .2 5 .537V4.46c0 .342.191.54.516.54m.516-.854V.852H6.5C7.41.852 8 1.468 8 2.5c0 1.066-.577 1.646-1.5 1.646zM.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S4 4.802 4 4.464V.54C4 .198 3.809 0 3.484 0s-.516.198-.516.54v1.531H1.032V.54C1.032.198.841 0 .516 0S0 .198 0 .54v3.989C0 4.867.191 5 .516 5"></path></svg>');function ef(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Vb();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img",...i})),_(t,o)}var Rb=ve('<svg><!><path fill="currentColor" d="M9.516 5h1.107C12.103 5 13 4.065 13 2.5S12.103 0 10.623 0H9.516C9.191 0 9 .2 9 .537V4.46c0 .342.191.54.516.54m.516-.854V.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646zM4.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S8 4.802 8 4.464V.54C8 .198 7.809 0 7.484 0s-.516.198-.516.54v1.531H5.032V.54c0-.342-.191-.54-.516-.54S4 .198 4 .54v3.989c0 .338.191.471.516.471m-4 0c.325 0 .516-.198.516-.537V3h1.332c.27 0 .441-.154.441-.41 0-.253-.174-.407-.44-.407H1.031V.854h1.5c.28 0 .468-.16.468-.427C3 .161 2.815 0 2.532 0H.516C.191 0 0 .198 0 .537v3.926C0 4.802.191 5 .516 5"></path></svg>');function Xl(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Rb();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"none",role:"img",...i})),_(t,o)}var Nb=ve('<svg><!><path fill="currentColor" d="M11.516 5.75h1.107c1.48 0 2.377-.935 2.377-2.5s-.897-2.5-2.377-2.5h-1.107c-.325 0-.516.199-.516.537V5.21c0 .342.191.54.516.54m.516-.854V1.602h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646zm-5.516.854c.325 0 .516-.198.516-.536V3.672h1.936v1.542c0 .338.191.536.516.536S10 5.552 10 5.214V1.29c0-.342-.191-.54-.516-.54s-.516.198-.516.54v1.531H7.032V1.29c0-.342-.191-.54-.516-.54S6 .948 6 1.29v3.989c0 .338.191.471.516.471"></path><path fill="currentColor" fill-rule="evenodd" d="M3.338 5.659a4 4 0 0 1-.838.091C1.037 5.75 0 4.885 0 3.303 0 1.733 1.037.75 2.5.75 3.96.75 5 1.734 5 3.303c0 .863-.274 1.46-.778 1.88l.194.29a.5.5 0 0 1-.832.554zm-.52-.78-.234-.352a.5.5 0 1 1 .832-.554l.245.367c.184-.26.286-.615.286-1.037 0-1.036-.64-1.653-1.447-1.653-.81 0-1.447.617-1.447 1.653 0 1.032.637 1.596 1.447 1.596.08 0 .208-.007.318-.02" clip-rule="evenodd"></path></svg>');function Jl(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Nb();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"none",role:"img",...i})),_(t,o)}var Bc=t=>{switch(t){case js.VideoQuality.Q_720P:return ef;case js.VideoQuality.Q_1080P:return Xl;case js.VideoQuality.Q_1440P:return Jl;case js.VideoQuality.Q_2160P:return Xp;case js.VideoQuality.Q_4320P:return Jp}};var Db=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M12.722 2.213c1.208.037 1.994.702 2.408 1.954l.065.215.051.191q.027.111.068.235l.058.159.034.017.069-.023.133-.051.156-.068c1.414-.658 2.502-.536 3.387.437l.125.145.82 1.017c.732.962.71 1.99-.004 3.1l-.125.187-.117.16a3 3 0 0 0-.142.205l-.07.115-.034.057.004.02.091.06.127.077.153.083c1.39.71 1.963 1.641 1.742 2.936l-.038.188-.244 1.058c-.158.685-.282 1.01-.77 1.454-.475.432-1.016.61-1.732.67l-.22.014-.198.006q-.116.002-.246.015l-.181.021.013.142.013.096.033.179c.323 1.526-.04 2.558-1.188 3.202l-.17.09-1.175.57c-1.102.495-2.099.242-3.02-.702l-.153-.164-.13-.15a3 3 0 0 0-.17-.186l-.097-.096-.05-.046-.09.087-.106.108-.118.133c-.952 1.134-1.957 1.54-3.176 1.067l-.175-.074-1.052-.51-.312-.16c-.476-.26-.743-.51-1.004-1.061-.275-.58-.294-1.15-.16-1.883l.044-.225q.024-.114.041-.242l.019-.172-.004-.004-.104-.014-.146-.013-.174-.008c-1.56-.028-2.484-.614-2.853-1.877l-.049-.185-.292-1.274c-.235-1.185.236-2.1 1.364-2.785l.194-.112.175-.093a3 3 0 0 0 .216-.12l.155-.102.004-.019-.063-.108-.08-.125-.103-.143c-.937-1.246-1.044-2.335-.276-3.404l.115-.153.824-1.013c.79-.915 1.8-1.107 3.034-.64l.208.083.181.081q.103.048.222.093l.136.048.036-.017.033-.089.045-.138.046-.166c.36-1.436 1.085-2.242 2.39-2.35l.19-.011h1.39Zm-.056 1.799h-1.333l-.14.01c-.285.037-.472.191-.652.832l-.041.156-.057.206a6.3 6.3 0 0 1-.468 1.134 6 6 0 0 0-1.147.558 6.5 6.5 0 0 1-1.16-.35l-.35-.154c-.248-.107-.435-.161-.583-.175l-.084-.003a.55.55 0 0 0-.408.193l-.068.074-.789.973-.095.125c-.183.264-.21.5.195 1.075l.228.316c.212.31.425.692.598 1.102q-.195.577-.27 1.201c-.334.29-.69.537-1.013.72l-.343.184c-.617.34-.695.563-.646.881l.013.075.28 1.22.04.152c.096.308.265.475.968.509l.388.014c.37.024.798.09 1.223.204q.337.526.776.968a6.3 6.3 0 0 1-.118 1.445c-.201.95-.014 1.102.383 1.3l1.126.547a.8.8 0 0 0 .337.089l.067-.006c.181-.028.382-.162.67-.485l.258-.295a6.5 6.5 0 0 1 .949-.837l.298.023L12 18l.302-.008.298-.022c.363.263.691.559.948.837l.258.295c.325.364.538.488.737.49l.066-.003a.8.8 0 0 0 .178-.046l.093-.039 1.126-.548.139-.073c.3-.175.42-.395.245-1.226a6.2 6.2 0 0 1-.117-1.445q.436-.442.775-.97a6.5 6.5 0 0 1 1.223-.202l.387-.014c.812-.04.912-.256 1.008-.66l.264-1.142c.09-.406.095-.643-.617-1.035l-.342-.183a6.4 6.4 0 0 1-1.014-.722 6 6 0 0 0-.27-1.201c.174-.41.386-.791.598-1.1l.228-.317c.406-.575.378-.81.195-1.075l-.045-.062-.787-.974c-.14-.171-.259-.294-.452-.322l-.076-.007c-.16-.003-.368.05-.667.178l-.35.155a6.4 6.4 0 0 1-1.158.348 6 6 0 0 0-1.15-.556 6.5 6.5 0 0 1-.454-1.093l-.113-.414c-.192-.678-.393-.805-.714-.828zM12 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></svg>');function tf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Db();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"settings-mobile-icon",role:"img",...i})),_(t,o)}var Bb=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.5.5 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.5.5 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.5.5 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438q.063.016.12.05c1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.5.5 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.6.6 0 0 0-.413-.519 7.5 7.5 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.58.58 0 0 0 .633-.44 7.5 7.5 0 0 1 .749-1.967" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M13.25 2.833c.225.751.383 1.502 1.63 2.222 1.399.38 2.082.003 2.718-.42.663-.443.86-.315 1.124-.054l.644.643c.294.294.412.412 0 1.178-.372.69-.792 1.333-.418 2.726.72 1.255 1.47 1.472 2.219 1.622.78.156.83.386.833.757v.91c0 .416 0 .583-.833.833-.751.225-1.502.383-2.222 1.63-.38 1.399-.003 2.082.42 2.718.443.663.315.86.054 1.124l-.643.644c-.294.294-.412.412-1.178 0-.69-.372-1.333-.792-2.726-.418-1.255.72-1.472 1.47-1.622 2.219-.156.78-.386.83-.757.833h-.91c-.416 0-.583 0-.833-.833-.225-.751-.383-1.502-1.63-2.222-1.399-.38-2.082-.003-2.718.42-.663.443-.86.315-1.124.054l-.644-.643c-.294-.294-.412-.412 0-1.178.372-.69.792-1.333.418-2.726-.72-1.255-1.47-1.472-2.219-1.622-.78-.156-.83-.386-.833-.757v-.91c0-.416 0-.583.833-.833.751-.225 1.502-.383 2.222-1.63.38-1.399.003-2.082-.42-2.718-.443-.663-.315-.86-.054-1.124l.643-.644c.294-.294.412-.412 1.178 0 .69.372 1.333.792 2.726.418 1.255-.72 1.472-1.47 1.622-2.219.156-.78.386-.83.757-.833h.91c.416 0 .583 0 .833.833M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5" class="_full"></path></svg>');function of(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Bb();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","data-testid":"settings-icon",role:"img",...i})),_(t,o)}var Ob=M('<div aria-hidden="true"><!> <!></div>'),Hb={hash:"svelte-8t5w85",code:'.icon.svelte-8t5w85 {display:flex;position:relative;width:24px;height:24px;}.icon.svelte-8t5w85 .pillow {position:absolute;top:1px;right:-9px;}.icon.triple.svelte-8t5w85 .pillow {right:-13px;}.icon.svelte-8t5w85 svg[data-testid="settings-icon--labeled"] ._full {visibility:hidden;opacity:0;}'};function ed(t,e){H(e,!0),z(t,Hb);let i=m(e,"isMobile",3,!1),o=m(e,"currentQuality",3,void 0),n=v(()=>Bc(o())),a=v(()=>!!r(n)&&[Xl,Jl].includes(r(n)));var s=Be(),d=se(s);{var l=u=>{tf(u,{})},c=u=>{var b=Ob();let p;var $=h(b);{var w=C=>{Zp(C,{children:(E,A)=>{var L=Be(),I=se(L);pi(I,()=>r(n),(N,W)=>{W(N,{})}),_(E,L)},$$slots:{default:!0}})};V($,C=>{r(n)&&C(w)})}var x=P($,2);let k=v(()=>r(n)?"settings-icon--labeled":"settings-icon");of(x,{get"data-testid"(){return r(k)},fill:"var(--btn-color, #fff)"}),g(b),S(C=>p=J(b,1,"icon svelte-8t5w85",null,p,C),[()=>({triple:r(a)})]),_(u,b)};V(d,u=>{i()?u(l):u(c,!1)})}_(t,s),F()}var Fb=M('<span class="settings-icon-wrapper svelte-d9t49t"><!></span>'),Ub={hash:"svelte-d9t49t",code:".settings-icon-wrapper.svelte-d9t49t {position:relative;width:24px;}"};function Ys(t,e){H(e,!0),z(t,Ub);let[i,o]=Le(),n=()=>y(e.ref$,"$ref$",i),a=()=>y(u,"$settingsMenuVisible",i),s=()=>y($,"$isMobile",i),d=()=>y(c,"$currentQuality",i),l=be(),c=l.state.currentQuality$,u=l.ui.settingsMenu.visible$,b=l.actions.internal.openSettingsMenu,p=l.actions.internal.closeSettingsMenu,$=l.ui.isMobile,w=l.ui.t,x=Z(void 0);He(()=>{n()&&vt(()=>{e.ref$.set(r(x))})});let k=v(()=>a()?w("tooltip_settings_on"):w("tooltip_settings_off"));async function C(A){let L=da(A);a()?p():b(L,eo)}let E=v(()=>a()?"opened":"");At(t,{get className(){return r(E)},testId:"btn-settings",click:C,get ariaLabel(){return r(k)},get ariaExpanded(){return a()},get ref(){return r(x)},set ref(A){D(x,le(A))},children:(A,L)=>{var I=Fb(),N=h(I);ed(N,{get isMobile(){return s()},get currentQuality(){return d()}}),g(I),_(A,I)},$$slots:{default:!0}}),F(),o()}var zb=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M3 0h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3m1 9h2a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2m5 0h7a1 1 0 1 0 0-2H9a1 1 0 0 0 0 2m-5 4h7a1 1 0 1 0 0-2H4a1 1 0 1 0 0 2m10 0h2a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2"></path></svg>');function nf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=zb();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"16",fill:"none","aria-hidden":"true","data-testid":"subtitle-pained-icon",role:"img",...i})),_(t,o)}var qb=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M14.692.428c2.293 0 3.124.24 3.962.687a4.67 4.67 0 0 1 1.944 1.944c.449.839.687 1.67.687 3.962v3.958c0 2.292-.238 3.123-.687 3.961a4.67 4.67 0 0 1-1.944 1.944c-.838.449-1.67.687-3.962.687H7.307c-2.293 0-3.124-.238-3.962-.687A4.67 4.67 0 0 1 1.4 14.94c-.448-.838-.687-1.669-.687-3.961V7.02c0-2.292.239-3.123.687-3.962a4.67 4.67 0 0 1 1.944-1.944C4.183.667 5.015.428 7.307.428zm.243 1.716-7.628-.001c-1.832 0-2.484.126-3.154.484a2.96 2.96 0 0 0-1.24 1.24c-.343.64-.473 1.264-.484 2.912v4.2c0 1.83.125 2.483.483 3.153q.433.809 1.241 1.24c.67.36 1.322.485 3.154.485h7.385c1.832 0 2.484-.126 3.154-.484a2.96 2.96 0 0 0 1.24-1.241c.36-.67.485-1.322.485-3.153V7.02c0-1.831-.126-2.483-.484-3.153a2.96 2.96 0 0 0-1.241-1.24c-.64-.343-1.263-.473-2.911-.484ZM11 10.714a.857.857 0 1 1 0 1.714H5.857a.857.857 0 0 1 0-1.714zm5.142 0a.857.857 0 1 1 0 1.714h-1.714a.857.857 0 0 1 0-1.714zm0-3.428a.857.857 0 1 1 0 1.714H11a.857.857 0 1 1 0-1.714zm-8.571 0a.857.857 0 0 1 0 1.714H5.857a.857.857 0 0 1 0-1.714z"></path></svg>');function td(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=qb();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"18",fill:"none","aria-hidden":"true","data-testid":"subtitle-empty-icon",role:"img",...i})),_(t,o)}function rf(t,e){H(e,!0);let i=m(e,"isSubtitlesEnabled",3,!1),n=be().ui.t,a=v(()=>i()?n("tooltip_subtitles_on"):n("tooltip_subtitles_off"));At(t,{testId:"btn-Subtitles",get ariaLabel(){return r(a)},get click(){return e.click},get ariaKeyShortCut(){return Mr.KeyC},children:(s,d)=>{var l=Be(),c=se(l);{var u=p=>{nf(p,{})},b=p=>{td(p,{})};V(c,p=>{i()?p(u):p(b,!1)})}_(s,l)},$$slots:{default:!0}}),F()}var Wb=M('<span class="duration svelte-sz9er7" data-testid="duration"> </span>'),Kb=M('<div><span class="current svelte-sz9er7" data-testid="current"> </span> <!></div>'),Qb={hash:"svelte-sz9er7",code:".time.svelte-sz9er7 {display:flex;align-items:center;font-weight:500;font-variant-numeric:tabular-nums;padding:12px 6px;color:var(--controls-time);}.time.mobile.svelte-sz9er7 {padding:0 0 0 8px;}.current.svelte-sz9er7 {position:relative;}.duration.svelte-sz9er7 {opacity:0.7;}.duration.svelte-sz9er7:before {content:' / ';white-space:pre;}"};function id(t,e){H(e,!0),z(t,Qb);let i=m(e,"isMobile",3,!1),o=m(e,"showDuration",3,!0),n=m(e,"ref",15),a=v(()=>zo(e.duration)),s=v(()=>zo(e.position));var d=Kb();let l;var c=h(d),u=h(c,!0);g(c);var b=P(c,2);{var p=$=>{var w=Wb(),x=h(w,!0);g(w),S(()=>ue(x,r(a))),_($,w)};V(b,$=>{o()&&$(p)})}g(d),st(d,$=>n($),()=>n()),S($=>{l=J(d,1,"time svelte-sz9er7",null,l,$),ue(u,r(s))},[()=>({mobile:i()})]),_(t,d),F()}var nd=require("@vkontakte/videoplayer-shared");var Gb=ve('<svg xmlns="http://www.w3.org/2000/svg" class="icon svelte-1n5yyua" aria-hidden="true"><g fill="var(--btn-color, #fff)" fill-rule="evenodd"><path class="wave2 svelte-1n5yyua" d="M12.98 18.823c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963zm2.901-8.704A.875.875 0 1 1 17.12 8.88c.176.177.41.47.64.872.384.671.616 1.425.616 2.247s-.232 1.576-.615 2.247a4.23 4.23 0 0 1-.641.872.875.875 0 1 1-1.238-1.238c.074-.073.214-.249.36-.503.241-.423.384-.887.384-1.378s-.143-.955-.385-1.378a2.597 2.597 0 0 0-.359-.503zm3-2A.875.875 0 1 1 20.12 6.88c.263.264.62.74.966 1.432.517 1.033.843 2.255.89 3.716-.047 1.403-.373 2.625-.89 3.658-.346.692-.703 1.168-.966 1.432a.875.875 0 1 1-1.238-1.238c.138-.137.383-.464.639-.976.407-.814.667-1.79.705-2.876-.038-1.144-.298-2.12-.705-2.934-.256-.512-.501-.839-.639-.976z"></path><path class="wave1 svelte-1n5yyua" d="M12.98 18.823c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963zm2.901-8.704A.875.875 0 1 1 17.12 8.88c.176.177.41.47.64.872.384.671.616 1.425.616 2.247s-.232 1.576-.615 2.247a4.23 4.23 0 0 1-.641.872.875.875 0 1 1-1.238-1.238c.074-.073.214-.249.36-.503.241-.423.384-.887.384-1.378s-.143-.955-.385-1.378a2.597 2.597 0 0 0-.359-.503z"></path><path class="cross svelte-1n5yyua" d="m20 10.763 2.381-2.382A.875.875 0 1 1 23.62 9.62L21.237 12l2.382 2.381a.875.875 0 1 1-1.238 1.238L20 13.237l-2.381 2.382a.875.875 0 1 1-1.238-1.238L18.763 12 16.38 9.619A.875.875 0 1 1 17.62 8.38zm-7.02 8.06c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963z"></path></g></svg>'),jb={hash:"svelte-1n5yyua",code:`.icon.svelte-1n5yyua {display:block;width:24px;height:24px;}.icon.svelte-1n5yyua .cross:where(.svelte-1n5yyua) {visibility:hidden;}.icon[data-value='off'].svelte-1n5yyua .wave1:where(.svelte-1n5yyua),
168
168
  .icon[data-value='off'].svelte-1n5yyua .wave2:where(.svelte-1n5yyua) {visibility:hidden;}.icon[data-value='off'].svelte-1n5yyua .cross:where(.svelte-1n5yyua) {visibility:visible;}.icon[data-value='mid'].svelte-1n5yyua .wave2:where(.svelte-1n5yyua),
169
- .icon[data-value='min'].svelte-1n5yyua .wave2:where(.svelte-1n5yyua) {visibility:hidden;}`};function pa(t,e){z(t,jb);let i=m(e,"volume",3,1),o=m(e,"muted",3,!1),n=(d,l)=>l?"off":d>.5?"max":d>.2?"mid":d>0?"min":"off",a=v(()=>n(i(),o()));var s=Gb();S(()=>{De(s,"data-value",r(a)),De(s,"data-testid",`volume-${r(a)??""}-icon`)}),_(t,s)}var mo=require("@vkontakte/videoplayer-shared");var Oc=require("@vkontakte/videoplayer-shared");var kh=require("@vkontakte/videoplayer-shared");var Yb=M('<div class="overlay"><!></div>');function af(t,e){H(e,!0);let[i,o]=Le(),n=()=>y(s,"$overlayContainer$",i),s=be().ui.overlayContainer$,d=Z(void 0),l=p=>{!p||!r(d)||!p.contains(r(d))||p.removeChild(r(d))},c=p=>{!p||!r(d)||p.contains(r(d))||p.appendChild(r(d))};He(()=>{c(n())}),Vt(()=>(c(n()),()=>l(n())));var u=Yb(),b=h(u);pe(b,()=>e.children??te),g(u),st(u,p=>D(d,p),()=>r(d)),_(t,u),F(),o()}var Zb=M('<div class="tooltip svelte-hxlyne"><div class="content svelte-hxlyne"> </div> <div class="tooltip-pointer svelte-hxlyne"></div></div>'),Xb=M("<div><!></div> <!>",1),Jb={hash:"svelte-hxlyne",code:'.tooltip-wrapper.svelte-hxlyne {display:flex;flex-direction:column;min-width:0;}.full-width.svelte-hxlyne {width:100%;}.tooltip.svelte-hxlyne {position:absolute;opacity:0;visibility:hidden;transition:opacity 200ms, visibility 200ms;bottom:100%;left:0;}.content.svelte-hxlyne {display:inline-block;padding:6px 10px;border-radius:3px;color:var(--white);background-color:rgba(41, 41, 41, .8);}.tooltip-pointer.svelte-hxlyne {position:absolute;bottom:0;width:0;border-top:5px solid rgba(41, 41, 41, .8);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0;}'};function Xa(t,e){H(e,!0),z(t,Jb);let[i,o]=Le(),n=()=>y(re,"$overlayContainer$",i),a=()=>y(j,"$containerSize",i),s=m(e,"isMobile",3,!1),d=m(e,"content",3,""),l=m(e,"active",15,!1),c=m(e,"translateX",3,0),u=m(e,"translateY",3,0),b=m(e,"isFullWidthWrapper",3,!1),p=m(e,"maxTooltipWidth",3,void 0),$=m(e,"placement",3,"top"),w=m(e,"onVisibilityChange",3,kh.noop),x=5,k=Z(void 0),C=Z(void 0),E,A=Z(0),L=Z(0),I=Z(0),N=Z(0),W=Rt(),Q=be(),j=Q.ui.playerSize,re=Q.ui.overlayContainer$;He(()=>{vt(()=>{w()(l())})});let ce=Q.getLogger().createComponentLog("Tooltip component"),X=()=>{if(!n()||!r(C)||!r(k))return;D(L,x);let ye=n().getBoundingClientRect(),Ne=r(k).getBoundingClientRect(),je=Ne.width,et=r(C).clientWidth,ct=a().width,mt=(je-et)/2,Je=Ne.left+c()-ye.left,ut=Je+mt,$t=Ne.top+u()-ye.top,Ot=et/2-x,we=ut<8,Dt=ut+et>ct-8;we&&(ut=8,Ot=Je+Ne.width/2-2.5*x),Dt&&(ut=ct-8-et,Ot=Ne.left-ye.left+Ne.width/2-ut-x),D(I,le(ut)),D(N,$t),D(A,le(Ot))},ge=()=>{!n()||!r(C)||!r(k)||D(L,-x)},ee=()=>{if(!n()||!r(C)||!r(k))return;D(A,x);let ye=n().getBoundingClientRect(),Ne=r(k).getBoundingClientRect(),je=Ne.height,et=r(C).clientHeight,ct=(je-et)/2+et,mt=Ne.left+c()-ye.left-r(C).clientWidth,Je=2,ut=mt-x;ut<8&&(ut=8);let Ot=Ne.top+u()-ye.top+ct,we=Je-ct/2,Dt=Je-x;D(I,le(ut)),D(N,Ot),D(L,we),D(A,Dt)},Me=()=>{!n()||!r(C)||!r(k)||D(A,-x)},Pe=()=>{switch($()){case"top":X();break;case"bottom":ge();break;case"left":ee();break;default:Me()}},Ve=()=>{try{if(!n()||!r(k))return;Pe(),l(!0)}catch(ye){ce({message:String(ye)})}},fe=()=>{l(!1)},Oe=()=>{r(C)&&(E||(E=window.setTimeout(Ve,W.controls.hideTimeoutTooltips)),l()&&Ve())},ie=()=>{fe(),window.clearTimeout(E),E=void 0},R=(ye,Ne,je)=>{let et="";switch($()){case"top":et=`transform: translate(${ye}px, ${Ne}px);`;break;case"bottom":et=`transform: translate(${ye}px, ${Ne}px); top: auto; bottom: 100%;`;break;case"left":et=`transform: translate(${ye}px, ${Ne}px); left: 0; right: auto;`;break;default:et=`transform: translate(${ye}px, ${Ne}px);`}return et+=` max-width: ${p()===void 0?"auto":`${p()}px`};`,et+=` opacity: ${je?1:0}; visibility: ${je?"visible":"hidden"}`,et},Re=(ye,Ne)=>{let je="";switch($()){case"top":je=`transform: translate(${ye}px, ${Ne}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":je=`transform: translate(${ye}px, ${Ne}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":je=`transform: translate(${ye}px, ${Ne}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:je=`transform: translate(${ye}px, ${Ne}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return je},de=v(()=>R(r(I),r(N),l())),Ke=v(()=>Re(r(A),r(L)));Vt(Pe),dn(()=>window.clearTimeout(E));var oe=Xb(),U=se(oe);let Y;U.__mousemove=Oe,U.__mousedown=ie,U.__mouseup=Oe;var Ae=h(U);pe(Ae,()=>e.children??te),g(U),st(U,ye=>D(k,ye),()=>r(k));var We=P(U,2);{var Fe=ye=>{af(ye,{children:(Ne,je)=>{var et=Zb(),ct=h(et),mt=h(ct,!0);g(ct);var Je=P(ct,2);g(et),st(et,ut=>D(C,ut),()=>r(C)),S(()=>{tt(et,r(de)),ue(mt,d()),tt(Je,r(Ke))}),_(Ne,et)},$$slots:{default:!0}})};V(We,ye=>{d()&&!s()&&ye(Fe)})}S(ye=>Y=J(U,1,"tooltip-wrapper svelte-hxlyne",null,Y,ye),[()=>({"full-width":b()})]),_t("mouseenter",U,Oe),_t("mouseleave",U,ie),_(t,oe),F(),o()}ot(["mousemove","mousedown","mouseup"]);var Th=t=>{t.stopPropagation()},e$=M("<div><!></div>"),t$={hash:"svelte-p9r045",code:".btn-container.svelte-p9r045 {position:relative;display:flex;align-items:center;height:100%;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent;}.w-max.svelte-p9r045 {width:100%;min-width:0;}"};function fo(t,e){H(e,!0),z(t,t$);let[i,o]=Le(),n=()=>y(c,"$isGraphOpened$",i),a=()=>y(l,"$isMobile",i),s=be(),d=Qi(),l=s.ui.isMobile,c=d.graphIsOpened$,u=s.ui.t,b=m(e,"className",3,""),p=m(e,"disabled",3,!1),$=m(e,"hasTooltip",3,!0),w=m(e,"ref",15,void 0),x=m(e,"width",15,void 0),k=m(e,"isFullWidthTooltip",3,!0),C=m(e,"tooltipContent",3,""),E=m(e,"tooltipActive",3,!1),A=m(e,"tooltipPlacement",3,"top"),L=m(e,"disabledTooltipContent",19,()=>u("tooltip_button_disabled")),I=m(e,"isAriaHidden",3,!1),N=m(e,"onTooltipVisibilityChange",3,Oc.noop),W=m(e,"initialTranslateXPx",3,0),Q=m(e,"initialTranslateYPx",19,()=>-18),j=m(e,"mouseEnter",3,Oc.noop),re=m(e,"mouseLeave",3,Oc.noop),ce=v(()=>p()?n()?u("tooltip_disabled_when_graph_on"):L():C());var X=e$();X.__pointerdown=[Th],X.__click=[Th];var ge=h(X);{var ee=Pe=>{Xa(Pe,{get content(){return r(ce)},get translateX(){return W()},get translateY(){return Q()},get isFullWidthWrapper(){return k()},get active(){return E()},get placement(){return A()},get onVisibilityChange(){return N()},children:(Ve,fe)=>{var Oe=Be(),ie=se(Oe);pe(ie,()=>e.children??te),_(Ve,Oe)},$$slots:{default:!0}})},Me=Pe=>{var Ve=Be(),fe=se(Ve);pe(fe,()=>e.children??te),_(Pe,Ve)};V(ge,Pe=>{$()&&r(ce)&&!a()?Pe(ee):Pe(Me,!1)})}g(X),st(X,Pe=>w(Pe),()=>w()),S(()=>{J(X,1,`btn-container ${b()??""}`,"svelte-p9r045"),De(X,"aria-hidden",I()||null)}),_t("mouseenter",X,function(...Pe){j()?.apply(this,Pe)}),_t("mouseleave",X,function(...Pe){re()?.apply(this,Pe)}),Ar(X,"clientWidth",x),_(t,X),F(),o()}ot(["pointerdown","click"]);var i$=ve('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><rect width="20" height="20" rx="10" fill="var(--btn-color, #fff)"></rect><path d="M12.5259 8.68864L12.587 8.87536L12.3702 8.23648C12.236 7.84095 11.8295 7.60563 11.4192 7.68593C10.9471 7.77831 10.6508 8.24892 10.7718 8.71381L10.8968 9.19361L10.6671 8.33855C10.5566 7.92714 10.1475 7.67011 9.72832 7.74872C9.32282 7.82476 9.04808 8.18606 9.06319 8.57993L8.34064 5.64592C8.21338 5.12912 7.64646 4.85578 7.1621 5.07767C6.79216 5.24715 6.59467 5.65495 6.69131 6.0498L7.98547 11.3373L6.87 10.178C6.52545 9.81987 5.94024 9.86103 5.64933 10.2638C5.44455 10.5474 5.44907 10.9312 5.66048 11.2098L7.89246 14.1518C7.89246 14.1518 9.12075 15.9833 12.1932 15.3769C14.6243 14.8972 15.4434 12.7097 14.7748 10.4997L14.2213 8.20869C14.0975 7.69621 13.5537 7.40646 13.0585 7.58916C12.614 7.75319 12.3788 8.23875 12.5259 8.68864Z"></path></svg>');function od(t,e){"use strict";var i=i$(),o=h(i),n=P(o);g(i),S(()=>{De(i,"data-testid",(e.completed,"interactive-episode-completed-icon")),De(o,"fill-opacity",e.completed?1:.24),De(n,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),_(t,i)}var o$=M("<div><!></div>"),n$={hash:"svelte-bklhpe",code:".interactive-episode-icon.svelte-bklhpe {width:20px;height:20px;position:absolute;transform:translateX(-50%);cursor:default;}.interactive-episode-icon.disabled.svelte-bklhpe {pointer-events:none;opacity:0.4;}"};function sf(t,e){H(e,!0),z(t,n$);let o=be().ui.t,n=Z(0),a=v(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));fo(t,{get tooltipContent(){return r(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return r(n)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(s,d)=>{var l=o$();let c;var u=h(l);let b=v(()=>!!e.videoEpisode.completed);od(u,{get completed(){return r(b)}}),g(l),S(p=>{c=J(l,1,"interactive-episode-icon svelte-bklhpe",null,c,p),tt(l,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Ar(l,"clientWidth",p=>D(n,p)),_(s,l)},$$slots:{default:!0}}),F()}var r$=M('<div><div class="video-episode-inner svelte-1u6kv8l"><div class="video-episode-loaded svelte-1u6kv8l"></div> <div></div></div></div>'),a$=M('<div class="video-episodes-wrap svelte-1u6kv8l"></div>'),s$={hash:"svelte-1u6kv8l",code:`.video-episodes-wrap.svelte-1u6kv8l {position:absolute;width:100%;height:100%;}.video-episode.svelte-1u6kv8l {position:absolute;height:calc(3 * var(--slider-height));box-sizing:border-box;margin-top:calc(-1 * var(--slider-height));padding:var(--slider-height) var(--slider-video-episode-gap);transition:transform 0.2s;}.video-episode.svelte-1u6kv8l:not(.disabled):where(:hover, :active) {transform:scaleY(1.5);}.video-episode-inner.svelte-1u6kv8l,
169
+ .icon[data-value='min'].svelte-1n5yyua .wave2:where(.svelte-1n5yyua) {visibility:hidden;}`};function pa(t,e){z(t,jb);let i=m(e,"volume",3,1),o=m(e,"muted",3,!1),n=(d,l)=>l?"off":d>.5?"max":d>.2?"mid":d>0?"min":"off",a=v(()=>n(i(),o()));var s=Gb();S(()=>{Ve(s,"data-value",r(a)),Ve(s,"data-testid",`volume-${r(a)??""}-icon`)}),_(t,s)}var mo=require("@vkontakte/videoplayer-shared");var Oc=require("@vkontakte/videoplayer-shared");var kh=require("@vkontakte/videoplayer-shared");var Yb=M('<div class="overlay"><!></div>');function af(t,e){H(e,!0);let[i,o]=Le(),n=()=>y(s,"$overlayContainer$",i),s=be().ui.overlayContainer$,d=Z(void 0),l=p=>{!p||!r(d)||!p.contains(r(d))||p.removeChild(r(d))},c=p=>{!p||!r(d)||p.contains(r(d))||p.appendChild(r(d))};He(()=>{c(n())}),Vt(()=>(c(n()),()=>l(n())));var u=Yb(),b=h(u);pe(b,()=>e.children??te),g(u),st(u,p=>D(d,p),()=>r(d)),_(t,u),F(),o()}var Zb=M('<div class="tooltip svelte-hxlyne"><div class="content svelte-hxlyne"> </div> <div class="tooltip-pointer svelte-hxlyne"></div></div>'),Xb=M("<div><!></div> <!>",1),Jb={hash:"svelte-hxlyne",code:'.tooltip-wrapper.svelte-hxlyne {display:flex;flex-direction:column;min-width:0;}.full-width.svelte-hxlyne {width:100%;}.tooltip.svelte-hxlyne {position:absolute;opacity:0;visibility:hidden;transition:opacity 200ms, visibility 200ms;bottom:100%;left:0;}.content.svelte-hxlyne {display:inline-block;padding:6px 10px;border-radius:3px;color:var(--white);background-color:rgba(41, 41, 41, .8);}.tooltip-pointer.svelte-hxlyne {position:absolute;bottom:0;width:0;border-top:5px solid rgba(41, 41, 41, .8);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0;}'};function Xa(t,e){H(e,!0),z(t,Jb);let[i,o]=Le(),n=()=>y(re,"$overlayContainer$",i),a=()=>y(j,"$containerSize",i),s=m(e,"isMobile",3,!1),d=m(e,"content",3,""),l=m(e,"active",15,!1),c=m(e,"translateX",3,0),u=m(e,"translateY",3,0),b=m(e,"isFullWidthWrapper",3,!1),p=m(e,"maxTooltipWidth",3,void 0),$=m(e,"placement",3,"top"),w=m(e,"onVisibilityChange",3,kh.noop),x=5,k=Z(void 0),C=Z(void 0),E,A=Z(0),L=Z(0),I=Z(0),N=Z(0),W=Rt(),Q=be(),j=Q.ui.playerSize,re=Q.ui.overlayContainer$;He(()=>{vt(()=>{w()(l())})});let ce=Q.getLogger().createComponentLog("Tooltip component"),X=()=>{if(!n()||!r(C)||!r(k))return;D(L,x);let ye=n().getBoundingClientRect(),De=r(k).getBoundingClientRect(),je=De.width,et=r(C).clientWidth,ct=a().width,mt=(je-et)/2,Je=De.left+c()-ye.left,ut=Je+mt,$t=De.top+u()-ye.top,Ot=et/2-x,we=ut<8,Dt=ut+et>ct-8;we&&(ut=8,Ot=Je+De.width/2-2.5*x),Dt&&(ut=ct-8-et,Ot=De.left-ye.left+De.width/2-ut-x),D(I,le(ut)),D(N,$t),D(A,le(Ot))},ge=()=>{!n()||!r(C)||!r(k)||D(L,-x)},ee=()=>{if(!n()||!r(C)||!r(k))return;D(A,x);let ye=n().getBoundingClientRect(),De=r(k).getBoundingClientRect(),je=De.height,et=r(C).clientHeight,ct=(je-et)/2+et,mt=De.left+c()-ye.left-r(C).clientWidth,Je=2,ut=mt-x;ut<8&&(ut=8);let Ot=De.top+u()-ye.top+ct,we=Je-ct/2,Dt=Je-x;D(I,le(ut)),D(N,Ot),D(L,we),D(A,Dt)},Me=()=>{!n()||!r(C)||!r(k)||D(A,-x)},Pe=()=>{switch($()){case"top":X();break;case"bottom":ge();break;case"left":ee();break;default:Me()}},Re=()=>{try{if(!n()||!r(k))return;Pe(),l(!0)}catch(ye){ce({message:String(ye)})}},fe=()=>{l(!1)},Oe=()=>{r(C)&&(E||(E=window.setTimeout(Re,W.controls.hideTimeoutTooltips)),l()&&Re())},ie=()=>{fe(),window.clearTimeout(E),E=void 0},R=(ye,De,je)=>{let et="";switch($()){case"top":et=`transform: translate(${ye}px, ${De}px);`;break;case"bottom":et=`transform: translate(${ye}px, ${De}px); top: auto; bottom: 100%;`;break;case"left":et=`transform: translate(${ye}px, ${De}px); left: 0; right: auto;`;break;default:et=`transform: translate(${ye}px, ${De}px);`}return et+=` max-width: ${p()===void 0?"auto":`${p()}px`};`,et+=` opacity: ${je?1:0}; visibility: ${je?"visible":"hidden"}`,et},Ne=(ye,De)=>{let je="";switch($()){case"top":je=`transform: translate(${ye}px, ${De}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":je=`transform: translate(${ye}px, ${De}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":je=`transform: translate(${ye}px, ${De}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:je=`transform: translate(${ye}px, ${De}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return je},de=v(()=>R(r(I),r(N),l())),Ke=v(()=>Ne(r(A),r(L)));Vt(Pe),dn(()=>window.clearTimeout(E));var oe=Xb(),U=se(oe);let Y;U.__mousemove=Oe,U.__mousedown=ie,U.__mouseup=Oe;var Ae=h(U);pe(Ae,()=>e.children??te),g(U),st(U,ye=>D(k,ye),()=>r(k));var We=P(U,2);{var Fe=ye=>{af(ye,{children:(De,je)=>{var et=Zb(),ct=h(et),mt=h(ct,!0);g(ct);var Je=P(ct,2);g(et),st(et,ut=>D(C,ut),()=>r(C)),S(()=>{tt(et,r(de)),ue(mt,d()),tt(Je,r(Ke))}),_(De,et)},$$slots:{default:!0}})};V(We,ye=>{d()&&!s()&&ye(Fe)})}S(ye=>Y=J(U,1,"tooltip-wrapper svelte-hxlyne",null,Y,ye),[()=>({"full-width":b()})]),_t("mouseenter",U,Oe),_t("mouseleave",U,ie),_(t,oe),F(),o()}ot(["mousemove","mousedown","mouseup"]);var Th=t=>{t.stopPropagation()},e$=M("<div><!></div>"),t$={hash:"svelte-p9r045",code:".btn-container.svelte-p9r045 {position:relative;display:flex;align-items:center;height:100%;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent;}.w-max.svelte-p9r045 {width:100%;min-width:0;}"};function fo(t,e){H(e,!0),z(t,t$);let[i,o]=Le(),n=()=>y(c,"$isGraphOpened$",i),a=()=>y(l,"$isMobile",i),s=be(),d=Qi(),l=s.ui.isMobile,c=d.graphIsOpened$,u=s.ui.t,b=m(e,"className",3,""),p=m(e,"disabled",3,!1),$=m(e,"hasTooltip",3,!0),w=m(e,"ref",15,void 0),x=m(e,"width",15,void 0),k=m(e,"isFullWidthTooltip",3,!0),C=m(e,"tooltipContent",3,""),E=m(e,"tooltipActive",3,!1),A=m(e,"tooltipPlacement",3,"top"),L=m(e,"disabledTooltipContent",19,()=>u("tooltip_button_disabled")),I=m(e,"isAriaHidden",3,!1),N=m(e,"onTooltipVisibilityChange",3,Oc.noop),W=m(e,"initialTranslateXPx",3,0),Q=m(e,"initialTranslateYPx",19,()=>-18),j=m(e,"mouseEnter",3,Oc.noop),re=m(e,"mouseLeave",3,Oc.noop),ce=v(()=>p()?n()?u("tooltip_disabled_when_graph_on"):L():C());var X=e$();X.__pointerdown=[Th],X.__click=[Th];var ge=h(X);{var ee=Pe=>{Xa(Pe,{get content(){return r(ce)},get translateX(){return W()},get translateY(){return Q()},get isFullWidthWrapper(){return k()},get active(){return E()},get placement(){return A()},get onVisibilityChange(){return N()},children:(Re,fe)=>{var Oe=Be(),ie=se(Oe);pe(ie,()=>e.children??te),_(Re,Oe)},$$slots:{default:!0}})},Me=Pe=>{var Re=Be(),fe=se(Re);pe(fe,()=>e.children??te),_(Pe,Re)};V(ge,Pe=>{$()&&r(ce)&&!a()?Pe(ee):Pe(Me,!1)})}g(X),st(X,Pe=>w(Pe),()=>w()),S(()=>{J(X,1,`btn-container ${b()??""}`,"svelte-p9r045"),Ve(X,"aria-hidden",I()||null)}),_t("mouseenter",X,function(...Pe){j()?.apply(this,Pe)}),_t("mouseleave",X,function(...Pe){re()?.apply(this,Pe)}),Ar(X,"clientWidth",x),_(t,X),F(),o()}ot(["pointerdown","click"]);var i$=ve('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><rect width="20" height="20" rx="10" fill="var(--btn-color, #fff)"></rect><path d="M12.5259 8.68864L12.587 8.87536L12.3702 8.23648C12.236 7.84095 11.8295 7.60563 11.4192 7.68593C10.9471 7.77831 10.6508 8.24892 10.7718 8.71381L10.8968 9.19361L10.6671 8.33855C10.5566 7.92714 10.1475 7.67011 9.72832 7.74872C9.32282 7.82476 9.04808 8.18606 9.06319 8.57993L8.34064 5.64592C8.21338 5.12912 7.64646 4.85578 7.1621 5.07767C6.79216 5.24715 6.59467 5.65495 6.69131 6.0498L7.98547 11.3373L6.87 10.178C6.52545 9.81987 5.94024 9.86103 5.64933 10.2638C5.44455 10.5474 5.44907 10.9312 5.66048 11.2098L7.89246 14.1518C7.89246 14.1518 9.12075 15.9833 12.1932 15.3769C14.6243 14.8972 15.4434 12.7097 14.7748 10.4997L14.2213 8.20869C14.0975 7.69621 13.5537 7.40646 13.0585 7.58916C12.614 7.75319 12.3788 8.23875 12.5259 8.68864Z"></path></svg>');function od(t,e){"use strict";var i=i$(),o=h(i),n=P(o);g(i),S(()=>{Ve(i,"data-testid",(e.completed,"interactive-episode-completed-icon")),Ve(o,"fill-opacity",e.completed?1:.24),Ve(n,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),_(t,i)}var o$=M("<div><!></div>"),n$={hash:"svelte-bklhpe",code:".interactive-episode-icon.svelte-bklhpe {width:20px;height:20px;position:absolute;transform:translateX(-50%);cursor:default;}.interactive-episode-icon.disabled.svelte-bklhpe {pointer-events:none;opacity:0.4;}"};function sf(t,e){H(e,!0),z(t,n$);let o=be().ui.t,n=Z(0),a=v(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));fo(t,{get tooltipContent(){return r(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return r(n)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(s,d)=>{var l=o$();let c;var u=h(l);let b=v(()=>!!e.videoEpisode.completed);od(u,{get completed(){return r(b)}}),g(l),S(p=>{c=J(l,1,"interactive-episode-icon svelte-bklhpe",null,c,p),tt(l,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Ar(l,"clientWidth",p=>D(n,p)),_(s,l)},$$slots:{default:!0}}),F()}var r$=M('<div><div class="video-episode-inner svelte-1u6kv8l"><div class="video-episode-loaded svelte-1u6kv8l"></div> <div></div></div></div>'),a$=M('<div class="video-episodes-wrap svelte-1u6kv8l"></div>'),s$={hash:"svelte-1u6kv8l",code:`.video-episodes-wrap.svelte-1u6kv8l {position:absolute;width:100%;height:100%;}.video-episode.svelte-1u6kv8l {position:absolute;height:calc(3 * var(--slider-height));box-sizing:border-box;margin-top:calc(-1 * var(--slider-height));padding:var(--slider-height) var(--slider-video-episode-gap);transition:transform 0.2s;}.video-episode.svelte-1u6kv8l:not(.disabled):where(:hover, :active) {transform:scaleY(1.5);}.video-episode-inner.svelte-1u6kv8l,
170
170
  .video-episode-loaded.svelte-1u6kv8l,
171
171
  .video-episode-filled.svelte-1u6kv8l {position:absolute;height:var(--slider-height);border-radius:var(--slider-radius);}.video-episode-inner.svelte-1u6kv8l {position:absolute;overflow:hidden;width:calc(100% - 2 * var(--slider-video-episode-gap));background:var(--slider-bg);}.video-episode-loaded.svelte-1u6kv8l {position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--slider-radius);background:var(--slider-loaded-bg);transition:transform 0.2s;}.video-episode-filled.svelte-1u6kv8l {position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--slider-radius);background-color:var(--slider-filled-bg);}`};function lf(t,e){z(t,s$);let i=m(e,"videoEpisodes",19,()=>[]);var o=a$();ui(o,21,i,n=>n.from,(n,a)=>{var s=r$();let d;var l=h(s),c=h(l),u=P(c,2);let b;g(l),g(s),S((p,$)=>{d=J(s,1,"video-episode svelte-1u6kv8l",null,d,p),tt(s,`left: ${r(a).from}%; width: ${r(a).width}%`),tt(c,`transform: translateX(${r(a).loadedWidth/r(a).width*100}%)`),b=J(u,1,"video-episode-filled svelte-1u6kv8l",null,b,$),tt(u,`transform: translateX(${r(a).filledWidth/r(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),_(n,s)}),g(o),_(t,o)}function l$(t,e,i,o,n,a,s){if(t.preventDefault(),e()&&D(i,le(e().getBoundingClientRect())),o()||r(n)||!e())return;D(n,!0);let d=a(t.clientX,t.clientY);s()(d),e().setPointerCapture(t.pointerId)}function d$(t,e,i,o,n,a,s,d){if(t.preventDefault(),e())return;let l=i(t.clientX,t.clientY),c=o(t.clientX);n()(l,c,r(a).width),r(s)&&d()(l)}function c$(t,e,i,o,n){if(t.preventDefault(),e()||!r(i))return;D(i,!1);let a=o(t.clientX,t.clientY);n()(a)}function u$(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}var p$=M("<div></div>"),f$=M('<div class="bars svelte-1tpemng"><div class="loaded svelte-1tpemng"></div> <div></div></div>'),m$=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),v$={hash:"svelte-1tpemng",code:`.interactive-icons.svelte-1tpemng {position:absolute;width:calc(100% - 20px);top:-28px;}.interactive-icons.mobile.svelte-1tpemng {top:-10px;}.slider.svelte-1tpemng {position:relative;height:var(--slider-height);border-radius:var(--slider-radius);cursor:pointer;transition:visibility 0.2s, opacity 0.2s;will-change:opacity, transform;width:100%;touch-action:none;-webkit-tap-highlight-color:transparent;}.no-handle.svelte-1tpemng {cursor:default;}.slider.svelte-1tpemng:before {
172
172
  /* hit area */content:'';position:absolute;left:0;right:0;top:calc(-1 * (var(--controls-height) / 2 - var(--slider-height)) / 2);height:calc(var(--controls-height) / 2);}.bars.svelte-1tpemng {position:absolute;width:100%;height:100%;border-radius:var(--slider-radius);overflow:hidden;background:var(--slider-bg);}.loaded.svelte-1tpemng {position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--slider-radius);background:var(--slider-loaded-bg);transition:transform 0.2s;will-change:transform;}.filled.svelte-1tpemng {position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--slider-radius);background-color:var(--slider-filled-bg);}.slider.square.svelte-1tpemng,
173
173
  .slider.square.svelte-1tpemng > .bars:where(.svelte-1tpemng),
174
174
  .slider.square.svelte-1tpemng .loaded:where(.svelte-1tpemng),
175
175
  .slider.square.svelte-1tpemng .filled:where(.svelte-1tpemng) {border-radius:unset;}.filled.active-live.svelte-1tpemng {background-color:var(--timeline-slider-filled-active-live-bg);}.filled.ads.svelte-1tpemng {background-color:var(--slider-filled-ads);}.handleWrap.svelte-1tpemng {position:absolute;left:-100%;width:100%;}.handle.svelte-1tpemng {position:absolute;width:var(--slider-handle-size);height:var(--slider-handle-size);right:calc(-1 * var(--slider-handle-size) / 2);top:calc((var(--slider-height) - var(--slider-handle-size)) / 2);border-radius:50%;background-color:var(--slider-handle-bg);visibility:hidden;opacity:0;transform:scale(0);transition:opacity 0.2s, transform 0.2s, visibility 0.2s;will-change:opacity, transform;}.handle.active-live.svelte-1tpemng {background-color:var(--timeline-slider-handle-active-live-bg);}.slider.svelte-1tpemng:hover .handle:where(.svelte-1tpemng),
176
- .slider-dragging.svelte-1tpemng .handle:where(.svelte-1tpemng) {visibility:visible;opacity:1;transform:scale(1);}.slider-dragging.svelte-1tpemng .handle:where(.svelte-1tpemng) {transform:scale(1.3);}.slider-vertical.svelte-1tpemng {position:absolute;left:-8px;top:-18px;transform-origin:0 0;transform:rotate(-90deg);}.slider.disabled.svelte-1tpemng {cursor:default;opacity:0.4;}`};function Ja(t,e){H(e,!0),z(t,v$);let i=m(e,"ref",15,void 0),o=m(e,"className",3,""),n=m(e,"testId",3,void 0),a=m(e,"isHidden",3,!1),s=m(e,"isVertical",3,!1),d=m(e,"isActiveLive",3,!1),l=m(e,"isMobile",3,!1),c=m(e,"squareBorders",3,!1),u=m(e,"videoEpisodes",19,()=>[]),b=m(e,"withWheelHandler",3,!1),p=m(e,"isInteractive",3,!1),$=m(e,"disabled",3,!1),w=m(e,"hideHandel",3,!1),x=m(e,"onPointerDown",3,mo.noop),k=m(e,"onHandleMove",3,mo.noop),C=m(e,"onPointerUp",3,mo.noop),E=m(e,"onPointerEnter",3,mo.noop),A=m(e,"onPointerMove",3,mo.noop),L=m(e,"onPointerLeave",3,mo.noop),I=m(e,"onMouseEnter",3,mo.noop),N=m(e,"onMouseLeave",3,mo.noop),W=m(e,"onWheelUp",3,mo.noop),Q=m(e,"onWheelDown",3,mo.noop),j=m(e,"onWheelLeft",3,mo.noop),re=m(e,"onWheelRight",3,mo.noop),ce=m(e,"onDisabledClick",3,mo.noop),X=m(e,"loadedProgress",3,0),ge=m(e,"filledProgress",3,0),ee=m(e,"handleProgress",3,0),Me=m(e,"ariaLabel",3,""),Pe=m(e,"ariaValueMin",3,void 0),Ve=m(e,"ariaValueMax",3,void 0),fe=m(e,"ariaValueNow",3,void 0),Oe=m(e,"ariaValueText",3,""),ie=Rt(),R=Z(void 0),Re=Z(!1),de=v(()=>Ve()??0),Ke=v(()=>(0,mo.isNonNullable)(u())&&u()[u().length-1]?.time<r(de)),oe=v(()=>(0,mo.isNonNullable)(u())&&u().length&&r(Ke)&&r(de)?je(X()*100,ge()*100):[]);function U(ae){if(ae.preventDefault(),i()&&D(R,le(i().getBoundingClientRect())),$())return;let qe=ye(ae.clientX,ae.clientY),Xe=Ne(ae.clientX);E()(qe,Xe,r(R).width)}function Y(ae){ae.preventDefault(),!$()&&L()()}function Ae(){I()()}function We(){N()()}function Fe(ae){$()||b()&&(ae.preventDefault(),ae.deltaY<0?W()():ae.deltaY>0?Q()():ae.deltaX>0?re()():j()())}function ye(ae,qe){return s()?Math.max(0,Math.min(1,(r(R).height-(qe-r(R).top))/r(R).height)):Math.min(Math.max(ae-r(R).x,0),r(R).width)/r(R).width}function Ne(ae){return Math.min(Math.max(ae-r(R).x,0),r(R).width)}function je(ae,qe){let Xe=ie.features.episodesClustering&&!p()?ie.episodeMinWidthPc:0,Ue=[],Se=u()[0].time/r(de)*100,Ye=0,Ee=0;for(let St=1;St<u().length;St++)Ye=u()[St].time/r(de)*100,Ye-Se>Xe&&(Ue.push({from:Se,width:Math.max(0,Ye-Se),loadedWidth:Math.max(0,Math.min(Ye,ae)-Se),filledWidth:Math.max(0,Math.min(Ye,qe)-Se),interactive:u()[St-1].interactive,completed:u()[St-1].completed}),Se=u()[St].time/r(de)*100,Ee++);let lt={from:Se,width:Math.max(0,100-Se),loadedWidth:Math.max(0,Math.min(ae,100)-Se),filledWidth:Math.max(0,Math.min(qe,100)-Se),interactive:u()[Ee].interactive,completed:u()[Ee].completed};100-Se<Xe?(Ee-=1,Ue[Ee].width+=100-Se,Ue[Ee].loadedWidth+=Math.max(0,Math.min(ae,100)-Se),Ue[Ee].filledWidth+=Math.max(0,Math.min(qe,100)-Se)):Ue[Ee]=lt;let gt=u()[0].time;if(gt!==0){let St=gt/r(de)*100;Ue.unshift({from:0,width:St,loadedWidth:Math.min(St,ae),filledWidth:Math.min(St,qe)})}return Ue}var et=m$(),ct=se(et);{var mt=ae=>{var qe=p$();let Xe;ui(qe,21,()=>r(oe),Ue=>Ue.from,(Ue,Se)=>{var Ye=Be(),Ee=se(Ye);{var lt=gt=>{sf(gt,{get videoEpisode(){return r(Se)},get disabled(){return $()}})};V(Ee,gt=>{r(Se).interactive&&gt(lt)})}_(Ue,Ye)}),g(qe),S(Ue=>Xe=J(qe,1,"interactive-icons svelte-1tpemng",null,Xe,Ue),[()=>({mobile:l(),hidden:l()&&!r(Re)})]),_(ae,qe)};V(ct,ae=>{p()&&ae(mt)})}var Je=P(ct,2);let ut;Je.__pointerdown=[l$,i,R,$,Re,ye,x],Je.__pointermove=[d$,$,ye,Ne,A,R,Re,k],Je.__pointerup=[c$,$,Re,ye,C],Je.__click=[u$,$,ce,ye];var $t=h(Je);{var Ot=ae=>{lf(ae,{get videoEpisodes(){return r(oe)},get disabled(){return $()},get isMobile(){return l()}})},we=ae=>{var qe=f$(),Xe=h(qe),Ue=P(Xe,2);let Se;g(qe),S(Ye=>{tt(Xe,`transform: translateX(${X()*100}%);`),Se=J(Ue,1,"filled svelte-1tpemng",null,Se,Ye),tt(Ue,`transform: translateX(${ge()*100}%);`)},[()=>({"active-live":d()})]),_(ae,qe)};V($t,ae=>{r(oe).length?ae(Ot):ae(we,!1)})}var Dt=P($t,2);let ft;var K=h(Dt);let he;g(Dt),g(Je),st(Je,ae=>i(ae),()=>i()),S((ae,qe,Xe)=>{ut=J(Je,1,`slider ${o()??""}`,"svelte-1tpemng",ut,ae),De(Je,"aria-label",Me()),De(Je,"aria-valuemin",Pe()),De(Je,"aria-valuemax",Ve()),De(Je,"aria-valuenow",fe()),De(Je,"aria-valuetext",Oe()),De(Je,"data-testid",n()??null),ft=J(Dt,1,"handleWrap svelte-1tpemng",null,ft,qe),tt(Dt,`transform: translateX(${ee()*100}%);`),he=J(K,1,"handle svelte-1tpemng",null,he,Xe)},[()=>({disabled:$(),"slider-dragging":r(Re),hidden:a(),"slider-vertical":s(),"no-handle":w(),square:c()}),()=>({hidden:w()}),()=>({"active-live":d()})]),_t("pointerenter",Je,U),_t("pointerleave",Je,Y),_t("mouseenter",Je,Ae),_t("mouseleave",Je,We),_t("wheel",Je,Fe),_(t,et),F()}ot(["pointerdown","pointermove","pointerup","click"]);var Ai=(t,e)=>Oa[t]>=Oa[e],Ih=(t,e)=>Oa[t]<Oa[e],fa=(t,e)=>Oa[t]<=Oa[e],Eh=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var g$=M("<div><!></div>"),h$=M("<div><!> <!></div>"),_$={hash:"svelte-1auih1j",code:".volumeBar-container.svelte-1auih1j {display:flex;align-items:center;}.volumeBar-container.vertical.svelte-1auih1j, .vertical.svelte-1auih1j .tooltip-wrapper, .vertical.svelte-1auih1j .btn {width:40px;}.volumeBar.svelte-1auih1j {display:flex;align-items:center;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.svelte-1auih1j {padding:0 8px 0 0;width:0;}"};function df(t,e){H(e,!0),z(t,_$);let[i,o]=Le(),n=()=>y(E,"$isAudioAvailable$",i),a=()=>y(b,"$muted$",i),s=()=>y(u,"$volume$",i),d=()=>y(x,"$currentGridType$",i),l=be(),c=Rt(),u=l.state.volume$,b=l.state.muted$,{setVolume:p,startVolumeChanging:$,stopVolumeChanging:w}=l.actions.internal,x=l.ui.currentGridType$,k=l.callbacks?.onAudioDoesNotExistHint,C=l.callbacks?.onAudioDisabledHint,E=l.state.isAudioAvailable$,A=l.state.isAudioDisabled,L=l.ui.t,I=Z(!1),N,W=v(()=>!n()||a()||s()===0),Q=v(()=>fa(d(),"s")),j=v(()=>r(Q)?"":r(W)?!n()||A?L("tooltip_sound_unavailable"):L("tooltip_volume"):L("tooltip_volume_muted")),re=v(()=>r(W)?L("tooltip_volume"):L("tooltip_volume_muted")),ce=v(()=>r(W)?0:s()),X=!1,ge=v(()=>n()?A&&!C:!k);function ee(Fe){$(),p(Fe)}function Me(){Nc(l,s(),c.controls.volumeStepWheel)}function Pe(){Dc(l,s(),c.controls.volumeStepWheel)}function Ve(Fe){p(Fe)}function fe(Fe){p(Fe),w()}function Oe(){X=!0}function ie(){X=!1,de()}function R(){clearTimeout(N),D(I,!0)}function Re(){de()}function de(){N=window.setTimeout(()=>{X||D(I,!1)},c.controls.volumeBarTimeout)}function Ke(Fe){Fe.preventDefault(),Fe.deltaY<0?Me():Fe.deltaY>0&&Pe()}var oe=h$();let U;var Y=h(oe);Xa(Y,{get content(){return r(j)},translateY:-18,children:(Fe,ye)=>{let Ne=v(()=>r(Q)?"btn-volume-vertical":"btn-volume-horizontal");At(Fe,{className:"btn-full-opacity",get disabled(){return r(ge)},get testId(){return r(Ne)},get ariaLabel(){return r(re)},get click(){return e.click},get ariaKeyShortCut(){return Mr.KeyM},children:(je,et)=>{pa(je,{get volume(){return s()},get muted(){return r(W)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Ae=P(Y,2);{var We=Fe=>{var ye=g$();let Ne;var je=h(ye);let et=v(()=>r(Q)?"volumeBar-slider-vertical":""),ct=v(()=>r(Q)&&!r(I)),mt=v(()=>r(Q)?Oe:nd.noop),Je=v(()=>r(Q)?ie:nd.noop),ut=v(()=>Math.round(r(ce)*100)),$t=v(()=>`${Math.round(r(ce)*100)}%`),Ot=v(()=>r(Q)?"volume-slider-vertical":"volume-slider");Ja(je,{get className(){return r(et)},get isHidden(){return r(ct)},get isVertical(){return r(Q)},withWheelHandler:!0,onWheelUp:Me,onWheelDown:Pe,onPointerDown:ee,onHandleMove:Ve,onPointerUp:fe,get onPointerEnter(){return r(mt)},get onPointerLeave(){return r(Je)},ariaLabel:"\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A \u0433\u0440\u043E\u043C\u043A\u043E\u0441\u0442\u0438",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return r(ut)},get ariaValueText(){return r($t)},get filledProgress(){return r(ce)},get handleProgress(){return r(ce)},get testId(){return r(Ot)}}),g(ye),S(we=>Ne=J(ye,1,"volumeBar svelte-1auih1j",null,Ne,we),[()=>({"volumeBar-vertical":r(Q)})]),_(Fe,ye)};V(Ae,Fe=>{n()&&Fe(We)})}g(oe),S(Fe=>U=J(oe,1,"volumeBar-container svelte-1auih1j",null,U,Fe),[()=>({vertical:r(Q)})]),_t("mouseenter",oe,function(...Fe){(r(Q)?R:nd.noop)?.apply(this,Fe)}),_t("mouseleave",oe,function(...Fe){(r(Q)?Re:nd.noop)?.apply(this,Fe)}),_t("wheel",oe,Ke),_(t,oe),F(),o()}var Ph=require("@vkontakte/videoplayer-shared");var b$=ve('<svg><!><g fill-rule="evenodd"><path d="M4.58 13.979a.99.99 0 0 1 .99-.99h4.451a.99.99 0 0 1 .99.99v4.452a.99.99 0 0 1-1.98 0v-2.05l-3.319 3.322a1 1 0 0 1-1.414 0v-.001a1 1 0 0 1 0-1.414l3.32-3.32H5.57a.99.99 0 0 1-.99-.99m10.388-6.36 3.32-3.322a1 1 0 0 1 1.414 0v.001a1 1 0 0 1 0 1.414l-3.32 3.32h2.049a.99.99 0 0 1 0 1.979h-4.442a1 1 0 0 1-1-1V5.569a.99.99 0 1 1 1.98 0z" class="_exit"></path><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.072l3.363-3.365a1 1 0 0 1 1.414 0l.016.016a1 1 0 0 1 0 1.414L7.429 18H9.5a1 1 0 0 1 1 1M18 7.429l-3.363 3.364a1 1 0 0 1-1.414 0l-.016-.016a1 1 0 0 1 0-1.414L16.571 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z" class="_enter"></path></g></svg>');function cf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=b$();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"var(--btn-color, #fff)","aria-hidden":"true",role:"img",...i})),_(t,o)}var $$={hash:"svelte-17t966y",code:`svg[data-testid="close-fullscreen-icon"] ._enter,
176
+ .slider-dragging.svelte-1tpemng .handle:where(.svelte-1tpemng) {visibility:visible;opacity:1;transform:scale(1);}.slider-dragging.svelte-1tpemng .handle:where(.svelte-1tpemng) {transform:scale(1.3);}.slider-vertical.svelte-1tpemng {position:absolute;left:-8px;top:-18px;transform-origin:0 0;transform:rotate(-90deg);}.slider.disabled.svelte-1tpemng {cursor:default;opacity:0.4;}`};function Ja(t,e){H(e,!0),z(t,v$);let i=m(e,"ref",15,void 0),o=m(e,"className",3,""),n=m(e,"testId",3,void 0),a=m(e,"isHidden",3,!1),s=m(e,"isVertical",3,!1),d=m(e,"isActiveLive",3,!1),l=m(e,"isMobile",3,!1),c=m(e,"squareBorders",3,!1),u=m(e,"videoEpisodes",19,()=>[]),b=m(e,"withWheelHandler",3,!1),p=m(e,"isInteractive",3,!1),$=m(e,"disabled",3,!1),w=m(e,"hideHandel",3,!1),x=m(e,"onPointerDown",3,mo.noop),k=m(e,"onHandleMove",3,mo.noop),C=m(e,"onPointerUp",3,mo.noop),E=m(e,"onPointerEnter",3,mo.noop),A=m(e,"onPointerMove",3,mo.noop),L=m(e,"onPointerLeave",3,mo.noop),I=m(e,"onMouseEnter",3,mo.noop),N=m(e,"onMouseLeave",3,mo.noop),W=m(e,"onWheelUp",3,mo.noop),Q=m(e,"onWheelDown",3,mo.noop),j=m(e,"onWheelLeft",3,mo.noop),re=m(e,"onWheelRight",3,mo.noop),ce=m(e,"onDisabledClick",3,mo.noop),X=m(e,"loadedProgress",3,0),ge=m(e,"filledProgress",3,0),ee=m(e,"handleProgress",3,0),Me=m(e,"ariaLabel",3,""),Pe=m(e,"ariaValueMin",3,void 0),Re=m(e,"ariaValueMax",3,void 0),fe=m(e,"ariaValueNow",3,void 0),Oe=m(e,"ariaValueText",3,""),ie=Rt(),R=Z(void 0),Ne=Z(!1),de=v(()=>Re()??0),Ke=v(()=>(0,mo.isNonNullable)(u())&&u()[u().length-1]?.time<r(de)),oe=v(()=>(0,mo.isNonNullable)(u())&&u().length&&r(Ke)&&r(de)?je(X()*100,ge()*100):[]);function U(ae){if(ae.preventDefault(),i()&&D(R,le(i().getBoundingClientRect())),$())return;let qe=ye(ae.clientX,ae.clientY),Xe=De(ae.clientX);E()(qe,Xe,r(R).width)}function Y(ae){ae.preventDefault(),!$()&&L()()}function Ae(){I()()}function We(){N()()}function Fe(ae){$()||b()&&(ae.preventDefault(),ae.deltaY<0?W()():ae.deltaY>0?Q()():ae.deltaX>0?re()():j()())}function ye(ae,qe){return s()?Math.max(0,Math.min(1,(r(R).height-(qe-r(R).top))/r(R).height)):Math.min(Math.max(ae-r(R).x,0),r(R).width)/r(R).width}function De(ae){return Math.min(Math.max(ae-r(R).x,0),r(R).width)}function je(ae,qe){let Xe=ie.features.episodesClustering&&!p()?ie.episodeMinWidthPc:0,Ue=[],Se=u()[0].time/r(de)*100,Ye=0,Ee=0;for(let St=1;St<u().length;St++)Ye=u()[St].time/r(de)*100,Ye-Se>Xe&&(Ue.push({from:Se,width:Math.max(0,Ye-Se),loadedWidth:Math.max(0,Math.min(Ye,ae)-Se),filledWidth:Math.max(0,Math.min(Ye,qe)-Se),interactive:u()[St-1].interactive,completed:u()[St-1].completed}),Se=u()[St].time/r(de)*100,Ee++);let lt={from:Se,width:Math.max(0,100-Se),loadedWidth:Math.max(0,Math.min(ae,100)-Se),filledWidth:Math.max(0,Math.min(qe,100)-Se),interactive:u()[Ee].interactive,completed:u()[Ee].completed};100-Se<Xe?(Ee-=1,Ue[Ee].width+=100-Se,Ue[Ee].loadedWidth+=Math.max(0,Math.min(ae,100)-Se),Ue[Ee].filledWidth+=Math.max(0,Math.min(qe,100)-Se)):Ue[Ee]=lt;let gt=u()[0].time;if(gt!==0){let St=gt/r(de)*100;Ue.unshift({from:0,width:St,loadedWidth:Math.min(St,ae),filledWidth:Math.min(St,qe)})}return Ue}var et=m$(),ct=se(et);{var mt=ae=>{var qe=p$();let Xe;ui(qe,21,()=>r(oe),Ue=>Ue.from,(Ue,Se)=>{var Ye=Be(),Ee=se(Ye);{var lt=gt=>{sf(gt,{get videoEpisode(){return r(Se)},get disabled(){return $()}})};V(Ee,gt=>{r(Se).interactive&&gt(lt)})}_(Ue,Ye)}),g(qe),S(Ue=>Xe=J(qe,1,"interactive-icons svelte-1tpemng",null,Xe,Ue),[()=>({mobile:l(),hidden:l()&&!r(Ne)})]),_(ae,qe)};V(ct,ae=>{p()&&ae(mt)})}var Je=P(ct,2);let ut;Je.__pointerdown=[l$,i,R,$,Ne,ye,x],Je.__pointermove=[d$,$,ye,De,A,R,Ne,k],Je.__pointerup=[c$,$,Ne,ye,C],Je.__click=[u$,$,ce,ye];var $t=h(Je);{var Ot=ae=>{lf(ae,{get videoEpisodes(){return r(oe)},get disabled(){return $()},get isMobile(){return l()}})},we=ae=>{var qe=f$(),Xe=h(qe),Ue=P(Xe,2);let Se;g(qe),S(Ye=>{tt(Xe,`transform: translateX(${X()*100}%);`),Se=J(Ue,1,"filled svelte-1tpemng",null,Se,Ye),tt(Ue,`transform: translateX(${ge()*100}%);`)},[()=>({"active-live":d()})]),_(ae,qe)};V($t,ae=>{r(oe).length?ae(Ot):ae(we,!1)})}var Dt=P($t,2);let ft;var K=h(Dt);let he;g(Dt),g(Je),st(Je,ae=>i(ae),()=>i()),S((ae,qe,Xe)=>{ut=J(Je,1,`slider ${o()??""}`,"svelte-1tpemng",ut,ae),Ve(Je,"aria-label",Me()),Ve(Je,"aria-valuemin",Pe()),Ve(Je,"aria-valuemax",Re()),Ve(Je,"aria-valuenow",fe()),Ve(Je,"aria-valuetext",Oe()),Ve(Je,"data-testid",n()??null),ft=J(Dt,1,"handleWrap svelte-1tpemng",null,ft,qe),tt(Dt,`transform: translateX(${ee()*100}%);`),he=J(K,1,"handle svelte-1tpemng",null,he,Xe)},[()=>({disabled:$(),"slider-dragging":r(Ne),hidden:a(),"slider-vertical":s(),"no-handle":w(),square:c()}),()=>({hidden:w()}),()=>({"active-live":d()})]),_t("pointerenter",Je,U),_t("pointerleave",Je,Y),_t("mouseenter",Je,Ae),_t("mouseleave",Je,We),_t("wheel",Je,Fe),_(t,et),F()}ot(["pointerdown","pointermove","pointerup","click"]);var Ai=(t,e)=>Oa[t]>=Oa[e],Ih=(t,e)=>Oa[t]<Oa[e],fa=(t,e)=>Oa[t]<=Oa[e],Eh=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var g$=M("<div><!></div>"),h$=M("<div><!> <!></div>"),_$={hash:"svelte-1auih1j",code:".volumeBar-container.svelte-1auih1j {display:flex;align-items:center;}.volumeBar-container.vertical.svelte-1auih1j, .vertical.svelte-1auih1j .tooltip-wrapper, .vertical.svelte-1auih1j .btn {width:40px;}.volumeBar.svelte-1auih1j {display:flex;align-items:center;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.svelte-1auih1j {padding:0 8px 0 0;width:0;}"};function df(t,e){H(e,!0),z(t,_$);let[i,o]=Le(),n=()=>y(E,"$isAudioAvailable$",i),a=()=>y(b,"$muted$",i),s=()=>y(u,"$volume$",i),d=()=>y(x,"$currentGridType$",i),l=be(),c=Rt(),u=l.state.volume$,b=l.state.muted$,{setVolume:p,startVolumeChanging:$,stopVolumeChanging:w}=l.actions.internal,x=l.ui.currentGridType$,k=l.callbacks?.onAudioDoesNotExistHint,C=l.callbacks?.onAudioDisabledHint,E=l.state.isAudioAvailable$,A=l.state.isAudioDisabled,L=l.ui.t,I=Z(!1),N,W=v(()=>!n()||a()||s()===0),Q=v(()=>fa(d(),"s")),j=v(()=>r(Q)?"":r(W)?!n()||A?L("tooltip_sound_unavailable"):L("tooltip_volume"):L("tooltip_volume_muted")),re=v(()=>r(W)?L("tooltip_volume"):L("tooltip_volume_muted")),ce=v(()=>r(W)?0:s()),X=!1,ge=v(()=>n()?A&&!C:!k);function ee(Fe){$(),p(Fe)}function Me(){Nc(l,s(),c.controls.volumeStepWheel)}function Pe(){Dc(l,s(),c.controls.volumeStepWheel)}function Re(Fe){p(Fe)}function fe(Fe){p(Fe),w()}function Oe(){X=!0}function ie(){X=!1,de()}function R(){clearTimeout(N),D(I,!0)}function Ne(){de()}function de(){N=window.setTimeout(()=>{X||D(I,!1)},c.controls.volumeBarTimeout)}function Ke(Fe){Fe.preventDefault(),Fe.deltaY<0?Me():Fe.deltaY>0&&Pe()}var oe=h$();let U;var Y=h(oe);Xa(Y,{get content(){return r(j)},translateY:-18,children:(Fe,ye)=>{let De=v(()=>r(Q)?"btn-volume-vertical":"btn-volume-horizontal");At(Fe,{className:"btn-full-opacity",get disabled(){return r(ge)},get testId(){return r(De)},get ariaLabel(){return r(re)},get click(){return e.click},get ariaKeyShortCut(){return Mr.KeyM},children:(je,et)=>{pa(je,{get volume(){return s()},get muted(){return r(W)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Ae=P(Y,2);{var We=Fe=>{var ye=g$();let De;var je=h(ye);let et=v(()=>r(Q)?"volumeBar-slider-vertical":""),ct=v(()=>r(Q)&&!r(I)),mt=v(()=>r(Q)?Oe:nd.noop),Je=v(()=>r(Q)?ie:nd.noop),ut=v(()=>Math.round(r(ce)*100)),$t=v(()=>`${Math.round(r(ce)*100)}%`),Ot=v(()=>r(Q)?"volume-slider-vertical":"volume-slider");Ja(je,{get className(){return r(et)},get isHidden(){return r(ct)},get isVertical(){return r(Q)},withWheelHandler:!0,onWheelUp:Me,onWheelDown:Pe,onPointerDown:ee,onHandleMove:Re,onPointerUp:fe,get onPointerEnter(){return r(mt)},get onPointerLeave(){return r(Je)},ariaLabel:"\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A \u0433\u0440\u043E\u043C\u043A\u043E\u0441\u0442\u0438",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return r(ut)},get ariaValueText(){return r($t)},get filledProgress(){return r(ce)},get handleProgress(){return r(ce)},get testId(){return r(Ot)}}),g(ye),S(we=>De=J(ye,1,"volumeBar svelte-1auih1j",null,De,we),[()=>({"volumeBar-vertical":r(Q)})]),_(Fe,ye)};V(Ae,Fe=>{n()&&Fe(We)})}g(oe),S(Fe=>U=J(oe,1,"volumeBar-container svelte-1auih1j",null,U,Fe),[()=>({vertical:r(Q)})]),_t("mouseenter",oe,function(...Fe){(r(Q)?R:nd.noop)?.apply(this,Fe)}),_t("mouseleave",oe,function(...Fe){(r(Q)?Ne:nd.noop)?.apply(this,Fe)}),_t("wheel",oe,Ke),_(t,oe),F(),o()}var Ph=require("@vkontakte/videoplayer-shared");var b$=ve('<svg><!><g fill-rule="evenodd"><path d="M4.58 13.979a.99.99 0 0 1 .99-.99h4.451a.99.99 0 0 1 .99.99v4.452a.99.99 0 0 1-1.98 0v-2.05l-3.319 3.322a1 1 0 0 1-1.414 0v-.001a1 1 0 0 1 0-1.414l3.32-3.32H5.57a.99.99 0 0 1-.99-.99m10.388-6.36 3.32-3.322a1 1 0 0 1 1.414 0v.001a1 1 0 0 1 0 1.414l-3.32 3.32h2.049a.99.99 0 0 1 0 1.979h-4.442a1 1 0 0 1-1-1V5.569a.99.99 0 1 1 1.98 0z" class="_exit"></path><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.072l3.363-3.365a1 1 0 0 1 1.414 0l.016.016a1 1 0 0 1 0 1.414L7.429 18H9.5a1 1 0 0 1 1 1M18 7.429l-3.363 3.364a1 1 0 0 1-1.414 0l-.016-.016a1 1 0 0 1 0-1.414L16.571 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z" class="_enter"></path></g></svg>');function cf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=b$();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"var(--btn-color, #fff)","aria-hidden":"true",role:"img",...i})),_(t,o)}var $$={hash:"svelte-17t966y",code:`svg[data-testid="close-fullscreen-icon"] ._enter,
177
177
  svg[data-testid="open-fullscreen-icon"] ._exit {visibility:hidden;opacity:0;}`};function uf(t,e){z(t,$$);let i=m(e,"isFullscreen",8,!1),o=cr(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");cf(t,{get"data-testid"(){return r(o)},fill:"var(--btn-color, #fff)"})}function rd(t,e){H(e,!0);let i=m(e,"isFullscreen",3,!1),o=m(e,"click",3,Ph.noop),n=be(),a=n.ui.isFullscreenOpenedByKeyboard,s=n.ui.t,d=v(()=>i()?s("tooltip_fullscreen_on"):s("tooltip_fullscreen_off"));At(t,{testId:"btn-fullscreen",get ariaLabel(){return r(d)},click:c=>{let u=da(c);a.set(u),o()()},get ariaKeyShortCut(){return Mr.KeyF},children:(c,u)=>{uf(c,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var y$=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.265 4.265C3 5.531 3 7.567 3 11.64v.72c0 4.073 0 6.11 1.265 7.375C5.531 21 7.567 21 11.64 21h.72c4.073 0 6.11 0 7.375-1.265C21 18.469 21 16.433 21 12.36v-.72c0-4.073 0-6.11-1.265-7.375C18.469 3 16.433 3 12.36 3h-.72C7.567 3 5.53 3 4.265 4.265M6 8.5c.096 4.682 2.556 7.5 6.61 7.5h.235v-2.679c1.476.15 2.577 1.254 3.026 2.679H18c-.578-2.132-2.075-3.31-3.005-3.76.93-.558 2.246-1.908 2.556-3.74h-1.937c-.406 1.49-1.615 2.84-2.77 2.968V8.5h-1.968v5.197c-1.197-.3-2.759-1.757-2.823-5.197z" clip-rule="evenodd"></path></svg>');function pf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=y$();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img",...i})),_(t,o)}var x$=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M32.55 17.042h2.494L38.707 7h-1.81l-2.936 8.276h-.286L30.84 7H29zM48.075 17.042l-4.619-5.199L47.718 7h-2.11l-3.563 4.088h-.413V7h-1.71v10.042h1.71V12.74h.427l3.764 4.302z"></path><path fill="var(--btn-color, #fff)" d="M57.888 11.886c.883-.342 1.44-1.125 1.44-2.151C59.327 8.14 58.001 7 56.062 7h-3.92v10.042h4.205c1.953 0 3.279-1.14 3.279-2.806 0-1.168-.656-2.037-1.74-2.35m-4.034-3.39h2.21c.911 0 1.539.555 1.539 1.381 0 .812-.628 1.368-1.54 1.368h-2.21zm2.494 7.05h-2.494V12.74h2.494c.898 0 1.525.57 1.525 1.396 0 .84-.627 1.41-1.525 1.41M61.188 17.042h2.323l2.766-5.498h.228v5.498h1.568V9.635h-2.324l-2.765 5.498h-.228V9.635h-1.568zM69.146 19.25h1.64v-2.208h5.33v2.208h1.64v-3.703h-1.283V9.635h-5.431l-.37 3.79c-.13 1.338-.528 2.121-1.34 2.121h-.186zm2.494-3.703c.4-.385.57-1.04.685-2.151l.228-2.265h2.28v4.416zM86.025 13.253c0-2.136-1.597-3.76-3.849-3.76s-3.848 1.61-3.848 3.846 1.596 3.846 3.848 3.846c1.54 0 2.994-.727 3.55-2.137l-1.54-.256c-.356.527-1.04.897-1.91.897-1.254 0-2.081-.77-2.238-1.909h5.958c.015-.156.029-.327.029-.527m-3.849-2.336c1.027 0 1.796.655 2.067 1.581h-4.105c.27-.954 1.04-1.58 2.038-1.58M90.837 17.185c2.324 0 3.963-1.596 3.963-3.846s-1.64-3.846-3.963-3.846-3.962 1.595-3.962 3.846c0 2.25 1.639 3.846 3.962 3.846m0-1.496c-1.34 0-2.252-.954-2.252-2.35s.912-2.35 2.252-2.35 2.252.954 2.252 2.35-.912 2.35-2.252 2.35" class="_ru"></path><path fill="var(--btn-color, #fff)" d="M35.02 17.36h-2.484L29 7.422h1.832l2.826 8.188h.284l2.925-8.188h1.803zM43.43 12.215l4.6 5.144h-2.243l-3.749-4.256h-.426v4.256h-1.704V7.423h1.704v4.045h.412l3.55-4.045h2.101zM56.808 17.36h-2.485l-3.536-9.937h1.832l2.826 8.188h.284l2.925-8.188h1.803zM63.257 17.36h-1.633v-7.33h1.633zm-.809-8.373q-.455 0-.738-.268a.97.97 0 0 1-.284-.718.97.97 0 0 1 .284-.72q.297-.28.738-.281.44 0 .724.282a.97.97 0 0 1 .284.719.97.97 0 0 1-.284.718q-.284.268-.724.268M68.382 17.5q-1.037 0-1.86-.48a3.5 3.5 0 0 1-1.293-1.352q-.454-.874-.454-1.973t.454-1.96a3.37 3.37 0 0 1 1.293-1.352 3.55 3.55 0 0 1 1.86-.494q.894 0 1.59.367.696.352 1.136.888V7.423h1.633v9.936h-1.22l-.342-1.184a4 4 0 0 1-1.164.944q-.71.381-1.633.381m.397-1.452q1.038 0 1.676-.648.654-.663.653-1.705 0-1.044-.653-1.692-.639-.662-1.675-.662-1.023 0-1.662.662-.639.649-.639 1.692t.64 1.705q.638.648 1.66.648M81.929 13.61q0 .211-.029.522h-5.935q.113.86.71 1.38.597.508 1.52.508.624 0 1.121-.24.51-.24.781-.648l1.534.254a3 3 0 0 1-1.378 1.564q-.965.55-2.158.55-1.108 0-1.988-.48a3.6 3.6 0 0 1-1.363-1.352q-.483-.874-.483-1.973t.483-1.96a3.5 3.5 0 0 1 1.363-1.352q.88-.495 1.988-.494 1.107 0 1.974.494.88.478 1.363 1.339.497.845.497 1.888M78.095 11.3q-.738 0-1.292.423-.54.422-.739 1.141h4.09a2.17 2.17 0 0 0-.767-1.127q-.54-.437-1.292-.437M86.751 17.5q-1.136 0-2.044-.48a3.66 3.66 0 0 1-1.406-1.352q-.497-.874-.497-1.973t.497-1.96q.511-.873 1.406-1.352.909-.495 2.044-.494 1.137 0 2.031.494a3.4 3.4 0 0 1 1.406 1.353q.51.86.511 1.959 0 1.098-.511 1.973a3.53 3.53 0 0 1-1.406 1.353q-.894.48-2.03.479m0-1.48q.995 0 1.62-.634.624-.648.624-1.691t-.625-1.678q-.624-.648-1.619-.648-.993 0-1.618.648-.625.634-.625 1.678 0 1.043.625 1.69.625.636 1.618.635" class="_en"></path><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M7 8.6c0-1.96 0-2.94.381-3.689a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.464 0 3.696 0 4.638.48a4.4 4.4 0 0 1 1.922 1.922c.48.942.48 2.174.48 4.638v3.92c0 2.464 0 3.696-.48 4.638a4.4 4.4 0 0 1-1.922 1.922c-.942.48-2.174.48-4.638.48H12.6c-1.96 0-2.94 0-3.689-.381a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.265 1.744c.901.539 1.352.808 1.505 1.157.133.304.133.65 0 .954-.153.349-.604.618-1.505 1.157l-2.386 1.425c-.943.563-1.414.844-1.802.807a1.2 1.2 0 0 1-.847-.48C11 15.05 11 14.5 11 13.403v-2.85c0-1.098 0-1.647.23-1.96.201-.274.51-.45.847-.481.388-.037.86.244 1.802.807zM5 9.04c0-2.464 0-3.696.48-4.638a4.4 4.4 0 0 1 .955-1.253 3.7 3.7 0 0 0-1.033.33A4.4 4.4 0 0 0 3.48 5.403C3 6.344 3 7.576 3 10.04v3.92c0 2.464 0 3.696.48 4.638a4.4 4.4 0 0 0 1.922 1.922c.304.155.637.26 1.033.33a4.4 4.4 0 0 1-.955-1.252C5 18.656 5 17.424 5 14.96z" clip-rule="evenodd"></path></svg>');function ff(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=x$();let n;var a=h(o);pe(a,()=>e.children??te),me(4),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"none","aria-hidden":"true",role:"img",...i})),_(t,o)}var w$={hash:"svelte-1nhjml",code:`svg[data-testid="vk-video-logo-icon--short"] ._ru,
178
178
  svg[data-testid="vk-video-logo-icon--short"] ._en,
179
179
  svg[data-testid="vk-video-logo-icon"] ._en,
@@ -225,9 +225,9 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
225
225
  100% {
226
226
  opacity: 1;
227
227
  }
228
- }`};function gf(t,e){H(e,!0),z(t,T$);let i=m(e,"isMobile",3,!1),o=v(()=>e.iconState===vf.ChromecastState.CONNECTED),n=v(()=>e.iconState===vf.ChromecastState.CONNECTING);var a=Be(),s=se(a);{var d=c=>{var u=C$(),b=h(u),p=h(b),$=h(p);me(),g(p);var w=P(p);me(),g(b);var x=P(b),k=h(x),C=h(k);g(k),me(),g(x),g(u),S(()=>{De($,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)"),De(w,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)"),De(C,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)")}),_(c,u)},l=c=>{var u=k$();let b;var p=h(u),$=P(h(p),5);let w;g(p),g(u),S((x,k)=>{b=J(u,0,"svelte-8z1bf5",null,b,x),w=J($,0,"svelte-8z1bf5",null,w,k)},[()=>({connecting:r(n)}),()=>({hidden:!r(o)})]),_(c,u)};V(s,c=>{i()?c(d):c(l,!1)})}_(t,a),F()}var Mh=require("@vkontakte/videoplayer-shared");function sd(t,e){H(e,!0);let i=m(e,"ref",15,void 0),o=m(e,"isMobile",3,!1),n=m(e,"click",3,Mh.noop),s=be().ui.t,d=v(()=>e.state===Ah.ChromecastState.CONNECTED?s("tooltip_chromecast_on"):s("tooltip_chromecast_off"));At(t,{get ariaLabel(){return r(d)},get click(){return n()},testId:"btn-chromecast",get ref(){return i()},set ref(l){i(l)},children:(l,c)=>{gf(l,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}var I$=M('<div class="tooltip-wrapper svelte-5ygsa2"><div><!></div></div>'),E$={hash:"svelte-5ygsa2",code:'.tooltip-wrapper.svelte-5ygsa2 {position:relative;display:block;}.tooltip.svelte-5ygsa2 {position:absolute;opacity:0;visibility:hidden;transition:opacity 200ms, visibility 200ms;bottom:100%;transform:translateX(-50%);}.pointer.svelte-5ygsa2:after {position:absolute;bottom:0;left:50%;width:0;border-top:5px solid rgba(41, 41, 41, .8);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0;transform:translate(-50%, 5px);}.tooltip.active.svelte-5ygsa2 {opacity:1;visibility:visible;}'};function hf(t,e){z(t,E$);let i=m(e,"active",3,!1),o=m(e,"pointer",3,!1),n=m(e,"translateXPx",3,0),a=m(e,"translateYPx",3,0),s=m(e,"leftOffset",3,0),d=m(e,"rightOffset",3,0),l=Z(void 0),c=Z(void 0);function u(k){if(!r(c))return 0;let{width:C}=r(c).getBoundingClientRect(),E=C/2;return k<E?E+s():k>e.containerWidth-E?e.containerWidth-E-d():k}let b=v(()=>u(n()));var p=I$(),$=h(p);let w;var x=h($);pe(x,()=>e.children??te),g($),st($,k=>D(c,k),()=>r(c)),g(p),st(p,k=>D(l,k),()=>r(l)),S(k=>{tt(p,`transform: translate(${r(b)}px, ${a()}px);`),w=J($,1,"tooltip svelte-5ygsa2",null,w,k),tt($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),_(t,p)}var Hc=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Lh=t=>!!(Math.round(Math.abs(t)/90)%2),Vh=t=>Math.abs(t)/90%4===1;var P$=M('<div class="preview svelte-1wqg760"></div>'),A$=M('<div class="time svelte-1wqg760"> </div>'),M$=M('<div><!> <div class="episode svelte-1wqg760"><!></div> <!></div>'),L$={hash:"svelte-1wqg760",code:".timeline-preview.svelte-1wqg760 {bottom:18px;border-radius:2px;pointer-events:none;}.timeline-preview.mobile.svelte-1wqg760 {bottom:72px;}.preview.svelte-1wqg760 {background-color:var(--timeline-preview-bg);box-shadow:0 0 2px var(--timeline-preview-shadow), 0 8px 24px var(--timeline-preview-shadow);border-radius:8px;border:1px solid var(--white);}.episode.svelte-1wqg760 {margin-top:10px;margin-bottom:4px;font-size:13px;line-height:16px;text-shadow:0 8px 24px var(--timeline-preview-shadow), 0 0 2px var(--timeline-preview-shadow);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;font-weight:500;}.time.svelte-1wqg760 {font-size:13px;line-height:16px;text-align:center;color:var(--white);text-shadow:0 8px 24px var(--timeline-preview-shadow), 0 0 2px var(--timeline-preview-shadow);font-weight:500;}"};function _f(t,e){H(e,!0),z(t,L$);let[i,o]=Le(),n=()=>y(w,"$rotateAlpha",i),a=()=>y(x,"$playerSize",i),s={MOBILE:150,DESKTOP:278},d=m(e,"time",3,""),l=m(e,"isMobile",3,!1),c=m(e,"videoEpisodes",19,()=>[]),u=m(e,"progress",3,0),b=m(e,"duration",3,0),p=m(e,"isInteractive",3,!1),$=be(),w=$.ui.rotateAlpha,x=$.ui.playerSize,k=Z(0),C=Z(0),E=Z(""),A=Z(0),L=Z(0),I=Z(0),N=Z(0),W=v(()=>Hc(u(),b(),c())),Q=v(()=>Lh(n())),j=v(()=>Vh(n())),re=v(ge),ce=v(()=>(r(j)?1:-1)*(r(k)/2-r(C)/2)),X=v(()=>r(ce)*-1);He(()=>{(U=>(D(k,le(U.width)),D(C,le(U.height))))(Me())}),He(()=>{(U=>(D(E,le(U.imgSrc)),D(A,le(U.imgWidth)),D(L,le(U.imgHeight)),D(I,le(U.imgOffsetX)),D(N,le(U.imgOffsetY))))(Pe(u()))});function ge(){let U=l()?s.MOBILE:s.DESKTOP,{isVertical:Y}=ee(),Ae=30;return r(W)?.text&&(Ae+=16),(Y||r(Q))&&(Ae+=18,Ae+=50),Math.min(Math.max(a().height-Ae,0),U)}function ee(){let U=e.previewThumbsData.frameWidth,Y=e.previewThumbsData.frameHeight,Ae=Y>U;return{width:U,height:Y,isHorizontal:!Ae,isVertical:Ae}}function Me(){let{height:U,isHorizontal:Y,isVertical:Ae,width:We}=ee();return Y&&(U=U/We*r(re),We=r(re)),Ae&&(We=We/U*r(re),U=r(re)),{width:We,height:U}}function Pe(U){let Y;e.previewThumbsData.isUV?Y=Math.floor(b()*U/e.previewThumbsData.frequency):Y=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*U)));let Ae=Math.floor(Y/e.previewThumbsData.countPerImage),We=Math.floor(Y%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),Fe=Y%e.previewThumbsData.countPerRow,ye=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&Ae===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(ye=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&ye++);let Ne=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&Ae===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Ne=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let je=r(k)*Ne,et=r(C)*ye,ct=-Fe*r(k),mt=-We*r(C);return{imgSrc:e.previewThumbsData.links[Ae],imgWidth:je,imgHeight:et,imgOffsetX:ct,imgOffsetY:mt}}var Ve=M$();let fe;var Oe=h(Ve);{var ie=U=>{var Y=P$();S(()=>tt(Y,`width: ${r(k)}px; height: ${r(C)}px; background-image: url(${r(E)}); background-size: ${r(A)}px ${r(L)}px; background-position: ${r(I)}px ${r(N)}px;
228
+ }`};function gf(t,e){H(e,!0),z(t,T$);let i=m(e,"isMobile",3,!1),o=v(()=>e.iconState===vf.ChromecastState.CONNECTED),n=v(()=>e.iconState===vf.ChromecastState.CONNECTING);var a=Be(),s=se(a);{var d=c=>{var u=C$(),b=h(u),p=h(b),$=h(p);me(),g(p);var w=P(p);me(),g(b);var x=P(b),k=h(x),C=h(k);g(k),me(),g(x),g(u),S(()=>{Ve($,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)"),Ve(w,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)"),Ve(C,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)")}),_(c,u)},l=c=>{var u=k$();let b;var p=h(u),$=P(h(p),5);let w;g(p),g(u),S((x,k)=>{b=J(u,0,"svelte-8z1bf5",null,b,x),w=J($,0,"svelte-8z1bf5",null,w,k)},[()=>({connecting:r(n)}),()=>({hidden:!r(o)})]),_(c,u)};V(s,c=>{i()?c(d):c(l,!1)})}_(t,a),F()}var Mh=require("@vkontakte/videoplayer-shared");function sd(t,e){H(e,!0);let i=m(e,"ref",15,void 0),o=m(e,"isMobile",3,!1),n=m(e,"click",3,Mh.noop),s=be().ui.t,d=v(()=>e.state===Ah.ChromecastState.CONNECTED?s("tooltip_chromecast_on"):s("tooltip_chromecast_off"));At(t,{get ariaLabel(){return r(d)},get click(){return n()},testId:"btn-chromecast",get ref(){return i()},set ref(l){i(l)},children:(l,c)=>{gf(l,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}var I$=M('<div class="tooltip-wrapper svelte-5ygsa2"><div><!></div></div>'),E$={hash:"svelte-5ygsa2",code:'.tooltip-wrapper.svelte-5ygsa2 {position:relative;display:block;}.tooltip.svelte-5ygsa2 {position:absolute;opacity:0;visibility:hidden;transition:opacity 200ms, visibility 200ms;bottom:100%;transform:translateX(-50%);}.pointer.svelte-5ygsa2:after {position:absolute;bottom:0;left:50%;width:0;border-top:5px solid rgba(41, 41, 41, .8);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0;transform:translate(-50%, 5px);}.tooltip.active.svelte-5ygsa2 {opacity:1;visibility:visible;}'};function hf(t,e){z(t,E$);let i=m(e,"active",3,!1),o=m(e,"pointer",3,!1),n=m(e,"translateXPx",3,0),a=m(e,"translateYPx",3,0),s=m(e,"leftOffset",3,0),d=m(e,"rightOffset",3,0),l=Z(void 0),c=Z(void 0);function u(k){if(!r(c))return 0;let{width:C}=r(c).getBoundingClientRect(),E=C/2;return k<E?E+s():k>e.containerWidth-E?e.containerWidth-E-d():k}let b=v(()=>u(n()));var p=I$(),$=h(p);let w;var x=h($);pe(x,()=>e.children??te),g($),st($,k=>D(c,k),()=>r(c)),g(p),st(p,k=>D(l,k),()=>r(l)),S(k=>{tt(p,`transform: translate(${r(b)}px, ${a()}px);`),w=J($,1,"tooltip svelte-5ygsa2",null,w,k),tt($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),_(t,p)}var Hc=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Lh=t=>!!(Math.round(Math.abs(t)/90)%2),Vh=t=>Math.abs(t)/90%4===1;var P$=M('<div class="preview svelte-1wqg760"></div>'),A$=M('<div class="time svelte-1wqg760"> </div>'),M$=M('<div><!> <div class="episode svelte-1wqg760"><!></div> <!></div>'),L$={hash:"svelte-1wqg760",code:".timeline-preview.svelte-1wqg760 {bottom:18px;border-radius:2px;pointer-events:none;}.timeline-preview.mobile.svelte-1wqg760 {bottom:72px;}.preview.svelte-1wqg760 {background-color:var(--timeline-preview-bg);box-shadow:0 0 2px var(--timeline-preview-shadow), 0 8px 24px var(--timeline-preview-shadow);border-radius:8px;border:1px solid var(--white);}.episode.svelte-1wqg760 {margin-top:10px;margin-bottom:4px;font-size:13px;line-height:16px;text-shadow:0 8px 24px var(--timeline-preview-shadow), 0 0 2px var(--timeline-preview-shadow);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;font-weight:500;}.time.svelte-1wqg760 {font-size:13px;line-height:16px;text-align:center;color:var(--white);text-shadow:0 8px 24px var(--timeline-preview-shadow), 0 0 2px var(--timeline-preview-shadow);font-weight:500;}"};function _f(t,e){H(e,!0),z(t,L$);let[i,o]=Le(),n=()=>y(w,"$rotateAlpha",i),a=()=>y(x,"$playerSize",i),s={MOBILE:150,DESKTOP:278},d=m(e,"time",3,""),l=m(e,"isMobile",3,!1),c=m(e,"videoEpisodes",19,()=>[]),u=m(e,"progress",3,0),b=m(e,"duration",3,0),p=m(e,"isInteractive",3,!1),$=be(),w=$.ui.rotateAlpha,x=$.ui.playerSize,k=Z(0),C=Z(0),E=Z(""),A=Z(0),L=Z(0),I=Z(0),N=Z(0),W=v(()=>Hc(u(),b(),c())),Q=v(()=>Lh(n())),j=v(()=>Vh(n())),re=v(ge),ce=v(()=>(r(j)?1:-1)*(r(k)/2-r(C)/2)),X=v(()=>r(ce)*-1);He(()=>{(U=>(D(k,le(U.width)),D(C,le(U.height))))(Me())}),He(()=>{(U=>(D(E,le(U.imgSrc)),D(A,le(U.imgWidth)),D(L,le(U.imgHeight)),D(I,le(U.imgOffsetX)),D(N,le(U.imgOffsetY))))(Pe(u()))});function ge(){let U=l()?s.MOBILE:s.DESKTOP,{isVertical:Y}=ee(),Ae=30;return r(W)?.text&&(Ae+=16),(Y||r(Q))&&(Ae+=18,Ae+=50),Math.min(Math.max(a().height-Ae,0),U)}function ee(){let U=e.previewThumbsData.frameWidth,Y=e.previewThumbsData.frameHeight,Ae=Y>U;return{width:U,height:Y,isHorizontal:!Ae,isVertical:Ae}}function Me(){let{height:U,isHorizontal:Y,isVertical:Ae,width:We}=ee();return Y&&(U=U/We*r(re),We=r(re)),Ae&&(We=We/U*r(re),U=r(re)),{width:We,height:U}}function Pe(U){let Y;e.previewThumbsData.isUV?Y=Math.floor(b()*U/e.previewThumbsData.frequency):Y=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*U)));let Ae=Math.floor(Y/e.previewThumbsData.countPerImage),We=Math.floor(Y%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),Fe=Y%e.previewThumbsData.countPerRow,ye=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&Ae===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(ye=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&ye++);let De=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&Ae===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(De=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let je=r(k)*De,et=r(C)*ye,ct=-Fe*r(k),mt=-We*r(C);return{imgSrc:e.previewThumbsData.links[Ae],imgWidth:je,imgHeight:et,imgOffsetX:ct,imgOffsetY:mt}}var Re=M$();let fe;var Oe=h(Re);{var ie=U=>{var Y=P$();S(()=>tt(Y,`width: ${r(k)}px; height: ${r(C)}px; background-image: url(${r(E)}); background-size: ${r(A)}px ${r(L)}px; background-position: ${r(I)}px ${r(N)}px;
229
229
  transform: rotate(${n()}deg) ${r(Q)?`translate(${r(ce)}px, ${r(X)}px)`:""};
230
- `)),_(U,Y)};V(Oe,U=>{r(E)&&U(ie)})}var R=P(Oe,2),Re=h(R);{var de=U=>{var Y=Be(),Ae=se(Y);{var We=ye=>{var Ne=Pr();S(je=>ue(Ne,je),[()=>O("tooltip_episode_unfinished")]),_(ye,Ne)},Fe=ye=>{var Ne=Pr();S(()=>ue(Ne,r(W).text||"")),_(ye,Ne)};V(Ae,ye=>{p()&&r(W).completed===!1?ye(We):ye(Fe,!1)})}_(U,Y)};V(Re,U=>{r(W)&&U(de)})}g(R);var Ke=P(R,2);{var oe=U=>{var Y=A$(),Ae=h(Y,!0);g(Y),S(()=>ue(Ae,d())),_(U,Y)};V(Ke,U=>{p()||U(oe)})}g(Ve),S(U=>{fe=J(Ve,1,"timeline-preview svelte-1wqg760",null,fe,U),tt(Ve,`width: ${r(Q)?r(C):r(k)}px;`)},[()=>({mobile:l()})]),_(t,Ve),F(),o()}var V$=M('<span class="time svelte-1jr6obn"> </span>'),R$=M("<!> <!>",1),N$={hash:"svelte-1jr6obn",code:".time.svelte-1jr6obn {display:inline-block;padding:6px 10px;border-radius:3px;color:var(--white);background-color:rgba(41, 41, 41, .8);}.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 bf(t,e){H(e,!0),z(t,N$);let[i,o]=Le(),n=()=>y(ce,"$interactiveEpisodes$",i),a=()=>y(I,"$duration$",i),s=()=>y(L,"$position$",i),d=()=>y(ee,"$isInteractiveExpectation$",i),l=()=>y(ge,"$isInteractiveTime$",i),c=()=>y(N,"$isLive$",i),u=()=>y(Q,"$isMobile",i),b=()=>y(W,"$isActiveLive$",i),p=()=>y(A,"$bufferedProgress$",i),$=()=>y(Ve,"$disabledControls$",i),w=m(e,"showTimeline",3,!1),x=m(e,"withEpisodes",3,!0),k=m(e,"ref",15,void 0),C=be(),E=Rt(),A=C.state.bufferedProgress$,L=C.state.positionWithScrubbing$,I=C.state.duration$,N=C.state.isLive$,W=C.state.isActiveLive$,Q=C.ui.isMobile,j=E.features.episodes&&x()?C.actions.internal.getVideoEpisodes():void 0,re=C.actions.internal.getPreviewThumbsData(),ce=C.state.interactiveEpisodes$,X=C.state.isInteractive,ge=C.state.isInteractiveTime$,ee=C.state.isInteractiveExpectation$,Me=C.actions.internal.correctSeekTimeToInteractive,Pe=C.callbacks?.onDisabledTimelineClick,Ve=C.ui.controls.disabledControls$,fe=C.callbacks?.uiInfo?.onTimelineMouseEnter,Oe=C.callbacks?.uiInfo?.onTimelineMouseLeave,ie=C.ui.t,R=E.features.interactiveResponsiveUi,Re=v(()=>X?n():j),de=v(()=>zo(a())),Ke=v(()=>zo(s())),oe=v(()=>s()/a()),U=v(()=>d()||l()),Y=Z(!1),Ae=Z(""),We=Z(0),Fe=Z(0),ye=Z(0),Ne=v(()=>({containerWidth:r(Fe),translateXPx:r(We),translateYPx:X&&re?-36:-16,active:r(Y)&&w()&&!r(U)&&!R,pointer:!E.features.timelinePreview||!re||c()})),je=ie("aria_timeline"),et=v(()=>ie("aria_timeline_value",{position:r(Ke),duration:r(de)}));function ct(Ue){return!Me||!X?Ue:Me(Ue*a())/a()}function mt(Ue){C.actions.internal.startScrubbing(ct(Ue))}function Je(Ue){l()||C.actions.internal.progressScrubbing(ct(Ue))}function ut(Ue){C.actions.internal.completeScrubbing(ct(Ue)),D(Y,!1)}function $t(Ue,Se,Ye){Dt(Ue,Se,Ye),D(Y,!0)}function Ot(Ue,Se,Ye){Dt(Ue,Se,Ye),D(Y,!0)}function we(){D(Y,!1)}function Dt(Ue,Se,Ye){D(ye,le(ct(Ue))),D(We,le(Se)),Ye&&D(Fe,le(Ye)),D(Ae,le(ft(Ue)))}function ft(Ue){let Se=zo((c()?1-Ue:Ue)*a());return c()?`-${Se}`:Se}var K=R$(),he=se(K);hf(he,Qr(()=>r(Ne),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(Ue,Se)=>{var Ye=Be(),Ee=se(Ye);{var lt=St=>{_f(St,{get time(){return r(Ae)},get isMobile(){return u()},get videoEpisodes(){return r(Re)},previewThumbsData:re,get progress(){return r(ye)},get duration(){return a()},isInteractive:X})},gt=St=>{var oi=V$(),ti=h(oi,!0);g(oi),S(()=>ue(ti,r(Ae))),_(St,oi)};V(Ee,St=>{E.features.timelinePreview&&re&&!c()?St(lt):St(gt,!1)})}_(Ue,Ye)},$$slots:{default:!0}}));var ae=P(he,2);let qe=v(()=>Math.round(r(oe)*100)),Xe=v(()=>$().has("TIMELINE"));Ja(ae,{className:"timeline-slider",get isActiveLive(){return b()},get isMobile(){return u()},ariaLabel:je,ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return r(qe)},get ariaValueText(){return r(et)},get loadedProgress(){return p()},get filledProgress(){return r(oe)},get handleProgress(){return r(oe)},get videoEpisodes(){return r(Re)},onPointerDown:mt,onHandleMove:Je,onPointerMove:Ot,onPointerUp:ut,onPointerEnter:$t,onPointerLeave:we,onMouseEnter:fe,onMouseLeave:Oe,onDisabledClick:Pe,isInteractive:X,get disabled(){return r(Xe)},get hideHandel(){return l()},get ref(){return k()},set ref(Ue){k(Ue)}}),_(t,K),F(),o()}var D$={hash:"svelte-1yate8h",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 ld(t,e){H(e,!0),z(t,D$);let[i,o]=Le(),n=()=>y(l,"$isMobile",i),a=m(e,"position",3,0),s=m(e,"duration",3,0),d=be(),l=d.ui.isMobile,c=d.ui.t,u=v(()=>zo(s())),b=v(()=>zo(a())),p=v(()=>a()/s()),$=v(()=>c("aria_timeline_value",{position:r(b),duration:r(u)})),w=v(()=>Math.round(r(p)*100));Ja(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return s()},get ariaValueNow(){return r(w)},get ariaValueText(){return r($)},get filledProgress(){return r(p)},hideHandel:!0,get squareBorders(){return n()}}),F(),o()}var B$=M("<div><!></div>"),O$=M("<div></div>"),H$={hash:"svelte-1h5wsmk",code:".timeline.svelte-1h5wsmk {position:relative;pointer-events:all;display:flex;align-items:center;bottom:0;width:100%;min-width:86px;padding:3px 10px 4px;box-sizing:border-box;}.timeline.mobile.svelte-1h5wsmk {height:16px;padding:6px 12px 7px;margin-top:6px;}.withoutPadding.svelte-1h5wsmk {padding:0;}.timeline-stub.svelte-1h5wsmk {width:100%;min-width:20px;}.timeline-stub.mobile.svelte-1h5wsmk {height:8px;}"};function es(t,e){H(e,!0),z(t,H$);let[i,o]=Le(),n=()=>y($,"$isLive$",i),a=()=>y(k,"$isMobile",i),s=()=>y(x,"$adPosition",i),d=()=>y(w,"$adDuration",i),l=m(e,"isAds",3,!1),c=m(e,"isHidden",3,!1),u=m(e,"needPadding",3,!0),b=m(e,"ref",15,void 0),p=be(),$=p.state.isLive$,w=p.ads.duration,x=p.ads.position,k=p.ui.isMobile,C=v(()=>!c()&&(!n()||n()&&e.canRewindLive&&e.isRewindableLive||l()));var E=Be(),A=se(E);{var L=N=>{var W=B$();let Q;var j=h(W);{var re=X=>{ld(X,{get position(){return s()},get duration(){return d()}})},ce=X=>{bf(X,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return r(C)},get withEpisodes(){return e.withEpisodes},get ref(){return b()},set ref(ge){b(ge)}})};V(j,X=>{l()?X(re):X(ce,!1)})}g(W),S(X=>Q=J(W,1,"timeline svelte-1h5wsmk",null,Q,X),[()=>({withoutPadding:!u(),mobile:a()})]),_(N,W)},I=N=>{var W=O$();let Q;S(j=>Q=J(W,1,"timeline-stub svelte-1h5wsmk",null,Q,j),[()=>({mobile:a()})]),_(N,W)};V(A,N=>{r(C)?N(L):N(I,!1)})}_(t,E),F(),o()}var Rh=require("@vkontakte/videoplayer-shared");var F$=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="m21.616 16.495-.012.07c-.156.852-.282 1.541-.427 2.093-.148.569-.333 1.063-.64 1.5a4.4 4.4 0 0 1-2.507 1.732c-.52.133-1.046.131-1.63.069-.568-.06-1.257-.187-2.11-.343l-4.34-.794c-.853-.156-1.542-.282-2.094-.426-.568-.149-1.062-.334-1.5-.642a4.4 4.4 0 0 1-1.731-2.507c-.133-.518-.131-1.045-.069-1.63.06-.567.187-1.257.343-2.11l.012-.068c.156-.853.282-1.542.427-2.095.148-.568.333-1.062.641-1.5a4.4 4.4 0 0 1 2.507-1.731c.518-.133 1.045-.131 1.63-.069.567.06 1.256.187 2.109.343l4.34.794c.853.156 1.542.282 2.094.426.568.149 1.062.334 1.5.642a4.4 4.4 0 0 1 1.731 2.506c.133.52.131 1.046.069 1.63-.06.568-.187 1.258-.343 2.11m-1.446-2.3c.052-.483.035-.769-.022-.993a2.6 2.6 0 0 0-1.023-1.481c-.19-.133-.45-.25-.921-.373-.48-.125-1.102-.24-1.997-.404l-4.272-.781c-.895-.164-1.518-.277-2.01-.33-.483-.051-.769-.035-.993.023-.6.153-1.125.516-1.481 1.023-.133.19-.25.45-.373.92-.125.48-.24 1.103-.403 1.998s-.277 1.518-.33 2.01c-.051.484-.035.77.023.994.153.6.516 1.125 1.023 1.481.189.133.45.25.92.373.48.125 1.102.24 1.997.404l4.272.781c.895.164 1.518.277 2.01.33.483.051.77.035.993-.023a2.6 2.6 0 0 0 1.481-1.023c.133-.19.25-.45.373-.92.125-.48.24-1.103.403-1.998s.278-1.518.33-2.01Z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M18.187 7.488a.9.9 0 0 1-1.045-.727c-.145-.807-.199-1.086-.28-1.296A2.6 2.6 0 0 0 14.504 3.8c-.224-.006-.505.036-1.315.169l-5.846.962c-1.366.224-1.834.313-2.174.492A2.6 2.6 0 0 0 3.837 7.18c-.08.376-.039.85.114 2.226l.011.1a.9.9 0 1 1-1.787.198l-.01-.093-.019-.17c-.129-1.147-.217-1.937-.068-2.636A4.4 4.4 0 0 1 4.332 3.83c.633-.333 1.417-.461 2.556-.648l.163-.027 5.846-.961.098-.016c.674-.111 1.138-.188 1.556-.177a4.4 4.4 0 0 1 3.99 2.819c.15.39.234.853.355 1.526l.017.097a.9.9 0 0 1-.726 1.045" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M12.724 12.414a.415.415 0 0 0-.69.231l-.72 4.18a.4.4 0 0 0 .025.221c.085.21.327.311.539.226l3.669-1.467a.406.406 0 0 0 .127-.68z"></path></svg>');function $f(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=F$();let n;var a=h(o);pe(a,()=>e.children??te),me(3),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"episodes-icon",style:"flex-shrink:0",role:"img",...i})),_(t,o)}var U$=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.146 3.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L6.793 6.5 4.146 3.854a.5.5 0 0 1 0-.708" clip-rule="evenodd" opacity=".7"></path></svg>');function yf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=U$();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"13",fill:"none","aria-hidden":"true","data-testid":"chevron-light-icon",role:"img",...i})),_(t,o)}var z$=M('<span class="text mobile svelte-1yhs2ga"> </span> <div class="chevron-episodes svelte-1yhs2ga"><!></div>',1),q$=M('<span class="text svelte-1yhs2ga"> </span>'),W$=M('<span class="text count svelte-1yhs2ga"> </span>'),K$=M("<!> <!>",1),Q$={hash:"svelte-1yhs2ga",code:".text.svelte-1yhs2ga {padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.text.count.svelte-1yhs2ga {overflow:visible;}.text.mobile.svelte-1yhs2ga {padding:0 3px 0 4px;}.chevron-episodes.svelte-1yhs2ga {margin-bottom:-4px;}"};function dd(t,e){H(e,!0),z(t,Q$);let[i,o]=Le(),n=()=>y(w,"$currentGridType$",i),a=()=>y(x,"$openedByKeyboard$",i),s=()=>y(k,"$panelOpened$",i),d=()=>y(C,"$isMobile",i),l=m(e,"position",3,0),c=m(e,"duration",3,0),u=m(e,"timeCodes",19,()=>[]),b=be(),p=b.callbacks?.onEpisodeChanged??Rh.noop,$=!!b.callbacks?.onEpisodeClicked,w=b.ui.currentGridType$,x=b.ui.episodes.openedByKeyboard$,k=b.ui.episodes.panelOpened$,C=b.ui.isMobile,E=b.ui.t,A=Z(void 0),L=ee=>{if(!!b.callbacks?.onEpisodeClicked){let Pe=da(ee);x.set(Pe),k.set(!0),b.callbacks?.onEpisodeClicked?.(Pe)}},I=Z(null),N=v(()=>l()/c());He(()=>{let ee=Hc(r(N),c(),u());ee?r(I)?.time!==ee.time&&(p(ee),D(I,le(ee))):D(I,null)});let W=v(()=>r(I)?.text||""),Q=v(()=>Ai(n(),"xl")?"FULL":Ai(n(),"m")&&Ih(n(),"xl")?"COUNT":"SHORT"),j=v(()=>`${E("tooltip_episodes")}: ${r(W)}`),re=async(ee,Me,Pe)=>{await eo(),ee?.getAttribute("aria-expanded")==="false"&&Me&&!Pe&&vt(()=>{x.set(!1),ee.focus()})};He(()=>{re(r(A),a(),s())});var ce=Be(),X=se(ce);{var ge=ee=>{let Me=v(()=>d()?"px-0":"");At(ee,{get className(){return`w-max btn-full-opacity btn-jc-l ${r(Me)??""}`},testId:"btn-episodes",click:L,disabled:!$,get ariaExpanded(){return s()},get ariaLabel(){return r(j)},get ref(){return r(A)},set ref(Pe){D(A,le(Pe))},children:(Pe,Ve)=>{var fe=Be(),Oe=se(fe);{var ie=Re=>{var de=z$(),Ke=se(de),oe=h(Ke,!0);g(Ke);var U=P(Ke,2),Y=h(U);yf(Y,{}),g(U),S(()=>ue(oe,r(W))),_(Re,de)},R=Re=>{var de=K$(),Ke=se(de);$f(Ke,{});var oe=P(Ke,2);{var U=Ae=>{var We=q$(),Fe=h(We,!0);g(We),S(()=>ue(Fe,r(W))),_(Ae,We)},Y=(Ae,We)=>{{var Fe=ye=>{var Ne=W$(),je=h(Ne,!0);g(Ne),S(()=>ue(je,u().length)),_(ye,Ne)};V(Ae,ye=>{r(Q)==="COUNT"&&ye(Fe)},We)}};V(oe,Ae=>{r(Q)==="FULL"?Ae(U):Ae(Y,!1)})}_(Re,de)};V(Oe,Re=>{d()?Re(ie):Re(R,!1)})}_(Pe,fe)},$$slots:{default:!0}})};V(X,ee=>{r(I)&&ee(ge)})}_(t,ce),F(),o()}var Qh=require("@vkontakte/videoplayer-shared");var Jt=require("@vkontakte/videoplayer-core"),pt=require("@vkontakte/videoplayer-shared"),Rr=require("@vkontakte/videoplayer-statistics");var ze=require("@vkontakte/videoplayer-shared"),Mi=require("@vkontakte/videoplayer-shared");var Nh=(t,e)=>t<400||e<225?5:t<640||e<360?0:t<960||e<540?1:t<1280||e<720?2:3;var G$="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Fc=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 Mi.Subject,loadStarted$:new Mi.Subject,loadEnded$:new Mi.Subject,loadError$:new Mi.Subject,ready$:new Mi.Subject,slotRequested$:new Mi.Subject,started$:new Mi.Subject,timeRemained$:new Mi.Subject,paused$:new Mi.Subject,resumed$:new Mi.Subject,ended$:new Mi.Subject,empty$:new Mi.Subject,skipped$:new Mi.Subject,clicked$:new Mi.Subject,closed$:new Mi.Subject,error$:new Mi.Subject};this.loadAdman=e=>(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[(0,ze.now)()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let n;this.events.loadStarted$.next();let a=()=>{clearTimeout(n),delete window.admanAsyncInit,window.AdmanHTML?(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[(0,ze.now)()]}),i(),this.events.loadEnded$.next()):(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[(0,ze.now)()]}),o())};(0,Mi.addScript)(G$,e,this.loadTimeout).then(()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[(0,ze.now)()]}),window.AdmanHTML?(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[(0,ze.now)()]}),i(),this.events.loadEnded$.next()):(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[(0,ze.now)()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout))}).catch(s=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(s)],numbers:[(0,ze.now)()]}),o(),clearTimeout(n)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let n;this.events.loadStarted$.next();let a=()=>{clearTimeout(n),delete window.admanAsyncInit,window.AdmanHTML?(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[(0,ze.now)()]}),i(),this.events.loadEnded$.next()):(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[(0,ze.now)()]}),o())},s=()=>{d=!0,o()},d=!1,l=window.setTimeout(()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[(0,ze.now)()]}),s()},this.loadTimeout);e.addEventListener("abort",s),e.aborted&&(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[(0,ze.now)()]}),s()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[(0,ze.now)()]}),!d&&(window.AdmanHTML?(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[(0,ze.now)()]}),i(),this.events.loadEnded$.next()):(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[(0,ze.now)()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout)))},s).finally(()=>{clearTimeout(n),clearTimeout(l),e.removeEventListener("abort",s)})});this.onAdsReady=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[(0,ze.now)()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[(0,ze.now)(),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"}),_e(this.playerState.isMobile)&&this.playerState.mobileUnmuteButtonVisible.set(!0)),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()):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{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=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",this.currentAdSection??""],numbers:[(0,ze.now)()]}),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=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",this.currentAdSection??""],numbers:[(0,ze.now)()]}),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(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[(0,ze.now)()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch{this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.log({message:"ad completed"}),this.currentAdSection?this.events.ended$.next(this.currentAdSection):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.log({message:"ad clicked"}),this.videoElement?.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[(0,ze.now)()]}),this.log({message:e}),this.events.error$.next(e),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[(0,ze.now)()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[(0,ze.now)(),e.slotId]}),this.adman)return;this.events.init$.next(),this.startWatchDog();let{width:i,height:o,isFullscreen:n,isAutoplay:a,adsContainer:s,adsVideoElement:d,slotId:l,params:c={},duration:u,previewParam:b}=e,p,$=this.playerState&&_e(this.playerState.vsid);$&&(this.isVsidOriginal?p=$:p=parseInt($,36));let{isEmbed:w,immediateOrigin:x}=(0,ze.detectEmbed)(),k=(w?x:window.location.href)??window.location.href,C={...c,dl:encodeURIComponent(k),autoplay:a?1:0,player_width:i,player_height:o,preview:b,...p?{request_id:p}:{},duration:u,puid10:Nh(i,o),puid11:n?0:1};b||delete C.preview;let E={slot:l,wrapper:s,videoEl:d,videoQuality:o,params:C,browser:{mobile:!1}};try{let A=new window.AdmanHTML;A.setDebug(!1),A.onReady(this.onAdsReady),A.onStarted(this.onAdStarted),A.onPlayed(this.onAdPlayed),A.onPaused(this.onAdPaused),A.adMidrollPoint(this.onAdMidrollPoint),A.onClosed(this.onAdClosed),A.onSkipped(this.onAdSkipped),A.onClicked(this.onAdClicked),A.onTimeRemained(this.onAdTimeRemained),A.onCompleted(this.onAdCompleted),A.onError(this.onAdError),A.init(E),this.adman=A,this.videoElement=d,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(E)}`})}catch(A){ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(A)],numbers:[(0,ze.now)()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",this.currentAdSection??"","force: "+e],numbers:[(0,ze.now)()]}),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.playerState.mobileUnmuteButtonVisible.set(!1),this.log({message:`switch to video, isPostroll: ${i}`}),i&&(this.adsState.postrollPassed.set(!0),this.log({message:"postroll passed"}));else{let o="Switch to video: Adman state was not updated correctly";this.log({message:o}),this.events.error$.next(o)}this.actions.switchFromAdsToVideo?.(!i)}}togglePlay(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.adsState){this.log({message:"toggle play"});let e=_e(this.adsState.playbackState);e==="playing"?this.pause():e==="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{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{this.onAdError("could not set ad fullscreen")}}startPreroll(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[(0,ze.now)()]}),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{this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch{this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&clearTimeout(this.watchDogTimeout),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch{this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch{this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch{this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){this.adman?.setPosition(Math.floor(e),Math.floor(i))}destroy(){ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[(0,ze.now)()]}),this.log({message:"destroy"}),this.stopWatchDog(),this.adman?.onReady(void 0),this.adman?.onStarted(void 0),this.adman?.onPlayed(void 0),this.adman?.onPaused(void 0),this.adman?.adMidrollPoint(void 0),this.adman?.onClosed(void 0),this.adman?.onSkipped(void 0),this.adman?.onClicked(void 0),this.adman?.onTimeRemained(void 0),this.adman?.onCompleted(void 0),this.adman?.onError(void 0),this.adman?.destroy(),this.videoElement&&(0,Mi.clearVideoElement)(this.videoElement),this.isDestroyed=!0}};var Dh=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 xf=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],n=e.split(this.twoLinesRegExp);for(let a of n){let s={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let l of d)if(!s.startTime&&!s.endTime){let c=new Uc,{startTime:u,endTime:b}=c.parse(l);s.startTime=u,s.endTime=b}else if(l.trim()!==""){let c=new wf,{texts:u}=c.parse(l);s.texts=[...s.texts,...u]}(s.startTime||s.endTime)&&s.texts.length>0&&o.push(s)}return o}},Uc=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",n="0"){let a=Number(e)*60*60,s=Number(i)*60,d=Number(o),l=+`0.${n}`;return a+s+d+l}},wf=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},n=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](s){let d=0,l=[];for(;d<s.length;){let c=["<",">"].reduce((u,b)=>{let p=s.indexOf(b,d);return u===-1||u>p?p:u},-1);if(c===-1){l.push(s.substring(d));break}l.push(s.substring(d,c)),d=c+1}return l}}),a=new Uc;for(let s of n)a.isTime(s)?i.texts.push({type:"timestamp",value:a.parseTime(s)}):i.texts.push({type:"text",value:s});return i}},Bh=xf;var qc=require("@vkontakte/videoplayer-shared"),ts,Yn,Sf=0,Cf=!1,Oh="",Hh=(t,e=0,i=0)=>t<e&&t<i,zc=(t,e=0,i=0)=>t>=e&&t<=i,j$=(t,e=0,i=0)=>t>e&&t>i,Fh=(t,e,i,o=!1)=>{let n=i.find(({id:d})=>d===e.value)?.subtitles;if(o)return n?.find(({startTime:l,endTime:c})=>zc(t,l,c));let a=t>=Sf,s=t<Sf;if(Sf=t,s&&(Cf=!1),(0,qc.isNonNullable)(ts)&&zc(t,ts.startTime,ts.endTime)&&Oh===e.value)return ts;if(!(0,qc.isNonNullable)(Yn)&&n?.length&&!Cf){Yn=n.find(({startTime:l,endTime:c})=>zc(t,l,c)||a&&Hh(t,l,c)),ts=void 0,!(0,qc.isNonNullable)(Yn)&&n[n.length-1].endTime<t&&(Cf=!0);return}else{if(zc(t,Yn?.startTime,Yn?.endTime))return ts=Yn,Yn=void 0,Oh=e.value,ts;(a&&j$(t,Yn?.startTime,Yn?.endTime)||s&&Hh(t,Yn?.startTime,Yn?.endTime))&&(Yn=void 0)}};var Wc={ru:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",en:"English",uk:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",be:"\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F (\u0442\u0430\u0440\u0430\u0448\u043A\u0435\u0432i\u0446\u0430)",es:"Espa\xF1ol",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438",hr:"Hrvatski",hu:"Magyar",sr:"\u0421\u0440\u043F\u0441\u043A\u0438",pt:"Portugu\xEAs",el:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC",pl:"Polski",fr:"Fran\xE7ais",ko:"\uD55C\uAD6D\uC5B4","zh-CN":"\u6C49\u8BED",lt:"Lietuvi\u0173",ja:"\u65E5\u672C\u8A9E",cs:"\u010Ce\u0161tina",et:"Eesti",tt:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",ba:"\u0411\u0430\u0448\u04A1\u043E\u0440\u0442\u0441\u0430",cv:"\u0427\u0103\u0432\u0430\u0448\u043B\u0430",sk:"Sloven\u010Dina",ro:"Rom\xE2n\u0103",no:"Norsk",lv:"Latvie\u0161u",az:"Az\u0259rbaycan dili",hy:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",sv:"Svenska",nl:"Nederlands",tk:"T\xFCrkmen",ka:"\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8",da:"Dansk",uz:"O\u2018zbek",th:"\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22",id:"Bahasa Indonesia",tg:"\u0422\u043E\u04B7\u0438\u043A\u04E3",sl:"Sloven\u0161\u010Dina",bs:"Bosanski","pt-BR":"Portugu\xEAs brasileiro",fa:"\u0641\u0627\u0631\u0633\u06CC",vi:"Ti\u1EBFng Vi\u1EC7t",hi:"\u0939\u093F\u0928\u094D\u0926\u0940",si:"\u0DC3\u0DD2\u0D82\u0DC4\u0DBD",bn:"\u09AC\u09BE\u0982\u09B2\u09BE",tl:"Tagalog",mn:"\u041C\u043E\u043D\u0433\u043E\u043B",my:"\u1017\u1019\u102C\u1005\u102C",tr:"T\xFCrk\xE7e",ne:"\u0928\u0947\u092A\u093E\u0932\u0940",ur:"\u0627\u0631\u062F\u0648",ky:"\u041A\u044B\u0440\u0433\u044B\u0437 \u0442\u0438\u043B\u0438",pa:"\u067E\u0646\u062C\u0627\u0628\u06CC",os:"\u0418\u0440\u043E\u043D",kn:"\u0C95\u0CA8\u0CCD\u0CA8\u0CA1",sw:"Kiswahili",kk:"\u049A\u0430\u0437\u0430\u049B\u0448\u0430",ar:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",he:"\u05E2\u05D1\u05E8\u05D9\u05EA",ab:"\u0410\u04A7\u0441\u0448\u04D9\u0430",eu:"Euskara",eo:"Esperanto"},Y$={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"},Kc=t=>Wc[t]??Wc[Y$[t]]??void 0;var Uh=require("@vkontakte/videoplayer-shared"),BR=require("@vkontakte/videoplayer-statistics"),Qc=class{constructor(e,i=new Uh.Subscription){this.oneStat=e;this.statSubscription=i}destroy(){this.oneStat.destroy(),this.statSubscription.unsubscribe()}};var cd=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(cd||{});var Vr=t=>t??0,Zs=(t,e)=>{let i=t?.getBoundingClientRect?.(),o=e?.getBoundingClientRect?.();return{top:Math.round(Vr(i?.top)-Vr(o?.top)),left:Math.round(Vr(i?.left)-Vr(o?.left)),bottom:Math.round(Vr(i?.bottom)-Vr(o?.top)),right:Math.round(Vr(i?.right)-Vr(o?.left))}},Xs=t=>{let e=t?.getBoundingClientRect?.();return{width:Vr(e?.width),height:Vr(e?.height)}};var zh=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:n,statAuthToken:a,isAudioDisabled:s,canDownload:d,callbacks:l,webApi:c,videoEpisodes:u,previewThumbsData:b,uiConfig:p,coreConfig:$,player:w,disabledControls:x,isInteractive:k,interactiveRanges$:C,isInteractiveTime$:E,replayInteractive:A,stopPlayer:L,hasInteractiveBranches:I,playPrevChapterDisabledTooltip:N,additionalButtons:W,additionalSettingsMenuItems:Q,additionalContextMenuItems:j,playPrevVideo:re,playNextVideo:ce,looped:X=!1,statistics:ge,saveRate:ee,internalsExposure:Me,playerView:Pe})=>{let Ve={...$,configName:[...$.configName??[],"ui"],isAudioDisabled:s,live:{...$.live??{},isLiveCatchUpMode:!!n}},fe=p,Oe=pt.Tracer.createRootTracer(fe.features.saveTraceInfoToFile),ie=Oe.createComponentTracer("Store"),R=w||new Jt.Player(Ve,Oe);Me?.expose({corePlayer:R});let Re=new pt.Logger,de=new Fc(Re,{loadTimeout:fe.ads.loadTimeout,initTimeout:fe.ads.initTimeout,runtimeTimeout:fe.ads.runtimeTimeout,useAdmanFromNPM:fe.ads.useAdmanFromNPM,volumeMultiplier:fe.ads.volumeMultiplier,isVsidOriginal:fe.ads.isVsidOriginal}),Ke=za.getInstance(),oe=c?.pictureInPictureApi,U=c?.annotationsApi,Y=Re.createComponentLog("Store"),Ae,We,Fe={},ye=new $c,Ne=ge?Ut(ge.oneStat.vsid$):Gn(void 0),je=ne(aa()),et=ne(!1),ct=oe?.info.isActive$??new pt.ValueSubject(!1),mt=ne(0),Je=ne([]),ut=(0,pt.merge)(R.events.fatalError$,R.events.managedError$).subscribe(f=>Je.update(T=>[...T,f])),$t=Gn(!1,f=>{let T=R.events.fatalError$.subscribe(()=>f(!0));return()=>T.unsubscribe()}),Ot=async f=>{let T=Object.values(pt.InterfaceLanguage).includes(f);if(fe.downloadVKLanguages&&(T&&fe.updateBuiltinLanguages||!Ep(f))){let xe;try{xe=await(0,pt.loadVKLangPack)(f,kg,Tg)}catch(at){ge?.oneStat?.logError({errorType:"VKLangPack",fatal:!1}),Ke?.report(at,{errorType:"VKLangPack",fatal:!1})}xe&&(Ip({language:f,pack:xe,fallback:fe.defaultLanguage}),we.set(f))}Ep(f)&&we.set(f)},we=ne(t),Dt=ne(e);Ot(t);let ft=(f,T)=>{let B=_e(we);return Pp(B,f,T,fe.defaultLanguage)},K=ne("thumb"),he=(()=>{let f=li([$t,K],([T,B])=>T?"crashed":B);return{...f,is:T=>_e(f)===T}})(),ae=(()=>{let f=ne(new Set(x));return{...f,add:T=>{f.update(B=>new Set([...B].concat(T)))},remove:T=>{f.update(B=>{let xe=[...B];return new Set(Array.isArray(T)?xe.filter(at=>!T.includes(at)):xe.filter(at=>at!==T))})},includes:T=>{let B=_e(f);return Array.isArray(T)?T.every(xe=>B.has(xe)):B.has(T)}}})();ie.log("create store"),Y({message:"create store"});let qe=f=>{let T=f.container;T.append(R.experimental.element$.getValue()),gt=new MutationObserver(B=>{let{removedNodes:xe}=B[0];xe.length&&T.append(R.experimental.element$.getValue())}),gt.observe(T,{childList:!0})},Xe=f=>{Y({message:`init video, config: ${JSON.stringify(f)}`}),k?qe(f):(pt.devNull.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[(0,pt.now)()]}),R.initVideo(f)),ie.log("init video",{isInteractive:k}),f.subtitles&&R.setExternalTextTracks(f.subtitles),Ae=f},Ue=new pt.Subject,Se=f=>Ue.next(f),Ye=new pt.Subject,Ee=new pt.Subject,lt=new pt.Subject,gt=null,St={actionRewind$:Ye,actionSeek$:Ee,inPiP$:ct,inFullscreen$:new pt.Observable(f=>je.subscribe(T=>f.next(T))),actionSetSubtitle$:lt,nextMovie$:Ue};if(ge){let{oneStat:f,statSubscription:T}=ge;k||T.add(f.attachTo(R)),T.add(f.attachToUi(St)),T.add(f.attachToAds(de.events)),f.authorize(a).catch(B=>{Y({message:`onestat auth error ${String(B)}`})})}if(Ke){let f=new pt.Subscription,T=(B,xe)=>f.add(B.subscribe(xe));if(T(R.events.managedError$,B=>{Ke.logIError(B)}),T(R.events.fatalError$,B=>{Ke.logIError(B,!0)}),ge){let{oneStat:B}=ge;T(B.experimental.error$,xe=>{Ke.logIError(xe)})}Ke.sentrySubscription.add(f)}let oi=()=>{Jt.clientChecker.device.isIOS&&We&&dh(We).catch(f=>{Y({message:`exitIosSafariFullscreen failed: ${f}`})})},ti=new pt.Subscription().add(R.experimental.element$.subscribe(f=>{f&&(We=f,f.classList.add("player-media"),Wa(oe)&&(oe.updateVideoElement(),oe.registryEventHandlers()),k&&f.setAttribute("pip","false"),Pe==="preview"&&(f.setAttribute("disablePictureInPicture","true"),f.setAttribute("x-yandex-pip","false")))})).add(R.events.ended$.subscribe(()=>{oi(),l?.onEnded?.()})).add(R.events.looped$.subscribe(()=>{l?.onLooped?.()})).add(R.events.started$.subscribe(async()=>{Wa(oe)&&await oe?.revealPictureInPicture();let f=R.info.muted$.getValue();l?.onStarted?.(),Fe.onStarted?.(f)})).add(R.events.willSeek$.subscribe(({from:f,to:T})=>{l?.onSeek?.(f,T)})).add(R.events.autoplaySoundProhibited$.subscribe(()=>{l?.onAutoplaySoundProhibited?.()})).add(R.info.position$.subscribe(f=>{let T=R.info.duration$.getValue();isFinite(T)&&T>0&&(l?.onTimeupdate?.(T,f),de.setPosition(f,T))})).add(R.events.fatalError$.subscribe(f=>{l?.onCrashed?.(f?`${f.id}: ${f.message}`:void 0)})).add(R.events.fetcherRecoverableError$.subscribe(f=>{l?.onRecoverableError?.(f?`${f.id}: ${f.message}`:void 0)})).add(R.events.loadedMetadata$.subscribe(()=>{xt.state.loadedMetadata$.set(!0)})).add(R.info.is3DVideo$.subscribe(f=>{xt.ui.is3DVideo.set(f)})).add(R.info.isEnded$.subscribe(f=>{k&&(f?(E?.getValue()&&ae.add(Bl),ae.add("PLAY_BUTTON")):ae.remove("PLAY_BUTTON"))})).add(R.info.liveTime$.subscribe(f=>{l?.onLiveTime?.(f)})).add(R.info.isStalled$.subscribe(f=>{l?.onStalledChanged?.(f)})).add(R.info.isLiveEnded$.subscribe(f=>f&&l?.onLiveEnded?.())).add(de.events.loadStarted$.subscribe(()=>l?.adsInfo?.onLoadStarted?.())).add(de.events.loadEnded$.subscribe(()=>l?.adsInfo?.onLoadEnded?.())).add(de.events.loadError$.subscribe(()=>l?.adsInfo?.onLoadError?.())).add(de.events.init$.subscribe(()=>l?.adsInfo?.onInit?.())).add(de.events.ready$.subscribe(()=>l?.adsInfo?.onReady?.())).add(de.events.started$.subscribe(f=>l?.adsInfo?.onStarted?.(f))).add(de.events.timeRemained$.subscribe(f=>l?.adsInfo?.onTimeRemained?.(f))).add(de.events.ended$.subscribe(f=>l?.adsInfo?.onCompleted?.(f))).add(de.events.empty$.subscribe(()=>l?.adsInfo?.onEmpty?.())).add(de.events.clicked$.subscribe(f=>l?.adsInfo?.onClicked?.(f))).add(de.events.closed$.subscribe(f=>l?.adsInfo?.onClosed?.(f))).add(de.events.error$.subscribe(f=>l?.adsInfo?.onError?.(f))).add(de.events.paused$.subscribe(()=>l?.adsInfo?.onPaused?.())).add(de.events.resumed$.subscribe(()=>l?.adsInfo?.onResumed?.())),Bi=new pt.Subscription,un=()=>{let{debugLog:f}=fe,T,B="#9df7b7",xe="#efd169";if(f&&f!==!0){let{colors:wt}=f;T=f.tag,B=wt?.[0]??B,xe=wt?.[1]??wt?.[0]??xe}let at=T?`: ${T}`:"";Bi.add(R.events.log$.subscribe(wt=>{console.debug(`%c sdk${at} `,`background:${B};`,`sdk component: ${wt.component}`,wt.message)})).add(Re.log$.subscribe(wt=>{console.debug(`%c ui${at} `,`background:${xe};`,`ui component: ${wt.component}.`,wt.message)}))},pn=()=>{Bi.unsubscribe()},Wo=(f,T)=>{ie.log("start camera manual rotation",{mx:f,my:T}),R.startCameraManualRotation(f,T)},wo=(f=!1)=>{ie.log("stop camera manual rotation",{immediate:f}),R.stopCameraManualRotation(f)},Gi=(f,T,B)=>{ie.log("move camera focus px",{xpx:f,ypx:T,dt:B}),R.moveCameraFocusPX(f,T,B)},So=()=>{R.holdCamera()},Ko=()=>{R.releaseCamera()},zt=Gn(R.info.position$.getValue(),f=>{let T,B,xe=()=>{let at=R.info.playbackState$.getValue(),wt=R.info.isLive$.getValue(),Ht=R.info.duration$.getValue(),Xt=R.info.position$.getValue();if(at&&[Jt.PlaybackState.PLAYING,Jt.PlaybackState.PAUSED].includes(at)){let $o=wt?Xt-Ht:R.getExactTime();$o!==B&&f($o),B=$o}T=requestAnimationFrame(xe)};return xe(),()=>cancelAnimationFrame(T)}),Co=Ut(R.info.playbackState$),Qo=Ut(R.info.currentBuffer$),G=Ut(R.info.isEnded$),Wt=Ut(R.info.isLive$),Gt=fe.features.playbackRate?Ut(R.info.canChangePlaybackSpeed$):Gn(!1),ji=Ut(R.info.liveBufferTime$),ii=Ut(R.info.volume$),ei=Ut(R.info.muted$),Si=yc(R.info.predefinedQualityLimitType$.pipe((0,pt.map)(f=>f===Jt.PredefinedQualityLimits.TRAFFIC_SAVING)),R.info.predefinedQualityLimitType$.getValue()===Jt.PredefinedQualityLimits.TRAFFIC_SAVING),It=yc(R.info.predefinedQualityLimitType$.pipe((0,pt.map)(f=>f===Jt.PredefinedQualityLimits.HIGH_QUALITY)),R.info.predefinedQualityLimitType$.getValue()===Jt.PredefinedQualityLimits.HIGH_QUALITY),Mn=Ut(R.info.autoQualityLimitingAvailable$),Ct=Ut(R.info.availableQualities$),Ft=Ut(R.info.availableQualitiesFps$),_i=Ut(R.info.chromecastState$),ko=Ut(R.info.chromecastDeviceName$),fn=Ut(R.info.currentFormat$),Vi=Ut(R.info.throughputEstimation$),oo=Ut(R.info.videoBitrate$),jt=Ut(R.info.intrinsicVideoSize$),ht=Ut(R.info.duration$),no=Ut(R.info.isAudioAvailable$),fi=null,ci=R.info.isBuffering$,To=Gn(ci.getValue(),f=>{let T=ci.subscribe(B=>{B&&fi===null?fi=window.setTimeout(()=>{f(ci.getValue()),fi=null},fe.loaderDelay):f(B)});return()=>{T.unsubscribe(),fi&&clearTimeout(fi)}}),Oi=()=>{fi&&clearTimeout(fi),fi=null},Ci=li([ht,Wt],([f,T])=>T?-f:f),mn=li([Co],([f])=>f===Jt.PlaybackState.PLAYING),vn=Ut(R.info.atLiveEdge$),bi=Ut(R.info.atLiveDurationEdge$),Go=Ut(R.info.position$),ro=li([Go,ht],([f,T])=>isFinite(f)&&isFinite(T)&&!!T),ao=li([_i],([f])=>f===Jt.ChromecastState.CONNECTED),_r=Ut(R.info.availableVideoStreams$),Zn=fe.features.audioLanguages?Ut(R.info.availableAudioStreams$):Gn([]),gn=Ut(R.info.currentVideoStream$),Ln=Ut(R.info.currentAudioStream$),Vn=f=>{f.language&&Tp(f.language),R.setVideoStream(f)},Yi=f=>{f.language&&Tp(f.language),R.setAudioStream(f)},Io=f=>{let T;if(f.length===1&&(T=f.at(0)),T??=f.find(xe=>"isDefault"in xe&&xe.isDefault),T)return T;let B=Zg();return B&&(T=f.find(({language:xe})=>B===xe)),T??=f.at(0),T},hn=!1;ti.add(R.info.availableAudioStreams$.subscribe(f=>{if(!hn&&f.length){let T=Io(f);T&&(R.setAudioStream(T),hn=!0)}}));let it=!1;ti.add(R.info.availableVideoStreams$.subscribe(f=>{if(!it&&f.length){let T=Io(f);T&&(R.setVideoStream(T),it=!0)}}));let Eo=ne(void 0),jo=Ut(R.info.isAutoQualityEnabled$,f=>f&&Eo.set(void 0)),_n=Ut(R.info.currentQuality$,()=>Eo.set(void 0)),Xn=li([Eo,_n],([f,T])=>f??T),Po=li(fn,f=>f!==Jt.VideoFormat.MPEG),Rn=li([Ct,Ft,jo,Xn,Po],([f,T,B,xe,at])=>{let wt=[];at&&wt.push({value:"auto",displayValue:ft("auto_quality_option"),selected:B});let Ht=f.filter(Xt=>!(0,pt.isInvariantQuality)(Xt));for(let Xt of Ht){let $o=T[Xt];wt.push({value:Xt,displayValue:`${Xt}${$o?Dh($o):""}`,selected:B?!1:Xt===xe})}return wt}),Yo=Ut(R.info.currentPlaybackRate$),bn=li([Yo,vn,bi],([f,T,B])=>{let xe=B||k?1:fe.controls.playbackRateMin,at=T?1:fe.controls.playbackRateMax,wt=fe.controls.playbackRateStep,Ht=[];for(let Xt=xe;Xt<=at;Xt+=wt)Ht.push({value:Xt,displayValue:Xt===1?ft("playback_rate_1"):ft("playback_rate",{multiplier:Xt.toString(10)}),selected:f===Xt});return Ht}),$i={displayValue:ft("subtitles_off"),value:"off"},Ri=ne({...$i}),$n=fe.features.subtitles?Ut(R.info.availableTextTracks$):Gn([]),vo=Ug(),yn=li([$n,Ri],([f,T],B)=>{let xe=[],at=f.find(({id:wt})=>wt===T.value);if(at?.url){let[,wt]=vo.find(at.url)??[];if(wt){B(wt);return}ye.download(at.url).then(Ht=>{if(!Ht||ye.isDestroyed())return;let Xt=new Bh,$o=at.language;if($o){let xu=!!at.isAuto,L1=Xt.parse(Ht,$o);xe.push({lang:$o,subtitles:L1,isAuto:xu,id:at.id})}vo.add(at.url,xe),_e(Ri).value===T.value&&B(xe)}).catch(Ht=>{ge?.oneStat?.logError({errorType:"Subtitles download",fatal:!1}),Ke?.report(Ht,{errorType:"Subtitles download",fatal:!1})})}B(xe)}),Ao=li([Yo,mn,Ri],([f,T,B],xe)=>{let Ht;if(R.info.isLive$.getValue()&&T&&B.value!==$i.value){let $o=()=>{let xu=1e3/(3*f);Ht=setTimeout($o,xu),xe(Date.now())};return $o(),()=>clearTimeout(Ht)}}),go=li([$n,Ri],([f,T])=>{if(!f.length)return[];let B=[];for(let{language:xe,isAuto:at,id:wt}of f){let Ht=xe&&Kc(xe);xe&&Ht&&B.push({displayValue:at?ft("subtitles_auto",{language:Ht}):Ht,value:wt,selected:T?.value===wt,isAuto:at})}return B.length?(B.unshift({...$i,selected:T?.value===$i.value}),B):[]}),ni={available:[],prev:[]},Nn=()=>R.experimental.getCurrentTime$.getValue()?.()??We?.currentTime??0,so=li([zt,Ri,yn,Ao],([f,T,B,xe])=>{let at=R.info.isLive$.getValue();if(at&&ni.prev!==B){let wt=B.find(({id:Xt})=>Xt===T.value),Ht=ni.prev.find(({id:Xt})=>Xt===T.value);if(wt){let Xt={...wt,subtitles:[...Ht?.subtitles??[],...wt.subtitles]};ni.available=[Xt],ni.prev=B}}if(T&&T.value!==$i.value){let wt=at?Nn():f,Ht=at?ni.available:B;return Fh(wt,T,Ht,at)}}),Jn=li([so],([f])=>f?.texts?f.texts:[]);ti.add(Ri.subscribe(f=>{if(f.value===$i.value)l?.onSubtitleOff?.();else{let T=Object.entries(Wc).find(([B,xe])=>xe===f.displayValue);l?.onSubtitleOn?.(T?T[0]:"")}}));let Zo=ne(!0),Xo=li([Qo,Ci,Go,ji],([f,T,B,xe])=>{let at=f?.end??0;if(!xe)return at/T;let Ht=-B+xe-T;return(at-Ht)/T}),er=Ut(R.info.availableSources$),Mo=li([er],([f])=>Object.keys(f?.[Jt.VideoFormat.MPEG]||{}).length>0),br=()=>{let f=Object.keys(R.info.availableSources$?.getValue()?.[Jt.VideoFormat.MPEG]||{}),T=(0,pt.getHighestQuality)(f)||pt.VideoQuality.Q_144P;return Ae.sources[Jt.VideoFormat.MPEG]?.[T]},xn=()=>{let f=br();if(f)ie.log("download video",{url:f}),Og(f,Ae?.meta?.title||"video");else{let T="There is no URL for download video";ie.log("download video",{message:T}),Y({message:T})}},Dn=()=>{Y({message:"toggle muted"});let f=R.info.muted$.getValue();R.info.volume$.getValue()===0&&!f?Yt(On()):ho(!f)},tr=()=>{if(xt.ui.settingsMenu.visible$.set(!1),!_e(xt.ui.settingsSubMenu.visible$)){let f=_e(xt.ui.settingsMenu.ref$);if(l?.uiInfo?.onSettingsMenu&&f){let B=Xs(f),xe={top:0,left:0,bottom:0,right:0};l.uiInfo.onSettingsMenu({visible:!1,size:B,position:xe,name:"settings"})}}ie.log("close settings menu")},$r=async(f,T=()=>Promise.resolve())=>{xt.ui.settingsMenu.openedByBtnKeyboard$.set(!!f),xt.ui.settingsMenu.visible$.set(!0),await T();let B=_e(xt.ui.settingsMenu.ref$),xe=$a();if(l?.uiInfo?.onSettingsMenu&&B&&xe){let wt=Xs(B),Ht=Zs(B,xe);l.uiInfo.onSettingsMenu({visible:!0,size:wt,position:Ht,name:"settings"})}ie.log("open settings menu",{wasOpenedByKeyboard:f})},Bn=(f,T=!1)=>{xt.ui.settingsSubMenu.visible$.set(!1);let B=_e(xt.ui.settingsMenu.ref$),xe=$a(),at=_e(xt.ui.settingsMenu.visible$);if(l?.uiInfo?.onSettingsMenu&&B&&xe)if(at&&!T){let Ht=Xs(B),Xt=Zs(B,xe);l.uiInfo.onSettingsMenu({visible:!0,size:Ht,position:Xt,name:"settings"})}else{let Ht=Xs(f),Xt={top:0,left:0,bottom:0,right:0},$o=_e(xt.ui.settingsSubMenu.name$);l.uiInfo.onSettingsMenu({visible:!1,size:Ht,position:Xt,name:$o})}ie.log("close settings sub menu")},Jo=(f,T)=>{xt.ui.settingsSubMenu.visible$.set(!0),xt.ui.settingsSubMenu.ref$.set(T),xt.ui.settingsSubMenu.name$.set(f);let B=$a();if(l?.uiInfo?.onSettingsMenu&&T&&B){let at=Xs(T),wt=Zs(T,B);l.uiInfo.onSettingsMenu({visible:!0,name:f,size:at,position:wt})}ie.log("open settings sub menu",{name:f})},On=()=>{let f=Math.max(fe.volumeMinRestore,xc()??0);return f===0?fe.volumeDefault:f},Yt=f=>{let T=f===0?On():f,B=R.info.muted$.getValue();Y({message:`set volume, volume: ${f}, preferredVolume: ${T}`}),B&&f>0&&!s&&(B=!1,Cp(!1)),R.setVolume(f,B),de.setVolume(f),$p(T)},ho=f=>{let T=R.info.volume$.getValue();if(Y({message:`set muted, currentVolume: ${T}, mute: ${f}`}),R.setMuted(f),de.setVolume(f?0:T),Cp(f),!f&&T===0){let B=On();R.setVolume(B),$p(B),de.setVolume(B)}},Ze=ne(!1),Mt=f=>{ie.log("set looped",{isLooped:f}),Ze.set(f),R.setLooped(f),l?.uiInfo?.onLoopedChanged?.(f)};Mt(X);let mi=()=>{l?.uiInfo?.onReportProblem?.()},lo=(f,T=!1)=>{Y({message:`set autoplayNextEnabled, value: ${f}`}),ie.log("set autoplay next enabled",{autoplayNextEnabled:f}),xt.ui.autoplayNextEnabled$.set(f),eh(f),T&&l?.onSetAutoplayNextEnabled?.(f)},nt=f=>{Y({message:`set timerNextVideoRunning, value: ${f}`}),ie.log("set timer next video running",{timerNextVideoRunning:f}),xt.ui.timerNextVideoRunning$.set(f)},Et=(f=!0)=>{let T=!0;if(f&&l?.onPrevVideoClick)try{T=l?.onPrevVideoClick?.()}catch{Y({message:"onPrevVideoClick callback failed to execute"})}if(!T)return;f&&ki("prev")||re()},yi=(f=!0)=>{let T=!0;if(f&&l?.onNextVideoClick)try{T=l?.onNextVideoClick?.()}catch{Y({message:"onNextVideoClick callback failed to execute"})}if(!T)return;f&&ki("next")||ce()},ki=f=>{let{isMobile:T,features:{playbackStatusNextVideoShow:B,playbackStatusShow:xe}}=fe;return B&&xe&&!T?(xt.ui.aboutToGoNextVideo.set(f),xt.ui.userActionsDisabled.set(!0),!0):!1},Ti=()=>{l?.onNextVideoAnnouncementShow?.()},Ii=()=>{l?.onNextVideoAnnouncementClick?.()},Ni=()=>{l?.onNextVideoAnnouncementAuto?.()},Lo=()=>{l?.onNextVideoAnnouncementCancel?.()},en=()=>{R.prepare()},Zi=()=>{(0,pt.assertNonNullable)(xt);let f=_e(xt.ui.controls.disabledControls$),T=_e(xt.playerPhase),B={playerPhase:T,isInteractive:k,isVideoEnded:!1,action:"none"};if(f.has("PLAY_BUTTON"))return;if(Y({message:"toggle play"}),T==="ads"){B.action="play",ie.log("toggle adman play",B),de.togglePlay();return}let xe=()=>{Y({message:"toggle play, call player.play"}),B.action="play",R.play(),l?.onPlay?.()},at=()=>{Y({message:"toggle play, call player.pause"}),B.action="pause",R.pause(),l?.onPause?.()};if(R.info.isEnded$.getValue()){if(Y({message:"toggle play, video ended, seek to 0"}),Ye.next(),Ee.next(Rr.SeekAction.REWIND),k){A?.();return}R.seekTime(0),xe()}else R.info.playbackState$.getValue()!==Jt.PlaybackState.PLAYING?xe():at();ie.log("toggle play",B)},Hn=(f,{changeReason:T="default",appliesTo:B="to-video"}={})=>{Y({message:`set quality, quality: ${f}`}),ie.log("set quality",{quality:f}),R.setAutoQuality(f==="auto"),f!=="auto"?(fe.features.qualityDetailsSubMenuEnabled?(wc({type:"exact_quality",quality:f,videoId:i},B),Fl(),R.setPredefinedQualityLimits(Jt.PredefinedQualityLimits.UNKNOWN)):yp(i,f),Eo.set(f),R.setQuality(f)):fe.features.qualityDetailsSubMenuEnabled?T==="default"&&(Fn("auto_quality",B),_e(Si)&&ir(!1),_e(It)&&Hi(!1)):Fl()},ir=(f,T="as-default")=>{Y({message:`set trafficSavingEnabled, value: ${f}`}),ie.log("set traffic saving enabled",{trafficSavingEnabled:f});let B=f?Jt.PredefinedQualityLimits.TRAFFIC_SAVING:Jt.PredefinedQualityLimits.UNKNOWN;fe.features.qualityDetailsSubMenuEnabled?(tn(B,T),Hl(!1)):(R.setPredefinedQualityLimits(B),Hl(f))},Hi=(f,T="as-default")=>{Y({message:`set highQualityEnabled, value: ${f}`}),ie.log("set high quality enabled",{highQualityEnabled:f}),tn(f?Jt.PredefinedQualityLimits.HIGH_QUALITY:Jt.PredefinedQualityLimits.UNKNOWN,T)},tn=(f,T)=>{f!==Jt.PredefinedQualityLimits.UNKNOWN&&(_e(Mn)&&!_e(jo)&&Hn("auto",{appliesTo:T,changeReason:"limit-changed"}),Fn(f,T)),R.setPredefinedQualityLimits(f)},Fn=(f,T)=>{wc({type:f,videoId:i},T),T==="as-default"&&wc({type:f,videoId:i},"to-video")},or=f=>{ie.log("set playback rate",{playbackRate:f}),R.setPlaybackRate(f),fe.features.saveRate&&ee&&!R.info.isLive$.getValue()&&Xg(f)},yr=()=>{let f=_e(bn),T=f.findIndex(({selected:xe})=>xe);if(T===f.length-1)return;let B=f[T+1];or(B.value)},wn=()=>{let f=_e(bn),T=f.findIndex(({selected:xe})=>xe);if(T===0)return;let B=f[T-1];or(B.value)},on=(f={...$i,selected:!1})=>{ie.log("set subtitles",{...f}),f&&f.value!==$i.value&&lt.next(f.isAuto?f.value+"_auto":f.value),Ri.set(f)},nr=()=>{ie.log("toggle subtitles");let f=_e(go),T=_e(Ri),B=_e(we);if(T?.value===$i.value){let xe=f.filter(at=>at.value!==$i.value).find(at=>at.value===B)||f[1];on(xe)}else on()},_o=(f,T,B=!0)=>{if(Y({message:`seek to time, time: ${f}`}),ie.log("seek to time",{time:f,action:T,forcePrecise:B}),Ee.next(T),R.info.isLive$.getValue()){let xe=R.info.duration$.getValue(),at=Math.min(0,xe+f);R.seekTime(at,B)}else{if(E?.getValue())return;R.info.isEnded$.getValue()&&(Y({message:"seek after ended, call callbacks.onPlay"}),l?.onPlay?.()),R.seekTime(qm(f),B)}},xr=f=>{Y({message:`seek to episode start time: ${f}`}),ie.log("seek to episode start time",{time:f}),_o(f,Rr.SeekAction.EPISODE,!0)},bo=(f,T)=>{Y({message:`seek to percent, percent: ${f}`}),ie.log("seek to percent",{percent:f,action:T});let B=_e(Ci)*f;_o(B,T,!1)},rr=f=>{Y({message:`seek external, time: ${f}`}),ie.log("seek external",{time:f}),Ee.next(Rr.SeekAction.UNKNOWN),R.seekTime(R.info.isLive$.getValue()?-f:f)},wr=f=>{let T=f.max??"none",B=f.min??"none";Y({message:`set auto quality limitation. Max: ${T}. Min: ${B}`}),ie.log("set auto quality limits",{max:T,min:B}),R.setAutoQualityLimits(f)},Nr=f=>{Y({message:`seek external to episode start time: ${f}`}),ie.log("seek external to episode start time",{time:f}),_o(f,Rr.SeekAction.EPISODE,!0)},ar=f=>{Y({message:`set playback rate to: ${f}`}),ie.log("set playback rate external",{playbackRate:f}),R.setPlaybackRate(f)},Di=ne(void 0),nn=ne(!1),rt=f=>{Y({message:`start scrubbing, progress: ${f}`}),ie.log("start scrubbing",{progress:f}),nn.set(!0),Nt(f)},Nt=f=>{Di.set(f)},vi,co,Vo=()=>{Di.set(void 0),nn.set(!1)},Ce=()=>{clearTimeout(co),clearTimeout(vi),vi=window.setTimeout(()=>{Vo()},500),We?.removeEventListener("seeked",Ce)},Bt=f=>{Y({message:`complete scrubbing, progress: ${f}`}),ie.log("complete scrubbing",{progress:f}),bo(f,Rr.SeekAction.SLIDER),_e(xt.ui.isMobile)&&_e(xt.state.currentFormat$)===Jt.VideoFormat.HLS?(We?.addEventListener("seeked",Ce),co=window.setTimeout(()=>{Ce()},300)):Vo()},xi=li([zt,Ci,Di],([f,T,B],xe)=>{xe((0,pt.isNonNullable)(B)?B*T:f)}),Zt=ne(!1),Ie=()=>{Zt.set(!0)},Pt=()=>{Zt.set(!1)},qt=ne({width:0,height:0}),di=li([qt],([{width:f}],T)=>{let B=Eh(f);T(B)}),Kt=ne(!1),Un=W.filter(f=>Hg(f)),Fi=li([di,Kt],([f,T])=>T?Un.filter(B=>!B.hideOnMobile):Un.filter(B=>!B.hideOnDesktopGridTypes?.includes(f))),uo=ne(W.filter(f=>Fg(f))),ms=li([uo,di],([f,T])=>f.filter(B=>!B.hideOnDesktopGridTypes?.includes(T))),vs=li([ms,Fi],([f,T])=>[...fe.features.additionalButtonsDesktopControlPanelRight?f.filter(B=>B.type==="desktop-control-panel-right"):[],...fe.features.additionalButtons?T.map((B,xe)=>({id:xe,weight:xe,type:"desktop-control-panel-right",testId:B.testId,icon:B.iconUrl,onClick:B.onClick,ariaLabel:B.ariaLabel??B.tooltip,tooltipText:B.tooltip})):[]]),Sn=ne(Q),Dr=li([Sn],([f])=>fe.features.additionalSettingsMenuItems?f.map(T=>T.type==="SWITCH"?{...T,onClick:T.onChangeEnabled}:T):[]),gs=(f,T)=>{let B=_e(uo).map(xe=>xe.id!==f?xe:{...xe,...T});uo.set(B)},ha=f=>{let T=_e(uo);if(T.some(B=>B.id===f.id)){Y({message:`Additional button with id: "${f.id}" was exist! Can't add more with the same id`});return}T.push(f),uo.set(T)},dl=f=>{let T=_e(uo);if(!T.some(B=>B.id===f)){Y({message:`Can't find additional button with id: "${f}"! Can't remove item with this id`});return}T=T.filter(B=>B.id!==f),uo.set(T)},hs=f=>{Ee.next(Rr.SeekAction.LIVE),Y({message:"live switch to low latency "+f}),ie.log("live switch to low latency "+f),R.setLiveLowLatency(f)},cl=(f,T)=>{let B=_e(Sn).map(xe=>xe.id!==f?xe:{...xe,...T});Sn.set(B)},_a=f=>{let T=_e(Sn);if(T.some(B=>B.id===f.id)){Y({message:`Settings menu item with id: "${f.id}" was exist! Can't add more with the same id`});return}T.push(f),Sn.set(T)},ul=f=>{let T=_e(Sn);if(!T.some(B=>B.id===f)){Y({message:`Can't find settings menu item with id: "${f}"! Can't remove item with this id`});return}T=T.filter(B=>B.id!==f),Sn.set(T)},zn=ne(j),kt=li([zn],([f])=>fe.features.additionalContextMenuItems?f:[]),yt=(f,T)=>{let B=_e(zn).map(xe=>xe.id!==f?xe:{...xe,...T});zn.set(B)},Cn=f=>{let T=_e(zn);if(T.some(B=>B.id===f.id)){Y({message:`Context menu item with id: "${f.id}" was exist! Can't add more with the same id`});return}T.push(f),zn.set(T)},Sr=f=>{let T=_e(zn);if(!T.some(B=>B.id===f)){Y({message:`Can't find context menu item with id: "${f}"! Can't remove item with this id`});return}T=T.filter(B=>B.id!==f),zn.set(T)},ba=li([Kt,$t],([f,T],B)=>{B(f&&T)}),Cr=()=>{Ee.next(Rr.SeekAction.LIVE),Y({message:"switch to active live"}),ie.log("switch to active live"),R.seekTime(0),R.info.playbackState$.getValue()!==Jt.PlaybackState.PLAYING&&xt.actions.internal.togglePlay()},kr=()=>{ie.log("skip adman"),de.skip()},Jr=(f=!0)=>{(0,pt.assertNonNullable)(xt),Y({message:`switch from ads to video, callPlay: ${f}`}),ie.log("switch from ads to video",{callPlay:f}),K.set("video"),f&&R.play()},pl=()=>{(0,pt.assertNonNullable)(xt),Y({message:"switch from video to ads"}),ie.log("switch from video to ads"),xt.actions.internal.pause(),oi(),K.set("ads")},Od=f=>{(0,pt.assertNonNullable)(xt);let T=f?"LiveWaitingStart":"thumb";ie.log("set live waiting start",{state:f,playerPhase:T}),K.set(T)},_u=f=>{(0,pt.assertNonNullable)(xt);let T=f?"LiveWaitingRecover":"thumb";ie.log("set live waiting recover",{state:f,playerPhase:T}),K.set(T)},Hd=f=>{(0,pt.assertNonNullable)(xt);let T=f?"LiveWaitingRecord":"thumb";ie.log("set live waiting record",{state:f,playerPhase:T}),K.set(T)},bu=()=>((0,pt.assertNonNullable)(xt),ie.log("get debug text data"),Dg(R,Ae,xt)),Fd=()=>((0,pt.assertNonNullable)(xt),JSON.stringify(Oe.getFinishedSpans())),$u=()=>((0,pt.assertNonNullable)(xt),Bg(R,Ae,xt)),$a=()=>We,Ud=()=>{Y({message:"toggle chromecast"}),ie.log("toggle chromecast"),R.toggleChromecast()},fl=f=>{if((0,pt.assertNonNullable)(xt),R.info.isEnded$.getValue())return;let T=!f;if(_e(xt.playerPhase)==="ads"){Y({message:`pause ads, internalCall: ${T}`}),ie.log("pause ads",{internalCall:T}),de.pause();return}Y({message:`pause video, internalCall: ${T}`}),ie.log("pause video",{internalCall:T}),T&&l?.onPause?.(),R.pause()},zd=f=>{(0,pt.assertNonNullable)(xt);let T=!f;if(_e(xt.playerPhase)==="ads"){Y({message:`play ads, internalCall: ${T}`}),ie.log("play ads",{internalCall:T}),de.play();return}Y({message:`play video, internalCall: ${T}`}),ie.log("play video",{internalCall:T}),T&&l?.onPlay?.(),R.play()},qd=f=>{(0,pt.assertNonNullable)(xt);let T=!f;if(_e(xt.playerPhase)==="ads"){Y({message:"player cannot be stopped during ads via external method"});return}Y({message:`player will be stopped, internalCall: ${T}`}),L?.()},Wd=(f,T)=>{(0,pt.assertNonNullable)(xt),Y({message:`first start, show ads: ${f}, internalCall: ${!T}`}),ie.log("first start",{showAds:f,external:T}),f?K.set("ads"):(K.set("video"),T?R.play():xt.actions.internal.togglePlay())},_s=()=>(Y({message:"getting time codes"}),u),Kd=()=>{let f=_s();if(!f||[0,1].includes(f.length))return;let T=R.info.position$.getValue();return f.find(B=>B.time>T)},yu=f=>{let T=f;T||(T=Kd());let B=R.info.position$.getValue();ie.log("seek to next episode",{currentTime:B,...T}),T&&(Y({message:"seek to next episode"}),_o(T.time,Rr.SeekAction.EPISODE,!0))},Qd=()=>{let f=_s();if(!f||[0,1].includes(f.length))return;let T=R.info.position$.getValue(),B=f.findIndex(at=>at.time>T),xe=B===-1?f.length-2:B-2;if(!(xe<0))return f[xe]},Qe=f=>{let T=f;T||(T=Qd());let B=R.info.position$.getValue();ie.log("seek to prev episode",{currentTime:B,...T}),T&&(Y({message:"seek to prev episode"}),_o(T.time,Rr.SeekAction.EPISODE,!0))},Qt=()=>(Y({message:"getting preview thumbs data"}),ie.log("get preview thumbs data",{...b}),b),qn=async()=>{let f=oe?.isActive(),T="none";oe?.isActive()?(T="remove",await oe?.remove()):(T="request",await oe?.request()),ie.log("toggle picture in picture",{isActive:f,action:T})},ya=(f=-90)=>{ie.log("rotate video",{alphaDiff:f}),mt.update(T=>T+f)},Wn=ne([]);C?.subscribe(f=>{let T=[];for(let B=0;B<f.length;B++){let{range:[xe,at],subjects:wt}=f[B];B===0&&xe!==0&&T.push({time:0,text:"",interactive:!1,completed:!0}),T.push({time:xe/1e3,text:"",interactive:!0,completed:fe.features.interactiveTimeOpenUri?!wt.length||wt.every(Ht=>Ht.isRemoved):!wt.length}),at!==1/0&&T.push({time:at/1e3,text:"",interactive:!1,completed:!0})}Wn.set(T)});let P1=ne(!1);E?.subscribe(f=>{f&&_e(nn)&&Vo()});let qm=f=>{if(!k)return f;let T=_e(Wn),B=_e(Ci),at=_e(Go)/B,wt=T.find(Ht=>Ht.interactive&&!Ht.completed&&Ht.time>at);return typeof wt?.time=="number"?Math.min(f,wt.time-.05):f},A1=()=>{xt.ui.episodes.panelOpened$.set(!1)},M1=()=>{ie.log("destroy store"),clearTimeout(co),clearTimeout(vi),ti.unsubscribe(),Bi.unsubscribe(),R.destroy(),de.destroy(),ge?.destroy(),Ke?.destroy(),ut.unsubscribe(),gt?.disconnect(),gt=null,ye.destroy()},xt={interfaceLanguage$:we,isCyrillicRelatedInterface$:Dt,initVideo:Xe,videoId:i,isClip:o,playerPhase:he,vsid:Ne,state:{positionExact$:zt,positionWithScrubbing$:xi,duration$:Ci,playbackState$:Co,isPlaying$:mn,isLoaderVisible:To,bufferedProgress$:Xo,isLive$:Wt,canChangePlaybackSpeed$:Gt,isActiveLive$:vn,isOldestAvailableLive$:bi,isRewindableLive$:ro,isEnded$:G,muted$:ei,volume$:ii,trafficSavingEnabled$:Si,highQualityEnabled$:It,autoQualityLimitingAvailable$:Mn,availableVideoStreams$:_r,availableAudioStreams$:Zn,videoStream$:gn,audioStream$:Ln,currentQuality$:Xn,isAutoQualityEnabled$:jo,availableQualities$:Rn,currentPlaybackRate$:Yo,availablePlaybackRates$:bn,currentSubtitle$:Ri,availableTextTracks$:$n,availableSubtitlesList$:go,currentSubtitleCaptions$:Jn,isAutoSubtitleCaptionVisible$:Zo,chromecastState$:_i,chromecastDeviceName$:ko,chromecastConnected$:ao,currentFormat$:fn,throughputEstimation$:Vi,videoBitrate$:oo,videoSize$:jt,errorLog$:Je,crashed$:$t,isAudioAvailable$:no,isAudioDisabled:!!s,canDownload:fe.features.download&&!!d,availableSources$:er,hasMpegSources$:Mo,isInteractive:k,showInteractiveGraph:fe.features.interactiveGraph,showSeekToInteractive:fe.features.seekToInteractive,showPlayPrevChapter:fe.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:fe.features.interactiveTimeIndicator&&!!_e(Wn).length,interactiveEpisodes$:Wn,isInteractiveTime$:E?Ut(E):ne(!1),isInteractiveExpectation$:P1,hasInteractiveBranches:I,playPrevChapterDisabledTooltip:N,looped$:Ze,loadedMetadata$:ne(!1),isAutoQualityAvailable$:Po},ui:{t:ft,controlsVisible:ne(!1),touched:ne(!1),controls:{prevButton:ne(void 0),playButton:ne(void 0),replayButton:ne(void 0),nextButton:ne(void 0),playPrevChapterButton:ne(void 0),seekToInteractiveButton:ne(void 0),interactiveGraphButton:ne(void 0),liveButton:ne(void 0),time:ne(void 0),episodes:ne(void 0),volume:ne(void 0),subtitles:ne(void 0),settings:ne(void 0),context:ne(void 0),chromecast:ne(void 0),pip:ne(void 0),fullscreen:ne(void 0),vkLogo:ne(void 0),interactiveTimeIndicator:ne(void 0),timeline:ne(void 0),autoplayNextToggle:ne(void 0),additionalButtons:W.length?W.reduce(f=>[...f,ne(void 0)],[]):[],disabledControls$:ae},modals:{hotKeyMap:{show:ne(!1),data:ne({title:"",closeBtnText:"",groups:[]})}},isFullscreen:je,isFullscreenOpenedByKeyboard:et,rotateAlpha:mt,isAutoplay:ne(!1),debugPanelVisible:ne(!1),episodes:{panelOpened$:ne(!1),openedByKeyboard$:ne(!1)},contextMenu:{visible$:ne(!1),btnRef$:ne(void 0),openedByBtnKeyboard$:ne(!1),openedByHotKey$:ne(!1),lastActiveElem$:ne(void 0),showContextMenuBtn$:ne(!1),position$:ne({top:0,left:0})},playerSize:qt,isMobile:Kt,mobileNotReportControlHidden$:ba,mobileUnmuteButtonExpanded:ne(!1),mobileUnmuteButtonVisible:ne(!1),icon3DVideoVisible:ne(!1),scrubbingInProgress:nn,volumeChangingInProgress:Zt,is3DVideo:ne(!1),currentGridType$:di,additionalButtonsDeprecated$:Fi,additionalDesktopControlPanelRightButtons$:vs,additionalSettingsMenuItems$:Dr,additionalContextMenuItems$:kt,interactiveHideMobileControls:ne(!1),overlayContainer$:ne(void 0),startedByKeyboard$:ne(!1),autoplayNextEnabled$:ne(!1),timerNextVideoRunning$:ne(!0),settingsMenu:{visible$:ne(!1),ref$:ne(void 0),openedByBtnKeyboard$:ne(!1)},settingsSubMenu:{visible$:ne(!1),ref$:ne(void 0),name$:ne(void 0)},aboutToGoNextVideo:ne(void 0),userActionsDisabled:ne(!1)},ads:{position:ne(0),duration:ne(0),playbackState:ne("inactive"),canSkip:ne(!1),secondsToWatchBeforeSkip:ne(0),postrollPassed:ne(!1)},webApi:{pictureInPictureApi:oe,annotationsApi:U},actions:{internal:{preload:en,firstStart:f=>Wd(f,!1),play:()=>zd(!1),pause:()=>fl(!1),togglePlay:Zi,toggleMuted:Dn,openSettingsMenu:$r,closeSettingsMenu:tr,openSettingsSubMenu:Jo,closeSettingsSubMenu:Bn,setVolume:Yt,startVolumeChanging:Ie,stopVolumeChanging:Pt,setVideoStream:Vn,setAudioStream:Yi,setQuality:Hn,setTrafficSavingEnabled:ir,setHighQualityEnabled:Hi,setPlaybackRate:or,incrementPlaybackRate:yr,decrementPlaybackRate:wn,setSubtitle:on,toggleSubtitle:nr,togglePictureInPicture:qn,startScrubbing:rt,progressScrubbing:Nt,completeScrubbing:Bt,toggleChromecast:Ud,switchToActiveLive:Cr,switchFromAdsToVideo:Jr,switchFromVideoToAds:pl,skipAd:kr,setLiveWaitingStart:Od,setLiveWaitingRecover:_u,setLiveWaitingRecord:Hd,getDebugTextData:bu,getTraceTextData:Fd,getDebugPanelData:$u,getVideoElement:$a,seekTime:(f,T,B)=>_o(f,T,B),clearDelayedBufferingCheckTimeout:Oi,seekEpisodeStartTime:xr,seekToPercent:bo,getNextEpisode:Kd,seekToNextEpisode:yu,getPrevEpisode:Qd,seekToPrevEpisode:Qe,startLogging:un,stopLogging:pn,startCameraManualRotation:Wo,stopCameraManualRotation:wo,moveCameraFocusPX:Gi,holdCamera:So,releaseCamera:Ko,getVideoEpisodes:_s,getPreviewThumbsData:Qt,downloadVideo:xn,addLanguage:Ip,setLanguage:Ot,nextMovie:Se,videoRotate:ya,correctSeekTimeToInteractive:qm,replayInteractive:A,setLooped:Mt,reportProblem:mi,setAutoplayNextEnabled:lo,setTimerNextVideoRunning:nt,prevVideoClick:Et,nextVideoClick:yi,nextVideoAnnouncementShow:Ti,nextVideoAnnouncementClick:Ii,nextVideoAnnouncementAuto:Ni,nextVideoAnnouncementCancel:Lo},external:{firstStart:f=>Wd(f,!0),play:()=>zd(!0),pause:()=>fl(!0),stop:()=>qd(!0),seekTime:f=>rr(f),seekEpisodeStartTime:f=>Nr(f),setPlaybackRate:f=>ar(f),setAutoQualityLimits:f=>wr(f),setMuted:ho,toggleSubtitle:nr,setVolume:Yt,returnFocusToEpisodes:A1,updateAdditionalSettingsItem:cl,addAdditionalSettingsItem:_a,removeAdditionalSettingsItem:ul,updateAdditionalContextItem:yt,addAdditionalContextItem:Cn,removeAdditionalContextItem:Sr,updateAdditionalButton:gs,addAdditionalButton:ha,removeAdditionalButton:dl,setLiveLowLatency:hs}},callbacks:l,setUiCallbacks:f=>{Fe={...f}},getAdmanWrapper:()=>de,getLogger:()=>Re,getPlayer:()=>R,destroy:M1};return xt};function is(t,e,i,o){let n=["interactiveTimeIndicator"],a=e[i]?.getBoundingClientRect(),s=(o||n.includes(i))&&!!a&&!!(a.right-a.left),{top:d,left:l,bottom:c,right:u}=Zs(e[i],t||void 0);return{left:s?l:0,right:s?u:0,top:s?d:0,bottom:s?c:0,isDisplayed:s}}var Js=(t,e,i,o)=>{if(t)for(let[n,a]of Object.entries(e))["tooltipPointerOffsetX","disabledControls$","additionalButtons"].includes(n)||a.set(is(t,i,n,o))};var Gc=async(t,e,i)=>{await eo(),e&&i&&(i.focus(),t.set(!1))};var Z$=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"></path></svg>');function kf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Z$();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"dots-icon",role:"img",...i})),_(t,o)}function Tf(t,e){H(e,!0);let[i,o]=Le(),n=()=>y(l,"$contextMenuVisible$",i),a=m(e,"disabled",3,!1),s=m(e,"ariaLabel",3,""),d=be(),l=d.ui.contextMenu.visible$,c=d.ui.contextMenu.openedByBtnKeyboard$,u=d.ui.contextMenu.showContextMenuBtn$,b=d.ui.contextMenu.position$,p=d.ui.contextMenu.btnRef$,$=Z(void 0);He(()=>{r($)&&vt(()=>{p.set(r($))})});let w=E=>{let A=da(E),L=bh(r($));b.set(L),c.set(A),l.set(!n())},x=()=>{u.set(!0)},k=()=>{u.set(!1)},C=v(()=>n()?"opened":"");At(t,{get className(){return r(C)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return s()},click:w,focus:x,blur:k,get ariaExpanded(){return n()},get ref(){return r($)},set ref(E){D($,le(E))},children:(E,A)=>{kf(E,{})},$$slots:{default:!0}}),F(),o()}var X$=t=>{t.stopPropagation()},J$=M("<div><!> <div></div> <div></div></div>"),e2={hash:"svelte-od3veb",code:`.interactive-episode-icon-animated.svelte-od3veb {position:absolute;top:16px;right:16px;width:32px;height:32px;transition:0.3s;opacity:1;}.interactive-episode-icon-animated.icon-small.svelte-od3veb {width:28px;height:28px;}.invisible.svelte-od3veb {opacity:0;visibility:hidden;}.fullscreen.svelte-od3veb:not(.mobile) {width:40px;top:19px;right:23px;height:40px;}.mobile.svelte-od3veb {width:28px;height:28px;top:12px;right:14px;}.fullscreen.mobile.svelte-od3veb {width:32px;height:32px;}
230
+ `)),_(U,Y)};V(Oe,U=>{r(E)&&U(ie)})}var R=P(Oe,2),Ne=h(R);{var de=U=>{var Y=Be(),Ae=se(Y);{var We=ye=>{var De=Pr();S(je=>ue(De,je),[()=>O("tooltip_episode_unfinished")]),_(ye,De)},Fe=ye=>{var De=Pr();S(()=>ue(De,r(W).text||"")),_(ye,De)};V(Ae,ye=>{p()&&r(W).completed===!1?ye(We):ye(Fe,!1)})}_(U,Y)};V(Ne,U=>{r(W)&&U(de)})}g(R);var Ke=P(R,2);{var oe=U=>{var Y=A$(),Ae=h(Y,!0);g(Y),S(()=>ue(Ae,d())),_(U,Y)};V(Ke,U=>{p()||U(oe)})}g(Re),S(U=>{fe=J(Re,1,"timeline-preview svelte-1wqg760",null,fe,U),tt(Re,`width: ${r(Q)?r(C):r(k)}px;`)},[()=>({mobile:l()})]),_(t,Re),F(),o()}var V$=M('<span class="time svelte-1jr6obn"> </span>'),R$=M("<!> <!>",1),N$={hash:"svelte-1jr6obn",code:".time.svelte-1jr6obn {display:inline-block;padding:6px 10px;border-radius:3px;color:var(--white);background-color:rgba(41, 41, 41, .8);}.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 bf(t,e){H(e,!0),z(t,N$);let[i,o]=Le(),n=()=>y(ce,"$interactiveEpisodes$",i),a=()=>y(I,"$duration$",i),s=()=>y(L,"$position$",i),d=()=>y(ee,"$isInteractiveExpectation$",i),l=()=>y(ge,"$isInteractiveTime$",i),c=()=>y(N,"$isLive$",i),u=()=>y(Q,"$isMobile",i),b=()=>y(W,"$isActiveLive$",i),p=()=>y(A,"$bufferedProgress$",i),$=()=>y(Re,"$disabledControls$",i),w=m(e,"showTimeline",3,!1),x=m(e,"withEpisodes",3,!0),k=m(e,"ref",15,void 0),C=be(),E=Rt(),A=C.state.bufferedProgress$,L=C.state.positionWithScrubbing$,I=C.state.duration$,N=C.state.isLive$,W=C.state.isActiveLive$,Q=C.ui.isMobile,j=E.features.episodes&&x()?C.actions.internal.getVideoEpisodes():void 0,re=C.actions.internal.getPreviewThumbsData(),ce=C.state.interactiveEpisodes$,X=C.state.isInteractive,ge=C.state.isInteractiveTime$,ee=C.state.isInteractiveExpectation$,Me=C.actions.internal.correctSeekTimeToInteractive,Pe=C.callbacks?.onDisabledTimelineClick,Re=C.ui.controls.disabledControls$,fe=C.callbacks?.uiInfo?.onTimelineMouseEnter,Oe=C.callbacks?.uiInfo?.onTimelineMouseLeave,ie=C.ui.t,R=E.features.interactiveResponsiveUi,Ne=v(()=>X?n():j),de=v(()=>zo(a())),Ke=v(()=>zo(s())),oe=v(()=>s()/a()),U=v(()=>d()||l()),Y=Z(!1),Ae=Z(""),We=Z(0),Fe=Z(0),ye=Z(0),De=v(()=>({containerWidth:r(Fe),translateXPx:r(We),translateYPx:X&&re?-36:-16,active:r(Y)&&w()&&!r(U)&&!R,pointer:!E.features.timelinePreview||!re||c()})),je=ie("aria_timeline"),et=v(()=>ie("aria_timeline_value",{position:r(Ke),duration:r(de)}));function ct(Ue){return!Me||!X?Ue:Me(Ue*a())/a()}function mt(Ue){C.actions.internal.startScrubbing(ct(Ue))}function Je(Ue){l()||C.actions.internal.progressScrubbing(ct(Ue))}function ut(Ue){C.actions.internal.completeScrubbing(ct(Ue)),D(Y,!1)}function $t(Ue,Se,Ye){Dt(Ue,Se,Ye),D(Y,!0)}function Ot(Ue,Se,Ye){Dt(Ue,Se,Ye),D(Y,!0)}function we(){D(Y,!1)}function Dt(Ue,Se,Ye){D(ye,le(ct(Ue))),D(We,le(Se)),Ye&&D(Fe,le(Ye)),D(Ae,le(ft(Ue)))}function ft(Ue){let Se=zo((c()?1-Ue:Ue)*a());return c()?`-${Se}`:Se}var K=R$(),he=se(K);hf(he,Qr(()=>r(De),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(Ue,Se)=>{var Ye=Be(),Ee=se(Ye);{var lt=St=>{_f(St,{get time(){return r(Ae)},get isMobile(){return u()},get videoEpisodes(){return r(Ne)},previewThumbsData:re,get progress(){return r(ye)},get duration(){return a()},isInteractive:X})},gt=St=>{var oi=V$(),ti=h(oi,!0);g(oi),S(()=>ue(ti,r(Ae))),_(St,oi)};V(Ee,St=>{E.features.timelinePreview&&re&&!c()?St(lt):St(gt,!1)})}_(Ue,Ye)},$$slots:{default:!0}}));var ae=P(he,2);let qe=v(()=>Math.round(r(oe)*100)),Xe=v(()=>$().has("TIMELINE"));Ja(ae,{className:"timeline-slider",get isActiveLive(){return b()},get isMobile(){return u()},ariaLabel:je,ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return r(qe)},get ariaValueText(){return r(et)},get loadedProgress(){return p()},get filledProgress(){return r(oe)},get handleProgress(){return r(oe)},get videoEpisodes(){return r(Ne)},onPointerDown:mt,onHandleMove:Je,onPointerMove:Ot,onPointerUp:ut,onPointerEnter:$t,onPointerLeave:we,onMouseEnter:fe,onMouseLeave:Oe,onDisabledClick:Pe,isInteractive:X,get disabled(){return r(Xe)},get hideHandel(){return l()},testId:"slider",get ref(){return k()},set ref(Ue){k(Ue)}}),_(t,K),F(),o()}var D$={hash:"svelte-1yate8h",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 ld(t,e){H(e,!0),z(t,D$);let[i,o]=Le(),n=()=>y(l,"$isMobile",i),a=m(e,"position",3,0),s=m(e,"duration",3,0),d=be(),l=d.ui.isMobile,c=d.ui.t,u=v(()=>zo(s())),b=v(()=>zo(a())),p=v(()=>a()/s()),$=v(()=>c("aria_timeline_value",{position:r(b),duration:r(u)})),w=v(()=>Math.round(r(p)*100));Ja(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return s()},get ariaValueNow(){return r(w)},get ariaValueText(){return r($)},get filledProgress(){return r(p)},hideHandel:!0,get squareBorders(){return n()}}),F(),o()}var B$=M("<div><!></div>"),O$=M("<div></div>"),H$={hash:"svelte-1h5wsmk",code:".timeline.svelte-1h5wsmk {position:relative;pointer-events:all;display:flex;align-items:center;bottom:0;width:100%;min-width:86px;padding:3px 10px 4px;box-sizing:border-box;}.timeline.mobile.svelte-1h5wsmk {height:16px;padding:6px 12px 7px;margin-top:6px;}.withoutPadding.svelte-1h5wsmk {padding:0;}.timeline-stub.svelte-1h5wsmk {width:100%;min-width:20px;}.timeline-stub.mobile.svelte-1h5wsmk {height:8px;}"};function es(t,e){H(e,!0),z(t,H$);let[i,o]=Le(),n=()=>y($,"$isLive$",i),a=()=>y(k,"$isMobile",i),s=()=>y(x,"$adPosition",i),d=()=>y(w,"$adDuration",i),l=m(e,"isAds",3,!1),c=m(e,"isHidden",3,!1),u=m(e,"needPadding",3,!0),b=m(e,"ref",15,void 0),p=be(),$=p.state.isLive$,w=p.ads.duration,x=p.ads.position,k=p.ui.isMobile,C=v(()=>!c()&&(!n()||n()&&e.canRewindLive&&e.isRewindableLive||l()));var E=Be(),A=se(E);{var L=N=>{var W=B$();let Q;var j=h(W);{var re=X=>{ld(X,{get position(){return s()},get duration(){return d()}})},ce=X=>{bf(X,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return r(C)},get withEpisodes(){return e.withEpisodes},get ref(){return b()},set ref(ge){b(ge)}})};V(j,X=>{l()?X(re):X(ce,!1)})}g(W),S(X=>Q=J(W,1,"timeline svelte-1h5wsmk",null,Q,X),[()=>({withoutPadding:!u(),mobile:a()})]),_(N,W)},I=N=>{var W=O$();let Q;S(j=>Q=J(W,1,"timeline-stub svelte-1h5wsmk",null,Q,j),[()=>({mobile:a()})]),_(N,W)};V(A,N=>{r(C)?N(L):N(I,!1)})}_(t,E),F(),o()}var Rh=require("@vkontakte/videoplayer-shared");var F$=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="m21.616 16.495-.012.07c-.156.852-.282 1.541-.427 2.093-.148.569-.333 1.063-.64 1.5a4.4 4.4 0 0 1-2.507 1.732c-.52.133-1.046.131-1.63.069-.568-.06-1.257-.187-2.11-.343l-4.34-.794c-.853-.156-1.542-.282-2.094-.426-.568-.149-1.062-.334-1.5-.642a4.4 4.4 0 0 1-1.731-2.507c-.133-.518-.131-1.045-.069-1.63.06-.567.187-1.257.343-2.11l.012-.068c.156-.853.282-1.542.427-2.095.148-.568.333-1.062.641-1.5a4.4 4.4 0 0 1 2.507-1.731c.518-.133 1.045-.131 1.63-.069.567.06 1.256.187 2.109.343l4.34.794c.853.156 1.542.282 2.094.426.568.149 1.062.334 1.5.642a4.4 4.4 0 0 1 1.731 2.506c.133.52.131 1.046.069 1.63-.06.568-.187 1.258-.343 2.11m-1.446-2.3c.052-.483.035-.769-.022-.993a2.6 2.6 0 0 0-1.023-1.481c-.19-.133-.45-.25-.921-.373-.48-.125-1.102-.24-1.997-.404l-4.272-.781c-.895-.164-1.518-.277-2.01-.33-.483-.051-.769-.035-.993.023-.6.153-1.125.516-1.481 1.023-.133.19-.25.45-.373.92-.125.48-.24 1.103-.403 1.998s-.277 1.518-.33 2.01c-.051.484-.035.77.023.994.153.6.516 1.125 1.023 1.481.189.133.45.25.92.373.48.125 1.102.24 1.997.404l4.272.781c.895.164 1.518.277 2.01.33.483.051.77.035.993-.023a2.6 2.6 0 0 0 1.481-1.023c.133-.19.25-.45.373-.92.125-.48.24-1.103.403-1.998s.278-1.518.33-2.01Z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M18.187 7.488a.9.9 0 0 1-1.045-.727c-.145-.807-.199-1.086-.28-1.296A2.6 2.6 0 0 0 14.504 3.8c-.224-.006-.505.036-1.315.169l-5.846.962c-1.366.224-1.834.313-2.174.492A2.6 2.6 0 0 0 3.837 7.18c-.08.376-.039.85.114 2.226l.011.1a.9.9 0 1 1-1.787.198l-.01-.093-.019-.17c-.129-1.147-.217-1.937-.068-2.636A4.4 4.4 0 0 1 4.332 3.83c.633-.333 1.417-.461 2.556-.648l.163-.027 5.846-.961.098-.016c.674-.111 1.138-.188 1.556-.177a4.4 4.4 0 0 1 3.99 2.819c.15.39.234.853.355 1.526l.017.097a.9.9 0 0 1-.726 1.045" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M12.724 12.414a.415.415 0 0 0-.69.231l-.72 4.18a.4.4 0 0 0 .025.221c.085.21.327.311.539.226l3.669-1.467a.406.406 0 0 0 .127-.68z"></path></svg>');function $f(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=F$();let n;var a=h(o);pe(a,()=>e.children??te),me(3),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"episodes-icon",style:"flex-shrink:0",role:"img",...i})),_(t,o)}var U$=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.146 3.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L6.793 6.5 4.146 3.854a.5.5 0 0 1 0-.708" clip-rule="evenodd" opacity=".7"></path></svg>');function yf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=U$();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"13",fill:"none","aria-hidden":"true","data-testid":"chevron-light-icon",role:"img",...i})),_(t,o)}var z$=M('<span class="text mobile svelte-1yhs2ga"> </span> <div class="chevron-episodes svelte-1yhs2ga"><!></div>',1),q$=M('<span class="text svelte-1yhs2ga"> </span>'),W$=M('<span class="text count svelte-1yhs2ga"> </span>'),K$=M("<!> <!>",1),Q$={hash:"svelte-1yhs2ga",code:".text.svelte-1yhs2ga {padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.text.count.svelte-1yhs2ga {overflow:visible;}.text.mobile.svelte-1yhs2ga {padding:0 3px 0 4px;}.chevron-episodes.svelte-1yhs2ga {margin-bottom:-4px;}"};function dd(t,e){H(e,!0),z(t,Q$);let[i,o]=Le(),n=()=>y(w,"$currentGridType$",i),a=()=>y(x,"$openedByKeyboard$",i),s=()=>y(k,"$panelOpened$",i),d=()=>y(C,"$isMobile",i),l=m(e,"position",3,0),c=m(e,"duration",3,0),u=m(e,"timeCodes",19,()=>[]),b=be(),p=b.callbacks?.onEpisodeChanged??Rh.noop,$=!!b.callbacks?.onEpisodeClicked,w=b.ui.currentGridType$,x=b.ui.episodes.openedByKeyboard$,k=b.ui.episodes.panelOpened$,C=b.ui.isMobile,E=b.ui.t,A=Z(void 0),L=ee=>{if(!!b.callbacks?.onEpisodeClicked){let Pe=da(ee);x.set(Pe),k.set(!0),b.callbacks?.onEpisodeClicked?.(Pe)}},I=Z(null),N=v(()=>l()/c());He(()=>{let ee=Hc(r(N),c(),u());ee?r(I)?.time!==ee.time&&(p(ee),D(I,le(ee))):D(I,null)});let W=v(()=>r(I)?.text||""),Q=v(()=>Ai(n(),"xl")?"FULL":Ai(n(),"m")&&Ih(n(),"xl")?"COUNT":"SHORT"),j=v(()=>`${E("tooltip_episodes")}: ${r(W)}`),re=async(ee,Me,Pe)=>{await eo(),ee?.getAttribute("aria-expanded")==="false"&&Me&&!Pe&&vt(()=>{x.set(!1),ee.focus()})};He(()=>{re(r(A),a(),s())});var ce=Be(),X=se(ce);{var ge=ee=>{let Me=v(()=>d()?"px-0":"");At(ee,{get className(){return`w-max btn-full-opacity btn-jc-l ${r(Me)??""}`},testId:"btn-episodes",click:L,disabled:!$,get ariaExpanded(){return s()},get ariaLabel(){return r(j)},get ref(){return r(A)},set ref(Pe){D(A,le(Pe))},children:(Pe,Re)=>{var fe=Be(),Oe=se(fe);{var ie=Ne=>{var de=z$(),Ke=se(de),oe=h(Ke,!0);g(Ke);var U=P(Ke,2),Y=h(U);yf(Y,{}),g(U),S(()=>ue(oe,r(W))),_(Ne,de)},R=Ne=>{var de=K$(),Ke=se(de);$f(Ke,{});var oe=P(Ke,2);{var U=Ae=>{var We=q$(),Fe=h(We,!0);g(We),S(()=>ue(Fe,r(W))),_(Ae,We)},Y=(Ae,We)=>{{var Fe=ye=>{var De=W$(),je=h(De,!0);g(De),S(()=>ue(je,u().length)),_(ye,De)};V(Ae,ye=>{r(Q)==="COUNT"&&ye(Fe)},We)}};V(oe,Ae=>{r(Q)==="FULL"?Ae(U):Ae(Y,!1)})}_(Ne,de)};V(Oe,Ne=>{d()?Ne(ie):Ne(R,!1)})}_(Pe,fe)},$$slots:{default:!0}})};V(X,ee=>{r(I)&&ee(ge)})}_(t,ce),F(),o()}var Qh=require("@vkontakte/videoplayer-shared");var Jt=require("@vkontakte/videoplayer-core"),pt=require("@vkontakte/videoplayer-shared"),Rr=require("@vkontakte/videoplayer-statistics");var ze=require("@vkontakte/videoplayer-shared"),Mi=require("@vkontakte/videoplayer-shared");var Nh=(t,e)=>t<400||e<225?5:t<640||e<360?0:t<960||e<540?1:t<1280||e<720?2:3;var G$="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Fc=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 Mi.Subject,loadStarted$:new Mi.Subject,loadEnded$:new Mi.Subject,loadError$:new Mi.Subject,ready$:new Mi.Subject,slotRequested$:new Mi.Subject,started$:new Mi.Subject,timeRemained$:new Mi.Subject,paused$:new Mi.Subject,resumed$:new Mi.Subject,ended$:new Mi.Subject,empty$:new Mi.Subject,skipped$:new Mi.Subject,clicked$:new Mi.Subject,closed$:new Mi.Subject,error$:new Mi.Subject};this.loadAdman=e=>(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[(0,ze.now)()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let n;this.events.loadStarted$.next();let a=()=>{clearTimeout(n),delete window.admanAsyncInit,window.AdmanHTML?(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[(0,ze.now)()]}),i(),this.events.loadEnded$.next()):(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[(0,ze.now)()]}),o())};(0,Mi.addScript)(G$,e,this.loadTimeout).then(()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[(0,ze.now)()]}),window.AdmanHTML?(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[(0,ze.now)()]}),i(),this.events.loadEnded$.next()):(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[(0,ze.now)()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout))}).catch(s=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(s)],numbers:[(0,ze.now)()]}),o(),clearTimeout(n)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let n;this.events.loadStarted$.next();let a=()=>{clearTimeout(n),delete window.admanAsyncInit,window.AdmanHTML?(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[(0,ze.now)()]}),i(),this.events.loadEnded$.next()):(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[(0,ze.now)()]}),o())},s=()=>{d=!0,o()},d=!1,l=window.setTimeout(()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[(0,ze.now)()]}),s()},this.loadTimeout);e.addEventListener("abort",s),e.aborted&&(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[(0,ze.now)()]}),s()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[(0,ze.now)()]}),!d&&(window.AdmanHTML?(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[(0,ze.now)()]}),i(),this.events.loadEnded$.next()):(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[(0,ze.now)()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout)))},s).finally(()=>{clearTimeout(n),clearTimeout(l),e.removeEventListener("abort",s)})});this.onAdsReady=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[(0,ze.now)()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[(0,ze.now)(),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"}),_e(this.playerState.isMobile)&&this.playerState.mobileUnmuteButtonVisible.set(!0)),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()):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{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=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",this.currentAdSection??""],numbers:[(0,ze.now)()]}),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=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",this.currentAdSection??""],numbers:[(0,ze.now)()]}),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(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[(0,ze.now)()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch{this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.log({message:"ad completed"}),this.currentAdSection?this.events.ended$.next(this.currentAdSection):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.log({message:"ad clicked"}),this.videoElement?.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[(0,ze.now)()]}),this.log({message:e}),this.events.error$.next(e),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[(0,ze.now)()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[(0,ze.now)(),e.slotId]}),this.adman)return;this.events.init$.next(),this.startWatchDog();let{width:i,height:o,isFullscreen:n,isAutoplay:a,adsContainer:s,adsVideoElement:d,slotId:l,params:c={},duration:u,previewParam:b}=e,p,$=this.playerState&&_e(this.playerState.vsid);$&&(this.isVsidOriginal?p=$:p=parseInt($,36));let{isEmbed:w,immediateOrigin:x}=(0,ze.detectEmbed)(),k=(w?x:window.location.href)??window.location.href,C={...c,dl:encodeURIComponent(k),autoplay:a?1:0,player_width:i,player_height:o,preview:b,...p?{request_id:p}:{},duration:u,puid10:Nh(i,o),puid11:n?0:1};b||delete C.preview;let E={slot:l,wrapper:s,videoEl:d,videoQuality:o,params:C,browser:{mobile:!1}};try{let A=new window.AdmanHTML;A.setDebug(!1),A.onReady(this.onAdsReady),A.onStarted(this.onAdStarted),A.onPlayed(this.onAdPlayed),A.onPaused(this.onAdPaused),A.adMidrollPoint(this.onAdMidrollPoint),A.onClosed(this.onAdClosed),A.onSkipped(this.onAdSkipped),A.onClicked(this.onAdClicked),A.onTimeRemained(this.onAdTimeRemained),A.onCompleted(this.onAdCompleted),A.onError(this.onAdError),A.init(E),this.adman=A,this.videoElement=d,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(E)}`})}catch(A){ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(A)],numbers:[(0,ze.now)()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",this.currentAdSection??"","force: "+e],numbers:[(0,ze.now)()]}),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.playerState.mobileUnmuteButtonVisible.set(!1),this.log({message:`switch to video, isPostroll: ${i}`}),i&&(this.adsState.postrollPassed.set(!0),this.log({message:"postroll passed"}));else{let o="Switch to video: Adman state was not updated correctly";this.log({message:o}),this.events.error$.next(o)}this.actions.switchFromAdsToVideo?.(!i)}}togglePlay(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.adsState){this.log({message:"toggle play"});let e=_e(this.adsState.playbackState);e==="playing"?this.pause():e==="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{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{this.onAdError("could not set ad fullscreen")}}startPreroll(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[(0,ze.now)()]}),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{this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch{this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&clearTimeout(this.watchDogTimeout),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch{this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch{this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){if(ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",this.currentAdSection??""],numbers:[(0,ze.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch{this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){this.adman?.setPosition(Math.floor(e),Math.floor(i))}destroy(){ze.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[(0,ze.now)()]}),this.log({message:"destroy"}),this.stopWatchDog(),this.adman?.onReady(void 0),this.adman?.onStarted(void 0),this.adman?.onPlayed(void 0),this.adman?.onPaused(void 0),this.adman?.adMidrollPoint(void 0),this.adman?.onClosed(void 0),this.adman?.onSkipped(void 0),this.adman?.onClicked(void 0),this.adman?.onTimeRemained(void 0),this.adman?.onCompleted(void 0),this.adman?.onError(void 0),this.adman?.destroy(),this.videoElement&&(0,Mi.clearVideoElement)(this.videoElement),this.isDestroyed=!0}};var Dh=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 xf=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],n=e.split(this.twoLinesRegExp);for(let a of n){let s={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let l of d)if(!s.startTime&&!s.endTime){let c=new Uc,{startTime:u,endTime:b}=c.parse(l);s.startTime=u,s.endTime=b}else if(l.trim()!==""){let c=new wf,{texts:u}=c.parse(l);s.texts=[...s.texts,...u]}(s.startTime||s.endTime)&&s.texts.length>0&&o.push(s)}return o}},Uc=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",n="0"){let a=Number(e)*60*60,s=Number(i)*60,d=Number(o),l=+`0.${n}`;return a+s+d+l}},wf=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},n=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](s){let d=0,l=[];for(;d<s.length;){let c=["<",">"].reduce((u,b)=>{let p=s.indexOf(b,d);return u===-1||u>p?p:u},-1);if(c===-1){l.push(s.substring(d));break}l.push(s.substring(d,c)),d=c+1}return l}}),a=new Uc;for(let s of n)a.isTime(s)?i.texts.push({type:"timestamp",value:a.parseTime(s)}):i.texts.push({type:"text",value:s});return i}},Bh=xf;var qc=require("@vkontakte/videoplayer-shared"),ts,Yn,Sf=0,Cf=!1,Oh="",Hh=(t,e=0,i=0)=>t<e&&t<i,zc=(t,e=0,i=0)=>t>=e&&t<=i,j$=(t,e=0,i=0)=>t>e&&t>i,Fh=(t,e,i,o=!1)=>{let n=i.find(({id:d})=>d===e.value)?.subtitles;if(o)return n?.find(({startTime:l,endTime:c})=>zc(t,l,c));let a=t>=Sf,s=t<Sf;if(Sf=t,s&&(Cf=!1),(0,qc.isNonNullable)(ts)&&zc(t,ts.startTime,ts.endTime)&&Oh===e.value)return ts;if(!(0,qc.isNonNullable)(Yn)&&n?.length&&!Cf){Yn=n.find(({startTime:l,endTime:c})=>zc(t,l,c)||a&&Hh(t,l,c)),ts=void 0,!(0,qc.isNonNullable)(Yn)&&n[n.length-1].endTime<t&&(Cf=!0);return}else{if(zc(t,Yn?.startTime,Yn?.endTime))return ts=Yn,Yn=void 0,Oh=e.value,ts;(a&&j$(t,Yn?.startTime,Yn?.endTime)||s&&Hh(t,Yn?.startTime,Yn?.endTime))&&(Yn=void 0)}};var Wc={ru:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",en:"English",uk:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",be:"\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F (\u0442\u0430\u0440\u0430\u0448\u043A\u0435\u0432i\u0446\u0430)",es:"Espa\xF1ol",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438",hr:"Hrvatski",hu:"Magyar",sr:"\u0421\u0440\u043F\u0441\u043A\u0438",pt:"Portugu\xEAs",el:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC",pl:"Polski",fr:"Fran\xE7ais",ko:"\uD55C\uAD6D\uC5B4","zh-CN":"\u6C49\u8BED",lt:"Lietuvi\u0173",ja:"\u65E5\u672C\u8A9E",cs:"\u010Ce\u0161tina",et:"Eesti",tt:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",ba:"\u0411\u0430\u0448\u04A1\u043E\u0440\u0442\u0441\u0430",cv:"\u0427\u0103\u0432\u0430\u0448\u043B\u0430",sk:"Sloven\u010Dina",ro:"Rom\xE2n\u0103",no:"Norsk",lv:"Latvie\u0161u",az:"Az\u0259rbaycan dili",hy:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",sv:"Svenska",nl:"Nederlands",tk:"T\xFCrkmen",ka:"\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8",da:"Dansk",uz:"O\u2018zbek",th:"\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22",id:"Bahasa Indonesia",tg:"\u0422\u043E\u04B7\u0438\u043A\u04E3",sl:"Sloven\u0161\u010Dina",bs:"Bosanski","pt-BR":"Portugu\xEAs brasileiro",fa:"\u0641\u0627\u0631\u0633\u06CC",vi:"Ti\u1EBFng Vi\u1EC7t",hi:"\u0939\u093F\u0928\u094D\u0926\u0940",si:"\u0DC3\u0DD2\u0D82\u0DC4\u0DBD",bn:"\u09AC\u09BE\u0982\u09B2\u09BE",tl:"Tagalog",mn:"\u041C\u043E\u043D\u0433\u043E\u043B",my:"\u1017\u1019\u102C\u1005\u102C",tr:"T\xFCrk\xE7e",ne:"\u0928\u0947\u092A\u093E\u0932\u0940",ur:"\u0627\u0631\u062F\u0648",ky:"\u041A\u044B\u0440\u0433\u044B\u0437 \u0442\u0438\u043B\u0438",pa:"\u067E\u0646\u062C\u0627\u0628\u06CC",os:"\u0418\u0440\u043E\u043D",kn:"\u0C95\u0CA8\u0CCD\u0CA8\u0CA1",sw:"Kiswahili",kk:"\u049A\u0430\u0437\u0430\u049B\u0448\u0430",ar:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",he:"\u05E2\u05D1\u05E8\u05D9\u05EA",ab:"\u0410\u04A7\u0441\u0448\u04D9\u0430",eu:"Euskara",eo:"Esperanto"},Y$={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"},Kc=t=>Wc[t]??Wc[Y$[t]]??void 0;var Uh=require("@vkontakte/videoplayer-shared"),BR=require("@vkontakte/videoplayer-statistics"),Qc=class{constructor(e,i=new Uh.Subscription){this.oneStat=e;this.statSubscription=i}destroy(){this.oneStat.destroy(),this.statSubscription.unsubscribe()}};var cd=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(cd||{});var Vr=t=>t??0,Zs=(t,e)=>{let i=t?.getBoundingClientRect?.(),o=e?.getBoundingClientRect?.();return{top:Math.round(Vr(i?.top)-Vr(o?.top)),left:Math.round(Vr(i?.left)-Vr(o?.left)),bottom:Math.round(Vr(i?.bottom)-Vr(o?.top)),right:Math.round(Vr(i?.right)-Vr(o?.left))}},Xs=t=>{let e=t?.getBoundingClientRect?.();return{width:Vr(e?.width),height:Vr(e?.height)}};var zh=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:n,statAuthToken:a,isAudioDisabled:s,canDownload:d,callbacks:l,webApi:c,videoEpisodes:u,previewThumbsData:b,uiConfig:p,coreConfig:$,player:w,disabledControls:x,isInteractive:k,interactiveRanges$:C,isInteractiveTime$:E,replayInteractive:A,stopPlayer:L,hasInteractiveBranches:I,playPrevChapterDisabledTooltip:N,additionalButtons:W,additionalSettingsMenuItems:Q,additionalContextMenuItems:j,playPrevVideo:re,playNextVideo:ce,looped:X=!1,statistics:ge,saveRate:ee,internalsExposure:Me,playerView:Pe})=>{let Re={...$,configName:[...$.configName??[],"ui"],isAudioDisabled:s,live:{...$.live??{},isLiveCatchUpMode:!!n}},fe=p,Oe=pt.Tracer.createRootTracer(fe.features.saveTraceInfoToFile),ie=Oe.createComponentTracer("Store"),R=w||new Jt.Player(Re,Oe);Me?.expose({corePlayer:R});let Ne=new pt.Logger,de=new Fc(Ne,{loadTimeout:fe.ads.loadTimeout,initTimeout:fe.ads.initTimeout,runtimeTimeout:fe.ads.runtimeTimeout,useAdmanFromNPM:fe.ads.useAdmanFromNPM,volumeMultiplier:fe.ads.volumeMultiplier,isVsidOriginal:fe.ads.isVsidOriginal}),Ke=za.getInstance(),oe=c?.pictureInPictureApi,U=c?.annotationsApi,Y=Ne.createComponentLog("Store"),Ae,We,Fe={},ye=new $c,De=ge?Ut(ge.oneStat.vsid$):Gn(void 0),je=ne(aa()),et=ne(!1),ct=oe?.info.isActive$??new pt.ValueSubject(!1),mt=ne(0),Je=ne([]),ut=(0,pt.merge)(R.events.fatalError$,R.events.managedError$).subscribe(f=>Je.update(T=>[...T,f])),$t=Gn(!1,f=>{let T=R.events.fatalError$.subscribe(()=>f(!0));return()=>T.unsubscribe()}),Ot=async f=>{let T=Object.values(pt.InterfaceLanguage).includes(f);if(fe.downloadVKLanguages&&(T&&fe.updateBuiltinLanguages||!Ep(f))){let xe;try{xe=await(0,pt.loadVKLangPack)(f,kg,Tg)}catch(at){ge?.oneStat?.logError({errorType:"VKLangPack",fatal:!1}),Ke?.report(at,{errorType:"VKLangPack",fatal:!1})}xe&&(Ip({language:f,pack:xe,fallback:fe.defaultLanguage}),we.set(f))}Ep(f)&&we.set(f)},we=ne(t),Dt=ne(e);Ot(t);let ft=(f,T)=>{let B=_e(we);return Pp(B,f,T,fe.defaultLanguage)},K=ne("thumb"),he=(()=>{let f=li([$t,K],([T,B])=>T?"crashed":B);return{...f,is:T=>_e(f)===T}})(),ae=(()=>{let f=ne(new Set(x));return{...f,add:T=>{f.update(B=>new Set([...B].concat(T)))},remove:T=>{f.update(B=>{let xe=[...B];return new Set(Array.isArray(T)?xe.filter(at=>!T.includes(at)):xe.filter(at=>at!==T))})},includes:T=>{let B=_e(f);return Array.isArray(T)?T.every(xe=>B.has(xe)):B.has(T)}}})();ie.log("create store"),Y({message:"create store"});let qe=f=>{let T=f.container;T.append(R.experimental.element$.getValue()),gt=new MutationObserver(B=>{let{removedNodes:xe}=B[0];xe.length&&T.append(R.experimental.element$.getValue())}),gt.observe(T,{childList:!0})},Xe=f=>{Y({message:`init video, config: ${JSON.stringify(f)}`}),k?qe(f):(pt.devNull.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[(0,pt.now)()]}),R.initVideo(f)),ie.log("init video",{isInteractive:k}),f.subtitles&&R.setExternalTextTracks(f.subtitles),Ae=f},Ue=new pt.Subject,Se=f=>Ue.next(f),Ye=new pt.Subject,Ee=new pt.Subject,lt=new pt.Subject,gt=null,St={actionRewind$:Ye,actionSeek$:Ee,inPiP$:ct,inFullscreen$:new pt.Observable(f=>je.subscribe(T=>f.next(T))),actionSetSubtitle$:lt,nextMovie$:Ue};if(ge){let{oneStat:f,statSubscription:T}=ge;k||T.add(f.attachTo(R)),T.add(f.attachToUi(St)),T.add(f.attachToAds(de.events)),f.authorize(a).catch(B=>{Y({message:`onestat auth error ${String(B)}`})})}if(Ke){let f=new pt.Subscription,T=(B,xe)=>f.add(B.subscribe(xe));if(T(R.events.managedError$,B=>{Ke.logIError(B)}),T(R.events.fatalError$,B=>{Ke.logIError(B,!0)}),ge){let{oneStat:B}=ge;T(B.experimental.error$,xe=>{Ke.logIError(xe)})}Ke.sentrySubscription.add(f)}let oi=()=>{Jt.clientChecker.device.isIOS&&We&&dh(We).catch(f=>{Y({message:`exitIosSafariFullscreen failed: ${f}`})})},ti=new pt.Subscription().add(R.experimental.element$.subscribe(f=>{f&&(We=f,f.classList.add("player-media"),Wa(oe)&&(oe.updateVideoElement(),oe.registryEventHandlers()),k&&f.setAttribute("pip","false"),Pe==="preview"&&(f.setAttribute("disablePictureInPicture","true"),f.setAttribute("x-yandex-pip","false")))})).add(R.events.ended$.subscribe(()=>{oi(),l?.onEnded?.()})).add(R.events.looped$.subscribe(()=>{l?.onLooped?.()})).add(R.events.started$.subscribe(async()=>{Wa(oe)&&await oe?.revealPictureInPicture();let f=R.info.muted$.getValue();l?.onStarted?.(),Fe.onStarted?.(f)})).add(R.events.willSeek$.subscribe(({from:f,to:T})=>{l?.onSeek?.(f,T)})).add(R.events.autoplaySoundProhibited$.subscribe(()=>{l?.onAutoplaySoundProhibited?.()})).add(R.info.position$.subscribe(f=>{let T=R.info.duration$.getValue();isFinite(T)&&T>0&&(l?.onTimeupdate?.(T,f),de.setPosition(f,T))})).add(R.events.fatalError$.subscribe(f=>{l?.onCrashed?.(f?`${f.id}: ${f.message}`:void 0)})).add(R.events.fetcherRecoverableError$.subscribe(f=>{l?.onRecoverableError?.(f?`${f.id}: ${f.message}`:void 0)})).add(R.events.loadedMetadata$.subscribe(()=>{xt.state.loadedMetadata$.set(!0)})).add(R.info.is3DVideo$.subscribe(f=>{xt.ui.is3DVideo.set(f)})).add(R.info.isEnded$.subscribe(f=>{k&&(f?(E?.getValue()&&ae.add(Bl),ae.add("PLAY_BUTTON")):ae.remove("PLAY_BUTTON"))})).add(R.info.liveTime$.subscribe(f=>{l?.onLiveTime?.(f)})).add(R.info.isStalled$.subscribe(f=>{l?.onStalledChanged?.(f)})).add(R.info.isLiveEnded$.subscribe(f=>f&&l?.onLiveEnded?.())).add(de.events.loadStarted$.subscribe(()=>l?.adsInfo?.onLoadStarted?.())).add(de.events.loadEnded$.subscribe(()=>l?.adsInfo?.onLoadEnded?.())).add(de.events.loadError$.subscribe(()=>l?.adsInfo?.onLoadError?.())).add(de.events.init$.subscribe(()=>l?.adsInfo?.onInit?.())).add(de.events.ready$.subscribe(()=>l?.adsInfo?.onReady?.())).add(de.events.started$.subscribe(f=>l?.adsInfo?.onStarted?.(f))).add(de.events.timeRemained$.subscribe(f=>l?.adsInfo?.onTimeRemained?.(f))).add(de.events.ended$.subscribe(f=>l?.adsInfo?.onCompleted?.(f))).add(de.events.empty$.subscribe(()=>l?.adsInfo?.onEmpty?.())).add(de.events.clicked$.subscribe(f=>l?.adsInfo?.onClicked?.(f))).add(de.events.closed$.subscribe(f=>l?.adsInfo?.onClosed?.(f))).add(de.events.error$.subscribe(f=>l?.adsInfo?.onError?.(f))).add(de.events.paused$.subscribe(()=>l?.adsInfo?.onPaused?.())).add(de.events.resumed$.subscribe(()=>l?.adsInfo?.onResumed?.())),Bi=new pt.Subscription,un=()=>{let{debugLog:f}=fe,T,B="#9df7b7",xe="#efd169";if(f&&f!==!0){let{colors:wt}=f;T=f.tag,B=wt?.[0]??B,xe=wt?.[1]??wt?.[0]??xe}let at=T?`: ${T}`:"";Bi.add(R.events.log$.subscribe(wt=>{console.debug(`%c sdk${at} `,`background:${B};`,`sdk component: ${wt.component}`,wt.message)})).add(Ne.log$.subscribe(wt=>{console.debug(`%c ui${at} `,`background:${xe};`,`ui component: ${wt.component}.`,wt.message)}))},pn=()=>{Bi.unsubscribe()},Wo=(f,T)=>{ie.log("start camera manual rotation",{mx:f,my:T}),R.startCameraManualRotation(f,T)},wo=(f=!1)=>{ie.log("stop camera manual rotation",{immediate:f}),R.stopCameraManualRotation(f)},Gi=(f,T,B)=>{ie.log("move camera focus px",{xpx:f,ypx:T,dt:B}),R.moveCameraFocusPX(f,T,B)},So=()=>{R.holdCamera()},Ko=()=>{R.releaseCamera()},zt=Gn(R.info.position$.getValue(),f=>{let T,B,xe=()=>{let at=R.info.playbackState$.getValue(),wt=R.info.isLive$.getValue(),Ht=R.info.duration$.getValue(),Xt=R.info.position$.getValue();if(at&&[Jt.PlaybackState.PLAYING,Jt.PlaybackState.PAUSED].includes(at)){let $o=wt?Xt-Ht:R.getExactTime();$o!==B&&f($o),B=$o}T=requestAnimationFrame(xe)};return xe(),()=>cancelAnimationFrame(T)}),Co=Ut(R.info.playbackState$),Qo=Ut(R.info.currentBuffer$),G=Ut(R.info.isEnded$),Wt=Ut(R.info.isLive$),Gt=fe.features.playbackRate?Ut(R.info.canChangePlaybackSpeed$):Gn(!1),ji=Ut(R.info.liveBufferTime$),ii=Ut(R.info.volume$),ei=Ut(R.info.muted$),Si=yc(R.info.predefinedQualityLimitType$.pipe((0,pt.map)(f=>f===Jt.PredefinedQualityLimits.TRAFFIC_SAVING)),R.info.predefinedQualityLimitType$.getValue()===Jt.PredefinedQualityLimits.TRAFFIC_SAVING),It=yc(R.info.predefinedQualityLimitType$.pipe((0,pt.map)(f=>f===Jt.PredefinedQualityLimits.HIGH_QUALITY)),R.info.predefinedQualityLimitType$.getValue()===Jt.PredefinedQualityLimits.HIGH_QUALITY),Mn=Ut(R.info.autoQualityLimitingAvailable$),Ct=Ut(R.info.availableQualities$),Ft=Ut(R.info.availableQualitiesFps$),_i=Ut(R.info.chromecastState$),ko=Ut(R.info.chromecastDeviceName$),fn=Ut(R.info.currentFormat$),Vi=Ut(R.info.throughputEstimation$),oo=Ut(R.info.videoBitrate$),jt=Ut(R.info.intrinsicVideoSize$),ht=Ut(R.info.duration$),no=Ut(R.info.isAudioAvailable$),fi=null,ci=R.info.isBuffering$,To=Gn(ci.getValue(),f=>{let T=ci.subscribe(B=>{B&&fi===null?fi=window.setTimeout(()=>{f(ci.getValue()),fi=null},fe.loaderDelay):f(B)});return()=>{T.unsubscribe(),fi&&clearTimeout(fi)}}),Oi=()=>{fi&&clearTimeout(fi),fi=null},Ci=li([ht,Wt],([f,T])=>T?-f:f),mn=li([Co],([f])=>f===Jt.PlaybackState.PLAYING),vn=Ut(R.info.atLiveEdge$),bi=Ut(R.info.atLiveDurationEdge$),Go=Ut(R.info.position$),ro=li([Go,ht],([f,T])=>isFinite(f)&&isFinite(T)&&!!T),ao=li([_i],([f])=>f===Jt.ChromecastState.CONNECTED),_r=Ut(R.info.availableVideoStreams$),Zn=fe.features.audioLanguages?Ut(R.info.availableAudioStreams$):Gn([]),gn=Ut(R.info.currentVideoStream$),Ln=Ut(R.info.currentAudioStream$),Vn=f=>{f.language&&Tp(f.language),R.setVideoStream(f)},Yi=f=>{f.language&&Tp(f.language),R.setAudioStream(f)},Io=f=>{let T;if(f.length===1&&(T=f.at(0)),T??=f.find(xe=>"isDefault"in xe&&xe.isDefault),T)return T;let B=Zg();return B&&(T=f.find(({language:xe})=>B===xe)),T??=f.at(0),T},hn=!1;ti.add(R.info.availableAudioStreams$.subscribe(f=>{if(!hn&&f.length){let T=Io(f);T&&(R.setAudioStream(T),hn=!0)}}));let it=!1;ti.add(R.info.availableVideoStreams$.subscribe(f=>{if(!it&&f.length){let T=Io(f);T&&(R.setVideoStream(T),it=!0)}}));let Eo=ne(void 0),jo=Ut(R.info.isAutoQualityEnabled$,f=>f&&Eo.set(void 0)),_n=Ut(R.info.currentQuality$,()=>Eo.set(void 0)),Xn=li([Eo,_n],([f,T])=>f??T),Po=li(fn,f=>f!==Jt.VideoFormat.MPEG),Rn=li([Ct,Ft,jo,Xn,Po],([f,T,B,xe,at])=>{let wt=[];at&&wt.push({value:"auto",displayValue:ft("auto_quality_option"),selected:B});let Ht=f.filter(Xt=>!(0,pt.isInvariantQuality)(Xt));for(let Xt of Ht){let $o=T[Xt];wt.push({value:Xt,displayValue:`${Xt}${$o?Dh($o):""}`,selected:B?!1:Xt===xe})}return wt}),Yo=Ut(R.info.currentPlaybackRate$),bn=li([Yo,vn,bi],([f,T,B])=>{let xe=B||k?1:fe.controls.playbackRateMin,at=T?1:fe.controls.playbackRateMax,wt=fe.controls.playbackRateStep,Ht=[];for(let Xt=xe;Xt<=at;Xt+=wt)Ht.push({value:Xt,displayValue:Xt===1?ft("playback_rate_1"):ft("playback_rate",{multiplier:Xt.toString(10)}),selected:f===Xt});return Ht}),$i={displayValue:ft("subtitles_off"),value:"off"},Ri=ne({...$i}),$n=fe.features.subtitles?Ut(R.info.availableTextTracks$):Gn([]),vo=Ug(),yn=li([$n,Ri],([f,T],B)=>{let xe=[],at=f.find(({id:wt})=>wt===T.value);if(at?.url){let[,wt]=vo.find(at.url)??[];if(wt){B(wt);return}ye.download(at.url).then(Ht=>{if(!Ht||ye.isDestroyed())return;let Xt=new Bh,$o=at.language;if($o){let xu=!!at.isAuto,L1=Xt.parse(Ht,$o);xe.push({lang:$o,subtitles:L1,isAuto:xu,id:at.id})}vo.add(at.url,xe),_e(Ri).value===T.value&&B(xe)}).catch(Ht=>{ge?.oneStat?.logError({errorType:"Subtitles download",fatal:!1}),Ke?.report(Ht,{errorType:"Subtitles download",fatal:!1})})}B(xe)}),Ao=li([Yo,mn,Ri],([f,T,B],xe)=>{let Ht;if(R.info.isLive$.getValue()&&T&&B.value!==$i.value){let $o=()=>{let xu=1e3/(3*f);Ht=setTimeout($o,xu),xe(Date.now())};return $o(),()=>clearTimeout(Ht)}}),go=li([$n,Ri],([f,T])=>{if(!f.length)return[];let B=[];for(let{language:xe,isAuto:at,id:wt}of f){let Ht=xe&&Kc(xe);xe&&Ht&&B.push({displayValue:at?ft("subtitles_auto",{language:Ht}):Ht,value:wt,selected:T?.value===wt,isAuto:at})}return B.length?(B.unshift({...$i,selected:T?.value===$i.value}),B):[]}),ni={available:[],prev:[]},Nn=()=>R.experimental.getCurrentTime$.getValue()?.()??We?.currentTime??0,so=li([zt,Ri,yn,Ao],([f,T,B,xe])=>{let at=R.info.isLive$.getValue();if(at&&ni.prev!==B){let wt=B.find(({id:Xt})=>Xt===T.value),Ht=ni.prev.find(({id:Xt})=>Xt===T.value);if(wt){let Xt={...wt,subtitles:[...Ht?.subtitles??[],...wt.subtitles]};ni.available=[Xt],ni.prev=B}}if(T&&T.value!==$i.value){let wt=at?Nn():f,Ht=at?ni.available:B;return Fh(wt,T,Ht,at)}}),Jn=li([so],([f])=>f?.texts?f.texts:[]);ti.add(Ri.subscribe(f=>{if(f.value===$i.value)l?.onSubtitleOff?.();else{let T=Object.entries(Wc).find(([B,xe])=>xe===f.displayValue);l?.onSubtitleOn?.(T?T[0]:"")}}));let Zo=ne(!0),Xo=li([Qo,Ci,Go,ji],([f,T,B,xe])=>{let at=f?.end??0;if(!xe)return at/T;let Ht=-B+xe-T;return(at-Ht)/T}),er=Ut(R.info.availableSources$),Mo=li([er],([f])=>Object.keys(f?.[Jt.VideoFormat.MPEG]||{}).length>0),br=()=>{let f=Object.keys(R.info.availableSources$?.getValue()?.[Jt.VideoFormat.MPEG]||{}),T=(0,pt.getHighestQuality)(f)||pt.VideoQuality.Q_144P;return Ae.sources[Jt.VideoFormat.MPEG]?.[T]},xn=()=>{let f=br();if(f)ie.log("download video",{url:f}),Og(f,Ae?.meta?.title||"video");else{let T="There is no URL for download video";ie.log("download video",{message:T}),Y({message:T})}},Dn=()=>{Y({message:"toggle muted"});let f=R.info.muted$.getValue();R.info.volume$.getValue()===0&&!f?Yt(On()):ho(!f)},tr=()=>{if(xt.ui.settingsMenu.visible$.set(!1),!_e(xt.ui.settingsSubMenu.visible$)){let f=_e(xt.ui.settingsMenu.ref$);if(l?.uiInfo?.onSettingsMenu&&f){let B=Xs(f),xe={top:0,left:0,bottom:0,right:0};l.uiInfo.onSettingsMenu({visible:!1,size:B,position:xe,name:"settings"})}}ie.log("close settings menu")},$r=async(f,T=()=>Promise.resolve())=>{xt.ui.settingsMenu.openedByBtnKeyboard$.set(!!f),xt.ui.settingsMenu.visible$.set(!0),await T();let B=_e(xt.ui.settingsMenu.ref$),xe=$a();if(l?.uiInfo?.onSettingsMenu&&B&&xe){let wt=Xs(B),Ht=Zs(B,xe);l.uiInfo.onSettingsMenu({visible:!0,size:wt,position:Ht,name:"settings"})}ie.log("open settings menu",{wasOpenedByKeyboard:f})},Bn=(f,T=!1)=>{xt.ui.settingsSubMenu.visible$.set(!1);let B=_e(xt.ui.settingsMenu.ref$),xe=$a(),at=_e(xt.ui.settingsMenu.visible$);if(l?.uiInfo?.onSettingsMenu&&B&&xe)if(at&&!T){let Ht=Xs(B),Xt=Zs(B,xe);l.uiInfo.onSettingsMenu({visible:!0,size:Ht,position:Xt,name:"settings"})}else{let Ht=Xs(f),Xt={top:0,left:0,bottom:0,right:0},$o=_e(xt.ui.settingsSubMenu.name$);l.uiInfo.onSettingsMenu({visible:!1,size:Ht,position:Xt,name:$o})}ie.log("close settings sub menu")},Jo=(f,T)=>{xt.ui.settingsSubMenu.visible$.set(!0),xt.ui.settingsSubMenu.ref$.set(T),xt.ui.settingsSubMenu.name$.set(f);let B=$a();if(l?.uiInfo?.onSettingsMenu&&T&&B){let at=Xs(T),wt=Zs(T,B);l.uiInfo.onSettingsMenu({visible:!0,name:f,size:at,position:wt})}ie.log("open settings sub menu",{name:f})},On=()=>{let f=Math.max(fe.volumeMinRestore,xc()??0);return f===0?fe.volumeDefault:f},Yt=f=>{let T=f===0?On():f,B=R.info.muted$.getValue();Y({message:`set volume, volume: ${f}, preferredVolume: ${T}`}),B&&f>0&&!s&&(B=!1,Cp(!1)),R.setVolume(f,B),de.setVolume(f),$p(T)},ho=f=>{let T=R.info.volume$.getValue();if(Y({message:`set muted, currentVolume: ${T}, mute: ${f}`}),R.setMuted(f),de.setVolume(f?0:T),Cp(f),!f&&T===0){let B=On();R.setVolume(B),$p(B),de.setVolume(B)}},Ze=ne(!1),Mt=f=>{ie.log("set looped",{isLooped:f}),Ze.set(f),R.setLooped(f),l?.uiInfo?.onLoopedChanged?.(f)};Mt(X);let mi=()=>{l?.uiInfo?.onReportProblem?.()},lo=(f,T=!1)=>{Y({message:`set autoplayNextEnabled, value: ${f}`}),ie.log("set autoplay next enabled",{autoplayNextEnabled:f}),xt.ui.autoplayNextEnabled$.set(f),eh(f),T&&l?.onSetAutoplayNextEnabled?.(f)},nt=f=>{Y({message:`set timerNextVideoRunning, value: ${f}`}),ie.log("set timer next video running",{timerNextVideoRunning:f}),xt.ui.timerNextVideoRunning$.set(f)},Et=(f=!0)=>{let T=!0;if(f&&l?.onPrevVideoClick)try{T=l?.onPrevVideoClick?.()}catch{Y({message:"onPrevVideoClick callback failed to execute"})}if(!T)return;f&&ki("prev")||re()},yi=(f=!0)=>{let T=!0;if(f&&l?.onNextVideoClick)try{T=l?.onNextVideoClick?.()}catch{Y({message:"onNextVideoClick callback failed to execute"})}if(!T)return;f&&ki("next")||ce()},ki=f=>{let{isMobile:T,features:{playbackStatusNextVideoShow:B,playbackStatusShow:xe}}=fe;return B&&xe&&!T?(xt.ui.aboutToGoNextVideo.set(f),xt.ui.userActionsDisabled.set(!0),!0):!1},Ti=()=>{l?.onNextVideoAnnouncementShow?.()},Ii=()=>{l?.onNextVideoAnnouncementClick?.()},Ni=()=>{l?.onNextVideoAnnouncementAuto?.()},Lo=()=>{l?.onNextVideoAnnouncementCancel?.()},en=()=>{R.prepare()},Zi=()=>{(0,pt.assertNonNullable)(xt);let f=_e(xt.ui.controls.disabledControls$),T=_e(xt.playerPhase),B={playerPhase:T,isInteractive:k,isVideoEnded:!1,action:"none"};if(f.has("PLAY_BUTTON"))return;if(Y({message:"toggle play"}),T==="ads"){B.action="play",ie.log("toggle adman play",B),de.togglePlay();return}let xe=()=>{Y({message:"toggle play, call player.play"}),B.action="play",R.play(),l?.onPlay?.()},at=()=>{Y({message:"toggle play, call player.pause"}),B.action="pause",R.pause(),l?.onPause?.()};if(R.info.isEnded$.getValue()){if(Y({message:"toggle play, video ended, seek to 0"}),Ye.next(),Ee.next(Rr.SeekAction.REWIND),k){A?.();return}R.seekTime(0),xe()}else R.info.playbackState$.getValue()!==Jt.PlaybackState.PLAYING?xe():at();ie.log("toggle play",B)},Hn=(f,{changeReason:T="default",appliesTo:B="to-video"}={})=>{Y({message:`set quality, quality: ${f}`}),ie.log("set quality",{quality:f}),R.setAutoQuality(f==="auto"),f!=="auto"?(fe.features.qualityDetailsSubMenuEnabled?(wc({type:"exact_quality",quality:f,videoId:i},B),Fl(),R.setPredefinedQualityLimits(Jt.PredefinedQualityLimits.UNKNOWN)):yp(i,f),Eo.set(f),R.setQuality(f)):fe.features.qualityDetailsSubMenuEnabled?T==="default"&&(Fn("auto_quality",B),_e(Si)&&ir(!1),_e(It)&&Hi(!1)):Fl()},ir=(f,T="as-default")=>{Y({message:`set trafficSavingEnabled, value: ${f}`}),ie.log("set traffic saving enabled",{trafficSavingEnabled:f});let B=f?Jt.PredefinedQualityLimits.TRAFFIC_SAVING:Jt.PredefinedQualityLimits.UNKNOWN;fe.features.qualityDetailsSubMenuEnabled?(tn(B,T),Hl(!1)):(R.setPredefinedQualityLimits(B),Hl(f))},Hi=(f,T="as-default")=>{Y({message:`set highQualityEnabled, value: ${f}`}),ie.log("set high quality enabled",{highQualityEnabled:f}),tn(f?Jt.PredefinedQualityLimits.HIGH_QUALITY:Jt.PredefinedQualityLimits.UNKNOWN,T)},tn=(f,T)=>{f!==Jt.PredefinedQualityLimits.UNKNOWN&&(_e(Mn)&&!_e(jo)&&Hn("auto",{appliesTo:T,changeReason:"limit-changed"}),Fn(f,T)),R.setPredefinedQualityLimits(f)},Fn=(f,T)=>{wc({type:f,videoId:i},T),T==="as-default"&&wc({type:f,videoId:i},"to-video")},or=f=>{ie.log("set playback rate",{playbackRate:f}),R.setPlaybackRate(f),fe.features.saveRate&&ee&&!R.info.isLive$.getValue()&&Xg(f)},yr=()=>{let f=_e(bn),T=f.findIndex(({selected:xe})=>xe);if(T===f.length-1)return;let B=f[T+1];or(B.value)},wn=()=>{let f=_e(bn),T=f.findIndex(({selected:xe})=>xe);if(T===0)return;let B=f[T-1];or(B.value)},on=(f={...$i,selected:!1})=>{ie.log("set subtitles",{...f}),f&&f.value!==$i.value&&lt.next(f.isAuto?f.value+"_auto":f.value),Ri.set(f)},nr=()=>{ie.log("toggle subtitles");let f=_e(go),T=_e(Ri),B=_e(we);if(T?.value===$i.value){let xe=f.filter(at=>at.value!==$i.value).find(at=>at.value===B)||f[1];on(xe)}else on()},_o=(f,T,B=!0)=>{if(Y({message:`seek to time, time: ${f}`}),ie.log("seek to time",{time:f,action:T,forcePrecise:B}),Ee.next(T),R.info.isLive$.getValue()){let xe=R.info.duration$.getValue(),at=Math.min(0,xe+f);R.seekTime(at,B)}else{if(E?.getValue())return;R.info.isEnded$.getValue()&&(Y({message:"seek after ended, call callbacks.onPlay"}),l?.onPlay?.()),R.seekTime(qm(f),B)}},xr=f=>{Y({message:`seek to episode start time: ${f}`}),ie.log("seek to episode start time",{time:f}),_o(f,Rr.SeekAction.EPISODE,!0)},bo=(f,T)=>{Y({message:`seek to percent, percent: ${f}`}),ie.log("seek to percent",{percent:f,action:T});let B=_e(Ci)*f;_o(B,T,!1)},rr=f=>{Y({message:`seek external, time: ${f}`}),ie.log("seek external",{time:f}),Ee.next(Rr.SeekAction.UNKNOWN),R.seekTime(R.info.isLive$.getValue()?-f:f)},wr=f=>{let T=f.max??"none",B=f.min??"none";Y({message:`set auto quality limitation. Max: ${T}. Min: ${B}`}),ie.log("set auto quality limits",{max:T,min:B}),R.setAutoQualityLimits(f)},Nr=f=>{Y({message:`seek external to episode start time: ${f}`}),ie.log("seek external to episode start time",{time:f}),_o(f,Rr.SeekAction.EPISODE,!0)},ar=f=>{Y({message:`set playback rate to: ${f}`}),ie.log("set playback rate external",{playbackRate:f}),R.setPlaybackRate(f)},Di=ne(void 0),nn=ne(!1),rt=f=>{Y({message:`start scrubbing, progress: ${f}`}),ie.log("start scrubbing",{progress:f}),nn.set(!0),Nt(f)},Nt=f=>{Di.set(f)},vi,co,Vo=()=>{Di.set(void 0),nn.set(!1)},Ce=()=>{clearTimeout(co),clearTimeout(vi),vi=window.setTimeout(()=>{Vo()},500),We?.removeEventListener("seeked",Ce)},Bt=f=>{Y({message:`complete scrubbing, progress: ${f}`}),ie.log("complete scrubbing",{progress:f}),bo(f,Rr.SeekAction.SLIDER),_e(xt.ui.isMobile)&&_e(xt.state.currentFormat$)===Jt.VideoFormat.HLS?(We?.addEventListener("seeked",Ce),co=window.setTimeout(()=>{Ce()},300)):Vo()},xi=li([zt,Ci,Di],([f,T,B],xe)=>{xe((0,pt.isNonNullable)(B)?B*T:f)}),Zt=ne(!1),Ie=()=>{Zt.set(!0)},Pt=()=>{Zt.set(!1)},qt=ne({width:0,height:0}),di=li([qt],([{width:f}],T)=>{let B=Eh(f);T(B)}),Kt=ne(!1),Un=W.filter(f=>Hg(f)),Fi=li([di,Kt],([f,T])=>T?Un.filter(B=>!B.hideOnMobile):Un.filter(B=>!B.hideOnDesktopGridTypes?.includes(f))),uo=ne(W.filter(f=>Fg(f))),ms=li([uo,di],([f,T])=>f.filter(B=>!B.hideOnDesktopGridTypes?.includes(T))),vs=li([ms,Fi],([f,T])=>[...fe.features.additionalButtonsDesktopControlPanelRight?f.filter(B=>B.type==="desktop-control-panel-right"):[],...fe.features.additionalButtons?T.map((B,xe)=>({id:xe,weight:xe,type:"desktop-control-panel-right",testId:B.testId,icon:B.iconUrl,onClick:B.onClick,ariaLabel:B.ariaLabel??B.tooltip,tooltipText:B.tooltip})):[]]),Sn=ne(Q),Dr=li([Sn],([f])=>fe.features.additionalSettingsMenuItems?f.map(T=>T.type==="SWITCH"?{...T,onClick:T.onChangeEnabled}:T):[]),gs=(f,T)=>{let B=_e(uo).map(xe=>xe.id!==f?xe:{...xe,...T});uo.set(B)},ha=f=>{let T=_e(uo);if(T.some(B=>B.id===f.id)){Y({message:`Additional button with id: "${f.id}" was exist! Can't add more with the same id`});return}T.push(f),uo.set(T)},dl=f=>{let T=_e(uo);if(!T.some(B=>B.id===f)){Y({message:`Can't find additional button with id: "${f}"! Can't remove item with this id`});return}T=T.filter(B=>B.id!==f),uo.set(T)},hs=f=>{Ee.next(Rr.SeekAction.LIVE),Y({message:"live switch to low latency "+f}),ie.log("live switch to low latency "+f),R.setLiveLowLatency(f)},cl=(f,T)=>{let B=_e(Sn).map(xe=>xe.id!==f?xe:{...xe,...T});Sn.set(B)},_a=f=>{let T=_e(Sn);if(T.some(B=>B.id===f.id)){Y({message:`Settings menu item with id: "${f.id}" was exist! Can't add more with the same id`});return}T.push(f),Sn.set(T)},ul=f=>{let T=_e(Sn);if(!T.some(B=>B.id===f)){Y({message:`Can't find settings menu item with id: "${f}"! Can't remove item with this id`});return}T=T.filter(B=>B.id!==f),Sn.set(T)},zn=ne(j),kt=li([zn],([f])=>fe.features.additionalContextMenuItems?f:[]),yt=(f,T)=>{let B=_e(zn).map(xe=>xe.id!==f?xe:{...xe,...T});zn.set(B)},Cn=f=>{let T=_e(zn);if(T.some(B=>B.id===f.id)){Y({message:`Context menu item with id: "${f.id}" was exist! Can't add more with the same id`});return}T.push(f),zn.set(T)},Sr=f=>{let T=_e(zn);if(!T.some(B=>B.id===f)){Y({message:`Can't find context menu item with id: "${f}"! Can't remove item with this id`});return}T=T.filter(B=>B.id!==f),zn.set(T)},ba=li([Kt,$t],([f,T],B)=>{B(f&&T)}),Cr=()=>{Ee.next(Rr.SeekAction.LIVE),Y({message:"switch to active live"}),ie.log("switch to active live"),R.seekTime(0),R.info.playbackState$.getValue()!==Jt.PlaybackState.PLAYING&&xt.actions.internal.togglePlay()},kr=()=>{ie.log("skip adman"),de.skip()},Jr=(f=!0)=>{(0,pt.assertNonNullable)(xt),Y({message:`switch from ads to video, callPlay: ${f}`}),ie.log("switch from ads to video",{callPlay:f}),K.set("video"),f&&R.play()},pl=()=>{(0,pt.assertNonNullable)(xt),Y({message:"switch from video to ads"}),ie.log("switch from video to ads"),xt.actions.internal.pause(),oi(),K.set("ads")},Od=f=>{(0,pt.assertNonNullable)(xt);let T=f?"LiveWaitingStart":"thumb";ie.log("set live waiting start",{state:f,playerPhase:T}),K.set(T)},_u=f=>{(0,pt.assertNonNullable)(xt);let T=f?"LiveWaitingRecover":"thumb";ie.log("set live waiting recover",{state:f,playerPhase:T}),K.set(T)},Hd=f=>{(0,pt.assertNonNullable)(xt);let T=f?"LiveWaitingRecord":"thumb";ie.log("set live waiting record",{state:f,playerPhase:T}),K.set(T)},bu=()=>((0,pt.assertNonNullable)(xt),ie.log("get debug text data"),Dg(R,Ae,xt)),Fd=()=>((0,pt.assertNonNullable)(xt),JSON.stringify(Oe.getFinishedSpans())),$u=()=>((0,pt.assertNonNullable)(xt),Bg(R,Ae,xt)),$a=()=>We,Ud=()=>{Y({message:"toggle chromecast"}),ie.log("toggle chromecast"),R.toggleChromecast()},fl=f=>{if((0,pt.assertNonNullable)(xt),R.info.isEnded$.getValue())return;let T=!f;if(_e(xt.playerPhase)==="ads"){Y({message:`pause ads, internalCall: ${T}`}),ie.log("pause ads",{internalCall:T}),de.pause();return}Y({message:`pause video, internalCall: ${T}`}),ie.log("pause video",{internalCall:T}),T&&l?.onPause?.(),R.pause()},zd=f=>{(0,pt.assertNonNullable)(xt);let T=!f;if(_e(xt.playerPhase)==="ads"){Y({message:`play ads, internalCall: ${T}`}),ie.log("play ads",{internalCall:T}),de.play();return}Y({message:`play video, internalCall: ${T}`}),ie.log("play video",{internalCall:T}),T&&l?.onPlay?.(),R.play()},qd=f=>{(0,pt.assertNonNullable)(xt);let T=!f;if(_e(xt.playerPhase)==="ads"){Y({message:"player cannot be stopped during ads via external method"});return}Y({message:`player will be stopped, internalCall: ${T}`}),L?.()},Wd=(f,T)=>{(0,pt.assertNonNullable)(xt),Y({message:`first start, show ads: ${f}, internalCall: ${!T}`}),ie.log("first start",{showAds:f,external:T}),f?K.set("ads"):(K.set("video"),T?R.play():xt.actions.internal.togglePlay())},_s=()=>(Y({message:"getting time codes"}),u),Kd=()=>{let f=_s();if(!f||[0,1].includes(f.length))return;let T=R.info.position$.getValue();return f.find(B=>B.time>T)},yu=f=>{let T=f;T||(T=Kd());let B=R.info.position$.getValue();ie.log("seek to next episode",{currentTime:B,...T}),T&&(Y({message:"seek to next episode"}),_o(T.time,Rr.SeekAction.EPISODE,!0))},Qd=()=>{let f=_s();if(!f||[0,1].includes(f.length))return;let T=R.info.position$.getValue(),B=f.findIndex(at=>at.time>T),xe=B===-1?f.length-2:B-2;if(!(xe<0))return f[xe]},Qe=f=>{let T=f;T||(T=Qd());let B=R.info.position$.getValue();ie.log("seek to prev episode",{currentTime:B,...T}),T&&(Y({message:"seek to prev episode"}),_o(T.time,Rr.SeekAction.EPISODE,!0))},Qt=()=>(Y({message:"getting preview thumbs data"}),ie.log("get preview thumbs data",{...b}),b),qn=async()=>{let f=oe?.isActive(),T="none";oe?.isActive()?(T="remove",await oe?.remove()):(T="request",await oe?.request()),ie.log("toggle picture in picture",{isActive:f,action:T})},ya=(f=-90)=>{ie.log("rotate video",{alphaDiff:f}),mt.update(T=>T+f)},Wn=ne([]);C?.subscribe(f=>{let T=[];for(let B=0;B<f.length;B++){let{range:[xe,at],subjects:wt}=f[B];B===0&&xe!==0&&T.push({time:0,text:"",interactive:!1,completed:!0}),T.push({time:xe/1e3,text:"",interactive:!0,completed:fe.features.interactiveTimeOpenUri?!wt.length||wt.every(Ht=>Ht.isRemoved):!wt.length}),at!==1/0&&T.push({time:at/1e3,text:"",interactive:!1,completed:!0})}Wn.set(T)});let P1=ne(!1);E?.subscribe(f=>{f&&_e(nn)&&Vo()});let qm=f=>{if(!k)return f;let T=_e(Wn),B=_e(Ci),at=_e(Go)/B,wt=T.find(Ht=>Ht.interactive&&!Ht.completed&&Ht.time>at);return typeof wt?.time=="number"?Math.min(f,wt.time-.05):f},A1=()=>{xt.ui.episodes.panelOpened$.set(!1)},M1=()=>{ie.log("destroy store"),clearTimeout(co),clearTimeout(vi),ti.unsubscribe(),Bi.unsubscribe(),R.destroy(),de.destroy(),ge?.destroy(),Ke?.destroy(),ut.unsubscribe(),gt?.disconnect(),gt=null,ye.destroy()},xt={interfaceLanguage$:we,isCyrillicRelatedInterface$:Dt,initVideo:Xe,videoId:i,isClip:o,playerPhase:he,vsid:De,state:{positionExact$:zt,positionWithScrubbing$:xi,duration$:Ci,playbackState$:Co,isPlaying$:mn,isLoaderVisible:To,bufferedProgress$:Xo,isLive$:Wt,canChangePlaybackSpeed$:Gt,isActiveLive$:vn,isOldestAvailableLive$:bi,isRewindableLive$:ro,isEnded$:G,muted$:ei,volume$:ii,trafficSavingEnabled$:Si,highQualityEnabled$:It,autoQualityLimitingAvailable$:Mn,availableVideoStreams$:_r,availableAudioStreams$:Zn,videoStream$:gn,audioStream$:Ln,currentQuality$:Xn,isAutoQualityEnabled$:jo,availableQualities$:Rn,currentPlaybackRate$:Yo,availablePlaybackRates$:bn,currentSubtitle$:Ri,availableTextTracks$:$n,availableSubtitlesList$:go,currentSubtitleCaptions$:Jn,isAutoSubtitleCaptionVisible$:Zo,chromecastState$:_i,chromecastDeviceName$:ko,chromecastConnected$:ao,currentFormat$:fn,throughputEstimation$:Vi,videoBitrate$:oo,videoSize$:jt,errorLog$:Je,crashed$:$t,isAudioAvailable$:no,isAudioDisabled:!!s,canDownload:fe.features.download&&!!d,availableSources$:er,hasMpegSources$:Mo,isInteractive:k,showInteractiveGraph:fe.features.interactiveGraph,showSeekToInteractive:fe.features.seekToInteractive,showPlayPrevChapter:fe.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:fe.features.interactiveTimeIndicator&&!!_e(Wn).length,interactiveEpisodes$:Wn,isInteractiveTime$:E?Ut(E):ne(!1),isInteractiveExpectation$:P1,hasInteractiveBranches:I,playPrevChapterDisabledTooltip:N,looped$:Ze,loadedMetadata$:ne(!1),isAutoQualityAvailable$:Po},ui:{t:ft,controlsVisible:ne(!1),touched:ne(!1),controls:{prevButton:ne(void 0),playButton:ne(void 0),replayButton:ne(void 0),nextButton:ne(void 0),playPrevChapterButton:ne(void 0),seekToInteractiveButton:ne(void 0),interactiveGraphButton:ne(void 0),liveButton:ne(void 0),time:ne(void 0),episodes:ne(void 0),volume:ne(void 0),subtitles:ne(void 0),settings:ne(void 0),context:ne(void 0),chromecast:ne(void 0),pip:ne(void 0),fullscreen:ne(void 0),vkLogo:ne(void 0),interactiveTimeIndicator:ne(void 0),timeline:ne(void 0),autoplayNextToggle:ne(void 0),additionalButtons:W.length?W.reduce(f=>[...f,ne(void 0)],[]):[],disabledControls$:ae},modals:{hotKeyMap:{show:ne(!1),data:ne({title:"",closeBtnText:"",groups:[]})}},isFullscreen:je,isFullscreenOpenedByKeyboard:et,rotateAlpha:mt,isAutoplay:ne(!1),debugPanelVisible:ne(!1),episodes:{panelOpened$:ne(!1),openedByKeyboard$:ne(!1)},contextMenu:{visible$:ne(!1),btnRef$:ne(void 0),openedByBtnKeyboard$:ne(!1),openedByHotKey$:ne(!1),lastActiveElem$:ne(void 0),showContextMenuBtn$:ne(!1),position$:ne({top:0,left:0})},playerSize:qt,isMobile:Kt,mobileNotReportControlHidden$:ba,mobileUnmuteButtonExpanded:ne(!1),mobileUnmuteButtonVisible:ne(!1),icon3DVideoVisible:ne(!1),scrubbingInProgress:nn,volumeChangingInProgress:Zt,is3DVideo:ne(!1),currentGridType$:di,additionalButtonsDeprecated$:Fi,additionalDesktopControlPanelRightButtons$:vs,additionalSettingsMenuItems$:Dr,additionalContextMenuItems$:kt,interactiveHideMobileControls:ne(!1),overlayContainer$:ne(void 0),startedByKeyboard$:ne(!1),autoplayNextEnabled$:ne(!1),timerNextVideoRunning$:ne(!0),settingsMenu:{visible$:ne(!1),ref$:ne(void 0),openedByBtnKeyboard$:ne(!1)},settingsSubMenu:{visible$:ne(!1),ref$:ne(void 0),name$:ne(void 0)},aboutToGoNextVideo:ne(void 0),userActionsDisabled:ne(!1)},ads:{position:ne(0),duration:ne(0),playbackState:ne("inactive"),canSkip:ne(!1),secondsToWatchBeforeSkip:ne(0),postrollPassed:ne(!1)},webApi:{pictureInPictureApi:oe,annotationsApi:U},actions:{internal:{preload:en,firstStart:f=>Wd(f,!1),play:()=>zd(!1),pause:()=>fl(!1),togglePlay:Zi,toggleMuted:Dn,openSettingsMenu:$r,closeSettingsMenu:tr,openSettingsSubMenu:Jo,closeSettingsSubMenu:Bn,setVolume:Yt,startVolumeChanging:Ie,stopVolumeChanging:Pt,setVideoStream:Vn,setAudioStream:Yi,setQuality:Hn,setTrafficSavingEnabled:ir,setHighQualityEnabled:Hi,setPlaybackRate:or,incrementPlaybackRate:yr,decrementPlaybackRate:wn,setSubtitle:on,toggleSubtitle:nr,togglePictureInPicture:qn,startScrubbing:rt,progressScrubbing:Nt,completeScrubbing:Bt,toggleChromecast:Ud,switchToActiveLive:Cr,switchFromAdsToVideo:Jr,switchFromVideoToAds:pl,skipAd:kr,setLiveWaitingStart:Od,setLiveWaitingRecover:_u,setLiveWaitingRecord:Hd,getDebugTextData:bu,getTraceTextData:Fd,getDebugPanelData:$u,getVideoElement:$a,seekTime:(f,T,B)=>_o(f,T,B),clearDelayedBufferingCheckTimeout:Oi,seekEpisodeStartTime:xr,seekToPercent:bo,getNextEpisode:Kd,seekToNextEpisode:yu,getPrevEpisode:Qd,seekToPrevEpisode:Qe,startLogging:un,stopLogging:pn,startCameraManualRotation:Wo,stopCameraManualRotation:wo,moveCameraFocusPX:Gi,holdCamera:So,releaseCamera:Ko,getVideoEpisodes:_s,getPreviewThumbsData:Qt,downloadVideo:xn,addLanguage:Ip,setLanguage:Ot,nextMovie:Se,videoRotate:ya,correctSeekTimeToInteractive:qm,replayInteractive:A,setLooped:Mt,reportProblem:mi,setAutoplayNextEnabled:lo,setTimerNextVideoRunning:nt,prevVideoClick:Et,nextVideoClick:yi,nextVideoAnnouncementShow:Ti,nextVideoAnnouncementClick:Ii,nextVideoAnnouncementAuto:Ni,nextVideoAnnouncementCancel:Lo},external:{firstStart:f=>Wd(f,!0),play:()=>zd(!0),pause:()=>fl(!0),stop:()=>qd(!0),seekTime:f=>rr(f),seekEpisodeStartTime:f=>Nr(f),setPlaybackRate:f=>ar(f),setAutoQualityLimits:f=>wr(f),setMuted:ho,toggleSubtitle:nr,setVolume:Yt,returnFocusToEpisodes:A1,updateAdditionalSettingsItem:cl,addAdditionalSettingsItem:_a,removeAdditionalSettingsItem:ul,updateAdditionalContextItem:yt,addAdditionalContextItem:Cn,removeAdditionalContextItem:Sr,updateAdditionalButton:gs,addAdditionalButton:ha,removeAdditionalButton:dl,setLiveLowLatency:hs}},callbacks:l,setUiCallbacks:f=>{Fe={...f}},getAdmanWrapper:()=>de,getLogger:()=>Ne,getPlayer:()=>R,destroy:M1};return xt};function is(t,e,i,o){let n=["interactiveTimeIndicator"],a=e[i]?.getBoundingClientRect(),s=(o||n.includes(i))&&!!a&&!!(a.right-a.left),{top:d,left:l,bottom:c,right:u}=Zs(e[i],t||void 0);return{left:s?l:0,right:s?u:0,top:s?d:0,bottom:s?c:0,isDisplayed:s}}var Js=(t,e,i,o)=>{if(t)for(let[n,a]of Object.entries(e))["tooltipPointerOffsetX","disabledControls$","additionalButtons"].includes(n)||a.set(is(t,i,n,o))};var Gc=async(t,e,i)=>{await eo(),e&&i&&(i.focus(),t.set(!1))};var Z$=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"></path></svg>');function kf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Z$();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"dots-icon",role:"img",...i})),_(t,o)}function Tf(t,e){H(e,!0);let[i,o]=Le(),n=()=>y(l,"$contextMenuVisible$",i),a=m(e,"disabled",3,!1),s=m(e,"ariaLabel",3,""),d=be(),l=d.ui.contextMenu.visible$,c=d.ui.contextMenu.openedByBtnKeyboard$,u=d.ui.contextMenu.showContextMenuBtn$,b=d.ui.contextMenu.position$,p=d.ui.contextMenu.btnRef$,$=Z(void 0);He(()=>{r($)&&vt(()=>{p.set(r($))})});let w=E=>{let A=da(E),L=bh(r($));b.set(L),c.set(A),l.set(!n())},x=()=>{u.set(!0)},k=()=>{u.set(!1)},C=v(()=>n()?"opened":"");At(t,{get className(){return r(C)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return s()},click:w,focus:x,blur:k,get ariaExpanded(){return n()},get ref(){return r($)},set ref(E){D($,le(E))},children:(E,A)=>{kf(E,{})},$$slots:{default:!0}}),F(),o()}var X$=t=>{t.stopPropagation()},J$=M("<div><!> <div></div> <div></div></div>"),e2={hash:"svelte-od3veb",code:`.interactive-episode-icon-animated.svelte-od3veb {position:absolute;top:16px;right:16px;width:32px;height:32px;transition:0.3s;opacity:1;}.interactive-episode-icon-animated.icon-small.svelte-od3veb {width:28px;height:28px;}.invisible.svelte-od3veb {opacity:0;visibility:hidden;}.fullscreen.svelte-od3veb:not(.mobile) {width:40px;top:19px;right:23px;height:40px;}.mobile.svelte-od3veb {width:28px;height:28px;top:12px;right:14px;}.fullscreen.mobile.svelte-od3veb {width:32px;height:32px;}
231
231
 
232
232
  @media screen and (orientation: portrait) {.interactive-episode-icon-animated.mobile.fullscreen.svelte-od3veb {top:40px;right:16px;}
233
233
  }
@@ -252,7 +252,7 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
252
252
  opacity: 0;
253
253
  }
254
254
  }.pulse.svelte-od3veb {display:block;content:'';border:1px solid #fff;position:absolute;top:0;left:0;right:0;bottom:0;border-radius:100%;transform:scale(1.8);
255
- animation: 1s svelte-od3veb-pulse infinite;transition:0.3s;pointer-events:none;}.pulse.paused.svelte-od3veb {animation-play-state:paused;}.interactive-episode-icon-animated svg {width:100%;height:100%;}.ref-block.svelte-od3veb {position:absolute;top:0;width:100%;height:100%;visibility:hidden;}.hidden.svelte-od3veb {display:none;}`};function pd(t,e){H(e,!0),z(t,e2);let[i,o]=Le(),n=()=>y(k,"$isMobile",i),a=()=>y(L,"$areControlsVisible",i),s=()=>y(N,"$currentGridType$",i),d=()=>y(E,"$isInteractiveTime$",i),l=()=>y(x,"$interactiveControlsOpacity$",i),c=()=>y(A,"$showInteractiveTimeIndicatorTooltip$",i),u=()=>y(C,"$isFullscreen",i),b=m(e,"ref",15,void 0),p=Z(void 0),$=be(),w=Qi(),{interactiveControlsOpacity$:x}=w,k=$.ui.isMobile,C=$.ui.isFullscreen,E=$.state.isInteractiveTime$,A=w.showInteractiveTimeIndicatorTooltip$,L=$.ui.controlsVisible,I=$.callbacks?.onInteractiveTimeIndicatorClick,N=$.ui.currentGridType$,W=v(()=>!n()&&a()),Q=v(()=>fa(s(),"s")),j=v(()=>!d()||!!l()||r(W)),re=Z(!1);He(()=>{D(re,le(r(j)))});let ce=()=>{D(re,!0)},X=()=>{ge(),r(p)?.addEventListener("animationiteration",ce,{once:!0})},ge=()=>{D(re,!1),r(p)?.removeEventListener("animationiteration",ce)},ee=U=>{A.set(U)},Me=v(()=>c()&&!r(j));He(()=>{c()?X():ge()});let Pe=()=>{r(j)||(A.set(!0),I?.())};dn(()=>{A.clearTimeout(),ge()});let Ve=()=>{A.set(!1)},fe=O("tooltip_interactive_interaction_time_indicator");var Oe=J$();let ie;Oe.__mousemove=[X$],Oe.__click=Pe;var R=h(Oe);fo(R,{tooltipContent:fe,get tooltipActive(){return r(Me)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:ee,get ref(){return b()},set ref(U){b(U)},children:(U,Y)=>{od(U,{completed:!0})},$$slots:{default:!0}});var Re=P(R,2);let de;st(Re,U=>b(U),()=>b());var Ke=P(Re,2);let oe;st(Ke,U=>D(p,U),()=>r(p)),g(Oe),S((U,Y,Ae)=>{ie=J(Oe,1,"interactive-episode-icon-animated svelte-od3veb",null,ie,U),de=J(Re,1,"ref-block svelte-od3veb",null,de,Y),oe=J(Ke,1,"pulse svelte-od3veb",null,oe,Ae)},[()=>({mobile:n(),fullscreen:u(),invisible:r(j),"icon-small":r(Q)}),()=>({hidden:r(j)}),()=>({paused:r(re)})]),_t("mouseleave",Oe,Ve),_(t,Oe),F(),o()}ot(["mousemove","click"]);function jc(t,e){H(e,!0);let i=m(e,"tooltipEnabled",3,!0),o=m(e,"disabled",3,!1),n=m(e,"className",3,void 0),a=m(e,"ref",15);fo(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 className(){return n()},get ref(){return a()},set ref(s){a(s)},children:(s,d)=>{var l=Be();let c=v(()=>e.buttonComponent);var u=se(l);pi(u,()=>r(c),(b,p)=>{p(b,Qr(()=>e.buttonComponentProps??{}))}),_(s,l)},$$slots:{default:!0}}),F()}var jr={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var i2=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M16 10.835V7.5a1 1 0 1 1 2 0v9a1 1 0 0 1-2 0v-3.335l-8.149 4.67C7.03 18.304 6 17.715 6 16.772V7.227c0-.943 1.029-1.533 1.851-1.061L16 10.834z"></path></svg>');function If(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=i2();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"24",fill:"none","aria-hidden":"true",role:"img",...i})),_(t,o)}function ma(t,e){let i=m(e,"isPrev",3,!1),o=m(e,"isMobile",3,!1),n=m(e,"width",3,"24"),a=m(e,"height",3,"24"),s=v(()=>i()&&o()?"transform: scaleX(-1) scale(1.3333);":i()?"transform: scaleX(-1);":o()?"transform: scale(1.3333);":void 0),d=v(()=>i()?"prev-icon":"next-icon");If(t,{get style(){return r(s)},get width(){return n()},get height(){return a()},get viewBox(){return e.viewBox},get"data-testid"(){return r(d)}})}var o2=M('<div class="icon-background-mobile svelte-xtk2k4"></div>'),n2=M("<!> <!>",1),r2={hash:"svelte-xtk2k4",code:".icon-background-mobile.svelte-xtk2k4 {position:absolute;top:0;left:0;width:100%;height:100%;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);}"};function os(t,e){H(e,!0),z(t,r2);let i=m(e,"ref",15,void 0),o=m(e,"isMobile",3,!1),n=m(e,"disabled",3,!1),s=be().ui.t,d=v(()=>e.type==="prev"?s("tooltip_previous"):s("tooltip_next")),l=v(()=>e.type==="prev"?s("hotkey_map_item_prev_video_value"):s("hotkey_map_item_next_video_value")),c=v(()=>`btn-${o()?"m":"d"}--${e.type}`);At(t,{get className(){return r(c)},get testId(){return`btn-${e.type??""}`},get disabled(){return n()},get ariaLabel(){return r(d)},get click(){return e.click},get ariaKeyShortCut(){return r(l)},get ref(){return i()},set ref(u){i(u)},children:(u,b)=>{var p=n2(),$=se(p);{var w=C=>{var E=o2();_(C,E)};V($,C=>{o()&&C(w)})}var x=P($,2);let k=v(()=>e.type==="prev");ma(x,{get isMobile(){return o()},get isPrev(){return r(k)}}),_(u,p)},$$slots:{default:!0}}),F()}var a2=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M12 10.096a.4.4 0 0 1-.67.296L7.044 6.493a.67.67 0 0 1 0-.986l4.288-3.899a.4.4 0 0 1 .669.296V5a8 8 0 1 1-8 8 1 1 0 1 1 2 0 6 6 0 1 0 6-6z"></path></svg>');function fd(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=a2();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"replay-icon",role:"img",...i})),_(t,o)}var qh=require("@vkontakte/videoplayer-shared");var s2=M('<div class="icon-background-mobile svelte-1ot3duq"></div>'),l2=M("<!> <div><!></div>",1),d2={hash:"svelte-1ot3duq",code:".mobile.svelte-1ot3duq {position:relative;display:flex;align-items:center;justify-content:center;}.mobile.svelte-1ot3duq svg {transform:scale(2);}.icon-background-mobile.svelte-1ot3duq {position:absolute;top:16px;left:16px;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);width:calc(100% - 32px);height:calc(100% - 32px);}"};function el(t,e){H(e,!0),z(t,d2);let i=m(e,"ref",15,void 0),o=m(e,"isMobile",3,!1),n=m(e,"disabled",3,!1),a=m(e,"className",3,""),s=m(e,"click",3,qh.noop),d=O("tooltip_restart"),l=v(()=>`${o()?"btn-m--play":""} ${a()}`);At(t,{get className(){return r(l)},testId:"btn-replay",ariaLabel:d,get disabled(){return n()},get click(){return s()},get ariaKeyShortCut(){return Mr.KeyK},get ref(){return i()},set ref(c){i(c)},children:(c,u)=>{var b=l2(),p=se(b);{var $=C=>{var E=s2();_(C,E)};V(p,C=>{o()&&C($)})}var w=P(p,2);let x;var k=h(w);fd(k,{}),g(w),S(C=>x=J(w,1,"svelte-1ot3duq",null,x,C),[()=>({mobile:o()})]),_(c,b)},$$slots:{default:!0}}),F()}var c2=ve('<svg fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-testid="play-icon"><path d="M17.671 10.923c.82.483.82 1.67 0 2.154l-8.787 5.175A1.25 1.25 0 0 1 7 17.174V6.826a1.25 1.25 0 0 1 1.884-1.078l8.787 5.175z"></path></svg>');function gr(t,e){"use strict";let i=m(e,"width",3,"24"),o=m(e,"height",3,"24"),n=m(e,"viewBox",3,"0 0 24 24"),a=m(e,"fill",3,"var(--btn-color)");var s=c2(),d=h(s);g(s),S(()=>{De(s,"width",i()),De(s,"height",o()),De(s,"viewBox",n()),De(d,"fill",a())}),_(t,s)}var u2=ve('<svg fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-testid="pause-icon"><path d="M8.712 5c.448 0 .61.047.774.134a.913.913 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134H6.788c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.913.913 0 0 1 .38-.38C6.178 5.047 6.34 5 6.788 5h1.924zm8 0c.448 0 .61.047.774.134a.914.914 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134h-1.924c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.914.914 0 0 1 .38-.38c.164-.087.326-.134.774-.134h1.924z"></path></svg>');function Yr(t,e){"use strict";let i=m(e,"width",3,"24"),o=m(e,"height",3,"24"),n=m(e,"viewBox",3,"0 0 24 24"),a=m(e,"fill",3,"var(--btn-color)");var s=u2(),d=h(s);g(s),S(()=>{De(s,"width",i()),De(s,"height",o()),De(s,"viewBox",n()),De(d,"fill",a())}),_(t,s)}var Wh=require("@vkontakte/videoplayer-shared");var p2=M('<div class="icon-background-mobile svelte-1ot3duq"></div>'),f2=M("<!> <div><!></div>",1),m2={hash:"svelte-1ot3duq",code:".mobile.svelte-1ot3duq {position:relative;display:flex;align-items:center;justify-content:center;}.mobile.svelte-1ot3duq svg {transform:scale(2);}.icon-background-mobile.svelte-1ot3duq {position:absolute;top:16px;left:16px;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);width:calc(100% - 32px);height:calc(100% - 32px);}"};function tl(t,e){H(e,!0),z(t,m2);let[i,o]=Le(),n=()=>y(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=Qi(),s=m(e,"ref",15,void 0),d=m(e,"isMobile",3,!1),l=m(e,"isPlaying",3,!1),c=m(e,"disabled",3,!1),u=m(e,"className",3,""),b=m(e,"click",3,Wh.noop),$=be().ui.t,{toggle:w}=a,x=v(()=>w),k=v(()=>n()!==null),C=v(()=>r(k)?n():l()),E=v(()=>r(C)?$("tooltip_pause"):$("tooltip_play")),A=v(()=>r(C)?Yr:gr),L=v(()=>`${d()?"btn-m--play":""} ${u()}`),I=v(()=>r(k)?r(x):b());At(t,{get className(){return r(L)},testId:"btn-play",get click(){return r(I)},get disabled(){return c()},get ariaLabel(){return r(E)},get ariaKeyShortCut(){return Mr.KeyK},get ref(){return s()},set ref(N){s(N)},children:(N,W)=>{var Q=f2();let j=v(()=>r(A));var re=se(Q);{var ce=Me=>{var Pe=p2();_(Me,Pe)};V(re,Me=>{d()&&Me(ce)})}var X=P(re,2);let ge;var ee=h(X);pi(ee,()=>r(j),(Me,Pe)=>{Pe(Me,{})}),g(X),S(Me=>ge=J(X,1,"svelte-1ot3duq",null,ge,Me),[()=>({mobile:d()})]),_(N,Q)},$$slots:{default:!0}}),F(),o()}var v2=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M12.583 12.917v2.496a1 1 0 0 1-1.522.853l-5.583-3.413a1 1 0 0 1 0-1.706l5.583-3.413a1 1 0 0 1 1.522.853v2.496l5.478-3.349a1 1 0 0 1 1.522.853v6.826a1 1 0 0 1-1.522.853z"></path></svg>');function Ef(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=v2();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","data-testid":"play-prev-chapter-icon",role:"img",...i})),_(t,o)}function md(t,e){H(e,!0);let i=m(e,"ref",15,void 0),o=m(e,"hidden",3,!1),n=m(e,"disabled",3,!1),a=O("tooltip_interactive_go_back"),s=v(()=>o()?"hidden":"");At(t,{get className(){return r(s)},testId:"btn-play-prev-chapter",ariaLabel:a,get disabled(){return n()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,l)=>{Ef(d,{})},$$slots:{default:!0}}),F()}var g2=M('<span class="gutter svelte-et3q1q"><span><!></span></span>'),h2={hash:"svelte-et3q1q",code:".gutter.svelte-et3q1q {--gutterWidth: 32px;--gutterHeight: 12px;--togglerWidth: 18px;--togglerHeight: 18px;--togglerGap: calc(var(--togglerWidth) / 6);position:relative;width:var(--gutterWidth);height:var(--gutterHeight);background-color:rgba(255, 255, 255, 0.3);border-radius:50px;}.toggler.svelte-et3q1q {position:absolute;top:calc(((var(--togglerHeight) - var(--gutterHeight)) / 2) * -1);left:0;display:flex;align-items:center;justify-content:center;width:var(--togglerWidth);height:var(--togglerHeight);background-color:rgba(98, 99, 100, 1);border-radius:50%;transform:translateX(calc(var(--togglerGap) * -1));transition-property:background-color, transform;transition-duration:0.2s;transition-timing-function:ease;}.toggler.enabled.svelte-et3q1q {background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)));}"};function vd(t,e){H(e,!0),z(t,h2);let[i,o]=Le(),n=()=>y(d,"$autoplayNextEnabled$",i),a=m(e,"ref",15,void 0),s=be(),d=s.ui.autoplayNextEnabled$,l=s.actions.internal.setAutoplayNextEnabled;At(t,{click:()=>{l(!n(),!0)},get ref(){return a()},set ref(u){a(u)},children:(u,b)=>{var p=g2(),$=h(p);let w;var x=h($);{var k=E=>{gr(E,{width:"14",height:"14",fill:"#000"})},C=E=>{Yr(E,{width:"14",height:"14",fill:"#000"})};V(x,E=>{n()?E(k):E(C,!1)})}g($),g(p),S(E=>w=J($,1,"toggler svelte-et3q1q",null,w,E),[()=>({enabled:n()})]),_(u,p)},$$slots:{default:!0}}),F(),o()}var _2=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M16.726 4.845C16.187 4.8 15.496 4.8 14.5 4.8H7.9a.9.9 0 1 1 0-1.8h6.639c.947 0 1.713 0 2.333.05.64.053 1.204.163 1.726.43a4.4 4.4 0 0 1 1.923 1.922c.266.523.377 1.087.429 1.726.05.62.05 1.386.05 2.334v5.076c0 .948 0 1.714-.05 2.334-.052.64-.163 1.203-.43 1.726a4.4 4.4 0 0 1-1.922 1.922c-.522.267-1.086.377-1.726.43-.62.05-1.386.05-2.333.05H7.9a.9.9 0 1 1 0-1.8h6.6c.995 0 1.687 0 2.226-.045.528-.043.828-.123 1.055-.238a2.6 2.6 0 0 0 1.136-1.137c.115-.226.195-.527.239-1.055.044-.538.044-1.23.044-2.225v-5c0-.995 0-1.687-.044-2.226-.043-.527-.124-.828-.239-1.054a2.6 2.6 0 0 0-1.136-1.137c-.227-.115-.527-.195-1.055-.238" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M7.76 11.169V8.908c0-.708.704-1.143 1.252-.774l4.594 3.093c.525.353.525 1.193 0 1.546l-4.594 3.093c-.548.369-1.252-.066-1.252-.774v-2.261l-4.508 3.035C2.704 16.235 2 15.8 2 15.091V8.908c0-.708.704-1.143 1.252-.774z"></path></svg>');function Pf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=_2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"seek-to-interactive-icon",role:"img",...i})),_(t,o)}function gd(t,e){H(e,!0);let i=m(e,"ref",15,void 0),o=m(e,"hidden",3,!1),n=m(e,"disabled",3,!1),a=O("tooltip_interactive_seek"),s=v(()=>o()?"hidden":"");At(t,{get className(){return r(s)},testId:"btn-seek-to-interactive",ariaLabel:a,get disabled(){return n()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,l)=>{Pf(d,{})},$$slots:{default:!0}}),F()}var b2=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M16.777 3h1.419c.31 0 .596 0 .834.02.258.02.539.068.817.21.397.2.72.523.923.918.141.277.19.557.21.814.02.237.02.521.02.83V7.19c0 .31 0 .594-.02.831-.02.256-.069.537-.21.813a2.1 2.1 0 0 1-.923.92c-.278.14-.56.188-.817.21-.238.019-.524.019-.834.019h-1.419c-.31 0-.596 0-.834-.02a2.15 2.15 0 0 1-.817-.21 2.1 2.1 0 0 1-.923-.919 2.1 2.1 0 0 1-.21-.813 8 8 0 0 1-.02-.63l-2.198-.002c-.495-.001-.81 0-1.05.018-.23.019-.309.05-.343.067a.8.8 0 0 0-.352.35c-.017.034-.049.113-.068.341-.02.24-.02.554-.02 1.046v5.57c0 .49 0 .804.02 1.043.019.228.05.306.068.34.077.15.2.273.35.35.035.017.113.049.342.067.24.02.555.021 1.048.022l2.203.003a8 8 0 0 1 .02-.627c.02-.256.069-.537.21-.813.203-.396.526-.718.923-.92.278-.14.56-.189.817-.21.238-.019.524-.019.834-.019h1.419c.31 0 .596 0 .834.02.258.02.539.068.817.21.397.201.72.523.923.919.141.276.19.557.21.813.02.237.02.522.02.831v1.397c0 .31 0 .594-.02.831-.02.256-.069.537-.21.814a2.1 2.1 0 0 1-.923.919c-.278.14-.56.189-.817.21-.238.019-.524.019-.834.019h-1.419c-.31 0-.596 0-.834-.02a2.15 2.15 0 0 1-.817-.21 2.1 2.1 0 0 1-.923-.918 2.1 2.1 0 0 1-.21-.814 8 8 0 0 1-.02-.63l-2.24-.002c-.449 0-.839-.001-1.16-.028-.341-.028-.684-.09-1.016-.259a2.6 2.6 0 0 1-1.14-1.137c-.17-.33-.231-.672-.259-1.011-.026-.321-.026-.71-.026-1.156v-1.921H2.905A.903.903 0 0 1 2 11.992c0-.498.405-.901.905-.901h5.227V9.177c0-.448 0-.837.026-1.159.028-.34.09-.682.26-1.013a2.6 2.6 0 0 1 1.144-1.138c.332-.168.676-.23 1.017-.257.323-.025.714-.025 1.164-.024l2.23.003a8 8 0 0 1 .02-.627c.02-.257.069-.537.21-.814.203-.395.526-.717.923-.919.278-.14.56-.189.817-.21C16.18 3 16.467 3 16.777 3m-.833 1.837a1 1 0 0 1 .146-.02 10 10 0 0 1 .72-.014h1.354c.353 0 .563 0 .719.013a1 1 0 0 1 .146.021.3.3 0 0 1 .126.126 1 1 0 0 1 .021.145c.013.156.014.365.014.716v1.334c0 .352 0 .561-.014.716a1 1 0 0 1-.02.146.3.3 0 0 1-.127.125 1 1 0 0 1-.146.022c-.156.012-.366.013-.719.013H16.81c-.353 0-.563 0-.719-.013a1 1 0 0 1-.146-.022.3.3 0 0 1-.126-.125 1 1 0 0 1-.021-.146 10 10 0 0 1-.014-.716V5.824c0-.351.001-.56.014-.716a1 1 0 0 1 .021-.145.3.3 0 0 1 .126-.126Zm0 11.018a1 1 0 0 1 .146-.022c.156-.012.366-.013.72-.013h1.354c.353 0 .563 0 .719.013a1 1 0 0 1 .146.022.3.3 0 0 1 .126.125 1 1 0 0 1 .021.146c.013.155.014.364.014.716v1.334c0 .351 0 .56-.014.716a1 1 0 0 1-.02.145.3.3 0 0 1-.127.126 1 1 0 0 1-.146.02c-.156.014-.366.014-.719.014H16.81c-.353 0-.563 0-.719-.013a1 1 0 0 1-.146-.021.3.3 0 0 1-.126-.126 1 1 0 0 1-.021-.145 10 10 0 0 1-.014-.716v-1.334c0-.352.001-.561.014-.716a1 1 0 0 1 .021-.146.3.3 0 0 1 .126-.125Z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M15.2 5.899v1.203c0 .594 0 .892.115 1.119.102.2.265.362.464.463.227.116.525.116 1.12.116H18.1c.595 0 .892 0 1.12-.116.199-.101.361-.264.463-.463.116-.227.116-.525.116-1.12V5.9c0-.595 0-.892-.116-1.12a1.06 1.06 0 0 0-.464-.463c-.227-.116-.524-.116-1.119-.116h-1.203c-.594 0-.892 0-1.119.116-.2.102-.362.264-.464.464-.115.227-.115.524-.115 1.119Zm-.051 11.03v1.143c0 .605 0 .908.118 1.139.103.203.268.368.472.472.23.117.533.117 1.138.117H18.1c.605 0 .907 0 1.138-.117a1.08 1.08 0 0 0 .472-.472c.118-.231.118-.534.118-1.139v-1.144c0-.605 0-.907-.118-1.138a1.08 1.08 0 0 0-.472-.472c-.231-.118-.534-.118-1.138-.118h-1.224c-.605 0-.907 0-1.138.118a1.08 1.08 0 0 0-.472.472c-.118.23-.118.533-.118 1.138Z" class="_closed" clip-rule="evenodd"></path></svg>');function Af(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=b2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true",role:"img",...i})),_(t,o)}var $2={hash:"svelte-17ceof5",code:'svg[data-testid="graph-open-icon"] ._closed {visibility:hidden;opacity:0;}'};function Mf(t,e){z(t,$2);let i=m(e,"isOpened",3,!1),o=v(()=>i()?"graph-close-icon":"graph-open-icon");Af(t,{get"data-testid"(){return r(o)}})}function hd(t,e){H(e,!0);let i=m(e,"ref",15,void 0),o=m(e,"hidden",3,!1),n=m(e,"disabled",3,!1),a=m(e,"graphIsOpened",3,!1),d=be().ui.t,l=v(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),c=v(()=>o()?"hidden":"");At(t,{get className(){return r(c)},testId:"btn-graph",get disabled(){return n()},get ariaLabel(){return r(l)},get click(){return e.click},get ref(){return i()},set ref(u){i(u)},children:(u,b)=>{let p=v(()=>!!a());Mf(u,{get isOpened(){return r(p)}})},$$slots:{default:!0}}),F()}var Lf=require("@vkontakte/videoplayer-core");function _d(t,e){H(e,!0);let[i,o]=Le(),n=()=>y(c,"$playbackState$",i),a=m(e,"isMobile",3,!1),s=m(e,"isLiveActive",3,!1),d=m(e,"ariaLabel",3,""),l=be(),c=l.state.playbackState$,u=l.actions.internal.switchToActiveLive,b=l.actions.internal.togglePlay,p=v(()=>()=>{if(!s()){u();return}n()===Lf.PlaybackState.PAUSED&&b()}),$=v(()=>a()?"":"btn--live btn-full-opacity"),w=v(()=>s()?"btn-live":"btn-live-offset"),x=v(()=>s()&&n()===Lf.PlaybackState.PLAYING);At(t,{get className(){return r($)},get testId(){return r(w)},get disabled(){return r(x)},get ariaLabel(){return d()},get click(){return r(p)},children:(k,C)=>{Wl(k,{get isActive(){return s()}})},$$slots:{default:!0}}),F(),o()}var Vf=require("@vkontakte/videoplayer-shared");var y2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),x2=M('<img class="icon" aria-hidden="true">');function ns(t,e){"use strict";let i=Z(!1),o=()=>{D(i,!0)};var n=Be(),a=se(n);{var s=l=>{var c=y2();_(l,c)},d=l=>{var c=x2();S(()=>De(c,"src",e.icon)),_t("error",c,o),La(c),_(l,c)};V(a,l=>{r(i)?l(s):l(d,!1)})}_(t,n)}function Rf(t,e){H(e,!0);let i=m(e,"disabled",3,!1),o=m(e,"onClick",3,Vf.noop),n=m(e,"ref",15),a=v(()=>o()===Vf.noop),s=v(()=>r(a)||i()),d=v(()=>r(a)?"btn-full-opacity":"");fo(t,{get disabled(){return r(s)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get ref(){return n()},set ref(l){n(l)},children:(l,c)=>{let u=v(()=>e.testId??e.id);At(l,{get className(){return r(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return r(s)},get testId(){return r(u)},children:(b,p)=>{ns(b,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var Kh=t=>!!t.buttonComponent;var Zr={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var C2=M('<div><!> <div class="controls svelte-1iedtj3"><div class="controls-left svelte-1iedtj3"><!> <!> <!></div> <div class="controls-right svelte-1iedtj3"></div></div></div> <!>',1),k2={hash:"svelte-1iedtj3",code:".wrapper-bottom.svelte-1iedtj3 {pointer-events:none;position:absolute;z-index:var(--controls-container-z-index);width:100%;bottom:0;left:0;height:var(--controls-gradient-height);background:var(--controls-gradient);transition:transform var(--controls-transition-duration) var(--controls-transition-fn);display:flex;flex-direction:column;justify-content:flex-end;box-sizing:border-box;}.wrapper-bottom.svelte-1iedtj3 > :where(.svelte-1iedtj3) {pointer-events:auto;}.controls.svelte-1iedtj3 {width:100%;display:flex;align-items:center;justify-content:space-between;height:var(--controls-height);white-space:nowrap;font-size:13px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);will-change:transform;padding:0 8px 4px;box-sizing:border-box;}.controls-left.svelte-1iedtj3, .controls-right.svelte-1iedtj3 {display:flex;align-content:center;}.controls-left.svelte-1iedtj3 {flex-grow:1;min-width:0;overflow:hidden;}.controls-left.svelte-1iedtj3 > *:not(:first-child), .controls-right.svelte-1iedtj3 > * {margin-left:var(--controls-desktop-item-margin-left);}.controls-hidden.svelte-1iedtj3 {visibility:visible; /* if hidden then slider will lose focus (if was focused) */transform:translateY(100%);}.wrapper-bottom.no-smooth.svelte-1iedtj3 {transition:none;}"};function Nf(t,e){H(e,!0),z(t,k2);let[i,o]=Le(),n=()=>y(Gt,"$disabledControls$",i),a=()=>y(Ft,"$adPlaybackState",i),s=()=>y(St,"$playbackState$",i),d=()=>y(Wt,"$currentSubtitle$",i),l=()=>y(Bi,"$isEnded$",i),c=()=>y(fn,"$currentGridType$",i),u=()=>y(un,"$isLive$",i),b=()=>y(Qo,"$chromecastState$",i),p=()=>y(wo,"$isPictureInPictureActive",i),$=()=>y(Gi,"$pictureInPictureType$",i),w=()=>y(G,"$availableSubtitlesList$",i),x=()=>y(ei,"$contextMenuOpenedByKeyboard$",i),k=()=>y(ii,"$showContextMenuBtn$",i),C=()=>y(ko,"$playerSize",i),E=()=>y(Wo,"$isRewindableLive$",i),A=()=>y(pn,"$isActiveLive$",i),L=()=>y(ro,"$graphIsOpened$",i),I=()=>y(ji,"$contextMenuVisible$",i),N=()=>y(_i,"$isFullscreen",i),W=()=>y(oo,"$autoplayNextEnabled",i),Q=()=>y(r(ho),"$prevButton",i),j=()=>y(r(Ze),"$replayButton",i),re=()=>y(r(Mt),"$playButton",i),ce=()=>y(r(mi),"$nextButton",i),X=()=>y(r(lo),"$playPrevChapterButton",i),ge=()=>y(r(nt),"$seekToInteractiveButton",i),ee=()=>y(r(Et),"$interactiveGraphButton",i),Me=()=>y(r(yi),"$liveButton",i),Pe=()=>y(r(ki),"$time",i),Ve=()=>y(r(Ti),"$episodes",i),fe=()=>y(r(Ii),"$vkLogo",i),Oe=()=>y(r(Ni),"$volume",i),ie=()=>y(r(Lo),"$subtitles",i),R=()=>y(r(en),"$settings",i),Re=()=>y(r(Zi),"$context",i),de=()=>y(r(Hn),"$fullscreen",i),Ke=()=>y(r(ir),"$chromecast",i),oe=()=>y(Vi,"$additionalDesktopControlPanelRightButtons$",i),U=()=>y(To,"$isInteractiveTime$",i),Y=()=>y(So,"$settingsMenuVisible",i),Ae=()=>y(wn,"$settingButtonRef$",i),We=()=>y(Si,"$startedByKeyboard$",i),Fe=()=>y(oi,"$isAudioAvailable$",i),ye=()=>y(ft,"$fakeIsPlaying$",i),Ne=()=>y(Go,"$seekToInteractiveDisabledTooltip$",i),je=()=>y(Ct,"$adPosition",i),et=()=>y(gt,"$position$",i),ct=()=>y(Mn,"$adDuration",i),mt=()=>y(lt,"$duration$",i),Je=m(e,"playerControlsWrapperRef",15,void 0),ut=m(e,"playerControlsRef",15,void 0),$t=m(e,"isAds",3,!1),Ot=m(e,"logoTargetUrl",3,""),we=m(e,"isOneVideoPlaylist",3,!1),Dt=m(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:ft}=Qi(),K=be(),he=Qi(),ae=Rt(),qe=K.actions.internal.toggleMuted,Xe=K.actions.internal.togglePlay,Ue=K.actions.internal.pause,Se=K.actions.internal.toggleSubtitle,Ye=K.callbacks?.onAudioDoesNotExistHint,Ee=K.callbacks?.onAudioDisabledHint,lt=K.state.duration$,gt=K.state.positionWithScrubbing$,St=K.state.playbackState$,oi=K.state.isAudioAvailable$,ti=K.state.isAudioDisabled,Bi=K.state.isEnded$,un=K.state.isLive$,pn=K.state.isActiveLive$,Wo=K.state.isRewindableLive$,{isActive$:wo,type$:Gi}=he.pictureInPicture$,So=K.ui.settingsMenu.visible$,Ko=K.ui.settingsMenu.openedByBtnKeyboard$,zt=K.ui.controls,Co=K.actions.internal.getVideoEpisodes(),Qo=K.state.chromecastState$,G=K.state.availableSubtitlesList$,Wt=K.state.currentSubtitle$,Gt=zt.disabledControls$,ji=K.ui.contextMenu.visible$,ii=K.ui.contextMenu.showContextMenuBtn$,ei=K.ui.contextMenu.openedByBtnKeyboard$,Si=K.ui.startedByKeyboard$,It=K.ui.t,Mn=K.ads.duration,Ct=K.ads.position,Ft=K.ads.playbackState,_i=K.ui.isFullscreen,ko=K.ui.playerSize,fn=K.ui.currentGridType$,Vi=K.ui.additionalDesktopControlPanelRightButtons$,oo=K.ui.autoplayNextEnabled$,jt=K.actions.internal.getVideoElement,ht=K.actions.internal.replayInteractive,no=K.actions.internal.prevVideoClick,fi=K.actions.internal.nextVideoClick,ci=K.state.isInteractive,To=K.state.isInteractiveTime$,Oi=K.state.showInteractiveGraph,Ci=K.state.showSeekToInteractive,mn=K.state.showPlayPrevChapter,vn=K.state.showInteractiveTimeIndicator,bi=K.state.playPrevChapterDisabledTooltip,Go=he.seekToInteractiveDisabledTooltip$,ro=he.graphIsOpened$,ao=ae.features.interactiveResponsiveUi,_r=v(()=>n().has("EPISODE_BUTTON")),Zn=v(()=>n().has("GRAPH_BUTTON")),gn=v(()=>n().has("SEEK_TO_INTERACTIVE_BUTTON")),Ln=v(()=>n().has("PLAY_BUTTON")),Vn=v(()=>n().has("REPLAY_BUTTON")),Yi=v(()=>n().has("PLAY_PREV_CHAPTER_BUTTON")),Io=()=>K.actions.internal.toggleChromecast(),hn=v(()=>$t()?a()==="playing":s()===rs.PlaybackState.PLAYING),it=v(()=>d().value!=="off"),Eo=v(()=>l()&&!$t()||ci),jo=v(()=>ao?r(Eo)&&Ai(c(),"m"):r(Eo)),_n=v(()=>!l()||ci||$t()),Xn=v(()=>Ai(c(),"m")),Po=v(()=>e.showNextPrevButtons&&Ai(c(),"m")&&!$t()&&e.nextButtonActive),Rn=v(()=>e.showNextPrevButtons&&Ai(c(),"m")&&!$t()&&e.prevButtonActive),Yo=v(()=>!$t()&&!!u()),bn=v(()=>b()!==rs.ChromecastState.NOT_AVAILABLE&&!(p()&&$()===1)&&Ai(c(),"m")&&!ci),$i=v(()=>e.showAutoplayNext&&!we()&&Ai(c(),"s")),Ri=v(()=>w().length>0&&Ai(c(),"m")),$n=v(()=>x()||k()),vo=v(()=>Ai(c(),"s")&&!$t()),yn=v(()=>!e.logoHidden&&!$t()),Ao=v(()=>ae.features.fullscreen&&(e.logoHidden||Ai(c(),ao?"xs":"s"))&&!(p()&&$()===1)&&(ci?Dt():!0)),go=v(()=>(!u()||$t())&&!(ae.features.interactiveHideTime&&ci)),ni=v(()=>C().width>100),Nn=v(()=>Oi&&Ai(c(),"m")),so=v(()=>ao?Ci&&Ai(c(),"s"):Ci),Jn=v(()=>ao?mn&&Ai(c(),"s"):mn),Zo=v(()=>!$t()&&!u()&&!!Co?.length&&r(Xn)&&!r(_r)),Xo=v(()=>!E()||!!A()),er=v(()=>L()?It("tooltip_interactive_graph_on"):It("tooltip_interactive_graph_off")),Mo=v(()=>I()?It("aria_label_context_menu_close"):It("aria_label_context_menu_open")),br=(kt,yt)=>kt?yt&&yt===rs.PlaybackState.PAUSED?It("tooltip_play"):"":It("tooltip_live"),xn=v(()=>br(r(Xo),s())),Dn=v(()=>ae.logoType==="vk_video"?It("tooltip_vk_video_logo"):It("tooltip_vk_logo")),tr=v(()=>r(it)?It("tooltip_subtitles_on"):It("tooltip_subtitles_off")),$r=v(()=>N()?It("tooltip_fullscreen_on"):It("tooltip_fullscreen_off")),Bn=v(()=>b()===rs.ChromecastState.CONNECTED?It("tooltip_chromecast_on"):It("tooltip_chromecast_off")),Jo=v(()=>W()?It("tooltip_autoplay_on"):It("tooltip_autoplay_off")),On=Z(0),Yt=le({}),ho=v(()=>zt.prevButton),Ze=v(()=>zt.replayButton),Mt=v(()=>zt.playButton),mi=v(()=>zt.nextButton),lo=v(()=>zt.playPrevChapterButton),nt=v(()=>zt.seekToInteractiveButton),Et=v(()=>zt.interactiveGraphButton),yi=v(()=>zt.liveButton),ki=v(()=>zt.time),Ti=v(()=>zt.episodes),Ii=v(()=>zt.vkLogo),Ni=v(()=>zt.volume),Lo=v(()=>zt.subtitles),en=v(()=>zt.settings),Zi=v(()=>zt.context),Hn=v(()=>zt.fullscreen),ir=v(()=>zt.chromecast),Hi=v(()=>({prevButton:Q()?Q().right-Q().left:0,replayButton:j()?j().right-j().left:0,playButton:re()?re().right-re().left:0,nextButton:ce()?ce().right-ce().left:0,playPrevChapterButton:X()?X().right-X().left:0,seekToInteractiveButton:ge()?ge().right-ge().left:0,interactiveGraphButton:ee()?ee().right-ee().left:0,liveButton:Me()?Me().right-Me().left:0,time:Pe()?Pe().right-Pe().left:0,episodes:Ve()?Ve().right-Ve().left:0,vkLogo:fe()?fe().right-fe().left:0,volume:Oe()?Oe().right-Oe().left:0,subtitles:ie()?ie().right-ie().left:0,settings:R()?R().right-R().left:0,context:Re()?Re().right-Re().left:0,fullscreen:de()?de().right-de().left:0,chromecast:Ke()?Ke().right-Ke().left:0,additionalButtons:oe().length?oe().reduce(kt=>[...kt,40],[]):[]})),tn=Z(0);He(()=>{(!r(tn)||r(tn)<r(Hi).time)&&vt(()=>D(tn,le(r(Hi).time)))});let Fn=Z(!1);He(()=>{let kt=0;r(Zo)&&(Ai(c(),"xl")?kt=r(Hi).time:kt=60);let yt=r(Hi).prevButton+r(Hi).playButton+r(Hi).nextButton+r(Hi).seekToInteractiveButton+r(Hi).interactiveGraphButton+r(Hi).liveButton+r(tn)+kt;D(Fn,le(r(go)&&r(On)>=yt))});let or=v(()=>r(Fn)&&Ai(c(),"m")),yr=(0,Qh.debounceFn)(Js,260);He(()=>{C(),U(),yr(jt(),zt,Yt,e.showControls)});let wn=ne();He(()=>{Y(),Ae()&&vt(()=>qs(Ae(),Y(),Ko))});let on;He(()=>{We(),vt(()=>Gc(Si,We(),on))});function nr(){ca({isAudioDisabled:ti,audioDisabledHintCallback:Ee,isAudioAvailable:Fe(),audioIsNotExistHintCallback:Ye})&&qe()}let _o=ci?ht:Xe,xr=v(()=>ye()!==null),bo=v(()=>r(xr)?ye():r(hn)),rr=v(()=>r(bo)?It("tooltip_pause"):It("tooltip_play")),wr=It("tooltip_episodes"),Nr=v(()=>r(Rn)?{id:"prevButton",type:"desktop-control-panel-left",weight:jr.prevButton,buttonComponent:os,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:no.bind(null,!0)},tooltipEnabled:!K.callbacks?.uiInfo?.onPrevButtonMouseEnter&&!K.callbacks?.uiInfo?.onPrevButtonMouseLeave,mouseEnter:()=>{K.callbacks?.uiInfo?.onPrevButtonMouseEnter?.(is(jt(),Yt,"prevButton",e.showControls))},mouseLeave:()=>{K.callbacks?.uiInfo?.onPrevButtonMouseLeave?.(is(jt(),Yt,"prevButton",e.showControls))},tooltipText:It("tooltip_previous"),disabled:!e.prevButtonActive}:void 0),ar=v(()=>r(jo)?{id:"replayButton",type:"desktop-control-panel-left",weight:jr.replayButton,buttonComponent:el,buttonComponentProps:{disabled:r(Vn),click:_o},tooltipText:It("tooltip_restart"),disabled:r(Vn)}:void 0),Di=v(()=>r(_n)?{id:"playButton",type:"desktop-control-panel-left",weight:jr.playButton,buttonComponent:tl,buttonComponentProps:{disabled:r(Ln),isPlaying:r(hn),click:Xe},tooltipText:r(rr),disabled:r(Ln)}:void 0),nn=v(()=>r(Po)?{id:"nextButton",type:"desktop-control-panel-left",weight:jr.nextButton,buttonComponent:os,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:fi.bind(null,!0)},tooltipEnabled:!K.callbacks?.uiInfo?.onNextButtonMouseEnter&&!K.callbacks?.uiInfo?.onNextButtonMouseLeave,mouseEnter:()=>{K.callbacks?.uiInfo?.onNextButtonMouseEnter?.(is(jt(),Yt,"nextButton",e.showControls))},mouseLeave:()=>{K.callbacks?.uiInfo?.onNextButtonMouseLeave?.(is(jt(),Yt,"nextButton",e.showControls))},tooltipText:It("tooltip_next"),disabled:!e.nextButtonActive}:void 0),rt=v(()=>ci&&r(Jn)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:jr.playPrevChapterButton,buttonComponent:md,buttonComponentProps:{disabled:r(Yi),click:e.playPrevChapter},tooltipText:It("tooltip_interactive_go_back"),disabledTooltipContent:It(bi),disabled:r(Yi)}:void 0),Nt=v(()=>ci&&r(so)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:jr.seekToInteractiveButton,buttonComponent:gd,buttonComponentProps:{disabled:r(gn),click:e.seekToInteractive},tooltipText:It("tooltip_interactive_seek"),disabled:r(gn),disabledTooltipContent:It(Ne())}:void 0),vi=v(()=>ci&&r(Nn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:jr.interactiveGraphButton,buttonComponent:hd,buttonComponentProps:{disabled:r(Zn),click:ro.toggle,graphIsOpened:L()},tooltipText:r(er)}:void 0),co=v(()=>r(Yo)?{id:"liveButton",type:"desktop-control-panel-left",weight:jr.liveButton,buttonComponent:_d,buttonComponentProps:{isLiveActive:r(Xo),ariaLabel:r(xn)},tooltipText:r(xn),disabled:r(Xo)&&s()===rs.PlaybackState.PLAYING}:void 0),Vo=v(()=>[r(Nr),r(ar),r(Di),r(nn),r(rt),r(Nt),r(vi),r(co)].filter(kt=>!!kt).sort(Qa)),Ce=v(()=>r(yn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Zr.vkLogo,buttonComponent:ad,buttonComponentProps:{targetUrl:Ot(),logoClickable:e.logoClickable,click:Ue},tooltipText:r(Dn),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Bt=v(()=>r($i)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Zr.autoplayNext,buttonComponent:vd,tooltipText:r(Jo)}:void 0),xi=v(()=>({id:"volume",type:"desktop-control-panel-right",weight:Zr.volume,buttonComponent:df,buttonComponentProps:{click:nr}})),Zt=v(()=>r(Ri)?{id:"subtitles",type:"desktop-control-panel-right",weight:Zr.subtitles,buttonComponent:rf,buttonComponentProps:{isSubtitlesEnabled:r(it),click:Se},tooltipText:r(tr)}:void 0),Ie=v(()=>r(vo)?{id:"settings",type:"desktop-control-panel-right",weight:Zr.settings,buttonComponent:Ys,buttonComponentProps:{ref$:wn},tooltipText:Y()?void 0:It("tooltip_settings_off")}:void 0),Pt=v(()=>ae.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Zr.context,buttonComponent:Tf,buttonComponentProps:{click:e.toggleFullscreen,ariaLabel:r(Mo)},className:r($n)?"":"out-of-view",tooltipText:r(Mo)}:void 0),qt=v(()=>r(Ao)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Zr.fullscreen,buttonComponent:rd,buttonComponentProps:{isFullscreen:N(),click:e.toggleFullscreen},tooltipText:r($r)}:void 0),di=v(()=>r(bn)?{id:"chromecast",type:"desktop-control-panel-right",weight:Zr.chromecast,buttonComponent:sd,buttonComponentProps:{state:b(),click:Io},tooltipText:r(Bn)}:void 0),Kt=v(()=>[r(Ce),r(Bt),r(xi),r(Zt),r(Ie),r(Pt),r(qt),r(di),...oe()].filter(kt=>!!kt).sort(Qa));var Un=C2(),Fi=se(Un);let uo;var ms=h(Fi);let vs=v(()=>!r(ni));es(ms,{get isHidden(){return r(vs)},get isAds(){return $t()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return E()},get ref(){return Yt.timeline},set ref(kt){Yt.timeline=kt}});var Sn=P(ms,2),Dr=h(Sn),gs=h(Dr);ui(gs,17,()=>r(Vo),kt=>kt.id,(kt,yt)=>{jc(kt,{get buttonComponent(){return r(yt).buttonComponent},get buttonComponentProps(){return r(yt).buttonComponentProps},get tooltipText(){return r(yt).tooltipText},get disabledTooltipContent(){return r(yt).disabledTooltipContent},get disabled(){return r(yt).disabled},get className(){return r(yt).className},get tooltipEnabled(){return r(yt).tooltipEnabled},get mouseEnter(){return r(yt).mouseEnter},get mouseLeave(){return r(yt).mouseLeave},get ref(){return Yt[r(yt).id]},set ref(Cn){Yt[r(yt).id]=Cn}})});var ha=P(gs,2);{var dl=kt=>{let yt=v(()=>$t()?je():et()),Cn=v(()=>$t()?ct():mt());id(kt,{isMobile:!1,get showDuration(){return r(or)},get position(){return r(yt)},get duration(){return r(Cn)},get ref(){return Yt.time},set ref(Sr){Yt.time=Sr}})};V(ha,kt=>{r(go)&&kt(dl)})}var hs=P(ha,2);let cl=v(()=>!r(Zo));fo(hs,{className:"w-max",get disabled(){return r(cl)},tooltipContent:wr,get ref(){return Yt.episodes},set ref(kt){Yt.episodes=kt},children:(kt,yt)=>{var Cn=Be(),Sr=se(Cn);{var ba=Cr=>{dd(Cr,{get position(){return et()},get duration(){return mt()},timeCodes:Co})};V(Sr,Cr=>{r(Zo)&&Cr(ba)})}_(kt,Cn)},$$slots:{default:!0}}),g(Dr);var _a=P(Dr,2);ui(_a,21,()=>r(Kt),kt=>kt.id,(kt,yt)=>{var Cn=Be(),Sr=se(Cn);{var ba=kr=>{jc(kr,{get buttonComponent(){return r(yt).buttonComponent},get buttonComponentProps(){return r(yt).buttonComponentProps},get tooltipText(){return r(yt).tooltipText},get disabledTooltipContent(){return r(yt).disabledTooltipContent},get disabled(){return r(yt).disabled},get className(){return r(yt).className},get ref(){return Yt[r(yt).id]},set ref(Jr){Yt[r(yt).id]=Jr}})},Cr=kr=>{let Jr=v(()=>!!r(yt).disabled);Rf(kr,{get id(){return r(yt).id},get testId(){return r(yt).testId},get icon(){return r(yt).icon},get ariaLabel(){return r(yt).ariaLabel},get tooltipText(){return r(yt).tooltipText},get disabledTooltipContent(){return r(yt).disabledTooltipContent},get disabled(){return r(Jr)},get onClick(){return r(yt).onClick},get ref(){return Yt[r(yt).id]},set ref(pl){Yt[r(yt).id]=pl}})};V(Sr,kr=>{Kh(r(yt))?kr(ba):kr(Cr,!1)})}_(kt,Cn)}),g(_a),g(Sn),st(Sn,kt=>ut(kt),()=>ut()),g(Fi),st(Fi,kt=>Je(kt),()=>Je());var ul=P(Fi,2);{var zn=kt=>{pd(kt,{get ref(){return Yt.interactiveTimeIndicator},set ref(yt){Yt.interactiveTimeIndicator=yt}})};V(ul,kt=>{vn&&kt(zn)})}S(kt=>uo=J(Fi,1,"wrapper-bottom svelte-1iedtj3",null,uo,kt),[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth})]),Ar(Dr,"clientWidth",kt=>D(On,kt)),_(t,Un),F(),o()}var il=require("@vkontakte/videoplayer-core");var Df=require("@vkontakte/videoplayer-shared");var T2=M('<div class="icon icon-error-stub svelte-167ouw6"><div class="inner svelte-167ouw6"></div></div>'),I2=M('<img class="icon svelte-167ouw6" aria-hidden="true">'),E2={hash:"svelte-167ouw6",code:".icon.svelte-167ouw6 {width:24px !important;height:24px !important;}.inner.svelte-167ouw6 {width:16px;height:16px;background-color:var(--white);}"};function Bf(t,e){z(t,E2);let i=m(e,"disabled",3,!1),o=m(e,"onClick",3,Df.noop),n=v(()=>o()===Df.noop),a=v(()=>r(n)||i()),s=Z(!1),d=()=>{D(s,!0)},l=v(()=>r(n)?"btn-full-opacity":"");At(t,{get className(){return r(l)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return r(a)},get testId(){return e.testId},children:(c,u)=>{var b=Be(),p=se(b);{var $=x=>{var k=T2();_(x,k)},w=x=>{var k=I2();S(()=>De(k,"src",e.iconUrl)),_t("error",k,d),La(k),_(x,k)};V(p,x=>{r(s)?x($):x(w,!1)})}_(c,b)},$$slots:{default:!0}})}var P2=ve('<svg><!><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z"></path><path fill="var(--btn-color, #fff)" d="M8.695 8.105 5.301 4.71a1 1 0 0 1 1.414-1.415L20.7 17.285a1 1 0 0 1-1.414 1.415L16 15.41V20a1 1 0 0 1-1 1c-.641 0-1.258-.25-1.72-.695L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.765zm2.88-2.77 1.704-1.642A2.48 2.48 0 0 1 15 3a1 1 0 0 1 1 1v5.76l-4.426-4.426Z"></path></g></svg>');function Of(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=P2();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true","data-testid":"muted-icon",role:"img",...i})),_(t,o)}var Gh=require("@vkontakte/videoplayer-shared");var A2=M('<span class="text svelte-6gmlbk"> </span>'),M2=M('<div aria-hidden="true"><!> <!></div>'),L2={hash:"svelte-6gmlbk",code:".container.svelte-6gmlbk {display:flex;align-items:center;}.expanded.svelte-6gmlbk {background-color:rgba(0, 0, 0, 0.56);border-radius:6px;}.text.svelte-6gmlbk {font-size:15px;margin-left:8px;}"};function Yc(t,e){H(e,!0),z(t,L2);let i=m(e,"muted",3,!1),o=m(e,"expanded",3,!1),n=m(e,"click",3,Gh.noop),a=m(e,"ref",15,void 0),d=be().ui.t,l=v(()=>i()?d("tooltip_volume"):d("tooltip_volume_muted")),c=v(()=>o()?pa:Of),u=v(()=>o()?"btn-mobile-unmuted":"btn-mobile-muted");At(t,{get testId(){return r(u)},get click(){return n()},get ariaLabel(){return r(l)},get ref(){return a()},set ref(b){a(b)},children:(b,p)=>{var $=M2();let w=v(()=>r(c)),x;var k=h($);pi(k,()=>r(w),(A,L)=>{L(A,{})});var C=P(k,2);{var E=A=>{var L=A2(),I=h(L,!0);g(L),S(N=>ue(I,N),[()=>d("mobile_unmute")]),_(A,L)};V(C,A=>{o()&&A(E)})}g($),S(A=>x=J($,1,"container svelte-6gmlbk",null,x,A),[()=>({expanded:o()})]),_(b,$)},$$slots:{default:!0}}),F()}var V2=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M7.662 4h6.676c.808 0 1.469 0 2.006.044.556.045 1.058.142 1.526.381a3.9 3.9 0 0 1 1.705 1.704c.239.47.336.971.381 1.527C20 8.193 20 8.854 20 9.662V11.1a.9.9 0 0 1-1.8 0V9.7c0-.855 0-1.442-.038-1.897-.036-.445-.103-.684-.19-.856a2.1 2.1 0 0 0-.919-.918c-.172-.088-.411-.155-.856-.191C15.742 5.8 15.155 5.8 14.3 5.8H7.7c-.855 0-1.442 0-1.897.038-.445.036-.684.103-.856.19a2.1 2.1 0 0 0-.918.919c-.088.172-.155.411-.191.856C3.8 8.258 3.8 8.845 3.8 9.7v2.646c0 .855 0 1.442.038 1.897.036.445.103.683.19.856a2.1 2.1 0 0 0 .919.918c.172.088.411.155.856.191.455.037 1.042.038 1.897.038h2.4a.9.9 0 0 1 0 1.8H7.662c-.808 0-1.469 0-2.006-.044-.556-.045-1.058-.142-1.527-.381a3.9 3.9 0 0 1-1.704-1.704c-.239-.47-.336-.972-.381-1.527C2 13.852 2 13.192 2 12.384V9.662c0-.808 0-1.469.044-2.006.045-.556.142-1.058.381-1.527A3.9 3.9 0 0 1 4.13 4.425c.47-.239.971-.336 1.527-.381C6.193 4 6.854 4 7.662 4M13 16.8c0-.98 0-1.47.19-1.845a1.75 1.75 0 0 1 .766-.764C14.33 14 14.82 14 15.8 14h3.4c.98 0 1.47 0 1.845.19.329.168.596.436.764.766.191.374.191.864.191 1.844v.4c0 .98 0 1.47-.19 1.845a1.75 1.75 0 0 1-.765.764C20.67 20 20.18 20 19.2 20h-3.4c-.98 0-1.47 0-1.845-.19a1.75 1.75 0 0 1-.764-.765C13 18.67 13 18.18 13 17.2z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="m11.643 12.37-.007-.006L9.073 9.8H10.1a.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.022l2.53 2.524.134.134a.9.9 0 0 0 1.272-1.272z" class="hidden-not-active"></path><path fill="var(--btn-color, #fff)" d="m6.357 9.63.007.006L8.927 12.2H7.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.022L7.67 8.397l-.134-.133a.9.9 0 0 0-1.272 1.272z" class="hidden-active"></path></svg>');function Hf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=V2();let n;var a=h(o);pe(a,()=>e.children??te),me(3),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",role:"img",...i})),_(t,o)}var R2={hash:"svelte-tmam00",code:`svg[data-testid="pip-icon--active"] .hidden-active,
255
+ animation: 1s svelte-od3veb-pulse infinite;transition:0.3s;pointer-events:none;}.pulse.paused.svelte-od3veb {animation-play-state:paused;}.interactive-episode-icon-animated svg {width:100%;height:100%;}.ref-block.svelte-od3veb {position:absolute;top:0;width:100%;height:100%;visibility:hidden;}.hidden.svelte-od3veb {display:none;}`};function pd(t,e){H(e,!0),z(t,e2);let[i,o]=Le(),n=()=>y(k,"$isMobile",i),a=()=>y(L,"$areControlsVisible",i),s=()=>y(N,"$currentGridType$",i),d=()=>y(E,"$isInteractiveTime$",i),l=()=>y(x,"$interactiveControlsOpacity$",i),c=()=>y(A,"$showInteractiveTimeIndicatorTooltip$",i),u=()=>y(C,"$isFullscreen",i),b=m(e,"ref",15,void 0),p=Z(void 0),$=be(),w=Qi(),{interactiveControlsOpacity$:x}=w,k=$.ui.isMobile,C=$.ui.isFullscreen,E=$.state.isInteractiveTime$,A=w.showInteractiveTimeIndicatorTooltip$,L=$.ui.controlsVisible,I=$.callbacks?.onInteractiveTimeIndicatorClick,N=$.ui.currentGridType$,W=v(()=>!n()&&a()),Q=v(()=>fa(s(),"s")),j=v(()=>!d()||!!l()||r(W)),re=Z(!1);He(()=>{D(re,le(r(j)))});let ce=()=>{D(re,!0)},X=()=>{ge(),r(p)?.addEventListener("animationiteration",ce,{once:!0})},ge=()=>{D(re,!1),r(p)?.removeEventListener("animationiteration",ce)},ee=U=>{A.set(U)},Me=v(()=>c()&&!r(j));He(()=>{c()?X():ge()});let Pe=()=>{r(j)||(A.set(!0),I?.())};dn(()=>{A.clearTimeout(),ge()});let Re=()=>{A.set(!1)},fe=O("tooltip_interactive_interaction_time_indicator");var Oe=J$();let ie;Oe.__mousemove=[X$],Oe.__click=Pe;var R=h(Oe);fo(R,{tooltipContent:fe,get tooltipActive(){return r(Me)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:ee,get ref(){return b()},set ref(U){b(U)},children:(U,Y)=>{od(U,{completed:!0})},$$slots:{default:!0}});var Ne=P(R,2);let de;st(Ne,U=>b(U),()=>b());var Ke=P(Ne,2);let oe;st(Ke,U=>D(p,U),()=>r(p)),g(Oe),S((U,Y,Ae)=>{ie=J(Oe,1,"interactive-episode-icon-animated svelte-od3veb",null,ie,U),de=J(Ne,1,"ref-block svelte-od3veb",null,de,Y),oe=J(Ke,1,"pulse svelte-od3veb",null,oe,Ae)},[()=>({mobile:n(),fullscreen:u(),invisible:r(j),"icon-small":r(Q)}),()=>({hidden:r(j)}),()=>({paused:r(re)})]),_t("mouseleave",Oe,Re),_(t,Oe),F(),o()}ot(["mousemove","click"]);function jc(t,e){H(e,!0);let i=m(e,"tooltipEnabled",3,!0),o=m(e,"disabled",3,!1),n=m(e,"className",3,void 0),a=m(e,"ref",15);fo(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 className(){return n()},get ref(){return a()},set ref(s){a(s)},children:(s,d)=>{var l=Be();let c=v(()=>e.buttonComponent);var u=se(l);pi(u,()=>r(c),(b,p)=>{p(b,Qr(()=>e.buttonComponentProps??{}))}),_(s,l)},$$slots:{default:!0}}),F()}var jr={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var i2=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M16 10.835V7.5a1 1 0 1 1 2 0v9a1 1 0 0 1-2 0v-3.335l-8.149 4.67C7.03 18.304 6 17.715 6 16.772V7.227c0-.943 1.029-1.533 1.851-1.061L16 10.834z"></path></svg>');function If(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=i2();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"24",fill:"none","aria-hidden":"true",role:"img",...i})),_(t,o)}function ma(t,e){let i=m(e,"isPrev",3,!1),o=m(e,"isMobile",3,!1),n=m(e,"width",3,"24"),a=m(e,"height",3,"24"),s=v(()=>i()&&o()?"transform: scaleX(-1) scale(1.3333);":i()?"transform: scaleX(-1);":o()?"transform: scale(1.3333);":void 0),d=v(()=>i()?"prev-icon":"next-icon");If(t,{get style(){return r(s)},get width(){return n()},get height(){return a()},get viewBox(){return e.viewBox},get"data-testid"(){return r(d)}})}var o2=M('<div class="icon-background-mobile svelte-xtk2k4"></div>'),n2=M("<!> <!>",1),r2={hash:"svelte-xtk2k4",code:".icon-background-mobile.svelte-xtk2k4 {position:absolute;top:0;left:0;width:100%;height:100%;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);}"};function os(t,e){H(e,!0),z(t,r2);let i=m(e,"ref",15,void 0),o=m(e,"isMobile",3,!1),n=m(e,"disabled",3,!1),s=be().ui.t,d=v(()=>e.type==="prev"?s("tooltip_previous"):s("tooltip_next")),l=v(()=>e.type==="prev"?s("hotkey_map_item_prev_video_value"):s("hotkey_map_item_next_video_value")),c=v(()=>`btn-${o()?"m":"d"}--${e.type}`);At(t,{get className(){return r(c)},get testId(){return`btn-${e.type??""}`},get disabled(){return n()},get ariaLabel(){return r(d)},get click(){return e.click},get ariaKeyShortCut(){return r(l)},get ref(){return i()},set ref(u){i(u)},children:(u,b)=>{var p=n2(),$=se(p);{var w=C=>{var E=o2();_(C,E)};V($,C=>{o()&&C(w)})}var x=P($,2);let k=v(()=>e.type==="prev");ma(x,{get isMobile(){return o()},get isPrev(){return r(k)}}),_(u,p)},$$slots:{default:!0}}),F()}var a2=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M12 10.096a.4.4 0 0 1-.67.296L7.044 6.493a.67.67 0 0 1 0-.986l4.288-3.899a.4.4 0 0 1 .669.296V5a8 8 0 1 1-8 8 1 1 0 1 1 2 0 6 6 0 1 0 6-6z"></path></svg>');function fd(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=a2();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"replay-icon",role:"img",...i})),_(t,o)}var qh=require("@vkontakte/videoplayer-shared");var s2=M('<div class="icon-background-mobile svelte-1ot3duq"></div>'),l2=M("<!> <div><!></div>",1),d2={hash:"svelte-1ot3duq",code:".mobile.svelte-1ot3duq {position:relative;display:flex;align-items:center;justify-content:center;}.mobile.svelte-1ot3duq svg {transform:scale(2);}.icon-background-mobile.svelte-1ot3duq {position:absolute;top:16px;left:16px;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);width:calc(100% - 32px);height:calc(100% - 32px);}"};function el(t,e){H(e,!0),z(t,d2);let i=m(e,"ref",15,void 0),o=m(e,"isMobile",3,!1),n=m(e,"disabled",3,!1),a=m(e,"className",3,""),s=m(e,"click",3,qh.noop),d=O("tooltip_restart"),l=v(()=>`${o()?"btn-m--play":""} ${a()}`);At(t,{get className(){return r(l)},testId:"btn-replay",ariaLabel:d,get disabled(){return n()},get click(){return s()},get ariaKeyShortCut(){return Mr.KeyK},get ref(){return i()},set ref(c){i(c)},children:(c,u)=>{var b=l2(),p=se(b);{var $=C=>{var E=s2();_(C,E)};V(p,C=>{o()&&C($)})}var w=P(p,2);let x;var k=h(w);fd(k,{}),g(w),S(C=>x=J(w,1,"svelte-1ot3duq",null,x,C),[()=>({mobile:o()})]),_(c,b)},$$slots:{default:!0}}),F()}var c2=ve('<svg fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-testid="play-icon"><path d="M17.671 10.923c.82.483.82 1.67 0 2.154l-8.787 5.175A1.25 1.25 0 0 1 7 17.174V6.826a1.25 1.25 0 0 1 1.884-1.078l8.787 5.175z"></path></svg>');function gr(t,e){"use strict";let i=m(e,"width",3,"24"),o=m(e,"height",3,"24"),n=m(e,"viewBox",3,"0 0 24 24"),a=m(e,"fill",3,"var(--btn-color)");var s=c2(),d=h(s);g(s),S(()=>{Ve(s,"width",i()),Ve(s,"height",o()),Ve(s,"viewBox",n()),Ve(d,"fill",a())}),_(t,s)}var u2=ve('<svg fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-testid="pause-icon"><path d="M8.712 5c.448 0 .61.047.774.134a.913.913 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134H6.788c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.913.913 0 0 1 .38-.38C6.178 5.047 6.34 5 6.788 5h1.924zm8 0c.448 0 .61.047.774.134a.914.914 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134h-1.924c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.914.914 0 0 1 .38-.38c.164-.087.326-.134.774-.134h1.924z"></path></svg>');function Yr(t,e){"use strict";let i=m(e,"width",3,"24"),o=m(e,"height",3,"24"),n=m(e,"viewBox",3,"0 0 24 24"),a=m(e,"fill",3,"var(--btn-color)");var s=u2(),d=h(s);g(s),S(()=>{Ve(s,"width",i()),Ve(s,"height",o()),Ve(s,"viewBox",n()),Ve(d,"fill",a())}),_(t,s)}var Wh=require("@vkontakte/videoplayer-shared");var p2=M('<div class="icon-background-mobile svelte-1ot3duq"></div>'),f2=M("<!> <div><!></div>",1),m2={hash:"svelte-1ot3duq",code:".mobile.svelte-1ot3duq {position:relative;display:flex;align-items:center;justify-content:center;}.mobile.svelte-1ot3duq svg {transform:scale(2);}.icon-background-mobile.svelte-1ot3duq {position:absolute;top:16px;left:16px;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);width:calc(100% - 32px);height:calc(100% - 32px);}"};function tl(t,e){H(e,!0),z(t,m2);let[i,o]=Le(),n=()=>y(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=Qi(),s=m(e,"ref",15,void 0),d=m(e,"isMobile",3,!1),l=m(e,"isPlaying",3,!1),c=m(e,"disabled",3,!1),u=m(e,"className",3,""),b=m(e,"click",3,Wh.noop),$=be().ui.t,{toggle:w}=a,x=v(()=>w),k=v(()=>n()!==null),C=v(()=>r(k)?n():l()),E=v(()=>r(C)?$("tooltip_pause"):$("tooltip_play")),A=v(()=>r(C)?Yr:gr),L=v(()=>`${d()?"btn-m--play":""} ${u()}`),I=v(()=>r(k)?r(x):b());At(t,{get className(){return r(L)},testId:"btn-play",get click(){return r(I)},get disabled(){return c()},get ariaLabel(){return r(E)},get ariaKeyShortCut(){return Mr.KeyK},get ref(){return s()},set ref(N){s(N)},children:(N,W)=>{var Q=f2();let j=v(()=>r(A));var re=se(Q);{var ce=Me=>{var Pe=p2();_(Me,Pe)};V(re,Me=>{d()&&Me(ce)})}var X=P(re,2);let ge;var ee=h(X);pi(ee,()=>r(j),(Me,Pe)=>{Pe(Me,{})}),g(X),S(Me=>ge=J(X,1,"svelte-1ot3duq",null,ge,Me),[()=>({mobile:d()})]),_(N,Q)},$$slots:{default:!0}}),F(),o()}var v2=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M12.583 12.917v2.496a1 1 0 0 1-1.522.853l-5.583-3.413a1 1 0 0 1 0-1.706l5.583-3.413a1 1 0 0 1 1.522.853v2.496l5.478-3.349a1 1 0 0 1 1.522.853v6.826a1 1 0 0 1-1.522.853z"></path></svg>');function Ef(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=v2();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","data-testid":"play-prev-chapter-icon",role:"img",...i})),_(t,o)}function md(t,e){H(e,!0);let i=m(e,"ref",15,void 0),o=m(e,"hidden",3,!1),n=m(e,"disabled",3,!1),a=O("tooltip_interactive_go_back"),s=v(()=>o()?"hidden":"");At(t,{get className(){return r(s)},testId:"btn-play-prev-chapter",ariaLabel:a,get disabled(){return n()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,l)=>{Ef(d,{})},$$slots:{default:!0}}),F()}var g2=M('<span class="gutter svelte-et3q1q"><span><!></span></span>'),h2={hash:"svelte-et3q1q",code:".gutter.svelte-et3q1q {--gutterWidth: 32px;--gutterHeight: 12px;--togglerWidth: 18px;--togglerHeight: 18px;--togglerGap: calc(var(--togglerWidth) / 6);position:relative;width:var(--gutterWidth);height:var(--gutterHeight);background-color:rgba(255, 255, 255, 0.3);border-radius:50px;}.toggler.svelte-et3q1q {position:absolute;top:calc(((var(--togglerHeight) - var(--gutterHeight)) / 2) * -1);left:0;display:flex;align-items:center;justify-content:center;width:var(--togglerWidth);height:var(--togglerHeight);background-color:rgba(98, 99, 100, 1);border-radius:50%;transform:translateX(calc(var(--togglerGap) * -1));transition-property:background-color, transform;transition-duration:0.2s;transition-timing-function:ease;}.toggler.enabled.svelte-et3q1q {background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)));}"};function vd(t,e){H(e,!0),z(t,h2);let[i,o]=Le(),n=()=>y(d,"$autoplayNextEnabled$",i),a=m(e,"ref",15,void 0),s=be(),d=s.ui.autoplayNextEnabled$,l=s.actions.internal.setAutoplayNextEnabled;At(t,{click:()=>{l(!n(),!0)},get ref(){return a()},set ref(u){a(u)},children:(u,b)=>{var p=g2(),$=h(p);let w;var x=h($);{var k=E=>{gr(E,{width:"14",height:"14",fill:"#000"})},C=E=>{Yr(E,{width:"14",height:"14",fill:"#000"})};V(x,E=>{n()?E(k):E(C,!1)})}g($),g(p),S(E=>w=J($,1,"toggler svelte-et3q1q",null,w,E),[()=>({enabled:n()})]),_(u,p)},$$slots:{default:!0}}),F(),o()}var _2=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M16.726 4.845C16.187 4.8 15.496 4.8 14.5 4.8H7.9a.9.9 0 1 1 0-1.8h6.639c.947 0 1.713 0 2.333.05.64.053 1.204.163 1.726.43a4.4 4.4 0 0 1 1.923 1.922c.266.523.377 1.087.429 1.726.05.62.05 1.386.05 2.334v5.076c0 .948 0 1.714-.05 2.334-.052.64-.163 1.203-.43 1.726a4.4 4.4 0 0 1-1.922 1.922c-.522.267-1.086.377-1.726.43-.62.05-1.386.05-2.333.05H7.9a.9.9 0 1 1 0-1.8h6.6c.995 0 1.687 0 2.226-.045.528-.043.828-.123 1.055-.238a2.6 2.6 0 0 0 1.136-1.137c.115-.226.195-.527.239-1.055.044-.538.044-1.23.044-2.225v-5c0-.995 0-1.687-.044-2.226-.043-.527-.124-.828-.239-1.054a2.6 2.6 0 0 0-1.136-1.137c-.227-.115-.527-.195-1.055-.238" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M7.76 11.169V8.908c0-.708.704-1.143 1.252-.774l4.594 3.093c.525.353.525 1.193 0 1.546l-4.594 3.093c-.548.369-1.252-.066-1.252-.774v-2.261l-4.508 3.035C2.704 16.235 2 15.8 2 15.091V8.908c0-.708.704-1.143 1.252-.774z"></path></svg>');function Pf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=_2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"seek-to-interactive-icon",role:"img",...i})),_(t,o)}function gd(t,e){H(e,!0);let i=m(e,"ref",15,void 0),o=m(e,"hidden",3,!1),n=m(e,"disabled",3,!1),a=O("tooltip_interactive_seek"),s=v(()=>o()?"hidden":"");At(t,{get className(){return r(s)},testId:"btn-seek-to-interactive",ariaLabel:a,get disabled(){return n()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,l)=>{Pf(d,{})},$$slots:{default:!0}}),F()}var b2=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M16.777 3h1.419c.31 0 .596 0 .834.02.258.02.539.068.817.21.397.2.72.523.923.918.141.277.19.557.21.814.02.237.02.521.02.83V7.19c0 .31 0 .594-.02.831-.02.256-.069.537-.21.813a2.1 2.1 0 0 1-.923.92c-.278.14-.56.188-.817.21-.238.019-.524.019-.834.019h-1.419c-.31 0-.596 0-.834-.02a2.15 2.15 0 0 1-.817-.21 2.1 2.1 0 0 1-.923-.919 2.1 2.1 0 0 1-.21-.813 8 8 0 0 1-.02-.63l-2.198-.002c-.495-.001-.81 0-1.05.018-.23.019-.309.05-.343.067a.8.8 0 0 0-.352.35c-.017.034-.049.113-.068.341-.02.24-.02.554-.02 1.046v5.57c0 .49 0 .804.02 1.043.019.228.05.306.068.34.077.15.2.273.35.35.035.017.113.049.342.067.24.02.555.021 1.048.022l2.203.003a8 8 0 0 1 .02-.627c.02-.256.069-.537.21-.813.203-.396.526-.718.923-.92.278-.14.56-.189.817-.21.238-.019.524-.019.834-.019h1.419c.31 0 .596 0 .834.02.258.02.539.068.817.21.397.201.72.523.923.919.141.276.19.557.21.813.02.237.02.522.02.831v1.397c0 .31 0 .594-.02.831-.02.256-.069.537-.21.814a2.1 2.1 0 0 1-.923.919c-.278.14-.56.189-.817.21-.238.019-.524.019-.834.019h-1.419c-.31 0-.596 0-.834-.02a2.15 2.15 0 0 1-.817-.21 2.1 2.1 0 0 1-.923-.918 2.1 2.1 0 0 1-.21-.814 8 8 0 0 1-.02-.63l-2.24-.002c-.449 0-.839-.001-1.16-.028-.341-.028-.684-.09-1.016-.259a2.6 2.6 0 0 1-1.14-1.137c-.17-.33-.231-.672-.259-1.011-.026-.321-.026-.71-.026-1.156v-1.921H2.905A.903.903 0 0 1 2 11.992c0-.498.405-.901.905-.901h5.227V9.177c0-.448 0-.837.026-1.159.028-.34.09-.682.26-1.013a2.6 2.6 0 0 1 1.144-1.138c.332-.168.676-.23 1.017-.257.323-.025.714-.025 1.164-.024l2.23.003a8 8 0 0 1 .02-.627c.02-.257.069-.537.21-.814.203-.395.526-.717.923-.919.278-.14.56-.189.817-.21C16.18 3 16.467 3 16.777 3m-.833 1.837a1 1 0 0 1 .146-.02 10 10 0 0 1 .72-.014h1.354c.353 0 .563 0 .719.013a1 1 0 0 1 .146.021.3.3 0 0 1 .126.126 1 1 0 0 1 .021.145c.013.156.014.365.014.716v1.334c0 .352 0 .561-.014.716a1 1 0 0 1-.02.146.3.3 0 0 1-.127.125 1 1 0 0 1-.146.022c-.156.012-.366.013-.719.013H16.81c-.353 0-.563 0-.719-.013a1 1 0 0 1-.146-.022.3.3 0 0 1-.126-.125 1 1 0 0 1-.021-.146 10 10 0 0 1-.014-.716V5.824c0-.351.001-.56.014-.716a1 1 0 0 1 .021-.145.3.3 0 0 1 .126-.126Zm0 11.018a1 1 0 0 1 .146-.022c.156-.012.366-.013.72-.013h1.354c.353 0 .563 0 .719.013a1 1 0 0 1 .146.022.3.3 0 0 1 .126.125 1 1 0 0 1 .021.146c.013.155.014.364.014.716v1.334c0 .351 0 .56-.014.716a1 1 0 0 1-.02.145.3.3 0 0 1-.127.126 1 1 0 0 1-.146.02c-.156.014-.366.014-.719.014H16.81c-.353 0-.563 0-.719-.013a1 1 0 0 1-.146-.021.3.3 0 0 1-.126-.126 1 1 0 0 1-.021-.145 10 10 0 0 1-.014-.716v-1.334c0-.352.001-.561.014-.716a1 1 0 0 1 .021-.146.3.3 0 0 1 .126-.125Z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M15.2 5.899v1.203c0 .594 0 .892.115 1.119.102.2.265.362.464.463.227.116.525.116 1.12.116H18.1c.595 0 .892 0 1.12-.116.199-.101.361-.264.463-.463.116-.227.116-.525.116-1.12V5.9c0-.595 0-.892-.116-1.12a1.06 1.06 0 0 0-.464-.463c-.227-.116-.524-.116-1.119-.116h-1.203c-.594 0-.892 0-1.119.116-.2.102-.362.264-.464.464-.115.227-.115.524-.115 1.119Zm-.051 11.03v1.143c0 .605 0 .908.118 1.139.103.203.268.368.472.472.23.117.533.117 1.138.117H18.1c.605 0 .907 0 1.138-.117a1.08 1.08 0 0 0 .472-.472c.118-.231.118-.534.118-1.139v-1.144c0-.605 0-.907-.118-1.138a1.08 1.08 0 0 0-.472-.472c-.231-.118-.534-.118-1.138-.118h-1.224c-.605 0-.907 0-1.138.118a1.08 1.08 0 0 0-.472.472c-.118.23-.118.533-.118 1.138Z" class="_closed" clip-rule="evenodd"></path></svg>');function Af(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=b2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true",role:"img",...i})),_(t,o)}var $2={hash:"svelte-17ceof5",code:'svg[data-testid="graph-open-icon"] ._closed {visibility:hidden;opacity:0;}'};function Mf(t,e){z(t,$2);let i=m(e,"isOpened",3,!1),o=v(()=>i()?"graph-close-icon":"graph-open-icon");Af(t,{get"data-testid"(){return r(o)}})}function hd(t,e){H(e,!0);let i=m(e,"ref",15,void 0),o=m(e,"hidden",3,!1),n=m(e,"disabled",3,!1),a=m(e,"graphIsOpened",3,!1),d=be().ui.t,l=v(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),c=v(()=>o()?"hidden":"");At(t,{get className(){return r(c)},testId:"btn-graph",get disabled(){return n()},get ariaLabel(){return r(l)},get click(){return e.click},get ref(){return i()},set ref(u){i(u)},children:(u,b)=>{let p=v(()=>!!a());Mf(u,{get isOpened(){return r(p)}})},$$slots:{default:!0}}),F()}var Lf=require("@vkontakte/videoplayer-core");function _d(t,e){H(e,!0);let[i,o]=Le(),n=()=>y(c,"$playbackState$",i),a=m(e,"isMobile",3,!1),s=m(e,"isLiveActive",3,!1),d=m(e,"ariaLabel",3,""),l=be(),c=l.state.playbackState$,u=l.actions.internal.switchToActiveLive,b=l.actions.internal.togglePlay,p=v(()=>()=>{if(!s()){u();return}n()===Lf.PlaybackState.PAUSED&&b()}),$=v(()=>a()?"":"btn--live btn-full-opacity"),w=v(()=>s()?"btn-live":"btn-live-offset"),x=v(()=>s()&&n()===Lf.PlaybackState.PLAYING);At(t,{get className(){return r($)},get testId(){return r(w)},get disabled(){return r(x)},get ariaLabel(){return d()},get click(){return r(p)},children:(k,C)=>{Wl(k,{get isActive(){return s()}})},$$slots:{default:!0}}),F(),o()}var Vf=require("@vkontakte/videoplayer-shared");var y2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),x2=M('<img class="icon" aria-hidden="true">');function ns(t,e){"use strict";let i=Z(!1),o=()=>{D(i,!0)};var n=Be(),a=se(n);{var s=l=>{var c=y2();_(l,c)},d=l=>{var c=x2();S(()=>Ve(c,"src",e.icon)),_t("error",c,o),La(c),_(l,c)};V(a,l=>{r(i)?l(s):l(d,!1)})}_(t,n)}function Rf(t,e){H(e,!0);let i=m(e,"disabled",3,!1),o=m(e,"onClick",3,Vf.noop),n=m(e,"ref",15),a=v(()=>o()===Vf.noop),s=v(()=>r(a)||i()),d=v(()=>r(a)?"btn-full-opacity":"");fo(t,{get disabled(){return r(s)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get ref(){return n()},set ref(l){n(l)},children:(l,c)=>{let u=v(()=>e.testId??e.id);At(l,{get className(){return r(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return r(s)},get testId(){return r(u)},children:(b,p)=>{ns(b,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var Kh=t=>!!t.buttonComponent;var Zr={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var C2=M('<div><!> <div class="controls svelte-1iedtj3" data-testid="controls"><div class="controls-left svelte-1iedtj3"><!> <!> <!></div> <div class="controls-right svelte-1iedtj3"></div></div></div> <!>',1),k2={hash:"svelte-1iedtj3",code:".wrapper-bottom.svelte-1iedtj3 {pointer-events:none;position:absolute;z-index:var(--controls-container-z-index);width:100%;bottom:0;left:0;height:var(--controls-gradient-height);background:var(--controls-gradient);transition:transform var(--controls-transition-duration) var(--controls-transition-fn);display:flex;flex-direction:column;justify-content:flex-end;box-sizing:border-box;}.wrapper-bottom.svelte-1iedtj3 > :where(.svelte-1iedtj3) {pointer-events:auto;}.controls.svelte-1iedtj3 {width:100%;display:flex;align-items:center;justify-content:space-between;height:var(--controls-height);white-space:nowrap;font-size:13px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);will-change:transform;padding:0 8px 4px;box-sizing:border-box;}.controls-left.svelte-1iedtj3, .controls-right.svelte-1iedtj3 {display:flex;align-content:center;}.controls-left.svelte-1iedtj3 {flex-grow:1;min-width:0;overflow:hidden;}.controls-left.svelte-1iedtj3 > *:not(:first-child), .controls-right.svelte-1iedtj3 > * {margin-left:var(--controls-desktop-item-margin-left);}.controls-hidden.svelte-1iedtj3 {visibility:visible; /* if hidden then slider will lose focus (if was focused) */transform:translateY(100%);}.wrapper-bottom.no-smooth.svelte-1iedtj3 {transition:none;}"};function Nf(t,e){H(e,!0),z(t,k2);let[i,o]=Le(),n=()=>y(Gt,"$disabledControls$",i),a=()=>y(Ft,"$adPlaybackState",i),s=()=>y(St,"$playbackState$",i),d=()=>y(Wt,"$currentSubtitle$",i),l=()=>y(Bi,"$isEnded$",i),c=()=>y(fn,"$currentGridType$",i),u=()=>y(un,"$isLive$",i),b=()=>y(Qo,"$chromecastState$",i),p=()=>y(wo,"$isPictureInPictureActive",i),$=()=>y(Gi,"$pictureInPictureType$",i),w=()=>y(G,"$availableSubtitlesList$",i),x=()=>y(ei,"$contextMenuOpenedByKeyboard$",i),k=()=>y(ii,"$showContextMenuBtn$",i),C=()=>y(ko,"$playerSize",i),E=()=>y(Wo,"$isRewindableLive$",i),A=()=>y(pn,"$isActiveLive$",i),L=()=>y(ro,"$graphIsOpened$",i),I=()=>y(ji,"$contextMenuVisible$",i),N=()=>y(_i,"$isFullscreen",i),W=()=>y(oo,"$autoplayNextEnabled",i),Q=()=>y(r(ho),"$prevButton",i),j=()=>y(r(Ze),"$replayButton",i),re=()=>y(r(Mt),"$playButton",i),ce=()=>y(r(mi),"$nextButton",i),X=()=>y(r(lo),"$playPrevChapterButton",i),ge=()=>y(r(nt),"$seekToInteractiveButton",i),ee=()=>y(r(Et),"$interactiveGraphButton",i),Me=()=>y(r(yi),"$liveButton",i),Pe=()=>y(r(ki),"$time",i),Re=()=>y(r(Ti),"$episodes",i),fe=()=>y(r(Ii),"$vkLogo",i),Oe=()=>y(r(Ni),"$volume",i),ie=()=>y(r(Lo),"$subtitles",i),R=()=>y(r(en),"$settings",i),Ne=()=>y(r(Zi),"$context",i),de=()=>y(r(Hn),"$fullscreen",i),Ke=()=>y(r(ir),"$chromecast",i),oe=()=>y(Vi,"$additionalDesktopControlPanelRightButtons$",i),U=()=>y(To,"$isInteractiveTime$",i),Y=()=>y(So,"$settingsMenuVisible",i),Ae=()=>y(wn,"$settingButtonRef$",i),We=()=>y(Si,"$startedByKeyboard$",i),Fe=()=>y(oi,"$isAudioAvailable$",i),ye=()=>y(ft,"$fakeIsPlaying$",i),De=()=>y(Go,"$seekToInteractiveDisabledTooltip$",i),je=()=>y(Ct,"$adPosition",i),et=()=>y(gt,"$position$",i),ct=()=>y(Mn,"$adDuration",i),mt=()=>y(lt,"$duration$",i),Je=m(e,"playerControlsWrapperRef",15,void 0),ut=m(e,"playerControlsRef",15,void 0),$t=m(e,"isAds",3,!1),Ot=m(e,"logoTargetUrl",3,""),we=m(e,"isOneVideoPlaylist",3,!1),Dt=m(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:ft}=Qi(),K=be(),he=Qi(),ae=Rt(),qe=K.actions.internal.toggleMuted,Xe=K.actions.internal.togglePlay,Ue=K.actions.internal.pause,Se=K.actions.internal.toggleSubtitle,Ye=K.callbacks?.onAudioDoesNotExistHint,Ee=K.callbacks?.onAudioDisabledHint,lt=K.state.duration$,gt=K.state.positionWithScrubbing$,St=K.state.playbackState$,oi=K.state.isAudioAvailable$,ti=K.state.isAudioDisabled,Bi=K.state.isEnded$,un=K.state.isLive$,pn=K.state.isActiveLive$,Wo=K.state.isRewindableLive$,{isActive$:wo,type$:Gi}=he.pictureInPicture$,So=K.ui.settingsMenu.visible$,Ko=K.ui.settingsMenu.openedByBtnKeyboard$,zt=K.ui.controls,Co=K.actions.internal.getVideoEpisodes(),Qo=K.state.chromecastState$,G=K.state.availableSubtitlesList$,Wt=K.state.currentSubtitle$,Gt=zt.disabledControls$,ji=K.ui.contextMenu.visible$,ii=K.ui.contextMenu.showContextMenuBtn$,ei=K.ui.contextMenu.openedByBtnKeyboard$,Si=K.ui.startedByKeyboard$,It=K.ui.t,Mn=K.ads.duration,Ct=K.ads.position,Ft=K.ads.playbackState,_i=K.ui.isFullscreen,ko=K.ui.playerSize,fn=K.ui.currentGridType$,Vi=K.ui.additionalDesktopControlPanelRightButtons$,oo=K.ui.autoplayNextEnabled$,jt=K.actions.internal.getVideoElement,ht=K.actions.internal.replayInteractive,no=K.actions.internal.prevVideoClick,fi=K.actions.internal.nextVideoClick,ci=K.state.isInteractive,To=K.state.isInteractiveTime$,Oi=K.state.showInteractiveGraph,Ci=K.state.showSeekToInteractive,mn=K.state.showPlayPrevChapter,vn=K.state.showInteractiveTimeIndicator,bi=K.state.playPrevChapterDisabledTooltip,Go=he.seekToInteractiveDisabledTooltip$,ro=he.graphIsOpened$,ao=ae.features.interactiveResponsiveUi,_r=v(()=>n().has("EPISODE_BUTTON")),Zn=v(()=>n().has("GRAPH_BUTTON")),gn=v(()=>n().has("SEEK_TO_INTERACTIVE_BUTTON")),Ln=v(()=>n().has("PLAY_BUTTON")),Vn=v(()=>n().has("REPLAY_BUTTON")),Yi=v(()=>n().has("PLAY_PREV_CHAPTER_BUTTON")),Io=()=>K.actions.internal.toggleChromecast(),hn=v(()=>$t()?a()==="playing":s()===rs.PlaybackState.PLAYING),it=v(()=>d().value!=="off"),Eo=v(()=>l()&&!$t()||ci),jo=v(()=>ao?r(Eo)&&Ai(c(),"m"):r(Eo)),_n=v(()=>!l()||ci||$t()),Xn=v(()=>Ai(c(),"m")),Po=v(()=>e.showNextPrevButtons&&Ai(c(),"m")&&!$t()&&e.nextButtonActive),Rn=v(()=>e.showNextPrevButtons&&Ai(c(),"m")&&!$t()&&e.prevButtonActive),Yo=v(()=>!$t()&&!!u()),bn=v(()=>b()!==rs.ChromecastState.NOT_AVAILABLE&&!(p()&&$()===1)&&Ai(c(),"m")&&!ci),$i=v(()=>e.showAutoplayNext&&!we()&&Ai(c(),"s")),Ri=v(()=>w().length>0&&Ai(c(),"m")),$n=v(()=>x()||k()),vo=v(()=>Ai(c(),"s")&&!$t()),yn=v(()=>!e.logoHidden&&!$t()),Ao=v(()=>ae.features.fullscreen&&(e.logoHidden||Ai(c(),ao?"xs":"s"))&&!(p()&&$()===1)&&(ci?Dt():!0)),go=v(()=>(!u()||$t())&&!(ae.features.interactiveHideTime&&ci)),ni=v(()=>C().width>100),Nn=v(()=>Oi&&Ai(c(),"m")),so=v(()=>ao?Ci&&Ai(c(),"s"):Ci),Jn=v(()=>ao?mn&&Ai(c(),"s"):mn),Zo=v(()=>!$t()&&!u()&&!!Co?.length&&r(Xn)&&!r(_r)),Xo=v(()=>!E()||!!A()),er=v(()=>L()?It("tooltip_interactive_graph_on"):It("tooltip_interactive_graph_off")),Mo=v(()=>I()?It("aria_label_context_menu_close"):It("aria_label_context_menu_open")),br=(kt,yt)=>kt?yt&&yt===rs.PlaybackState.PAUSED?It("tooltip_play"):"":It("tooltip_live"),xn=v(()=>br(r(Xo),s())),Dn=v(()=>ae.logoType==="vk_video"?It("tooltip_vk_video_logo"):It("tooltip_vk_logo")),tr=v(()=>r(it)?It("tooltip_subtitles_on"):It("tooltip_subtitles_off")),$r=v(()=>N()?It("tooltip_fullscreen_on"):It("tooltip_fullscreen_off")),Bn=v(()=>b()===rs.ChromecastState.CONNECTED?It("tooltip_chromecast_on"):It("tooltip_chromecast_off")),Jo=v(()=>W()?It("tooltip_autoplay_on"):It("tooltip_autoplay_off")),On=Z(0),Yt=le({}),ho=v(()=>zt.prevButton),Ze=v(()=>zt.replayButton),Mt=v(()=>zt.playButton),mi=v(()=>zt.nextButton),lo=v(()=>zt.playPrevChapterButton),nt=v(()=>zt.seekToInteractiveButton),Et=v(()=>zt.interactiveGraphButton),yi=v(()=>zt.liveButton),ki=v(()=>zt.time),Ti=v(()=>zt.episodes),Ii=v(()=>zt.vkLogo),Ni=v(()=>zt.volume),Lo=v(()=>zt.subtitles),en=v(()=>zt.settings),Zi=v(()=>zt.context),Hn=v(()=>zt.fullscreen),ir=v(()=>zt.chromecast),Hi=v(()=>({prevButton:Q()?Q().right-Q().left:0,replayButton:j()?j().right-j().left:0,playButton:re()?re().right-re().left:0,nextButton:ce()?ce().right-ce().left:0,playPrevChapterButton:X()?X().right-X().left:0,seekToInteractiveButton:ge()?ge().right-ge().left:0,interactiveGraphButton:ee()?ee().right-ee().left:0,liveButton:Me()?Me().right-Me().left:0,time:Pe()?Pe().right-Pe().left:0,episodes:Re()?Re().right-Re().left:0,vkLogo:fe()?fe().right-fe().left:0,volume:Oe()?Oe().right-Oe().left:0,subtitles:ie()?ie().right-ie().left:0,settings:R()?R().right-R().left:0,context:Ne()?Ne().right-Ne().left:0,fullscreen:de()?de().right-de().left:0,chromecast:Ke()?Ke().right-Ke().left:0,additionalButtons:oe().length?oe().reduce(kt=>[...kt,40],[]):[]})),tn=Z(0);He(()=>{(!r(tn)||r(tn)<r(Hi).time)&&vt(()=>D(tn,le(r(Hi).time)))});let Fn=Z(!1);He(()=>{let kt=0;r(Zo)&&(Ai(c(),"xl")?kt=r(Hi).time:kt=60);let yt=r(Hi).prevButton+r(Hi).playButton+r(Hi).nextButton+r(Hi).seekToInteractiveButton+r(Hi).interactiveGraphButton+r(Hi).liveButton+r(tn)+kt;D(Fn,le(r(go)&&r(On)>=yt))});let or=v(()=>r(Fn)&&Ai(c(),"m")),yr=(0,Qh.debounceFn)(Js,260);He(()=>{C(),U(),yr(jt(),zt,Yt,e.showControls)});let wn=ne();He(()=>{Y(),Ae()&&vt(()=>qs(Ae(),Y(),Ko))});let on;He(()=>{We(),vt(()=>Gc(Si,We(),on))});function nr(){ca({isAudioDisabled:ti,audioDisabledHintCallback:Ee,isAudioAvailable:Fe(),audioIsNotExistHintCallback:Ye})&&qe()}let _o=ci?ht:Xe,xr=v(()=>ye()!==null),bo=v(()=>r(xr)?ye():r(hn)),rr=v(()=>r(bo)?It("tooltip_pause"):It("tooltip_play")),wr=It("tooltip_episodes"),Nr=v(()=>r(Rn)?{id:"prevButton",type:"desktop-control-panel-left",weight:jr.prevButton,buttonComponent:os,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:no.bind(null,!0)},tooltipEnabled:!K.callbacks?.uiInfo?.onPrevButtonMouseEnter&&!K.callbacks?.uiInfo?.onPrevButtonMouseLeave,mouseEnter:()=>{K.callbacks?.uiInfo?.onPrevButtonMouseEnter?.(is(jt(),Yt,"prevButton",e.showControls))},mouseLeave:()=>{K.callbacks?.uiInfo?.onPrevButtonMouseLeave?.(is(jt(),Yt,"prevButton",e.showControls))},tooltipText:It("tooltip_previous"),disabled:!e.prevButtonActive}:void 0),ar=v(()=>r(jo)?{id:"replayButton",type:"desktop-control-panel-left",weight:jr.replayButton,buttonComponent:el,buttonComponentProps:{disabled:r(Vn),click:_o},tooltipText:It("tooltip_restart"),disabled:r(Vn)}:void 0),Di=v(()=>r(_n)?{id:"playButton",type:"desktop-control-panel-left",weight:jr.playButton,buttonComponent:tl,buttonComponentProps:{disabled:r(Ln),isPlaying:r(hn),click:Xe},tooltipText:r(rr),disabled:r(Ln)}:void 0),nn=v(()=>r(Po)?{id:"nextButton",type:"desktop-control-panel-left",weight:jr.nextButton,buttonComponent:os,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:fi.bind(null,!0)},tooltipEnabled:!K.callbacks?.uiInfo?.onNextButtonMouseEnter&&!K.callbacks?.uiInfo?.onNextButtonMouseLeave,mouseEnter:()=>{K.callbacks?.uiInfo?.onNextButtonMouseEnter?.(is(jt(),Yt,"nextButton",e.showControls))},mouseLeave:()=>{K.callbacks?.uiInfo?.onNextButtonMouseLeave?.(is(jt(),Yt,"nextButton",e.showControls))},tooltipText:It("tooltip_next"),disabled:!e.nextButtonActive}:void 0),rt=v(()=>ci&&r(Jn)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:jr.playPrevChapterButton,buttonComponent:md,buttonComponentProps:{disabled:r(Yi),click:e.playPrevChapter},tooltipText:It("tooltip_interactive_go_back"),disabledTooltipContent:It(bi),disabled:r(Yi)}:void 0),Nt=v(()=>ci&&r(so)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:jr.seekToInteractiveButton,buttonComponent:gd,buttonComponentProps:{disabled:r(gn),click:e.seekToInteractive},tooltipText:It("tooltip_interactive_seek"),disabled:r(gn),disabledTooltipContent:It(De())}:void 0),vi=v(()=>ci&&r(Nn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:jr.interactiveGraphButton,buttonComponent:hd,buttonComponentProps:{disabled:r(Zn),click:ro.toggle,graphIsOpened:L()},tooltipText:r(er)}:void 0),co=v(()=>r(Yo)?{id:"liveButton",type:"desktop-control-panel-left",weight:jr.liveButton,buttonComponent:_d,buttonComponentProps:{isLiveActive:r(Xo),ariaLabel:r(xn)},tooltipText:r(xn),disabled:r(Xo)&&s()===rs.PlaybackState.PLAYING}:void 0),Vo=v(()=>[r(Nr),r(ar),r(Di),r(nn),r(rt),r(Nt),r(vi),r(co)].filter(kt=>!!kt).sort(Qa)),Ce=v(()=>r(yn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Zr.vkLogo,buttonComponent:ad,buttonComponentProps:{targetUrl:Ot(),logoClickable:e.logoClickable,click:Ue},tooltipText:r(Dn),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Bt=v(()=>r($i)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Zr.autoplayNext,buttonComponent:vd,tooltipText:r(Jo)}:void 0),xi=v(()=>({id:"volume",type:"desktop-control-panel-right",weight:Zr.volume,buttonComponent:df,buttonComponentProps:{click:nr}})),Zt=v(()=>r(Ri)?{id:"subtitles",type:"desktop-control-panel-right",weight:Zr.subtitles,buttonComponent:rf,buttonComponentProps:{isSubtitlesEnabled:r(it),click:Se},tooltipText:r(tr)}:void 0),Ie=v(()=>r(vo)?{id:"settings",type:"desktop-control-panel-right",weight:Zr.settings,buttonComponent:Ys,buttonComponentProps:{ref$:wn},tooltipText:Y()?void 0:It("tooltip_settings_off")}:void 0),Pt=v(()=>ae.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Zr.context,buttonComponent:Tf,buttonComponentProps:{click:e.toggleFullscreen,ariaLabel:r(Mo)},className:r($n)?"":"out-of-view",tooltipText:r(Mo)}:void 0),qt=v(()=>r(Ao)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Zr.fullscreen,buttonComponent:rd,buttonComponentProps:{isFullscreen:N(),click:e.toggleFullscreen},tooltipText:r($r)}:void 0),di=v(()=>r(bn)?{id:"chromecast",type:"desktop-control-panel-right",weight:Zr.chromecast,buttonComponent:sd,buttonComponentProps:{state:b(),click:Io},tooltipText:r(Bn)}:void 0),Kt=v(()=>[r(Ce),r(Bt),r(xi),r(Zt),r(Ie),r(Pt),r(qt),r(di),...oe()].filter(kt=>!!kt).sort(Qa));var Un=C2(),Fi=se(Un);let uo;var ms=h(Fi);let vs=v(()=>!r(ni));es(ms,{get isHidden(){return r(vs)},get isAds(){return $t()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return E()},get ref(){return Yt.timeline},set ref(kt){Yt.timeline=kt}});var Sn=P(ms,2),Dr=h(Sn),gs=h(Dr);ui(gs,17,()=>r(Vo),kt=>kt.id,(kt,yt)=>{jc(kt,{get buttonComponent(){return r(yt).buttonComponent},get buttonComponentProps(){return r(yt).buttonComponentProps},get tooltipText(){return r(yt).tooltipText},get disabledTooltipContent(){return r(yt).disabledTooltipContent},get disabled(){return r(yt).disabled},get className(){return r(yt).className},get tooltipEnabled(){return r(yt).tooltipEnabled},get mouseEnter(){return r(yt).mouseEnter},get mouseLeave(){return r(yt).mouseLeave},get ref(){return Yt[r(yt).id]},set ref(Cn){Yt[r(yt).id]=Cn}})});var ha=P(gs,2);{var dl=kt=>{let yt=v(()=>$t()?je():et()),Cn=v(()=>$t()?ct():mt());id(kt,{isMobile:!1,get showDuration(){return r(or)},get position(){return r(yt)},get duration(){return r(Cn)},get ref(){return Yt.time},set ref(Sr){Yt.time=Sr}})};V(ha,kt=>{r(go)&&kt(dl)})}var hs=P(ha,2);let cl=v(()=>!r(Zo));fo(hs,{className:"w-max",get disabled(){return r(cl)},tooltipContent:wr,get ref(){return Yt.episodes},set ref(kt){Yt.episodes=kt},children:(kt,yt)=>{var Cn=Be(),Sr=se(Cn);{var ba=Cr=>{dd(Cr,{get position(){return et()},get duration(){return mt()},timeCodes:Co})};V(Sr,Cr=>{r(Zo)&&Cr(ba)})}_(kt,Cn)},$$slots:{default:!0}}),g(Dr);var _a=P(Dr,2);ui(_a,21,()=>r(Kt),kt=>kt.id,(kt,yt)=>{var Cn=Be(),Sr=se(Cn);{var ba=kr=>{jc(kr,{get buttonComponent(){return r(yt).buttonComponent},get buttonComponentProps(){return r(yt).buttonComponentProps},get tooltipText(){return r(yt).tooltipText},get disabledTooltipContent(){return r(yt).disabledTooltipContent},get disabled(){return r(yt).disabled},get className(){return r(yt).className},get ref(){return Yt[r(yt).id]},set ref(Jr){Yt[r(yt).id]=Jr}})},Cr=kr=>{let Jr=v(()=>!!r(yt).disabled);Rf(kr,{get id(){return r(yt).id},get testId(){return r(yt).testId},get icon(){return r(yt).icon},get ariaLabel(){return r(yt).ariaLabel},get tooltipText(){return r(yt).tooltipText},get disabledTooltipContent(){return r(yt).disabledTooltipContent},get disabled(){return r(Jr)},get onClick(){return r(yt).onClick},get ref(){return Yt[r(yt).id]},set ref(pl){Yt[r(yt).id]=pl}})};V(Sr,kr=>{Kh(r(yt))?kr(ba):kr(Cr,!1)})}_(kt,Cn)}),g(_a),g(Sn),st(Sn,kt=>ut(kt),()=>ut()),g(Fi),st(Fi,kt=>Je(kt),()=>Je());var ul=P(Fi,2);{var zn=kt=>{pd(kt,{get ref(){return Yt.interactiveTimeIndicator},set ref(yt){Yt.interactiveTimeIndicator=yt}})};V(ul,kt=>{vn&&kt(zn)})}S(kt=>uo=J(Fi,1,"wrapper-bottom svelte-1iedtj3",null,uo,kt),[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth})]),Ar(Dr,"clientWidth",kt=>D(On,kt)),_(t,Un),F(),o()}var il=require("@vkontakte/videoplayer-core");var Df=require("@vkontakte/videoplayer-shared");var T2=M('<div class="icon icon-error-stub svelte-167ouw6"><div class="inner svelte-167ouw6"></div></div>'),I2=M('<img class="icon svelte-167ouw6" aria-hidden="true">'),E2={hash:"svelte-167ouw6",code:".icon.svelte-167ouw6 {width:24px !important;height:24px !important;}.inner.svelte-167ouw6 {width:16px;height:16px;background-color:var(--white);}"};function Bf(t,e){z(t,E2);let i=m(e,"disabled",3,!1),o=m(e,"onClick",3,Df.noop),n=v(()=>o()===Df.noop),a=v(()=>r(n)||i()),s=Z(!1),d=()=>{D(s,!0)},l=v(()=>r(n)?"btn-full-opacity":"");At(t,{get className(){return r(l)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return r(a)},get testId(){return e.testId},children:(c,u)=>{var b=Be(),p=se(b);{var $=x=>{var k=T2();_(x,k)},w=x=>{var k=I2();S(()=>Ve(k,"src",e.iconUrl)),_t("error",k,d),La(k),_(x,k)};V(p,x=>{r(s)?x($):x(w,!1)})}_(c,b)},$$slots:{default:!0}})}var P2=ve('<svg><!><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z"></path><path fill="var(--btn-color, #fff)" d="M8.695 8.105 5.301 4.71a1 1 0 0 1 1.414-1.415L20.7 17.285a1 1 0 0 1-1.414 1.415L16 15.41V20a1 1 0 0 1-1 1c-.641 0-1.258-.25-1.72-.695L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.765zm2.88-2.77 1.704-1.642A2.48 2.48 0 0 1 15 3a1 1 0 0 1 1 1v5.76l-4.426-4.426Z"></path></g></svg>');function Of(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=P2();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true","data-testid":"muted-icon",role:"img",...i})),_(t,o)}var Gh=require("@vkontakte/videoplayer-shared");var A2=M('<span class="text svelte-6gmlbk"> </span>'),M2=M('<div aria-hidden="true"><!> <!></div>'),L2={hash:"svelte-6gmlbk",code:".container.svelte-6gmlbk {display:flex;align-items:center;}.expanded.svelte-6gmlbk {background-color:rgba(0, 0, 0, 0.56);border-radius:6px;}.text.svelte-6gmlbk {font-size:15px;margin-left:8px;}"};function Yc(t,e){H(e,!0),z(t,L2);let i=m(e,"muted",3,!1),o=m(e,"expanded",3,!1),n=m(e,"click",3,Gh.noop),a=m(e,"ref",15,void 0),d=be().ui.t,l=v(()=>i()?d("tooltip_volume"):d("tooltip_volume_muted")),c=v(()=>o()?pa:Of),u=v(()=>o()?"btn-mobile-unmuted":"btn-mobile-muted");At(t,{get testId(){return r(u)},get click(){return n()},get ariaLabel(){return r(l)},get ref(){return a()},set ref(b){a(b)},children:(b,p)=>{var $=M2();let w=v(()=>r(c)),x;var k=h($);pi(k,()=>r(w),(A,L)=>{L(A,{})});var C=P(k,2);{var E=A=>{var L=A2(),I=h(L,!0);g(L),S(N=>ue(I,N),[()=>d("mobile_unmute")]),_(A,L)};V(C,A=>{o()&&A(E)})}g($),S(A=>x=J($,1,"container svelte-6gmlbk",null,x,A),[()=>({expanded:o()})]),_(b,$)},$$slots:{default:!0}}),F()}var V2=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M7.662 4h6.676c.808 0 1.469 0 2.006.044.556.045 1.058.142 1.526.381a3.9 3.9 0 0 1 1.705 1.704c.239.47.336.971.381 1.527C20 8.193 20 8.854 20 9.662V11.1a.9.9 0 0 1-1.8 0V9.7c0-.855 0-1.442-.038-1.897-.036-.445-.103-.684-.19-.856a2.1 2.1 0 0 0-.919-.918c-.172-.088-.411-.155-.856-.191C15.742 5.8 15.155 5.8 14.3 5.8H7.7c-.855 0-1.442 0-1.897.038-.445.036-.684.103-.856.19a2.1 2.1 0 0 0-.918.919c-.088.172-.155.411-.191.856C3.8 8.258 3.8 8.845 3.8 9.7v2.646c0 .855 0 1.442.038 1.897.036.445.103.683.19.856a2.1 2.1 0 0 0 .919.918c.172.088.411.155.856.191.455.037 1.042.038 1.897.038h2.4a.9.9 0 0 1 0 1.8H7.662c-.808 0-1.469 0-2.006-.044-.556-.045-1.058-.142-1.527-.381a3.9 3.9 0 0 1-1.704-1.704c-.239-.47-.336-.972-.381-1.527C2 13.852 2 13.192 2 12.384V9.662c0-.808 0-1.469.044-2.006.045-.556.142-1.058.381-1.527A3.9 3.9 0 0 1 4.13 4.425c.47-.239.971-.336 1.527-.381C6.193 4 6.854 4 7.662 4M13 16.8c0-.98 0-1.47.19-1.845a1.75 1.75 0 0 1 .766-.764C14.33 14 14.82 14 15.8 14h3.4c.98 0 1.47 0 1.845.19.329.168.596.436.764.766.191.374.191.864.191 1.844v.4c0 .98 0 1.47-.19 1.845a1.75 1.75 0 0 1-.765.764C20.67 20 20.18 20 19.2 20h-3.4c-.98 0-1.47 0-1.845-.19a1.75 1.75 0 0 1-.764-.765C13 18.67 13 18.18 13 17.2z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="m11.643 12.37-.007-.006L9.073 9.8H10.1a.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.022l2.53 2.524.134.134a.9.9 0 0 0 1.272-1.272z" class="hidden-not-active"></path><path fill="var(--btn-color, #fff)" d="m6.357 9.63.007.006L8.927 12.2H7.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.022L7.67 8.397l-.134-.133a.9.9 0 0 0-1.272 1.272z" class="hidden-active"></path></svg>');function Hf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=V2();let n;var a=h(o);pe(a,()=>e.children??te),me(3),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",role:"img",...i})),_(t,o)}var R2={hash:"svelte-tmam00",code:`svg[data-testid="pip-icon--active"] .hidden-active,
256
256
  svg[data-testid="pip-icon"] .hidden-not-active {visibility:hidden;opacity:0;}`};function Ff(t,e){z(t,R2);let i=m(e,"isActive",3,!1),o=v(()=>i()?"color: #2688EB;":"color: #fff;"),n=v(()=>i()?"pip-icon--active":"pip-icon");Hf(t,{get style(){return r(o)},get"data-testid"(){return r(n)}})}var jh=require("@vkontakte/videoplayer-shared");function Uf(t,e){H(e,!0);let i=m(e,"ref",15,void 0),o=m(e,"isPictureInPictureActive",3,!1),n=m(e,"click",3,jh.noop),a=O("menu_pip");At(t,{testId:"btn-pip",ariaLabel:a,get click(){return n()},get ref(){return i()},set ref(s){i(s)},children:(s,d)=>{Ff(s,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}var Yh=require("@vkontakte/videoplayer-shared");var N2=(t,e,i,o)=>{r(e)&&i.onDisabledPlayPrevChapterClick(r(o))},D2=(t,e,i,o)=>{r(e)&&i.onDisabledSeekToInteractiveClick(r(o))},B2=M("<div><!></div>"),O2=M("<div><!></div>"),H2=M("<div><!></div>"),F2=M("<!> <!> <!>",1),U2=M("<div></div> <div><!></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),z2=M("<div><!></div>"),q2=M('<div class="wrapper-middle svelte-1afsgkw"><!></div>'),W2=M("<!> <!> <div><!></div>",1),K2=M('<div aria-hidden="true">\xB7</div> <!>',1),Q2=M("<!> <!> <div><div><div><!> <!> <!> <!> <!> <!></div> <!></div></div> <!>",1),G2={hash:"svelte-1afsgkw",code:`.wrapper-bottom.svelte-1afsgkw {pointer-events:none;position:absolute;z-index:var(--controls-container-z-index);width:100%;bottom:0;left:0;height:var(--controls-gradient-height);background:var(--controls-gradient);transition:transform var(--controls-transition-duration) var(--controls-transition-fn);display:flex;flex-direction:column;justify-content:flex-end;box-sizing:border-box;padding:0 4px 8px;}.wrapper-bottom.svelte-1afsgkw > :where(.svelte-1afsgkw) {pointer-events:auto;}.wrapper-bottom.ads-timeline-mobile.svelte-1afsgkw {height:9px;padding:0 4px 4px;}.wrapper-middle.svelte-1afsgkw {position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);display:flex;align-items:center;z-index:var(--controls-container-z-index);}.wrapper-top-right.svelte-1afsgkw {position:absolute;top:4px;right:8px;transition:opacity var(--controls-transition-duration);display:flex;z-index:var(--controls-container-z-index);}.wrapper-top-left.svelte-1afsgkw {position:absolute;top:4px;left:8px;z-index:var(--controls-container-z-index);}.wrapper-middle-left.svelte-1afsgkw,
257
257
  .wrapper-middle-left-second.svelte-1afsgkw,
258
258
  .wrapper-middle-right.svelte-1afsgkw {position:absolute;top:50%;transform:translateY(-50%);height:44px;width:44px;border-radius:12px;background-color:rgba(0, 0, 0, 0.56);transition:opacity var(--controls-transition-duration);display:flex;align-items:center;justify-content:center;}.wrapper-middle-left.svelte-1afsgkw {left:12px;}.wrapper-middle-left-second.svelte-1afsgkw {left:64px;}.wrapper-middle-right.svelte-1afsgkw {right:12px;}.controls.svelte-1afsgkw {width:100%;display:flex;align-items:center;height:var(--controls-height);white-space:nowrap;font-size:13px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);will-change:transform;padding:0 4px;box-sizing:border-box;}.controls.svelte-1afsgkw > *:not(:first-child) {margin-left:8px;}.hidden.svelte-1afsgkw {visibility:hidden;opacity:0;}.controls-hidden.svelte-1afsgkw {visibility:visible; /* if hidden then slider will lose focus (if was focused) */transform:translateY(100%);}.wrapper-bottom.no-smooth.svelte-1afsgkw {transition:none;}.overlay-mobile.svelte-1afsgkw {position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, .3);pointer-events:none;transition:opacity var(--controls-transition-duration);}
@@ -261,7 +261,7 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
261
261
  }
262
262
 
263
263
  @media screen and (orientation: landscape) {.wrapper-top-left.fullscreen.svelte-1afsgkw {top:12px;left:44px;}.wrapper-top-right.fullscreen.svelte-1afsgkw {top:12px;right:44px;}.wrapper-middle-left.fullscreen.svelte-1afsgkw {left:44px;}.wrapper-middle-left-second.fullscreen.svelte-1afsgkw {left:96px;}.wrapper-middle-right.fullscreen.svelte-1afsgkw {right:44px;}.controls-wrapper.fullscreen.svelte-1afsgkw {position:absolute;left:36px;right:36px;bottom:32px;width:calc(100% - 72px);}
264
- }`};function zf(t,e){H(e,!0),z(t,G2);let[i,o]=Le(),n=()=>y(Mn,"$seekToInteractiveDisabledTooltip$",i),a=()=>y(pn,"$disabledControls$",i),s=()=>y($t,"$playbackState$",i),d=()=>y(Ko,"$adPlaybackState",i),l=()=>y(Dt,"$isEnded$",i),c=()=>y(Co,"$playerSize",i),u=()=>y(qe,"$scrubbingInProgress",i),b=()=>y(Bi,"$chromecastState$",i),p=()=>y(Ue,"$isPictureInPictureActive",i),$=()=>y(Se,"$pictureInPictureType$",i),w=()=>y(Xe,"$mobileNotReportControlHidden$",i),x=()=>y(mt,"$playerPhase",i),k=()=>y(wo,"$currentGridType$",i),C=()=>y(ft,"$isLive$",i),E=()=>y(lt,"$settingsMenuVisible",i),A=()=>y(ae,"$isRewindableLive$",i),L=()=>y(he,"$isActiveLive$",i),I=()=>y(ji,"$isInteractiveTime$",i),N=()=>y(Ot,"$isAudioAvailable$",i),W=()=>y(bn,"$settingButtonRef$",i),Q=()=>y(Wo,"$startedByKeyboard$",i),j=()=>y(zt,"$isFullscreen",i),re=()=>y(Ee,"$mobileUnmuteButtonVisible",i),ce=()=>y(K,"$muted$",i),X=()=>y(Ye,"$mobileUnmuteButtonExpanded",i),ge=()=>y(Qo,"$additionalButtons$",i),ee=()=>y(un,"$crashed$",i),Me=()=>y(Ct,"$graphIsOpened$",i),Pe=()=>y(So,"$adPosition",i),Ve=()=>y(Gi,"$adDuration",i),fe=()=>y(ut,"$position$",i),Oe=()=>y(Je,"$duration$",i),ie=m(e,"playerControlsWrapperRef",15,void 0),R=m(e,"playerControlsRef",15,void 0),Re=m(e,"isAds",3,!1),de=m(e,"logoTargetUrl",3,""),Ke=m(e,"isOneVideoPlaylist",3,!1),oe=m(e,"customFullscreenSupported",3,!0),U=be(),Y=Qi(),Ae=Rt(),We=U.actions.internal.toggleMuted,Fe=U.actions.internal.togglePlay,ye=U.actions.internal.pause,Ne=U.actions.internal.prevVideoClick,je=U.actions.internal.nextVideoClick,et=U.callbacks?.onAudioDoesNotExistHint,ct=U.callbacks?.onAudioDisabledHint,mt=U.playerPhase,Je=U.state.duration$,ut=U.state.positionWithScrubbing$,$t=U.state.playbackState$,Ot=U.state.isAudioAvailable$,we=U.state.isAudioDisabled,Dt=U.state.isEnded$,ft=U.state.isLive$,K=U.state.muted$,he=U.state.isActiveLive$,ae=U.state.isRewindableLive$,qe=U.ui.scrubbingInProgress,Xe=U.ui.mobileNotReportControlHidden$,{isActive$:Ue,type$:Se}=Y.pictureInPicture$,Ye=U.ui.mobileUnmuteButtonExpanded,Ee=U.ui.mobileUnmuteButtonVisible,lt=U.ui.settingsMenu.visible$,gt=U.ui.settingsMenu.openedByBtnKeyboard$,St=U.ui.controls,oi=U.actions.internal.getVideoEpisodes(),ti=U.webApi.pictureInPictureApi,Bi=U.state.chromecastState$,un=U.state.crashed$,pn=St.disabledControls$,Wo=U.ui.startedByKeyboard$,wo=U.ui.currentGridType$,Gi=U.ads.duration,So=U.ads.position,Ko=U.ads.playbackState,zt=U.ui.isFullscreen,Co=U.ui.playerSize,Qo=U.ui.additionalButtonsDeprecated$,G=U.actions.internal.getVideoElement,Wt=U.actions.internal.replayInteractive,Gt=U.state.isInteractive,ji=U.state.isInteractiveTime$,ii=U.state.showInteractiveGraph,ei=U.state.showSeekToInteractive,Si=U.state.showPlayPrevChapter,It=U.state.showInteractiveTimeIndicator,Mn=Y.seekToInteractiveDisabledTooltip$,Ct=Y.graphIsOpened$,Ft=v(()=>O(U.state.playPrevChapterDisabledTooltip)),_i=v(()=>O(n())),ko=v(()=>a().has("EPISODE_BUTTON")),fn=v(()=>a().has("GRAPH_BUTTON")),Vi=v(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),oo=v(()=>a().has("PLAY_BUTTON")),jt=v(()=>a().has("REPLAY_BUTTON")),ht=v(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),no=v(()=>s()===il.PlaybackState.PLAYING),fi=v(()=>d()==="paused"),ci=v(()=>l()&&!Re()&&!Gt),To=v(()=>!l()||Re()),Oi=v(()=>e.showNextPrevButtons&&!Re()&&e.prevButtonActive),Ci=v(()=>e.showNextPrevButtons&&!Re()&&e.nextButtonActive),mn=v(()=>c().width>300),vn=v(()=>c().width>400),bi=v(u),Go=v(()=>b()!==il.ChromecastState.NOT_AVAILABLE&&!(p()&&$()===1)&&!w()&&!Gt),ro=v(()=>x()==="LiveWaitingStart"),ao=v(()=>!!ti&&b()!==il.ChromecastState.CONNECTED&&!w()&&($()===1&&r(ro)||!r(ro))&&!r(bi)&&!Gt),_r=v(()=>!r(bi)&&Ai(k(),"s")),Zn=v(()=>!e.logoHidden&&c().width>350),gn=v(()=>Ae.features.fullscreen&&!(p()&&$()===1)&&(Gt?oe():!0)&&!r(bi)),Ln=v(()=>(!C()||Re())&&c().width>260&&!r(bi)&&!(Ae.features.interactiveHideTime&&Gt)),Vn=v(()=>E()||e.showControls),Yi=v(()=>!Re()&&!C()&&!!oi?.length&&r(mn)&&!r(ko)&&!r(bi)),Io=v(()=>!A()||!!L()),hn=v(()=>ii&&Ai(k(),"m")),it=le({}),Eo=(0,Yh.debounceFn)(Js,260);He(()=>{c(),I(),Eo(G(),St,it,e.showControls)});let jo=()=>U.actions.internal.toggleChromecast();function _n(){ca({isAudioDisabled:we,audioDisabledHintCallback:ct,isAudioAvailable:N(),audioIsNotExistHintCallback:et})&&We()}async function Xn(){ti?.isActive()?await ti?.remove():await ti?.request()}function Po(){!we&&N()&&Ee.set(!1),_n()}let Rn=Z(""),Yo=(Ze,Mt)=>{if(!Ze){D(Rn,le(O("tooltip_live")));return}Mt&&Mt===il.PlaybackState.PAUSED&&D(Rn,le(O("tooltip_play")))};He(()=>{Yo(r(Io),s())});let bn=ne();He(()=>{W()&&qs(W(),E(),gt)}),He(()=>{Gc(Wo,Q(),it.playButton)});var $i=Q2(),Ri=se($i);{var $n=Ze=>{var Mt=U2(),mi=se(Mt);let lo;var nt=P(mi,2);let Et;var yi=h(nt);{var ki=rt=>{let Nt=v(()=>N()&&!we&&X());Yc(rt,{get muted(){return ce()},get expanded(){return r(Nt)},click:Po,get ref(){return it.volume},set ref(vi){it.volume=vi}})};V(yi,rt=>{(!N()||re())&&rt(ki)})}g(nt);var Ti=P(nt,2);let Ii;var Ni=h(Ti);ui(Ni,1,ge,({iconUrl:rt,ariaLabel:Nt,testId:vi,onClick:co,tooltip:Vo})=>rt,(rt,Nt)=>{let vi=()=>r(Nt).iconUrl,co=()=>r(Nt).ariaLabel,Vo=()=>r(Nt).testId,Ce=()=>r(Nt).onClick,Bt=()=>r(Nt).tooltip,xi=v(()=>co()??Bt());Bf(rt,{get iconUrl(){return vi()},get ariaLabel(){return r(xi)},get testId(){return Vo()},get onClick(){return Ce()}})});var Lo=P(Ni,2);{var en=rt=>{vd(rt,{get ref(){return it.autoplayNextToggle},set ref(Nt){it.autoplayNextToggle=Nt}})};V(Lo,rt=>{e.showAutoplayNext&&!Ke()&&rt(en)})}var Zi=P(Lo,2);{var Hn=rt=>{sd(rt,{isMobile:!0,click:jo,get state(){return b()},get ref(){return it.chromecast},set ref(Nt){it.chromecast=Nt}})};V(Zi,rt=>{r(Go)&&rt(Hn)})}var ir=P(Zi,2);{var Hi=rt=>{Uf(rt,{click:Xn,get isPictureInPictureActive(){return p()},get ref(){return it.pip},set ref(Nt){it.pip=Nt}})};V(ir,rt=>{r(ao)&&rt(Hi)})}var tn=P(ir,2);{var Fn=rt=>{Ys(rt,{ref$:bn})};V(tn,rt=>{ee()&&rt(Fn)})}var or=P(tn,2);{var yr=rt=>{ad(rt,{click:ye,get targetUrl(){return de()},get logoClickable(){return e.logoClickable},get ref(){return it.vkLogo},set ref(Nt){it.vkLogo=Nt}})};V(or,rt=>{r(Zn)&&rt(yr)})}g(Ti);var wn=P(Ti,2);let on;var nr=h(wn);{var _o=rt=>{let Nt=v(()=>Ne.bind(null,!0));os(rt,{get click(){return r(Nt)},type:"prev",isMobile:!0,get ref(){return it.prevButton},set ref(vi){it.prevButton=vi}})};V(nr,rt=>{r(Oi)&&rt(_o)})}var xr=P(nr,2);{var bo=rt=>{tl(rt,{get disabled(){return r(oo)},click:Fe,isMobile:!0,get isPlaying(){return r(no)},get ref(){return it.playButton},set ref(Nt){it.playButton=Nt}})};V(xr,rt=>{r(To)&&rt(bo)})}var rr=P(xr,2);{var wr=rt=>{el(rt,{get disabled(){return r(jt)},click:Fe,isMobile:!0,get ref(){return it.replayButton},set ref(Nt){it.replayButton=Nt}})};V(rr,rt=>{r(ci)&&rt(wr)})}var Nr=P(rr,2);{var ar=rt=>{let Nt=v(()=>je.bind(null,!0));os(rt,{get click(){return r(Nt)},type:"next",isMobile:!0,get ref(){return it.nextButton},set ref(vi){it.nextButton=vi}})};V(Nr,rt=>{r(Ci)&&rt(ar)})}g(wn);var Di=P(wn,2);{var nn=rt=>{var Nt=F2(),vi=se(Nt);{var co=Zt=>{var Ie=B2();let Pt;Ie.__click=[N2,ht,e,Ft];var qt=h(Ie);let di=v(()=>!e.showControls);md(qt,{get hidden(){return r(di)},get disabled(){return r(ht)},get click(){return e.playPrevChapter},get ref(){return it.playPrevChapterButton},set ref(Kt){it.playPrevChapterButton=Kt}}),g(Ie),S(Kt=>Pt=J(Ie,1,"wrapper-middle-left svelte-1afsgkw",null,Pt,Kt),[()=>({fullscreen:j(),hidden:!e.showControls})]),_(Zt,Ie)};V(vi,Zt=>{Si&&Zt(co)})}var Vo=P(vi,2);{var Ce=Zt=>{var Ie=O2();let Pt;var qt=h(Ie);let di=v(()=>!e.showControls&&!Me());hd(qt,{get hidden(){return r(di)},get disabled(){return r(fn)},get click(){return Ct.toggle},get graphIsOpened(){return Me()},get ref(){return it.interactiveGraphButton},set ref(Kt){it.interactiveGraphButton=Kt}}),g(Ie),S(Kt=>Pt=J(Ie,1,Vl(Si?"wrapper-middle-left-second":"wrapper-middle-left"),"svelte-1afsgkw",Pt,Kt),[()=>({fullscreen:j(),hidden:!e.showControls&&!Me()})]),_(Zt,Ie)};V(Vo,Zt=>{r(hn)&&Zt(Ce)})}var Bt=P(Vo,2);{var xi=Zt=>{var Ie=H2();let Pt;Ie.__click=[D2,Vi,e,_i];var qt=h(Ie);let di=v(()=>!e.showControls);gd(qt,{get hidden(){return r(di)},get disabled(){return r(Vi)},get click(){return e.seekToInteractive},get ref(){return it.seekToInteractiveButton},set ref(Kt){it.seekToInteractiveButton=Kt}}),g(Ie),S(Kt=>Pt=J(Ie,1,"wrapper-middle-right svelte-1afsgkw",null,Pt,Kt),[()=>({fullscreen:j(),hidden:!e.showControls})]),_(Zt,Ie)};V(Bt,Zt=>{ei&&Zt(xi)})}_(rt,Nt)};V(Di,rt=>{Gt&&!u()&&rt(nn)})}S((rt,Nt,vi,co)=>{lo=J(mi,1,"overlay-mobile svelte-1afsgkw",null,lo,rt),Et=J(nt,1,"wrapper-top-left svelte-1afsgkw",null,Et,Nt),Ii=J(Ti,1,"wrapper-top-right svelte-1afsgkw",null,Ii,vi),on=J(wn,1,"wrapper-middle svelte-1afsgkw",null,on,co)},[()=>({hidden:!r(Vn)}),()=>({hidden:!e.showControls,fullscreen:j()}),()=>({hidden:!e.showControls&&!w(),fullscreen:j()}),()=>({hidden:!e.showControls||u()||e.endScreenShown&&e.showNextPrevButtons})]),_(Ze,Mt)};V(Ri,Ze=>{Re()||Ze($n)})}var vo=P(Ri,2);{var yn=Ze=>{var Mt=W2(),mi=se(Mt);{var lo=Ii=>{var Ni=z2();let Lo;var en=h(Ni);Yc(en,{get muted(){return ce()},expanded:!1,click:Po,get ref(){return it.volume},set ref(Zi){it.volume=Zi}}),g(Ni),S(Zi=>Lo=J(Ni,1,"wrapper-top-right svelte-1afsgkw",null,Lo,Zi),[()=>({fullscreen:j()})]),_(Ii,Ni)};V(mi,Ii=>{re()&&Ii(lo)})}var nt=P(mi,2);{var Et=Ii=>{var Ni=q2(),Lo=h(Ni);let en=v(()=>!r(fi));tl(Lo,{get disabled(){return r(oo)},click:Fe,isMobile:!0,get isPlaying(){return r(en)},get ref(){return it.playButton},set ref(Zi){it.playButton=Zi}}),g(Ni),_(Ii,Ni)};V(nt,Ii=>{r(fi)&&Ii(Et)})}var yi=P(nt,2);let ki;var Ti=h(yi);ld(Ti,{get position(){return Pe()},get duration(){return Ve()}}),g(yi),S(Ii=>ki=J(yi,1,"wrapper-bottom ads-timeline-mobile svelte-1afsgkw",null,ki,Ii),[()=>({fullscreen:j()})]),_(Ze,Mt)};V(vo,Ze=>{Re()&&d()!=="inactive"&&Ze(yn)})}var Ao=P(vo,2);let go;var ni=h(Ao);let Nn;var so=h(ni);J(so,1,"controls svelte-1afsgkw",null,{},{mobile:!0});var Jn=h(so);{var Zo=Ze=>{fo(Ze,{get disabled(){return r(jt)},get ref(){return it.replayButton},set ref(Mt){it.replayButton=Mt},children:(Mt,mi)=>{el(Mt,{get disabled(){return r(jt)},click:Wt})},$$slots:{default:!0}})};V(Jn,Ze=>{Gt&&Ze(Zo)})}var Xo=P(Jn,2);{var er=Ze=>{fo(Ze,{get ref(){return it.liveButton},set ref(Mt){it.liveButton=Mt},children:(Mt,mi)=>{_d(Mt,{get isLiveActive(){return r(Io)},isMobile:!0,get ariaLabel(){return r(Rn)}})},$$slots:{default:!0}})};V(Xo,Ze=>{!Re()&&C()&&Ze(er)})}var Mo=P(Xo,2);{var br=Ze=>{let Mt=v(()=>Re()?Pe():fe()),mi=v(()=>Re()?Ve():Oe());id(Ze,{get showDuration(){return r(vn)},get position(){return r(Mt)},get duration(){return r(mi)},isMobile:!0,get ref(){return it.time},set ref(lo){it.time=lo}})};V(Mo,Ze=>{r(Ln)&&Ze(br)})}var xn=P(Mo,2);let Dn=v(()=>!r(Yi));fo(xn,{className:"w-max",get disabled(){return r(Dn)},get ref(){return it.episodes},set ref(Ze){it.episodes=Ze},children:(Ze,Mt)=>{var mi=Be(),lo=se(mi);{var nt=Et=>{var yi=K2(),ki=P(se(yi),2);dd(ki,{get position(){return fe()},get duration(){return Oe()},timeCodes:oi}),_(Et,yi)};V(lo,Et=>{r(Yi)&&Et(nt)})}_(Ze,mi)},$$slots:{default:!0}});var tr=P(xn,2);{var $r=Ze=>{fo(Ze,{get ref(){return it.settings},set ref(Mt){it.settings=Mt},children:(Mt,mi)=>{Ys(Mt,{ref$:bn})},$$slots:{default:!0}})};V(tr,Ze=>{r(_r)&&Ze($r)})}var Bn=P(tr,2);{var Jo=Ze=>{fo(Ze,{get ref(){return it.fullscreen},set ref(Mt){it.fullscreen=Mt},children:(Mt,mi)=>{rd(Mt,{get click(){return e.toggleFullscreen},get isFullscreen(){return j()}})},$$slots:{default:!0}})};V(Bn,Ze=>{r(gn)&&Ze(Jo)})}g(so),st(so,Ze=>R(Ze),()=>R());var On=P(so,2);es(On,{get isAds(){return Re()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return A()},get ref(){return it.timeline},set ref(Ze){it.timeline=Ze}}),g(ni),g(Ao),st(Ao,Ze=>ie(Ze),()=>ie());var Yt=P(Ao,2);{var ho=Ze=>{pd(Ze,{get ref(){return it.interactiveTimeIndicator},set ref(Mt){it.interactiveTimeIndicator=Mt}})};V(Yt,Ze=>{It&&Ze(ho)})}S((Ze,Mt)=>{go=J(Ao,1,"wrapper-bottom svelte-1afsgkw",null,go,Ze),Nn=J(ni,1,"controls-wrapper svelte-1afsgkw",null,Nn,Mt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth,mobile:!0}),()=>({fullscreen:j()})]),_(t,$i),F(),o()}ot(["click"]);function $d(t,e){H(e,!0);let[i,o]=Le(),n=()=>y(C,"$isMobile",i),a=m(e,"bottomNoSmooth",3,!1),s=m(e,"playerControlsWrapperRef",15,void 0),d=m(e,"playerControlsRef",15,void 0),l=m(e,"isAds",3,!1),c=m(e,"logoTargetUrl",3,""),u=m(e,"showAutoplayNext",3,!1),b=m(e,"isOneVideoPlaylist",3,!1),p=m(e,"customFullscreenSupported",3,!0),$=m(e,"endScreenShown",3,!1),w=m(e,"onDisabledPlayPrevChapterClick",3,qf.noop),x=m(e,"onDisabledSeekToInteractiveClick",3,qf.noop),C=be().ui.isMobile,E=Z(!1);Vt(()=>{let N=setTimeout(()=>D(E,!0),0);return()=>clearTimeout(N)});var A=Be(),L=se(A);{var I=N=>{var W=Be(),Q=se(W);{var j=ce=>{zf(ce,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return l()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return c()},get showAutoplayNext(){return u()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return b()},get customFullscreenSupported(){return p()},get endScreenShown(){return $()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return w()},get onDisabledSeekToInteractiveClick(){return x()},get playerControlsWrapperRef(){return s()},set playerControlsWrapperRef(X){s(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})},re=ce=>{Nf(ce,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return l()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return c()},get isOneVideoPlaylist(){return b()},get showAutoplayNext(){return u()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return p()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return s()},set playerControlsWrapperRef(X){s(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})};V(Q,ce=>{n()?ce(j):ce(re,!1)})}_(N,W)};V(L,N=>{r(E)&&N(I)})}_(t,A),F(),o()}var j2=ve('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M15.537 10.534a1.157 1.157 0 0 0 .003 1.96l7.658 4.823c.78.491 1.798-.065 1.798-.981v-3.3c7.265.512 13 6.568 13 13.964 0 7.732-6.268 14-14 14-5.98 0-11.088-3.75-13.093-9.032a1.5 1.5 0 0 0-2.805 1.064C10.531 39.441 16.73 44 23.996 44c9.39 0 17-7.611 17-17 0-9.053-7.076-16.453-16-16.971V6.664c0-.918-1.021-1.473-1.8-.98z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M15.404 10.322a1.407 1.407 0 0 0 .003 2.384l7.657 4.823c.944.594 2.182-.076 2.182-1.193v-3.03c7.008.631 12.5 6.522 12.5 13.694 0 7.594-6.156 13.75-13.75 13.75-5.873 0-10.89-3.683-12.86-8.871a1.75 1.75 0 1 0-3.272 1.242c2.469 6.503 8.758 11.129 16.132 11.129 9.527 0 17.25-7.723 17.25-17.25 0-9.107-7.056-16.565-16-17.205V6.664c0-1.118-1.241-1.788-2.184-1.19z"></path></g><defs><filter id="a" width="43.996" height="49.5" x="2.5" y="0" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_100684"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_100684" result="shape"></feBlend></filter></defs></svg>');function Wf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=j2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"51",fill:"none","aria-hidden":"true","data-testid":"seek-icon",role:"img",...i})),_(t,o)}function Kf(t,e){let i=m(e,"reversed",3,!1),o=v(()=>i()?"transform: scaleX(-1);":void 0);Wf(t,{get style(){return r(o)}})}var Y2=ve('<svg><!><g clip-path="url(#c)" filter="url(#a)"><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M28.167 7h-8.334c-2.463 0-4.404 0-5.966.128-1.594.13-2.925.4-4.134 1.016a10.5 10.5 0 0 0-4.589 4.59c-.616 1.208-.886 2.54-1.016 4.133C4 18.429 4 20.37 4 22.833v2.334c0 2.463 0 4.404.128 5.966.13 1.594.4 2.925 1.016 4.134a10.5 10.5 0 0 0 4.59 4.589c1.208.616 2.54.886 4.133 1.016 1.562.128 3.502.128 5.966.128h8.334c2.463 0 4.404 0 5.966-.128 1.594-.13 2.925-.4 4.134-1.016a10.5 10.5 0 0 0 4.589-4.59c.616-1.208.886-2.54 1.016-4.133.128-1.562.128-3.502.128-5.966v-2.334c0-2.463 0-4.404-.128-5.966-.13-1.594-.4-2.925-1.016-4.134a10.5 10.5 0 0 0-4.59-4.589c-1.208-.616-2.54-.886-4.133-1.016C32.571 7 30.63 7 28.167 7M13.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 22m18.5 6a1.5 1.5 0 0 0 0 3h4a1.5 1.5 0 0 0 0-3zM22 22a1.5 1.5 0 0 1 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 22 22" clip-rule="evenodd"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M28.167 6.75h-8.344c-2.455 0-4.405 0-5.977.128-1.609.132-2.976.407-4.226 1.044a10.75 10.75 0 0 0-4.698 4.698c-.637 1.25-.912 2.617-1.044 4.226-.128 1.572-.128 3.522-.128 5.977v2.354c0 2.455 0 4.405.128 5.977.132 1.609.407 2.976 1.044 4.226a10.75 10.75 0 0 0 4.698 4.698c1.25.637 2.617.912 4.226 1.044 1.572.128 3.522.128 5.977.128h8.354c2.455 0 4.404 0 5.977-.128 1.609-.132 2.976-.407 4.226-1.044a10.75 10.75 0 0 0 4.698-4.698c.637-1.25.912-2.617 1.044-4.226.128-1.573.128-3.522.128-5.977v-2.354c0-2.455 0-4.405-.128-5.977-.132-1.609-.407-2.976-1.044-4.226a10.75 10.75 0 0 0-4.698-4.698c-1.25-.637-2.617-.912-4.226-1.044-1.572-.128-3.522-.128-5.977-.128zM12.25 29.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Zm0-7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Zm17 7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Zm-7-7.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Z"></path></g><defs><clipPath id="c"><path fill="var(--btn-color, #fff)" d="M0 0h48v48H0z"></path></clipPath><filter id="a" width="51" height="45" x="-1.5" y="1.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_104204"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_104204" result="shape"></feBlend></filter></defs></svg>');function Qf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Y2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"subtitles-on-icon",role:"img",...i})),_(t,o)}var Z2=ve('<svg><!><g clip-path="url(#c)" filter="url(#a)"><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.088 3.09a10.5 10.5 0 0 0-2.384 3.083c-.616 1.21-.886 2.54-1.016 4.134C4 18.429 4 20.369 4 22.833v2.334c0 2.463 0 4.404.128 5.966.13 1.594.4 2.925 1.016 4.134a10.5 10.5 0 0 0 4.59 4.589c1.208.616 2.54.886 4.133 1.016 1.562.128 3.502.128 5.966.128h8.334c2.463 0 4.404 0 5.966-.128 1.437-.117 2.66-.348 3.773-.844l3.533 3.533a1.5 1.5 0 0 0 2.122-2.122l-37-37ZM13.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" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M34.5 23.5h-4.639l12.552 12.551q.237-.381.443-.784c.616-1.21.886-2.54 1.016-4.134.128-1.562.128-3.502.128-5.966v-2.334c0-2.463 0-4.404-.128-5.966-.13-1.594-.4-2.925-1.016-4.134a10.5 10.5 0 0 0-4.59-4.589c-1.208-.616-2.54-.886-4.133-1.016C32.571 7 30.63 7 28.167 7h-8.334c-2.463 0-4.404 0-5.966.128l-.347.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M29.861 23.25h-.603l.427.427 12.55 12.551.223.223.167-.268q.243-.39.453-.803c.637-1.25.912-2.617 1.044-4.226.128-1.573.128-3.522.128-5.977v-2.354c0-2.455 0-4.405-.128-5.977-.132-1.609-.407-2.976-1.044-4.226a10.75 10.75 0 0 0-4.698-4.698c-1.25-.637-2.617-.912-4.226-1.044-1.572-.128-3.522-.128-5.977-.128h-8.354c-2.455 0-4.405 0-5.977.128q-.177.014-.35.032l-.527.051.374.374 13.341 13.342.074.073H34.5a1.25 1.25 0 1 1 0 2.5zM6.737 4.263a1.75 1.75 0 0 0-2.474 2.474l2.903 2.904a10.8 10.8 0 0 0-2.244 2.979c-.637 1.25-.912 2.617-1.044 4.226-.128 1.572-.128 3.522-.128 5.977v2.354c0 2.455 0 4.405.128 5.977.132 1.609.407 2.976 1.044 4.226a10.75 10.75 0 0 0 4.698 4.698c1.25.637 2.617.912 4.226 1.044 1.572.128 3.522.128 5.977.128h8.354c2.455 0 4.404 0 5.977-.128 1.384-.114 2.59-.333 3.696-.797l3.413 3.412a1.75 1.75 0 1 0 2.474-2.474zM12.25 29.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Zm0-7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Z"></path></g><defs><clipPath id="c"><path fill="var(--btn-color, #fff)" d="M0 0h48v48H0z"></path></clipPath><filter id="a" width="51" height="51" x="-1.5" y="-1.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_104293"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_104293" result="shape"></feBlend></filter></defs></svg>');function Gf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Z2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"subtitles-off-icon",role:"img",...i})),_(t,o)}function Zc(t,e){let i=m(e,"isOff",3,!1);var o=Be(),n=se(o);{var a=d=>{Gf(d,{})},s=d=>{Qf(d,{})};V(n,d=>{i()?d(a):d(s,!1)})}_(t,o)}var X2=ve('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M24 22.677v-5.87a1.2 1.2 0 0 0-1.792-1.045L9.51 22.955a1.2 1.2 0 0 0 0 2.088l12.697 7.192a1.2 1.2 0 0 0 1.791-1.044v-5.873l12.21 6.916A1.2 1.2 0 0 0 38 31.19V16.805a1.2 1.2 0 0 0-1.791-1.044z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M24.25 16.806v5.442l11.835-6.704a1.45 1.45 0 0 1 2.165 1.261V31.19a1.45 1.45 0 0 1-2.165 1.262L24.25 25.747v5.444a1.45 1.45 0 0 1-2.164 1.262L9.388 25.26a1.45 1.45 0 0 1 0-2.523l12.697-7.192a1.45 1.45 0 0 1 2.164 1.261Z"></path></g><defs><filter id="a" width="40.098" height="27.785" x="3.402" y="10.105" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_106627"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_106627" result="shape"></feBlend></filter></defs></svg>');function jf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=X2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"rate-change-icon",role:"img",...i})),_(t,o)}function Yf(t,e){let i=m(e,"reversed",3,!1),o=v(()=>i()?"transform: scaleX(-1);":void 0);jf(t,{get style(){return r(o)}})}var J2=ve('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M14 21.817c.631-.505 1.627-1.054 3.084-1.857l13.009-7.172c2.268-1.25 3.402-1.875 4.332-1.778a2.9 2.9 0 0 1 2.026 1.134c.549.73.549 1.991.549 4.511v14.69c0 2.52 0 3.78-.549 4.51a2.9 2.9 0 0 1-2.026 1.135c-.93.097-2.064-.528-4.332-1.778L17.084 28.04c-1.457-.803-2.453-1.352-3.084-1.857V34.5a1.5 1.5 0 0 1-3 0v-21a1.5 1.5 0 0 1 3 0z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="m16.964 19.74-.029.016c-1.162.641-2.046 1.129-2.685 1.567V13.5a1.75 1.75 0 1 0-3.5 0v21a1.75 1.75 0 1 0 3.5 0v-7.823c.639.438 1.523.926 2.685 1.567l.029.015 13.008 7.172.012.006c1.124.62 1.983 1.093 2.676 1.398.695.306 1.26.46 1.791.404a3.16 3.16 0 0 0 2.2-1.233c.317-.421.46-.976.53-1.711.069-.733.069-1.688.069-2.936V16.641c0-1.248 0-2.203-.07-2.936-.07-.735-.212-1.29-.529-1.711a3.16 3.16 0 0 0-2.2-1.233c-.53-.055-1.096.098-1.79.404-.694.305-1.553.778-2.677 1.398l-.012.006z"></path></g><defs><filter id="a" width="37" height="37" x="5.5" y="5.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2340_106922"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2340_106922" result="shape"></feBlend></filter></defs></svg>');function Zf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=J2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"episodes-seek-icon",role:"img",...i})),_(t,o)}function Xf(t,e){let i=m(e,"reversed",3,!1),o=v(()=>i()?"transform: scaleX(-1);":void 0);Zf(t,{get style(){return r(o)}})}var ey=M('<span class="hot-key-helpers-text svelte-1ad3n06"> </span>'),ty=M('<div class="svelte-1ad3n06"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),iy=M("<div><!></div>"),oy={hash:"svelte-1ad3n06",code:`.hot-key-helpers-container.svelte-1ad3n06 {position:absolute;z-index:var(--hot-key-helpers-container-z-index);top:calc(50% - 40px);left:calc(50% - 100px);width:200px;height:120px;display:flex;align-items:center;flex-direction:column;
264
+ }`};function zf(t,e){H(e,!0),z(t,G2);let[i,o]=Le(),n=()=>y(Mn,"$seekToInteractiveDisabledTooltip$",i),a=()=>y(pn,"$disabledControls$",i),s=()=>y($t,"$playbackState$",i),d=()=>y(Ko,"$adPlaybackState",i),l=()=>y(Dt,"$isEnded$",i),c=()=>y(Co,"$playerSize",i),u=()=>y(qe,"$scrubbingInProgress",i),b=()=>y(Bi,"$chromecastState$",i),p=()=>y(Ue,"$isPictureInPictureActive",i),$=()=>y(Se,"$pictureInPictureType$",i),w=()=>y(Xe,"$mobileNotReportControlHidden$",i),x=()=>y(mt,"$playerPhase",i),k=()=>y(wo,"$currentGridType$",i),C=()=>y(ft,"$isLive$",i),E=()=>y(lt,"$settingsMenuVisible",i),A=()=>y(ae,"$isRewindableLive$",i),L=()=>y(he,"$isActiveLive$",i),I=()=>y(ji,"$isInteractiveTime$",i),N=()=>y(Ot,"$isAudioAvailable$",i),W=()=>y(bn,"$settingButtonRef$",i),Q=()=>y(Wo,"$startedByKeyboard$",i),j=()=>y(zt,"$isFullscreen",i),re=()=>y(Ee,"$mobileUnmuteButtonVisible",i),ce=()=>y(K,"$muted$",i),X=()=>y(Ye,"$mobileUnmuteButtonExpanded",i),ge=()=>y(Qo,"$additionalButtons$",i),ee=()=>y(un,"$crashed$",i),Me=()=>y(Ct,"$graphIsOpened$",i),Pe=()=>y(So,"$adPosition",i),Re=()=>y(Gi,"$adDuration",i),fe=()=>y(ut,"$position$",i),Oe=()=>y(Je,"$duration$",i),ie=m(e,"playerControlsWrapperRef",15,void 0),R=m(e,"playerControlsRef",15,void 0),Ne=m(e,"isAds",3,!1),de=m(e,"logoTargetUrl",3,""),Ke=m(e,"isOneVideoPlaylist",3,!1),oe=m(e,"customFullscreenSupported",3,!0),U=be(),Y=Qi(),Ae=Rt(),We=U.actions.internal.toggleMuted,Fe=U.actions.internal.togglePlay,ye=U.actions.internal.pause,De=U.actions.internal.prevVideoClick,je=U.actions.internal.nextVideoClick,et=U.callbacks?.onAudioDoesNotExistHint,ct=U.callbacks?.onAudioDisabledHint,mt=U.playerPhase,Je=U.state.duration$,ut=U.state.positionWithScrubbing$,$t=U.state.playbackState$,Ot=U.state.isAudioAvailable$,we=U.state.isAudioDisabled,Dt=U.state.isEnded$,ft=U.state.isLive$,K=U.state.muted$,he=U.state.isActiveLive$,ae=U.state.isRewindableLive$,qe=U.ui.scrubbingInProgress,Xe=U.ui.mobileNotReportControlHidden$,{isActive$:Ue,type$:Se}=Y.pictureInPicture$,Ye=U.ui.mobileUnmuteButtonExpanded,Ee=U.ui.mobileUnmuteButtonVisible,lt=U.ui.settingsMenu.visible$,gt=U.ui.settingsMenu.openedByBtnKeyboard$,St=U.ui.controls,oi=U.actions.internal.getVideoEpisodes(),ti=U.webApi.pictureInPictureApi,Bi=U.state.chromecastState$,un=U.state.crashed$,pn=St.disabledControls$,Wo=U.ui.startedByKeyboard$,wo=U.ui.currentGridType$,Gi=U.ads.duration,So=U.ads.position,Ko=U.ads.playbackState,zt=U.ui.isFullscreen,Co=U.ui.playerSize,Qo=U.ui.additionalButtonsDeprecated$,G=U.actions.internal.getVideoElement,Wt=U.actions.internal.replayInteractive,Gt=U.state.isInteractive,ji=U.state.isInteractiveTime$,ii=U.state.showInteractiveGraph,ei=U.state.showSeekToInteractive,Si=U.state.showPlayPrevChapter,It=U.state.showInteractiveTimeIndicator,Mn=Y.seekToInteractiveDisabledTooltip$,Ct=Y.graphIsOpened$,Ft=v(()=>O(U.state.playPrevChapterDisabledTooltip)),_i=v(()=>O(n())),ko=v(()=>a().has("EPISODE_BUTTON")),fn=v(()=>a().has("GRAPH_BUTTON")),Vi=v(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),oo=v(()=>a().has("PLAY_BUTTON")),jt=v(()=>a().has("REPLAY_BUTTON")),ht=v(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),no=v(()=>s()===il.PlaybackState.PLAYING),fi=v(()=>d()==="paused"),ci=v(()=>l()&&!Ne()&&!Gt),To=v(()=>!l()||Ne()),Oi=v(()=>e.showNextPrevButtons&&!Ne()&&e.prevButtonActive),Ci=v(()=>e.showNextPrevButtons&&!Ne()&&e.nextButtonActive),mn=v(()=>c().width>300),vn=v(()=>c().width>400),bi=v(u),Go=v(()=>b()!==il.ChromecastState.NOT_AVAILABLE&&!(p()&&$()===1)&&!w()&&!Gt),ro=v(()=>x()==="LiveWaitingStart"),ao=v(()=>!!ti&&b()!==il.ChromecastState.CONNECTED&&!w()&&($()===1&&r(ro)||!r(ro))&&!r(bi)&&!Gt),_r=v(()=>!r(bi)&&Ai(k(),"s")),Zn=v(()=>!e.logoHidden&&c().width>350),gn=v(()=>Ae.features.fullscreen&&!(p()&&$()===1)&&(Gt?oe():!0)&&!r(bi)),Ln=v(()=>(!C()||Ne())&&c().width>260&&!r(bi)&&!(Ae.features.interactiveHideTime&&Gt)),Vn=v(()=>E()||e.showControls),Yi=v(()=>!Ne()&&!C()&&!!oi?.length&&r(mn)&&!r(ko)&&!r(bi)),Io=v(()=>!A()||!!L()),hn=v(()=>ii&&Ai(k(),"m")),it=le({}),Eo=(0,Yh.debounceFn)(Js,260);He(()=>{c(),I(),Eo(G(),St,it,e.showControls)});let jo=()=>U.actions.internal.toggleChromecast();function _n(){ca({isAudioDisabled:we,audioDisabledHintCallback:ct,isAudioAvailable:N(),audioIsNotExistHintCallback:et})&&We()}async function Xn(){ti?.isActive()?await ti?.remove():await ti?.request()}function Po(){!we&&N()&&Ee.set(!1),_n()}let Rn=Z(""),Yo=(Ze,Mt)=>{if(!Ze){D(Rn,le(O("tooltip_live")));return}Mt&&Mt===il.PlaybackState.PAUSED&&D(Rn,le(O("tooltip_play")))};He(()=>{Yo(r(Io),s())});let bn=ne();He(()=>{W()&&qs(W(),E(),gt)}),He(()=>{Gc(Wo,Q(),it.playButton)});var $i=Q2(),Ri=se($i);{var $n=Ze=>{var Mt=U2(),mi=se(Mt);let lo;var nt=P(mi,2);let Et;var yi=h(nt);{var ki=rt=>{let Nt=v(()=>N()&&!we&&X());Yc(rt,{get muted(){return ce()},get expanded(){return r(Nt)},click:Po,get ref(){return it.volume},set ref(vi){it.volume=vi}})};V(yi,rt=>{(!N()||re())&&rt(ki)})}g(nt);var Ti=P(nt,2);let Ii;var Ni=h(Ti);ui(Ni,1,ge,({iconUrl:rt,ariaLabel:Nt,testId:vi,onClick:co,tooltip:Vo})=>rt,(rt,Nt)=>{let vi=()=>r(Nt).iconUrl,co=()=>r(Nt).ariaLabel,Vo=()=>r(Nt).testId,Ce=()=>r(Nt).onClick,Bt=()=>r(Nt).tooltip,xi=v(()=>co()??Bt());Bf(rt,{get iconUrl(){return vi()},get ariaLabel(){return r(xi)},get testId(){return Vo()},get onClick(){return Ce()}})});var Lo=P(Ni,2);{var en=rt=>{vd(rt,{get ref(){return it.autoplayNextToggle},set ref(Nt){it.autoplayNextToggle=Nt}})};V(Lo,rt=>{e.showAutoplayNext&&!Ke()&&rt(en)})}var Zi=P(Lo,2);{var Hn=rt=>{sd(rt,{isMobile:!0,click:jo,get state(){return b()},get ref(){return it.chromecast},set ref(Nt){it.chromecast=Nt}})};V(Zi,rt=>{r(Go)&&rt(Hn)})}var ir=P(Zi,2);{var Hi=rt=>{Uf(rt,{click:Xn,get isPictureInPictureActive(){return p()},get ref(){return it.pip},set ref(Nt){it.pip=Nt}})};V(ir,rt=>{r(ao)&&rt(Hi)})}var tn=P(ir,2);{var Fn=rt=>{Ys(rt,{ref$:bn})};V(tn,rt=>{ee()&&rt(Fn)})}var or=P(tn,2);{var yr=rt=>{ad(rt,{click:ye,get targetUrl(){return de()},get logoClickable(){return e.logoClickable},get ref(){return it.vkLogo},set ref(Nt){it.vkLogo=Nt}})};V(or,rt=>{r(Zn)&&rt(yr)})}g(Ti);var wn=P(Ti,2);let on;var nr=h(wn);{var _o=rt=>{let Nt=v(()=>De.bind(null,!0));os(rt,{get click(){return r(Nt)},type:"prev",isMobile:!0,get ref(){return it.prevButton},set ref(vi){it.prevButton=vi}})};V(nr,rt=>{r(Oi)&&rt(_o)})}var xr=P(nr,2);{var bo=rt=>{tl(rt,{get disabled(){return r(oo)},click:Fe,isMobile:!0,get isPlaying(){return r(no)},get ref(){return it.playButton},set ref(Nt){it.playButton=Nt}})};V(xr,rt=>{r(To)&&rt(bo)})}var rr=P(xr,2);{var wr=rt=>{el(rt,{get disabled(){return r(jt)},click:Fe,isMobile:!0,get ref(){return it.replayButton},set ref(Nt){it.replayButton=Nt}})};V(rr,rt=>{r(ci)&&rt(wr)})}var Nr=P(rr,2);{var ar=rt=>{let Nt=v(()=>je.bind(null,!0));os(rt,{get click(){return r(Nt)},type:"next",isMobile:!0,get ref(){return it.nextButton},set ref(vi){it.nextButton=vi}})};V(Nr,rt=>{r(Ci)&&rt(ar)})}g(wn);var Di=P(wn,2);{var nn=rt=>{var Nt=F2(),vi=se(Nt);{var co=Zt=>{var Ie=B2();let Pt;Ie.__click=[N2,ht,e,Ft];var qt=h(Ie);let di=v(()=>!e.showControls);md(qt,{get hidden(){return r(di)},get disabled(){return r(ht)},get click(){return e.playPrevChapter},get ref(){return it.playPrevChapterButton},set ref(Kt){it.playPrevChapterButton=Kt}}),g(Ie),S(Kt=>Pt=J(Ie,1,"wrapper-middle-left svelte-1afsgkw",null,Pt,Kt),[()=>({fullscreen:j(),hidden:!e.showControls})]),_(Zt,Ie)};V(vi,Zt=>{Si&&Zt(co)})}var Vo=P(vi,2);{var Ce=Zt=>{var Ie=O2();let Pt;var qt=h(Ie);let di=v(()=>!e.showControls&&!Me());hd(qt,{get hidden(){return r(di)},get disabled(){return r(fn)},get click(){return Ct.toggle},get graphIsOpened(){return Me()},get ref(){return it.interactiveGraphButton},set ref(Kt){it.interactiveGraphButton=Kt}}),g(Ie),S(Kt=>Pt=J(Ie,1,Vl(Si?"wrapper-middle-left-second":"wrapper-middle-left"),"svelte-1afsgkw",Pt,Kt),[()=>({fullscreen:j(),hidden:!e.showControls&&!Me()})]),_(Zt,Ie)};V(Vo,Zt=>{r(hn)&&Zt(Ce)})}var Bt=P(Vo,2);{var xi=Zt=>{var Ie=H2();let Pt;Ie.__click=[D2,Vi,e,_i];var qt=h(Ie);let di=v(()=>!e.showControls);gd(qt,{get hidden(){return r(di)},get disabled(){return r(Vi)},get click(){return e.seekToInteractive},get ref(){return it.seekToInteractiveButton},set ref(Kt){it.seekToInteractiveButton=Kt}}),g(Ie),S(Kt=>Pt=J(Ie,1,"wrapper-middle-right svelte-1afsgkw",null,Pt,Kt),[()=>({fullscreen:j(),hidden:!e.showControls})]),_(Zt,Ie)};V(Bt,Zt=>{ei&&Zt(xi)})}_(rt,Nt)};V(Di,rt=>{Gt&&!u()&&rt(nn)})}S((rt,Nt,vi,co)=>{lo=J(mi,1,"overlay-mobile svelte-1afsgkw",null,lo,rt),Et=J(nt,1,"wrapper-top-left svelte-1afsgkw",null,Et,Nt),Ii=J(Ti,1,"wrapper-top-right svelte-1afsgkw",null,Ii,vi),on=J(wn,1,"wrapper-middle svelte-1afsgkw",null,on,co)},[()=>({hidden:!r(Vn)}),()=>({hidden:!e.showControls,fullscreen:j()}),()=>({hidden:!e.showControls&&!w(),fullscreen:j()}),()=>({hidden:!e.showControls||u()||e.endScreenShown&&e.showNextPrevButtons})]),_(Ze,Mt)};V(Ri,Ze=>{Ne()||Ze($n)})}var vo=P(Ri,2);{var yn=Ze=>{var Mt=W2(),mi=se(Mt);{var lo=Ii=>{var Ni=z2();let Lo;var en=h(Ni);Yc(en,{get muted(){return ce()},expanded:!1,click:Po,get ref(){return it.volume},set ref(Zi){it.volume=Zi}}),g(Ni),S(Zi=>Lo=J(Ni,1,"wrapper-top-right svelte-1afsgkw",null,Lo,Zi),[()=>({fullscreen:j()})]),_(Ii,Ni)};V(mi,Ii=>{re()&&Ii(lo)})}var nt=P(mi,2);{var Et=Ii=>{var Ni=q2(),Lo=h(Ni);let en=v(()=>!r(fi));tl(Lo,{get disabled(){return r(oo)},click:Fe,isMobile:!0,get isPlaying(){return r(en)},get ref(){return it.playButton},set ref(Zi){it.playButton=Zi}}),g(Ni),_(Ii,Ni)};V(nt,Ii=>{r(fi)&&Ii(Et)})}var yi=P(nt,2);let ki;var Ti=h(yi);ld(Ti,{get position(){return Pe()},get duration(){return Re()}}),g(yi),S(Ii=>ki=J(yi,1,"wrapper-bottom ads-timeline-mobile svelte-1afsgkw",null,ki,Ii),[()=>({fullscreen:j()})]),_(Ze,Mt)};V(vo,Ze=>{Ne()&&d()!=="inactive"&&Ze(yn)})}var Ao=P(vo,2);let go;var ni=h(Ao);let Nn;var so=h(ni);J(so,1,"controls svelte-1afsgkw",null,{},{mobile:!0});var Jn=h(so);{var Zo=Ze=>{fo(Ze,{get disabled(){return r(jt)},get ref(){return it.replayButton},set ref(Mt){it.replayButton=Mt},children:(Mt,mi)=>{el(Mt,{get disabled(){return r(jt)},click:Wt})},$$slots:{default:!0}})};V(Jn,Ze=>{Gt&&Ze(Zo)})}var Xo=P(Jn,2);{var er=Ze=>{fo(Ze,{get ref(){return it.liveButton},set ref(Mt){it.liveButton=Mt},children:(Mt,mi)=>{_d(Mt,{get isLiveActive(){return r(Io)},isMobile:!0,get ariaLabel(){return r(Rn)}})},$$slots:{default:!0}})};V(Xo,Ze=>{!Ne()&&C()&&Ze(er)})}var Mo=P(Xo,2);{var br=Ze=>{let Mt=v(()=>Ne()?Pe():fe()),mi=v(()=>Ne()?Re():Oe());id(Ze,{get showDuration(){return r(vn)},get position(){return r(Mt)},get duration(){return r(mi)},isMobile:!0,get ref(){return it.time},set ref(lo){it.time=lo}})};V(Mo,Ze=>{r(Ln)&&Ze(br)})}var xn=P(Mo,2);let Dn=v(()=>!r(Yi));fo(xn,{className:"w-max",get disabled(){return r(Dn)},get ref(){return it.episodes},set ref(Ze){it.episodes=Ze},children:(Ze,Mt)=>{var mi=Be(),lo=se(mi);{var nt=Et=>{var yi=K2(),ki=P(se(yi),2);dd(ki,{get position(){return fe()},get duration(){return Oe()},timeCodes:oi}),_(Et,yi)};V(lo,Et=>{r(Yi)&&Et(nt)})}_(Ze,mi)},$$slots:{default:!0}});var tr=P(xn,2);{var $r=Ze=>{fo(Ze,{get ref(){return it.settings},set ref(Mt){it.settings=Mt},children:(Mt,mi)=>{Ys(Mt,{ref$:bn})},$$slots:{default:!0}})};V(tr,Ze=>{r(_r)&&Ze($r)})}var Bn=P(tr,2);{var Jo=Ze=>{fo(Ze,{get ref(){return it.fullscreen},set ref(Mt){it.fullscreen=Mt},children:(Mt,mi)=>{rd(Mt,{get click(){return e.toggleFullscreen},get isFullscreen(){return j()}})},$$slots:{default:!0}})};V(Bn,Ze=>{r(gn)&&Ze(Jo)})}g(so),st(so,Ze=>R(Ze),()=>R());var On=P(so,2);es(On,{get isAds(){return Ne()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return A()},get ref(){return it.timeline},set ref(Ze){it.timeline=Ze}}),g(ni),g(Ao),st(Ao,Ze=>ie(Ze),()=>ie());var Yt=P(Ao,2);{var ho=Ze=>{pd(Ze,{get ref(){return it.interactiveTimeIndicator},set ref(Mt){it.interactiveTimeIndicator=Mt}})};V(Yt,Ze=>{It&&Ze(ho)})}S((Ze,Mt)=>{go=J(Ao,1,"wrapper-bottom svelte-1afsgkw",null,go,Ze),Nn=J(ni,1,"controls-wrapper svelte-1afsgkw",null,Nn,Mt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth,mobile:!0}),()=>({fullscreen:j()})]),_(t,$i),F(),o()}ot(["click"]);function $d(t,e){H(e,!0);let[i,o]=Le(),n=()=>y(C,"$isMobile",i),a=m(e,"bottomNoSmooth",3,!1),s=m(e,"playerControlsWrapperRef",15,void 0),d=m(e,"playerControlsRef",15,void 0),l=m(e,"isAds",3,!1),c=m(e,"logoTargetUrl",3,""),u=m(e,"showAutoplayNext",3,!1),b=m(e,"isOneVideoPlaylist",3,!1),p=m(e,"customFullscreenSupported",3,!0),$=m(e,"endScreenShown",3,!1),w=m(e,"onDisabledPlayPrevChapterClick",3,qf.noop),x=m(e,"onDisabledSeekToInteractiveClick",3,qf.noop),C=be().ui.isMobile,E=Z(!1);Vt(()=>{let N=setTimeout(()=>D(E,!0),0);return()=>clearTimeout(N)});var A=Be(),L=se(A);{var I=N=>{var W=Be(),Q=se(W);{var j=ce=>{zf(ce,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return l()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return c()},get showAutoplayNext(){return u()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return b()},get customFullscreenSupported(){return p()},get endScreenShown(){return $()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return w()},get onDisabledSeekToInteractiveClick(){return x()},get playerControlsWrapperRef(){return s()},set playerControlsWrapperRef(X){s(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})},re=ce=>{Nf(ce,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return l()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return c()},get isOneVideoPlaylist(){return b()},get showAutoplayNext(){return u()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return p()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return s()},set playerControlsWrapperRef(X){s(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})};V(Q,ce=>{n()?ce(j):ce(re,!1)})}_(N,W)};V(L,N=>{r(E)&&N(I)})}_(t,A),F(),o()}var j2=ve('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M15.537 10.534a1.157 1.157 0 0 0 .003 1.96l7.658 4.823c.78.491 1.798-.065 1.798-.981v-3.3c7.265.512 13 6.568 13 13.964 0 7.732-6.268 14-14 14-5.98 0-11.088-3.75-13.093-9.032a1.5 1.5 0 0 0-2.805 1.064C10.531 39.441 16.73 44 23.996 44c9.39 0 17-7.611 17-17 0-9.053-7.076-16.453-16-16.971V6.664c0-.918-1.021-1.473-1.8-.98z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M15.404 10.322a1.407 1.407 0 0 0 .003 2.384l7.657 4.823c.944.594 2.182-.076 2.182-1.193v-3.03c7.008.631 12.5 6.522 12.5 13.694 0 7.594-6.156 13.75-13.75 13.75-5.873 0-10.89-3.683-12.86-8.871a1.75 1.75 0 1 0-3.272 1.242c2.469 6.503 8.758 11.129 16.132 11.129 9.527 0 17.25-7.723 17.25-17.25 0-9.107-7.056-16.565-16-17.205V6.664c0-1.118-1.241-1.788-2.184-1.19z"></path></g><defs><filter id="a" width="43.996" height="49.5" x="2.5" y="0" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_100684"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_100684" result="shape"></feBlend></filter></defs></svg>');function Wf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=j2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"51",fill:"none","aria-hidden":"true","data-testid":"seek-icon",role:"img",...i})),_(t,o)}function Kf(t,e){let i=m(e,"reversed",3,!1),o=v(()=>i()?"transform: scaleX(-1);":void 0);Wf(t,{get style(){return r(o)}})}var Y2=ve('<svg><!><g clip-path="url(#c)" filter="url(#a)"><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M28.167 7h-8.334c-2.463 0-4.404 0-5.966.128-1.594.13-2.925.4-4.134 1.016a10.5 10.5 0 0 0-4.589 4.59c-.616 1.208-.886 2.54-1.016 4.133C4 18.429 4 20.37 4 22.833v2.334c0 2.463 0 4.404.128 5.966.13 1.594.4 2.925 1.016 4.134a10.5 10.5 0 0 0 4.59 4.589c1.208.616 2.54.886 4.133 1.016 1.562.128 3.502.128 5.966.128h8.334c2.463 0 4.404 0 5.966-.128 1.594-.13 2.925-.4 4.134-1.016a10.5 10.5 0 0 0 4.589-4.59c.616-1.208.886-2.54 1.016-4.133.128-1.562.128-3.502.128-5.966v-2.334c0-2.463 0-4.404-.128-5.966-.13-1.594-.4-2.925-1.016-4.134a10.5 10.5 0 0 0-4.59-4.589c-1.208-.616-2.54-.886-4.133-1.016C32.571 7 30.63 7 28.167 7M13.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 22m18.5 6a1.5 1.5 0 0 0 0 3h4a1.5 1.5 0 0 0 0-3zM22 22a1.5 1.5 0 0 1 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 22 22" clip-rule="evenodd"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M28.167 6.75h-8.344c-2.455 0-4.405 0-5.977.128-1.609.132-2.976.407-4.226 1.044a10.75 10.75 0 0 0-4.698 4.698c-.637 1.25-.912 2.617-1.044 4.226-.128 1.572-.128 3.522-.128 5.977v2.354c0 2.455 0 4.405.128 5.977.132 1.609.407 2.976 1.044 4.226a10.75 10.75 0 0 0 4.698 4.698c1.25.637 2.617.912 4.226 1.044 1.572.128 3.522.128 5.977.128h8.354c2.455 0 4.404 0 5.977-.128 1.609-.132 2.976-.407 4.226-1.044a10.75 10.75 0 0 0 4.698-4.698c.637-1.25.912-2.617 1.044-4.226.128-1.573.128-3.522.128-5.977v-2.354c0-2.455 0-4.405-.128-5.977-.132-1.609-.407-2.976-1.044-4.226a10.75 10.75 0 0 0-4.698-4.698c-1.25-.637-2.617-.912-4.226-1.044-1.572-.128-3.522-.128-5.977-.128zM12.25 29.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Zm0-7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Zm17 7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Zm-7-7.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Z"></path></g><defs><clipPath id="c"><path fill="var(--btn-color, #fff)" d="M0 0h48v48H0z"></path></clipPath><filter id="a" width="51" height="45" x="-1.5" y="1.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_104204"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_104204" result="shape"></feBlend></filter></defs></svg>');function Qf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Y2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"subtitles-on-icon",role:"img",...i})),_(t,o)}var Z2=ve('<svg><!><g clip-path="url(#c)" filter="url(#a)"><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.088 3.09a10.5 10.5 0 0 0-2.384 3.083c-.616 1.21-.886 2.54-1.016 4.134C4 18.429 4 20.369 4 22.833v2.334c0 2.463 0 4.404.128 5.966.13 1.594.4 2.925 1.016 4.134a10.5 10.5 0 0 0 4.59 4.589c1.208.616 2.54.886 4.133 1.016 1.562.128 3.502.128 5.966.128h8.334c2.463 0 4.404 0 5.966-.128 1.437-.117 2.66-.348 3.773-.844l3.533 3.533a1.5 1.5 0 0 0 2.122-2.122l-37-37ZM13.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" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M34.5 23.5h-4.639l12.552 12.551q.237-.381.443-.784c.616-1.21.886-2.54 1.016-4.134.128-1.562.128-3.502.128-5.966v-2.334c0-2.463 0-4.404-.128-5.966-.13-1.594-.4-2.925-1.016-4.134a10.5 10.5 0 0 0-4.59-4.589c-1.208-.616-2.54-.886-4.133-1.016C32.571 7 30.63 7 28.167 7h-8.334c-2.463 0-4.404 0-5.966.128l-.347.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M29.861 23.25h-.603l.427.427 12.55 12.551.223.223.167-.268q.243-.39.453-.803c.637-1.25.912-2.617 1.044-4.226.128-1.573.128-3.522.128-5.977v-2.354c0-2.455 0-4.405-.128-5.977-.132-1.609-.407-2.976-1.044-4.226a10.75 10.75 0 0 0-4.698-4.698c-1.25-.637-2.617-.912-4.226-1.044-1.572-.128-3.522-.128-5.977-.128h-8.354c-2.455 0-4.405 0-5.977.128q-.177.014-.35.032l-.527.051.374.374 13.341 13.342.074.073H34.5a1.25 1.25 0 1 1 0 2.5zM6.737 4.263a1.75 1.75 0 0 0-2.474 2.474l2.903 2.904a10.8 10.8 0 0 0-2.244 2.979c-.637 1.25-.912 2.617-1.044 4.226-.128 1.572-.128 3.522-.128 5.977v2.354c0 2.455 0 4.405.128 5.977.132 1.609.407 2.976 1.044 4.226a10.75 10.75 0 0 0 4.698 4.698c1.25.637 2.617.912 4.226 1.044 1.572.128 3.522.128 5.977.128h8.354c2.455 0 4.404 0 5.977-.128 1.384-.114 2.59-.333 3.696-.797l3.413 3.412a1.75 1.75 0 1 0 2.474-2.474zM12.25 29.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Zm0-7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Z"></path></g><defs><clipPath id="c"><path fill="var(--btn-color, #fff)" d="M0 0h48v48H0z"></path></clipPath><filter id="a" width="51" height="51" x="-1.5" y="-1.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_104293"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_104293" result="shape"></feBlend></filter></defs></svg>');function Gf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=Z2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"subtitles-off-icon",role:"img",...i})),_(t,o)}function Zc(t,e){let i=m(e,"isOff",3,!1);var o=Be(),n=se(o);{var a=d=>{Gf(d,{})},s=d=>{Qf(d,{})};V(n,d=>{i()?d(a):d(s,!1)})}_(t,o)}var X2=ve('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M24 22.677v-5.87a1.2 1.2 0 0 0-1.792-1.045L9.51 22.955a1.2 1.2 0 0 0 0 2.088l12.697 7.192a1.2 1.2 0 0 0 1.791-1.044v-5.873l12.21 6.916A1.2 1.2 0 0 0 38 31.19V16.805a1.2 1.2 0 0 0-1.791-1.044z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M24.25 16.806v5.442l11.835-6.704a1.45 1.45 0 0 1 2.165 1.261V31.19a1.45 1.45 0 0 1-2.165 1.262L24.25 25.747v5.444a1.45 1.45 0 0 1-2.164 1.262L9.388 25.26a1.45 1.45 0 0 1 0-2.523l12.697-7.192a1.45 1.45 0 0 1 2.164 1.261Z"></path></g><defs><filter id="a" width="40.098" height="27.785" x="3.402" y="10.105" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_106627"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_106627" result="shape"></feBlend></filter></defs></svg>');function jf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=X2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"rate-change-icon",role:"img",...i})),_(t,o)}function Yf(t,e){let i=m(e,"reversed",3,!1),o=v(()=>i()?"transform: scaleX(-1);":void 0);jf(t,{get style(){return r(o)}})}var J2=ve('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M14 21.817c.631-.505 1.627-1.054 3.084-1.857l13.009-7.172c2.268-1.25 3.402-1.875 4.332-1.778a2.9 2.9 0 0 1 2.026 1.134c.549.73.549 1.991.549 4.511v14.69c0 2.52 0 3.78-.549 4.51a2.9 2.9 0 0 1-2.026 1.135c-.93.097-2.064-.528-4.332-1.778L17.084 28.04c-1.457-.803-2.453-1.352-3.084-1.857V34.5a1.5 1.5 0 0 1-3 0v-21a1.5 1.5 0 0 1 3 0z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="m16.964 19.74-.029.016c-1.162.641-2.046 1.129-2.685 1.567V13.5a1.75 1.75 0 1 0-3.5 0v21a1.75 1.75 0 1 0 3.5 0v-7.823c.639.438 1.523.926 2.685 1.567l.029.015 13.008 7.172.012.006c1.124.62 1.983 1.093 2.676 1.398.695.306 1.26.46 1.791.404a3.16 3.16 0 0 0 2.2-1.233c.317-.421.46-.976.53-1.711.069-.733.069-1.688.069-2.936V16.641c0-1.248 0-2.203-.07-2.936-.07-.735-.212-1.29-.529-1.711a3.16 3.16 0 0 0-2.2-1.233c-.53-.055-1.096.098-1.79.404-.694.305-1.553.778-2.677 1.398l-.012.006z"></path></g><defs><filter id="a" width="37" height="37" x="5.5" y="5.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2340_106922"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2340_106922" result="shape"></feBlend></filter></defs></svg>');function Zf(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=J2();let n;var a=h(o);pe(a,()=>e.children??te),me(2),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"episodes-seek-icon",role:"img",...i})),_(t,o)}function Xf(t,e){let i=m(e,"reversed",3,!1),o=v(()=>i()?"transform: scaleX(-1);":void 0);Zf(t,{get style(){return r(o)}})}var ey=M('<span class="hot-key-helpers-text svelte-1ad3n06"> </span>'),ty=M('<div class="svelte-1ad3n06"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),iy=M("<div><!></div>"),oy={hash:"svelte-1ad3n06",code:`.hot-key-helpers-container.svelte-1ad3n06 {position:absolute;z-index:var(--hot-key-helpers-container-z-index);top:calc(50% - 40px);left:calc(50% - 100px);width:200px;height:120px;display:flex;align-items:center;flex-direction:column;
265
265
  animation: svelte-1ad3n06-fadeIn ease var(--controls-transition-duration);padding-top:14px;box-sizing:border-box;}.hot-key-helpers-container.svelte-1ad3n06 > div:where(.svelte-1ad3n06) {width:48px;height:48px;display:flex;justify-content:center;align-items:center;}.hot-key-helpers-container.svelte-1ad3n06 svg[data-testid="volume-off-icon"],
266
266
  .hot-key-helpers-container.svelte-1ad3n06 svg[data-testid="volume-max-icon"] {transform:scale(2);}.hot-key-helpers-container.svelte-1ad3n06 svg[data-testid="replay-icon"],
267
267
  .hot-key-helpers-container.svelte-1ad3n06 svg[data-testid="play-icon"],
@@ -276,10 +276,10 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
276
276
  @keyframes svelte-1ad3n06-fadeOut {
277
277
  0% {opacity:1;}
278
278
  100% {opacity:0;}
279
- }`};function Jf(t,e){H(e,!0),z(t,oy);let[i,o]=Le(),n=()=>y(e.data,"$data",i),s=be().ui.t,d=v(()=>!n()),l=v(()=>n()?.type==="BACKWARD_SEEK"),c=v(()=>n()?.type==="FORWARD_SEEK"),u=v(()=>n()?.type),b=v(()=>n()?.t?s(n().t.key,{value:n().t.value||""}):n()?.text);var p=iy();let $;var w=h(p);{var x=k=>{var C=ty(),E=se(C),A=h(E);{var L=oe=>{let U=v(()=>r(u)==="FORWARD_SEEK");Kf(oe,{get reversed(){return r(U)}})};V(A,oe=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(r(u))&&oe(L)})}var I=P(A,2);{var N=oe=>{Yr(oe,{})};V(I,oe=>{r(u)==="PAUSE"&&oe(N)})}var W=P(I,2);{var Q=oe=>{gr(oe,{})};V(W,oe=>{r(u)==="PLAY"&&oe(Q)})}var j=P(W,2);{var re=oe=>{fd(oe,{})};V(j,oe=>{r(u)==="REPLAY"&&oe(re)})}var ce=P(j,2);{var X=oe=>{Zc(oe,{isOff:!0})};V(ce,oe=>{r(u)==="SUBTITLES_OFF"&&oe(X)})}var ge=P(ce,2);{var ee=oe=>{Zc(oe,{})};V(ge,oe=>{r(u)==="SUBTITLES_ON"&&oe(ee)})}var Me=P(ge,2);{var Pe=oe=>{let U=v(()=>r(u)==="RATE_UP");Yf(oe,{get reversed(){return r(U)}})};V(Me,oe=>{["RATE_DOWN","RATE_UP"].includes(r(u))&&oe(Pe)})}var Ve=P(Me,2);{var fe=oe=>{let U=v(()=>r(u)==="EPISODE_NEXT");Xf(oe,{get reversed(){return r(U)}})};V(Ve,oe=>{["EPISODE_PREV","EPISODE_NEXT"].includes(r(u))&&oe(fe)})}var Oe=P(Ve,2);{var ie=oe=>{pa(oe,{volume:0})};V(Oe,oe=>{r(u)==="MUTE"&&oe(ie)})}var R=P(Oe,2);{var Re=oe=>{pa(oe,{volume:1})};V(R,oe=>{r(u)==="VOLUME"&&oe(Re)})}g(E);var de=P(E,2);{var Ke=oe=>{var U=ey(),Y=h(U,!0);g(U),S(()=>ue(Y,r(b))),_(oe,U)};V(de,oe=>{r(b)&&oe(Ke)})}_(k,C)};V(w,k=>{!r(d)&&r(u)&&k(x)})}g(p),S(k=>$=J(p,1,"hot-key-helpers-container svelte-1ad3n06",null,$,k),[()=>({hidden:r(d),"hot-key-helpers-container--left":r(l),"hot-key-helpers-container--right":r(c)})]),_(t,p),F(),o()}var ny=ve('<svg><!><path fill="currentColor" fill-opacity=".72" fill-rule="evenodd" d="M11.736 6.736a.9.9 0 0 1-1.272 0L6 2.273 1.536 6.736A.9.9 0 1 1 .264 5.464l5.1-5.1a.9.9 0 0 1 1.272 0l5.1 5.1a.9.9 0 0 1 0 1.272" clip-rule="evenodd"></path></svg>');function em(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=ny();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"7",fill:"none","aria-hidden":"true",color:"#fff",role:"img",...i})),_(t,o)}var ry=ve('<svg><!><path fill="currentColor" 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.272z"></path></svg>');function tm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=ry();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",fill:"none","aria-hidden":"true",color:"#fff",role:"img",...i})),_(t,o)}function va(t,e){H(e,!0);let i=m(e,"direction",3,"left"),o=m(e,"useBtnColor",3,!1),n=v(()=>["up","down"].includes(i())),a=v(()=>["right","down"].includes(i())),s=v(()=>(()=>{let b="";return r(a)&&(b+="transform: rotate(180deg);"),o()&&(b+="color: var(--btn-color, #fff);"),b.length?b:void 0})());var d=Be(),l=se(d);{var c=b=>{let p=v(()=>r(a)?"chevron-icon--down":"chevron-icon--up");em(b,{get style(){return r(s)},get"data-testid"(){return r(p)}})},u=b=>{let p=v(()=>r(a)?"chevron-icon--right":"chevron-icon--left");tm(b,{get style(){return r(s)},get"data-testid"(){return r(p)}})};V(l,b=>{r(n)?b(c):b(u,!1)})}_(t,d),F()}var ay=(t,e,i,o,n,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":n();break;case"ArrowRight":a();break}},sy=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},ly=M('<div tabindex="0" role="button"><div class="button-block svelte-1yzc86r" aria-hidden="true"><div class="button-row svelte-1yzc86r"><div class="button button-up svelte-1yzc86r"><!></div> <div class="button button-right svelte-1yzc86r"><!></div></div> <div class="button-row svelte-1yzc86r"><div class="button button-left svelte-1yzc86r"><!></div> <div class="button button-down svelte-1yzc86r"><!></div></div></div></div>'),dy={hash:"svelte-1yzc86r",code:".immersive-controls.svelte-1yzc86r {position:absolute;display:flex;flex-direction:row;top:10px;left:10px;width:56px;height:56px;background-color:rgba(0, 0, 0, .56);border-radius:8px;transition-property:top, left;transition-duration:var(--controls-transition-duration);transition-timing-function:var(--controls-transition-fn);}.immersive-controls.m-shifted.svelte-1yzc86r {top:50px;left:20px;}.button-block.svelte-1yzc86r {width:40px;height:40px;margin:auto auto;transform:rotate(45deg);}.button-row.svelte-1yzc86r {display:flex;flex-direction:row;position:relative;}.button.svelte-1yzc86r {width:20px;height:20px;text-align:center;cursor:pointer;}.button.svelte-1yzc86r svg {opacity:0.7;transition:opacity linear 0.2s;}.button.button-up.svelte-1yzc86r svg {transform:rotate(-45deg) translate(-1px, -1px);}.button.button-right.svelte-1yzc86r svg {transform:rotate(45deg) translate(1px, -1px);}.button.button-down.svelte-1yzc86r svg {transform:rotate(135deg) translate(1px, -3px);}.button.button-left.svelte-1yzc86r svg {transform:rotate(-135deg) translate(-1px, -3px);}.button.svelte-1yzc86r:hover svg {opacity:1;}"};function yd(t,e){H(e,!0),z(t,dy);let i=m(e,"isShifted",3,!1),o=be(),n=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},s=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},l=()=>{o.actions.internal.startCameraManualRotation(-1,0)},c=()=>(o.actions.internal.stopCameraManualRotation(),null),u=O("aria_label_spherical_control");var b=ly();let p;b.__keydown=[ay,n,a,s,l,d],b.__keyup=[sy,n,c],De(b,"aria-label",u);var $=h(b),w=h($),x=h(w);x.__mousedown=a,x.__mouseup=c;var k=h(x);va(k,{direction:"up",useBtnColor:!0}),g(x);var C=P(x,2);C.__mousedown=d,C.__mouseup=c;var E=h(C);va(E,{direction:"up",useBtnColor:!0}),g(C),g(w);var A=P(w,2),L=h(A);L.__mousedown=l,L.__mouseup=c;var I=h(L);va(I,{direction:"up",useBtnColor:!0}),g(L);var N=P(L,2);N.__mousedown=s,N.__mouseup=c;var W=h(N);va(W,{direction:"up",useBtnColor:!0}),g(N),g(A),g($),g(b),S(Q=>p=J(b,1,"immersive-controls svelte-1yzc86r",null,p,Q),[()=>({"m-shifted":i()})]),_t("mouseleave",x,c),_t("mouseleave",C,c),_t("mouseleave",L,c),_t("mouseleave",N,c),_(t,b),F()}ot(["keydown","keyup","mousedown","mouseup"]);var Xr=require("@vkontakte/videoplayer-shared");var Zh=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var Xc=class{constructor(){this.flickeringTimeout=Zh(1e3);this.subscriptions=new Xr.Subscription;this.isAuto=!1;this.isLive=!1;this.captions$=new Xr.ValueSubject([]);this.captionsPrepared$=new Xr.ValueSubject([])}subscribe(){return this.subscriptions.add(this.captions$.pipe((0,Xr.filter)(()=>this.isEnabled()),(0,Xr.filterChanged)()).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((n,{type:a,value:s},d)=>(o&&!d||(a==="timestamp"?n.push({timeAppeared:Number(s),value:""}):n.length===0?n.push({value:String(s)}):n[n.length-1].value=String(s)),n),[])),this.captionsPrepared$.next(i)}};var cy=M('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"> </span></span>'),uy=M('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"></span></span>'),py=M('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"> </span></span>'),fy=M('<div><span class="caption svelte-c2x749"><!></span></div>'),my=M("<div><!></div>"),vy={hash:"svelte-c2x749",code:`.subtitles-container.svelte-c2x749 {position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;transition:transform var(--controls-transition-duration);}.subtitles-container.shifted.svelte-c2x749 {transform:translateY(calc(var(--controls-height) * -1));}.subtitles-caption.svelte-c2x749 {position:absolute;left:4%;right:4%;bottom:4%;display:flex;justify-content:center;}.subtitles-caption.mobile.svelte-c2x749 {bottom:8%;}.subtitles-container.auto.svelte-c2x749 .subtitles-caption:where(.svelte-c2x749) {left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin);}.caption.svelte-c2x749 {display:block;overflow-wrap:normal;padding:4px 8px;border-radius:4px;background:rgba(0, 0, 0, 0.4);}.subtitles-container.auto.svelte-c2x749 .caption:where(.svelte-c2x749) {width:100%;}.caption-line.svelte-c2x749 {display:block;text-align:center;}.subtitles-container.auto.svelte-c2x749 .caption-line:where(.svelte-c2x749) {text-align:left;}.caption-segment.svelte-c2x749 {display:inline-block;line-height:1.2;font-size:13px;
280
- /*font-weight: 500;*/color:var(--white);white-space:pre-wrap;}`};function as(t,e){H(e,!0),z(t,vy);let[i,o]=Le(),n=()=>y(b,"$currentSubtitle$",i),a=()=>y($,"$isLive$",i),s=()=>y(w,"$isFullscreen",i),d=()=>y(p,"$isAutoSubtitleCaptionVisible$",i),l=m(e,"isMobile",3,!1),c=be(),u=Rt(),b=c.state.currentSubtitle$,p=c.state.isAutoSubtitleCaptionVisible$,$=c.state.isLive$,w=c.ui.isFullscreen,x=v(()=>!!n().isAuto),k=v(()=>!!a()),C=v(()=>e.playerSize.width*.02),E=v(()=>l()&&!s()||r(C)<=u.minSubtitlesFontSize?u.minSubtitlesFontSize:r(C)),A=Z(null);He(()=>{r(A)?.setIsAuto(r(x)),r(A)?.setIsLive(r(k)),r(A)?.setCaptions(e.captions)});let L=Z(le([[]]));Vt(()=>{D(A,le(new Xc().subscribe()));let re=r(A).captionsPrepared$.subscribe(ce=>{D(L,le(ce))});return()=>{r(A)?.destroy(),re.unsubscribe()}}),Vt(()=>{if(r(x)){let re=window.setTimeout(()=>{p.set(!1)},u.autoSubtitlesTimeout);return()=>{window.clearTimeout(re)}}else p.set(!1)});let I=v(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var N=my();let W;var Q=h(N);{var j=re=>{var ce=fy();let X;var ge=h(ce),ee=h(ge);{var Me=Ve=>{var fe=cy(),Oe=h(fe),ie=h(Oe,!0);g(Oe),g(fe),S(R=>{tt(Oe,`font-size: ${r(E)??""}px`),ue(ie,R)},[()=>O("subtitles_auto_caption")]),_(Ve,fe)},Pe=(Ve,fe)=>{{var Oe=R=>{var Re=Be(),de=se(Re);ui(de,17,()=>r(L),Ml,(Ke,oe)=>{var U=uy(),Y=h(U);ui(Y,21,()=>r(oe),({value:Ae,timeAppeared:We})=>We,(Ae,We)=>{let Fe=()=>r(We).value,ye=()=>r(We).timeAppeared;var Ne=Be(),je=se(Ne);{var et=ct=>{var mt=Pr();S(()=>ue(mt,Fe())),_(ct,mt)};V(je,ct=>{(!ye()||ye()<=e.position)&&ct(et)})}_(Ae,Ne)}),g(Y),g(U),S(()=>tt(Y,`font-size: ${r(E)??""}px`)),_(Ke,U)}),_(R,Re)},ie=R=>{var Re=Be(),de=se(Re);ui(de,17,()=>e.captions,({value:Ke})=>Ke,(Ke,oe)=>{let U=()=>r(oe).value;var Y=py(),Ae=h(Y),We=h(Ae,!0);g(Ae),g(Y),S(()=>{tt(Ae,`font-size: ${r(E)??""}px`),ue(We,U())}),_(Ke,Y)}),_(R,Re)};V(Ve,R=>{r(x)&&r(L)?.length?R(Oe):R(ie,!1)},fe)}};V(ee,Ve=>{r(x)&&d()?Ve(Me):Ve(Pe,!1)})}g(ge),g(ce),S(Ve=>{X=J(ce,1,"subtitles-caption svelte-c2x749",null,X,Ve),tt(ce,`--subtitles-caption-margin: ${r(I)??""}%`)},[()=>({mobile:l()})]),_(re,ce)};V(Q,re=>{(e.captions.length||r(L)?.length)&&re(j)})}g(N),S(re=>W=J(N,1,"subtitles-container svelte-c2x749",null,W,re),[()=>({shifted:e.shifted,auto:r(x)&&!r(k)&&!d()})]),_(t,N),F(),o()}var gy=M('<div class="text svelte-raurnb"> </div>'),hy=M('<div><div class="icon_wrapper svelte-raurnb"><svg class="icon svelte-raurnb" width="22" height="22" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" fill="var(--btn-color, #fff)"></path><path d="M0 0h24v24H0z"></path></g></svg></div> <!></div>'),_y={hash:"svelte-raurnb",code:".wrapper.svelte-raurnb {height:100%;background-position:center;background-size:contain;background-repeat:no-repeat;display:flex;align-items:center;justify-content:center;font-size:16px;flex-direction:column;}.wrapper.bgCover.svelte-raurnb {background-size:cover;}.icon_wrapper.svelte-raurnb {display:flex;flex-direction:column;align-items:center;width:400px;}.icon.svelte-raurnb {width:50px;height:50px;}.text.svelte-raurnb {margin-top:20px;}"};function xd(t,e){H(e,!0),z(t,_y);let i=Rt();var o=hy();let n;var a=P(h(o),2);{var s=d=>{var l=gy(),c=h(l);g(l),S(()=>ue(c,`\u0412\u0438\u0434\u0435\u043E \u0432\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0441\u044F \u043D\u0430 ${e.chromecastDeviceName??""}`)),_(d,l)};V(a,d=>{e.chromecastDeviceName&&d(s)})}g(o),S(d=>{n=J(o,1,"wrapper svelte-raurnb",null,n,d),tt(o,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:i.features.previewNoEmptySpace})]),_(t,o),F()}var by=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M460 193.998a3.997 3.997 0 0 1 3.997-3.998h122.006a4.003 4.003 0 0 1 3.997 3.998v82.004a3.997 3.997 0 0 1-3.997 3.998H463.997a4.003 4.003 0 0 1-3.997-3.998zm6 2.993c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm112-72c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zM507 232a6 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.624 4.446 11.944 4.65 2.106 1.35 3.252.772 3.957.156s1.15-2.806-1.044-4.657c-1.735-1.48-5.806-5.16-14.856-5.15s-12.95 3.5-14.792 5.185c-1.84 1.685-2.288 3.498-.973 4.657s2.315 1.158 4.357-.327c-.007.007 5.357-4.515 11.408-4.515z"></path></svg>');function im(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=by();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200","aria-hidden":"true","data-testid":"error-icon",viewBox:"460 190 130 90",role:"img",...i})),_(t,o)}var $y=M('<div class="container svelte-13zpvm8"><!></div>'),yy={hash:"svelte-13zpvm8",code:".container.svelte-13zpvm8 {position:absolute;top:0;bottom:0;left:0;right:0;background:#000;display:flex;align-items:center;justify-content:center;}"};function wd(t){z(t,yy);var e=$y(),i=h(e);im(i,{}),g(e),_(t,e)}var xy=M('<div class="playButton svelte-1ciju45" tabindex="0" role="button"><div class="playButtonBackground svelte-1ciju45"></div> <!></div>'),wy=M("<div><!></div>"),Sy={hash:"svelte-1ciju45",code:`.container.svelte-1ciju45 {position:absolute;top:0;bottom:0;left:0;right:0;background-position:center;background-size:contain;background-repeat:no-repeat;cursor:pointer;transition:opacity 0.2s,
279
+ }`};function Jf(t,e){H(e,!0),z(t,oy);let[i,o]=Le(),n=()=>y(e.data,"$data",i),s=be().ui.t,d=v(()=>!n()),l=v(()=>n()?.type==="BACKWARD_SEEK"),c=v(()=>n()?.type==="FORWARD_SEEK"),u=v(()=>n()?.type),b=v(()=>n()?.t?s(n().t.key,{value:n().t.value||""}):n()?.text);var p=iy();let $;var w=h(p);{var x=k=>{var C=ty(),E=se(C),A=h(E);{var L=oe=>{let U=v(()=>r(u)==="FORWARD_SEEK");Kf(oe,{get reversed(){return r(U)}})};V(A,oe=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(r(u))&&oe(L)})}var I=P(A,2);{var N=oe=>{Yr(oe,{})};V(I,oe=>{r(u)==="PAUSE"&&oe(N)})}var W=P(I,2);{var Q=oe=>{gr(oe,{})};V(W,oe=>{r(u)==="PLAY"&&oe(Q)})}var j=P(W,2);{var re=oe=>{fd(oe,{})};V(j,oe=>{r(u)==="REPLAY"&&oe(re)})}var ce=P(j,2);{var X=oe=>{Zc(oe,{isOff:!0})};V(ce,oe=>{r(u)==="SUBTITLES_OFF"&&oe(X)})}var ge=P(ce,2);{var ee=oe=>{Zc(oe,{})};V(ge,oe=>{r(u)==="SUBTITLES_ON"&&oe(ee)})}var Me=P(ge,2);{var Pe=oe=>{let U=v(()=>r(u)==="RATE_UP");Yf(oe,{get reversed(){return r(U)}})};V(Me,oe=>{["RATE_DOWN","RATE_UP"].includes(r(u))&&oe(Pe)})}var Re=P(Me,2);{var fe=oe=>{let U=v(()=>r(u)==="EPISODE_NEXT");Xf(oe,{get reversed(){return r(U)}})};V(Re,oe=>{["EPISODE_PREV","EPISODE_NEXT"].includes(r(u))&&oe(fe)})}var Oe=P(Re,2);{var ie=oe=>{pa(oe,{volume:0})};V(Oe,oe=>{r(u)==="MUTE"&&oe(ie)})}var R=P(Oe,2);{var Ne=oe=>{pa(oe,{volume:1})};V(R,oe=>{r(u)==="VOLUME"&&oe(Ne)})}g(E);var de=P(E,2);{var Ke=oe=>{var U=ey(),Y=h(U,!0);g(U),S(()=>ue(Y,r(b))),_(oe,U)};V(de,oe=>{r(b)&&oe(Ke)})}_(k,C)};V(w,k=>{!r(d)&&r(u)&&k(x)})}g(p),S(k=>$=J(p,1,"hot-key-helpers-container svelte-1ad3n06",null,$,k),[()=>({hidden:r(d),"hot-key-helpers-container--left":r(l),"hot-key-helpers-container--right":r(c)})]),_(t,p),F(),o()}var ny=ve('<svg><!><path fill="currentColor" fill-opacity=".72" fill-rule="evenodd" d="M11.736 6.736a.9.9 0 0 1-1.272 0L6 2.273 1.536 6.736A.9.9 0 1 1 .264 5.464l5.1-5.1a.9.9 0 0 1 1.272 0l5.1 5.1a.9.9 0 0 1 0 1.272" clip-rule="evenodd"></path></svg>');function em(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=ny();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"7",fill:"none","aria-hidden":"true",color:"#fff",role:"img",...i})),_(t,o)}var ry=ve('<svg><!><path fill="currentColor" 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.272z"></path></svg>');function tm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=ry();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",fill:"none","aria-hidden":"true",color:"#fff",role:"img",...i})),_(t,o)}function va(t,e){H(e,!0);let i=m(e,"direction",3,"left"),o=m(e,"useBtnColor",3,!1),n=v(()=>["up","down"].includes(i())),a=v(()=>["right","down"].includes(i())),s=v(()=>(()=>{let b="";return r(a)&&(b+="transform: rotate(180deg);"),o()&&(b+="color: var(--btn-color, #fff);"),b.length?b:void 0})());var d=Be(),l=se(d);{var c=b=>{let p=v(()=>r(a)?"chevron-icon--down":"chevron-icon--up");em(b,{get style(){return r(s)},get"data-testid"(){return r(p)}})},u=b=>{let p=v(()=>r(a)?"chevron-icon--right":"chevron-icon--left");tm(b,{get style(){return r(s)},get"data-testid"(){return r(p)}})};V(l,b=>{r(n)?b(c):b(u,!1)})}_(t,d),F()}var ay=(t,e,i,o,n,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":n();break;case"ArrowRight":a();break}},sy=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},ly=M('<div tabindex="0" role="button"><div class="button-block svelte-1yzc86r" aria-hidden="true"><div class="button-row svelte-1yzc86r"><div class="button button-up svelte-1yzc86r"><!></div> <div class="button button-right svelte-1yzc86r"><!></div></div> <div class="button-row svelte-1yzc86r"><div class="button button-left svelte-1yzc86r"><!></div> <div class="button button-down svelte-1yzc86r"><!></div></div></div></div>'),dy={hash:"svelte-1yzc86r",code:".immersive-controls.svelte-1yzc86r {position:absolute;display:flex;flex-direction:row;top:10px;left:10px;width:56px;height:56px;background-color:rgba(0, 0, 0, .56);border-radius:8px;transition-property:top, left;transition-duration:var(--controls-transition-duration);transition-timing-function:var(--controls-transition-fn);}.immersive-controls.m-shifted.svelte-1yzc86r {top:50px;left:20px;}.button-block.svelte-1yzc86r {width:40px;height:40px;margin:auto auto;transform:rotate(45deg);}.button-row.svelte-1yzc86r {display:flex;flex-direction:row;position:relative;}.button.svelte-1yzc86r {width:20px;height:20px;text-align:center;cursor:pointer;}.button.svelte-1yzc86r svg {opacity:0.7;transition:opacity linear 0.2s;}.button.button-up.svelte-1yzc86r svg {transform:rotate(-45deg) translate(-1px, -1px);}.button.button-right.svelte-1yzc86r svg {transform:rotate(45deg) translate(1px, -1px);}.button.button-down.svelte-1yzc86r svg {transform:rotate(135deg) translate(1px, -3px);}.button.button-left.svelte-1yzc86r svg {transform:rotate(-135deg) translate(-1px, -3px);}.button.svelte-1yzc86r:hover svg {opacity:1;}"};function yd(t,e){H(e,!0),z(t,dy);let i=m(e,"isShifted",3,!1),o=be(),n=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},s=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},l=()=>{o.actions.internal.startCameraManualRotation(-1,0)},c=()=>(o.actions.internal.stopCameraManualRotation(),null),u=O("aria_label_spherical_control");var b=ly();let p;b.__keydown=[ay,n,a,s,l,d],b.__keyup=[sy,n,c],Ve(b,"aria-label",u);var $=h(b),w=h($),x=h(w);x.__mousedown=a,x.__mouseup=c;var k=h(x);va(k,{direction:"up",useBtnColor:!0}),g(x);var C=P(x,2);C.__mousedown=d,C.__mouseup=c;var E=h(C);va(E,{direction:"up",useBtnColor:!0}),g(C),g(w);var A=P(w,2),L=h(A);L.__mousedown=l,L.__mouseup=c;var I=h(L);va(I,{direction:"up",useBtnColor:!0}),g(L);var N=P(L,2);N.__mousedown=s,N.__mouseup=c;var W=h(N);va(W,{direction:"up",useBtnColor:!0}),g(N),g(A),g($),g(b),S(Q=>p=J(b,1,"immersive-controls svelte-1yzc86r",null,p,Q),[()=>({"m-shifted":i()})]),_t("mouseleave",x,c),_t("mouseleave",C,c),_t("mouseleave",L,c),_t("mouseleave",N,c),_(t,b),F()}ot(["keydown","keyup","mousedown","mouseup"]);var Xr=require("@vkontakte/videoplayer-shared");var Zh=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var Xc=class{constructor(){this.flickeringTimeout=Zh(1e3);this.subscriptions=new Xr.Subscription;this.isAuto=!1;this.isLive=!1;this.captions$=new Xr.ValueSubject([]);this.captionsPrepared$=new Xr.ValueSubject([])}subscribe(){return this.subscriptions.add(this.captions$.pipe((0,Xr.filter)(()=>this.isEnabled()),(0,Xr.filterChanged)()).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((n,{type:a,value:s},d)=>(o&&!d||(a==="timestamp"?n.push({timeAppeared:Number(s),value:""}):n.length===0?n.push({value:String(s)}):n[n.length-1].value=String(s)),n),[])),this.captionsPrepared$.next(i)}};var cy=M('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"> </span></span>'),uy=M('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"></span></span>'),py=M('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"> </span></span>'),fy=M('<div><span class="caption svelte-c2x749"><!></span></div>'),my=M("<div><!></div>"),vy={hash:"svelte-c2x749",code:`.subtitles-container.svelte-c2x749 {position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;transition:transform var(--controls-transition-duration);}.subtitles-container.shifted.svelte-c2x749 {transform:translateY(calc(var(--controls-height) * -1));}.subtitles-caption.svelte-c2x749 {position:absolute;left:4%;right:4%;bottom:4%;display:flex;justify-content:center;}.subtitles-caption.mobile.svelte-c2x749 {bottom:8%;}.subtitles-container.auto.svelte-c2x749 .subtitles-caption:where(.svelte-c2x749) {left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin);}.caption.svelte-c2x749 {display:block;overflow-wrap:normal;padding:4px 8px;border-radius:4px;background:rgba(0, 0, 0, 0.4);}.subtitles-container.auto.svelte-c2x749 .caption:where(.svelte-c2x749) {width:100%;}.caption-line.svelte-c2x749 {display:block;text-align:center;}.subtitles-container.auto.svelte-c2x749 .caption-line:where(.svelte-c2x749) {text-align:left;}.caption-segment.svelte-c2x749 {display:inline-block;line-height:1.2;font-size:13px;
280
+ /*font-weight: 500;*/color:var(--white);white-space:pre-wrap;}`};function as(t,e){H(e,!0),z(t,vy);let[i,o]=Le(),n=()=>y(b,"$currentSubtitle$",i),a=()=>y($,"$isLive$",i),s=()=>y(w,"$isFullscreen",i),d=()=>y(p,"$isAutoSubtitleCaptionVisible$",i),l=m(e,"isMobile",3,!1),c=be(),u=Rt(),b=c.state.currentSubtitle$,p=c.state.isAutoSubtitleCaptionVisible$,$=c.state.isLive$,w=c.ui.isFullscreen,x=v(()=>!!n().isAuto),k=v(()=>!!a()),C=v(()=>e.playerSize.width*.02),E=v(()=>l()&&!s()||r(C)<=u.minSubtitlesFontSize?u.minSubtitlesFontSize:r(C)),A=Z(null);He(()=>{r(A)?.setIsAuto(r(x)),r(A)?.setIsLive(r(k)),r(A)?.setCaptions(e.captions)});let L=Z(le([[]]));Vt(()=>{D(A,le(new Xc().subscribe()));let re=r(A).captionsPrepared$.subscribe(ce=>{D(L,le(ce))});return()=>{r(A)?.destroy(),re.unsubscribe()}}),Vt(()=>{if(r(x)){let re=window.setTimeout(()=>{p.set(!1)},u.autoSubtitlesTimeout);return()=>{window.clearTimeout(re)}}else p.set(!1)});let I=v(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var N=my();let W;var Q=h(N);{var j=re=>{var ce=fy();let X;var ge=h(ce),ee=h(ge);{var Me=Re=>{var fe=cy(),Oe=h(fe),ie=h(Oe,!0);g(Oe),g(fe),S(R=>{tt(Oe,`font-size: ${r(E)??""}px`),ue(ie,R)},[()=>O("subtitles_auto_caption")]),_(Re,fe)},Pe=(Re,fe)=>{{var Oe=R=>{var Ne=Be(),de=se(Ne);ui(de,17,()=>r(L),Ml,(Ke,oe)=>{var U=uy(),Y=h(U);ui(Y,21,()=>r(oe),({value:Ae,timeAppeared:We})=>We,(Ae,We)=>{let Fe=()=>r(We).value,ye=()=>r(We).timeAppeared;var De=Be(),je=se(De);{var et=ct=>{var mt=Pr();S(()=>ue(mt,Fe())),_(ct,mt)};V(je,ct=>{(!ye()||ye()<=e.position)&&ct(et)})}_(Ae,De)}),g(Y),g(U),S(()=>tt(Y,`font-size: ${r(E)??""}px`)),_(Ke,U)}),_(R,Ne)},ie=R=>{var Ne=Be(),de=se(Ne);ui(de,17,()=>e.captions,({value:Ke})=>Ke,(Ke,oe)=>{let U=()=>r(oe).value;var Y=py(),Ae=h(Y),We=h(Ae,!0);g(Ae),g(Y),S(()=>{tt(Ae,`font-size: ${r(E)??""}px`),ue(We,U())}),_(Ke,Y)}),_(R,Ne)};V(Re,R=>{r(x)&&r(L)?.length?R(Oe):R(ie,!1)},fe)}};V(ee,Re=>{r(x)&&d()?Re(Me):Re(Pe,!1)})}g(ge),g(ce),S(Re=>{X=J(ce,1,"subtitles-caption svelte-c2x749",null,X,Re),tt(ce,`--subtitles-caption-margin: ${r(I)??""}%`)},[()=>({mobile:l()})]),_(re,ce)};V(Q,re=>{(e.captions.length||r(L)?.length)&&re(j)})}g(N),S(re=>W=J(N,1,"subtitles-container svelte-c2x749",null,W,re),[()=>({shifted:e.shifted,auto:r(x)&&!r(k)&&!d()})]),_(t,N),F(),o()}var gy=M('<div class="text svelte-raurnb"> </div>'),hy=M('<div><div class="icon_wrapper svelte-raurnb"><svg class="icon svelte-raurnb" width="22" height="22" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" fill="var(--btn-color, #fff)"></path><path d="M0 0h24v24H0z"></path></g></svg></div> <!></div>'),_y={hash:"svelte-raurnb",code:".wrapper.svelte-raurnb {height:100%;background-position:center;background-size:contain;background-repeat:no-repeat;display:flex;align-items:center;justify-content:center;font-size:16px;flex-direction:column;}.wrapper.bgCover.svelte-raurnb {background-size:cover;}.icon_wrapper.svelte-raurnb {display:flex;flex-direction:column;align-items:center;width:400px;}.icon.svelte-raurnb {width:50px;height:50px;}.text.svelte-raurnb {margin-top:20px;}"};function xd(t,e){H(e,!0),z(t,_y);let i=Rt();var o=hy();let n;var a=P(h(o),2);{var s=d=>{var l=gy(),c=h(l);g(l),S(()=>ue(c,`\u0412\u0438\u0434\u0435\u043E \u0432\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0441\u044F \u043D\u0430 ${e.chromecastDeviceName??""}`)),_(d,l)};V(a,d=>{e.chromecastDeviceName&&d(s)})}g(o),S(d=>{n=J(o,1,"wrapper svelte-raurnb",null,n,d),tt(o,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:i.features.previewNoEmptySpace})]),_(t,o),F()}var by=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M460 193.998a3.997 3.997 0 0 1 3.997-3.998h122.006a4.003 4.003 0 0 1 3.997 3.998v82.004a3.997 3.997 0 0 1-3.997 3.998H463.997a4.003 4.003 0 0 1-3.997-3.998zm6 2.993c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm112-72c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zM507 232a6 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.624 4.446 11.944 4.65 2.106 1.35 3.252.772 3.957.156s1.15-2.806-1.044-4.657c-1.735-1.48-5.806-5.16-14.856-5.15s-12.95 3.5-14.792 5.185c-1.84 1.685-2.288 3.498-.973 4.657s2.315 1.158 4.357-.327c-.007.007 5.357-4.515 11.408-4.515z"></path></svg>');function im(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=by();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200","aria-hidden":"true","data-testid":"error-icon",viewBox:"460 190 130 90",role:"img",...i})),_(t,o)}var $y=M('<div class="container svelte-13zpvm8"><!></div>'),yy={hash:"svelte-13zpvm8",code:".container.svelte-13zpvm8 {position:absolute;top:0;bottom:0;left:0;right:0;background:#000;display:flex;align-items:center;justify-content:center;}"};function wd(t){z(t,yy);var e=$y(),i=h(e);im(i,{}),g(e),_(t,e)}var xy=M('<div class="playButton svelte-1ciju45" tabindex="0" role="button"><div class="playButtonBackground svelte-1ciju45"></div> <!></div>'),wy=M("<div><!></div>"),Sy={hash:"svelte-1ciju45",code:`.container.svelte-1ciju45 {position:absolute;top:0;bottom:0;left:0;right:0;background-position:center;background-size:contain;background-repeat:no-repeat;cursor:pointer;transition:opacity 0.2s,
281
281
  visibility 0.2s;will-change:opacity;}.container.hidden.svelte-1ciju45 {opacity:0;visibility:hidden;}.container.bgCover.svelte-1ciju45 {background-size:cover;}.playButton.svelte-1ciju45 {position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;width:var(--big-play-size);height:var(--big-play-size);display:flex;align-items:center;justify-content:center;}.playButtonBackground.svelte-1ciju45 {position:absolute;top:0;bottom:0;left:0;right:0;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);transition:background 0.2s,
282
- transform 0.2s;transition-timing-function:ease-out;will-change:background, transform;}.container.svelte-1ciju45:hover .playButtonBackground:where(.svelte-1ciju45) {background-color:var(--big-play-hover-bg-color);transform:scale(1.15);}.playButton.svelte-1ciju45 svg {transform:scale(2);}`};function ss(t,e){H(e,!0),z(t,Sy);let i=m(e,"iconVisible",3,!0),o=be(),n=Rt(),a=o.ui.startedByKeyboard$,s=O("tooltip_play"),d=$=>{let w=$.code;["Enter","Space"].includes(w)&&($.stopPropagation(),$.preventDefault(),a.set(!0),e.startVideo?.())},l=$=>{$.stopPropagation(),e.startVideo?.()};var c=wy();let u;c.__click=l;var b=h(c);{var p=$=>{var w=xy();w.__keydown=d,De(w,"aria-label",s);var x=P(h(w),2);gr(x,{}),g(w),_($,w)};V(b,$=>{i()&&$(p)})}return g(c),S($=>{u=J(c,1,"container svelte-1ciju45",null,u,$),tt(c,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:n.features.previewNoEmptySpace})]),_(t,c),F({handlePressKey:d,handleClick:l})}ot(["click","keydown"]);var Cy=M("<div> </div>"),ky={hash:"svelte-1bcvcf2",code:`.title.svelte-1bcvcf2 {position:absolute;pointer-events:none;left:0;top:0;width:100%;height:var(--controls-gradient-height);font-size:15px;color:var(--white);box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition-property:visibility, transform, opacity;transition-duration:var(--controls-transition-duration);transition-timing-function:var(--controls-transition-fn);will-change:transform, opacity;background:linear-gradient(
282
+ transform 0.2s;transition-timing-function:ease-out;will-change:background, transform;}.container.svelte-1ciju45:hover .playButtonBackground:where(.svelte-1ciju45) {background-color:var(--big-play-hover-bg-color);transform:scale(1.15);}.playButton.svelte-1ciju45 svg {transform:scale(2);}`};function ss(t,e){H(e,!0),z(t,Sy);let i=m(e,"iconVisible",3,!0),o=be(),n=Rt(),a=o.ui.startedByKeyboard$,s=O("tooltip_play"),d=$=>{let w=$.code;["Enter","Space"].includes(w)&&($.stopPropagation(),$.preventDefault(),a.set(!0),e.startVideo?.())},l=$=>{$.stopPropagation(),e.startVideo?.()};var c=wy();let u;c.__click=l;var b=h(c);{var p=$=>{var w=xy();w.__keydown=d,Ve(w,"aria-label",s);var x=P(h(w),2);gr(x,{}),g(w),_($,w)};V(b,$=>{i()&&$(p)})}return g(c),S($=>{u=J(c,1,"container svelte-1ciju45",null,u,$),tt(c,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:n.features.previewNoEmptySpace})]),_(t,c),F({handlePressKey:d,handleClick:l})}ot(["click","keydown"]);var Cy=M('<div data-testid="title"> </div>'),ky={hash:"svelte-1bcvcf2",code:`.title.svelte-1bcvcf2 {position:absolute;pointer-events:none;left:0;top:0;width:100%;height:var(--controls-gradient-height);font-size:15px;color:var(--white);box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition-property:visibility, transform, opacity;transition-duration:var(--controls-transition-duration);transition-timing-function:var(--controls-transition-fn);will-change:transform, opacity;background:linear-gradient(
283
283
  0deg,
284
284
  rgba(0, 0, 0, 0) 0%,
285
285
  rgba(0, 0, 0, 0.02) 19%,
@@ -292,7 +292,7 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
292
292
  * \u0415\u0441\u043B\u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D(\u0438\u043A\u043E\u043D\u043A\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442), \u0442\u043E \u0434\u043E\u043B\u0436\u043D\u044B \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u0443\u0441\u0442\u043E\u0435 \u043C\u0435\u0441\u0442\u043E
293
293
  * \u0447\u0442\u043E\u0431\u044B \u0432\u0441\u0435 \u043B\u0435\u0439\u0431\u043B\u044B \u043D\u0430\u0447\u0438\u043D\u0430\u043B\u0438\u0441\u044C \u0441 \u043E\u0434\u043D\u043E\u0433\u043E \u043E\u0442\u0441\u0442\u0443\u043F\u0430.
294
294
  */margin-left:calc(var(--icon-padding) + var(--select-icon-width));}.label.svelte-1t7rx2m,
295
- .sublabel.svelte-1t7rx2m {text-overflow:ellipsis;overflow:hidden;max-width:100%;}.sublabel.svelte-1t7rx2m {opacity:0.5;}`};function sm(t,e){H(e,!0),z(t,Gy);let i=m(e,"isMobile",3,!1);var o=Qy();let n;o.__click=[zy,e],o.__keydown=[qy,e];var a=h(o);{var s=w=>{Cd(w,{})};V(a,w=>{e.item.selected&&w(s)})}var d=P(a,2);let l;var c=h(d);{var u=w=>{var x=Be(),k=se(x);pi(k,()=>e.item.valueComponent,(C,E)=>{E(C,Qr(()=>e.item.valueComponentParams??{}))}),_(w,x)},b=w=>{var x=Wy();let k;var C=h(x,!0);g(x),S(E=>{k=J(x,1,"label svelte-1t7rx2m",null,k,E),ue(C,e.item.label??e.item.value)},[()=>({mobile:i()})]),_(w,x)};V(c,w=>{e.item.valueComponent?w(u):w(b,!1)})}var p=P(c,2);{var $=w=>{var x=Ky(),k=h(x,!0);g(x),S(()=>ue(k,e.item.sublabel)),_(w,x)};V(p,w=>{e.item.sublabel&&w($)})}g(d),g(o),S((w,x,k)=>{n=J(o,1,"item",null,n,w),De(o,"data-value",e.item.value),De(o,"aria-label",x),l=J(d,1,"menu-item-value svelte-1t7rx2m",null,l,k),De(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>e.item.ariaLabel??e.item.label??e.item.value.toString(),()=>({"submenu-value-mobile":i()})]),_(t,o),F()}ot(["click","keydown"]);var jy=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function lm(t,e){H(e,!0);let i=m(e,"isMobile",3,!1),o=m(e,"refMenuItems",15),n=v(()=>()=>e.openSubMenuList(e.item.children)),a=v(()=>x=>Vc(x,r(n)));var s=jy();let d;s.__click=function(...x){r(n)?.apply(this,x)},s.__keydown=function(...x){r(a)?.apply(this,x)};var l=h(s);{var c=x=>{Cd(x,{})};V(l,x=>{e.item.selected&&x(c)})}var u=P(l,2);let b;var p=h(u);{var $=x=>{var k=Be();let C=v(()=>e.item.valueComponent);var E=se(k);pi(E,()=>r(C),(A,L)=>{L(A,Qr(()=>e.item.valueComponentParams??{}))}),_(x,k)},w=x=>{var k=Pr();S(()=>ue(k,e.item.label)),_(x,k)};V(p,x=>{e.item.valueComponent?x($):x(w,!1)})}g(u),g(s),st(s,x=>o(o()[e.item.id]=x,!0),()=>o()?.[e.item.id]),S((x,k)=>{d=J(s,1,"item",null,d,x),De(s,"aria-label",e.item.ariaLabel??e.item.label),De(s,"data-testid",e.item.id),b=J(u,1,"menu-item-value",null,b,k)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),_(t,s),F()}ot(["click","keydown"]);var hr={"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 Zy=(t,e)=>{hh(t,e.returnFromSubMenu,e.closeSettingsMenu)},Xy=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},Jy=(t,e)=>{Gl(t)&&(jn(t),e.returnFromSubMenu())},e4=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title svelte-7dfsuh"> </p></li> <!></ul></div>'),t4={hash:"svelte-7dfsuh",code:`.sub-menu.svelte-7dfsuh {--item-padding-vertical-mobile: 16px;--item-padding-vertical: 7px;--item-label-line-height: 18px;
295
+ .sublabel.svelte-1t7rx2m {text-overflow:ellipsis;overflow:hidden;max-width:100%;}.sublabel.svelte-1t7rx2m {opacity:0.5;}`};function sm(t,e){H(e,!0),z(t,Gy);let i=m(e,"isMobile",3,!1);var o=Qy();let n;o.__click=[zy,e],o.__keydown=[qy,e];var a=h(o);{var s=w=>{Cd(w,{})};V(a,w=>{e.item.selected&&w(s)})}var d=P(a,2);let l;var c=h(d);{var u=w=>{var x=Be(),k=se(x);pi(k,()=>e.item.valueComponent,(C,E)=>{E(C,Qr(()=>e.item.valueComponentParams??{}))}),_(w,x)},b=w=>{var x=Wy();let k;var C=h(x,!0);g(x),S(E=>{k=J(x,1,"label svelte-1t7rx2m",null,k,E),ue(C,e.item.label??e.item.value)},[()=>({mobile:i()})]),_(w,x)};V(c,w=>{e.item.valueComponent?w(u):w(b,!1)})}var p=P(c,2);{var $=w=>{var x=Ky(),k=h(x,!0);g(x),S(()=>ue(k,e.item.sublabel)),_(w,x)};V(p,w=>{e.item.sublabel&&w($)})}g(d),g(o),S((w,x,k)=>{n=J(o,1,"item",null,n,w),Ve(o,"data-value",e.item.value),Ve(o,"aria-label",x),Ve(o,"data-testid",e.item.dataTestid),l=J(d,1,"menu-item-value svelte-1t7rx2m",null,l,k),Ve(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>e.item.ariaLabel??e.item.label??e.item.value.toString(),()=>({"submenu-value-mobile":i()})]),_(t,o),F()}ot(["click","keydown"]);var jy=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function lm(t,e){H(e,!0);let i=m(e,"isMobile",3,!1),o=m(e,"refMenuItems",15),n=v(()=>()=>e.openSubMenuList(e.item.children)),a=v(()=>x=>Vc(x,r(n)));var s=jy();let d;s.__click=function(...x){r(n)?.apply(this,x)},s.__keydown=function(...x){r(a)?.apply(this,x)};var l=h(s);{var c=x=>{Cd(x,{})};V(l,x=>{e.item.selected&&x(c)})}var u=P(l,2);let b;var p=h(u);{var $=x=>{var k=Be();let C=v(()=>e.item.valueComponent);var E=se(k);pi(E,()=>r(C),(A,L)=>{L(A,Qr(()=>e.item.valueComponentParams??{}))}),_(x,k)},w=x=>{var k=Pr();S(()=>ue(k,e.item.label)),_(x,k)};V(p,x=>{e.item.valueComponent?x($):x(w,!1)})}g(u),g(s),st(s,x=>o(o()[e.item.id]=x,!0),()=>o()?.[e.item.id]),S((x,k)=>{d=J(s,1,"item",null,d,x),Ve(s,"aria-label",e.item.ariaLabel??e.item.label),Ve(s,"data-testid",e.item.id),b=J(u,1,"menu-item-value",null,b,k)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),_(t,s),F()}ot(["click","keydown"]);var hr={"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 Zy=(t,e)=>{hh(t,e.returnFromSubMenu,e.closeSettingsMenu)},Xy=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},Jy=(t,e)=>{Gl(t)&&(jn(t),e.returnFromSubMenu())},e4=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title svelte-7dfsuh"> </p></li> <!></ul></div>'),t4={hash:"svelte-7dfsuh",code:`.sub-menu.svelte-7dfsuh {--item-padding-vertical-mobile: 16px;--item-padding-vertical: 7px;--item-label-line-height: 18px;
296
296
  /*\u0414\u043B\u044F \u043F\u0435\u0440\u0432\u043E\u0433\u043E \u0438 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u0441\u043F\u0438\u0441\u043A\u0430*/--edge-item-padding-vertical-mobile: calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical: calc(8px + var(--item-padding-vertical));}.sub-menu.svelte-7dfsuh .item.mobile {padding:var(--item-padding-vertical-mobile) 17px;line-height:var(--item-label-line-height);font-size:14px;}.sub-menu.svelte-7dfsuh {
297
297
  /**
298
298
  * \u0422\u0430\u043A \u043A\u0430\u043A \u0443 \u043D\u0430\u0441 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0441\u0442\u0438\u043A\u0438, \u043D\u0443\u0436\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0430\u0434\u0434\u0438\u043D\u0433 \u0441 \u0432\u044B\u0441\u043E\u0442\u0443 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430.
@@ -302,11 +302,11 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
302
302
  var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) +
303
303
  1px
304
304
  );}.sub-menu.svelte-7dfsuh .items:where(.svelte-7dfsuh) .item.header:where(.svelte-7dfsuh) {position:absolute;top:0;left:0;right:0;min-width:max-content;display:flex;justify-content:space-between;border-bottom:var(--divider-border);}.header.svelte-7dfsuh .title:where(.svelte-7dfsuh) {margin-left:8px;}.sub-menu.svelte-7dfsuh .item {padding:var(--item-padding-vertical) 12px;padding-right:22px;}.items.svelte-7dfsuh .item:first-child:not(.mobile) {padding-top:var(--edge-item-padding-vertical);}.items.svelte-7dfsuh .item:last-child:not(.mobile) {padding-bottom:var(--edge-item-padding-vertical);}.items.svelte-7dfsuh .item.mobile:first-child {padding-top:var(--edge-item-padding-vertical-mobile);}.items.svelte-7dfsuh .item.mobile:last-child {padding-bottom:var(--edge-item-padding-vertical-mobile);}.sub-menu.svelte-7dfsuh .item.bottomBordered {border-bottom:var(--divider-border);}.sub-menu.svelte-7dfsuh .item .sublabel {line-height:14px;font-size:12px;}.sub-menu.svelte-7dfsuh .item:not(.mobile) .label,
305
- .item.svelte-7dfsuh:not(.mobile) p:where(.svelte-7dfsuh) {line-height:var(--item-label-line-height);font-size:13px;}`};function cm(t,e){H(e,!0),z(t,t4);let[i,o]=Le(),n=()=>y(b,"$isFullscreen",i),a=()=>y(p,"$playerSize",i),s=m(e,"isMobile",3,!1),d=m(e,"playerControlsHeight",3,0),l=m(e,"ariaLabelReturnFromSubMenu",19,()=>O("aria_label_submenu_back")),c=m(e,"listRef",15);Vt(()=>{let X=e.items.findIndex(ge=>ge.selected);c().children[X+1].focus()});let u=be(),b=u.ui.isFullscreen,p=u.ui.playerSize,$=Z(void 0),w=Z(0),x=Z(0),k=v(()=>s()&&n()?`max-height: ${Math.round(a().height*.6)}px`:s()?"":`max-height: ${a().height-32-r(x)-d()}px; overflow: auto;`),C=v(()=>Math.max(e.minWidth,r(w)));var E=e4();let A;var L=h(E);let I;L.__keydown=[Zy,e];var N=h(L);let W;N.__click=[Xy,e],N.__keydown=[Jy,e];var Q=h(N);va(Q,{direction:"left"});var j=P(Q,2),re=h(j,!0);g(j),g(N),st(N,X=>D($,X),()=>r($));var ce=P(N,2);ui(ce,17,()=>e.items,Ml,(X,ge)=>{var ee=Be(),Me=se(ee);{var Pe=fe=>{sm(fe,{get item(){return r(ge)},get isMobile(){return s()}})},Ve=(fe,Oe)=>{{var ie=R=>{lm(R,{get isMobile(){return s()},get item(){return r(ge)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};V(fe,R=>{r(ge).type==="OPEN_SUB_MENU"&&R(ie)},Oe)}};V(Me,fe=>{r(ge).type==="SELECT_VALUE"?fe(Pe):fe(Ve,!1)})}_(X,ee)}),g(L),st(L,X=>c(X),()=>c()),g(E),S((X,ge,ee)=>{A=J(E,1,"sub-menu menu svelte-7dfsuh",null,A,X),De(E,"data-testid",`sub-menu-${e.id}`),tt(E,`min-width: ${r(C)}px`),I=J(L,1,"items svelte-7dfsuh",null,I,ge),tt(L,r(k)),W=J(N,1,"item header back svelte-7dfsuh",null,W,ee),De(N,"aria-label",l()),ue(re,e.title)},[()=>({desktop:!s(),mobile:s()}),()=>({mobile:s()}),()=>({mobile:s()})]),Ar(N,"clientWidth",X=>D(w,X)),Ar(N,"clientHeight",X=>D(x,X)),_(t,E),F(),o()}ot(["keydown","click"]);var Jh=require("@vkontakte/videoplayer-shared");var i4=(t,e)=>Vc(t,e()),o4=(t,e)=>{t.stopPropagation(),e()()},n4=M('<div class="value svelte-1ikfjte"> </div>'),r4=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),a4={hash:"svelte-1ikfjte",code:".value.svelte-1ikfjte {position:relative;opacity:0.7;overflow:hidden;text-overflow:ellipsis;}"};function um(t,e){H(e,!0),z(t,a4);let i=m(e,"isMobile",3,!1),o=m(e,"onClick",3,Jh.noop),n=m(e,"valueComponent",3,void 0),a=m(e,"ref",15);var s=r4();let d;s.__click=[o4,o],s.__keydown=[i4,o];var l=h(s),c=h(l);{var u=C=>{ns(C,{get icon(){return e.icon}})},b=C=>{var E=Be();let A=v(()=>e.icon);var L=se(E);pi(L,()=>r(A),(I,N)=>{N(I,{})}),_(C,E)};V(c,C=>{typeof e.icon=="string"?C(u):C(b,!1)})}g(l);var p=P(l,2),$=h(p,!0);g(p);var w=P(p,2);{var x=C=>{var E=Be();let A=v(n);var L=se(E);pi(L,()=>r(A),(I,N)=>{N(I,{})}),_(C,E)},k=C=>{var E=n4(),A=h(E,!0);g(E),S(()=>ue(A,e.value)),_(C,E)};V(w,C=>{n()?C(x):C(k,!1)})}g(s),st(s,C=>a(C),()=>a()),S(C=>{d=J(s,1,"item",null,d,C),De(s,"aria-label",e.ariaLabel),De(s,"data-testid",e.id),ue($,e.label)},[()=>({mobile:i()})]),_(t,s),F()}ot(["click","keydown"]);var pm=require("@vkontakte/videoplayer-shared");var s4=(t,e)=>{Ks(t,()=>e())},l4=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),d4=M('<img class="icon" aria-hidden="true">'),c4=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label svelte-15ifkac"> </div></li>'),u4={hash:"svelte-15ifkac",code:".label.svelte-15ifkac {overflow:hidden;text-overflow:ellipsis;}"};function fm(t,e){H(e,!0),z(t,u4);let i=m(e,"isMobile",3,!1),o=m(e,"onClick",3,pm.noop),n=m(e,"closeSettings",3,pm.noop),a=Z(!1),s=()=>{D(a,!0)},d=k=>{k?.stopPropagation(),o()(),n()()};var l=c4();let c;l.__click=d,l.__keydown=[s4,d];var u=h(l),b=h(u);{var p=k=>{var C=Be(),E=se(C);{var A=I=>{var N=l4();_(I,N)},L=I=>{var N=d4();S(()=>De(N,"src",e.icon)),_t("error",N,s),La(N),_(I,N)};V(E,I=>{r(a)?I(A):I(L,!1)})}_(k,C)},$=k=>{var C=Be();let E=v(()=>e.icon);var A=se(C);pi(A,()=>r(E),(L,I)=>{I(L,{})}),_(k,C)};V(b,k=>{typeof e.icon=="string"?k(p):k($,!1)})}g(u);var w=P(u,2),x=h(w,!0);g(w),g(l),S(k=>{c=J(l,1,"item",null,c,k),De(l,"aria-label",e.ariaLabel??e.label),De(l,"data-testid",e.id),ue(x,e.label)},[()=>({mobile:i()})]),_(t,l),F()}ot(["click","keydown"]);var e1=require("@vkontakte/videoplayer-shared");var p4=M('<div class="toggle_wrap svelte-17wbjko"><div></div> <div class="toggle-label svelte-17wbjko"></div></div>'),f4={hash:"svelte-17wbjko",code:'.toggle_wrap.svelte-17wbjko {min-height:15px;padding:0;font-size:12px;line-height:15px;cursor:pointer;user-select:none;}.toggle.svelte-17wbjko {float:right;margin-top:3px;width:28px;height:9px;border-radius:45px;background-color:var(--toggle-color-separator);cursor:pointer;}.toggle.svelte-17wbjko::after {content:"";float:left;position:relative;width:15px;height:15px;border-radius:50%;background-color:var(--toggle-color-off);top:-3px;left:0;transition:left .1s ease;}.toggle.on.svelte-17wbjko::after {background-color:var(--toggle-color-on);left:13px;}.toggle-label.svelte-17wbjko {overflow:hidden;}'};function mm(t,e){z(t,f4);let i=m(e,"enabled",3,!1);var o=p4(),n=h(o);let a;me(2),g(o),S(s=>a=J(n,1,"toggle svelte-17wbjko",null,a,s),[()=>({on:i()})]),_(t,o)}var m4=(t,e,i)=>{_h(t,e(),o=>i()(o))},v4=(t,e,i)=>{t.stopPropagation(),e()(!i())},g4=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),h4=M('<li role="menuitem" tabindex="0"><!></li>');function vm(t,e){H(e,!0);let i=m(e,"isMobile",3,!1),o=m(e,"onClick",3,e1.noop),n=m(e,"enabled",3,!1),a=m(e,"tooltipText",3,void 0),s=m(e,"maxTooltipWidth",3,void 0);var d=h4();let l;d.__click=[v4,o,n],d.__keydown=[m4,n,o];var c=h(d);Xa(c,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return s()},children:(u,b)=>{var p=g4();let $;var w=h(p),x=h(w);{var k=I=>{ns(I,{get icon(){return e.icon}})},C=I=>{var N=Be();let W=v(()=>e.icon);var Q=se(N);pi(Q,()=>r(W),(j,re)=>{re(j,{})}),_(I,N)};V(x,I=>{typeof e.icon=="string"?I(k):I(C,!1)})}g(w);var E=P(w,2),A=h(E,!0);g(E);var L=P(E,2);mm(L,{get enabled(){return n()}}),g(p),S(I=>{$=J(p,1,"switch-wrapper",null,$,I),ue(A,e.label)},[()=>({mobile:i()})]),_(u,p)},$$slots:{default:!0}}),g(d),S(u=>{l=J(d,1,"item switch-item",null,l,u),De(d,"aria-label",e.ariaLabel??e.label),De(d,"data-testid",e.id)},[()=>({mobile:i()})]),_(t,d),F()}ot(["click","keydown"]);var Td=require("@vkontakte/videoplayer-shared");var t1=()=>{let t=Z(le([])),e=v(()=>(r(t).length?r(t).at(-1):null)||null);return{get current(){return r(e)},pushSubMenu:i=>{r(t).push(i)},popSubMenu:()=>{D(t,le(r(t).slice(0,-1)))},popAllSubMenus:()=>{D(t,le([]))}}};var _4=M('<div class="quality-icon svelte-t2qk8t"><!></div>'),b4=M('<div class="quality-label svelte-t2qk8t"><span> </span> <!></div>'),$4={hash:"svelte-t2qk8t",code:".quality-label.svelte-t2qk8t {position:relative;}.quality.svelte-t2qk8t {font-size:13px;line-height:18px;}.quality.sub.svelte-t2qk8t {opacity:0.7;}.quality-icon.svelte-t2qk8t {position:absolute;padding-left:2px;transform:translateX(100%);display:flex;top:0;right:0;}.quality-icon.svelte-t2qk8t svg {color:var(--blue-light);}"};function ds(t,e){H(e,!0),z(t,$4);let i=m(e,"isSubCase",3,!1),o=v(()=>Bc(e.quality));var n=b4(),a=h(n);let s;var d=h(a,!0);g(a);var l=P(a,2);{var c=u=>{var b=_4();let p=v(()=>r(o));var $=h(b);pi($,()=>r(p),(w,x)=>{x(w,{})}),g(b),_(u,b)};V(l,u=>{r(o)&&!e.isMobile&&u(c)})}g(n),S(u=>{s=J(a,1,"svelte-t2qk8t",null,s,u),ue(d,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),_(t,n),F()}var r1=require("@vkontakte/videoplayer-shared");var gm=require("@vkontakte/videoplayer-core");var i1=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},o1=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=i1({quality:t,availableQualities:e});return i?t===gm.VideoQuality.INVARIANT?O("auto_quality_invariant"):O("auto_quality",{actual:o}):o},n1=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===gm.VideoQuality.INVARIANT?i:`${i}${i1({quality:t,availableQualities:e})}`:"...";var y4=M('<div class="menu-item-value-wrapper svelte-1j7b2kc"><!></div>'),x4={hash:"svelte-1j7b2kc",code:".menu-item-value-wrapper.svelte-1j7b2kc {line-height:normal;}"};function ol(t,e){H(e,!0),z(t,x4);let[i,o]=Le(),n=()=>y(l,"$currentQuality$",i),a=()=>y(c,"$availableQualities$",i),s=()=>y(u,"$isMobile$",i),d=be(),l=d.state.currentQuality$,c=d.state.availableQualities$,u=d.ui.isMobile,b=" \xB7 ",p=v(()=>e.prefix+(e.selected&&n()!==r1.VideoQuality.INVARIANT?b:"")),$=v(()=>n1({prefix:r(p),quality:n(),availableQualities:a(),onlyPrefix:!e.selected}));var w=y4(),x=h(w);let k=v(()=>e.selected?n():void 0);ds(x,{get quality(){return r(k)},get label(){return r($)},get isMobile(){return s()},isSubCase:!0}),g(w),_(t,w),F(),o()}var w4=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,n="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${n}|${a}`,"g")},S4={br:!0,span:!0},hm=(t,e={})=>{if(!t)return t;let i={...S4,...e},o=Object.keys(i);if(!o.length)return t;let n=w4(o),a=[],s=0;for(let d of t.matchAll(n)){let l=d[0],c=d.groups?.keyhtml||d.groups?.keyi18n||d.groups?.keyhtmlself||d.groups?.keyi18nself||"",{index:u}=d;if(!i[c]){a.push(t.slice(s,u)),s=u+l.length;continue}let b=d.groups?.childrenhtml?hm(d.groups.childrenhtml,i):"",p=d.groups?.childrenhtml?l.replace(new RegExp(d.groups?.childrenhtml),()=>b||""):l;a.push(t.slice(s,u),p),s=u+l.length}return s===0?t:(a.push(t.slice(s)),a.join(""))};function kd(t,e){H(e,!1);let i=m(e,"message",8),o=hm(i());fr();var n=Be(),a=se(n);{var s=d=>{var l=Be(),c=se(l);Ll(c,()=>o,!1,!1),_(d,l)};V(a,d=>{o&&d(s)})}_(t,n),F()}var C4=M('<p class="quality-applies sublabel svelte-1qk3zto"><!></p>'),k4={hash:"svelte-1qk3zto",code:".quality-applies.svelte-1qk3zto {display:flex;justify-content:end;padding:3px 0;color:rgba(255, 255, 255, 0.5);}.quality-applies span {color:#70c1ff;}"};function _m(t,e){H(e,!1),z(t,k4),fr();var i=C4(),o=h(i);let n=cr(()=>O("quality_applience",{action:`<span>${O("quality_applience_action")}</span>`}));kd(o,{get message(){return r(n)}}),g(i),_(t,i),F()}var s1=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"QUALITY_OTHER",type:"OPEN_SUB_MENU",selected:o,valueComponent:ol,valueComponentParams:{prefix:O("other_quality"),selected:o},children:"QUALITY"}},bm=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"QUALITY_AUTO",type:"SELECT_VALUE",value:"auto",label:O("auto_quality_limit"),valueComponent:e?ol:void 0,valueComponentParams:{prefix:O("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),l1=()=>({id:"QUALITY_APPLIENCE",type:"OPEN_SUB_MENU",valueComponent:_m,bottomBordered:!0,children:"QUALITY_APPLIENCE"}),$m=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"QUALITY_HIGH",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:O("high_quality"),valueComponent:t?ol:void 0,valueComponentParams:{prefix:O("high_quality"),selected:i},sublabel:O("high_quality_description")}),ym=({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:O("traffic_saving_quality"),valueComponent:t?ol:void 0,valueComponentParams:{prefix:O("traffic_saving_quality"),selected:i},sublabel:O("traffic_saving_quality_description")});var Jc=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),eu=(t,e)=>{if(!t)return"";let{language:i,label:o}=t,n;if(i==="und"?n=void 0:i&&(n=Kc(i)??i),o&&i&&n){let s=e.filter(d=>d.label===o&&d.language===i);if(s.length===1)return O("audio_stream_display_language_label",{language:n,label:o});{let d=Jc(t,s);return O("audio_stream_display_language_label_index",{language:n,label:o,index:d})}}if(o){let s=e.filter(d=>d.label===o);if(s.length===1)return o;{let d=Jc(t,s);return O("audio_stream_display_label_index",{label:o,index:d})}}if(i&&n){let s=e.filter(d=>d.language===i);if(s.length===1)return n;{let d=Jc(t,s);return O("audio_stream_display_language_index",{language:n,index:d})}}let a=Jc(t,e);return O("audio_stream_display_unknown",{index:a})};var T4={QUALITY_DETAILS:t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:n}=t,a=[];return i&&a.push({handler:bm,selected:e&&!o&&!n||!1}),a.push({handler:ym,selected:o},{handler:$m,selected:n}),{title:O("submenu_quality"),id:"QUALITY_DETAILS",items:[l1(t),...a.map(({handler:s,selected:d})=>s({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),s1(t)]}},QUALITY:({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"QUALITY",title:O("submenu_quality"),closeSettingsMenu:t,items:i.map(n=>({type:"SELECT_VALUE",value:n.value,valueComponent:ds,valueComponentParams:{quality:n.value,label:n.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:n.selected,label:n.displayValue}))}),QUALITY_APPLIENCE:t=>{let{closeSettingsMenu:e}=t;return{id:"QUALITY_APPLIENCE",title:O("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:bm,selected:Sc()?.type==="auto_quality"},{handler:ym,selected:Sc()?.type==="traffic_saving"},{handler:$m,selected:Sc()?.type==="high_quality"}].map(({handler:i,selected:o})=>i({labelWithQuality:!1,appliesTo:"as-default",selected:o},t))}},AUDIO_LANGUAGES:({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"AUDIO_LANGUAGES",title:O("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(n=>({type:"SELECT_VALUE",value:n,dataValue:n.id,selectItem:o,selected:n.id===i?.id,label:eu(n,e)}))}),PLAYBACK_RATE_SUB_MENU:({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"PLAYBACK_RATE_SUB_MENU",title:O("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:O("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i,selectItem:e,selected:i.selected,label:i.displayValue}))})},d1=({subMenuId:t,context:e})=>t?[T4[t](e)]:[];var I4=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M.1 6.5c0-2.24 0-3.36.436-4.216A4 4 0 0 1 2.284.536C3.139.1 4.259.1 6.5.1h5c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748c.436.856.436 1.976.436 4.216s0 3.36-.436 4.216a4 4 0 0 1-1.748 1.748c-.836.426-1.925.436-4.064.436l.55 2.2H14.1a.9.9 0 0 1 0 1.8H3.9a.9.9 0 1 1 0-1.8h1.897l.55-2.2c-2.139 0-3.227-.01-4.063-.436a4 4 0 0 1-1.748-1.748C.1 9.86.1 8.74.1 6.5m11.4-4.6h-5c-1.15 0-1.904.002-2.481.049-.556.045-.786.124-.918.19a2.2 2.2 0 0 0-.962.962c-.067.132-.145.363-.19.918-.048.577-.05 1.331-.05 2.481s.002 1.904.05 2.48c.045.556.123.787.19.919a2.2 2.2 0 0 0 .962.961c.132.068.362.146.918.192.577.047 1.33.048 2.48.048h5c1.15 0 1.904-.001 2.481-.048.556-.046.787-.124.918-.192a2.2 2.2 0 0 0 .962-.961c.067-.132.146-.363.191-.918.047-.577.049-1.331.049-2.48s-.002-1.905-.049-2.482c-.045-.555-.124-.786-.191-.918a2.2 2.2 0 0 0-.962-.961c-.131-.067-.362-.146-.918-.191-.577-.048-1.33-.049-2.48-.049m-3.298 11-.55 2.2h2.695l-.55-2.2z" clip-rule="evenodd"></path></svg>');function xm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=I4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"17",fill:"none","aria-hidden":"true","data-testid":"traffic-saving-icon",role:"img",...i})),_(t,o)}var E4=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M8.295 14.247c1.87 1.896 5.505.02 5.505-3.548V5.645l2.399-.697A2.74 2.74 0 0 0 18 2.364l-.01-1.72a.75.75 0 0 0-.906-.623l-.267.061c-.941.215-1.886.431-2.807.721-1.332.45-2.03 1.614-2.01 3.077V9c-3.887.196-5.639 3.286-3.705 5.247M.9.1a.9.9 0 0 0 0 1.8h8.197a.9.9 0 0 0 0-1.8zM.9 5.1a.9.9 0 1 0 0 1.8h7.196a.9.9 0 0 0 0-1.8zM0 11a.9.9 0 0 1 .9-.9h4.183a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11"></path></svg>');function wm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=E4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"15",fill:"none","aria-hidden":"true","data-testid":"audio-languages-icon",role:"img",...i})),_(t,o)}var P4=ve('<svg><!><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z"></path><path fill="var(--btn-color, #fff)" fill-rule="nonzero" d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A7.94 7.94 0 0 1 11 4.07M5.69 7.1 4.26 5.68A9.95 9.95 0 0 0 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A7.87 7.87 0 0 1 4.07 13zM11 21.95v-2.02a7.94 7.94 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.688 8.576l4.746 2.736a.792.792 0 0 1 0 1.372l-4.746 2.737a.792.792 0 0 1-1.188-.686V9.262a.792.792 0 0 1 1.188-.686"></path></g></svg>');function Sm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=P4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true","data-testid":"play-speed-icon",role:"img",...i})),_(t,o)}var A4=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M8 0a.9.9 0 0 1 .9.9v10.927l4.564-4.563a.9.9 0 0 1 1.272 1.272l-6.1 6.1a.9.9 0 0 1-1.272 0l-6.1-6.1a.9.9 0 1 1 1.272-1.272L7.1 11.827V.9A.9.9 0 0 1 8 0M0 18a.9.9 0 0 1 .9-.9h14.2a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 18" clip-rule="evenodd"></path></svg>');function Cm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=A4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"19",fill:"none","aria-hidden":"true","data-testid":"download-icon",role:"img",...i})),_(t,o)}var M4=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M8.863 2.1h6.274c.674-.002 1.2.211 1.683.697l4.383 4.383c.478.476.699.998.697 1.683v6.274c.002.685-.22 1.207-.697 1.683l-4.383 4.383c-.476.478-.998.699-1.683.697H8.863c-.685.002-1.207-.22-1.683-.697L2.797 16.82c-.478-.476-.699-.998-.697-1.683V8.863c-.002-.685.22-1.207.697-1.683L7.18 2.797c.484-.486 1.009-.699 1.683-.697m-.445 2.005L4.105 8.418c-.18.18-.205.242-.205.495v6.174c0 .25.025.316.205.495l4.313 4.313c.179.179.24.205.495.205h6.174c.253 0 .316-.026.495-.205l4.313-4.313c.18-.18.205-.245.205-.495V8.913c0-.254-.026-.316-.205-.495l-4.313-4.313c-.18-.18-.242-.205-.495-.205H8.913c-.254 0-.319.029-.495.205M13 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" clip-rule="evenodd"></path></svg>');function km(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=M4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"report-icon",role:"img",...i})),_(t,o)}var L4=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4 12.3V12c0-1.47.005-2.547.075-3.403.074-.904.216-1.482.454-1.949a4.85 4.85 0 0 1 2.12-2.12c.466-.237 1.044-.379 1.948-.453C9.51 4.001 10.675 4 12.3 4h4.512a2 2 0 0 0-.174-.49 2.4 2.4 0 0 0-1.048-1.048 2.4 2.4 0 0 0-.931-.239 14 14 0 0 0-1.026-.023H12.26c-1.576 0-2.814 0-3.81.081-1.014.083-1.856.255-2.62.644A6.65 6.65 0 0 0 2.926 5.83c-.389.763-.56 1.605-.644 2.62-.081.995-.081 2.233-.081 3.809v1.373c0 .392 0 .738.023 1.025.025.306.081.623.239.931a2.4 2.4 0 0 0 1.048 1.05c.162.082.326.136.49.173V12.3zM10.08 6h-.035c-.52 0-.964 0-1.329.03-.383.03-.755.097-1.112.276a2.9 2.9 0 0 0-1.298 1.298c-.179.357-.246.73-.277 1.112C6 9.081 6 9.524 6 10.046v7.909c0 .52 0 .964.03 1.329.03.382.097.755.276 1.112a2.9 2.9 0 0 0 1.298 1.298c.357.179.73.246 1.112.277.365.029.808.029 1.329.029h6.91c.52 0 .964 0 1.329-.03.382-.03.755-.097 1.112-.276a2.9 2.9 0 0 0 1.298-1.298c.179-.357.246-.73.277-1.112.029-.365.029-.808.029-1.33v-7.909c0-.52 0-.964-.03-1.329-.03-.382-.097-.755-.276-1.112a2.9 2.9 0 0 0-1.298-1.298c-.357-.179-.73-.246-1.112-.277C17.919 6 17.476 6 16.954 6zM8.408 7.916c.065-.032.179-.07.452-.093a18 18 0 0 1 1.22-.023h6.84c.565 0 .936 0 1.22.023.273.022.387.06.452.093a1.1 1.1 0 0 1 .492.492c.032.065.07.179.093.452.022.284.023.655.023 1.22v7.84c0 .565 0 .936-.023 1.22-.023.273-.06.387-.093.452a1.1 1.1 0 0 1-.492.492c-.065.032-.18.07-.452.093a18 18 0 0 1-1.22.023h-6.84c-.565 0-.936 0-1.22-.023-.273-.023-.387-.06-.452-.093a1.1 1.1 0 0 1-.492-.492c-.032-.065-.07-.18-.093-.452a17 17 0 0 1-.023-1.22v-7.84c0-.565 0-.936.023-1.22.022-.273.06-.387.093-.452a1.1 1.1 0 0 1 .492-.492" clip-rule="evenodd"></path></svg>');function tu(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=L4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"copy-icon",role:"img",...i})),_(t,o)}var V4=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M12 20.105a8.105 8.105 0 1 0 0-16.21 8.105 8.105 0 0 0 0 16.21M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10m0-12.372a1.316 1.316 0 1 1 0-2.632 1.316 1.316 0 0 1 0 2.632m-.947 2.822c0-.541.424-.98.947-.98s.947.439.947.98v3.83c0 .54-.424.98-.947.98s-.947-.44-.947-.98z"></path></svg>');function Tm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=V4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"info-icon",role:"img",...i})),_(t,o)}var R4=M('<div class="menu-item-value-wrapper svelte-1j7b2kc"><!></div>'),N4={hash:"svelte-1j7b2kc",code:".menu-item-value-wrapper.svelte-1j7b2kc {line-height:normal;}"};function Im(t,e){H(e,!0),z(t,N4);let[i,o]=Le(),n=()=>y(c,"$currentQuality$",i),a=()=>y(u,"$availableQualities$",i),s=()=>y(b,"$isAutoQualityEnabled$",i),d=()=>y(p,"$isMobile$",i),l=be(),c=l.state.currentQuality$,u=l.state.availableQualities$,b=l.state.isAutoQualityEnabled$,p=l.ui.isMobile,$=v(()=>o1({quality:n(),availableQualities:a(),isAutoQualityEnabled:s()}));var w=R4(),x=h(w);ds(x,{get quality(){return n()},get label(){return r($)},get isMobile(){return d()}}),g(w),_(t,w),F(),o()}var B4={QUALITY_SETTINGS:({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?O("auto_quality_option"):e)||"";return{id:"QUALITY_SETTINGS",type:"OPEN_SUB_MENU",ariaLabel:O("aria_label_menu_quality",{actual:o}),icon:ed,label:O("menu_quality"),value:e,valueComponent:Im,weight:hr["quality-settings"],children:i?"QUALITY_DETAILS":"QUALITY"}},TRAFFIC_SAVING_SWITCH:({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"TRAFFIC_SAVING_SWITCH",weight:hr["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:t?O("aria_label_submenu_traffic_saving_off"):`${O("aria_label_submenu_traffic_saving_on")}. ${O("traffic_saving_helper_text")}`,icon:xm,label:O("menu_traffic_saving"),enabled:t,tooltipText:O("traffic_saving_helper_text"),maxTooltipWidth:175}),AUDIO_LANGUAGES:({currentAudioStream:t,availableAudioStreams:e})=>{let i=eu(t,e);return{id:"AUDIO_LANGUAGES",weight:hr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:O("aria_label_menu_audio_languages",{actual:i}),icon:wm,label:O("menu_audio_languages"),value:i,children:"AUDIO_LANGUAGES"}},PLAYBACK_RATE:({availablePlaybackRates:t,currentPlaybackRate:e})=>{let i=t.find(o=>o.value===e)?.displayValue||"";return{id:"PLAYBACK_RATE",weight:hr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:O("aria_label_menu_rate",{actual:i}),icon:Sm,label:O("menu_playback_rate"),value:`${e}x`,children:"PLAYBACK_RATE_SUB_MENU"}},SUBTITLES:({currentSubtitle:t})=>({id:"SUBTITLES",weight:hr["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:O("aria_label_menu_subtitle",{actual:t.displayValue}),icon:td,label:O("subtitles_caption"),value:t.displayValue,children:"SUBTITLES"}),DOWNLOAD:({onDownloadClick:t})=>({id:"DOWNLOAD",weight:hr.download,type:"CLICK",onClick:t,label:O("download_video_caption"),ariaLabel:O("aria_label_menu_download"),icon:Cm}),SHOW_SUPPORT:({onReportProblemClick:t})=>({id:"SHOW_SUPPORT",weight:hr.report,type:"CLICK",onClick:t,label:O("menu_report"),ariaLabel:`${O("menu_report")}. ${O("aria_label_new_tab_alert")}`,icon:km,isHiddenFor:["desktop"]}),COPY_DATA:({onCopyDataClick:t})=>({id:"COPY_DATA",weight:hr["copy-data"],type:"CLICK",onClick:t,label:O("menu_copy_debug"),ariaLabel:O("menu_copy_debug"),icon:tu,isHiddenFor:["desktop"]}),SAVE_TRACE_INFO:({onSaveTraceDataClick:t})=>({id:"SAVE_TRACE_INFO",weight:hr["save-trace-info"],type:"CLICK",onClick:t,label:O("menu_save_debug"),ariaLabel:O("menu_save_debug"),icon:tu,isHiddenFor:["desktop"]}),DEBUG_INFO:({toggleShowDebugInfo:t,debugPanelVisible:e})=>({id:"DEBUG_INFO",weight:hr["debug-info"],type:"CLICK",onClick:t,label:e?O("aria_label_menu_debug_overlay_disable"):O("aria_label_menu_debug_overlay_enable"),ariaLabel:O("menu_debug_overlay"),icon:Tm,isHiddenFor:["desktop"]})},c1=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(n=>B4[n](e)),...i.map(n=>({...n,isAdditional:!0}))].filter(n=>!n?.isHiddenFor?.length||!n?.isHiddenFor?.includes("desktop")&&!o||!n?.isHiddenFor?.includes("mobile")&&o).sort(Qa)};var H4=(t,e)=>{Lc(t,e)},F4=M('<div><div> </div> <div class="close svelte-17or3al"></div></div>'),U4=M('<div data-testid="settings-menu"><!> <ul role="menu"></ul></div>'),z4=M("<div><!> <!></div>"),q4={hash:"svelte-17or3al",code:`.settings-menu-container.mobile.svelte-17or3al {width:100%;}.settings-menu-container.svelte-17or3al ul {margin:0;padding:0;list-style-type:none;}.settings-menu-container.svelte-17or3al .menu {background-color:var(--settings-bg);border-radius:var(--settings-radius);transition:opacity 0.2s, visibility 0.2s;overflow:hidden;}.settings-menu-container.svelte-17or3al .menu .item:first-child:not(.mobile) {border-top-right-radius:var(--settings-radius);border-top-left-radius:var(--settings-radius);}.settings-menu-container.svelte-17or3al .menu .item:last-child {border-bottom-right-radius:var(--settings-radius);border-bottom-left-radius:var(--settings-radius);}.settings-menu-container.svelte-17or3al .settings-menu .item:first-child:not(.mobile) {padding-top:6px;}.settings-menu-container.svelte-17or3al .settings-menu .item:last-child:not(.mobile) {padding-bottom:6px;}.settings-menu-container.svelte-17or3al .menu.desktop {position:absolute;right:0;bottom:0;max-width:100%;}.settings-menu.svelte-17or3al {line-height:40px;}.settings-menu.desktop.svelte-17or3al {
305
+ .item.svelte-7dfsuh:not(.mobile) p:where(.svelte-7dfsuh) {line-height:var(--item-label-line-height);font-size:13px;}`};function cm(t,e){H(e,!0),z(t,t4);let[i,o]=Le(),n=()=>y(b,"$isFullscreen",i),a=()=>y(p,"$playerSize",i),s=m(e,"isMobile",3,!1),d=m(e,"playerControlsHeight",3,0),l=m(e,"ariaLabelReturnFromSubMenu",19,()=>O("aria_label_submenu_back")),c=m(e,"listRef",15);Vt(()=>{let X=e.items.findIndex(ge=>ge.selected);c().children[X+1].focus()});let u=be(),b=u.ui.isFullscreen,p=u.ui.playerSize,$=Z(void 0),w=Z(0),x=Z(0),k=v(()=>s()&&n()?`max-height: ${Math.round(a().height*.6)}px`:s()?"":`max-height: ${a().height-32-r(x)-d()}px; overflow: auto;`),C=v(()=>Math.max(e.minWidth,r(w)));var E=e4();let A;var L=h(E);let I;L.__keydown=[Zy,e];var N=h(L);let W;N.__click=[Xy,e],N.__keydown=[Jy,e];var Q=h(N);va(Q,{direction:"left"});var j=P(Q,2),re=h(j,!0);g(j),g(N),st(N,X=>D($,X),()=>r($));var ce=P(N,2);ui(ce,17,()=>e.items,Ml,(X,ge)=>{var ee=Be(),Me=se(ee);{var Pe=fe=>{sm(fe,{get item(){return r(ge)},get isMobile(){return s()}})},Re=(fe,Oe)=>{{var ie=R=>{lm(R,{get isMobile(){return s()},get item(){return r(ge)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};V(fe,R=>{r(ge).type==="OPEN_SUB_MENU"&&R(ie)},Oe)}};V(Me,fe=>{r(ge).type==="SELECT_VALUE"?fe(Pe):fe(Re,!1)})}_(X,ee)}),g(L),st(L,X=>c(X),()=>c()),g(E),S((X,ge,ee)=>{A=J(E,1,"sub-menu menu svelte-7dfsuh",null,A,X),Ve(E,"data-testid",`sub-menu-${e.id}`),tt(E,`min-width: ${r(C)}px`),I=J(L,1,"items svelte-7dfsuh",null,I,ge),tt(L,r(k)),W=J(N,1,"item header back svelte-7dfsuh",null,W,ee),Ve(N,"aria-label",l()),ue(re,e.title)},[()=>({desktop:!s(),mobile:s()}),()=>({mobile:s()}),()=>({mobile:s()})]),Ar(N,"clientWidth",X=>D(w,X)),Ar(N,"clientHeight",X=>D(x,X)),_(t,E),F(),o()}ot(["keydown","click"]);var Jh=require("@vkontakte/videoplayer-shared");var i4=(t,e)=>Vc(t,e()),o4=(t,e)=>{t.stopPropagation(),e()()},n4=M('<div class="value svelte-1ikfjte"> </div>'),r4=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),a4={hash:"svelte-1ikfjte",code:".value.svelte-1ikfjte {position:relative;opacity:0.7;overflow:hidden;text-overflow:ellipsis;}"};function um(t,e){H(e,!0),z(t,a4);let i=m(e,"isMobile",3,!1),o=m(e,"onClick",3,Jh.noop),n=m(e,"valueComponent",3,void 0),a=m(e,"ref",15);var s=r4();let d;s.__click=[o4,o],s.__keydown=[i4,o];var l=h(s),c=h(l);{var u=C=>{ns(C,{get icon(){return e.icon}})},b=C=>{var E=Be();let A=v(()=>e.icon);var L=se(E);pi(L,()=>r(A),(I,N)=>{N(I,{})}),_(C,E)};V(c,C=>{typeof e.icon=="string"?C(u):C(b,!1)})}g(l);var p=P(l,2),$=h(p,!0);g(p);var w=P(p,2);{var x=C=>{var E=Be();let A=v(n);var L=se(E);pi(L,()=>r(A),(I,N)=>{N(I,{})}),_(C,E)},k=C=>{var E=n4(),A=h(E,!0);g(E),S(()=>ue(A,e.value)),_(C,E)};V(w,C=>{n()?C(x):C(k,!1)})}g(s),st(s,C=>a(C),()=>a()),S(C=>{d=J(s,1,"item",null,d,C),Ve(s,"aria-label",e.ariaLabel),Ve(s,"data-testid",e.id),ue($,e.label)},[()=>({mobile:i()})]),_(t,s),F()}ot(["click","keydown"]);var pm=require("@vkontakte/videoplayer-shared");var s4=(t,e)=>{Ks(t,()=>e())},l4=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),d4=M('<img class="icon" aria-hidden="true">'),c4=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label svelte-15ifkac"> </div></li>'),u4={hash:"svelte-15ifkac",code:".label.svelte-15ifkac {overflow:hidden;text-overflow:ellipsis;}"};function fm(t,e){H(e,!0),z(t,u4);let i=m(e,"isMobile",3,!1),o=m(e,"onClick",3,pm.noop),n=m(e,"closeSettings",3,pm.noop),a=Z(!1),s=()=>{D(a,!0)},d=k=>{k?.stopPropagation(),o()(),n()()};var l=c4();let c;l.__click=d,l.__keydown=[s4,d];var u=h(l),b=h(u);{var p=k=>{var C=Be(),E=se(C);{var A=I=>{var N=l4();_(I,N)},L=I=>{var N=d4();S(()=>Ve(N,"src",e.icon)),_t("error",N,s),La(N),_(I,N)};V(E,I=>{r(a)?I(A):I(L,!1)})}_(k,C)},$=k=>{var C=Be();let E=v(()=>e.icon);var A=se(C);pi(A,()=>r(E),(L,I)=>{I(L,{})}),_(k,C)};V(b,k=>{typeof e.icon=="string"?k(p):k($,!1)})}g(u);var w=P(u,2),x=h(w,!0);g(w),g(l),S(k=>{c=J(l,1,"item",null,c,k),Ve(l,"aria-label",e.ariaLabel??e.label),Ve(l,"data-testid",e.id),ue(x,e.label)},[()=>({mobile:i()})]),_(t,l),F()}ot(["click","keydown"]);var e1=require("@vkontakte/videoplayer-shared");var p4=M('<div class="toggle_wrap svelte-17wbjko"><div></div> <div class="toggle-label svelte-17wbjko"></div></div>'),f4={hash:"svelte-17wbjko",code:'.toggle_wrap.svelte-17wbjko {min-height:15px;padding:0;font-size:12px;line-height:15px;cursor:pointer;user-select:none;}.toggle.svelte-17wbjko {float:right;margin-top:3px;width:28px;height:9px;border-radius:45px;background-color:var(--toggle-color-separator);cursor:pointer;}.toggle.svelte-17wbjko::after {content:"";float:left;position:relative;width:15px;height:15px;border-radius:50%;background-color:var(--toggle-color-off);top:-3px;left:0;transition:left .1s ease;}.toggle.on.svelte-17wbjko::after {background-color:var(--toggle-color-on);left:13px;}.toggle-label.svelte-17wbjko {overflow:hidden;}'};function mm(t,e){z(t,f4);let i=m(e,"enabled",3,!1);var o=p4(),n=h(o);let a;me(2),g(o),S(s=>a=J(n,1,"toggle svelte-17wbjko",null,a,s),[()=>({on:i()})]),_(t,o)}var m4=(t,e,i)=>{_h(t,e(),o=>i()(o))},v4=(t,e,i)=>{t.stopPropagation(),e()(!i())},g4=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),h4=M('<li role="menuitem" tabindex="0"><!></li>');function vm(t,e){H(e,!0);let i=m(e,"isMobile",3,!1),o=m(e,"onClick",3,e1.noop),n=m(e,"enabled",3,!1),a=m(e,"tooltipText",3,void 0),s=m(e,"maxTooltipWidth",3,void 0);var d=h4();let l;d.__click=[v4,o,n],d.__keydown=[m4,n,o];var c=h(d);Xa(c,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return s()},children:(u,b)=>{var p=g4();let $;var w=h(p),x=h(w);{var k=I=>{ns(I,{get icon(){return e.icon}})},C=I=>{var N=Be();let W=v(()=>e.icon);var Q=se(N);pi(Q,()=>r(W),(j,re)=>{re(j,{})}),_(I,N)};V(x,I=>{typeof e.icon=="string"?I(k):I(C,!1)})}g(w);var E=P(w,2),A=h(E,!0);g(E);var L=P(E,2);mm(L,{get enabled(){return n()}}),g(p),S(I=>{$=J(p,1,"switch-wrapper",null,$,I),ue(A,e.label)},[()=>({mobile:i()})]),_(u,p)},$$slots:{default:!0}}),g(d),S(u=>{l=J(d,1,"item switch-item",null,l,u),Ve(d,"aria-label",e.ariaLabel??e.label),Ve(d,"data-testid",e.id)},[()=>({mobile:i()})]),_(t,d),F()}ot(["click","keydown"]);var Td=require("@vkontakte/videoplayer-shared");var t1=()=>{let t=Z(le([])),e=v(()=>(r(t).length?r(t).at(-1):null)||null);return{get current(){return r(e)},pushSubMenu:i=>{r(t).push(i)},popSubMenu:()=>{D(t,le(r(t).slice(0,-1)))},popAllSubMenus:()=>{D(t,le([]))}}};var _4=M('<div class="quality-icon svelte-t2qk8t"><!></div>'),b4=M('<div class="quality-label svelte-t2qk8t"><span> </span> <!></div>'),$4={hash:"svelte-t2qk8t",code:".quality-label.svelte-t2qk8t {position:relative;}.quality.svelte-t2qk8t {font-size:13px;line-height:18px;}.quality.sub.svelte-t2qk8t {opacity:0.7;}.quality-icon.svelte-t2qk8t {position:absolute;padding-left:2px;transform:translateX(100%);display:flex;top:0;right:0;}.quality-icon.svelte-t2qk8t svg {color:var(--blue-light);}"};function ds(t,e){H(e,!0),z(t,$4);let i=m(e,"isSubCase",3,!1),o=v(()=>Bc(e.quality));var n=b4(),a=h(n);let s;var d=h(a,!0);g(a);var l=P(a,2);{var c=u=>{var b=_4();let p=v(()=>r(o));var $=h(b);pi($,()=>r(p),(w,x)=>{x(w,{})}),g(b),_(u,b)};V(l,u=>{r(o)&&!e.isMobile&&u(c)})}g(n),S(u=>{s=J(a,1,"svelte-t2qk8t",null,s,u),ue(d,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),_(t,n),F()}var r1=require("@vkontakte/videoplayer-shared");var gm=require("@vkontakte/videoplayer-core");var i1=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},o1=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=i1({quality:t,availableQualities:e});return i?t===gm.VideoQuality.INVARIANT?O("auto_quality_invariant"):O("auto_quality",{actual:o}):o},n1=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===gm.VideoQuality.INVARIANT?i:`${i}${i1({quality:t,availableQualities:e})}`:"...";var y4=M('<div class="menu-item-value-wrapper svelte-1j7b2kc"><!></div>'),x4={hash:"svelte-1j7b2kc",code:".menu-item-value-wrapper.svelte-1j7b2kc {line-height:normal;}"};function ol(t,e){H(e,!0),z(t,x4);let[i,o]=Le(),n=()=>y(l,"$currentQuality$",i),a=()=>y(c,"$availableQualities$",i),s=()=>y(u,"$isMobile$",i),d=be(),l=d.state.currentQuality$,c=d.state.availableQualities$,u=d.ui.isMobile,b=" \xB7 ",p=v(()=>e.prefix+(e.selected&&n()!==r1.VideoQuality.INVARIANT?b:"")),$=v(()=>n1({prefix:r(p),quality:n(),availableQualities:a(),onlyPrefix:!e.selected}));var w=y4(),x=h(w);let k=v(()=>e.selected?n():void 0);ds(x,{get quality(){return r(k)},get label(){return r($)},get isMobile(){return s()},isSubCase:!0}),g(w),_(t,w),F(),o()}var w4=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,n="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${n}|${a}`,"g")},S4={br:!0,span:!0},hm=(t,e={})=>{if(!t)return t;let i={...S4,...e},o=Object.keys(i);if(!o.length)return t;let n=w4(o),a=[],s=0;for(let d of t.matchAll(n)){let l=d[0],c=d.groups?.keyhtml||d.groups?.keyi18n||d.groups?.keyhtmlself||d.groups?.keyi18nself||"",{index:u}=d;if(!i[c]){a.push(t.slice(s,u)),s=u+l.length;continue}let b=d.groups?.childrenhtml?hm(d.groups.childrenhtml,i):"",p=d.groups?.childrenhtml?l.replace(new RegExp(d.groups?.childrenhtml),()=>b||""):l;a.push(t.slice(s,u),p),s=u+l.length}return s===0?t:(a.push(t.slice(s)),a.join(""))};function kd(t,e){H(e,!1);let i=m(e,"message",8),o=hm(i());fr();var n=Be(),a=se(n);{var s=d=>{var l=Be(),c=se(l);Ll(c,()=>o,!1,!1),_(d,l)};V(a,d=>{o&&d(s)})}_(t,n),F()}var C4=M('<p class="quality-applies sublabel svelte-1qk3zto"><!></p>'),k4={hash:"svelte-1qk3zto",code:".quality-applies.svelte-1qk3zto {display:flex;justify-content:end;padding:3px 0;color:rgba(255, 255, 255, 0.5);}.quality-applies span {color:#70c1ff;}"};function _m(t,e){H(e,!1),z(t,k4),fr();var i=C4(),o=h(i);let n=cr(()=>O("quality_applience",{action:`<span>${O("quality_applience_action")}</span>`}));kd(o,{get message(){return r(n)}}),g(i),_(t,i),F()}var s1=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"QUALITY_OTHER",type:"OPEN_SUB_MENU",selected:o,valueComponent:ol,valueComponentParams:{prefix:O("other_quality"),selected:o},children:"QUALITY"}},bm=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"QUALITY_AUTO",type:"SELECT_VALUE",value:"auto",label:O("auto_quality_limit"),valueComponent:e?ol:void 0,valueComponentParams:{prefix:O("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),l1=()=>({id:"QUALITY_APPLIENCE",type:"OPEN_SUB_MENU",valueComponent:_m,bottomBordered:!0,children:"QUALITY_APPLIENCE"}),$m=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"QUALITY_HIGH",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:O("high_quality"),valueComponent:t?ol:void 0,valueComponentParams:{prefix:O("high_quality"),selected:i},sublabel:O("high_quality_description")}),ym=({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:O("traffic_saving_quality"),valueComponent:t?ol:void 0,valueComponentParams:{prefix:O("traffic_saving_quality"),selected:i},sublabel:O("traffic_saving_quality_description")});var Jc=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),eu=(t,e)=>{if(!t)return"";let{language:i,label:o}=t,n;if(i==="und"?n=void 0:i&&(n=Kc(i)??i),o&&i&&n){let s=e.filter(d=>d.label===o&&d.language===i);if(s.length===1)return O("audio_stream_display_language_label",{language:n,label:o});{let d=Jc(t,s);return O("audio_stream_display_language_label_index",{language:n,label:o,index:d})}}if(o){let s=e.filter(d=>d.label===o);if(s.length===1)return o;{let d=Jc(t,s);return O("audio_stream_display_label_index",{label:o,index:d})}}if(i&&n){let s=e.filter(d=>d.language===i);if(s.length===1)return n;{let d=Jc(t,s);return O("audio_stream_display_language_index",{language:n,index:d})}}let a=Jc(t,e);return O("audio_stream_display_unknown",{index:a})};var T4={QUALITY_DETAILS:t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:n}=t,a=[];return i&&a.push({handler:bm,selected:e&&!o&&!n||!1}),a.push({handler:ym,selected:o},{handler:$m,selected:n}),{title:O("submenu_quality"),id:"QUALITY_DETAILS",items:[l1(t),...a.map(({handler:s,selected:d})=>s({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),s1(t)]}},QUALITY:({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"QUALITY",title:O("submenu_quality"),closeSettingsMenu:t,items:i.map(n=>({type:"SELECT_VALUE",value:n.value,valueComponent:ds,valueComponentParams:{quality:n.value,label:n.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:n.selected,label:n.displayValue}))}),QUALITY_APPLIENCE:t=>{let{closeSettingsMenu:e}=t;return{id:"QUALITY_APPLIENCE",title:O("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:bm,selected:Sc()?.type==="auto_quality"},{handler:ym,selected:Sc()?.type==="traffic_saving"},{handler:$m,selected:Sc()?.type==="high_quality"}].map(({handler:i,selected:o})=>i({labelWithQuality:!1,appliesTo:"as-default",selected:o},t))}},AUDIO_LANGUAGES:({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"AUDIO_LANGUAGES",title:O("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(n=>({type:"SELECT_VALUE",value:n,dataValue:n.id,selectItem:o,selected:n.id===i?.id,label:eu(n,e)}))}),PLAYBACK_RATE_SUB_MENU:({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"PLAYBACK_RATE_SUB_MENU",title:O("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:O("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i,selectItem:e,selected:i.selected,label:i.displayValue,dataTestid:i.value}))})},d1=({subMenuId:t,context:e})=>t?[T4[t](e)]:[];var I4=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M.1 6.5c0-2.24 0-3.36.436-4.216A4 4 0 0 1 2.284.536C3.139.1 4.259.1 6.5.1h5c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748c.436.856.436 1.976.436 4.216s0 3.36-.436 4.216a4 4 0 0 1-1.748 1.748c-.836.426-1.925.436-4.064.436l.55 2.2H14.1a.9.9 0 0 1 0 1.8H3.9a.9.9 0 1 1 0-1.8h1.897l.55-2.2c-2.139 0-3.227-.01-4.063-.436a4 4 0 0 1-1.748-1.748C.1 9.86.1 8.74.1 6.5m11.4-4.6h-5c-1.15 0-1.904.002-2.481.049-.556.045-.786.124-.918.19a2.2 2.2 0 0 0-.962.962c-.067.132-.145.363-.19.918-.048.577-.05 1.331-.05 2.481s.002 1.904.05 2.48c.045.556.123.787.19.919a2.2 2.2 0 0 0 .962.961c.132.068.362.146.918.192.577.047 1.33.048 2.48.048h5c1.15 0 1.904-.001 2.481-.048.556-.046.787-.124.918-.192a2.2 2.2 0 0 0 .962-.961c.067-.132.146-.363.191-.918.047-.577.049-1.331.049-2.48s-.002-1.905-.049-2.482c-.045-.555-.124-.786-.191-.918a2.2 2.2 0 0 0-.962-.961c-.131-.067-.362-.146-.918-.191-.577-.048-1.33-.049-2.48-.049m-3.298 11-.55 2.2h2.695l-.55-2.2z" clip-rule="evenodd"></path></svg>');function xm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=I4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"17",fill:"none","aria-hidden":"true","data-testid":"traffic-saving-icon",role:"img",...i})),_(t,o)}var E4=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M8.295 14.247c1.87 1.896 5.505.02 5.505-3.548V5.645l2.399-.697A2.74 2.74 0 0 0 18 2.364l-.01-1.72a.75.75 0 0 0-.906-.623l-.267.061c-.941.215-1.886.431-2.807.721-1.332.45-2.03 1.614-2.01 3.077V9c-3.887.196-5.639 3.286-3.705 5.247M.9.1a.9.9 0 0 0 0 1.8h8.197a.9.9 0 0 0 0-1.8zM.9 5.1a.9.9 0 1 0 0 1.8h7.196a.9.9 0 0 0 0-1.8zM0 11a.9.9 0 0 1 .9-.9h4.183a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11"></path></svg>');function wm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=E4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"15",fill:"none","aria-hidden":"true","data-testid":"audio-languages-icon",role:"img",...i})),_(t,o)}var P4=ve('<svg><!><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z"></path><path fill="var(--btn-color, #fff)" fill-rule="nonzero" d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A7.94 7.94 0 0 1 11 4.07M5.69 7.1 4.26 5.68A9.95 9.95 0 0 0 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A7.87 7.87 0 0 1 4.07 13zM11 21.95v-2.02a7.94 7.94 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.688 8.576l4.746 2.736a.792.792 0 0 1 0 1.372l-4.746 2.737a.792.792 0 0 1-1.188-.686V9.262a.792.792 0 0 1 1.188-.686"></path></g></svg>');function Sm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=P4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true","data-testid":"play-speed-icon",role:"img",...i})),_(t,o)}var A4=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M8 0a.9.9 0 0 1 .9.9v10.927l4.564-4.563a.9.9 0 0 1 1.272 1.272l-6.1 6.1a.9.9 0 0 1-1.272 0l-6.1-6.1a.9.9 0 1 1 1.272-1.272L7.1 11.827V.9A.9.9 0 0 1 8 0M0 18a.9.9 0 0 1 .9-.9h14.2a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 18" clip-rule="evenodd"></path></svg>');function Cm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=A4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"19",fill:"none","aria-hidden":"true","data-testid":"download-icon",role:"img",...i})),_(t,o)}var M4=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M8.863 2.1h6.274c.674-.002 1.2.211 1.683.697l4.383 4.383c.478.476.699.998.697 1.683v6.274c.002.685-.22 1.207-.697 1.683l-4.383 4.383c-.476.478-.998.699-1.683.697H8.863c-.685.002-1.207-.22-1.683-.697L2.797 16.82c-.478-.476-.699-.998-.697-1.683V8.863c-.002-.685.22-1.207.697-1.683L7.18 2.797c.484-.486 1.009-.699 1.683-.697m-.445 2.005L4.105 8.418c-.18.18-.205.242-.205.495v6.174c0 .25.025.316.205.495l4.313 4.313c.179.179.24.205.495.205h6.174c.253 0 .316-.026.495-.205l4.313-4.313c.18-.18.205-.245.205-.495V8.913c0-.254-.026-.316-.205-.495l-4.313-4.313c-.18-.18-.242-.205-.495-.205H8.913c-.254 0-.319.029-.495.205M13 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" clip-rule="evenodd"></path></svg>');function km(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=M4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"report-icon",role:"img",...i})),_(t,o)}var L4=ve('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4 12.3V12c0-1.47.005-2.547.075-3.403.074-.904.216-1.482.454-1.949a4.85 4.85 0 0 1 2.12-2.12c.466-.237 1.044-.379 1.948-.453C9.51 4.001 10.675 4 12.3 4h4.512a2 2 0 0 0-.174-.49 2.4 2.4 0 0 0-1.048-1.048 2.4 2.4 0 0 0-.931-.239 14 14 0 0 0-1.026-.023H12.26c-1.576 0-2.814 0-3.81.081-1.014.083-1.856.255-2.62.644A6.65 6.65 0 0 0 2.926 5.83c-.389.763-.56 1.605-.644 2.62-.081.995-.081 2.233-.081 3.809v1.373c0 .392 0 .738.023 1.025.025.306.081.623.239.931a2.4 2.4 0 0 0 1.048 1.05c.162.082.326.136.49.173V12.3zM10.08 6h-.035c-.52 0-.964 0-1.329.03-.383.03-.755.097-1.112.276a2.9 2.9 0 0 0-1.298 1.298c-.179.357-.246.73-.277 1.112C6 9.081 6 9.524 6 10.046v7.909c0 .52 0 .964.03 1.329.03.382.097.755.276 1.112a2.9 2.9 0 0 0 1.298 1.298c.357.179.73.246 1.112.277.365.029.808.029 1.329.029h6.91c.52 0 .964 0 1.329-.03.382-.03.755-.097 1.112-.276a2.9 2.9 0 0 0 1.298-1.298c.179-.357.246-.73.277-1.112.029-.365.029-.808.029-1.33v-7.909c0-.52 0-.964-.03-1.329-.03-.382-.097-.755-.276-1.112a2.9 2.9 0 0 0-1.298-1.298c-.357-.179-.73-.246-1.112-.277C17.919 6 17.476 6 16.954 6zM8.408 7.916c.065-.032.179-.07.452-.093a18 18 0 0 1 1.22-.023h6.84c.565 0 .936 0 1.22.023.273.022.387.06.452.093a1.1 1.1 0 0 1 .492.492c.032.065.07.179.093.452.022.284.023.655.023 1.22v7.84c0 .565 0 .936-.023 1.22-.023.273-.06.387-.093.452a1.1 1.1 0 0 1-.492.492c-.065.032-.18.07-.452.093a18 18 0 0 1-1.22.023h-6.84c-.565 0-.936 0-1.22-.023-.273-.023-.387-.06-.452-.093a1.1 1.1 0 0 1-.492-.492c-.032-.065-.07-.18-.093-.452a17 17 0 0 1-.023-1.22v-7.84c0-.565 0-.936.023-1.22.022-.273.06-.387.093-.452a1.1 1.1 0 0 1 .492-.492" clip-rule="evenodd"></path></svg>');function tu(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=L4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"copy-icon",role:"img",...i})),_(t,o)}var V4=ve('<svg><!><path fill="var(--btn-color, #fff)" d="M12 20.105a8.105 8.105 0 1 0 0-16.21 8.105 8.105 0 0 0 0 16.21M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10m0-12.372a1.316 1.316 0 1 1 0-2.632 1.316 1.316 0 0 1 0 2.632m-.947 2.822c0-.541.424-.98.947-.98s.947.439.947.98v3.83c0 .54-.424.98-.947.98s-.947-.44-.947-.98z"></path></svg>');function Tm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=V4();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"info-icon",role:"img",...i})),_(t,o)}var R4=M('<div class="menu-item-value-wrapper svelte-1j7b2kc"><!></div>'),N4={hash:"svelte-1j7b2kc",code:".menu-item-value-wrapper.svelte-1j7b2kc {line-height:normal;}"};function Im(t,e){H(e,!0),z(t,N4);let[i,o]=Le(),n=()=>y(c,"$currentQuality$",i),a=()=>y(u,"$availableQualities$",i),s=()=>y(b,"$isAutoQualityEnabled$",i),d=()=>y(p,"$isMobile$",i),l=be(),c=l.state.currentQuality$,u=l.state.availableQualities$,b=l.state.isAutoQualityEnabled$,p=l.ui.isMobile,$=v(()=>o1({quality:n(),availableQualities:a(),isAutoQualityEnabled:s()}));var w=R4(),x=h(w);ds(x,{get quality(){return n()},get label(){return r($)},get isMobile(){return d()}}),g(w),_(t,w),F(),o()}var B4={QUALITY_SETTINGS:({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?O("auto_quality_option"):e)||"";return{id:"QUALITY_SETTINGS",type:"OPEN_SUB_MENU",ariaLabel:O("aria_label_menu_quality",{actual:o}),icon:ed,label:O("menu_quality"),value:e,valueComponent:Im,weight:hr["quality-settings"],children:i?"QUALITY_DETAILS":"QUALITY"}},TRAFFIC_SAVING_SWITCH:({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"TRAFFIC_SAVING_SWITCH",weight:hr["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:t?O("aria_label_submenu_traffic_saving_off"):`${O("aria_label_submenu_traffic_saving_on")}. ${O("traffic_saving_helper_text")}`,icon:xm,label:O("menu_traffic_saving"),enabled:t,tooltipText:O("traffic_saving_helper_text"),maxTooltipWidth:175}),AUDIO_LANGUAGES:({currentAudioStream:t,availableAudioStreams:e})=>{let i=eu(t,e);return{id:"AUDIO_LANGUAGES",weight:hr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:O("aria_label_menu_audio_languages",{actual:i}),icon:wm,label:O("menu_audio_languages"),value:i,children:"AUDIO_LANGUAGES"}},PLAYBACK_RATE:({availablePlaybackRates:t,currentPlaybackRate:e})=>{let i=t.find(o=>o.value===e)?.displayValue||"";return{id:"PLAYBACK_RATE",weight:hr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:O("aria_label_menu_rate",{actual:i}),icon:Sm,label:O("menu_playback_rate"),value:`${e}x`,children:"PLAYBACK_RATE_SUB_MENU"}},SUBTITLES:({currentSubtitle:t})=>({id:"SUBTITLES",weight:hr["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:O("aria_label_menu_subtitle",{actual:t.displayValue}),icon:td,label:O("subtitles_caption"),value:t.displayValue,children:"SUBTITLES"}),DOWNLOAD:({onDownloadClick:t})=>({id:"DOWNLOAD",weight:hr.download,type:"CLICK",onClick:t,label:O("download_video_caption"),ariaLabel:O("aria_label_menu_download"),icon:Cm}),SHOW_SUPPORT:({onReportProblemClick:t})=>({id:"SHOW_SUPPORT",weight:hr.report,type:"CLICK",onClick:t,label:O("menu_report"),ariaLabel:`${O("menu_report")}. ${O("aria_label_new_tab_alert")}`,icon:km,isHiddenFor:["desktop"]}),COPY_DATA:({onCopyDataClick:t})=>({id:"COPY_DATA",weight:hr["copy-data"],type:"CLICK",onClick:t,label:O("menu_copy_debug"),ariaLabel:O("menu_copy_debug"),icon:tu,isHiddenFor:["desktop"]}),SAVE_TRACE_INFO:({onSaveTraceDataClick:t})=>({id:"SAVE_TRACE_INFO",weight:hr["save-trace-info"],type:"CLICK",onClick:t,label:O("menu_save_debug"),ariaLabel:O("menu_save_debug"),icon:tu,isHiddenFor:["desktop"]}),DEBUG_INFO:({toggleShowDebugInfo:t,debugPanelVisible:e})=>({id:"DEBUG_INFO",weight:hr["debug-info"],type:"CLICK",onClick:t,label:e?O("aria_label_menu_debug_overlay_disable"):O("aria_label_menu_debug_overlay_enable"),ariaLabel:O("menu_debug_overlay"),icon:Tm,isHiddenFor:["desktop"]})},c1=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(n=>B4[n](e)),...i.map(n=>({...n,isAdditional:!0}))].filter(n=>!n?.isHiddenFor?.length||!n?.isHiddenFor?.includes("desktop")&&!o||!n?.isHiddenFor?.includes("mobile")&&o).sort(Qa)};var H4=(t,e)=>{Lc(t,e)},F4=M('<div><div> </div> <div class="close svelte-17or3al"></div></div>'),U4=M('<div data-testid="settings-menu"><!> <ul role="menu"></ul></div>'),z4=M("<div><!> <!></div>"),q4={hash:"svelte-17or3al",code:`.settings-menu-container.mobile.svelte-17or3al {width:100%;}.settings-menu-container.svelte-17or3al ul {margin:0;padding:0;list-style-type:none;}.settings-menu-container.svelte-17or3al .menu {background-color:var(--settings-bg);border-radius:var(--settings-radius);transition:opacity 0.2s, visibility 0.2s;overflow:hidden;}.settings-menu-container.svelte-17or3al .menu .item:first-child:not(.mobile) {border-top-right-radius:var(--settings-radius);border-top-left-radius:var(--settings-radius);}.settings-menu-container.svelte-17or3al .menu .item:last-child {border-bottom-right-radius:var(--settings-radius);border-bottom-left-radius:var(--settings-radius);}.settings-menu-container.svelte-17or3al .settings-menu .item:first-child:not(.mobile) {padding-top:6px;}.settings-menu-container.svelte-17or3al .settings-menu .item:last-child:not(.mobile) {padding-bottom:6px;}.settings-menu-container.svelte-17or3al .menu.desktop {position:absolute;right:0;bottom:0;max-width:100%;}.settings-menu.svelte-17or3al {line-height:40px;}.settings-menu.desktop.svelte-17or3al {
306
306
  /* \u043D\u0443\u0436\u043D\u043E \u0447\u0442\u043E\u0431 \u043C\u0435\u043D\u044E \u043D\u0435 \u0441\u043A\u0430\u043A\u0430\u043B\u043E \u0432 \u0448\u0438\u0440\u0438\u043D\u0435 \u043F\u0440\u0438 \u0441\u043C\u0435\u043D\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u044F, \u043E\u0441\u043E\u0431\u043E \u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E \u043F\u0440\u0438 \u0430\u0432\u0442\u043E \u0440\u0435\u0436\u0438\u043C\u0435 */min-width:300px;}.settings-menu-container.svelte-17or3al .menu.mobile {width:100%;background:var(--mobile-settings-bg);font-size:15px;line-height:50px;}.settings-menu-container.svelte-17or3al .menu.mobile.hidden {display:none;}.settings-menu-container.svelte-17or3al .menu .item:not(.switch-item),
307
307
  .settings-menu-container.svelte-17or3al .menu .switch-wrapper {align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;white-space:nowrap;position:relative;}.settings-menu-container.svelte-17or3al .menu .item:hover {background-color:var(--settings-item-bg-hover);}.settings-menu-container.svelte-17or3al .menu .item.mobile:hover {background:var(--mobile-settings-bg);}.settings-menu.svelte-17or3al .item:not(.switch-item),
308
308
  .settings-menu.svelte-17or3al .switch-wrapper {padding:0 32px 0 18px;}.settings-menu.svelte-17or3al .item.mobile:not(.switch-item),
309
- .settings-menu.svelte-17or3al .switch-wrapper.mobile {padding:0 14px;}.settings-menu.svelte-17or3al .icon-wrapper {width:24px;min-width:24px;height:24px;display:flex;align-items:center;justify-content:center;margin-right:16px;}.settings-menu.svelte-17or3al .label {flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis;}.settings-menu.svelte-17or3al .item.header.mobile:where(.svelte-17or3al) {color:var(--white);cursor:pointer;justify-content:space-between;column-gap:12px;display:flex;border-bottom:var(--divider-border);margin-bottom:4px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar {width:8px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-track {box-shadow:none;background-color:#3a3a3a;border-radius:4px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-thumb {min-height:40px;border-radius:5px;background-color:#666;border:1px solid transparent;background-clip:padding-box;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-thumb:hover {background-color:#777;}.settings-menu-container.svelte-17or3al .items.mobile {overflow-y:auto;overflow-x:hidden;max-height:160px;text-align:left;}.close.svelte-17or3al {position:relative;width:12px;height:12px;padding:12px;margin-right:-12px;}.close.svelte-17or3al:before, .close.svelte-17or3al:after {position:absolute;left:18px;content:' ';height:12px;width:2px;background-color:var(--white);}.close.svelte-17or3al:before {transform:rotate(45deg);}.close.svelte-17or3al:after {transform:rotate(-45deg);}`};function Id(t,e){H(e,!0),z(t,q4);let[i,o]=Le(),n=()=>y(We,"$settingsMenuVisible",i),a=()=>y(Fe,"$settingsMenuOpenedByKeyboard",i),s=()=>y(ut,"$debugPanelVisible",i),d=()=>y(Ne,"$isMobile",i),l=()=>y(Je,"$playerSize",i),c=()=>y(Ae,"$hasMpegSources$",i),u=()=>y(je,"$mobileNotReportControlHidden$",i),b=()=>y(ie,"$autoQualityLimitingAvailable$",i),p=()=>y(U,"$availableSubtitlesList$",i),$=()=>y(et,"$isLiveWithPlaybackSpeed",i),w=()=>y(Ve,"$availableAudioStreams$",i),x=()=>y(Ke,"$availablePlaybackRates$",i),k=()=>y(Pe,"$currentAudioStream$",i),C=()=>y(de,"$currentPlaybackRate$",i),E=()=>y(ct,"$trafficSavingEnabled",i),A=()=>y(fe,"$currentQuality$",i),L=()=>y(R,"$isAutoQualityEnabled$",i),I=()=>y(oe,"$currentSubtitle$",i),N=()=>y(Ot,"$additionalSettingsMenuItems$",i),W=()=>y(Re,"$isAutoQualityAvailable$",i),Q=()=>y(Oe,"$availableQualities$",i),j=()=>y(mt,"$highQualityEnabled",i),re=m(e,"ref",15,void 0),ce=m(e,"playerControlsHeight",3,0),X=le({}),ge=le({}),ee=be(),Me=Rt(),Pe=ee.state.audioStream$,Ve=ee.state.availableAudioStreams$,fe=ee.state.currentQuality$,Oe=ee.state.availableQualities$,ie=ee.state.autoQualityLimitingAvailable$,R=ee.state.isAutoQualityEnabled$,Re=ee.state.isAutoQualityAvailable$,de=ee.state.currentPlaybackRate$,Ke=ee.state.availablePlaybackRates$,oe=ee.state.currentSubtitle$,U=ee.state.availableSubtitlesList$,Y=ee.state.canDownload,Ae=ee.state.hasMpegSources$,We=ee.ui.settingsMenu.visible$,Fe=ee.ui.settingsMenu.openedByBtnKeyboard$,ye=ee.ui.settingsMenu.ref$,Ne=ee.ui.isMobile,je=ee.ui.mobileNotReportControlHidden$,et=ee.state.canChangePlaybackSpeed$,ct=ee.state.trafficSavingEnabled$,mt=ee.state.highQualityEnabled$,Je=ee.ui.playerSize,ut=ee.ui.debugPanelVisible,$t=ee.state.isInteractiveTime$,Ot=ee.ui.additionalSettingsMenuItems$,we=ee.ui.t,Dt=ee.actions.internal.downloadVideo,ft=ee.actions.internal.closeSettingsMenu,K=ee.actions.internal.openSettingsSubMenu,he=ee.actions.internal.closeSettingsSubMenu,ae=Z(!1),qe=Z(void 0),Xe=t1();He(()=>{!n()&&Xe.current&&(he(ge[Xe.current]),Xe.popAllSubMenus())}),He(()=>{n()||D(qe,void 0)}),He(()=>{!Xe.current&&r(qe)&&gh(X,r(qe))}),He(()=>{re()&&ye.set(re())});async function Ue(Ct){Xe.pushSubMenu(Ct),await eo(),K(Ct,ge[Ct])}function Se(Ct){Ct?.stopPropagation(),a()||e.returnFocus?.(),ft(),D(ae,!1)}function Ye(Ct,Ft){ee.actions.internal.setQuality(Ct,{appliesTo:Ft}),Se()}function Ee(Ct){ee.actions.internal.setAudioStream(Ct),Se()}function lt(Ct,Ft){ee.actions.internal.setTrafficSavingEnabled(Ct,Ft),Me.features.qualityDetailsSubMenuEnabled&&Se()}function gt(Ct,Ft){ee.actions.internal.setHighQualityEnabled(Ct,Ft),Se()}function St(Ct){ee.actions.internal.setPlaybackRate(Ct),Se()}function oi(Ct){ee.actions.internal.setSubtitle(Ct),Se()}function ti(){Dt()}function Bi(){(0,Td.isValidURL)(e.supportLink)&&window.open(e.supportLink,"_blank"),ee.actions.internal.reportProblem(),ee.actions.internal.pause()}function un(){zs(ee.actions.internal.getDebugTextData())}let pn=()=>{let Ct=ee.actions.internal.getTraceTextData(),Ft=new Blob([...Ct],{type:"application/json"}),_i=window.URL.createObjectURL(Ft);Fa(_i,"vk_player_trace_info","json")};function Wo(){ut.set(!s())}function wo(){D(ae,!0)}function Gi(){D(ae,!1)}function So(){return d()?`max-height: ${Math.round(l().height*.6)}px`:`max-height: ${l().height-32-ce()}px; overflow: auto;`}let Ko=v(()=>Y&&c()&&!u()),zt=v(()=>Me.features.trafficSaving&&!u()&&b()&&!Me.features.qualityDetailsSubMenuEnabled),Co=v(()=>p().length>0&&!u()),Qo=v(()=>!!$()&&!u()),G=v(()=>Me.features.audioLanguages&&w().length>=2&&!u()),Wt=v(()=>!u());Vt(()=>$t.subscribe(Ct=>{Ct&&!d()&&!r(ae)&&!a()&&Se()}));let Gt=v(()=>{let Ct=[r(Wt)&&"QUALITY_SETTINGS",r(G)&&"AUDIO_LANGUAGES",r(Qo)&&"PLAYBACK_RATE",r(Co)&&"SUBTITLES",r(zt)&&"TRAFFIC_SAVING_SWITCH",r(Ko)&&"DOWNLOAD",Me.showSupport&&"SHOW_SUPPORT","COPY_DATA",Me.features.saveTraceInfoToFile&&"SAVE_TRACE_INFO","DEBUG_INFO"].filter(Ft=>!!Ft);return c1({items:Ct,context:{qualityDetailsSubMenuEnabled:Me.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:x(),currentAudioStream:k(),availableAudioStreams:w(),currentPlaybackRate:C(),selectPlaybackRate:St,trafficSavingEnabled:E(),toggleTrafficSaving:lt,currentQuality:A()||Td.VideoQuality.INVARIANT,isAutoQualityEnabled:L()||!1,currentSubtitle:I(),isMobile:d(),onDownloadClick:ti,debugPanelVisible:s(),onCopyDataClick:un,onReportProblemClick:Bi,onSaveTraceDataClick:pn,toggleShowDebugInfo:Wo},additionalSettingsMenuItems:N()})}),ji=v(()=>d1({subMenuId:Xe.current,context:{availablePlaybackRates:x(),selectPlaybackRate:St,trafficSavingEnabled:E(),toggleTrafficSaving:lt,currentQuality:A()||Td.VideoQuality.INVARIANT,isAutoQualityEnabled:L()||!1,isAutoQualityAvailable:W()||!1,availableQualities:Q(),highQualityEnabled:j(),toggleHighQuality:gt,availableAudioStreams:w(),availableSubtitlesList:p(),closeSettingsMenu:ft,currentAudioStream:k(),isMobile:d(),selectAudioLanguage:Ee,selectQuality:Ye,selectSubtitle:oi}}));var ii=z4();let ei;var Si=h(ii);{var It=Ct=>{var Ft=U4();let _i;Ft.__keydown=[H4,ft];var ko=h(Ft);{var fn=jt=>{var ht=F4();let no;var fi=h(ht),ci=h(fi,!0);g(fi);var To=P(fi,2);To.__click=Se,g(ht),S((Oi,Ci)=>{no=J(ht,1,"item header svelte-17or3al",null,no,Oi),ue(ci,Ci)},[()=>({mobile:d()}),()=>we("submenu_settings")]),_(jt,ht)};V(ko,jt=>{d()&&jt(fn)})}var Vi=P(ko,2);let oo;ui(Vi,21,()=>r(Gt),jt=>jt.id,(jt,ht)=>{var no=Be(),fi=se(no);{var ci=Oi=>{um(Oi,{get isMobile(){return d()},get id(){return r(ht).id},get icon(){return r(ht).icon},get label(){return r(ht).label},get ariaLabel(){return r(ht).ariaLabel},get value(){return r(ht).value},get valueComponent(){return r(ht).valueComponent},onClick:()=>{Ue(r(ht).children),D(qe,le(r(ht).id))},get ref(){return X[r(ht).id]},set ref(Ci){X[r(ht).id]=Ci}})},To=(Oi,Ci)=>{{var mn=bi=>{fm(bi,{get isMobile(){return d()},get id(){return r(ht).id},get onClick(){return r(ht).onClick},get icon(){return r(ht).icon},get label(){return r(ht).label},get ariaLabel(){return r(ht).ariaLabel},closeSettings:Se})},vn=(bi,Go)=>{{var ro=ao=>{vm(ao,{get isMobile(){return d()},get id(){return r(ht).id},get onClick(){return r(ht).onClick},get icon(){return r(ht).icon},get label(){return r(ht).label},get ariaLabel(){return r(ht).ariaLabel},get enabled(){return r(ht).enabled},get tooltipText(){return r(ht).tooltipText},get maxTooltipWidth(){return r(ht).maxTooltipWidth}})};V(bi,ao=>{r(ht).type==="SWITCH"&&ao(ro)},Go)}};V(Oi,bi=>{r(ht).type==="CLICK"?bi(mn):bi(vn,!1)},Ci)}};V(fi,Oi=>{r(ht).type==="OPEN_SUB_MENU"?Oi(ci):Oi(To,!1)})}_(jt,no)}),g(Vi),st(Vi,jt=>re(jt),()=>re()),g(Ft),S((jt,ht,no)=>{_i=J(Ft,1,"settings-menu menu svelte-17or3al",null,_i,jt),oo=J(Vi,1,"items",null,oo,ht),tt(Vi,no)},[()=>({desktop:!d(),mobile:d(),hidden:!!Xe.current}),()=>({mobile:d()}),So]),_t("mouseenter",Ft,wo),_t("mouseleave",Ft,Gi),_(Ct,Ft)};V(Si,Ct=>{n()&&Ct(It)})}var Mn=P(Si,2);ui(Mn,17,()=>r(ji),Ct=>Ct.id,(Ct,Ft)=>{let _i=v(()=>r(Ft).minWidth??137);cm(Ct,{get isMobile(){return d()},get playerControlsHeight(){return ce()},get returnFromSubMenu(){return Xe.popSubMenu},get id(){return r(Ft).id},get title(){return r(Ft).title},closeSettingsMenu:ft,openSubMenuList:Ue,get items(){return r(Ft).items},get minWidth(){return r(_i)},get refMenuItems(){return X},get listRef(){return ge[r(Ft).id]},set listRef(ko){ge[r(Ft).id]=ko}})}),g(ii),S(Ct=>ei=J(ii,1,"settings-menu-container svelte-17or3al",null,ei,Ct),[()=>({mobile:d(),hidden:!n()})]),_(t,ii),F(),o()}ot(["keydown","click"]);var W4=t=>t;function u1(t,{delay:e=0,duration:i=400,easing:o=W4}={}){let n=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*n}`}}var K4=M('<button class="button svelte-1sbbskl"> </button>'),Q4={hash:"svelte-1sbbskl",code:".button.svelte-1sbbskl {margin-top:12px;font-size:14px;line-height:18px;background:rgba(255, 255, 255, 0.1);padding:6px 12px 7px;border-radius:8px;}"};function Em(t,e){z(t,Q4);var i=K4();i.__click=function(...n){e.onClick?.apply(this,n)};var o=h(i,!0);g(i),S(()=>ue(o,e.label)),_(t,i)}ot(["click"]);var G4=M('<div class="container svelte-1es7arp"><div class="notification svelte-1es7arp"><div><p class="description svelte-1es7arp"><!></p> <!></div> <!></div></div>'),j4={hash:"svelte-1es7arp",code:`.container.svelte-1es7arp {position:absolute;left:0;right:0;top:20px;display:flex;justify-content:center;
309
+ .settings-menu.svelte-17or3al .switch-wrapper.mobile {padding:0 14px;}.settings-menu.svelte-17or3al .icon-wrapper {width:24px;min-width:24px;height:24px;display:flex;align-items:center;justify-content:center;margin-right:16px;}.settings-menu.svelte-17or3al .label {flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis;}.settings-menu.svelte-17or3al .item.header.mobile:where(.svelte-17or3al) {color:var(--white);cursor:pointer;justify-content:space-between;column-gap:12px;display:flex;border-bottom:var(--divider-border);margin-bottom:4px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar {width:8px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-track {box-shadow:none;background-color:#3a3a3a;border-radius:4px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-thumb {min-height:40px;border-radius:5px;background-color:#666;border:1px solid transparent;background-clip:padding-box;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-thumb:hover {background-color:#777;}.settings-menu-container.svelte-17or3al .items.mobile {overflow-y:auto;overflow-x:hidden;max-height:160px;text-align:left;}.close.svelte-17or3al {position:relative;width:12px;height:12px;padding:12px;margin-right:-12px;}.close.svelte-17or3al:before, .close.svelte-17or3al:after {position:absolute;left:18px;content:' ';height:12px;width:2px;background-color:var(--white);}.close.svelte-17or3al:before {transform:rotate(45deg);}.close.svelte-17or3al:after {transform:rotate(-45deg);}`};function Id(t,e){H(e,!0),z(t,q4);let[i,o]=Le(),n=()=>y(We,"$settingsMenuVisible",i),a=()=>y(Fe,"$settingsMenuOpenedByKeyboard",i),s=()=>y(ut,"$debugPanelVisible",i),d=()=>y(De,"$isMobile",i),l=()=>y(Je,"$playerSize",i),c=()=>y(Ae,"$hasMpegSources$",i),u=()=>y(je,"$mobileNotReportControlHidden$",i),b=()=>y(ie,"$autoQualityLimitingAvailable$",i),p=()=>y(U,"$availableSubtitlesList$",i),$=()=>y(et,"$isLiveWithPlaybackSpeed",i),w=()=>y(Re,"$availableAudioStreams$",i),x=()=>y(Ke,"$availablePlaybackRates$",i),k=()=>y(Pe,"$currentAudioStream$",i),C=()=>y(de,"$currentPlaybackRate$",i),E=()=>y(ct,"$trafficSavingEnabled",i),A=()=>y(fe,"$currentQuality$",i),L=()=>y(R,"$isAutoQualityEnabled$",i),I=()=>y(oe,"$currentSubtitle$",i),N=()=>y(Ot,"$additionalSettingsMenuItems$",i),W=()=>y(Ne,"$isAutoQualityAvailable$",i),Q=()=>y(Oe,"$availableQualities$",i),j=()=>y(mt,"$highQualityEnabled",i),re=m(e,"ref",15,void 0),ce=m(e,"playerControlsHeight",3,0),X=le({}),ge=le({}),ee=be(),Me=Rt(),Pe=ee.state.audioStream$,Re=ee.state.availableAudioStreams$,fe=ee.state.currentQuality$,Oe=ee.state.availableQualities$,ie=ee.state.autoQualityLimitingAvailable$,R=ee.state.isAutoQualityEnabled$,Ne=ee.state.isAutoQualityAvailable$,de=ee.state.currentPlaybackRate$,Ke=ee.state.availablePlaybackRates$,oe=ee.state.currentSubtitle$,U=ee.state.availableSubtitlesList$,Y=ee.state.canDownload,Ae=ee.state.hasMpegSources$,We=ee.ui.settingsMenu.visible$,Fe=ee.ui.settingsMenu.openedByBtnKeyboard$,ye=ee.ui.settingsMenu.ref$,De=ee.ui.isMobile,je=ee.ui.mobileNotReportControlHidden$,et=ee.state.canChangePlaybackSpeed$,ct=ee.state.trafficSavingEnabled$,mt=ee.state.highQualityEnabled$,Je=ee.ui.playerSize,ut=ee.ui.debugPanelVisible,$t=ee.state.isInteractiveTime$,Ot=ee.ui.additionalSettingsMenuItems$,we=ee.ui.t,Dt=ee.actions.internal.downloadVideo,ft=ee.actions.internal.closeSettingsMenu,K=ee.actions.internal.openSettingsSubMenu,he=ee.actions.internal.closeSettingsSubMenu,ae=Z(!1),qe=Z(void 0),Xe=t1();He(()=>{!n()&&Xe.current&&(he(ge[Xe.current]),Xe.popAllSubMenus())}),He(()=>{n()||D(qe,void 0)}),He(()=>{!Xe.current&&r(qe)&&gh(X,r(qe))}),He(()=>{re()&&ye.set(re())});async function Ue(Ct){Xe.pushSubMenu(Ct),await eo(),K(Ct,ge[Ct])}function Se(Ct){Ct?.stopPropagation(),a()||e.returnFocus?.(),ft(),D(ae,!1)}function Ye(Ct,Ft){ee.actions.internal.setQuality(Ct,{appliesTo:Ft}),Se()}function Ee(Ct){ee.actions.internal.setAudioStream(Ct),Se()}function lt(Ct,Ft){ee.actions.internal.setTrafficSavingEnabled(Ct,Ft),Me.features.qualityDetailsSubMenuEnabled&&Se()}function gt(Ct,Ft){ee.actions.internal.setHighQualityEnabled(Ct,Ft),Se()}function St(Ct){ee.actions.internal.setPlaybackRate(Ct),Se()}function oi(Ct){ee.actions.internal.setSubtitle(Ct),Se()}function ti(){Dt()}function Bi(){(0,Td.isValidURL)(e.supportLink)&&window.open(e.supportLink,"_blank"),ee.actions.internal.reportProblem(),ee.actions.internal.pause()}function un(){zs(ee.actions.internal.getDebugTextData())}let pn=()=>{let Ct=ee.actions.internal.getTraceTextData(),Ft=new Blob([...Ct],{type:"application/json"}),_i=window.URL.createObjectURL(Ft);Fa(_i,"vk_player_trace_info","json")};function Wo(){ut.set(!s())}function wo(){D(ae,!0)}function Gi(){D(ae,!1)}function So(){return d()?`max-height: ${Math.round(l().height*.6)}px`:`max-height: ${l().height-32-ce()}px; overflow: auto;`}let Ko=v(()=>Y&&c()&&!u()),zt=v(()=>Me.features.trafficSaving&&!u()&&b()&&!Me.features.qualityDetailsSubMenuEnabled),Co=v(()=>p().length>0&&!u()),Qo=v(()=>!!$()&&!u()),G=v(()=>Me.features.audioLanguages&&w().length>=2&&!u()),Wt=v(()=>!u());Vt(()=>$t.subscribe(Ct=>{Ct&&!d()&&!r(ae)&&!a()&&Se()}));let Gt=v(()=>{let Ct=[r(Wt)&&"QUALITY_SETTINGS",r(G)&&"AUDIO_LANGUAGES",r(Qo)&&"PLAYBACK_RATE",r(Co)&&"SUBTITLES",r(zt)&&"TRAFFIC_SAVING_SWITCH",r(Ko)&&"DOWNLOAD",Me.showSupport&&"SHOW_SUPPORT","COPY_DATA",Me.features.saveTraceInfoToFile&&"SAVE_TRACE_INFO","DEBUG_INFO"].filter(Ft=>!!Ft);return c1({items:Ct,context:{qualityDetailsSubMenuEnabled:Me.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:x(),currentAudioStream:k(),availableAudioStreams:w(),currentPlaybackRate:C(),selectPlaybackRate:St,trafficSavingEnabled:E(),toggleTrafficSaving:lt,currentQuality:A()||Td.VideoQuality.INVARIANT,isAutoQualityEnabled:L()||!1,currentSubtitle:I(),isMobile:d(),onDownloadClick:ti,debugPanelVisible:s(),onCopyDataClick:un,onReportProblemClick:Bi,onSaveTraceDataClick:pn,toggleShowDebugInfo:Wo},additionalSettingsMenuItems:N()})}),ji=v(()=>d1({subMenuId:Xe.current,context:{availablePlaybackRates:x(),selectPlaybackRate:St,trafficSavingEnabled:E(),toggleTrafficSaving:lt,currentQuality:A()||Td.VideoQuality.INVARIANT,isAutoQualityEnabled:L()||!1,isAutoQualityAvailable:W()||!1,availableQualities:Q(),highQualityEnabled:j(),toggleHighQuality:gt,availableAudioStreams:w(),availableSubtitlesList:p(),closeSettingsMenu:ft,currentAudioStream:k(),isMobile:d(),selectAudioLanguage:Ee,selectQuality:Ye,selectSubtitle:oi}}));var ii=z4();let ei;var Si=h(ii);{var It=Ct=>{var Ft=U4();let _i;Ft.__keydown=[H4,ft];var ko=h(Ft);{var fn=jt=>{var ht=F4();let no;var fi=h(ht),ci=h(fi,!0);g(fi);var To=P(fi,2);To.__click=Se,g(ht),S((Oi,Ci)=>{no=J(ht,1,"item header svelte-17or3al",null,no,Oi),ue(ci,Ci)},[()=>({mobile:d()}),()=>we("submenu_settings")]),_(jt,ht)};V(ko,jt=>{d()&&jt(fn)})}var Vi=P(ko,2);let oo;ui(Vi,21,()=>r(Gt),jt=>jt.id,(jt,ht)=>{var no=Be(),fi=se(no);{var ci=Oi=>{um(Oi,{get isMobile(){return d()},get id(){return r(ht).id},get icon(){return r(ht).icon},get label(){return r(ht).label},get ariaLabel(){return r(ht).ariaLabel},get value(){return r(ht).value},get valueComponent(){return r(ht).valueComponent},onClick:()=>{Ue(r(ht).children),D(qe,le(r(ht).id))},get ref(){return X[r(ht).id]},set ref(Ci){X[r(ht).id]=Ci}})},To=(Oi,Ci)=>{{var mn=bi=>{fm(bi,{get isMobile(){return d()},get id(){return r(ht).id},get onClick(){return r(ht).onClick},get icon(){return r(ht).icon},get label(){return r(ht).label},get ariaLabel(){return r(ht).ariaLabel},closeSettings:Se})},vn=(bi,Go)=>{{var ro=ao=>{vm(ao,{get isMobile(){return d()},get id(){return r(ht).id},get onClick(){return r(ht).onClick},get icon(){return r(ht).icon},get label(){return r(ht).label},get ariaLabel(){return r(ht).ariaLabel},get enabled(){return r(ht).enabled},get tooltipText(){return r(ht).tooltipText},get maxTooltipWidth(){return r(ht).maxTooltipWidth}})};V(bi,ao=>{r(ht).type==="SWITCH"&&ao(ro)},Go)}};V(Oi,bi=>{r(ht).type==="CLICK"?bi(mn):bi(vn,!1)},Ci)}};V(fi,Oi=>{r(ht).type==="OPEN_SUB_MENU"?Oi(ci):Oi(To,!1)})}_(jt,no)}),g(Vi),st(Vi,jt=>re(jt),()=>re()),g(Ft),S((jt,ht,no)=>{_i=J(Ft,1,"settings-menu menu svelte-17or3al",null,_i,jt),oo=J(Vi,1,"items",null,oo,ht),tt(Vi,no)},[()=>({desktop:!d(),mobile:d(),hidden:!!Xe.current}),()=>({mobile:d()}),So]),_t("mouseenter",Ft,wo),_t("mouseleave",Ft,Gi),_(Ct,Ft)};V(Si,Ct=>{n()&&Ct(It)})}var Mn=P(Si,2);ui(Mn,17,()=>r(ji),Ct=>Ct.id,(Ct,Ft)=>{let _i=v(()=>r(Ft).minWidth??137);cm(Ct,{get isMobile(){return d()},get playerControlsHeight(){return ce()},get returnFromSubMenu(){return Xe.popSubMenu},get id(){return r(Ft).id},get title(){return r(Ft).title},closeSettingsMenu:ft,openSubMenuList:Ue,get items(){return r(Ft).items},get minWidth(){return r(_i)},get refMenuItems(){return X},get listRef(){return ge[r(Ft).id]},set listRef(ko){ge[r(Ft).id]=ko}})}),g(ii),S(Ct=>ei=J(ii,1,"settings-menu-container svelte-17or3al",null,ei,Ct),[()=>({mobile:d(),hidden:!n()})]),_(t,ii),F(),o()}ot(["keydown","click"]);var W4=t=>t;function u1(t,{delay:e=0,duration:i=400,easing:o=W4}={}){let n=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*n}`}}var K4=M('<button class="button svelte-1sbbskl"> </button>'),Q4={hash:"svelte-1sbbskl",code:".button.svelte-1sbbskl {margin-top:12px;font-size:14px;line-height:18px;background:rgba(255, 255, 255, 0.1);padding:6px 12px 7px;border-radius:8px;}"};function Em(t,e){z(t,Q4);var i=K4();i.__click=function(...n){e.onClick?.apply(this,n)};var o=h(i,!0);g(i),S(()=>ue(o,e.label)),_(t,i)}ot(["click"]);var G4=M('<div class="container svelte-1es7arp"><div class="notification svelte-1es7arp"><div><p class="description svelte-1es7arp"><!></p> <!></div> <!></div></div>'),j4={hash:"svelte-1es7arp",code:`.container.svelte-1es7arp {position:absolute;left:0;right:0;top:20px;display:flex;justify-content:center;
310
310
  /**
311
311
  * \u0415\u0441\u043B\u0438 \u043D\u0435 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u043C \u0443 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0430 \u0441\u043E\u0431\u044B\u0442\u0438\u044F, \u0442\u043E \u043D\u0435 \u0441\u043C\u043E\u0436\u0435\u043C \u043F\u043E \u044D\u0442\u043E\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u0432\u044B\u0437\u0432\u0430\u0442\u044C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u043D\u043E\u0435 \u043C\u0435\u043D\u044E.
312
312
  */pointer-events:none;}.notification.svelte-1es7arp {padding:9px 14px 10px 12px;background:var(--notification-bg);display:inline-flex;border-radius:var(--notification-radius);gap:10px;pointer-events:auto;}.description.svelte-1es7arp {line-height:16px;font-size:13px;margin:0;white-space:pre;}`};function Ed(t,e){H(e,!0),z(t,j4);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Rt(),{ui:{t:n}}=be(),a=n(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var s=G4(),d=h(s),l=h(d),c=h(l),u=h(c);kd(u,{message:a}),g(c);var b=P(c,2);{var p=w=>{let x=v(()=>n("slow_video_notification_button"));Em(w,{get label(){return r(x)},get onClick(){return e.onSelectAutoQuality}})};V(b,w=>{o||w(p)})}g(l);var $=P(l,2);ja($,{get onClick(){return e.onClose}}),g(d),g(s),up(3,d,()=>u1,()=>({duration:i})),_(t,s),F()}var cs="annotation",iu=class{constructor(){this.slots=new Map}init(e){this.shadowRootContainer=e}add(e,{overlay:i,id:o}){e.setAttribute("slot",cs),this.setupSlotStyles(e,i),this.shadowRootContainer.append(e),this.slots.set(o,e)}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"}}remove(e){let i=this.slots.get(e);i&&(i.remove(),this.slots.delete(e))}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}};var Y4=M('<div class="container svelte-f47ws8"><div class="playback_state_icon svelte-f47ws8"><!></div></div>'),Z4={hash:"svelte-f47ws8",code:`.container.svelte-f47ws8 {position:absolute;display:flex;width:100%;height:100%;align-items:center;justify-content:center;pointer-events:none;}.playback_state_icon.svelte-f47ws8 {display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:100%;background-color:#00000073;will-change:opacity, scale;
@@ -341,7 +341,7 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
341
341
  scale: 0;
342
342
  }
343
343
  }`};function Pm(t,e){H(e,!0),z(t,Z4);let[i,o]=Le(),n=()=>y(s,"$isPlaying$",i),a=()=>y(d,"$aboutToGoNextVideo",i),{state:{isPlaying$:s},ui:{aboutToGoNextVideo:d},actions:l}=be(),{features:{playbackStatusShow:c,playbackStatusAnimationDuration:u,playbackStatusNextVideoAnimationDuration:b}}=Rt(),p=0,$=Z(null),w=Z(!1);He(()=>{D($,le(n()?gr:Yr))}),He(()=>{D($,le(a()?ma:null))}),He(()=>{if(c)return p=window.setTimeout(()=>{p=0,a()&&r($)===ma&&(a()==="next"?l.internal.nextVideoClick(!1):l.internal.prevVideoClick(!1)),D($,null)},r($)!==ma?u:b),()=>{p&&(window.clearTimeout(p),p=0)}}),He(()=>{n()&&!r(w)&&(D(w,!0),D($,null))});var x=Be(),k=se(x);{var C=E=>{var A=Be(),L=se(A);Ra(L,()=>r($),I=>{var N=Y4(),W=h(N),Q=h(W);let j=v(()=>a()==="prev");pi(Q,()=>r($),(re,ce)=>{ce(re,{width:"40",height:"40",viewBox:"0 0 24 24",get isPrev(){return r(j)}})}),g(W),g(N),S(()=>tt(W,`animation-duration: ${r($)!==ma?u:b}ms`)),_(I,N)}),_(E,A)};V(k,E=>{r($)&&c&&E(C)})}_(t,x),F(),o()}var X4=M('<div><div data-testid="video-container"></div></div>'),J4={hash:"svelte-1czns9r",code:`.video-wrapper.svelte-1czns9r,
344
- .video-container.svelte-1czns9r {position:absolute;width:100%;height:100%;left:0;top:0;}.video-wrapper.svelte-1czns9r {z-index:var(--video-container-z-index);background:var(--black);}.video-container.svelte-1czns9r {z-index:var(--video-container-z-index);transition:var(--rotate-transition-duration) ease all;}.video-container.fast-rotate.svelte-1czns9r {transition:none;}.nocursor.svelte-1czns9r {cursor:none;}`};function us(t,e){H(e,!0),z(t,J4);let[i,o]=Le(),n=()=>y(u,"$rotateAlpha",i),a=()=>y(b,"$playerSize",i),s=()=>y(c,"$playerPhase",i),d=()=>y(p,"$isPlaying$",i),l=m(e,"videoContainer",15),{playerPhase:c,ui:{rotateAlpha:u,playerSize:b},state:{isPlaying$:p}}=be(),{isSmoothVideoRotate:$}=Rt(),w=v(()=>l()&&n()%180?a().height/a().width:1);var x=X4();let k;x.__contextmenu=function(...E){e.onContextMenu?.apply(this,E)},x.__mousedown=function(...E){e.onMouseDown?.apply(this,E)},x.__mouseup=function(...E){e.onMouseUp?.apply(this,E)},x.__click=function(...E){e.onClick?.apply(this,E)};var C=h(x);J(C,1,"video-container svelte-1czns9r",null,{},{"fast-rotate":!$}),st(C,E=>l(E),()=>l()),g(x),S(E=>{k=J(x,1,"video-wrapper svelte-1czns9r",null,k,E),tt(C,`transform: rotate(${n()}deg) scale(${r(w)})`),De(C,"data-is-playing",d())},[()=>({hidden:s()!=="video",nocursor:e.hideCursor})]),_(t,x),F(),o()}ot(["contextmenu","mousedown","mouseup","click"]);var e3=(t,e,i,o,n,a)=>{t.preventDefault(),e&&(i({message:"double click on video"}),o(),n(a.uiConfig.controls.hideTimeoutCursor))},t3=(t,e,i,o,n,a)=>{if(t.stopPropagation(),e()||o()){a();return}},i3=M("<div><!></div>"),o3=M('<div class="spherical-video-icon svelte-jtgjmv"><!></div>'),n3=M("<div><!></div>"),r3=M('<div class="settings-menu svelte-jtgjmv"><!></div>'),a3=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),s3=M("<!> <!> <!>",1),l3=M('<div class="blocked svelte-jtgjmv"></div>'),d3=M('<div class="player-wrapper svelte-jtgjmv"><!> <div class="overlay-container"></div></div> <!>',1),c3={hash:"svelte-jtgjmv",code:".player-wrapper.svelte-jtgjmv {position:absolute;width:100%;height:100%;}.blocked.svelte-jtgjmv {position:absolute;width:100%;height:100%;z-index:var(--overlay-container-z-index);}.player-wrapper.svelte-jtgjmv .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.spherical-video-icon.svelte-jtgjmv {display:inline-block;position:absolute;top:calc(50% - 23px);left:calc(50% - 38px);}.ads-container.svelte-jtgjmv {position:absolute;width:100%;height:100%;left:0;top:0;}.ads-container.svelte-jtgjmv {z-index:var(--ads-container-z-index);background:var(--black);}.settings-menu.svelte-jtgjmv {position:absolute;z-index:var(--settings-menu-z-index);bottom:57px;right:18px;left:0;transition:opacity 0.2s, visibility 0.2s;}"};function Mm(t,e){H(e,!0),z(t,c3);let[i,o]=Le(),n=()=>y(Po,"$notificationsToShow$",i),a=()=>y(Wo,"$playerPhase",i),s=()=>y(Gt,"$isLoaderVisible",i),d=()=>y(Bi,"$adPlaybackState",i),l=()=>y(Ct,"$crashed",i),c=()=>y(no,"$isInteractiveTime$",i),u=()=>y(Ko,"$settingsMenuVisible",i),b=()=>y(fi,"$isInteractiveExpectation$",i),p=()=>y(So,"$controlsVisible",i),$=()=>y(To,"$touched",i),w=()=>y(Vn,"$graphIsOpened$",i),x=()=>y(wo,"$isFullscreen",i),k=()=>y(_r,"$autoplayNextEnabled$",i),C=()=>y(Si,"$postrollPassed",i),E=()=>y(ji,"$isEnded$",i),A=()=>y(Ao,"$cursorInside",i),L=()=>y(gn,"$fakeIsPlaying$",i),I=()=>y(Ri,"$bottomNoSmooth",i),N=()=>y(vn,"$interactiveTimeIndicator",i),W=()=>y(Vi,"$playerSize",i),Q=()=>y(oo,"$is3DVideo",i),j=()=>y(G,"$contextMenuVisible$",i),re=()=>y(ti,"$playbackState$",i),ce=()=>y(Oi,"$hotKeyMapData",i),X=()=>y(Co,"$scrubbingInProgress",i),ge=()=>y(Qo,"$volumeChangingInProgress",i),ee=()=>y(ii,"$chromecastConnected$",i),Me=()=>y(vo,"$controlsTimeoutActive",i),Pe=()=>y(zt,"$settingsMenuOpenedByKeyboard",i),Ve=()=>y(_o,"$contextMenuOpenedByKeyboard$",i),fe=()=>y(xr,"$contextMenuButtonRef$",i),Oe=()=>y(rr,"$contextMenuOpenedByHotKey$",i),ie=()=>y(wr,"$contextMenuLastActiveElem$",i),R=()=>y(Gi,"$isFullscreenOpenedByKeyboard",i),Re=()=>y(oi,"$language$",i),de=()=>y(jt,"$icon3DVideoVisible",i),Ke=()=>y(ei,"$chromecastDeviceName$",i),oe=()=>y(ko,"$currentSubtitle$",i),U=()=>y(fn,"$currentSubtitleCaptions$",i),Y=()=>y(un,"$position$",i),Ae=()=>y(pn,"$duration$",i),We=()=>y(It,"$isLive$",i),Fe=()=>y(Mn,"$isPlaying$",i),ye=()=>y(Go,"$contextMenuPosition$",i),Ne=()=>y(Ci,"$showHotKeyMap",i),je=()=>y(Wt,"$debugPanelVisible",i),et=()=>y(Zn,"$userActionsDisabled$",i),ct=m(e,"videoContainer",15),mt=m(e,"adsSlotId",3,void 0),Je=m(e,"adsParams",3,void 0),ut=m(e,"adsPreviewParam",3,void 0),$t=m(e,"adsAutoplayParam",3,void 0),Ot=m(e,"duration",3,void 0),we=m(e,"logoTargetUrl",3,""),Dt=m(e,"showNextPrevButtons",3,!1),ft=m(e,"nextButtonActive",3,!1),K=m(e,"prevButtonActive",3,!1),he=m(e,"endScreenVideoTitle",3,void 0),ae=m(e,"endScreenVideoThumb",3,void 0),qe=m(e,"isOneVideoPlaylist",3,!1),Xe=m(e,"shadowRootContainer",3,void 0),Ue=m(e,"outerContainerRef",3,void 0),Se=m(e,"playerStarted",3,!1),Ye=m(e,"fullScreenTarget",3,void 0),Ee=m(e,"showMiniTimer",3,!1),lt=m(e,"showEndScreen",3,!0),gt=m(e,"keyboardControls",15),St=e.store.getLogger().createComponentLog("Root component"),oi=e.store.interfaceLanguage$,ti=e.store.state.playbackState$,Bi=e.store.ads.playbackState,un=e.store.state.positionWithScrubbing$,pn=e.store.state.duration$,Wo=e.store.playerPhase,wo=e.store.ui.isFullscreen,Gi=e.store.ui.isFullscreenOpenedByKeyboard,So=e.store.ui.controlsVisible,Ko=e.store.ui.settingsMenu.visible$,zt=e.store.ui.settingsMenu.openedByBtnKeyboard$,Co=e.store.ui.scrubbingInProgress,Qo=e.store.ui.volumeChangingInProgress,G=e.store.ui.contextMenu.visible$,Wt=e.store.ui.debugPanelVisible,Gt=e.store.state.isLoaderVisible,ji=e.store.state.isEnded$,ii=e.store.state.chromecastConnected$,ei=e.store.state.chromecastDeviceName$,Si=e.store.ads.postrollPassed,It=e.store.state.isLive$,Mn=e.store.state.isPlaying$,Ct=e.store.state.crashed$,Ft=e.store.webApi.annotationsApi,_i=e.store.webApi.pictureInPictureApi,ko=e.store.state.currentSubtitle$,fn=e.store.state.currentSubtitleCaptions$,Vi=e.store.ui.playerSize,oo=e.store.ui.is3DVideo,jt=e.store.ui.icon3DVideoVisible,ht=e.store.state.isInteractive,no=e.store.state.isInteractiveTime$,fi=e.store.state.isInteractiveExpectation$,ci=e.store.state.hasInteractiveBranches,To=e.store.ui.touched,Oi=e.store.ui.modals.hotKeyMap.data,Ci=e.store.ui.modals.hotKeyMap.show,mn=e.store.ui.overlayContainer$,vn=e.store.ui.controls.interactiveTimeIndicator,bi=e.store.state.showInteractiveTimeIndicator,Go=e.store.ui.contextMenu.position$,ro=e.store.actions.internal.setQuality,ao=e.store.actions.internal.closeSettingsMenu,_r=e.store.ui.autoplayNextEnabled$,Zn=e.store.ui.userActionsDisabled,{fakeIsPlaying$:gn,notifications$:Ln,graphIsOpened$:Vn}=Qi(),Yi=Z(void 0),Io=Z(void 0),hn=Z(void 0),it=Z(void 0),Eo,jo,_n;Oi.set(uh());let{closeNotification:Xn,notificationsToShow$:Po}=Ln,Rn=v(()=>!!n().slow_video),Yo=()=>Xn("slow_video"),bn=v(()=>(a()==="video"&&s()||a()==="ads"&&d()==="inactive")&&!l()),$i=Z(void 0),Ri=ne(!1),$n,vo=ne(!1),yn=ne(),Ao=ne(!1),go=Z(!1),ni=Z(!1),Nn=Z(!1),so=Z(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Jn=v(()=>c()&&!u()&&!(r(go)||r(ni))&&!(r(Nn)&&!b())),Zo=!0,Xo=v(()=>e.uiConfig.features.thumbTimer&&Ee()&&a()==="video"&&!p()&&!l()&&!ht&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),er=v(()=>a()==="video"&&!w()&&x()),Mo=Z(!1),br=v(()=>(lt()||e.showAutoplayNext&&k())&&!!he()&&!!ae()&&(e.showAds&&C()||!e.showAds)&&E()&&!l()&&!r(Mo)),xn=v(()=>A()&&!(p()||r(br))&&!c()),Dn=Z(!1),tr=v(()=>L()!==null),{toggle:$r}=gn,Bn=!1,Jo=null;_i?.setContext(El());let On=()=>{e.autoplay&&!ht&&e.uiConfig.controls.showOnStartupAtAutoplay&&Ze(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:On});let Yt=()=>{window.clearTimeout(Eo),vo.set(!1)},ho=()=>{window.clearTimeout(jo),yn.set(null)},Ze=Ce=>{Yt(),vo.set(!0),Eo=window.setTimeout(()=>vo.set(!1),Ce);let Bt=Ce-100;$n=window.setTimeout(()=>{I()&&Ri.set(!1)},Bt>0?Bt:Ce)},Mt=(Ce,Bt)=>{ho(),yn.set(Bt),jo=window.setTimeout(()=>yn.set(null),Ce)},mi=oo.subscribe(Ce=>{jt.set(Ce),Ce&&(window.clearTimeout(_n),_n=window.setTimeout(()=>jt.set(!1),e.uiConfig.controls.hide360IconTimeout))}),lo=async()=>{let Ce=aa();if(Ce){let Bt=zl(),xi=yi();Ce=Bt===xi||Bt===Xe()}if(Ce){Ze(e.uiConfig.controls.hideTimeoutFullscreen);try{await _i?.remove()}catch(Bt){St({message:String(Bt)})}}wo.set(Ce),e.store.getAdmanWrapper().setFullscreen(Ce),x()?e.store.callbacks?.onFullscreenEnter?.():e.store.callbacks?.onFullscreenExit?.()},nt=Ce=>{let{width:Bt,height:xi}=Ce.target;Vi.set({width:Bt,height:xi})},Et=()=>{let{width:Ce,height:Bt}=r(Yi).getBoundingClientRect();Vi.set({width:Ce,height:Bt})};Vt(()=>(Ac(lo),e.uiConfig.features.annotationsInside&&Ft?.init(r(Yi)),Wa(_i)&&(_i?.assignPlayerContainer(r(Yi)),_i?.registryExternalEventHandlers({resize:nt,leavepictureinpicture:Et})),e.interactiveContainer&&ct().parentElement?.insertBefore(e.interactiveContainer,ct().nextSibling),()=>{window.clearTimeout(Eo),window.clearTimeout($n),window.clearTimeout(jo),window.clearTimeout(_n),mi(),_i?.dispose().catch(Bt=>{St({message:String(Bt)})}),Mc(lo)}));let yi=()=>{let Ce=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!Ue()?r(Yi):Ue(),Bt=Ce.getRootNode(),xi=Bt instanceof ShadowRoot?Bt.host:Bt,Zt=Ye()instanceof HTMLElement&&Ye().contains(xi);return e.uiConfig.allowChangingFullscreenTarget&&Ye()&&Zt?Ye():Ce},ki=async()=>{aa()?(await Pc(document),St({message:"exit fullscreen"})):(St({message:"request fullscreen"}),await Ec(yi()))},Ti=()=>{ao(),G.set(!1)},Ii=Ce=>{w()||(Ce.preventDefault(),G.set(!0),Go.set({left:Ce.clientX,top:Ce.clientY}))};function Ni(){Ao.set(!0),ht||Ze(e.uiConfig.controls.hideTimeoutCursor)}function Lo(){ht||(Ri.set(!0),Ze(e.uiConfig.controls.hideTimeoutCursor))}function en(){Ao.set(!1),D(ni,!1),D(go,!1),Bn=!1,e.store.actions.internal.releaseCamera(),Ze(e.uiConfig.controls.hideTimeout)}function Zi(Ce){return Ce?Ce.offsetTop+Zi(Ce.offsetParent):0}function Hn(Ce){return Ce?Ce.offsetLeft+Hn(Ce.offsetParent):0}function ir(Ce){if(N()&&bi){let Bt=Ce.currentTarget,xi=Zi(Bt),Zt=Hn(Bt),Ie=Ce.pageX-Zt,Pt=Ce.pageY-xi,{left:qt,bottom:di,right:Kt}=N(),Un=Kt-qt;return Ie>=qt-Un&&Pt<=di+Un}}function Hi(Ce){if(r(Yi)){let Bt=Zi(Ce.currentTarget),xi=W().height,Zt=Ce.pageY-Bt;if(ir(Ce)){D(ni,!1);return}Zt<40?D(ni,!0):Zt>xi-40?D(go,!0):(D(ni,!1),u()||D(go,!1))}}function tn(Ce){Hi(Ce),r(Jn)||Ze(e.uiConfig.controls.hideTimeoutCursor),Q()&&Bn&&Jo&&e.store.actions.internal.moveCameraFocusPX(Jo.clientX-Ce.clientX,Jo.clientY-Ce.clientY,Ce.timeStamp-Jo.timeStamp),Jo=Ce}let Fn=Ce=>{Ce.preventDefault(),Ce.button===0&&(Bn=!0,e.store.actions.internal.holdCamera()),Ze(e.uiConfig.controls.hideTimeoutCursor)},or=Ce=>{Ce.preventDefault(),Ce.button===0&&(Jo=Ce,Bn=!1,e.store.actions.internal.releaseCamera()),Ze(e.uiConfig.controls.hideTimeoutCursor)},yr=Ce=>{if(Ce.preventDefault(),j()||u()){Ti();return}if(!(E()&&!ci)){if(r(tr))return $r();if(gt()?.focus(),!Se()){e.firstStart(),Ze(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||re()!==Am.PlaybackState.PLAYING)&&e.store.actions.internal.togglePlay(),Ze(e.uiConfig.controls.hideTimeoutCursor)}},wn=Ce=>{Ti(),To.set(!0),Ze(e.uiConfig.controls.hideTimeout),Ce&&Mt(e.uiConfig.controls.hideHotKeyHelpers,Ce)},on=()=>{Ti(),e.store.callbacks?.onOpenHotKeyMap?e.store.callbacks?.onOpenHotKeyMap(ce()):Ci.update(Ce=>!Ce)},nr=()=>{To.set(!0)},_o=e.store.ui.contextMenu.openedByBtnKeyboard$,xr=e.store.ui.contextMenu.btnRef$,bo=Z(void 0),rr=e.store.ui.contextMenu.openedByHotKey$,wr=e.store.ui.contextMenu.lastActiveElem$;He(()=>{mn.set(r($i))}),He(()=>{D(Nn,le(r(so)&&re()!==Am.PlaybackState.PLAYING)),r(so)||vt(()=>D(so,!0))}),He(()=>{So.set((r(Nn)||E()||u()||X()||ge()||ee()||Me())&&!r(Jn)&&(a()==="video"||a()==="ads")&&!l())}),He(()=>{!X()&&r(Dn)&&!c()&&Ze(e.uiConfig.controls.hideTimeoutCursor),vt(()=>D(Dn,le(X())))}),He(()=>{r(it),u(),Pe(),vt(()=>Ws(r(it),u(),Pe()))}),He(()=>{r(bo),j(),Ve(),vt(()=>Ws(r(bo),j(),Ve()))}),He(()=>{let Ce=fe();Ce&&(j(),vt(()=>qs(Ce,j(),_o)))}),He(()=>{r(bo),j(),Oe(),vt(()=>Ws(r(bo),j(),Oe()))}),He(()=>{let Ce=ie();Ce&&(j(),vt(()=>vh(Ce,j(),rr)))}),He(()=>{!R()&&x()&&(vt(()=>Gi.set(!1)),gt()?.focus())}),He(()=>{w()&&Ti()});let Nr=O("video360");var ar=d3();_t("blur",Pa,Ti);var Di=se(ar);Di.__mousemove=tn,Di.__dblclick=[e3,Zo,St,ki,Ze,e];var nn=h(Di);let rt=v(()=>a()==="ads"),Nt=v(()=>r(tr)?$r:void 0);st(Qp(nn,{toggleFullscreen:ki,hideContextMenu:Ti,showHotKeyHelpers:wn,showKeyMap:on,get isAds(){return r(rt)},get fakePlayButtonHandler(){return r(Nt)},get nextButtonActive(){return ft()},get prevButtonActive(){return K()},children:(Ce,Bt)=>{var xi=s3(),Zt=se(xi);us(Zt,{get hideCursor(){return r(xn)},onClick:yr,onContextMenu:Ii,onMouseDown:Fn,onMouseUp:or,get videoContainer(){return ct()},set videoContainer(qt){ct(qt)}});var Ie=P(Zt,2);Na(Ie,()=>"slot",!1,(qt,di)=>{$e(qt,null,{name:cs})});var Pt=P(Ie,2);Ra(Pt,Re,qt=>{var di=a3(),Kt=se(di);let Un=v(()=>a()!=="thumb"||l()||ht&&e.autoplay);ss(Kt,{get hidden(){return r(Un)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Fi=P(Kt,2);Pm(Fi,{});var uo=P(Fi,2);{var ms=Qe=>{let Qt=v(()=>e.live?.startTime);Sd(Qe,{get thumbUrl(){return e.thumbUrl},get startTime(){return r(Qt)}})};V(uo,Qe=>{a()==="LiveWaitingStart"&&Qe(ms)})}var vs=P(uo,2);{var Sn=Qe=>{ls(Qe,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};V(vs,Qe=>{a()==="LiveWaitingRecover"&&Qe(Sn)})}var Dr=P(vs,2);{var gs=Qe=>{ls(Qe,{kind:"record",get thumbUrl(){return e.thumbUrl}})};V(Dr,Qe=>{a()==="LiveWaitingRecord"&&Qe(gs)})}var ha=P(Dr,2);{var dl=Qe=>{var Qt=i3();let qn;var ya=h(Qt);ql(ya,{get adsSlotId(){return mt()},get adsParams(){return Je()},get adsPreviewParam(){return ut()},get adsAutoplayParam(){return $t()},get duration(){return Ot()}}),g(Qt),S(Wn=>qn=J(Qt,1,"ads-container svelte-jtgjmv",null,qn,Wn),[()=>({hidden:a()!=="ads"})]),_(Qe,Qt)};V(ha,Qe=>{e.showAds&&Se()&&Qe(dl)})}var hs=P(ha,2);{var cl=Qe=>{let Qt=v(()=>!lt()&&e.showAutoplayNext&&k());qp(Qe,{get title(){return he()},get thumb(){return ae()},get isHide(){return r(Qt)},clickCloseIcon:()=>D(Mo,!0)})};V(hs,Qe=>{r(br)&&he()&&ae()&&Qe(cl)})}var _a=P(hs,2);{var ul=Qe=>{let Qt=v(()=>!p());om(Qe,{get title(){return e.title},get isHidden(){return r(Qt)}})};V(_a,Qe=>{r(er)&&Qe(ul)})}var zn=P(_a,2);{var kt=Qe=>{let Qt=v(()=>a()==="video"&&p());yd(Qe,{get isShifted(){return r(Qt)}})};V(zn,Qe=>{Q()&&Qe(kt)})}var yt=P(zn,2);{var Cn=Qe=>{var Qt=o3(),qn=h(Qt);Ul(qn,{"aria-label":Nr}),g(Qt),_(Qe,Qt)};V(yt,Qe=>{de()&&Qe(Cn)})}var Sr=P(yt,2);{var ba=Qe=>{xd(Qe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ke()}})};V(Sr,Qe=>{ee()&&Qe(ba)})}var Cr=P(Sr,2);{var kr=Qe=>{as(Qe,{get shifted(){return p()},get captions(){return U()},get position(){return Y()},get playerSize(){return W()}})};V(Cr,Qe=>{oe().value!=="off"&&Qe(kr)})}var Jr=P(Cr,2);{var pl=Qe=>{var Qt=n3();Qt.__contextmenu=Ii,Qt.__click=[t3,j,G,u,Ko,Ti];var qn=h(Qt);wd(qn,{}),g(Qt),_(Qe,Qt)};V(Jr,Qe=>{l()&&Qe(pl)})}var Od=P(Jr,2);{var _u=Qe=>{let Qt=v(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),qn=v(()=>a()==="ads"),ya=v(()=>e.canRewindLive&&Ae()!==0);$d(Qe,{get bottomHidden(){return r(Qt)},get bottomNoSmooth(){return I()},get showControls(){return p()},get isAds(){return r(qn)},get canRewindLive(){return r(ya)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return we()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Dt()},get nextButtonActive(){return ft()},get prevButtonActive(){return K()},get isOneVideoPlaylist(){return qe()},customFullscreenSupported:Zo,toggleFullscreen:ki,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return r(Io)},set playerControlsWrapperRef(Wn){D(Io,le(Wn))},get playerControlsRef(){return r(hn)},set playerControlsRef(Wn){D(hn,le(Wn))}})};V(Od,Qe=>{Se()&&Qe(_u)})}var Hd=P(Od,2);{var bu=Qe=>{var Qt=r3(),qn=h(Qt);let ya=v(()=>r(hn)?.clientHeight);Id(qn,{get supportLink(){return e.supportLink},get playerControlsHeight(){return r(ya)},returnFocus:()=>gt()?.focus(),get ref(){return r(it)},set ref(Wn){D(it,le(Wn))}}),g(Qt),_(Qe,Qt)};V(Hd,Qe=>{!ee()&&a()!=="ads"&&Qe(bu)})}var Fd=P(Hd,2);let $u=v(()=>!r(Xo));Ql(Fd,{get isLive(){return We()},get isHidden(){return r($u)},get isPlaying(){return Fe()},get position(){return Y()},get duration(){return Ae()}});var $a=P(Fd,2);Jf($a,{data:yn});var Ud=P($a,2);Up(Ud,{get supportLink(){return e.supportLink},returnFocus:()=>gt()?.focus(),get visible(){return j()},get playerContainerRef(){return r(Yi)},get controlsContainerRef(){return r(Io)},get position(){return ye()},get menuElementRef(){return r(bo)},set menuElementRef(Qe){D(bo,le(Qe))}});var fl=P(Ud,2);{var zd=Qe=>{Ed(Qe,{onClose:Yo,onSelectAutoQuality:()=>{ro("auto"),Yo()}})};V(fl,Qe=>{r(Rn)&&Qe(zd)})}var qd=P(fl,2);{var Wd=Qe=>{Ya(Qe,{})};V(qd,Qe=>{r(bn)&&Qe(Wd)})}var _s=P(qd,2);{var Kd=Qe=>{Yp(Qe,{})};V(_s,Qe=>{Ne()&&Qe(Kd)})}var yu=P(_s,2);{var Qd=Qe=>{Yl(Qe,{})};V(yu,Qe=>{je()&&Qe(Qd)})}_(qt,di)}),_(Ce,xi)},$$slots:{default:!0}}),Ce=>gt(Ce),()=>gt());var vi=P(nn,2);st(vi,Ce=>D($i,Ce),()=>r($i)),g(Di),st(Di,Ce=>D(Yi,Ce),()=>r(Yi));var co=P(Di,2);{var Vo=Ce=>{var Bt=l3();_(Ce,Bt)};V(co,Ce=>{et()&&Ce(Vo)})}_t("mouseenter",Di,Ni),_t("mouseleave",Di,en),_t("click",Di,nr,!0),_t("focusin",Di,Lo,!0),_(t,ar),F(),o()}ot(["mousemove","dblclick","contextmenu","click"]);var ga=require("@vkontakte/videoplayer-core"),_1=require("@vkontakte/videoplayer-shared");var u3=M('<div></div> <div class="info svelte-nhq2ld"><div class="triangles-wrapper svelte-nhq2ld"><div></div> <div></div> <div></div></div> <p class="step-caption svelte-nhq2ld"> </p></div>',1),p3=M("<div><!></div>"),f3={hash:"svelte-nhq2ld",code:`.double-click-area.svelte-nhq2ld {position:absolute;top:0;height:100%;width:25%;overflow:hidden;}.double-click-area.left.svelte-nhq2ld {left:0;}.double-click-area.right.svelte-nhq2ld {right:0;}.semicircle.svelte-nhq2ld {position:absolute;top:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);}.semicircle.left.svelte-nhq2ld {left:0;border-top-right-radius:50%;border-bottom-right-radius:50%;}.semicircle.right.svelte-nhq2ld {right:0;border-top-left-radius:50%;border-bottom-left-radius:50%;}.info.svelte-nhq2ld {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;flex-direction:column;align-items:center;justify-content:center;}.triangles-wrapper.svelte-nhq2ld {position:relative;display:flex;margin-bottom:10px;justify-content:center;}.triangle.svelte-nhq2ld {width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;
344
+ .video-container.svelte-1czns9r {position:absolute;width:100%;height:100%;left:0;top:0;}.video-wrapper.svelte-1czns9r {z-index:var(--video-container-z-index);background:var(--black);}.video-container.svelte-1czns9r {z-index:var(--video-container-z-index);transition:var(--rotate-transition-duration) ease all;}.video-container.fast-rotate.svelte-1czns9r {transition:none;}.nocursor.svelte-1czns9r {cursor:none;}`};function us(t,e){H(e,!0),z(t,J4);let[i,o]=Le(),n=()=>y(u,"$rotateAlpha",i),a=()=>y(b,"$playerSize",i),s=()=>y(c,"$playerPhase",i),d=()=>y(p,"$isPlaying$",i),l=m(e,"videoContainer",15),{playerPhase:c,ui:{rotateAlpha:u,playerSize:b},state:{isPlaying$:p}}=be(),{isSmoothVideoRotate:$}=Rt(),w=v(()=>l()&&n()%180?a().height/a().width:1);var x=X4();let k;x.__contextmenu=function(...E){e.onContextMenu?.apply(this,E)},x.__mousedown=function(...E){e.onMouseDown?.apply(this,E)},x.__mouseup=function(...E){e.onMouseUp?.apply(this,E)},x.__click=function(...E){e.onClick?.apply(this,E)};var C=h(x);J(C,1,"video-container svelte-1czns9r",null,{},{"fast-rotate":!$}),st(C,E=>l(E),()=>l()),g(x),S(E=>{k=J(x,1,"video-wrapper svelte-1czns9r",null,k,E),tt(C,`transform: rotate(${n()}deg) scale(${r(w)})`),Ve(C,"data-is-playing",d())},[()=>({hidden:s()!=="video",nocursor:e.hideCursor})]),_(t,x),F(),o()}ot(["contextmenu","mousedown","mouseup","click"]);var e3=(t,e,i,o,n,a)=>{t.preventDefault(),e&&(i({message:"double click on video"}),o(),n(a.uiConfig.controls.hideTimeoutCursor))},t3=(t,e,i,o,n,a)=>{if(t.stopPropagation(),e()||o()){a();return}},i3=M("<div><!></div>"),o3=M('<div class="spherical-video-icon svelte-jtgjmv"><!></div>'),n3=M("<div><!></div>"),r3=M('<div class="settings-menu svelte-jtgjmv"><!></div>'),a3=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),s3=M("<!> <!> <!>",1),l3=M('<div class="blocked svelte-jtgjmv"></div>'),d3=M('<div class="player-wrapper svelte-jtgjmv"><!> <div class="overlay-container"></div></div> <!>',1),c3={hash:"svelte-jtgjmv",code:".player-wrapper.svelte-jtgjmv {position:absolute;width:100%;height:100%;}.blocked.svelte-jtgjmv {position:absolute;width:100%;height:100%;z-index:var(--overlay-container-z-index);}.player-wrapper.svelte-jtgjmv .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.spherical-video-icon.svelte-jtgjmv {display:inline-block;position:absolute;top:calc(50% - 23px);left:calc(50% - 38px);}.ads-container.svelte-jtgjmv {position:absolute;width:100%;height:100%;left:0;top:0;}.ads-container.svelte-jtgjmv {z-index:var(--ads-container-z-index);background:var(--black);}.settings-menu.svelte-jtgjmv {position:absolute;z-index:var(--settings-menu-z-index);bottom:57px;right:18px;left:0;transition:opacity 0.2s, visibility 0.2s;}"};function Mm(t,e){H(e,!0),z(t,c3);let[i,o]=Le(),n=()=>y(Po,"$notificationsToShow$",i),a=()=>y(Wo,"$playerPhase",i),s=()=>y(Gt,"$isLoaderVisible",i),d=()=>y(Bi,"$adPlaybackState",i),l=()=>y(Ct,"$crashed",i),c=()=>y(no,"$isInteractiveTime$",i),u=()=>y(Ko,"$settingsMenuVisible",i),b=()=>y(fi,"$isInteractiveExpectation$",i),p=()=>y(So,"$controlsVisible",i),$=()=>y(To,"$touched",i),w=()=>y(Vn,"$graphIsOpened$",i),x=()=>y(wo,"$isFullscreen",i),k=()=>y(_r,"$autoplayNextEnabled$",i),C=()=>y(Si,"$postrollPassed",i),E=()=>y(ji,"$isEnded$",i),A=()=>y(Ao,"$cursorInside",i),L=()=>y(gn,"$fakeIsPlaying$",i),I=()=>y(Ri,"$bottomNoSmooth",i),N=()=>y(vn,"$interactiveTimeIndicator",i),W=()=>y(Vi,"$playerSize",i),Q=()=>y(oo,"$is3DVideo",i),j=()=>y(G,"$contextMenuVisible$",i),re=()=>y(ti,"$playbackState$",i),ce=()=>y(Oi,"$hotKeyMapData",i),X=()=>y(Co,"$scrubbingInProgress",i),ge=()=>y(Qo,"$volumeChangingInProgress",i),ee=()=>y(ii,"$chromecastConnected$",i),Me=()=>y(vo,"$controlsTimeoutActive",i),Pe=()=>y(zt,"$settingsMenuOpenedByKeyboard",i),Re=()=>y(_o,"$contextMenuOpenedByKeyboard$",i),fe=()=>y(xr,"$contextMenuButtonRef$",i),Oe=()=>y(rr,"$contextMenuOpenedByHotKey$",i),ie=()=>y(wr,"$contextMenuLastActiveElem$",i),R=()=>y(Gi,"$isFullscreenOpenedByKeyboard",i),Ne=()=>y(oi,"$language$",i),de=()=>y(jt,"$icon3DVideoVisible",i),Ke=()=>y(ei,"$chromecastDeviceName$",i),oe=()=>y(ko,"$currentSubtitle$",i),U=()=>y(fn,"$currentSubtitleCaptions$",i),Y=()=>y(un,"$position$",i),Ae=()=>y(pn,"$duration$",i),We=()=>y(It,"$isLive$",i),Fe=()=>y(Mn,"$isPlaying$",i),ye=()=>y(Go,"$contextMenuPosition$",i),De=()=>y(Ci,"$showHotKeyMap",i),je=()=>y(Wt,"$debugPanelVisible",i),et=()=>y(Zn,"$userActionsDisabled$",i),ct=m(e,"videoContainer",15),mt=m(e,"adsSlotId",3,void 0),Je=m(e,"adsParams",3,void 0),ut=m(e,"adsPreviewParam",3,void 0),$t=m(e,"adsAutoplayParam",3,void 0),Ot=m(e,"duration",3,void 0),we=m(e,"logoTargetUrl",3,""),Dt=m(e,"showNextPrevButtons",3,!1),ft=m(e,"nextButtonActive",3,!1),K=m(e,"prevButtonActive",3,!1),he=m(e,"endScreenVideoTitle",3,void 0),ae=m(e,"endScreenVideoThumb",3,void 0),qe=m(e,"isOneVideoPlaylist",3,!1),Xe=m(e,"shadowRootContainer",3,void 0),Ue=m(e,"outerContainerRef",3,void 0),Se=m(e,"playerStarted",3,!1),Ye=m(e,"fullScreenTarget",3,void 0),Ee=m(e,"showMiniTimer",3,!1),lt=m(e,"showEndScreen",3,!0),gt=m(e,"keyboardControls",15),St=e.store.getLogger().createComponentLog("Root component"),oi=e.store.interfaceLanguage$,ti=e.store.state.playbackState$,Bi=e.store.ads.playbackState,un=e.store.state.positionWithScrubbing$,pn=e.store.state.duration$,Wo=e.store.playerPhase,wo=e.store.ui.isFullscreen,Gi=e.store.ui.isFullscreenOpenedByKeyboard,So=e.store.ui.controlsVisible,Ko=e.store.ui.settingsMenu.visible$,zt=e.store.ui.settingsMenu.openedByBtnKeyboard$,Co=e.store.ui.scrubbingInProgress,Qo=e.store.ui.volumeChangingInProgress,G=e.store.ui.contextMenu.visible$,Wt=e.store.ui.debugPanelVisible,Gt=e.store.state.isLoaderVisible,ji=e.store.state.isEnded$,ii=e.store.state.chromecastConnected$,ei=e.store.state.chromecastDeviceName$,Si=e.store.ads.postrollPassed,It=e.store.state.isLive$,Mn=e.store.state.isPlaying$,Ct=e.store.state.crashed$,Ft=e.store.webApi.annotationsApi,_i=e.store.webApi.pictureInPictureApi,ko=e.store.state.currentSubtitle$,fn=e.store.state.currentSubtitleCaptions$,Vi=e.store.ui.playerSize,oo=e.store.ui.is3DVideo,jt=e.store.ui.icon3DVideoVisible,ht=e.store.state.isInteractive,no=e.store.state.isInteractiveTime$,fi=e.store.state.isInteractiveExpectation$,ci=e.store.state.hasInteractiveBranches,To=e.store.ui.touched,Oi=e.store.ui.modals.hotKeyMap.data,Ci=e.store.ui.modals.hotKeyMap.show,mn=e.store.ui.overlayContainer$,vn=e.store.ui.controls.interactiveTimeIndicator,bi=e.store.state.showInteractiveTimeIndicator,Go=e.store.ui.contextMenu.position$,ro=e.store.actions.internal.setQuality,ao=e.store.actions.internal.closeSettingsMenu,_r=e.store.ui.autoplayNextEnabled$,Zn=e.store.ui.userActionsDisabled,{fakeIsPlaying$:gn,notifications$:Ln,graphIsOpened$:Vn}=Qi(),Yi=Z(void 0),Io=Z(void 0),hn=Z(void 0),it=Z(void 0),Eo,jo,_n;Oi.set(uh());let{closeNotification:Xn,notificationsToShow$:Po}=Ln,Rn=v(()=>!!n().slow_video),Yo=()=>Xn("slow_video"),bn=v(()=>(a()==="video"&&s()||a()==="ads"&&d()==="inactive")&&!l()),$i=Z(void 0),Ri=ne(!1),$n,vo=ne(!1),yn=ne(),Ao=ne(!1),go=Z(!1),ni=Z(!1),Nn=Z(!1),so=Z(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Jn=v(()=>c()&&!u()&&!(r(go)||r(ni))&&!(r(Nn)&&!b())),Zo=!0,Xo=v(()=>e.uiConfig.features.thumbTimer&&Ee()&&a()==="video"&&!p()&&!l()&&!ht&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),er=v(()=>a()==="video"&&!w()&&x()),Mo=Z(!1),br=v(()=>(lt()||e.showAutoplayNext&&k())&&!!he()&&!!ae()&&(e.showAds&&C()||!e.showAds)&&E()&&!l()&&!r(Mo)),xn=v(()=>A()&&!(p()||r(br))&&!c()),Dn=Z(!1),tr=v(()=>L()!==null),{toggle:$r}=gn,Bn=!1,Jo=null;_i?.setContext(El());let On=()=>{e.autoplay&&!ht&&e.uiConfig.controls.showOnStartupAtAutoplay&&Ze(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:On});let Yt=()=>{window.clearTimeout(Eo),vo.set(!1)},ho=()=>{window.clearTimeout(jo),yn.set(null)},Ze=Ce=>{Yt(),vo.set(!0),Eo=window.setTimeout(()=>vo.set(!1),Ce);let Bt=Ce-100;$n=window.setTimeout(()=>{I()&&Ri.set(!1)},Bt>0?Bt:Ce)},Mt=(Ce,Bt)=>{ho(),yn.set(Bt),jo=window.setTimeout(()=>yn.set(null),Ce)},mi=oo.subscribe(Ce=>{jt.set(Ce),Ce&&(window.clearTimeout(_n),_n=window.setTimeout(()=>jt.set(!1),e.uiConfig.controls.hide360IconTimeout))}),lo=async()=>{let Ce=aa();if(Ce){let Bt=zl(),xi=yi();Ce=Bt===xi||Bt===Xe()}if(Ce){Ze(e.uiConfig.controls.hideTimeoutFullscreen);try{await _i?.remove()}catch(Bt){St({message:String(Bt)})}}wo.set(Ce),e.store.getAdmanWrapper().setFullscreen(Ce),x()?e.store.callbacks?.onFullscreenEnter?.():e.store.callbacks?.onFullscreenExit?.()},nt=Ce=>{let{width:Bt,height:xi}=Ce.target;Vi.set({width:Bt,height:xi})},Et=()=>{let{width:Ce,height:Bt}=r(Yi).getBoundingClientRect();Vi.set({width:Ce,height:Bt})};Vt(()=>(Ac(lo),e.uiConfig.features.annotationsInside&&Ft?.init(r(Yi)),Wa(_i)&&(_i?.assignPlayerContainer(r(Yi)),_i?.registryExternalEventHandlers({resize:nt,leavepictureinpicture:Et})),e.interactiveContainer&&ct().parentElement?.insertBefore(e.interactiveContainer,ct().nextSibling),()=>{window.clearTimeout(Eo),window.clearTimeout($n),window.clearTimeout(jo),window.clearTimeout(_n),mi(),_i?.dispose().catch(Bt=>{St({message:String(Bt)})}),Mc(lo)}));let yi=()=>{let Ce=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!Ue()?r(Yi):Ue(),Bt=Ce.getRootNode(),xi=Bt instanceof ShadowRoot?Bt.host:Bt,Zt=Ye()instanceof HTMLElement&&Ye().contains(xi);return e.uiConfig.allowChangingFullscreenTarget&&Ye()&&Zt?Ye():Ce},ki=async()=>{aa()?(await Pc(document),St({message:"exit fullscreen"})):(St({message:"request fullscreen"}),await Ec(yi()))},Ti=()=>{ao(),G.set(!1)},Ii=Ce=>{w()||(Ce.preventDefault(),G.set(!0),Go.set({left:Ce.clientX,top:Ce.clientY}))};function Ni(){Ao.set(!0),ht||Ze(e.uiConfig.controls.hideTimeoutCursor)}function Lo(){ht||(Ri.set(!0),Ze(e.uiConfig.controls.hideTimeoutCursor))}function en(){Ao.set(!1),D(ni,!1),D(go,!1),Bn=!1,e.store.actions.internal.releaseCamera(),Ze(e.uiConfig.controls.hideTimeout)}function Zi(Ce){return Ce?Ce.offsetTop+Zi(Ce.offsetParent):0}function Hn(Ce){return Ce?Ce.offsetLeft+Hn(Ce.offsetParent):0}function ir(Ce){if(N()&&bi){let Bt=Ce.currentTarget,xi=Zi(Bt),Zt=Hn(Bt),Ie=Ce.pageX-Zt,Pt=Ce.pageY-xi,{left:qt,bottom:di,right:Kt}=N(),Un=Kt-qt;return Ie>=qt-Un&&Pt<=di+Un}}function Hi(Ce){if(r(Yi)){let Bt=Zi(Ce.currentTarget),xi=W().height,Zt=Ce.pageY-Bt;if(ir(Ce)){D(ni,!1);return}Zt<40?D(ni,!0):Zt>xi-40?D(go,!0):(D(ni,!1),u()||D(go,!1))}}function tn(Ce){Hi(Ce),r(Jn)||Ze(e.uiConfig.controls.hideTimeoutCursor),Q()&&Bn&&Jo&&e.store.actions.internal.moveCameraFocusPX(Jo.clientX-Ce.clientX,Jo.clientY-Ce.clientY,Ce.timeStamp-Jo.timeStamp),Jo=Ce}let Fn=Ce=>{Ce.preventDefault(),Ce.button===0&&(Bn=!0,e.store.actions.internal.holdCamera()),Ze(e.uiConfig.controls.hideTimeoutCursor)},or=Ce=>{Ce.preventDefault(),Ce.button===0&&(Jo=Ce,Bn=!1,e.store.actions.internal.releaseCamera()),Ze(e.uiConfig.controls.hideTimeoutCursor)},yr=Ce=>{if(Ce.preventDefault(),j()||u()){Ti();return}if(!(E()&&!ci)){if(r(tr))return $r();if(gt()?.focus(),!Se()){e.firstStart(),Ze(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||re()!==Am.PlaybackState.PLAYING)&&e.store.actions.internal.togglePlay(),Ze(e.uiConfig.controls.hideTimeoutCursor)}},wn=Ce=>{Ti(),To.set(!0),Ze(e.uiConfig.controls.hideTimeout),Ce&&Mt(e.uiConfig.controls.hideHotKeyHelpers,Ce)},on=()=>{Ti(),e.store.callbacks?.onOpenHotKeyMap?e.store.callbacks?.onOpenHotKeyMap(ce()):Ci.update(Ce=>!Ce)},nr=()=>{To.set(!0)},_o=e.store.ui.contextMenu.openedByBtnKeyboard$,xr=e.store.ui.contextMenu.btnRef$,bo=Z(void 0),rr=e.store.ui.contextMenu.openedByHotKey$,wr=e.store.ui.contextMenu.lastActiveElem$;He(()=>{mn.set(r($i))}),He(()=>{D(Nn,le(r(so)&&re()!==Am.PlaybackState.PLAYING)),r(so)||vt(()=>D(so,!0))}),He(()=>{So.set((r(Nn)||E()||u()||X()||ge()||ee()||Me())&&!r(Jn)&&(a()==="video"||a()==="ads")&&!l())}),He(()=>{!X()&&r(Dn)&&!c()&&Ze(e.uiConfig.controls.hideTimeoutCursor),vt(()=>D(Dn,le(X())))}),He(()=>{r(it),u(),Pe(),vt(()=>Ws(r(it),u(),Pe()))}),He(()=>{r(bo),j(),Re(),vt(()=>Ws(r(bo),j(),Re()))}),He(()=>{let Ce=fe();Ce&&(j(),vt(()=>qs(Ce,j(),_o)))}),He(()=>{r(bo),j(),Oe(),vt(()=>Ws(r(bo),j(),Oe()))}),He(()=>{let Ce=ie();Ce&&(j(),vt(()=>vh(Ce,j(),rr)))}),He(()=>{!R()&&x()&&(vt(()=>Gi.set(!1)),gt()?.focus())}),He(()=>{w()&&Ti()});let Nr=O("video360");var ar=d3();_t("blur",Pa,Ti);var Di=se(ar);Di.__mousemove=tn,Di.__dblclick=[e3,Zo,St,ki,Ze,e];var nn=h(Di);let rt=v(()=>a()==="ads"),Nt=v(()=>r(tr)?$r:void 0);st(Qp(nn,{toggleFullscreen:ki,hideContextMenu:Ti,showHotKeyHelpers:wn,showKeyMap:on,get isAds(){return r(rt)},get fakePlayButtonHandler(){return r(Nt)},get nextButtonActive(){return ft()},get prevButtonActive(){return K()},children:(Ce,Bt)=>{var xi=s3(),Zt=se(xi);us(Zt,{get hideCursor(){return r(xn)},onClick:yr,onContextMenu:Ii,onMouseDown:Fn,onMouseUp:or,get videoContainer(){return ct()},set videoContainer(qt){ct(qt)}});var Ie=P(Zt,2);Na(Ie,()=>"slot",!1,(qt,di)=>{$e(qt,null,{name:cs})});var Pt=P(Ie,2);Ra(Pt,Ne,qt=>{var di=a3(),Kt=se(di);let Un=v(()=>a()!=="thumb"||l()||ht&&e.autoplay);ss(Kt,{get hidden(){return r(Un)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Fi=P(Kt,2);Pm(Fi,{});var uo=P(Fi,2);{var ms=Qe=>{let Qt=v(()=>e.live?.startTime);Sd(Qe,{get thumbUrl(){return e.thumbUrl},get startTime(){return r(Qt)}})};V(uo,Qe=>{a()==="LiveWaitingStart"&&Qe(ms)})}var vs=P(uo,2);{var Sn=Qe=>{ls(Qe,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};V(vs,Qe=>{a()==="LiveWaitingRecover"&&Qe(Sn)})}var Dr=P(vs,2);{var gs=Qe=>{ls(Qe,{kind:"record",get thumbUrl(){return e.thumbUrl}})};V(Dr,Qe=>{a()==="LiveWaitingRecord"&&Qe(gs)})}var ha=P(Dr,2);{var dl=Qe=>{var Qt=i3();let qn;var ya=h(Qt);ql(ya,{get adsSlotId(){return mt()},get adsParams(){return Je()},get adsPreviewParam(){return ut()},get adsAutoplayParam(){return $t()},get duration(){return Ot()}}),g(Qt),S(Wn=>qn=J(Qt,1,"ads-container svelte-jtgjmv",null,qn,Wn),[()=>({hidden:a()!=="ads"})]),_(Qe,Qt)};V(ha,Qe=>{e.showAds&&Se()&&Qe(dl)})}var hs=P(ha,2);{var cl=Qe=>{let Qt=v(()=>!lt()&&e.showAutoplayNext&&k());qp(Qe,{get title(){return he()},get thumb(){return ae()},get isHide(){return r(Qt)},clickCloseIcon:()=>D(Mo,!0)})};V(hs,Qe=>{r(br)&&he()&&ae()&&Qe(cl)})}var _a=P(hs,2);{var ul=Qe=>{let Qt=v(()=>!p());om(Qe,{get title(){return e.title},get isHidden(){return r(Qt)}})};V(_a,Qe=>{r(er)&&Qe(ul)})}var zn=P(_a,2);{var kt=Qe=>{let Qt=v(()=>a()==="video"&&p());yd(Qe,{get isShifted(){return r(Qt)}})};V(zn,Qe=>{Q()&&Qe(kt)})}var yt=P(zn,2);{var Cn=Qe=>{var Qt=o3(),qn=h(Qt);Ul(qn,{"aria-label":Nr}),g(Qt),_(Qe,Qt)};V(yt,Qe=>{de()&&Qe(Cn)})}var Sr=P(yt,2);{var ba=Qe=>{xd(Qe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ke()}})};V(Sr,Qe=>{ee()&&Qe(ba)})}var Cr=P(Sr,2);{var kr=Qe=>{as(Qe,{get shifted(){return p()},get captions(){return U()},get position(){return Y()},get playerSize(){return W()}})};V(Cr,Qe=>{oe().value!=="off"&&Qe(kr)})}var Jr=P(Cr,2);{var pl=Qe=>{var Qt=n3();Qt.__contextmenu=Ii,Qt.__click=[t3,j,G,u,Ko,Ti];var qn=h(Qt);wd(qn,{}),g(Qt),_(Qe,Qt)};V(Jr,Qe=>{l()&&Qe(pl)})}var Od=P(Jr,2);{var _u=Qe=>{let Qt=v(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),qn=v(()=>a()==="ads"),ya=v(()=>e.canRewindLive&&Ae()!==0);$d(Qe,{get bottomHidden(){return r(Qt)},get bottomNoSmooth(){return I()},get showControls(){return p()},get isAds(){return r(qn)},get canRewindLive(){return r(ya)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return we()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Dt()},get nextButtonActive(){return ft()},get prevButtonActive(){return K()},get isOneVideoPlaylist(){return qe()},customFullscreenSupported:Zo,toggleFullscreen:ki,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return r(Io)},set playerControlsWrapperRef(Wn){D(Io,le(Wn))},get playerControlsRef(){return r(hn)},set playerControlsRef(Wn){D(hn,le(Wn))}})};V(Od,Qe=>{Se()&&Qe(_u)})}var Hd=P(Od,2);{var bu=Qe=>{var Qt=r3(),qn=h(Qt);let ya=v(()=>r(hn)?.clientHeight);Id(qn,{get supportLink(){return e.supportLink},get playerControlsHeight(){return r(ya)},returnFocus:()=>gt()?.focus(),get ref(){return r(it)},set ref(Wn){D(it,le(Wn))}}),g(Qt),_(Qe,Qt)};V(Hd,Qe=>{!ee()&&a()!=="ads"&&Qe(bu)})}var Fd=P(Hd,2);let $u=v(()=>!r(Xo));Ql(Fd,{get isLive(){return We()},get isHidden(){return r($u)},get isPlaying(){return Fe()},get position(){return Y()},get duration(){return Ae()}});var $a=P(Fd,2);Jf($a,{data:yn});var Ud=P($a,2);Up(Ud,{get supportLink(){return e.supportLink},returnFocus:()=>gt()?.focus(),get visible(){return j()},get playerContainerRef(){return r(Yi)},get controlsContainerRef(){return r(Io)},get position(){return ye()},get menuElementRef(){return r(bo)},set menuElementRef(Qe){D(bo,le(Qe))}});var fl=P(Ud,2);{var zd=Qe=>{Ed(Qe,{onClose:Yo,onSelectAutoQuality:()=>{ro("auto"),Yo()}})};V(fl,Qe=>{r(Rn)&&Qe(zd)})}var qd=P(fl,2);{var Wd=Qe=>{Ya(Qe,{})};V(qd,Qe=>{r(bn)&&Qe(Wd)})}var _s=P(qd,2);{var Kd=Qe=>{Yp(Qe,{})};V(_s,Qe=>{De()&&Qe(Kd)})}var yu=P(_s,2);{var Qd=Qe=>{Yl(Qe,{})};V(yu,Qe=>{je()&&Qe(Qd)})}_(qt,di)}),_(Ce,xi)},$$slots:{default:!0}}),Ce=>gt(Ce),()=>gt());var vi=P(nn,2);st(vi,Ce=>D($i,Ce),()=>r($i)),g(Di),st(Di,Ce=>D(Yi,Ce),()=>r(Yi));var co=P(Di,2);{var Vo=Ce=>{var Bt=l3();_(Ce,Bt)};V(co,Ce=>{et()&&Ce(Vo)})}_t("mouseenter",Di,Ni),_t("mouseleave",Di,en),_t("click",Di,nr,!0),_t("focusin",Di,Lo,!0),_(t,ar),F(),o()}ot(["mousemove","dblclick","contextmenu","click"]);var ga=require("@vkontakte/videoplayer-core"),_1=require("@vkontakte/videoplayer-shared");var u3=M('<div></div> <div class="info svelte-nhq2ld"><div class="triangles-wrapper svelte-nhq2ld"><div></div> <div></div> <div></div></div> <p class="step-caption svelte-nhq2ld"> </p></div>',1),p3=M("<div><!></div>"),f3={hash:"svelte-nhq2ld",code:`.double-click-area.svelte-nhq2ld {position:absolute;top:0;height:100%;width:25%;overflow:hidden;}.double-click-area.left.svelte-nhq2ld {left:0;}.double-click-area.right.svelte-nhq2ld {right:0;}.semicircle.svelte-nhq2ld {position:absolute;top:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);}.semicircle.left.svelte-nhq2ld {left:0;border-top-right-radius:50%;border-bottom-right-radius:50%;}.semicircle.right.svelte-nhq2ld {right:0;border-top-left-radius:50%;border-bottom-left-radius:50%;}.info.svelte-nhq2ld {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;flex-direction:column;align-items:center;justify-content:center;}.triangles-wrapper.svelte-nhq2ld {position:relative;display:flex;margin-bottom:10px;justify-content:center;}.triangle.svelte-nhq2ld {width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;
345
345
  animation: svelte-nhq2ld-blink 500ms infinite;opacity:0;}.triangle.right.svelte-nhq2ld:nth-child(1),
346
346
  .triangle.left.svelte-nhq2ld:nth-child(3) {animation-delay:0ms;}.triangle.right.svelte-nhq2ld:nth-child(2),
347
347
  .triangle.left.svelte-nhq2ld:nth-child(2) {animation-delay:100ms;}.triangle.right.svelte-nhq2ld:nth-child(3),
@@ -357,8 +357,8 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
357
357
  100% {
358
358
  opacity: 0;
359
359
  }
360
- }.triangle.left.svelte-nhq2ld {border-right:8px solid var(--white);}.triangle.right.svelte-nhq2ld {border-left:8px solid var(--white);}.triangle.svelte-nhq2ld:not(:last-child) {margin-right:5px;}.step-caption.svelte-nhq2ld {margin:0;text-align:center;font-size:12px;line-height:1;color:var(--white);}`};function ou(t,e){H(e,!0),z(t,f3);let i=m(e,"seekStep",3,0),o=Z(!1),n=0,a=0,s=Z(le(i())),d=b=>{b.stopPropagation(),a+=1,D(s,i()*(a-1)),a===1?e.handleSingleFirstClick(b):(D(o,!0),e.handleSecondClick()),window.clearTimeout(n),n=window.setTimeout(()=>{a=0,D(o,!1)},300)};dn(()=>{window.clearTimeout(n)});var l=p3();l.__click=d;var c=h(l);{var u=b=>{var p=u3(),$=se(p),w=P($,2),x=h(w),k=h(x),C=P(k,2),E=P(C,2);g(x);var A=P(x,2),L=h(A,!0);g(A),g(w),S(I=>{J($,1,`semicircle ${e.side??""}`,"svelte-nhq2ld"),J(k,1,`triangle ${e.side??""}`,"svelte-nhq2ld"),J(C,1,`triangle ${e.side??""}`,"svelte-nhq2ld"),J(E,1,`triangle ${e.side??""}`,"svelte-nhq2ld"),ue(L,I)},[()=>O("doubletap_seek_step",{seconds:r(s).toFixed(0)})]),_(b,p)};V(c,b=>{r(o)&&b(u)})}g(l),S(()=>J(l,1,`double-click-area ${e.side??""}`,"svelte-nhq2ld")),_(t,l),F()}ot(["click"]);var m3=(t,e,i)=>{e(!1),i()},v3=M('<div class="overlay svelte-1qdxi6t"></div> <div class="next-video svelte-1qdxi6t"><div class="top svelte-1qdxi6t"><div class="caption svelte-1qdxi6t"> </div> <!></div> <div class="row svelte-1qdxi6t"><div class="column svelte-1qdxi6t"><div class="thumb svelte-1qdxi6t"><div></div> <!></div></div> <div class="column svelte-1qdxi6t"><div class="title svelte-1qdxi6t"> </div></div></div></div>',1),g3={hash:"svelte-1qdxi6t",code:".overlay.svelte-1qdxi6t {width:100%;height:100%;background:rgba(0, 0, 0, 0.72);position:absolute;}.next-video.svelte-1qdxi6t {position:absolute;top:50%;left:50%;z-index:var(--end-screen-mobile-z-index);transform:translate(-50%, -50%);display:flex;flex-direction:column;max-width:362px;min-width:320px;margin:0 auto;padding-bottom:12px;}.top.svelte-1qdxi6t {display:flex;justify-content:space-between;}.caption.svelte-1qdxi6t {font-size:11px;font-weight:bold;color:var(--white);text-transform:uppercase;opacity:0.8;}.row.svelte-1qdxi6t {height:102px;background:rgba(48, 48, 48, .8);cursor:pointer;margin-top:6px;display:flex;flex-direction:row;width:100%;}.column.svelte-1qdxi6t {display:flex;flex-direction:column;flex-basis:50%;}.thumb.svelte-1qdxi6t {width:100%;height:100%;background:no-repeat center;background-size:cover;display:flex;align-items:center;position:relative;justify-content:space-around;}.thumb-overlay.svelte-1qdxi6t {width:100%;height:100%;position:absolute;}.thumb-overlay.withOpacity.svelte-1qdxi6t {background:var(--black);opacity:0.3;}.title.svelte-1qdxi6t {padding:10px 16px;font-size:12px;font-weight:bold;color:var(--white);line-height:1.6;max-height:52px;overflow:hidden;}"};function Lm(t,e){H(e,!0),z(t,g3);let[i,o]=Le(),n=()=>y(d,"$autoplayNextEnabled$",i),a=()=>y(l,"$timerNextVideoRunning$",i),s=be(),d=s.ui.autoplayNextEnabled$,l=s.ui.timerNextVideoRunning$,c=s.actions.internal.nextVideoClick,u=s.actions.internal.nextVideoAnnouncementShow,b=s.actions.internal.nextVideoAnnouncementClick,p=s.actions.internal.nextVideoAnnouncementAuto,$=s.actions.internal.nextVideoAnnouncementCancel,w=()=>{c(!1),p()},x=()=>{e.clickCloseIcon(),$()};Vt(()=>{e.isHide||u(),e.isHide&&n()&&(c(!1),p())});var k=Be(),C=se(k);{var E=A=>{var L=v3(),I=P(se(L),2),N=h(I),W=h(N),Q=h(W,!0);g(W);var j=P(W,2);ja(j,{onClick:x}),g(N);var re=P(N,2);re.__click=[m3,c,b];var ce=h(re),X=h(ce),ge=h(X);let ee;var Me=P(ge,2);{var Pe=ie=>{Zl(ie,{get isRunning(){return a()},onTimerEnded:w})};V(Me,ie=>{n()&&ie(Pe)})}g(X),g(ce);var Ve=P(ce,2),fe=h(Ve),Oe=h(fe,!0);g(fe),g(Ve),g(re),g(I),S((ie,R)=>{ue(Q,ie),tt(X,`background-image: url('${e.thumb}')`),ee=J(ge,1,"thumb-overlay svelte-1qdxi6t",null,ee,R),ue(Oe,e.title)},[()=>n()?O("end_screen_next_video"):O("end_screen_recommended_video"),()=>({withOpacity:n()})]),_(A,L)};V(C,A=>{e.isHide||A(E)})}_(t,k),F(),o()}ot(["click"]);var f1=require("@vkontakte/videoplayer-core");var m1=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Vt(()=>{f1.clientChecker.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let s=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",s),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",s),a.removeEventListener("webkitendfullscreen",d)}},0))}),dn(()=>{i?.(),clearTimeout(o)})};var v1=require("@vkontakte/videoplayer-core");var nu=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(){return this.getTracksArray().find(e=>e.track.mode==="showing")?.id??null}};var g1=require("@vkontakte/videoplayer-core"),h1=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:n,availableSubtitlesList$:a,currentFormat$:s,availableTextTracks$:d}=t.state,l=null,c=()=>e().querySelector("video"),u=()=>g1.clientChecker.device.isIOS&&_e(s)===v1.VideoFormat.DASH_LIVE_CMAF,b=()=>{l?.(),l=null},p=$=>{if(b(),!u()||!$)return;let w=c();if(!w)return;let x=new nu(w),k=_e(d),C=_e(a),E=_e(n);for(let I of k)C.some(W=>W.value===I.id)&&x.attach(I,E.value===I.id);let A=d.subscribe(I=>{for(let N of I)x.updateSrc(N)}),L=()=>{let I=x.getCurrentShowingId();o(_e(a).find(N=>N.value===I))};w.textTracks.addEventListener("change",L),l=()=>{A(),x.detachAll(),w.textTracks.removeEventListener("change",L)}};Vt(()=>i.subscribe(p)),dn(b)};var h3=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},_3=M("<!> <!>",1),b3=M("<div><!></div>"),$3=M('<div class="spherical-video-icon svelte-dtyj47"><!></div>'),y3=M("<div><!></div>"),x3=M('<div class="settings-mobile svelte-dtyj47"><!></div>'),w3=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),S3=M('<div class="player-wrapper svelte-dtyj47" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),C3={hash:"svelte-dtyj47",code:`.player-wrapper.svelte-dtyj47 {position:absolute;width:100%;height:100%;}.player-wrapper.svelte-dtyj47 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.spherical-video-icon.svelte-dtyj47 {display:inline-block;position:absolute;top:calc(50% - 23px);left:calc(50% - 38px);}
361
- .ads-container.svelte-dtyj47 {position:absolute;width:100%;height:100%;left:0;top:0;}.ads-container.svelte-dtyj47 {z-index:var(--ads-container-z-index);background:var(--black);}.settings-mobile.svelte-dtyj47 {position:absolute;z-index:var(--settings-menu-z-index);top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);display:flex;align-items:center;max-width:320px;width:90%;}`};function Vm(t,e){H(e,!0),z(t,C3);let[i,o]=Le(),n=()=>y(gt,"$playerPhase",i),a=()=>y(Gi,"$isLoaderVisible",i),s=()=>y(Ye,"$adPlaybackState",i),d=()=>y(ei,"$crashed",i),l=()=>y(it,"$notificationsToShow$",i),c=()=>y(Se,"$playbackState$",i),u=()=>y(qe,"$graphIsOpened$",i),b=()=>y(ti,"$interactiveHideMobileControls",i),p=()=>y(So,"$isEnded$",i),$=()=>y(ht,"$isInteractiveExpectation$",i),w=()=>y(oi,"$controlsVisible",i),x=()=>y(ci,"$touched",i),k=()=>y(Oi,"$autoplayNextEnabled$",i),C=()=>y(Co,"$postrollPassed",i),E=()=>y(_n,"$bottomNoSmooth",i),A=()=>y(Mn,"$videoSize",i),L=()=>y(ko,"$playerSize",i),I=()=>y(St,"$isFullscreen",i),N=()=>y(Ee,"$position$",i),W=()=>y(lt,"$duration$",i),Q=()=>y(Ci,"$loadedMetadata",i),j=()=>y(Bi,"$settingsMenuVisible",i),re=()=>y(pn,"$scrubbingInProgress",i),ce=()=>y(Wo,"$volumeChangingInProgress",i),X=()=>y(Ko,"$chromecastConnected$",i),ge=()=>y(jt,"$isInteractiveTime$",i),ee=()=>y(ji,"$isActiveLive",i),Me=()=>y(un,"$settingsMenuOpenedByKeyboard",i),Pe=()=>y(Ue,"$language$",i),Ve=()=>y(fi,"$disabledControls$",i),fe=()=>y(fn,"$is3DVideo",i),Oe=()=>y(Vi,"$icon3DVideoVisible",i),ie=()=>y(zt,"$chromecastDeviceName$",i),R=()=>y(Ct,"$currentSubtitle$",i),Re=()=>y(Ft,"$currentSubtitleCaptions$",i),de=()=>y(_i,"$realDuration$",i),Ke=()=>y(Wt,"$isLive$",i),oe=()=>y(Gt,"$isPlaying$",i),U=()=>y(wo,"$debugPanelVisible",i),Y=m(e,"videoContainer",15),Ae=m(e,"adsSlotId",3,void 0),We=m(e,"adsParams",3,void 0),Fe=m(e,"adsPreviewParam",3,void 0),ye=m(e,"adsAutoplayParam",3,void 0),Ne=m(e,"duration",3,void 0),je=m(e,"logoTargetUrl",3,""),et=m(e,"showNextPrevButtons",3,!1),ct=m(e,"nextButtonActive",3,!1),mt=m(e,"prevButtonActive",3,!1),Je=m(e,"endScreenVideoTitle",3,void 0),ut=m(e,"endScreenVideoThumb",3,void 0),$t=m(e,"isOneVideoPlaylist",3,!1),Ot=m(e,"shadowRootContainer",3,void 0),we=m(e,"outerContainerRef",3,void 0),Dt=m(e,"showMiniTimer",3,!1),ft=m(e,"fullScreenTarget",3,void 0),K=m(e,"playerStarted",3,!1),he=m(e,"showEndScreen",3,!0),{notifications$:ae,graphIsOpened$:qe}=Qi(),Xe=e.store.getLogger().createComponentLog("Root component"),Ue=e.store.interfaceLanguage$,Se=e.store.state.playbackState$,Ye=e.store.ads.playbackState,Ee=e.store.state.positionWithScrubbing$,lt=e.store.state.duration$,gt=e.store.playerPhase,St=e.store.ui.isFullscreen,oi=e.store.ui.controlsVisible,ti=e.store.ui.interactiveHideMobileControls,Bi=e.store.ui.settingsMenu.visible$,un=e.store.ui.settingsMenu.openedByBtnKeyboard$,pn=e.store.ui.scrubbingInProgress,Wo=e.store.ui.volumeChangingInProgress,wo=e.store.ui.debugPanelVisible,Gi=e.store.state.isLoaderVisible,So=e.store.state.isEnded$,Ko=e.store.state.chromecastConnected$,zt=e.store.state.chromecastDeviceName$,Co=e.store.ads.postrollPassed,Qo=e.store.ui.mobileUnmuteButtonExpanded,G=e.store.ui.mobileUnmuteButtonVisible,Wt=e.store.state.isLive$,Gt=e.store.state.isPlaying$,ji=e.store.state.isActiveLive$,ii=e.store.state.isRewindableLive$,ei=e.store.state.crashed$,Si=e.store.webApi.annotationsApi,It=e.store.webApi.pictureInPictureApi,Mn=e.store.state.videoSize$,Ct=e.store.state.currentSubtitle$,Ft=e.store.state.currentSubtitleCaptions$,_i=e.store.state.duration$,ko=e.store.ui.playerSize,fn=e.store.ui.is3DVideo,Vi=e.store.ui.icon3DVideoVisible,oo=e.store.state.isInteractive,jt=e.store.state.isInteractiveTime$,ht=e.store.state.isInteractiveExpectation$,no=e.store.state.hasInteractiveBranches,fi=e.store.ui.controls.disabledControls$,ci=e.store.ui.touched,To=e.store.ui.overlayContainer$,Oi=e.store.ui.autoplayNextEnabled$,Ci=e.store.state.loadedMetadata$,mn=e.store.actions.internal.closeSettingsMenu,vn=e.store.callbacks?.onDisabledPlayPrevChapterClick,bi=e.store.callbacks?.onDisabledSeekToInteractiveClick,Go=e.store.actions.internal.setQuality,ro=Z(void 0),ao=Z(void 0),_r=Z(void 0),Zn=Z(void 0),gn,Ln,Vn,Yi=v(()=>(n()==="video"&&a()||n()==="ads"&&s()==="inactive")&&!d()),Io=Z(void 0),{closeNotification:hn,notificationsToShow$:it}=ae,Eo=v(()=>!!l().slow_video),jo=()=>hn("slow_video"),_n=ne(!1),Xn,Po=Z(!1),Rn=v(()=>c()!==ga.PlaybackState.PLAYING),Yo=Z(!1),bn=v(()=>u()||b()||!r(Po)&&(p()&&!!no||r(Rn)&&$())),$i=Z(!0),Ri=v(()=>e.uiConfig.features.thumbTimer&&Dt()&&n()==="video"&&!w()&&!d()&&!oo&&(e.uiConfig.hideThumbTimerAfterTouch&&!x()||!e.uiConfig.hideThumbTimerAfterTouch)),$n=Z(!1),vo=v(()=>(he()||e.showAutoplayNext&&k())&&!!Je()&&!!ut()&&(e.showAds&&C()||!e.showAds)&&p()&&!d()&&!r($n)),yn=Z(!1);It?.setContext(El());let Ao=nt=>{clearTimeout(Ln),nt&&(G.set(!0),Qo.set(!0),Ln=setTimeout(()=>{Qo.set(!1)},e.uiConfig.controls.collapseMobileUnmute),oo||ni(e.uiConfig.controls.hideTimeoutMobile))};e.store.setUiCallbacks({onStarted:Ao});let go=()=>{clearTimeout(gn),D(Po,!1),b()&&ti.set(!1)},ni=nt=>{go(),D(Po,!0),gn=setTimeout(()=>D(Po,!1),nt);let Et=nt-100;Xn=setTimeout(()=>{E()&&_n.set(!1)},Et>0?Et:nt)},Nn=fn.subscribe(nt=>{Vi.set(nt),nt&&(clearTimeout(Vn),Vn=setTimeout(()=>Vi.set(!1),e.uiConfig.controls.hide360IconTimeout))}),so=async(nt=aa())=>{if(nt&&!ga.clientChecker.device.isIOS){let Et=zl(),yi=Mo(),ki=ga.clientChecker.browser.isSamsungBrowser&&Et===Ot();nt=Et===yi||ki}if(nt){ni(e.uiConfig.controls.hideTimeoutFullscreen);try{await It?.remove()}catch(Et){Xe({message:String(Et)})}try{let Et=A()?.width&&A()?.height?A():L();await ch(Et)}catch(Et){Xe({message:String(Et)})}}St.set(nt),e.store.getAdmanWrapper().setFullscreen(nt),I()?e.store.callbacks?.onFullscreenEnter?.():e.store.callbacks?.onFullscreenExit?.()},Jn=nt=>{let Et=nt;ko.set({width:Et.target.width,height:Et.target.height})};Vt(()=>(Ac(so),e.uiConfig.features.annotationsInside&&Si?.init(r(ro)),Wa(It)&&(It?.assignPlayerContainer(r(ro)),It?.registryExternalEventHandlers({resize:Jn})),D($i,!ga.clientChecker.device.isIphoneOrOldIpad),e.interactiveContainer&&Y().parentElement?.insertBefore(e.interactiveContainer,Y().nextSibling),()=>{clearTimeout(gn),clearTimeout(Xn),clearTimeout(Ln),clearTimeout(Vn),Nn(),It?.dispose().catch(nt=>{Xe({message:String(nt)})}),Mc(so)}));let Zo=Z(!0),Xo=Z(!0),er=nt=>{let Et=N()+(nt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;Et<0?(D(Zo,!1),Et=0):Et>=W()&&(D(Xo,!1),Et=W()),D(Yo,!0),e.seekTime(Et)},Mo=()=>{let nt=ga.clientChecker.device.isIOS||e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!we()?r(ro):we(),Et=nt.getRootNode(),yi=Et instanceof ShadowRoot?Et.host:Et,ki=ft()instanceof HTMLElement&&ft().contains(yi);return e.uiConfig.allowChangingFullscreenTarget&&ft()&&ki?ft():nt},br=async()=>{try{if(aa())await Pc(document),Xe({message:"exit fullscreen"});else{if(Xe({message:"request fullscreen"}),ga.clientChecker.device.isIOS&&!Q())return;await Ec(Mo())}}catch(nt){Xe({message:String(nt)})}},xn=()=>{mn()},Dn=nt=>{if(nt.preventDefault(),j()){xn();return}if(!K()){e.firstStart(),ni(e.uiConfig.controls.hideTimeoutCursor);return}D(Yo,!1),w()?go():ni(e.uiConfig.controls.hideTimeoutMobile)},tr=()=>{ci.set(!0)},$r=()=>{oo||(_n.set(!0),ni(e.uiConfig.controls.hideTimeoutCursor))},Bn=nt=>{vn&&(vn(nt),ni(e.uiConfig.controls.hideTimeoutMobile))},Jo=nt=>{bi&&(bi(nt),ni(e.uiConfig.controls.hideTimeoutMobile))};He(()=>{To.set(r(Io))}),He(()=>{oi.set((r(Rn)||j()||re()||ce()||X()||!r(vo)&&(p()||r(Po)&&!r(Yo)))&&!r(bn)&&n()==="video"&&!d())}),He(()=>{!re()&&r(yn)&&!ge()&&ni(e.uiConfig.controls.hideTimeoutMobile),D(yn,le(re()))}),He(()=>{D(Zo,N()>0),D(Xo,le(!ee()&&N()<W()))}),He(()=>{Ws(r(Zn),j(),Me())});let On=O("aria_label_video_player"),Yt=O("video360");m1({fullScreenChangeHandler:so,getFullscreenTarget:Mo}),h1({store:e.store,getFullscreenTarget:Mo});var ho=S3();_t("blur",Pa,xn),De(ho,"aria-label",On);var Ze=h(ho);us(Ze,{onClick:Dn,get videoContainer(){return Y()},set videoContainer(nt){Y(nt)}});var Mt=P(Ze,2);Na(Mt,()=>"slot",!1,(nt,Et)=>{$e(nt,null,{name:cs})});var mi=P(Mt,2);Ra(mi,Pe,nt=>{var Et=w3(),yi=se(Et);let ki=v(()=>n()!=="thumb"||d()||oo&&e.autoplay);ss(yi,{get hidden(){return r(ki)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Ti=P(yi,2);{var Ii=Ie=>{var Pt=_3(),qt=se(Pt);{var di=Fi=>{let uo=v(()=>e.uiConfig.controls.seekStepMobile/1e3);ou(Fi,{side:"left",get seekStep(){return r(uo)},handleSingleFirstClick:Dn,handleSecondClick:()=>er("backward")})};V(qt,Fi=>{r(Zo)&&Fi(di)})}var Kt=P(qt,2);{var Un=Fi=>{let uo=v(()=>e.uiConfig.controls.seekStepMobile/1e3);ou(Fi,{side:"right",get seekStep(){return r(uo)},handleSingleFirstClick:Dn,handleSecondClick:()=>er("forward")})};V(Kt,Fi=>{r(Xo)&&Fi(Un)})}_(Ie,Pt)};V(Ti,Ie=>{e.canRewindLive&&ii&&!Ve().has("TIMELINE")&&Ie(Ii)})}var Ni=P(Ti,2);{var Lo=Ie=>{let Pt=v(()=>e.live?.startTime);Sd(Ie,{get thumbUrl(){return e.thumbUrl},get startTime(){return r(Pt)}})};V(Ni,Ie=>{n()==="LiveWaitingStart"&&Ie(Lo)})}var en=P(Ni,2);{var Zi=Ie=>{ls(Ie,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};V(en,Ie=>{n()==="LiveWaitingRecover"&&Ie(Zi)})}var Hn=P(en,2);{var ir=Ie=>{ls(Ie,{kind:"record",get thumbUrl(){return e.thumbUrl}})};V(Hn,Ie=>{n()==="LiveWaitingRecord"&&Ie(ir)})}var Hi=P(Hn,2);{var tn=Ie=>{var Pt=b3();let qt;var di=h(Pt);ql(di,{get adsSlotId(){return Ae()},get adsParams(){return We()},get adsPreviewParam(){return Fe()},get adsAutoplayParam(){return ye()},get duration(){return Ne()}}),g(Pt),S(Kt=>qt=J(Pt,1,"ads-container svelte-dtyj47",null,qt,Kt),[()=>({hidden:n()!=="ads"})]),_(Ie,Pt)};V(Hi,Ie=>{e.showAds&&K()&&Ie(tn)})}var Fn=P(Hi,2);{var or=Ie=>{let Pt=v(()=>!he()&&e.showAutoplayNext&&k());Lm(Ie,{get title(){return Je()},get thumb(){return ut()},get isHide(){return r(Pt)},clickCloseIcon:()=>D($n,!0)})};V(Fn,Ie=>{r(vo)&&Je()&&ut()&&Ie(or)})}var yr=P(Fn,2);{var wn=Ie=>{yd(Ie,{})};V(yr,Ie=>{fe()&&Ie(wn)})}var on=P(yr,2);{var nr=Ie=>{var Pt=$3(),qt=h(Pt);Ul(qt,{"aria-label":Yt}),g(Pt),_(Ie,Pt)};V(on,Ie=>{Oe()&&Ie(nr)})}var _o=P(on,2);{var xr=Ie=>{xd(Ie,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return ie()}})};V(_o,Ie=>{X()&&Ie(xr)})}var bo=P(_o,2);{var rr=Ie=>{as(Ie,{get shifted(){return w()},get captions(){return Re()},get position(){return N()},get playerSize(){return L()},isMobile:!0})};V(bo,Ie=>{R().value!=="off"&&Ie(rr)})}var wr=P(bo,2);{var Nr=Ie=>{var Pt=y3();Pt.__click=[h3,j,Bi,xn];var qt=h(Pt);wd(qt,{}),g(Pt),_(Ie,Pt)};V(wr,Ie=>{d()&&Ie(Nr)})}var ar=P(wr,2);{var Di=Ie=>{let Pt=v(()=>n()==="thumb"||n()==="LiveWaitingStart"||n()==="LiveWaitingRecover"||n()==="LiveWaitingRecord"||n()==="ads"),qt=v(()=>n()==="ads"),di=v(()=>e.canRewindLive&&de()!==0);$d(Ie,{get bottomHidden(){return r(Pt)},get showControls(){return w()},get bottomNoSmooth(){return E()},get isAds(){return r(qt)},get canRewindLive(){return r(di)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return je()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return et()},get nextButtonActive(){return ct()},get prevButtonActive(){return mt()},get isOneVideoPlaylist(){return $t()},get customFullscreenSupported(){return r($i)},get endScreenShown(){return r(vo)},toggleFullscreen:br,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Bn,onDisabledSeekToInteractiveClick:Jo,get playerControlsWrapperRef(){return r(ao)},set playerControlsWrapperRef(Kt){D(ao,le(Kt))},get playerControlsRef(){return r(_r)},set playerControlsRef(Kt){D(_r,le(Kt))}})};V(ar,Ie=>{K()&&Ie(Di)})}var nn=P(ar,2);{var rt=Ie=>{var Pt=x3(),qt=h(Pt);Id(qt,{get supportLink(){return e.supportLink},returnFocus:_1.noop,get ref(){return r(Zn)},set ref(di){D(Zn,le(di))}}),g(Pt),_(Ie,Pt)};V(nn,Ie=>{j()&&Ie(rt)})}var Nt=P(nn,2);let vi=v(()=>!r(Ri));Ql(Nt,{get isLive(){return Ke()},get isHidden(){return r(vi)},get isPlaying(){return oe()},get position(){return N()},get duration(){return W()}});var co=P(Nt,2);{var Vo=Ie=>{Ya(Ie,{})};V(co,Ie=>{r(Yi)&&Ie(Vo)})}var Ce=P(co,2);{var Bt=Ie=>{Yl(Ie,{})};V(Ce,Ie=>{U()&&Ie(Bt)})}var xi=P(Ce,2);{var Zt=Ie=>{Ed(Ie,{onClose:jo,onSelectAutoQuality:()=>{Go("auto"),jo()}})};V(xi,Ie=>{r(Eo)&&Ie(Zt)})}_(nt,Et)});var lo=P(mi,2);st(lo,nt=>D(Io,nt),()=>r(Io)),g(ho),st(ho,nt=>D(ro,nt),()=>r(ro)),_t("click",ho,tr,!0),_t("focusin",ho,$r,!0),_(t,ho),F(),o()}ot(["click"]);function ru(t){let e="";return An(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),An(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),An(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),An(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),An(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),An(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),An(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),An(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),An(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),An(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),An(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),An(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),An(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),e.length&&e||void 0}function An(t){return typeof t=="string"&&!t.includes(";")}var b1=require("@vkontakte/videoplayer-shared");var k3=M('<div class="player-wrapper svelte-1qfjf44" role="region"><!> <!> <!> <!> <div class="time-container svelte-1qfjf44"><!></div> <div><!></div></div>'),T3={hash:"svelte-1qfjf44",code:".player-wrapper.svelte-1qfjf44 {position:absolute;width:100%;height:100%;}.player-wrapper.svelte-1qfjf44 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.timeline.svelte-1qfjf44 {opacity:0;opacity:1;position:absolute;z-index:var(--controls-container-z-index);width:100%;bottom:0;left:0;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);}.visible.svelte-1qfjf44 {opacity:1;}.time-container.svelte-1qfjf44 {position:absolute;bottom:8px;right:8px;z-index:var(--thumb-timer-z-index);}"};function Rm(t,e){H(e,!0),z(t,T3);let[i,o]=Le(),n=()=>y(ce,"$playerSize",i),a=()=>y(I,"$isPlaying$",i),s=()=>y(A,"$duration$",i),d=()=>y(Q,"$positionWithScrubbing$",i),l=()=>y(C,"$playerPhase",i),c=()=>y(E,"$crashed$",i),u=()=>y(N,"$currentSubtitle$",i),b=()=>y(W,"$currentSubtitleCaptions$",i),p=()=>y(L,"$positionExact$",i),$=()=>y(j,"$isLive$",i),w=()=>y(re,"$isRewindableLive$",i),x=m(e,"outsideDuration",3,0),k=m(e,"videoContainer",15),{playerPhase:C,state:{crashed$:E,duration$:A,positionExact$:L,isPlaying$:I,currentSubtitle$:N,currentSubtitleCaptions$:W,positionWithScrubbing$:Q,isLive$:j,isRewindableLive$:re},ui:{playerSize:ce,controls:X},actions:{internal:{getVideoElement:ge}}}=be(),ee=8,Me=Z(!1),Pe=le({}),Ve=()=>{D(Me,!0)},fe=()=>{D(Me,!1)},Oe=(0,b1.debounceFn)(Js,260);He(()=>{n(),Oe(ge(),X,Pe,r(Me))});let ie=v(()=>a()?zo(s()-d()):zo(isFinite(s())?s():x()));var R=k3(),Re=h(R);us(Re,{hideCursor:!1,get videoContainer(){return k()},set videoContainer(je){k(je)}});var de=P(Re,2);Na(de,()=>"slot",!1,(je,et)=>{$e(je,null,{name:cs})});var Ke=P(de,2);let oe=v(()=>l()!=="thumb"||c());ss(Ke,{get hidden(){return r(oe)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var U=P(Ke,2);{var Y=je=>{as(je,{shifted:!1,get captions(){return b()},get position(){return p()},get playerSize(){return n()}})};V(U,je=>{u().value!=="off"&&je(Y)})}var Ae=P(U,2),We=h(Ae);Kl(We,{get isLive(){return $()},get isPlaying(){return a()},get time(){return r(ie)}}),g(Ae);var Fe=P(Ae,2);let ye;var Ne=h(Fe);es(Ne,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return w()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:ee,tooltipRightOffset:ee,get ref(){return Pe.timeline},set ref(je){Pe.timeline=je}}),g(Fe),g(R),S(je=>ye=J(Fe,1,"timeline svelte-1qfjf44",null,ye,je),[()=>({visible:r(Me)})]),_t("mouseenter",R,Ve),_t("mouseleave",R,fe),_(t,R),F(),o()}var I3=M("<div><!></div>"),E3={hash:"svelte-7ed4yj",code:`.root.svelte-7ed4yj {--white: #fff;--black: #000;--red: #ff3347;--blue-light: #70c1ff;--black-alpha-40: rgba(0, 0, 0, 0.4);--white-alpha-24: rgba(255, 255, 255, 0.24);--white-alpha-72: rgba(255, 255, 255, 0.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;--focused: var(--white);--focused-element-shadow: inset 0 0 0 2px 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, 0.5);--big-play-hover-bg-color: rgba(0, 0, 0, 0.6);--big-play-icon-width: 38px;--big-play-icon-height: 33px;--interactive-episode-complete: rgba(92, 156, 230, 1);--slider-bg: rgba(255, 255, 255, 0.4);--slider-filled-bg: var(--white);--slider-handle-bg: var(--white);--slider-loaded-bg: rgba(255, 255, 255, 0.4);--slider-height: 3px;--slider-video-episode-gap: 1.5px;--slider-radius: 0px;--slider-handle-size: 12px;--slider-filled-ads: rgba(103, 165, 235, 1);--slider-disabled-color: rgba(248, 248, 248, 0.31);--slider-volume-height: 5px;--slider-volume-radius: calc(var(--slider-volume-height) / 2);--slider-volume-handle-size: 13px;
360
+ }.triangle.left.svelte-nhq2ld {border-right:8px solid var(--white);}.triangle.right.svelte-nhq2ld {border-left:8px solid var(--white);}.triangle.svelte-nhq2ld:not(:last-child) {margin-right:5px;}.step-caption.svelte-nhq2ld {margin:0;text-align:center;font-size:12px;line-height:1;color:var(--white);}`};function ou(t,e){H(e,!0),z(t,f3);let i=m(e,"seekStep",3,0),o=Z(!1),n=0,a=0,s=Z(le(i())),d=b=>{b.stopPropagation(),a+=1,D(s,i()*(a-1)),a===1?e.handleSingleFirstClick(b):(D(o,!0),e.handleSecondClick()),window.clearTimeout(n),n=window.setTimeout(()=>{a=0,D(o,!1)},300)};dn(()=>{window.clearTimeout(n)});var l=p3();l.__click=d;var c=h(l);{var u=b=>{var p=u3(),$=se(p),w=P($,2),x=h(w),k=h(x),C=P(k,2),E=P(C,2);g(x);var A=P(x,2),L=h(A,!0);g(A),g(w),S(I=>{J($,1,`semicircle ${e.side??""}`,"svelte-nhq2ld"),J(k,1,`triangle ${e.side??""}`,"svelte-nhq2ld"),J(C,1,`triangle ${e.side??""}`,"svelte-nhq2ld"),J(E,1,`triangle ${e.side??""}`,"svelte-nhq2ld"),ue(L,I)},[()=>O("doubletap_seek_step",{seconds:r(s).toFixed(0)})]),_(b,p)};V(c,b=>{r(o)&&b(u)})}g(l),S(()=>J(l,1,`double-click-area ${e.side??""}`,"svelte-nhq2ld")),_(t,l),F()}ot(["click"]);var m3=(t,e,i)=>{e(!1),i()},v3=M('<div class="overlay svelte-1qdxi6t"></div> <div class="next-video svelte-1qdxi6t"><div class="top svelte-1qdxi6t"><div class="caption svelte-1qdxi6t"> </div> <!></div> <div class="row svelte-1qdxi6t"><div class="column svelte-1qdxi6t"><div class="thumb svelte-1qdxi6t"><div></div> <!></div></div> <div class="column svelte-1qdxi6t"><div class="title svelte-1qdxi6t"> </div></div></div></div>',1),g3={hash:"svelte-1qdxi6t",code:".overlay.svelte-1qdxi6t {width:100%;height:100%;background:rgba(0, 0, 0, 0.72);position:absolute;}.next-video.svelte-1qdxi6t {position:absolute;top:50%;left:50%;z-index:var(--end-screen-mobile-z-index);transform:translate(-50%, -50%);display:flex;flex-direction:column;max-width:362px;min-width:320px;margin:0 auto;padding-bottom:12px;}.top.svelte-1qdxi6t {display:flex;justify-content:space-between;}.caption.svelte-1qdxi6t {font-size:11px;font-weight:bold;color:var(--white);text-transform:uppercase;opacity:0.8;}.row.svelte-1qdxi6t {height:102px;background:rgba(48, 48, 48, .8);cursor:pointer;margin-top:6px;display:flex;flex-direction:row;width:100%;}.column.svelte-1qdxi6t {display:flex;flex-direction:column;flex-basis:50%;}.thumb.svelte-1qdxi6t {width:100%;height:100%;background:no-repeat center;background-size:cover;display:flex;align-items:center;position:relative;justify-content:space-around;}.thumb-overlay.svelte-1qdxi6t {width:100%;height:100%;position:absolute;}.thumb-overlay.withOpacity.svelte-1qdxi6t {background:var(--black);opacity:0.3;}.title.svelte-1qdxi6t {padding:10px 16px;font-size:12px;font-weight:bold;color:var(--white);line-height:1.6;max-height:52px;overflow:hidden;}"};function Lm(t,e){H(e,!0),z(t,g3);let[i,o]=Le(),n=()=>y(d,"$autoplayNextEnabled$",i),a=()=>y(l,"$timerNextVideoRunning$",i),s=be(),d=s.ui.autoplayNextEnabled$,l=s.ui.timerNextVideoRunning$,c=s.actions.internal.nextVideoClick,u=s.actions.internal.nextVideoAnnouncementShow,b=s.actions.internal.nextVideoAnnouncementClick,p=s.actions.internal.nextVideoAnnouncementAuto,$=s.actions.internal.nextVideoAnnouncementCancel,w=()=>{c(!1),p()},x=()=>{e.clickCloseIcon(),$()};Vt(()=>{e.isHide||u(),e.isHide&&n()&&(c(!1),p())});var k=Be(),C=se(k);{var E=A=>{var L=v3(),I=P(se(L),2),N=h(I),W=h(N),Q=h(W,!0);g(W);var j=P(W,2);ja(j,{onClick:x}),g(N);var re=P(N,2);re.__click=[m3,c,b];var ce=h(re),X=h(ce),ge=h(X);let ee;var Me=P(ge,2);{var Pe=ie=>{Zl(ie,{get isRunning(){return a()},onTimerEnded:w})};V(Me,ie=>{n()&&ie(Pe)})}g(X),g(ce);var Re=P(ce,2),fe=h(Re),Oe=h(fe,!0);g(fe),g(Re),g(re),g(I),S((ie,R)=>{ue(Q,ie),tt(X,`background-image: url('${e.thumb}')`),ee=J(ge,1,"thumb-overlay svelte-1qdxi6t",null,ee,R),ue(Oe,e.title)},[()=>n()?O("end_screen_next_video"):O("end_screen_recommended_video"),()=>({withOpacity:n()})]),_(A,L)};V(C,A=>{e.isHide||A(E)})}_(t,k),F(),o()}ot(["click"]);var f1=require("@vkontakte/videoplayer-core");var m1=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Vt(()=>{f1.clientChecker.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let s=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",s),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",s),a.removeEventListener("webkitendfullscreen",d)}},0))}),dn(()=>{i?.(),clearTimeout(o)})};var v1=require("@vkontakte/videoplayer-core");var nu=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(){return this.getTracksArray().find(e=>e.track.mode==="showing")?.id??null}};var g1=require("@vkontakte/videoplayer-core"),h1=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:n,availableSubtitlesList$:a,currentFormat$:s,availableTextTracks$:d}=t.state,l=null,c=()=>e().querySelector("video"),u=()=>g1.clientChecker.device.isIOS&&_e(s)===v1.VideoFormat.DASH_LIVE_CMAF,b=()=>{l?.(),l=null},p=$=>{if(b(),!u()||!$)return;let w=c();if(!w)return;let x=new nu(w),k=_e(d),C=_e(a),E=_e(n);for(let I of k)C.some(W=>W.value===I.id)&&x.attach(I,E.value===I.id);let A=d.subscribe(I=>{for(let N of I)x.updateSrc(N)}),L=()=>{let I=x.getCurrentShowingId();o(_e(a).find(N=>N.value===I))};w.textTracks.addEventListener("change",L),l=()=>{A(),x.detachAll(),w.textTracks.removeEventListener("change",L)}};Vt(()=>i.subscribe(p)),dn(b)};var h3=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},_3=M("<!> <!>",1),b3=M("<div><!></div>"),$3=M('<div class="spherical-video-icon svelte-dtyj47"><!></div>'),y3=M("<div><!></div>"),x3=M('<div class="settings-mobile svelte-dtyj47"><!></div>'),w3=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),S3=M('<div class="player-wrapper svelte-dtyj47" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),C3={hash:"svelte-dtyj47",code:`.player-wrapper.svelte-dtyj47 {position:absolute;width:100%;height:100%;}.player-wrapper.svelte-dtyj47 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.spherical-video-icon.svelte-dtyj47 {display:inline-block;position:absolute;top:calc(50% - 23px);left:calc(50% - 38px);}
361
+ .ads-container.svelte-dtyj47 {position:absolute;width:100%;height:100%;left:0;top:0;}.ads-container.svelte-dtyj47 {z-index:var(--ads-container-z-index);background:var(--black);}.settings-mobile.svelte-dtyj47 {position:absolute;z-index:var(--settings-menu-z-index);top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);display:flex;align-items:center;max-width:320px;width:90%;}`};function Vm(t,e){H(e,!0),z(t,C3);let[i,o]=Le(),n=()=>y(gt,"$playerPhase",i),a=()=>y(Gi,"$isLoaderVisible",i),s=()=>y(Ye,"$adPlaybackState",i),d=()=>y(ei,"$crashed",i),l=()=>y(it,"$notificationsToShow$",i),c=()=>y(Se,"$playbackState$",i),u=()=>y(qe,"$graphIsOpened$",i),b=()=>y(ti,"$interactiveHideMobileControls",i),p=()=>y(So,"$isEnded$",i),$=()=>y(ht,"$isInteractiveExpectation$",i),w=()=>y(oi,"$controlsVisible",i),x=()=>y(ci,"$touched",i),k=()=>y(Oi,"$autoplayNextEnabled$",i),C=()=>y(Co,"$postrollPassed",i),E=()=>y(_n,"$bottomNoSmooth",i),A=()=>y(Mn,"$videoSize",i),L=()=>y(ko,"$playerSize",i),I=()=>y(St,"$isFullscreen",i),N=()=>y(Ee,"$position$",i),W=()=>y(lt,"$duration$",i),Q=()=>y(Ci,"$loadedMetadata",i),j=()=>y(Bi,"$settingsMenuVisible",i),re=()=>y(pn,"$scrubbingInProgress",i),ce=()=>y(Wo,"$volumeChangingInProgress",i),X=()=>y(Ko,"$chromecastConnected$",i),ge=()=>y(jt,"$isInteractiveTime$",i),ee=()=>y(ji,"$isActiveLive",i),Me=()=>y(un,"$settingsMenuOpenedByKeyboard",i),Pe=()=>y(Ue,"$language$",i),Re=()=>y(fi,"$disabledControls$",i),fe=()=>y(fn,"$is3DVideo",i),Oe=()=>y(Vi,"$icon3DVideoVisible",i),ie=()=>y(zt,"$chromecastDeviceName$",i),R=()=>y(Ct,"$currentSubtitle$",i),Ne=()=>y(Ft,"$currentSubtitleCaptions$",i),de=()=>y(_i,"$realDuration$",i),Ke=()=>y(Wt,"$isLive$",i),oe=()=>y(Gt,"$isPlaying$",i),U=()=>y(wo,"$debugPanelVisible",i),Y=m(e,"videoContainer",15),Ae=m(e,"adsSlotId",3,void 0),We=m(e,"adsParams",3,void 0),Fe=m(e,"adsPreviewParam",3,void 0),ye=m(e,"adsAutoplayParam",3,void 0),De=m(e,"duration",3,void 0),je=m(e,"logoTargetUrl",3,""),et=m(e,"showNextPrevButtons",3,!1),ct=m(e,"nextButtonActive",3,!1),mt=m(e,"prevButtonActive",3,!1),Je=m(e,"endScreenVideoTitle",3,void 0),ut=m(e,"endScreenVideoThumb",3,void 0),$t=m(e,"isOneVideoPlaylist",3,!1),Ot=m(e,"shadowRootContainer",3,void 0),we=m(e,"outerContainerRef",3,void 0),Dt=m(e,"showMiniTimer",3,!1),ft=m(e,"fullScreenTarget",3,void 0),K=m(e,"playerStarted",3,!1),he=m(e,"showEndScreen",3,!0),{notifications$:ae,graphIsOpened$:qe}=Qi(),Xe=e.store.getLogger().createComponentLog("Root component"),Ue=e.store.interfaceLanguage$,Se=e.store.state.playbackState$,Ye=e.store.ads.playbackState,Ee=e.store.state.positionWithScrubbing$,lt=e.store.state.duration$,gt=e.store.playerPhase,St=e.store.ui.isFullscreen,oi=e.store.ui.controlsVisible,ti=e.store.ui.interactiveHideMobileControls,Bi=e.store.ui.settingsMenu.visible$,un=e.store.ui.settingsMenu.openedByBtnKeyboard$,pn=e.store.ui.scrubbingInProgress,Wo=e.store.ui.volumeChangingInProgress,wo=e.store.ui.debugPanelVisible,Gi=e.store.state.isLoaderVisible,So=e.store.state.isEnded$,Ko=e.store.state.chromecastConnected$,zt=e.store.state.chromecastDeviceName$,Co=e.store.ads.postrollPassed,Qo=e.store.ui.mobileUnmuteButtonExpanded,G=e.store.ui.mobileUnmuteButtonVisible,Wt=e.store.state.isLive$,Gt=e.store.state.isPlaying$,ji=e.store.state.isActiveLive$,ii=e.store.state.isRewindableLive$,ei=e.store.state.crashed$,Si=e.store.webApi.annotationsApi,It=e.store.webApi.pictureInPictureApi,Mn=e.store.state.videoSize$,Ct=e.store.state.currentSubtitle$,Ft=e.store.state.currentSubtitleCaptions$,_i=e.store.state.duration$,ko=e.store.ui.playerSize,fn=e.store.ui.is3DVideo,Vi=e.store.ui.icon3DVideoVisible,oo=e.store.state.isInteractive,jt=e.store.state.isInteractiveTime$,ht=e.store.state.isInteractiveExpectation$,no=e.store.state.hasInteractiveBranches,fi=e.store.ui.controls.disabledControls$,ci=e.store.ui.touched,To=e.store.ui.overlayContainer$,Oi=e.store.ui.autoplayNextEnabled$,Ci=e.store.state.loadedMetadata$,mn=e.store.actions.internal.closeSettingsMenu,vn=e.store.callbacks?.onDisabledPlayPrevChapterClick,bi=e.store.callbacks?.onDisabledSeekToInteractiveClick,Go=e.store.actions.internal.setQuality,ro=Z(void 0),ao=Z(void 0),_r=Z(void 0),Zn=Z(void 0),gn,Ln,Vn,Yi=v(()=>(n()==="video"&&a()||n()==="ads"&&s()==="inactive")&&!d()),Io=Z(void 0),{closeNotification:hn,notificationsToShow$:it}=ae,Eo=v(()=>!!l().slow_video),jo=()=>hn("slow_video"),_n=ne(!1),Xn,Po=Z(!1),Rn=v(()=>c()!==ga.PlaybackState.PLAYING),Yo=Z(!1),bn=v(()=>u()||b()||!r(Po)&&(p()&&!!no||r(Rn)&&$())),$i=Z(!0),Ri=v(()=>e.uiConfig.features.thumbTimer&&Dt()&&n()==="video"&&!w()&&!d()&&!oo&&(e.uiConfig.hideThumbTimerAfterTouch&&!x()||!e.uiConfig.hideThumbTimerAfterTouch)),$n=Z(!1),vo=v(()=>(he()||e.showAutoplayNext&&k())&&!!Je()&&!!ut()&&(e.showAds&&C()||!e.showAds)&&p()&&!d()&&!r($n)),yn=Z(!1);It?.setContext(El());let Ao=nt=>{clearTimeout(Ln),nt&&(G.set(!0),Qo.set(!0),Ln=setTimeout(()=>{Qo.set(!1)},e.uiConfig.controls.collapseMobileUnmute),oo||ni(e.uiConfig.controls.hideTimeoutMobile))};e.store.setUiCallbacks({onStarted:Ao});let go=()=>{clearTimeout(gn),D(Po,!1),b()&&ti.set(!1)},ni=nt=>{go(),D(Po,!0),gn=setTimeout(()=>D(Po,!1),nt);let Et=nt-100;Xn=setTimeout(()=>{E()&&_n.set(!1)},Et>0?Et:nt)},Nn=fn.subscribe(nt=>{Vi.set(nt),nt&&(clearTimeout(Vn),Vn=setTimeout(()=>Vi.set(!1),e.uiConfig.controls.hide360IconTimeout))}),so=async(nt=aa())=>{if(nt&&!ga.clientChecker.device.isIOS){let Et=zl(),yi=Mo(),ki=ga.clientChecker.browser.isSamsungBrowser&&Et===Ot();nt=Et===yi||ki}if(nt){ni(e.uiConfig.controls.hideTimeoutFullscreen);try{await It?.remove()}catch(Et){Xe({message:String(Et)})}try{let Et=A()?.width&&A()?.height?A():L();await ch(Et)}catch(Et){Xe({message:String(Et)})}}St.set(nt),e.store.getAdmanWrapper().setFullscreen(nt),I()?e.store.callbacks?.onFullscreenEnter?.():e.store.callbacks?.onFullscreenExit?.()},Jn=nt=>{let Et=nt;ko.set({width:Et.target.width,height:Et.target.height})};Vt(()=>(Ac(so),e.uiConfig.features.annotationsInside&&Si?.init(r(ro)),Wa(It)&&(It?.assignPlayerContainer(r(ro)),It?.registryExternalEventHandlers({resize:Jn})),D($i,!ga.clientChecker.device.isIphoneOrOldIpad),e.interactiveContainer&&Y().parentElement?.insertBefore(e.interactiveContainer,Y().nextSibling),()=>{clearTimeout(gn),clearTimeout(Xn),clearTimeout(Ln),clearTimeout(Vn),Nn(),It?.dispose().catch(nt=>{Xe({message:String(nt)})}),Mc(so)}));let Zo=Z(!0),Xo=Z(!0),er=nt=>{let Et=N()+(nt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;Et<0?(D(Zo,!1),Et=0):Et>=W()&&(D(Xo,!1),Et=W()),D(Yo,!0),e.seekTime(Et)},Mo=()=>{let nt=ga.clientChecker.device.isIOS||e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!we()?r(ro):we(),Et=nt.getRootNode(),yi=Et instanceof ShadowRoot?Et.host:Et,ki=ft()instanceof HTMLElement&&ft().contains(yi);return e.uiConfig.allowChangingFullscreenTarget&&ft()&&ki?ft():nt},br=async()=>{try{if(aa())await Pc(document),Xe({message:"exit fullscreen"});else{if(Xe({message:"request fullscreen"}),ga.clientChecker.device.isIOS&&!Q())return;await Ec(Mo())}}catch(nt){Xe({message:String(nt)})}},xn=()=>{mn()},Dn=nt=>{if(nt.preventDefault(),j()){xn();return}if(!K()){e.firstStart(),ni(e.uiConfig.controls.hideTimeoutCursor);return}D(Yo,!1),w()?go():ni(e.uiConfig.controls.hideTimeoutMobile)},tr=()=>{ci.set(!0)},$r=()=>{oo||(_n.set(!0),ni(e.uiConfig.controls.hideTimeoutCursor))},Bn=nt=>{vn&&(vn(nt),ni(e.uiConfig.controls.hideTimeoutMobile))},Jo=nt=>{bi&&(bi(nt),ni(e.uiConfig.controls.hideTimeoutMobile))};He(()=>{To.set(r(Io))}),He(()=>{oi.set((r(Rn)||j()||re()||ce()||X()||!r(vo)&&(p()||r(Po)&&!r(Yo)))&&!r(bn)&&n()==="video"&&!d())}),He(()=>{!re()&&r(yn)&&!ge()&&ni(e.uiConfig.controls.hideTimeoutMobile),D(yn,le(re()))}),He(()=>{D(Zo,N()>0),D(Xo,le(!ee()&&N()<W()))}),He(()=>{Ws(r(Zn),j(),Me())});let On=O("aria_label_video_player"),Yt=O("video360");m1({fullScreenChangeHandler:so,getFullscreenTarget:Mo}),h1({store:e.store,getFullscreenTarget:Mo});var ho=S3();_t("blur",Pa,xn),Ve(ho,"aria-label",On);var Ze=h(ho);us(Ze,{onClick:Dn,get videoContainer(){return Y()},set videoContainer(nt){Y(nt)}});var Mt=P(Ze,2);Na(Mt,()=>"slot",!1,(nt,Et)=>{$e(nt,null,{name:cs})});var mi=P(Mt,2);Ra(mi,Pe,nt=>{var Et=w3(),yi=se(Et);let ki=v(()=>n()!=="thumb"||d()||oo&&e.autoplay);ss(yi,{get hidden(){return r(ki)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Ti=P(yi,2);{var Ii=Ie=>{var Pt=_3(),qt=se(Pt);{var di=Fi=>{let uo=v(()=>e.uiConfig.controls.seekStepMobile/1e3);ou(Fi,{side:"left",get seekStep(){return r(uo)},handleSingleFirstClick:Dn,handleSecondClick:()=>er("backward")})};V(qt,Fi=>{r(Zo)&&Fi(di)})}var Kt=P(qt,2);{var Un=Fi=>{let uo=v(()=>e.uiConfig.controls.seekStepMobile/1e3);ou(Fi,{side:"right",get seekStep(){return r(uo)},handleSingleFirstClick:Dn,handleSecondClick:()=>er("forward")})};V(Kt,Fi=>{r(Xo)&&Fi(Un)})}_(Ie,Pt)};V(Ti,Ie=>{e.canRewindLive&&ii&&!Re().has("TIMELINE")&&Ie(Ii)})}var Ni=P(Ti,2);{var Lo=Ie=>{let Pt=v(()=>e.live?.startTime);Sd(Ie,{get thumbUrl(){return e.thumbUrl},get startTime(){return r(Pt)}})};V(Ni,Ie=>{n()==="LiveWaitingStart"&&Ie(Lo)})}var en=P(Ni,2);{var Zi=Ie=>{ls(Ie,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};V(en,Ie=>{n()==="LiveWaitingRecover"&&Ie(Zi)})}var Hn=P(en,2);{var ir=Ie=>{ls(Ie,{kind:"record",get thumbUrl(){return e.thumbUrl}})};V(Hn,Ie=>{n()==="LiveWaitingRecord"&&Ie(ir)})}var Hi=P(Hn,2);{var tn=Ie=>{var Pt=b3();let qt;var di=h(Pt);ql(di,{get adsSlotId(){return Ae()},get adsParams(){return We()},get adsPreviewParam(){return Fe()},get adsAutoplayParam(){return ye()},get duration(){return De()}}),g(Pt),S(Kt=>qt=J(Pt,1,"ads-container svelte-dtyj47",null,qt,Kt),[()=>({hidden:n()!=="ads"})]),_(Ie,Pt)};V(Hi,Ie=>{e.showAds&&K()&&Ie(tn)})}var Fn=P(Hi,2);{var or=Ie=>{let Pt=v(()=>!he()&&e.showAutoplayNext&&k());Lm(Ie,{get title(){return Je()},get thumb(){return ut()},get isHide(){return r(Pt)},clickCloseIcon:()=>D($n,!0)})};V(Fn,Ie=>{r(vo)&&Je()&&ut()&&Ie(or)})}var yr=P(Fn,2);{var wn=Ie=>{yd(Ie,{})};V(yr,Ie=>{fe()&&Ie(wn)})}var on=P(yr,2);{var nr=Ie=>{var Pt=$3(),qt=h(Pt);Ul(qt,{"aria-label":Yt}),g(Pt),_(Ie,Pt)};V(on,Ie=>{Oe()&&Ie(nr)})}var _o=P(on,2);{var xr=Ie=>{xd(Ie,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return ie()}})};V(_o,Ie=>{X()&&Ie(xr)})}var bo=P(_o,2);{var rr=Ie=>{as(Ie,{get shifted(){return w()},get captions(){return Ne()},get position(){return N()},get playerSize(){return L()},isMobile:!0})};V(bo,Ie=>{R().value!=="off"&&Ie(rr)})}var wr=P(bo,2);{var Nr=Ie=>{var Pt=y3();Pt.__click=[h3,j,Bi,xn];var qt=h(Pt);wd(qt,{}),g(Pt),_(Ie,Pt)};V(wr,Ie=>{d()&&Ie(Nr)})}var ar=P(wr,2);{var Di=Ie=>{let Pt=v(()=>n()==="thumb"||n()==="LiveWaitingStart"||n()==="LiveWaitingRecover"||n()==="LiveWaitingRecord"||n()==="ads"),qt=v(()=>n()==="ads"),di=v(()=>e.canRewindLive&&de()!==0);$d(Ie,{get bottomHidden(){return r(Pt)},get showControls(){return w()},get bottomNoSmooth(){return E()},get isAds(){return r(qt)},get canRewindLive(){return r(di)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return je()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return et()},get nextButtonActive(){return ct()},get prevButtonActive(){return mt()},get isOneVideoPlaylist(){return $t()},get customFullscreenSupported(){return r($i)},get endScreenShown(){return r(vo)},toggleFullscreen:br,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Bn,onDisabledSeekToInteractiveClick:Jo,get playerControlsWrapperRef(){return r(ao)},set playerControlsWrapperRef(Kt){D(ao,le(Kt))},get playerControlsRef(){return r(_r)},set playerControlsRef(Kt){D(_r,le(Kt))}})};V(ar,Ie=>{K()&&Ie(Di)})}var nn=P(ar,2);{var rt=Ie=>{var Pt=x3(),qt=h(Pt);Id(qt,{get supportLink(){return e.supportLink},returnFocus:_1.noop,get ref(){return r(Zn)},set ref(di){D(Zn,le(di))}}),g(Pt),_(Ie,Pt)};V(nn,Ie=>{j()&&Ie(rt)})}var Nt=P(nn,2);let vi=v(()=>!r(Ri));Ql(Nt,{get isLive(){return Ke()},get isHidden(){return r(vi)},get isPlaying(){return oe()},get position(){return N()},get duration(){return W()}});var co=P(Nt,2);{var Vo=Ie=>{Ya(Ie,{})};V(co,Ie=>{r(Yi)&&Ie(Vo)})}var Ce=P(co,2);{var Bt=Ie=>{Yl(Ie,{})};V(Ce,Ie=>{U()&&Ie(Bt)})}var xi=P(Ce,2);{var Zt=Ie=>{Ed(Ie,{onClose:jo,onSelectAutoQuality:()=>{Go("auto"),jo()}})};V(xi,Ie=>{r(Eo)&&Ie(Zt)})}_(nt,Et)});var lo=P(mi,2);st(lo,nt=>D(Io,nt),()=>r(Io)),g(ho),st(ho,nt=>D(ro,nt),()=>r(ro)),_t("click",ho,tr,!0),_t("focusin",ho,$r,!0),_(t,ho),F(),o()}ot(["click"]);function ru(t){let e="";return An(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),An(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),An(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),An(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),An(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),An(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),An(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),An(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),An(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),An(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),An(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),An(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),An(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),e.length&&e||void 0}function An(t){return typeof t=="string"&&!t.includes(";")}var b1=require("@vkontakte/videoplayer-shared");var k3=M('<div class="player-wrapper svelte-1qfjf44" role="region"><!> <!> <!> <!> <div class="time-container svelte-1qfjf44"><!></div> <div><!></div></div>'),T3={hash:"svelte-1qfjf44",code:".player-wrapper.svelte-1qfjf44 {position:absolute;width:100%;height:100%;}.player-wrapper.svelte-1qfjf44 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.timeline.svelte-1qfjf44 {opacity:0;opacity:1;position:absolute;z-index:var(--controls-container-z-index);width:100%;bottom:0;left:0;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);}.visible.svelte-1qfjf44 {opacity:1;}.time-container.svelte-1qfjf44 {position:absolute;bottom:8px;right:8px;z-index:var(--thumb-timer-z-index);}"};function Rm(t,e){H(e,!0),z(t,T3);let[i,o]=Le(),n=()=>y(ce,"$playerSize",i),a=()=>y(I,"$isPlaying$",i),s=()=>y(A,"$duration$",i),d=()=>y(Q,"$positionWithScrubbing$",i),l=()=>y(C,"$playerPhase",i),c=()=>y(E,"$crashed$",i),u=()=>y(N,"$currentSubtitle$",i),b=()=>y(W,"$currentSubtitleCaptions$",i),p=()=>y(L,"$positionExact$",i),$=()=>y(j,"$isLive$",i),w=()=>y(re,"$isRewindableLive$",i),x=m(e,"outsideDuration",3,0),k=m(e,"videoContainer",15),{playerPhase:C,state:{crashed$:E,duration$:A,positionExact$:L,isPlaying$:I,currentSubtitle$:N,currentSubtitleCaptions$:W,positionWithScrubbing$:Q,isLive$:j,isRewindableLive$:re},ui:{playerSize:ce,controls:X},actions:{internal:{getVideoElement:ge}}}=be(),ee=8,Me=Z(!1),Pe=le({}),Re=()=>{D(Me,!0)},fe=()=>{D(Me,!1)},Oe=(0,b1.debounceFn)(Js,260);He(()=>{n(),Oe(ge(),X,Pe,r(Me))});let ie=v(()=>a()?zo(s()-d()):zo(isFinite(s())?s():x()));var R=k3(),Ne=h(R);us(Ne,{hideCursor:!1,get videoContainer(){return k()},set videoContainer(je){k(je)}});var de=P(Ne,2);Na(de,()=>"slot",!1,(je,et)=>{$e(je,null,{name:cs})});var Ke=P(de,2);let oe=v(()=>l()!=="thumb"||c());ss(Ke,{get hidden(){return r(oe)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var U=P(Ke,2);{var Y=je=>{as(je,{shifted:!1,get captions(){return b()},get position(){return p()},get playerSize(){return n()}})};V(U,je=>{u().value!=="off"&&je(Y)})}var Ae=P(U,2),We=h(Ae);Kl(We,{get isLive(){return $()},get isPlaying(){return a()},get time(){return r(ie)}}),g(Ae);var Fe=P(Ae,2);let ye;var De=h(Fe);es(De,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return w()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:ee,tooltipRightOffset:ee,get ref(){return Pe.timeline},set ref(je){Pe.timeline=je}}),g(Fe),g(R),S(je=>ye=J(Fe,1,"timeline svelte-1qfjf44",null,ye,je),[()=>({visible:r(Me)})]),_t("mouseenter",R,Re),_t("mouseleave",R,fe),_(t,R),F(),o()}var I3=M("<div><!></div>"),E3={hash:"svelte-7ed4yj",code:`.root.svelte-7ed4yj {--white: #fff;--black: #000;--red: #ff3347;--blue-light: #70c1ff;--black-alpha-40: rgba(0, 0, 0, 0.4);--white-alpha-24: rgba(255, 255, 255, 0.24);--white-alpha-72: rgba(255, 255, 255, 0.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;--focused: var(--white);--focused-element-shadow: inset 0 0 0 2px 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, 0.5);--big-play-hover-bg-color: rgba(0, 0, 0, 0.6);--big-play-icon-width: 38px;--big-play-icon-height: 33px;--interactive-episode-complete: rgba(92, 156, 230, 1);--slider-bg: rgba(255, 255, 255, 0.4);--slider-filled-bg: var(--white);--slider-handle-bg: var(--white);--slider-loaded-bg: rgba(255, 255, 255, 0.4);--slider-height: 3px;--slider-video-episode-gap: 1.5px;--slider-radius: 0px;--slider-handle-size: 12px;--slider-filled-ads: rgba(103, 165, 235, 1);--slider-disabled-color: rgba(248, 248, 248, 0.31);--slider-volume-height: 5px;--slider-volume-radius: calc(var(--slider-volume-height) / 2);--slider-volume-handle-size: 13px;
362
362
 
363
363
  /* USER DEFINED COLORS */
364
364
 
@@ -392,5 +392,5 @@ Try switching the\xA0quality to\xA0Auto.`},rh=J0;var Gr=new Map;Gr.set(Os.Interf
392
392
  /* --vk-vp-int-custom-font - vk video player interactive custom font */font-family:var(--vk-vp-int-custom-font, inherit);}*:focus, *:focus-visible {outline:none;}*:focus-visible {box-shadow:var(--focused-element-shadow);}
393
393
  /* css reset end */.hidden {visibility:hidden;opacity:0;}.overlay-container {pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:var(--overlay-container-z-index);}
394
394
 
395
- /* \u041A\u043B\u0430\u0441\u0441 \u0434\u043B\u044F \u0441\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430 \u0432\u0438\u0437\u0443\u0430\u043B\u044C\u043D\u043E \u043D\u043E \u043D\u0435 \u0434\u043B\u044F \u043E\u0431\u0445\u043E\u0434\u0430 \u043F\u043E \u0442\u0430\u0431 \u0438 \u0441\u043A\u0440\u0438\u043D \u0440\u0438\u0434\u0435\u0440\u0430 */.out-of-view {position:absolute !important;left:-1000vh !important;}.icon.icon-error-stub {display:flex;justify-content:center;align-items:center;}`};function Nm(t,e){H(e,!0),z(t,E3);let[i,o]=Le(),n=()=>y(Ot,"$isLive$",i),a=m(e,"sources",7),s=m(e,"store",7),d=m(e,"microStoresRoot",7),l=m(e,"videoConfig",7),c=m(e,"uiConfig",7),u=m(e,"title",7),b=m(e,"thumbUrl",7),p=m(e,"interactiveContainer",7),$=m(e,"interactiveController",7),w=m(e,"subtitles",7),x=m(e,"live",7),k=m(e,"preload",7),C=m(e,"autoplay",7),E=m(e,"volume",7,void 0),A=m(e,"muted",7,void 0),L=m(e,"fromTime",7),I=m(e,"canRewindLive",7),N=m(e,"showAds",7),W=m(e,"adsSlotId",7,void 0),Q=m(e,"adsParams",7,void 0),j=m(e,"adsPreviewParam",7,void 0),re=m(e,"adsAutoplayParam",7,void 0),ce=m(e,"duration",7,void 0),X=m(e,"logoClickable",7),ge=m(e,"logoHidden",7),ee=m(e,"isMobile",7),Me=m(e,"showNextPrevButtons",7,!1),Pe=m(e,"nextButtonActive",7,!1),Ve=m(e,"prevButtonActive",7,!1),fe=m(e,"endScreenVideoTitle",7,void 0),Oe=m(e,"endScreenVideoThumb",7,void 0),ie=m(e,"isOneVideoPlaylist",7,!1),R=m(e,"supportLink",7),Re=m(e,"shadowRootContainer",7,void 0),de=m(e,"outerContainerRef",7,void 0),Ke=m(e,"fullScreenTarget",7,void 0),oe=m(e,"failoverHosts",7,void 0),U=m(e,"showMiniTimer",7,!1),Y=m(e,"saveRate",7),Ae=m(e,"seekToInteractive",7,ps.noop),We=m(e,"playPrevChapter",7,ps.noop),Fe=m(e,"volumeMultiplier",7),ye=m(e,"showAutoplayNext",7),Ne=m(e,"showEndScreen",7,!0),je=m(e,"keyboardControls",15,void 0),{subscribers:et,stores:ct}=d();Cg(c());let mt=Rt(),Je=c().logoLink,ut=s().ui.debugPanelVisible,$t=s().ui.playerSize,Ot=s().state.isLive$,Dt=s().state.isInteractive&&au.clientChecker.device.isAndroid,ft=Z(void 0),K=null,he=Z(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{isMobile:s().ui.isMobile,mobileUnmuteButtonVisible:s().ui.mobileUnmuteButtonVisible,vsid:s().vsid}),Ng(s(),ct),He(()=>{s().ui.isMobile.set(ee())});let ae=(G=!1)=>{D(he,!0),G?s().actions.external.firstStart(N()):s().actions.internal.firstStart(N())},qe=()=>{if(mt.features.qualityDetailsSubMenuEnabled){let G=ih(s().videoId);if(G)switch(G.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,G.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,G.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(G.quality);break}}else{oh(s().videoId),kp()&&s().actions.internal.setTrafficSavingEnabled(!0);let Wt=xp(s().videoId);Wt&&s().actions.internal.setQuality(Wt)}};function Xe(G){let Wt=a()||G;Wt&&s().initVideo({container:r(ft),sources:Wt,failoverHosts:oe(),subtitles:w(),volumeMultiplier:Fe()});let Gt=ps.safeStorage.get(Nl)==="true";ut.set(Gt),L()>0&&s().actions.external.seekTime(L());let ji=ee()?mt.volumeDefault:E()??xc()??mt.volumeDefault,ii=A()??Yg();if(s().actions.external.setVolume(ji),s().actions.external.setMuted(ii),s().getAdmanWrapper().setInitialVolume(ii?0:ji),qe(),mt.features.saveRate&&Y()){let ei=Jg();ei&&!n()&&s().actions.internal.setPlaybackRate(ei)}if(ye()){let ei=th();ei&&s().actions.internal.setAutoplayNextEnabled(ei)}s().ui.isAutoplay.set(C()),C()?ae():k()&&mt.features.preload&&s().actions.internal.preload()}let Ue=G=>{if(window.ResizeObserver){let Wt,Gt;K=new ResizeObserver((0,ps.throttleFn)(ji=>{let ii=ji[0];if(ii.contentBoxSize){let ei=Array.isArray(ii.contentBoxSize)?ii.contentBoxSize[0]:ii.contentBoxSize;Wt=ei.inlineSize,Gt=ei.blockSize}else ii.contentRect&&(Wt=ii.contentRect.width,Gt=ii.contentRect.height);$t.set({width:Wt,height:Gt})},300)),K.observe(G)}$t.set({width:G.clientWidth,height:G.clientHeight})},Se=()=>{document.hidden&&s().actions.external.stop()};Vt(()=>{Dt&&document.addEventListener("visibilitychange",Se),mt.debugLog&&s().actions.internal.startLogging(),Ue(r(ft));let G=et.map(Gt=>Gt.init({store:s(),microStores:ct,config:l(),interactiveController:$(),uiConfig:c()})),Wt=()=>{Dt&&document.removeEventListener("visibilitychange",Se),K?.disconnect(),G.forEach(Gt=>Gt.unsubscribe()),s().destroy()};return x()?.status==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),Wt):x()?.status==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),Wt):(x()?.status==="finished"||x()?.status==="postlive")&&!Object.keys(a()||[]).length?(s().actions.internal.setLiveWaitingRecord(!0),Wt):(Xe(),Wt)});function Ye(){r(he)?s().actions.external.play():ae(!0)}function Ee(){s().actions.external.pause()}function lt(G){s().actions.external.setMuted(G)}function gt(){s().actions.external.toggleSubtitle()}function St(G){ee()||G>=0&&G<=1&&s().actions.external.setVolume(G)}function oi(G){s().actions.internal.seekTime(G,$1.SeekAction.UNKNOWN)}function ti(G){s().actions.external.seekEpisodeStartTime(G)}function Bi(){s().actions.external.returnFocusToEpisodes()}function un(G){s().actions.external.setPlaybackRate(G)}function pn(G){s().actions.external.setAutoQualityLimits(G)}let Wo=ru(mt.view),wo=l().playerView==="preview";var Gi=I3();let So;tt(Gi,Wo);var Ko=h(Gi);{var zt=G=>{Vm(G,{get store(){return s()},uiConfig:mt,get thumbUrl(){return b()},get interactiveContainer(){return p()},get live(){return x()},get autoplay(){return C()},get canRewindLive(){return I()},get showAds(){return N()},get adsSlotId(){return W()},get adsParams(){return Q()},get adsPreviewParam(){return j()},get adsAutoplayParam(){return re()},get duration(){return ce()},get logoClickable(){return X()},get logoHidden(){return ge()},logoTargetUrl:Je,get nextButtonActive(){return Pe()},get prevButtonActive(){return Ve()},get endScreenVideoTitle(){return fe()},get endScreenVideoThumb(){return Oe()},get isOneVideoPlaylist(){return ie()},get supportLink(){return R()},get shadowRootContainer(){return Re()},get outerContainerRef(){return de()},get fullScreenTarget(){return Ke()},get showMiniTimer(){return U()},get playerStarted(){return r(he)},get seekToInteractive(){return Ae()},get playPrevChapter(){return We()},firstStart:ae,seekTime:oi,get showEndScreen(){return Ne()},get showAutoplayNext(){return ye()},get showNextPrevButtons(){return Me()},get videoContainer(){return r(ft)},set videoContainer(Wt){D(ft,le(Wt))}})},Co=G=>{var Wt=Be(),Gt=se(Wt);{var ji=ei=>{Rm(ei,{get thumbUrl(){return b()},get outsideDuration(){return ce()},get canRewindLive(){return I()},get videoContainer(){return r(ft)},set videoContainer(Si){D(ft,le(Si))}})},ii=ei=>{Mm(ei,{get store(){return s()},uiConfig:mt,get title(){return u()},get thumbUrl(){return b()},get interactiveContainer(){return p()},get live(){return x()},get autoplay(){return C()},get canRewindLive(){return I()},get showAds(){return N()},get adsSlotId(){return W()},get adsParams(){return Q()},get adsPreviewParam(){return j()},get adsAutoplayParam(){return re()},get duration(){return ce()},get logoClickable(){return X()},get logoHidden(){return ge()},logoTargetUrl:Je,get nextButtonActive(){return Pe()},get prevButtonActive(){return Ve()},get endScreenVideoTitle(){return fe()},get endScreenVideoThumb(){return Oe()},get isOneVideoPlaylist(){return ie()},get supportLink(){return R()},get shadowRootContainer(){return Re()},get outerContainerRef(){return de()},get fullScreenTarget(){return Ke()},get showMiniTimer(){return U()},get playerStarted(){return r(he)},get seekToInteractive(){return Ae()},get playPrevChapter(){return We()},firstStart:ae,get showEndScreen(){return Ne()},get showAutoplayNext(){return ye()},get showNextPrevButtons(){return Me()},get videoContainer(){return r(ft)},set videoContainer(Si){D(ft,le(Si))},get keyboardControls(){return je()},set keyboardControls(Si){je(Si)}})};V(Gt,ei=>{wo?ei(ji):ei(ii,!1)})}_(G,Wt)};V(Ko,G=>{ee()?G(zt):G(Co,!1)})}g(Gi),S(G=>So=J(Gi,1,"root svelte-7ed4yj",null,So,G),[()=>({"root--miui-browser":au.clientChecker.device.isMobile&&au.clientChecker.browser.isMiuiBrowser,"visible-outside":wo})]),_(t,Gi);var Qo=F({initVideo:Xe,play:Ye,pause:Ee,setMuted:lt,toggleSubtitle:gt,setVolume:St,seekTime:oi,seekEpisodeStartTime:ti,returnFocusToEpisodes:Bi,setPlaybackRate:un,setAutoQualityLimits:pn,get sources(){return a()},set sources(G){a(G)},get store(){return s()},set store(G){s(G)},get microStoresRoot(){return d()},set microStoresRoot(G){d(G)},get videoConfig(){return l()},set videoConfig(G){l(G)},get uiConfig(){return c()},set uiConfig(G){c(G)},get title(){return u()},set title(G){u(G)},get thumbUrl(){return b()},set thumbUrl(G){b(G)},get interactiveContainer(){return p()},set interactiveContainer(G){p(G)},get interactiveController(){return $()},set interactiveController(G){$(G)},get subtitles(){return w()},set subtitles(G){w(G)},get live(){return x()},set live(G){x(G)},get preload(){return k()},set preload(G){k(G)},get autoplay(){return C()},set autoplay(G){C(G)},get volume(){return E()},set volume(G){E(G)},get muted(){return A()},set muted(G){A(G)},get fromTime(){return L()},set fromTime(G){L(G)},get canRewindLive(){return I()},set canRewindLive(G){I(G)},get showAds(){return N()},set showAds(G){N(G)},get adsSlotId(){return W()},set adsSlotId(G){W(G)},get adsParams(){return Q()},set adsParams(G){Q(G)},get adsPreviewParam(){return j()},set adsPreviewParam(G){j(G)},get adsAutoplayParam(){return re()},set adsAutoplayParam(G){re(G)},get duration(){return ce()},set duration(G){ce(G)},get logoClickable(){return X()},set logoClickable(G){X(G)},get logoHidden(){return ge()},set logoHidden(G){ge(G)},get isMobile(){return ee()},set isMobile(G){ee(G)},get showNextPrevButtons(){return Me()},set showNextPrevButtons(G){Me(G)},get nextButtonActive(){return Pe()},set nextButtonActive(G){Pe(G)},get prevButtonActive(){return Ve()},set prevButtonActive(G){Ve(G)},get endScreenVideoTitle(){return fe()},set endScreenVideoTitle(G){fe(G)},get endScreenVideoThumb(){return Oe()},set endScreenVideoThumb(G){Oe(G)},get isOneVideoPlaylist(){return ie()},set isOneVideoPlaylist(G){ie(G)},get supportLink(){return R()},set supportLink(G){R(G)},get shadowRootContainer(){return Re()},set shadowRootContainer(G){Re(G)},get outerContainerRef(){return de()},set outerContainerRef(G){de(G)},get fullScreenTarget(){return Ke()},set fullScreenTarget(G){Ke(G)},get failoverHosts(){return oe()},set failoverHosts(G){oe(G)},get showMiniTimer(){return U()},set showMiniTimer(G){U(G)},get saveRate(){return Y()},set saveRate(G){Y(G)},get showAutoplayNext(){return ye()},set showAutoplayNext(G){ye(G)},get seekToInteractive(){return Ae()},set seekToInteractive(G){Ae(G)},get playPrevChapter(){return We()},set playPrevChapter(G){We(G)},get volumeMultiplier(){return Fe()},set volumeMultiplier(G){Fe(G)},get showEndScreen(){return Ne()},set showEndScreen(G){Ne(G)},get keyboardControls(){return je()},set keyboardControls(G){je(G)}});return o(),Qo}var P3=ve('<svg><!><path fill="currentColor" d="M38.245 6c3.566 0 4.859.371 6.162 1.069a7.27 7.27 0 0 1 3.025 3.024c.697 1.303 1.068 2.597 1.068 6.163v23.489c0 3.566-.371 4.859-1.069 6.162a7.27 7.27 0 0 1-3.024 3.025C43.104 49.629 41.811 50 38.245 50h-19.49c-3.565 0-4.859-.371-6.162-1.069a7.27 7.27 0 0 1-3.024-3.024C8.87 44.604 8.5 43.311 8.5 39.745v-23.49c0-3.565.371-4.859 1.069-6.162a7.27 7.27 0 0 1 3.024-3.024C13.896 6.37 15.19 6 18.756 6zm.314 3H18.756c-2.799 0-3.761.186-4.749.714a4.27 4.27 0 0 0-1.793 1.793c-.508.95-.7 1.876-.713 4.434L11.5 39.744c0 2.799.186 3.761.714 4.749a4.27 4.27 0 0 0 1.793 1.793c.988.528 1.95.714 4.749.714h19.489c2.798 0 3.76-.186 4.748-.714a4.27 4.27 0 0 0 1.793-1.793c.528-.988.714-1.95.714-4.748v-23.49c0-2.798-.186-3.76-.714-4.748a4.27 4.27 0 0 0-1.793-1.793c-.95-.508-1.876-.7-4.434-.713zM19.22 38c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134z"></path></svg>');function Dm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=P3();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"57",height:"60",fill:"none","aria-hidden":"true","data-testid":"stub-icon",role:"img",...i})),_(t,o)}function Bm(t,e){let i=m(e,"isWhite",3,!1),o=v(()=>i()?"color: #fff;":"color: #909499;");Dm(t,{get style(){return r(o)}})}var A3=M('<div class="title svelte-1y9fytq"> </div>'),M3=M('<div class="playerStub svelte-1y9fytq"><!> <!></div>'),L3={hash:"svelte-1y9fytq",code:".playerStub.svelte-1y9fytq {width:100%;height:100%;background-color:#222;display:flex;justify-content:center;align-items:center;position:relative;background-position:center;background-size:cover;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}.title.svelte-1y9fytq {position:absolute;left:0;top:0;width:100%;font-size:15px;color:#fff;box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"};function Om(t,e){z(t,L3);var i=M3(),o=h(i);{var n=d=>{var l=A3(),c=h(l,!0);g(l),S(()=>ue(c,e.title)),_(d,l)};V(o,d=>{e.title&&d(n)})}var a=P(o,2);{var s=d=>{let l=v(()=>!!e.thumbUrl);Bm(d,{get isWhite(){return r(l)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(s)})}g(i),S(()=>tt(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),_(t,i)}var I1=require("@vkontakte/videoplayer-shared"),Li=require("@vkontakte/videoplayer-shared"),Bd=require("@vkontakte/videoplayer-core"),E1=require("@vkontakte/videoplayer-statistics");var lu=require("@vkontakte/videoplayer-shared"),su=class{constructor(){this.subscription=new lu.Subscription,this.logger=new lu.Logger,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){if(this.isSupported())for(let[i,o]of e)try{navigator.mediaSession.setActionHandler?.(i,o)}catch{throw new Error(`The media session action "${i}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{let o=_e(e.state.currentPlaybackRate$),n=_e(e.state.duration$);if(!(!isFinite(i)||!isFinite(n)))try{navigator.mediaSession.setPositionState?.({position:i,playbackRate:o,duration:n})}catch{this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${n}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};var nl=require("@vkontakte/videoplayer-shared");var V3=ve('<svg><!><g fill="var(--btn-color, #fff)"><path d="m30.744 4 .744.005c2.981.046 4.526.385 6.127 1.24a8.77 8.77 0 0 1 3.475 3.347l.174.312.15.292c.772 1.553 1.066 3.18 1.085 6.251v9.045a1.5 1.5 0 0 1-3 .016l-.008-9.651c-.04-2.032-.228-3.12-.627-4.035l-.126-.27-.13-.252A5.77 5.77 0 0 0 36.2 7.891c-1.187-.635-2.339-.873-5.115-.89L22.255 7c-2.737 0-4.003.2-5.071.698l-.133.064-.251.13a5.77 5.77 0 0 0-2.409 2.408c-.635 1.187-.873 2.339-.89 5.114l-.001 20.83c0 2.738.2 4.004.698 5.072l.064.133.13.251a5.77 5.77 0 0 0 2.408 2.409c1.1.588 2.134.825 4.438.88l.323.006 3.695.005H26a1.5 1.5 0 0 1 0 3h-.756l-3.718-.005c-2.989-.047-4.526-.377-6.14-1.24a8.77 8.77 0 0 1-3.476-3.347l-.174-.312-.15-.292c-.731-1.472-1.036-3.016-1.08-5.803l-.006-.756v-20.49l.005-.743c.046-2.981.385-4.526 1.24-6.127a8.77 8.77 0 0 1 3.347-3.475l.312-.174.292-.15c1.472-.731 3.016-1.036 5.803-1.08L22.256 4z"></path><path d="M30.5 33.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C32.78 29 33.62 29 35.3 29h6.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311c.327.642.327 1.482.327 3.162v13.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C44.22 52 43.38 52 41.7 52h-6.4c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C30.5 49.72 30.5 48.88 30.5 47.2z"></path></g></svg>');function Hm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=V3();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"57",height:"56",fill:"none","aria-label":"dummy-image","data-testid":"pip-dummy-icon",role:"img",...i})),_(t,o)}var R3=M('<div><div><!></div> <span class="title svelte-1pbsod4"> </span></div>'),N3={hash:"svelte-1pbsod4",code:".player-pip-dummy.svelte-1pbsod4 {width:100%;height:100%;background-color:#19191A;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}.player-pip-dummy.is-pip-api.svelte-1pbsod4 {position:relative;}.dummy-image.svelte-1pbsod4 svg {transform:scale(1.07143);}.dummy-image.desktop.svelte-1pbsod4 {transform:scale(1.07143) rotate(-90deg) rotateY(180deg);}.title.svelte-1pbsod4 {font-size:16px;color:#fff;padding:18px 20px 10px;text-align:center;}"};function Fm(t,e){H(e,!0),z(t,N3);let[i,o]=Le(),n=()=>y(c,"$interfaceLanguage$",i),a=()=>y(u,"$isMobile$",i),s=be(),d=Rt(),l=!!s.webApi.pictureInPictureApi,c=s.interfaceLanguage$,u=s.ui.isMobile,b=s.ui.t,p=v(()=>n()&&b("pip_dummy_title")),$=ru(d.view);var w=R3();J(w,1,"player-pip-dummy svelte-1pbsod4",null,{},{"is-pip-api":l}),tt(w,$);var x=h(w);let k;var C=h(x);Hm(C,{}),g(x);var E=P(x,2),A=h(E,!0);g(E),g(w),S(L=>{k=J(x,1,"dummy-image svelte-1pbsod4",null,k,L),ue(A,r(p))},[()=>({desktop:!a()})]),_(t,w),F(),o()}var D3=460,B3=280,Pd=class{playerDomElement;playerParentShadowRoot;playerDummyElement;svelteContext;pipWindow;info={isActive$:new nl.ValueSubject(!1),isEnabled$:new nl.ValueSubject(!1),type:1};constructor({enabled:e=!0}={enabled:!0}){this.info.isEnabled$=new nl.ValueSubject(e)}isSupported(){let{isEmbed:e}=(0,nl.detectEmbed)();return"documentPictureInPicture"in window&&!e}isActive(){return this.isSupported()&&!!documentPictureInPicture.window}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}async request(){if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:D3,height:B3,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let e=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(d=>d.cssText).join(" ")).filter(Boolean).join(`
396
- `),i=document.createElement("style");i.textContent=e;let o=this.createStretchedContainer(),n=o.attachShadow({mode:"open"});n.append(i),n.append(this.playerDomElement);let a={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=Kr(Fm,a),this.pipWindow?.document.body.append(o),this.info.isActive$.next(!0),this.pipWindow?.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Va(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1))})}async remove(){return new Promise(e=>{documentPictureInPicture.window?.close(),e()})}async dispose(){await this.remove()}setEnabled(e){this.info.isEnabled$.next(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function y1(t){return t instanceof Pd}var du=class{static getLatestSupportedVersion(e){let i=new qa(e),o=new Pd(e);if(o.isSupported())return o;if(i.isSupported())return i}};function cu(t,e){let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let n of i)o[n]=e[n]??t[n]??void 0;return o}var x1="Inner error. Unexpectedly root annotation container null reference exception",w1="Annotation with such name already exists",S1="Annotation with such name does not exist";var rl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};var al=require("@vkontakte/videoplayer-shared"),O3="1",H3=100,uu=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new al.Subscription}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=(0,al.throttleFn)(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},H3);this.subscriptions.add((0,al.observeElementSize)(this.rootAnnotationsContainer).subscribe(({width:o,height:n})=>{this.playerSize={width:o,height:n},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){if(!this.rootAnnotationsContainer)throw new rl(x1);if(this.annotations.has(e))throw new rl(w1);i.style.zIndex=i.style.zIndex??O3,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 rl(S1);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(){this.annotations.clear(),this.subscriptions.unsubscribe(),this.mutationObserver?.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let n=e.offsetTop,a=e.offsetLeft,s=e.offsetWidth,d=e.offsetHeight;return n<0||a<0||a+s>i||n+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};var fs=require("@vkontakte/videoplayer-shared"),xo=class{init({store:e,microStores:i,interactiveController:o,config:n}){return(0,fs.assertNonNullable)(e),(0,fs.assertNonNullable)(i),(0,fs.assertNonNullable)(n),n.interactiveData&&(0,fs.assertNonNullable)(o),this.subscription=new fs.Subscription,this.subscription}};var Ad=class extends xo{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...ne(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{isInteractiveExpectation$:n}=i.store.state;return o.add(n.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Md=class extends xo{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...ne(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{microStores:n,store:a}=i,{fakeIsPlaying$:s}=n,{isInteractiveExpectation$:d,isPlaying$:l}=a.state,{controlsVisible:c,isMobile:u}=a.ui,b=_e(u),p=()=>b&&_e(c);return o.add(c.subscribe($=>{if(!b)return;let w=_e(s);_e(l)?this.state$.set($):w!==null&&this.state$.set(!w||$)})),o.add(l.subscribe($=>{this.state$.set(!$||p())})),o.add(s.subscribe($=>{if($===null)return;let w=_e(d);if(p()){this.state$.set(!0);return}w&&this.state$.set(!$)})),o}};var Ld=class extends xo{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=ne("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:n}=i;return o.add(n.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(s=>s.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};var C1=require("@vkontakte/videoplayer-shared"),Um=ne(!1),pu=null,Vd=class extends xo{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Um,set:(i,o=!1)=>{i!==_e(Um)&&(this.clearTimeout(),Um.set(i),!i&&pu&&(pu=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()}}init(i){let o=super.init(i),{store:n,config:a}=i,{isInteractiveTime$:s,isPlaying$:d}=n.state,l=n.ui.controlsVisible,{interactiveTimeIndicator:c}=n.ui.controls;o.add(l.subscribe(b=>{_e(s)&&b&&this.state$.set(!1)}));let u=a?.interactiveData||{tooltipHelpHintActive:!1};return o.add((0,C1.combine)({isPlaying$:d,isInteractiveTime$:s,interactiveTimeIndicator:c}).subscribe(({isPlaying$:b,isInteractiveTime$:p,interactiveTimeIndicator:$})=>{if(!(!b||!$?.isDisplayed)){if(!p)return this.state$.set(!1);u.tooltipHelpHintActive&&pu===null&&(pu=!0,u.tooltipHelpHintActive=!1,this.state$.set(!0),n.callbacks?.onInteractiveTimeIndicatorHintDeactivated?.())}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};var fu=require("@vkontakte/videoplayer-shared");var Rd=class extends xo{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...ne(null),toggle:fu.noop};this.checkIfShouldHide=i=>fa(i,"s")}init(i){let o=super.init(i),{store:n,interactiveController:a}=i,s=n.ui.currentGridType$,d=n.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=async()=>{if(this.checkIfShouldHide(_e(s)))return;let l=_e(this.state$),{isEnded$:c,playbackState$:u}=n.state,{disabledControls$:b}=n.ui.controls,p=_e(c),$=_e(u);if(l)try{await a?.toggleGraphView(!1),this.state$.set(!1),b.remove(gp),!p&&this.graphMadePause&&n.actions.internal.play()}catch{d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{await a?.toggleGraphView(!0),this.state$.set(!0),b.add(gp),!p&&this.graphMadePause&&n.actions.internal.pause()}catch{d({message:"Cant show graph"})}}},o.add((0,fu.combine)({graphIsOpened:this.state$,currentGridType:s}).subscribe(async({graphIsOpened:l,currentGridType:c})=>{if(this.checkIfShouldHide(c)&&l)try{await a?.toggleGraphView(!1),this.state$.set(!1)}catch{d({message:"Cant hide graph"})}})),o}};var zm=require("@vkontakte/videoplayer-shared"),Nd=class extends xo{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:ne(!1),isEnabled$:ne(!1),type$:ne(void 0)}}init(i){let o=super.init(i),{store:n}=i,{info:{isActive$:a,isEnabled$:s,type:d}}=n.webApi.pictureInPictureApi||{info:{isActive$:new zm.ValueSubject(!1),isEnabled$:new zm.ValueSubject(!1)}};return o.add(a.subscribe(l=>{this.state$.isActive$.set(l)})),o.add(s.subscribe(l=>{this.state$.isEnabled$.set(l)})),this.state$.type$.set(d),o}};var vu=require("@vkontakte/videoplayer-shared");var mu=require("@vkontakte/videoplayer-shared"),k1=({maxShowCount:t,timeout:e})=>{let i=[t!==0?F3({maxCount:t}):void 0,e!==0?U3({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(n=>n.notificationShowed(o)),canShowNotification:o=>i.every(n=>n.canShowNotification(o))}},F3=({maxCount:t})=>{let e={};return{notificationShowed:i=>{e[i]=(e[i]??0)+1,mu.safeStorage.set("videoplayer_notifications_manager_count",JSON.stringify(e[i]??0))},canShowNotification:i=>(e[i]??0)<t}},U3=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(mu.safeStorage.get(e)||"{}")}catch{return{}}},o=a=>mu.safeStorage.set(e,JSON.stringify(a)),n=a=>{let s=i();delete s[a],o(s)};return{notificationShowed:a=>{o({...i(),[a]:{timeout:t,launchTime:Date.now()}})},canShowNotification:a=>{let s=i()[a];if(s){let d=Date.now()-s.launchTime>t;return d&&n(a),d}else return!0}}};var Dd=class extends xo{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:ne({}),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:n,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:s,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:l}}}=i;this.notificationManager=k1({maxShowCount:a,timeout:s});let c=n.getPlayer();return o.add(c.events.severeStallOccured$.pipe((0,vu.filterChanged)(),(0,vu.filter)(u=>u)).subscribe(()=>{d&&!c.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(l&&n.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var T1=()=>[Ad,Md,Ld,Vd,Rd,Nd,Dd].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});var sl=require("@vkontakte/videoplayer-shared");var z3={preload:!0,autoplay:!1,repeat:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Li.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:(0,Bd.isMobile)(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},cn=Z(void 0),gu=class extends HTMLElement{svelteStubComponent;svelteRootComponent;store;microStoresRoot;statistics;sentry;_shadowRoot;playerContainer;rootContainer;shadowRootContainer;uiConfig;coreConfig;statisticsConfig;interactiveController;interactiveContainer;graphMadePause;currentPlayingVideoIndex=0;needToRepeatPlaylist=!1;videoConfig=void 0;pictureInPictureApi=void 0;mediaSessionApi=void 0;unsubscribePlayerPhaseSubscription=void 0;logger;log;subscription;interactiveSubscription;annotationsApi=void 0;slotsApi;prevIsid=void 0;isInited=!1;internalsExposure=null;shadowDOMCallbacksDisabled=!1;constructor(){super(),sl.devNull.create("ui"),this.logger=new Li.Logger,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Li.Subscription,this.interactiveSubscription=new Li.Subscription,this.graphMadePause=!1}connectedCallback(){if(this.isInited||this.shadowDOMCallbacksDisabled)return;this.initPlayerRootContainers();let e=this.getAttribute("stub-title")??void 0,i=this.getAttribute("stub-thumb-url")??void 0,o=le({title:e,thumbUrl:i}),n={target:this.playerContainer,props:o};this.svelteStubComponent=Kr(Om,n)}disconnectedCallback(){this.shadowDOMCallbacksDisabled||(this.annotationsApi?.destroy(),this.mediaSessionApi?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.subscription.unsubscribe(),this.unsubscribePlayerPhaseSubscription?.(),this.interactiveController?.destroy(),this.interactiveSubscription.unsubscribe(),this.internalsExposure?.destroy(),sl.devNull.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.append(this.rootContainer)}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){return this.store?.ui.controls.disabledControls$?.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}}createOneStat=(e,i={})=>{let{albumId:o,statPlace:n,statUserSalt:a,statTrackCode:s,statVKAppId:d,refreshStatAuthToken:l,autoplay:c,isMobile:u,isTouch:b,refDomain:p,deviceId:$,interactiveData:w}=cu(this.videoConfig,i),x=w?.projectInfo?.pid,k=this.interactiveController?.state.isReplay$.getValue()??!1;k&&(this.prevIsid=void 0);let{unitedVideoId:C,isClip:E=!1}=e;if(this.uiConfig.features.statistics&&C)return new E1.OneStat({movieId:C,albumId:o,place:n,trackCode:s,vkAppId:d,autoplay:(c&&!this.interactiveController)??!1,mobile:b??u,clip:E,refDomain:p,deviceId:$,...x&&(!this.isInited||k)&&{projectId:Number(x)}},{refreshAuthToken:l,userSalt:a,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})};createPlayer(e,i={},o){if(!this.videoConfig)return;let{albumId:n,statPlace:a,statAuthToken:s,preload:d,autoplay:l,volume:c,muted:u,fromTime:b,canRewindLive:p,supportLink:$,showAds:w,adsSlotId:x,adsParams:k={},adsPreviewParam:C,adsAutoplayParam:E,interfaceLanguage:A,isCyrillicRelatedInterface:L,logoClickable:I,logoHidden:N,isMobile:W,isTouch:Q,isAudioDisabled:j,isLiveCatchUpMode:re,fullScreenTarget:ce,failoverHosts:X,canDownload:ge,callbacks:ee,interactiveData:Me,showThumbTimer:Pe,additionalButtons:Ve=[],additionalSettingsMenuItems:fe=[],additionalContextMenuItems:Oe=[],repeat:ie,saveRate:R,volumeMultiplier:Re,showEndScreen:de,showAutoplayNext:Ke}=cu(this.videoConfig,i),{sources:oe,title:U,thumbUrl:Y,unitedVideoId:Ae,isClip:We=!1,duration:Fe,adsParams:ye={},videoEpisodes:Ne,previewThumbsData:je,subtitles:et,live:ct}=e,mt={...k,...ye},Je=this.getNextVideoInfo(),ut={sources:oe,title:U,thumbUrl:Y,subtitles:et,unitedVideoId:Ae,isClip:We,live:ct,albumId:n,statPlace:a,autoplay:l,muted:u,volume:c,fromTime:b,canRewindLive:p,showAds:w,adsSlotId:x,adsParams:mt,adsPreviewParam:C,adsAutoplayParam:E,duration:Fe,logoClickable:I,logoHidden:N,isTouch:Q??W,repeat:ie,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:Je.nextVideoTitle,endScreenVideoThumb:Je.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},$t={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi};this.log({message:`create player, props: ${JSON.stringify(ut)}`});let Ot=this.interactiveController?.state.statistics$.getValue(),we=Ot?.oneStat||this.createOneStat(e,i);we&&(this.statistics=new Qc(we,Ot?.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new za(this.uiConfig.sentry,{version:Ha,env:bc},{movieId:Ae,albumId:n,place:a,autoplay:(l&&!this.interactiveController)??!1,mobile:Q??W,clip:We}),this.interactiveController&&(this.prevIsid??=this.statistics?.oneStat.isid$.getValue()),this.sentry={...this.sentry,...za.getInstance()};let ft=!!Me,K=[],he="tooltip_interactive_go_back_disabled_first";if(ft&&this.interactiveController){let Ue=this.interactiveController.state.isInitialChapter$.getValue(),Se=this.interactiveController.getHistoryState();Ue&&K.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||K.push("SEEK_TO_INTERACTIVE_BUTTON"),Se.hasPrevChapter$.getValue()||(K.push("PLAY_PREV_CHAPTER_BUTTON"),Ue||(Se.isGoBackLimited$.getValue()?he="tooltip_interactive_go_back_disabled_limit":he="tooltip_interactive_go_back_disabled"))}let ae=()=>{this.isInited=!1,this.prevIsid=void 0;let Ue=o?.info.isEnded$.getValue()&&this.interactiveController?.state.isEndChapter$.getValue();ee.onReplayInteractiveVideo&&!Ue?ee.onReplayInteractiveVideo():this.replayInteractiveVideo()};this.store=zh({player:o,interfaceLanguage:A,isCyrillicRelatedInterface:L,videoId:Ae,isClip:We,isLiveCatchUpMode:re,isAudioDisabled:j,statAuthToken:s,callbacks:ee,webApi:$t,videoEpisodes:Ne,previewThumbsData:je,canDownload:ge,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:K,isInteractive:ft,saveRate:R,interactiveRanges$:this.interactiveController?.state.interactiveRanges$,isInteractiveTime$:this.interactiveController?.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ae,playPrevChapterDisabledTooltip:he,hasInteractiveBranches:!!this.interactiveController?.getChapterBranches()?.length,additionalButtons:this.uiConfig.features.additionalButtons?Ve:[],additionalSettingsMenuItems:fe??[],additionalContextMenuItems:Oe??[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),looped:ie&&this.videoConfig.videos.length===1,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView});let{stores:qe}=this.microStoresRoot=T1(),Xe=()=>{if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Se=>ee?.onCurrentFormatChanged?.(Se))),this.subscription.add(qe.interactiveControlsOpacity$.subscribe(Se=>{Se!==null&&this?.interactiveController?.setDisabledControls(Se)})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Se=>ee?.onThroughputEstimationChanged?.(Se))),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Se=>ee?.onTrafficSavingEnabledChanged?.(Se))),this.subscription.add(new Li.Observable(Se=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Ye=>Se.next(Ye)))}).pipe(this.uiConfig.features.skipInitialPlaybackRateValue?(0,Li.skip)(1):Se=>Se).subscribe(Se=>ee?.onCurrentPlaybackRateChanged?.(Se))),this.subscription.add(this.store.state.volume$.subscribe(Se=>ee?.onVolumeChange?.(Se))),this.subscription.add(this.store.state.muted$.subscribe(Se=>Se?ee?.onMute?.():ee?.onUnmute?.())),this.subscription.add(this.store.state.videoBitrate$.subscribe(Se=>ee?.onVideoBitrateChanged?.(Se))),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Se=>{let Ye=this.store?.ui.controls.disabledControls$;Ye&&(Se&&!Ye.includes(Dl)&&Ye.add(Dl),Se||Ye.remove(Dl))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async Se=>{if(!Bd.clientChecker.browser.isSamsungBrowser||!Se||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter(this.videoConfig?.callbacks.onExternalFullscreenExit)})),this.statistics&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Se=>ee?.onVSIDChanged?.(Se))),this.initMediaSession(),D(cn,le({interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:oe,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:U,thumbUrl:Y,subtitles:et,live:ct,preload:d,autoplay:l,muted:u,volume:c,fromTime:b,canRewindLive:p,supportLink:$,showAds:w,adsSlotId:x,adsParams:mt,adsPreviewParam:C,adsAutoplayParam:E,duration:Fe,logoClickable:I,logoHidden:N,isMobile:Q??W,failoverHosts:X,fullScreenTarget:ce,saveRate:R,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Pe,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:Je.nextVideoTitle,endScreenVideoThumb:Je.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Re,showEndScreen:de,showAutoplayNext:Ke}));let Ue={target:this.playerContainer,props:r(cn)};this.svelteRootComponent=Kr(Nm,Ue),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,this.videoConfig?.callbacks?.onInited?.()),this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&this.videoConfig?.callbacks?.onDevNullLog?sl.devNull.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):sl.devNull.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Bd.clientChecker.isInited$.subscribe(Ue=>{Ue&&(console.log("UI SDK async start"),Xe())}):Xe()}addPlayerInfoSubscriptions(){let e=this.store,i=this.microStoresRoot?.stores;if(!e||!i)return;let o=this.videoConfig?.callbacks;o&&this.subscription.add(e.playerPhase.subscribe(a=>o.onPlayerPhaseChanged?.(a))).add(e.state.playbackState$.subscribe(a=>a&&o.onPlaybackStateChanged?.(a))).add(e.state.isLive$.subscribe(a=>o.onIsLiveChanged?.(a))).add(e.state.isActiveLive$.subscribe(a=>o.onIsActiveLiveChanged?.(a))).add(e.state.isAudioAvailable$.subscribe(a=>o.onIsAudioAvailableChanged?.(a))).add(e.state.currentQuality$.subscribe(a=>o.onCurrentQualityChanged?.(a))).add(e.state.availableQualities$.subscribe(a=>o.onAvailableQualitiesChanged?.(a.map(({value:s})=>s).filter(s=>s!=="auto")))).add(e.state.availableAudioStreams$.subscribe(a=>{a.length>1&&o.onAudioLanguagesAvailable&&o.onAudioLanguagesAvailable()})).add(i.pictureInPicture$.isActive$.subscribe(a=>a?o.onPiPEnter?.():o.onPiPExit?.()));let n=o?.uiInfo;n&&this.subscription.add(e.ui.controlsVisible.subscribe(a=>n.onControlsVisibleChanged?.(a))).add(e.ui.isMobile.subscribe(a=>n.onIsMobileChanged?.(a))).add(e.ui.playerSize.subscribe(a=>n.onPlayerSizeChanged?.(a))).add(e.ui.controls.prevButton.subscribe(a=>n.onPrevButtonChanged?.(a))).add(e.ui.controls.playButton.subscribe(a=>n.onPlayButtonChanged?.(a))).add(e.ui.controls.replayButton.subscribe(a=>n.onReplayButtonChanged?.(a))).add(e.ui.controls.nextButton.subscribe(a=>n.onNextButtonChanged?.(a))).add(e.ui.controls.playPrevChapterButton.subscribe(a=>n.onPlayPrevChapterChanged?.(a))).add(e.ui.controls.seekToInteractiveButton.subscribe(a=>n.onSeekToInteractiveButtonChanged?.(a))).add(e.ui.controls.interactiveGraphButton.subscribe(a=>n.onGraphButtonChanged?.(a))).add(e.ui.controls.liveButton.subscribe(a=>n.onLiveButtonChanged?.(a))).add(e.ui.controls.time.subscribe(a=>n.onTimeUpdateChanged?.(a))).add(e.ui.controls.episodes.subscribe(a=>n.onEpisodesChanged?.(a))).add(e.ui.controls.subtitles.subscribe(a=>n.onSubtitlesChanged?.(a))).add(e.ui.controls.settings.subscribe(a=>n.onSettingsChanged?.(a))).add(e.ui.controls.fullscreen.subscribe(a=>n.onFullscreenChanged?.(a))).add(e.ui.controls.chromecast.subscribe(a=>n.onChromecastChanged?.(a))).add(e.ui.controls.pip.subscribe(a=>n.onPipChanged?.(a))).add(e.ui.controls.vkLogo.subscribe(a=>n.onVkLogoChanged?.(a))).add(e.ui.controls.interactiveTimeIndicator.subscribe(a=>n.onInteractiveTimeIndicatorChanged?.(a))).add(e.ui.controls.timeline.subscribe(a=>n.onTimelineChanged?.(a)))}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){if(!this.videoConfig)return;let o=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!o){this.log({message:"no next video"});return}this.isInited&&(0,Li.isNonNullable)(o.unitedVideoId)&&this.store?.actions.internal.nextMovie(o.unitedVideoId),this.unmountComponent(this.svelteRootComponent),this.createPlayer(o,{autoplay:i,fromTime:0},e)}playPrevChapter(){this.interactiveController?.playPrevChapter()}seekToInteractive(){let e=this.interactiveController?.getNextInteractiveStartTime();typeof e=="number"&&this.seekTime(e/1e3)}async initInteractives(){if(this.videoConfig?.interactiveData)try{let{Interactives:e}=await import("@vkontakte/videoplayer-interactive");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let i=this.store?.interfaceLanguage$,o=i?_e(i):this.videoConfig.interfaceLanguage,{projectInfo:n,initChapterId:a,historyApi:s,videoLoader:d}=this.videoConfig.interactiveData;this.interactiveController=new e({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:o,graph:this.uiConfig.features.interactiveGraph,projectInfo:n,initChapterId:a,historyApi:s,vkVideoLoader:d,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}});let{isInteractiveExpectation$:l,isSeekable$:c}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(c.subscribe(b=>{if(!this.isInited)return;let p=this.store;b?p.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):p.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(l.subscribe(b=>{this.store&&this.store.state.isInteractiveExpectation$.set(b)}));let u=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(b=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...b.config,title:n?.title||b.config.title};let p=u?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(b.player,p),u&&(u=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:b,actionType:p})=>{if(!this.store||!this.microStoresRoot)return;let $=l.getValue();if(b==="action-choice"&&p==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Bl)),b==="action-choice-canceled"){let w=_e(this.store.state.isPlaying$)||$;if((this.videoConfig?.isTouch??this.videoConfig?.isMobile)&&w){this.store.ui.interactiveHideMobileControls.set(!0);return}this.videoConfig?.callbacks.onDisabledInteractiveClick?.()}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:b,removeAllOpenURI:p})=>{this.store&&b==="container-fake-removed"&&p&&this.store.ui.controls.disabledControls$.remove(Bl)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),this.videoConfig?.callbacks?.onInteractiveHistoryChanged){let b=this.interactiveController.getHistoryState();this.subscription.add(b.history$.subscribe(p=>{p.length&&this.videoConfig?.callbacks?.onInteractiveHistoryChanged?.(p)}))}this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{this.microStoresRoot?.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),this.videoConfig?.callbacks.onInteractiveTimeIndicatorClick?.()})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(b=>{this.log({message:b.toString()})}))}catch(e){this.log({message:e.message})}}initPlayer(e,i={}){if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData)throw new Error("empty videos");if(this.videoConfig=cu(z3,(0,Li.cloneDeepWith)(e,o=>o instanceof HTMLElement?o:void 0)),this.uiConfig=Sg(i.ui??{}),this.coreConfig=i.core??{configName:[]},this.statisticsConfig=i.statistics??{},this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer.style.minHeight="unset",this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.sentry={config:this.uiConfig.sentry??{}},this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new Li.InternalsExposure("UI")),sl.devNull.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+this.videoConfig?.showAds],numbers:[(0,I1.now)()]}),(0,Li.isNonNullable)(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=this.uiConfig.features.mediaSession??this.videoConfig.isMediaSessionEnabled??!0),(0,Li.isNonNullable)(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=this.uiConfig.features.pip??this.videoConfig.isPictureInPictureEnabled??!0,this.uiConfig.features.dpip=this.uiConfig.features.dpip??this.videoConfig.isPictureInPictureEnabled??!0),this.videoConfig.isTouch=this.uiConfig.isMobile??this.videoConfig.isTouch??this.videoConfig.isMobile,this.videoConfig.autoplay&&=this.uiConfig.features.autoplay,this.videoConfig.showAds=this.uiConfig.ads.enable??this.videoConfig.showAds,this.videoConfig.adsSlotId=this.uiConfig.ads.slot??this.videoConfig.adsSlotId,this.videoConfig.adsPreviewParam=this.uiConfig.ads.preview??this.videoConfig.adsPreviewParam,this.videoConfig.logoHidden=!(this.uiConfig.showLogo??!this.videoConfig.logoHidden),this.videoConfig.canRewindLive&&=this.uiConfig.features.liveRewind,this.videoConfig.supportLink=this.videoConfig.supportLink??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&&this.videoConfig.videos?.[this.videoConfig.videoIndex]?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let o={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=du.getLatestSupportedVersion(o):this.pictureInPictureApi=new qa(o)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new su:void 0,this.slotsApi=this.uiConfig.features.slots?new iu:void 0,this.annotationsApi=this.uiConfig.features.annotations?new uu(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.slotsApi?.init(this.shadowRootContainer),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),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]),y1(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot)}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();r(cn)&&(r(cn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(cn).nextButtonActive=this.isNextButtonActive(),r(cn).prevButtonActive=this.isPrevButtonActive(),r(cn).endScreenVideoTitle=o.nextVideoTitle,r(cn).endScreenVideoThumb=o.nextVideoThumb,r(cn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){this.mediaSessionApi&&(this.unsubscribePlayerPhaseSubscription?.(),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=this.store?.playerPhase.subscribe(e=>{e==="video"?this.setupMediaSessionForVideo():e==="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",n=>this.seekTime(n.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>this.playNextVideo()]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>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="\u0420\u0435\u043A\u043B\u0430\u043C\u0430",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(){this.isControlDisabled("PLAY_BUTTON")||this.store?.playerPhase.is("LiveWaitingStart")||this.store?.playerPhase.is("LiveWaitingRecover")||this.store?.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),this.svelteRootComponent?.play())}pause(){this.log({message:"pause"}),this.svelteRootComponent?.pause()}stop(){if(!this.videoConfig)return;this.log({message:"stop"});let e=!!this.interactiveController;e&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),this.mediaSessionApi?.destroy();let i=this.videoConfig.videos[0];i&&(this.unmountComponent(this.svelteRootComponent),e?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(i))}setMuted(e){this.log({message:`set muted, muted: ${e}`}),this.svelteRootComponent?.setMuted(e)}toggleSubtitle(){this.log({message:"toggle subtitle"}),this.svelteRootComponent?.toggleSubtitle()}setPiPEnabled(e){this.store?.webApi.pictureInPictureApi?.setEnabled(e)}setVolume(e){this.log({message:`set volume, volume: ${e}`}),this.svelteRootComponent?.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,r(cn)&&(r(cn).needToRepeatPlaylist=this.needToRepeatPlaylist,r(cn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(cn).nextButtonActive=this.isNextButtonActive(),r(cn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),this.svelteRootComponent?.seekTime(e))}seekEpisodeStartTime(e){this.log({message:`seek episode start time, time: ${e}`}),this.svelteRootComponent?.seekEpisodeStartTime(e)}returnFocusToEpisodes(){this.log({message:"return focus to episodes button"}),this.svelteRootComponent?.returnFocusToEpisodes()}setPlaybackRate(e){this.log({message:`set playback rate to: ${e}`}),this.svelteRootComponent?.setPlaybackRate(e)}setAutoQualityLimits(e){this.log({message:`set auto quality limitation. Max: ${e.max??"none"}. Min: ${e.min??"none"}`}),this.svelteRootComponent?.setAutoQualityLimits(e)}addLanguage(e){this.store?.actions.internal.addLanguage(e)}async setLanguage(e){await this.store?.actions.internal.setLanguage(e)}setLiveStart(e){this.log({message:"live started"}),this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0})}setLiveWaitingStart(){this.log({message:"live waiting"}),this.store?.actions.internal.setLiveWaitingStart(!0)}setLiveWaitingRecover(){this.log({message:"live waiting recover"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0),this.store?.destroy()})}setLiveWaitingRecord(){this.log({message:"post live"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0),this.store?.destroy()})}setLiveEnd(e){this.log({message:"live ended"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})})}setLiveLowLatency(e){this.log({message:"live switch to low latency "+e}),this.store?.actions.external.setLiveLowLatency(e)}setLooped(e){this.store?.actions.internal.setLooped(e)}getDebugData(){return this.store?.actions.internal.getDebugTextData()??""}getDeviceId(){return this.statistics?.oneStat.getDeviceId()??void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}async replayInteractiveChapter(e){if(this.interactiveController&&this.store?.state.positionExact$){let i=_e(this.store.state.positionExact$),n=_e(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe((0,Li.once)()).subscribe(()=>{n&&i>=n.time?this.seekTime(n.time):this.seekTime(i),e?.()});let a=this.interactiveController.getCurrentChapter();await this.interactiveController.setChapter({chapterId:a?.chapter?.id,pushToHistory:!1})}}showInteractiveIndicatorTooltip(e,i=!1){this.microStoresRoot?.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){this.store?.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){this.store?.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){this.store?.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){this.store?.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){this.store?.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){this.store?.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){this.store?.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){this.store?.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){this.store?.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){this.store?.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&this.statistics.oneStat.updateContext(e)}handleTimerNextVideo(e){this.store?.actions.internal.setTimerNextVideoRunning(e)}focus(){this.svelteRootComponent?.keyboardControls?.focus?.()}unmountComponent(e){e&&Va(e)}};var ll=require("@vkontakte/videoplayer-shared"),hu=require("@vkontakte/videoplayer-core"),q3=()=>{window.customElements.define("vk-video-player",gu)};
395
+ /* \u041A\u043B\u0430\u0441\u0441 \u0434\u043B\u044F \u0441\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430 \u0432\u0438\u0437\u0443\u0430\u043B\u044C\u043D\u043E \u043D\u043E \u043D\u0435 \u0434\u043B\u044F \u043E\u0431\u0445\u043E\u0434\u0430 \u043F\u043E \u0442\u0430\u0431 \u0438 \u0441\u043A\u0440\u0438\u043D \u0440\u0438\u0434\u0435\u0440\u0430 */.out-of-view {position:absolute !important;left:-1000vh !important;}.icon.icon-error-stub {display:flex;justify-content:center;align-items:center;}`};function Nm(t,e){H(e,!0),z(t,E3);let[i,o]=Le(),n=()=>y(Ot,"$isLive$",i),a=m(e,"sources",7),s=m(e,"store",7),d=m(e,"microStoresRoot",7),l=m(e,"videoConfig",7),c=m(e,"uiConfig",7),u=m(e,"title",7),b=m(e,"thumbUrl",7),p=m(e,"interactiveContainer",7),$=m(e,"interactiveController",7),w=m(e,"subtitles",7),x=m(e,"live",7),k=m(e,"preload",7),C=m(e,"autoplay",7),E=m(e,"volume",7,void 0),A=m(e,"muted",7,void 0),L=m(e,"fromTime",7),I=m(e,"canRewindLive",7),N=m(e,"showAds",7),W=m(e,"adsSlotId",7,void 0),Q=m(e,"adsParams",7,void 0),j=m(e,"adsPreviewParam",7,void 0),re=m(e,"adsAutoplayParam",7,void 0),ce=m(e,"duration",7,void 0),X=m(e,"logoClickable",7),ge=m(e,"logoHidden",7),ee=m(e,"isMobile",7),Me=m(e,"showNextPrevButtons",7,!1),Pe=m(e,"nextButtonActive",7,!1),Re=m(e,"prevButtonActive",7,!1),fe=m(e,"endScreenVideoTitle",7,void 0),Oe=m(e,"endScreenVideoThumb",7,void 0),ie=m(e,"isOneVideoPlaylist",7,!1),R=m(e,"supportLink",7),Ne=m(e,"shadowRootContainer",7,void 0),de=m(e,"outerContainerRef",7,void 0),Ke=m(e,"fullScreenTarget",7,void 0),oe=m(e,"failoverHosts",7,void 0),U=m(e,"showMiniTimer",7,!1),Y=m(e,"saveRate",7),Ae=m(e,"seekToInteractive",7,ps.noop),We=m(e,"playPrevChapter",7,ps.noop),Fe=m(e,"volumeMultiplier",7),ye=m(e,"showAutoplayNext",7),De=m(e,"showEndScreen",7,!0),je=m(e,"keyboardControls",15,void 0),{subscribers:et,stores:ct}=d();Cg(c());let mt=Rt(),Je=c().logoLink,ut=s().ui.debugPanelVisible,$t=s().ui.playerSize,Ot=s().state.isLive$,Dt=s().state.isInteractive&&au.clientChecker.device.isAndroid,ft=Z(void 0),K=null,he=Z(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{isMobile:s().ui.isMobile,mobileUnmuteButtonVisible:s().ui.mobileUnmuteButtonVisible,vsid:s().vsid}),Ng(s(),ct),He(()=>{s().ui.isMobile.set(ee())});let ae=(G=!1)=>{D(he,!0),G?s().actions.external.firstStart(N()):s().actions.internal.firstStart(N())},qe=()=>{if(mt.features.qualityDetailsSubMenuEnabled){let G=ih(s().videoId);if(G)switch(G.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,G.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,G.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(G.quality);break}}else{oh(s().videoId),kp()&&s().actions.internal.setTrafficSavingEnabled(!0);let Wt=xp(s().videoId);Wt&&s().actions.internal.setQuality(Wt)}};function Xe(G){let Wt=a()||G;Wt&&s().initVideo({container:r(ft),sources:Wt,failoverHosts:oe(),subtitles:w(),volumeMultiplier:Fe()});let Gt=ps.safeStorage.get(Nl)==="true";ut.set(Gt),L()>0&&s().actions.external.seekTime(L());let ji=ee()?mt.volumeDefault:E()??xc()??mt.volumeDefault,ii=A()??Yg();if(s().actions.external.setVolume(ji),s().actions.external.setMuted(ii),s().getAdmanWrapper().setInitialVolume(ii?0:ji),qe(),mt.features.saveRate&&Y()){let ei=Jg();ei&&!n()&&s().actions.internal.setPlaybackRate(ei)}if(ye()){let ei=th();ei&&s().actions.internal.setAutoplayNextEnabled(ei)}s().ui.isAutoplay.set(C()),C()?ae():k()&&mt.features.preload&&s().actions.internal.preload()}let Ue=G=>{if(window.ResizeObserver){let Wt,Gt;K=new ResizeObserver((0,ps.throttleFn)(ji=>{let ii=ji[0];if(ii.contentBoxSize){let ei=Array.isArray(ii.contentBoxSize)?ii.contentBoxSize[0]:ii.contentBoxSize;Wt=ei.inlineSize,Gt=ei.blockSize}else ii.contentRect&&(Wt=ii.contentRect.width,Gt=ii.contentRect.height);$t.set({width:Wt,height:Gt})},300)),K.observe(G)}$t.set({width:G.clientWidth,height:G.clientHeight})},Se=()=>{document.hidden&&s().actions.external.stop()};Vt(()=>{Dt&&document.addEventListener("visibilitychange",Se),mt.debugLog&&s().actions.internal.startLogging(),Ue(r(ft));let G=et.map(Gt=>Gt.init({store:s(),microStores:ct,config:l(),interactiveController:$(),uiConfig:c()})),Wt=()=>{Dt&&document.removeEventListener("visibilitychange",Se),K?.disconnect(),G.forEach(Gt=>Gt.unsubscribe()),s().destroy()};return x()?.status==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),Wt):x()?.status==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),Wt):(x()?.status==="finished"||x()?.status==="postlive")&&!Object.keys(a()||[]).length?(s().actions.internal.setLiveWaitingRecord(!0),Wt):(Xe(),Wt)});function Ye(){r(he)?s().actions.external.play():ae(!0)}function Ee(){s().actions.external.pause()}function lt(G){s().actions.external.setMuted(G)}function gt(){s().actions.external.toggleSubtitle()}function St(G){ee()||G>=0&&G<=1&&s().actions.external.setVolume(G)}function oi(G){s().actions.internal.seekTime(G,$1.SeekAction.UNKNOWN)}function ti(G){s().actions.external.seekEpisodeStartTime(G)}function Bi(){s().actions.external.returnFocusToEpisodes()}function un(G){s().actions.external.setPlaybackRate(G)}function pn(G){s().actions.external.setAutoQualityLimits(G)}let Wo=ru(mt.view),wo=l().playerView==="preview";var Gi=I3();let So;tt(Gi,Wo);var Ko=h(Gi);{var zt=G=>{Vm(G,{get store(){return s()},uiConfig:mt,get thumbUrl(){return b()},get interactiveContainer(){return p()},get live(){return x()},get autoplay(){return C()},get canRewindLive(){return I()},get showAds(){return N()},get adsSlotId(){return W()},get adsParams(){return Q()},get adsPreviewParam(){return j()},get adsAutoplayParam(){return re()},get duration(){return ce()},get logoClickable(){return X()},get logoHidden(){return ge()},logoTargetUrl:Je,get nextButtonActive(){return Pe()},get prevButtonActive(){return Re()},get endScreenVideoTitle(){return fe()},get endScreenVideoThumb(){return Oe()},get isOneVideoPlaylist(){return ie()},get supportLink(){return R()},get shadowRootContainer(){return Ne()},get outerContainerRef(){return de()},get fullScreenTarget(){return Ke()},get showMiniTimer(){return U()},get playerStarted(){return r(he)},get seekToInteractive(){return Ae()},get playPrevChapter(){return We()},firstStart:ae,seekTime:oi,get showEndScreen(){return De()},get showAutoplayNext(){return ye()},get showNextPrevButtons(){return Me()},get videoContainer(){return r(ft)},set videoContainer(Wt){D(ft,le(Wt))}})},Co=G=>{var Wt=Be(),Gt=se(Wt);{var ji=ei=>{Rm(ei,{get thumbUrl(){return b()},get outsideDuration(){return ce()},get canRewindLive(){return I()},get videoContainer(){return r(ft)},set videoContainer(Si){D(ft,le(Si))}})},ii=ei=>{Mm(ei,{get store(){return s()},uiConfig:mt,get title(){return u()},get thumbUrl(){return b()},get interactiveContainer(){return p()},get live(){return x()},get autoplay(){return C()},get canRewindLive(){return I()},get showAds(){return N()},get adsSlotId(){return W()},get adsParams(){return Q()},get adsPreviewParam(){return j()},get adsAutoplayParam(){return re()},get duration(){return ce()},get logoClickable(){return X()},get logoHidden(){return ge()},logoTargetUrl:Je,get nextButtonActive(){return Pe()},get prevButtonActive(){return Re()},get endScreenVideoTitle(){return fe()},get endScreenVideoThumb(){return Oe()},get isOneVideoPlaylist(){return ie()},get supportLink(){return R()},get shadowRootContainer(){return Ne()},get outerContainerRef(){return de()},get fullScreenTarget(){return Ke()},get showMiniTimer(){return U()},get playerStarted(){return r(he)},get seekToInteractive(){return Ae()},get playPrevChapter(){return We()},firstStart:ae,get showEndScreen(){return De()},get showAutoplayNext(){return ye()},get showNextPrevButtons(){return Me()},get videoContainer(){return r(ft)},set videoContainer(Si){D(ft,le(Si))},get keyboardControls(){return je()},set keyboardControls(Si){je(Si)}})};V(Gt,ei=>{wo?ei(ji):ei(ii,!1)})}_(G,Wt)};V(Ko,G=>{ee()?G(zt):G(Co,!1)})}g(Gi),S(G=>So=J(Gi,1,"root svelte-7ed4yj",null,So,G),[()=>({"root--miui-browser":au.clientChecker.device.isMobile&&au.clientChecker.browser.isMiuiBrowser,"visible-outside":wo})]),_(t,Gi);var Qo=F({initVideo:Xe,play:Ye,pause:Ee,setMuted:lt,toggleSubtitle:gt,setVolume:St,seekTime:oi,seekEpisodeStartTime:ti,returnFocusToEpisodes:Bi,setPlaybackRate:un,setAutoQualityLimits:pn,get sources(){return a()},set sources(G){a(G)},get store(){return s()},set store(G){s(G)},get microStoresRoot(){return d()},set microStoresRoot(G){d(G)},get videoConfig(){return l()},set videoConfig(G){l(G)},get uiConfig(){return c()},set uiConfig(G){c(G)},get title(){return u()},set title(G){u(G)},get thumbUrl(){return b()},set thumbUrl(G){b(G)},get interactiveContainer(){return p()},set interactiveContainer(G){p(G)},get interactiveController(){return $()},set interactiveController(G){$(G)},get subtitles(){return w()},set subtitles(G){w(G)},get live(){return x()},set live(G){x(G)},get preload(){return k()},set preload(G){k(G)},get autoplay(){return C()},set autoplay(G){C(G)},get volume(){return E()},set volume(G){E(G)},get muted(){return A()},set muted(G){A(G)},get fromTime(){return L()},set fromTime(G){L(G)},get canRewindLive(){return I()},set canRewindLive(G){I(G)},get showAds(){return N()},set showAds(G){N(G)},get adsSlotId(){return W()},set adsSlotId(G){W(G)},get adsParams(){return Q()},set adsParams(G){Q(G)},get adsPreviewParam(){return j()},set adsPreviewParam(G){j(G)},get adsAutoplayParam(){return re()},set adsAutoplayParam(G){re(G)},get duration(){return ce()},set duration(G){ce(G)},get logoClickable(){return X()},set logoClickable(G){X(G)},get logoHidden(){return ge()},set logoHidden(G){ge(G)},get isMobile(){return ee()},set isMobile(G){ee(G)},get showNextPrevButtons(){return Me()},set showNextPrevButtons(G){Me(G)},get nextButtonActive(){return Pe()},set nextButtonActive(G){Pe(G)},get prevButtonActive(){return Re()},set prevButtonActive(G){Re(G)},get endScreenVideoTitle(){return fe()},set endScreenVideoTitle(G){fe(G)},get endScreenVideoThumb(){return Oe()},set endScreenVideoThumb(G){Oe(G)},get isOneVideoPlaylist(){return ie()},set isOneVideoPlaylist(G){ie(G)},get supportLink(){return R()},set supportLink(G){R(G)},get shadowRootContainer(){return Ne()},set shadowRootContainer(G){Ne(G)},get outerContainerRef(){return de()},set outerContainerRef(G){de(G)},get fullScreenTarget(){return Ke()},set fullScreenTarget(G){Ke(G)},get failoverHosts(){return oe()},set failoverHosts(G){oe(G)},get showMiniTimer(){return U()},set showMiniTimer(G){U(G)},get saveRate(){return Y()},set saveRate(G){Y(G)},get showAutoplayNext(){return ye()},set showAutoplayNext(G){ye(G)},get seekToInteractive(){return Ae()},set seekToInteractive(G){Ae(G)},get playPrevChapter(){return We()},set playPrevChapter(G){We(G)},get volumeMultiplier(){return Fe()},set volumeMultiplier(G){Fe(G)},get showEndScreen(){return De()},set showEndScreen(G){De(G)},get keyboardControls(){return je()},set keyboardControls(G){je(G)}});return o(),Qo}var P3=ve('<svg><!><path fill="currentColor" d="M38.245 6c3.566 0 4.859.371 6.162 1.069a7.27 7.27 0 0 1 3.025 3.024c.697 1.303 1.068 2.597 1.068 6.163v23.489c0 3.566-.371 4.859-1.069 6.162a7.27 7.27 0 0 1-3.024 3.025C43.104 49.629 41.811 50 38.245 50h-19.49c-3.565 0-4.859-.371-6.162-1.069a7.27 7.27 0 0 1-3.024-3.024C8.87 44.604 8.5 43.311 8.5 39.745v-23.49c0-3.565.371-4.859 1.069-6.162a7.27 7.27 0 0 1 3.024-3.024C13.896 6.37 15.19 6 18.756 6zm.314 3H18.756c-2.799 0-3.761.186-4.749.714a4.27 4.27 0 0 0-1.793 1.793c-.508.95-.7 1.876-.713 4.434L11.5 39.744c0 2.799.186 3.761.714 4.749a4.27 4.27 0 0 0 1.793 1.793c.988.528 1.95.714 4.749.714h19.489c2.798 0 3.76-.186 4.748-.714a4.27 4.27 0 0 0 1.793-1.793c.528-.988.714-1.95.714-4.748v-23.49c0-2.798-.186-3.76-.714-4.748a4.27 4.27 0 0 0-1.793-1.793c-.95-.508-1.876-.7-4.434-.713zM19.22 38c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134z"></path></svg>');function Dm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=P3();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"57",height:"60",fill:"none","aria-hidden":"true","data-testid":"stub-icon",role:"img",...i})),_(t,o)}function Bm(t,e){let i=m(e,"isWhite",3,!1),o=v(()=>i()?"color: #fff;":"color: #909499;");Dm(t,{get style(){return r(o)}})}var A3=M('<div class="title svelte-1y9fytq"> </div>'),M3=M('<div class="playerStub svelte-1y9fytq"><!> <!></div>'),L3={hash:"svelte-1y9fytq",code:".playerStub.svelte-1y9fytq {width:100%;height:100%;background-color:#222;display:flex;justify-content:center;align-items:center;position:relative;background-position:center;background-size:cover;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}.title.svelte-1y9fytq {position:absolute;left:0;top:0;width:100%;font-size:15px;color:#fff;box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"};function Om(t,e){z(t,L3);var i=M3(),o=h(i);{var n=d=>{var l=A3(),c=h(l,!0);g(l),S(()=>ue(c,e.title)),_(d,l)};V(o,d=>{e.title&&d(n)})}var a=P(o,2);{var s=d=>{let l=v(()=>!!e.thumbUrl);Bm(d,{get isWhite(){return r(l)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(s)})}g(i),S(()=>tt(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),_(t,i)}var I1=require("@vkontakte/videoplayer-shared"),Li=require("@vkontakte/videoplayer-shared"),Bd=require("@vkontakte/videoplayer-core"),E1=require("@vkontakte/videoplayer-statistics");var lu=require("@vkontakte/videoplayer-shared"),su=class{constructor(){this.subscription=new lu.Subscription,this.logger=new lu.Logger,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){if(this.isSupported())for(let[i,o]of e)try{navigator.mediaSession.setActionHandler?.(i,o)}catch{throw new Error(`The media session action "${i}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{let o=_e(e.state.currentPlaybackRate$),n=_e(e.state.duration$);if(!(!isFinite(i)||!isFinite(n)))try{navigator.mediaSession.setPositionState?.({position:i,playbackRate:o,duration:n})}catch{this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${n}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};var nl=require("@vkontakte/videoplayer-shared");var V3=ve('<svg><!><g fill="var(--btn-color, #fff)"><path d="m30.744 4 .744.005c2.981.046 4.526.385 6.127 1.24a8.77 8.77 0 0 1 3.475 3.347l.174.312.15.292c.772 1.553 1.066 3.18 1.085 6.251v9.045a1.5 1.5 0 0 1-3 .016l-.008-9.651c-.04-2.032-.228-3.12-.627-4.035l-.126-.27-.13-.252A5.77 5.77 0 0 0 36.2 7.891c-1.187-.635-2.339-.873-5.115-.89L22.255 7c-2.737 0-4.003.2-5.071.698l-.133.064-.251.13a5.77 5.77 0 0 0-2.409 2.408c-.635 1.187-.873 2.339-.89 5.114l-.001 20.83c0 2.738.2 4.004.698 5.072l.064.133.13.251a5.77 5.77 0 0 0 2.408 2.409c1.1.588 2.134.825 4.438.88l.323.006 3.695.005H26a1.5 1.5 0 0 1 0 3h-.756l-3.718-.005c-2.989-.047-4.526-.377-6.14-1.24a8.77 8.77 0 0 1-3.476-3.347l-.174-.312-.15-.292c-.731-1.472-1.036-3.016-1.08-5.803l-.006-.756v-20.49l.005-.743c.046-2.981.385-4.526 1.24-6.127a8.77 8.77 0 0 1 3.347-3.475l.312-.174.292-.15c1.472-.731 3.016-1.036 5.803-1.08L22.256 4z"></path><path d="M30.5 33.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C32.78 29 33.62 29 35.3 29h6.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311c.327.642.327 1.482.327 3.162v13.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C44.22 52 43.38 52 41.7 52h-6.4c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C30.5 49.72 30.5 48.88 30.5 47.2z"></path></g></svg>');function Hm(t,e){let i=Te(e,["$$slots","$$events","$$legacy","children"]);var o=V3();let n;var a=h(o);pe(a,()=>e.children??te),me(),g(o),S(()=>n=$e(o,n,{xmlns:"http://www.w3.org/2000/svg",width:"57",height:"56",fill:"none","aria-label":"dummy-image","data-testid":"pip-dummy-icon",role:"img",...i})),_(t,o)}var R3=M('<div><div><!></div> <span class="title svelte-1pbsod4"> </span></div>'),N3={hash:"svelte-1pbsod4",code:".player-pip-dummy.svelte-1pbsod4 {width:100%;height:100%;background-color:#19191A;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}.player-pip-dummy.is-pip-api.svelte-1pbsod4 {position:relative;}.dummy-image.svelte-1pbsod4 svg {transform:scale(1.07143);}.dummy-image.desktop.svelte-1pbsod4 {transform:scale(1.07143) rotate(-90deg) rotateY(180deg);}.title.svelte-1pbsod4 {font-size:16px;color:#fff;padding:18px 20px 10px;text-align:center;}"};function Fm(t,e){H(e,!0),z(t,N3);let[i,o]=Le(),n=()=>y(c,"$interfaceLanguage$",i),a=()=>y(u,"$isMobile$",i),s=be(),d=Rt(),l=!!s.webApi.pictureInPictureApi,c=s.interfaceLanguage$,u=s.ui.isMobile,b=s.ui.t,p=v(()=>n()&&b("pip_dummy_title")),$=ru(d.view);var w=R3();J(w,1,"player-pip-dummy svelte-1pbsod4",null,{},{"is-pip-api":l}),tt(w,$);var x=h(w);let k;var C=h(x);Hm(C,{}),g(x);var E=P(x,2),A=h(E,!0);g(E),g(w),S(L=>{k=J(x,1,"dummy-image svelte-1pbsod4",null,k,L),ue(A,r(p))},[()=>({desktop:!a()})]),_(t,w),F(),o()}var D3=460,B3=280,Pd=class{playerDomElement;playerParentShadowRoot;playerDummyElement;svelteContext;pipWindow;info={isActive$:new nl.ValueSubject(!1),isEnabled$:new nl.ValueSubject(!1),type:1};constructor({enabled:e=!0}={enabled:!0}){this.info.isEnabled$=new nl.ValueSubject(e)}isSupported(){let{isEmbed:e}=(0,nl.detectEmbed)();return"documentPictureInPicture"in window&&!e}isActive(){return this.isSupported()&&!!documentPictureInPicture.window}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}async request(){if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:D3,height:B3,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let e=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(d=>d.cssText).join(" ")).filter(Boolean).join(`
396
+ `),i=document.createElement("style");i.textContent=e;let o=this.createStretchedContainer(),n=o.attachShadow({mode:"open"});n.append(i),n.append(this.playerDomElement);let a={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=Kr(Fm,a),this.pipWindow?.document.body.append(o),this.info.isActive$.next(!0),this.pipWindow?.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Va(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1))})}async remove(){return new Promise(e=>{documentPictureInPicture.window?.close(),e()})}async dispose(){await this.remove()}setEnabled(e){this.info.isEnabled$.next(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function y1(t){return t instanceof Pd}var du=class{static getLatestSupportedVersion(e){let i=new qa(e),o=new Pd(e);if(o.isSupported())return o;if(i.isSupported())return i}};function cu(t,e){let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let n of i)o[n]=e[n]??t[n]??void 0;return o}var x1="Inner error. Unexpectedly root annotation container null reference exception",w1="Annotation with such name already exists",S1="Annotation with such name does not exist";var rl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};var al=require("@vkontakte/videoplayer-shared"),O3="1",H3=100,uu=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new al.Subscription}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=(0,al.throttleFn)(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},H3);this.subscriptions.add((0,al.observeElementSize)(this.rootAnnotationsContainer).subscribe(({width:o,height:n})=>{this.playerSize={width:o,height:n},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){if(!this.rootAnnotationsContainer)throw new rl(x1);if(this.annotations.has(e))throw new rl(w1);i.style.zIndex=i.style.zIndex??O3,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 rl(S1);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(){this.annotations.clear(),this.subscriptions.unsubscribe(),this.mutationObserver?.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let n=e.offsetTop,a=e.offsetLeft,s=e.offsetWidth,d=e.offsetHeight;return n<0||a<0||a+s>i||n+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};var fs=require("@vkontakte/videoplayer-shared"),xo=class{init({store:e,microStores:i,interactiveController:o,config:n}){return(0,fs.assertNonNullable)(e),(0,fs.assertNonNullable)(i),(0,fs.assertNonNullable)(n),n.interactiveData&&(0,fs.assertNonNullable)(o),this.subscription=new fs.Subscription,this.subscription}};var Ad=class extends xo{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...ne(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{isInteractiveExpectation$:n}=i.store.state;return o.add(n.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Md=class extends xo{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...ne(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{microStores:n,store:a}=i,{fakeIsPlaying$:s}=n,{isInteractiveExpectation$:d,isPlaying$:l}=a.state,{controlsVisible:c,isMobile:u}=a.ui,b=_e(u),p=()=>b&&_e(c);return o.add(c.subscribe($=>{if(!b)return;let w=_e(s);_e(l)?this.state$.set($):w!==null&&this.state$.set(!w||$)})),o.add(l.subscribe($=>{this.state$.set(!$||p())})),o.add(s.subscribe($=>{if($===null)return;let w=_e(d);if(p()){this.state$.set(!0);return}w&&this.state$.set(!$)})),o}};var Ld=class extends xo{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=ne("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:n}=i;return o.add(n.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(s=>s.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};var C1=require("@vkontakte/videoplayer-shared"),Um=ne(!1),pu=null,Vd=class extends xo{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Um,set:(i,o=!1)=>{i!==_e(Um)&&(this.clearTimeout(),Um.set(i),!i&&pu&&(pu=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()}}init(i){let o=super.init(i),{store:n,config:a}=i,{isInteractiveTime$:s,isPlaying$:d}=n.state,l=n.ui.controlsVisible,{interactiveTimeIndicator:c}=n.ui.controls;o.add(l.subscribe(b=>{_e(s)&&b&&this.state$.set(!1)}));let u=a?.interactiveData||{tooltipHelpHintActive:!1};return o.add((0,C1.combine)({isPlaying$:d,isInteractiveTime$:s,interactiveTimeIndicator:c}).subscribe(({isPlaying$:b,isInteractiveTime$:p,interactiveTimeIndicator:$})=>{if(!(!b||!$?.isDisplayed)){if(!p)return this.state$.set(!1);u.tooltipHelpHintActive&&pu===null&&(pu=!0,u.tooltipHelpHintActive=!1,this.state$.set(!0),n.callbacks?.onInteractiveTimeIndicatorHintDeactivated?.())}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};var fu=require("@vkontakte/videoplayer-shared");var Rd=class extends xo{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...ne(null),toggle:fu.noop};this.checkIfShouldHide=i=>fa(i,"s")}init(i){let o=super.init(i),{store:n,interactiveController:a}=i,s=n.ui.currentGridType$,d=n.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=async()=>{if(this.checkIfShouldHide(_e(s)))return;let l=_e(this.state$),{isEnded$:c,playbackState$:u}=n.state,{disabledControls$:b}=n.ui.controls,p=_e(c),$=_e(u);if(l)try{await a?.toggleGraphView(!1),this.state$.set(!1),b.remove(gp),!p&&this.graphMadePause&&n.actions.internal.play()}catch{d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{await a?.toggleGraphView(!0),this.state$.set(!0),b.add(gp),!p&&this.graphMadePause&&n.actions.internal.pause()}catch{d({message:"Cant show graph"})}}},o.add((0,fu.combine)({graphIsOpened:this.state$,currentGridType:s}).subscribe(async({graphIsOpened:l,currentGridType:c})=>{if(this.checkIfShouldHide(c)&&l)try{await a?.toggleGraphView(!1),this.state$.set(!1)}catch{d({message:"Cant hide graph"})}})),o}};var zm=require("@vkontakte/videoplayer-shared"),Nd=class extends xo{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:ne(!1),isEnabled$:ne(!1),type$:ne(void 0)}}init(i){let o=super.init(i),{store:n}=i,{info:{isActive$:a,isEnabled$:s,type:d}}=n.webApi.pictureInPictureApi||{info:{isActive$:new zm.ValueSubject(!1),isEnabled$:new zm.ValueSubject(!1)}};return o.add(a.subscribe(l=>{this.state$.isActive$.set(l)})),o.add(s.subscribe(l=>{this.state$.isEnabled$.set(l)})),this.state$.type$.set(d),o}};var vu=require("@vkontakte/videoplayer-shared");var mu=require("@vkontakte/videoplayer-shared"),k1=({maxShowCount:t,timeout:e})=>{let i=[t!==0?F3({maxCount:t}):void 0,e!==0?U3({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(n=>n.notificationShowed(o)),canShowNotification:o=>i.every(n=>n.canShowNotification(o))}},F3=({maxCount:t})=>{let e={};return{notificationShowed:i=>{e[i]=(e[i]??0)+1,mu.safeStorage.set("videoplayer_notifications_manager_count",JSON.stringify(e[i]??0))},canShowNotification:i=>(e[i]??0)<t}},U3=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(mu.safeStorage.get(e)||"{}")}catch{return{}}},o=a=>mu.safeStorage.set(e,JSON.stringify(a)),n=a=>{let s=i();delete s[a],o(s)};return{notificationShowed:a=>{o({...i(),[a]:{timeout:t,launchTime:Date.now()}})},canShowNotification:a=>{let s=i()[a];if(s){let d=Date.now()-s.launchTime>t;return d&&n(a),d}else return!0}}};var Dd=class extends xo{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:ne({}),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:n,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:s,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:l}}}=i;this.notificationManager=k1({maxShowCount:a,timeout:s});let c=n.getPlayer();return o.add(c.events.severeStallOccured$.pipe((0,vu.filterChanged)(),(0,vu.filter)(u=>u)).subscribe(()=>{d&&!c.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(l&&n.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var T1=()=>[Ad,Md,Ld,Vd,Rd,Nd,Dd].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});var sl=require("@vkontakte/videoplayer-shared");var z3={preload:!0,autoplay:!1,repeat:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Li.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:(0,Bd.isMobile)(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},cn=Z(void 0),gu=class extends HTMLElement{svelteStubComponent;svelteRootComponent;store;microStoresRoot;statistics;sentry;_shadowRoot;playerContainer;rootContainer;shadowRootContainer;uiConfig;coreConfig;statisticsConfig;interactiveController;interactiveContainer;graphMadePause;currentPlayingVideoIndex=0;needToRepeatPlaylist=!1;videoConfig=void 0;pictureInPictureApi=void 0;mediaSessionApi=void 0;unsubscribePlayerPhaseSubscription=void 0;logger;log;subscription;interactiveSubscription;annotationsApi=void 0;slotsApi;prevIsid=void 0;isInited=!1;internalsExposure=null;shadowDOMCallbacksDisabled=!1;constructor(){super(),sl.devNull.create("ui"),this.logger=new Li.Logger,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Li.Subscription,this.interactiveSubscription=new Li.Subscription,this.graphMadePause=!1}connectedCallback(){if(this.isInited||this.shadowDOMCallbacksDisabled)return;this.initPlayerRootContainers();let e=this.getAttribute("stub-title")??void 0,i=this.getAttribute("stub-thumb-url")??void 0,o=le({title:e,thumbUrl:i}),n={target:this.playerContainer,props:o};this.svelteStubComponent=Kr(Om,n)}disconnectedCallback(){this.shadowDOMCallbacksDisabled||(this.annotationsApi?.destroy(),this.mediaSessionApi?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.subscription.unsubscribe(),this.unsubscribePlayerPhaseSubscription?.(),this.interactiveController?.destroy(),this.interactiveSubscription.unsubscribe(),this.internalsExposure?.destroy(),sl.devNull.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.append(this.rootContainer)}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){return this.store?.ui.controls.disabledControls$?.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}}createOneStat=(e,i={})=>{let{albumId:o,statPlace:n,statUserSalt:a,statTrackCode:s,statVKAppId:d,refreshStatAuthToken:l,autoplay:c,isMobile:u,isTouch:b,refDomain:p,deviceId:$,interactiveData:w}=cu(this.videoConfig,i),x=w?.projectInfo?.pid,k=this.interactiveController?.state.isReplay$.getValue()??!1;k&&(this.prevIsid=void 0);let{unitedVideoId:C,isClip:E=!1}=e;if(this.uiConfig.features.statistics&&C)return new E1.OneStat({movieId:C,albumId:o,place:n,trackCode:s,vkAppId:d,autoplay:(c&&!this.interactiveController)??!1,mobile:b??u,clip:E,refDomain:p,deviceId:$,...x&&(!this.isInited||k)&&{projectId:Number(x)}},{refreshAuthToken:l,userSalt:a,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})};createPlayer(e,i={},o){if(!this.videoConfig)return;let{albumId:n,statPlace:a,statAuthToken:s,preload:d,autoplay:l,volume:c,muted:u,fromTime:b,canRewindLive:p,supportLink:$,showAds:w,adsSlotId:x,adsParams:k={},adsPreviewParam:C,adsAutoplayParam:E,interfaceLanguage:A,isCyrillicRelatedInterface:L,logoClickable:I,logoHidden:N,isMobile:W,isTouch:Q,isAudioDisabled:j,isLiveCatchUpMode:re,fullScreenTarget:ce,failoverHosts:X,canDownload:ge,callbacks:ee,interactiveData:Me,showThumbTimer:Pe,additionalButtons:Re=[],additionalSettingsMenuItems:fe=[],additionalContextMenuItems:Oe=[],repeat:ie,saveRate:R,volumeMultiplier:Ne,showEndScreen:de,showAutoplayNext:Ke}=cu(this.videoConfig,i),{sources:oe,title:U,thumbUrl:Y,unitedVideoId:Ae,isClip:We=!1,duration:Fe,adsParams:ye={},videoEpisodes:De,previewThumbsData:je,subtitles:et,live:ct}=e,mt={...k,...ye},Je=this.getNextVideoInfo(),ut={sources:oe,title:U,thumbUrl:Y,subtitles:et,unitedVideoId:Ae,isClip:We,live:ct,albumId:n,statPlace:a,autoplay:l,muted:u,volume:c,fromTime:b,canRewindLive:p,showAds:w,adsSlotId:x,adsParams:mt,adsPreviewParam:C,adsAutoplayParam:E,duration:Fe,logoClickable:I,logoHidden:N,isTouch:Q??W,repeat:ie,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:Je.nextVideoTitle,endScreenVideoThumb:Je.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},$t={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi};this.log({message:`create player, props: ${JSON.stringify(ut)}`});let Ot=this.interactiveController?.state.statistics$.getValue(),we=Ot?.oneStat||this.createOneStat(e,i);we&&(this.statistics=new Qc(we,Ot?.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new za(this.uiConfig.sentry,{version:Ha,env:bc},{movieId:Ae,albumId:n,place:a,autoplay:(l&&!this.interactiveController)??!1,mobile:Q??W,clip:We}),this.interactiveController&&(this.prevIsid??=this.statistics?.oneStat.isid$.getValue()),this.sentry={...this.sentry,...za.getInstance()};let ft=!!Me,K=[],he="tooltip_interactive_go_back_disabled_first";if(ft&&this.interactiveController){let Ue=this.interactiveController.state.isInitialChapter$.getValue(),Se=this.interactiveController.getHistoryState();Ue&&K.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||K.push("SEEK_TO_INTERACTIVE_BUTTON"),Se.hasPrevChapter$.getValue()||(K.push("PLAY_PREV_CHAPTER_BUTTON"),Ue||(Se.isGoBackLimited$.getValue()?he="tooltip_interactive_go_back_disabled_limit":he="tooltip_interactive_go_back_disabled"))}let ae=()=>{this.isInited=!1,this.prevIsid=void 0;let Ue=o?.info.isEnded$.getValue()&&this.interactiveController?.state.isEndChapter$.getValue();ee.onReplayInteractiveVideo&&!Ue?ee.onReplayInteractiveVideo():this.replayInteractiveVideo()};this.store=zh({player:o,interfaceLanguage:A,isCyrillicRelatedInterface:L,videoId:Ae,isClip:We,isLiveCatchUpMode:re,isAudioDisabled:j,statAuthToken:s,callbacks:ee,webApi:$t,videoEpisodes:De,previewThumbsData:je,canDownload:ge,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:K,isInteractive:ft,saveRate:R,interactiveRanges$:this.interactiveController?.state.interactiveRanges$,isInteractiveTime$:this.interactiveController?.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ae,playPrevChapterDisabledTooltip:he,hasInteractiveBranches:!!this.interactiveController?.getChapterBranches()?.length,additionalButtons:this.uiConfig.features.additionalButtons?Re:[],additionalSettingsMenuItems:fe??[],additionalContextMenuItems:Oe??[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),looped:ie&&this.videoConfig.videos.length===1,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView});let{stores:qe}=this.microStoresRoot=T1(),Xe=()=>{if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Se=>ee?.onCurrentFormatChanged?.(Se))),this.subscription.add(qe.interactiveControlsOpacity$.subscribe(Se=>{Se!==null&&this?.interactiveController?.setDisabledControls(Se)})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Se=>ee?.onThroughputEstimationChanged?.(Se))),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Se=>ee?.onTrafficSavingEnabledChanged?.(Se))),this.subscription.add(new Li.Observable(Se=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Ye=>Se.next(Ye)))}).pipe(this.uiConfig.features.skipInitialPlaybackRateValue?(0,Li.skip)(1):Se=>Se).subscribe(Se=>ee?.onCurrentPlaybackRateChanged?.(Se))),this.subscription.add(this.store.state.volume$.subscribe(Se=>ee?.onVolumeChange?.(Se))),this.subscription.add(this.store.state.muted$.subscribe(Se=>Se?ee?.onMute?.():ee?.onUnmute?.())),this.subscription.add(this.store.state.videoBitrate$.subscribe(Se=>ee?.onVideoBitrateChanged?.(Se))),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Se=>{let Ye=this.store?.ui.controls.disabledControls$;Ye&&(Se&&!Ye.includes(Dl)&&Ye.add(Dl),Se||Ye.remove(Dl))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async Se=>{if(!Bd.clientChecker.browser.isSamsungBrowser||!Se||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter(this.videoConfig?.callbacks.onExternalFullscreenExit)})),this.statistics&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Se=>ee?.onVSIDChanged?.(Se))),this.initMediaSession(),D(cn,le({interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:oe,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:U,thumbUrl:Y,subtitles:et,live:ct,preload:d,autoplay:l,muted:u,volume:c,fromTime:b,canRewindLive:p,supportLink:$,showAds:w,adsSlotId:x,adsParams:mt,adsPreviewParam:C,adsAutoplayParam:E,duration:Fe,logoClickable:I,logoHidden:N,isMobile:Q??W,failoverHosts:X,fullScreenTarget:ce,saveRate:R,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Pe,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:Je.nextVideoTitle,endScreenVideoThumb:Je.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Ne,showEndScreen:de,showAutoplayNext:Ke}));let Ue={target:this.playerContainer,props:r(cn)};this.svelteRootComponent=Kr(Nm,Ue),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,this.videoConfig?.callbacks?.onInited?.()),this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&this.videoConfig?.callbacks?.onDevNullLog?sl.devNull.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):sl.devNull.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Bd.clientChecker.isInited$.subscribe(Ue=>{Ue&&(console.log("UI SDK async start"),Xe())}):Xe()}addPlayerInfoSubscriptions(){let e=this.store,i=this.microStoresRoot?.stores;if(!e||!i)return;let o=this.videoConfig?.callbacks;o&&this.subscription.add(e.playerPhase.subscribe(a=>o.onPlayerPhaseChanged?.(a))).add(e.state.playbackState$.subscribe(a=>a&&o.onPlaybackStateChanged?.(a))).add(e.state.isLive$.subscribe(a=>o.onIsLiveChanged?.(a))).add(e.state.isActiveLive$.subscribe(a=>o.onIsActiveLiveChanged?.(a))).add(e.state.isAudioAvailable$.subscribe(a=>o.onIsAudioAvailableChanged?.(a))).add(e.state.currentQuality$.subscribe(a=>o.onCurrentQualityChanged?.(a))).add(e.state.availableQualities$.subscribe(a=>o.onAvailableQualitiesChanged?.(a.map(({value:s})=>s).filter(s=>s!=="auto")))).add(e.state.availableAudioStreams$.subscribe(a=>{a.length>1&&o.onAudioLanguagesAvailable&&o.onAudioLanguagesAvailable()})).add(i.pictureInPicture$.isActive$.subscribe(a=>a?o.onPiPEnter?.():o.onPiPExit?.()));let n=o?.uiInfo;n&&this.subscription.add(e.ui.controlsVisible.subscribe(a=>n.onControlsVisibleChanged?.(a))).add(e.ui.isMobile.subscribe(a=>n.onIsMobileChanged?.(a))).add(e.ui.playerSize.subscribe(a=>n.onPlayerSizeChanged?.(a))).add(e.ui.controls.prevButton.subscribe(a=>n.onPrevButtonChanged?.(a))).add(e.ui.controls.playButton.subscribe(a=>n.onPlayButtonChanged?.(a))).add(e.ui.controls.replayButton.subscribe(a=>n.onReplayButtonChanged?.(a))).add(e.ui.controls.nextButton.subscribe(a=>n.onNextButtonChanged?.(a))).add(e.ui.controls.playPrevChapterButton.subscribe(a=>n.onPlayPrevChapterChanged?.(a))).add(e.ui.controls.seekToInteractiveButton.subscribe(a=>n.onSeekToInteractiveButtonChanged?.(a))).add(e.ui.controls.interactiveGraphButton.subscribe(a=>n.onGraphButtonChanged?.(a))).add(e.ui.controls.liveButton.subscribe(a=>n.onLiveButtonChanged?.(a))).add(e.ui.controls.time.subscribe(a=>n.onTimeUpdateChanged?.(a))).add(e.ui.controls.episodes.subscribe(a=>n.onEpisodesChanged?.(a))).add(e.ui.controls.subtitles.subscribe(a=>n.onSubtitlesChanged?.(a))).add(e.ui.controls.settings.subscribe(a=>n.onSettingsChanged?.(a))).add(e.ui.controls.fullscreen.subscribe(a=>n.onFullscreenChanged?.(a))).add(e.ui.controls.chromecast.subscribe(a=>n.onChromecastChanged?.(a))).add(e.ui.controls.pip.subscribe(a=>n.onPipChanged?.(a))).add(e.ui.controls.vkLogo.subscribe(a=>n.onVkLogoChanged?.(a))).add(e.ui.controls.interactiveTimeIndicator.subscribe(a=>n.onInteractiveTimeIndicatorChanged?.(a))).add(e.ui.controls.timeline.subscribe(a=>n.onTimelineChanged?.(a)))}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){if(!this.videoConfig)return;let o=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!o){this.log({message:"no next video"});return}this.isInited&&(0,Li.isNonNullable)(o.unitedVideoId)&&this.store?.actions.internal.nextMovie(o.unitedVideoId),this.unmountComponent(this.svelteRootComponent),this.createPlayer(o,{autoplay:i,fromTime:0},e)}playPrevChapter(){this.interactiveController?.playPrevChapter()}seekToInteractive(){let e=this.interactiveController?.getNextInteractiveStartTime();typeof e=="number"&&this.seekTime(e/1e3)}async initInteractives(){if(this.videoConfig?.interactiveData)try{let{Interactives:e}=await import("@vkontakte/videoplayer-interactive");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let i=this.store?.interfaceLanguage$,o=i?_e(i):this.videoConfig.interfaceLanguage,{projectInfo:n,initChapterId:a,historyApi:s,videoLoader:d}=this.videoConfig.interactiveData;this.interactiveController=new e({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:o,graph:this.uiConfig.features.interactiveGraph,projectInfo:n,initChapterId:a,historyApi:s,vkVideoLoader:d,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}});let{isInteractiveExpectation$:l,isSeekable$:c}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(c.subscribe(b=>{if(!this.isInited)return;let p=this.store;b?p.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):p.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(l.subscribe(b=>{this.store&&this.store.state.isInteractiveExpectation$.set(b)}));let u=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(b=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...b.config,title:n?.title||b.config.title};let p=u?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(b.player,p),u&&(u=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:b,actionType:p})=>{if(!this.store||!this.microStoresRoot)return;let $=l.getValue();if(b==="action-choice"&&p==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Bl)),b==="action-choice-canceled"){let w=_e(this.store.state.isPlaying$)||$;if((this.videoConfig?.isTouch??this.videoConfig?.isMobile)&&w){this.store.ui.interactiveHideMobileControls.set(!0);return}this.videoConfig?.callbacks.onDisabledInteractiveClick?.()}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:b,removeAllOpenURI:p})=>{this.store&&b==="container-fake-removed"&&p&&this.store.ui.controls.disabledControls$.remove(Bl)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),this.videoConfig?.callbacks?.onInteractiveHistoryChanged){let b=this.interactiveController.getHistoryState();this.subscription.add(b.history$.subscribe(p=>{p.length&&this.videoConfig?.callbacks?.onInteractiveHistoryChanged?.(p)}))}this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{this.microStoresRoot?.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),this.videoConfig?.callbacks.onInteractiveTimeIndicatorClick?.()})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(b=>{this.log({message:b.toString()})}))}catch(e){this.log({message:e.message})}}initPlayer(e,i={}){if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData)throw new Error("empty videos");if(this.videoConfig=cu(z3,(0,Li.cloneDeepWith)(e,o=>o instanceof HTMLElement?o:void 0)),this.uiConfig=Sg(i.ui??{}),this.coreConfig=i.core??{configName:[]},this.statisticsConfig=i.statistics??{},this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer.style.minHeight="unset",this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.sentry={config:this.uiConfig.sentry??{}},this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new Li.InternalsExposure("UI")),sl.devNull.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+this.videoConfig?.showAds],numbers:[(0,I1.now)()]}),(0,Li.isNonNullable)(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=this.uiConfig.features.mediaSession??this.videoConfig.isMediaSessionEnabled??!0),(0,Li.isNonNullable)(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=this.uiConfig.features.pip??this.videoConfig.isPictureInPictureEnabled??!0,this.uiConfig.features.dpip=this.uiConfig.features.dpip??this.videoConfig.isPictureInPictureEnabled??!0),this.videoConfig.isTouch=this.uiConfig.isMobile??this.videoConfig.isTouch??this.videoConfig.isMobile,this.videoConfig.autoplay&&=this.uiConfig.features.autoplay,this.videoConfig.showAds=this.uiConfig.ads.enable??this.videoConfig.showAds,this.videoConfig.adsSlotId=this.uiConfig.ads.slot??this.videoConfig.adsSlotId,this.videoConfig.adsPreviewParam=this.uiConfig.ads.preview??this.videoConfig.adsPreviewParam,this.videoConfig.logoHidden=!(this.uiConfig.showLogo??!this.videoConfig.logoHidden),this.videoConfig.canRewindLive&&=this.uiConfig.features.liveRewind,this.videoConfig.supportLink=this.videoConfig.supportLink??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&&this.videoConfig.videos?.[this.videoConfig.videoIndex]?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let o={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=du.getLatestSupportedVersion(o):this.pictureInPictureApi=new qa(o)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new su:void 0,this.slotsApi=this.uiConfig.features.slots?new iu:void 0,this.annotationsApi=this.uiConfig.features.annotations?new uu(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.slotsApi?.init(this.shadowRootContainer),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),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]),y1(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot)}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();r(cn)&&(r(cn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(cn).nextButtonActive=this.isNextButtonActive(),r(cn).prevButtonActive=this.isPrevButtonActive(),r(cn).endScreenVideoTitle=o.nextVideoTitle,r(cn).endScreenVideoThumb=o.nextVideoThumb,r(cn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){this.mediaSessionApi&&(this.unsubscribePlayerPhaseSubscription?.(),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=this.store?.playerPhase.subscribe(e=>{e==="video"?this.setupMediaSessionForVideo():e==="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",n=>this.seekTime(n.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>this.playNextVideo()]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>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="\u0420\u0435\u043A\u043B\u0430\u043C\u0430",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(){this.isControlDisabled("PLAY_BUTTON")||this.store?.playerPhase.is("LiveWaitingStart")||this.store?.playerPhase.is("LiveWaitingRecover")||this.store?.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),this.svelteRootComponent?.play())}pause(){this.log({message:"pause"}),this.svelteRootComponent?.pause()}stop(){if(!this.videoConfig)return;this.log({message:"stop"});let e=!!this.interactiveController;e&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),this.mediaSessionApi?.destroy();let i=this.videoConfig.videos[0];i&&(this.unmountComponent(this.svelteRootComponent),e?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(i))}setMuted(e){this.log({message:`set muted, muted: ${e}`}),this.svelteRootComponent?.setMuted(e)}toggleSubtitle(){this.log({message:"toggle subtitle"}),this.svelteRootComponent?.toggleSubtitle()}setPiPEnabled(e){this.store?.webApi.pictureInPictureApi?.setEnabled(e)}setVolume(e){this.log({message:`set volume, volume: ${e}`}),this.svelteRootComponent?.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,r(cn)&&(r(cn).needToRepeatPlaylist=this.needToRepeatPlaylist,r(cn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(cn).nextButtonActive=this.isNextButtonActive(),r(cn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),this.svelteRootComponent?.seekTime(e))}seekEpisodeStartTime(e){this.log({message:`seek episode start time, time: ${e}`}),this.svelteRootComponent?.seekEpisodeStartTime(e)}returnFocusToEpisodes(){this.log({message:"return focus to episodes button"}),this.svelteRootComponent?.returnFocusToEpisodes()}setPlaybackRate(e){this.log({message:`set playback rate to: ${e}`}),this.svelteRootComponent?.setPlaybackRate(e)}setAutoQualityLimits(e){this.log({message:`set auto quality limitation. Max: ${e.max??"none"}. Min: ${e.min??"none"}`}),this.svelteRootComponent?.setAutoQualityLimits(e)}addLanguage(e){this.store?.actions.internal.addLanguage(e)}async setLanguage(e){await this.store?.actions.internal.setLanguage(e)}setLiveStart(e){this.log({message:"live started"}),this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0})}setLiveWaitingStart(){this.log({message:"live waiting"}),this.store?.actions.internal.setLiveWaitingStart(!0)}setLiveWaitingRecover(){this.log({message:"live waiting recover"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0),this.store?.destroy()})}setLiveWaitingRecord(){this.log({message:"post live"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0),this.store?.destroy()})}setLiveEnd(e){this.log({message:"live ended"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})})}setLiveLowLatency(e){this.log({message:"live switch to low latency "+e}),this.store?.actions.external.setLiveLowLatency(e)}setLooped(e){this.store?.actions.internal.setLooped(e)}getDebugData(){return this.store?.actions.internal.getDebugTextData()??""}getDeviceId(){return this.statistics?.oneStat.getDeviceId()??void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}async replayInteractiveChapter(e){if(this.interactiveController&&this.store?.state.positionExact$){let i=_e(this.store.state.positionExact$),n=_e(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe((0,Li.once)()).subscribe(()=>{n&&i>=n.time?this.seekTime(n.time):this.seekTime(i),e?.()});let a=this.interactiveController.getCurrentChapter();await this.interactiveController.setChapter({chapterId:a?.chapter?.id,pushToHistory:!1})}}showInteractiveIndicatorTooltip(e,i=!1){this.microStoresRoot?.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){this.store?.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){this.store?.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){this.store?.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){this.store?.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){this.store?.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){this.store?.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){this.store?.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){this.store?.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){this.store?.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){this.store?.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&this.statistics.oneStat.updateContext(e)}handleTimerNextVideo(e){this.store?.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){this.store?.actions.internal.togglePictureInPicture()}focus(){this.svelteRootComponent?.keyboardControls?.focus?.()}unmountComponent(e){e&&Va(e)}};var ll=require("@vkontakte/videoplayer-shared"),hu=require("@vkontakte/videoplayer-core"),q3=()=>{window.customElements.define("vk-video-player",gu)};