@vkontakte/videoplayer 1.1.62-dev.b50ee8d3.0 → 1.1.62-dev.cb3c3ded.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs.js +36 -36
- package/es2015.esm.js +36 -36
- package/es2018.cjs.js +5 -5
- package/es2018.esm.js +5 -5
- package/es2024.cjs.js +21 -21
- package/es2024.esm.js +21 -21
- package/esnext.cjs.js +21 -21
- package/esnext.esm.js +21 -21
- package/evergreen.esm.js +21 -21
- package/package.json +5 -5
- package/types/VKVideoPlayer/index.svelte.d.ts +1 -0
- package/types/components/Ads/admanWrapper.d.ts +0 -2
- package/types/config.d.ts +0 -1
package/es2018.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.1.62-dev.
|
|
3
|
-
* Tue, 27 May 2025
|
|
2
|
+
* @vkontakte/videoplayer v1.1.62-dev.cb3c3ded.0
|
|
3
|
+
* Tue, 27 May 2025 10:55:31 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-62/doc/
|
|
5
5
|
*/
|
|
6
6
|
"use strict";var t0=Object.create;var yl=Object.defineProperty;var i0=Object.getOwnPropertyDescriptor;var o0=Object.getOwnPropertyNames;var n0=Object.getPrototypeOf,r0=Object.prototype.hasOwnProperty;var sv=t=>{throw TypeError(t)};var s0=(t,e,i)=>e in t?yl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var a0=(t,e)=>{for(var i in e)yl(t,i,{get:e[i],enumerable:!0})},av=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of o0(e))!r0.call(t,n)&&n!==i&&yl(t,n,{get:()=>e[n],enumerable:!(o=i0(e,n))||o.enumerable});return t};var lv=(t,e,i)=>(i=t!=null?t0(n0(t)):{},av(e||!t||!t.__esModule?yl(i,"default",{value:t,enumerable:!0}):i,t)),l0=t=>av(yl({},"__esModule",{value:!0}),t);var On=(t,e,i)=>s0(t,typeof e!="symbol"?e+"":e,i),Nu=(t,e,i)=>e.has(t)||sv("Cannot "+i);var Ei=(t,e,i)=>(Nu(t,e,"read from private field"),i?i.call(t):e.get(t)),us=(t,e,i)=>e.has(t)?sv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Ta=(t,e,i,o)=>(Nu(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),dv=(t,e,i)=>(Nu(t,e,"access private method"),i);var dx={};a0(dx,{ControlButtonType:()=>$d,GridTypes:()=>Pr,InterfaceLanguage:()=>hl.InterfaceLanguage,MenuItemType:()=>il,PlayerPhase:()=>bs,VERSION:()=>Zs,VKNumericLanguage:()=>hl.VKNumericLanguage,VideoFormat:()=>Eu.VideoFormat,VideoQuality:()=>Eu.VideoQuality,loadVKLangPack:()=>hl.loadVKLangPack,registerPlayerWebComponent:()=>lx});module.exports=l0(dx);var ps="[",Vs="[!",Rs="]",Qr={};var Pi=Symbol(),fi=Symbol("filename"),cv=Symbol("hmr"),uv="http://www.w3.org/1999/xhtml",Bu="http://www.w3.org/2000/svg";var rc=!0;var fv,mv,pv=(mv=(fv=globalThis.process)==null?void 0:fv.env)==null?void 0:mv.NODE_ENV,Te=pv&&!pv.toLowerCase().startsWith("prod");var Uo=Symbol("$state"),Gr=Symbol("$state metadata"),xl=Symbol("legacy props"),vv=Symbol("");var wr=Array.isArray,gv=Array.prototype.indexOf,wl=Array.from,Du=Object.keys,ao=Object.defineProperty,Hn=Object.getOwnPropertyDescriptor,sc=Object.getOwnPropertyDescriptors,Ou=Object.prototype,hv=Array.prototype,Yr=Object.getPrototypeOf;function fs(t){return typeof t=="function"}var ie=()=>{};function _v(t){return t()}function ms(t){for(var e=0;e<t.length;e++)t[e]()}var Sl=[],Hu=[];function bv(){var t=Sl;Sl=[],ms(t)}function d0(){var t=Hu;Hu=[],ms(t)}function Xo(t){Sl.length===0&&queueMicrotask(bv),Sl.push(t)}function Fu(){Sl.length>0&&bv(),Hu.length>0&&d0()}function ac(t){return t===this.v}function ka(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function $v(t,e){return t!==e}function Ia(t){return!ka(t,this.v)}function yv(){if(Te){let t=new Error(`derived_references_self
|
|
@@ -45,7 +45,7 @@ ${l}in ${u}`).join("")}
|
|
|
45
45
|
`)){let n=(i=$0.exec(o))!=null?i:y0.exec(o);n&&e.push({file:n[1],line:+n[2],column:+n[3]})}return e}function ag(){var e;let t=(e=x0())==null?void 0:e.slice(4);if(!t)return null;for(let i=0;i<t.length;i++){let o=t[i],n=b0[o.file];if(!n){if(i===0)return null;continue}for(let a of n){if(a.end==null)return null;if(a.start.line<o.line&&a.end.line>o.line)return a.component}}return null}var xc=Symbol("ADD_OWNER");function sp(t,e,i=!1,o=!1){if(t&&!i){let n=rn,a=t[Gr];if(a&&!ap(a,n)){let s=lp(a);e&&e[fi]!==n[fi]&&!o&&zv(n[fi],e[fi],s[fi])}}wc(t,e,new Set)}function ju(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 wc(t,e,i){var a;let o=t==null?void 0:t[Gr];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),xc in t&&t[xc])xo(()=>{t[xc](e)});else{var n=Yr(t);if(n===Object.prototype)for(let s in t)if((a=Object.getOwnPropertyDescriptor(t,s))!=null&&a.get){let d=Pi;xo(()=>{let l=t[s];d!==l&&(d=l,wc(l,e,i))})}else wc(t[s],e,i);else if(n===Array.prototype)for(let s=0;s<t.length;s+=1)wc(t[s],e,i)}}}function ap(t,e){return t.owners===null?!0:t.owners.has(e)||fi in e&&[...t.owners].some(i=>i[fi]===e[fi])||t.parent!==null&&ap(t.parent,e)}function lp(t){var e,i;return(i=(e=t==null?void 0:t.owners)==null?void 0:e.values().next().value)!=null?i:lp(t.parent)}var w0=!1;function Wv(t){if(w0)return;let e=ag();if(e&&!ap(t,e)){let i=lp(t);i[fi]!==e[fi]?Yu(e[fi],i[fi]):Yu()}}function Da(t){if(Te){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 Vl(t){Tt=t}var rn=null;function Rl(t){rn=t}function Oa(t){return dp("getContext").get(t)}function Ha(t,e){let i=dp("setContext");return Te&&$t(()=>sp(e,null,!0)),i.set(t,e),e}function Bl(){return dp("getAllContexts")}function z(t,e=!1,i){var o=Tt={p:Tt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};Or&&!e&&(Tt.l={s:null,u:null,r1:[],r2:Ui(!1)}),sn(()=>{o.d=!0}),Te&&(Tt.function=i,rn=i)}function q(t){var s,d;let e=Tt;if(e!==null){t!==void 0&&(e.x=t);let l=e.e;if(l!==null){var i=wt,o=Bt;e.e=null;try{for(var n=0;n<l.length;n++){var a=l[n];lo(a.effect),$o(a.reaction),bn(a.fn)}}finally{lo(i),$o(o)}}Tt=e.p,Te&&(rn=(d=(s=e.p)==null?void 0:s.function)!=null?d:null),e.m=!0}return t||{}}function Fr(){return!Or||Tt!==null&&Tt.l===null}function dp(t){var e;return Tt===null&&Da(t),(e=Tt.c)!=null?e:Tt.c=new Map(C0(Tt)||void 0)}function C0(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var T0=/\r/g;function lg(t){t=t.replace(T0,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function dg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var k0=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function cg(t){return k0.includes(t)}var I0=["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 E0={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function ug(t){var e;return t=t.toLowerCase(),(e=E0[t])!=null?e:t}var dw=[...I0,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var P0=["touchstart","touchmove"];function pg(t){return P0.includes(t)}var A0=["textarea","script","style","title"];function fg(t){return A0.includes(t)}function cp(t){return t==null?void 0:t.replace(/\//g,"/\u200B")}var mg=new Map;function vg(t,e){var i=mg.get(t);i||(i=new Set,mg.set(t,i)),i.add(e)}function up(t,e){if(e){let i=document.body;t.autofocus=!0,Xo(()=>{document.activeElement===i&&t.focus()})}}function Dl(t){var e=Bt,i=wt;$o(null),lo(null);try{return t()}finally{$o(e),lo(i)}}var pp=new Set,Sc=new Set;function Ws(t){if(!je)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 fp(t,e,i,o={}){function n(a){if(o.capture||Fa.call(e,a),!a.cancelBubble)return Dl(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Xo(()=>{e.addEventListener(t,n,o)}):e.addEventListener(t,n,o),n}function It(t,e,i,o,n){var a={capture:o,passive:n},s=fp(t,e,i,a);(e===document.body||e===window||e===document)&&sn(()=>{e.removeEventListener(t,s,a)})}function st(t){for(var e=0;e<t.length;e++)pp.add(t[e]);for(var i of Sc)i(t)}function Fa(t){var P;var e=this,i=e.ownerDocument,o=t.type,n=((P=t.composedPath)==null?void 0:P.call(t))||[],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 p=n.indexOf(e);if(p===-1)return;l<=p&&(s=l)}if(a=n[s]||t.target,a!==e){ao(t,"currentTarget",{configurable:!0,get(){return a||i}});var f=Bt,_=wt;$o(null),lo(null);try{for(var u,$=[];a!==null;){var w=a.assignedSlot||a.parentNode||a.host||null;try{var y=a["__"+o];if(y!=null&&(!a.disabled||t.target===a))if(wr(y)){var[S,...k]=y;S.apply(a,[t,...k])}else y.call(a,t)}catch(A){u?$.push(A):u=A}if(t.cancelBubble||w===e||w===null)break;a=w}if(u){for(let A of $)queueMicrotask(()=>{throw A});throw u}}finally{t.__root=e,delete t.currentTarget,$o(f),lo(_)}}}var L0;function gg(){L0=void 0}function Ua(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function wo(t,e){var i=wt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,n,a=!t.startsWith("<!>");return()=>{if(je)return wo(mt,null),mt;n===void 0&&(n=Ua(a?t:"<!>"+t),i||(n=vi(n)));var s=o||Il?document.importNode(n,!0):n.cloneNode(!0);if(i){var d=vi(s),l=s.lastChild;wo(d,l)}else wo(s,s);return s}}function be(t,e,i="svg"){var o=!t.startsWith("<!>"),n=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,s;return()=>{if(je)return wo(mt,null),mt;if(!s){var d=Ua(a),l=vi(d);if(n)for(s=document.createDocumentFragment();vi(l);)s.appendChild(vi(l));else s=vi(l)}var p=s.cloneNode(!0);if(n){var f=vi(p),_=p.lastChild;wo(f,_)}else wo(p,p);return p}}function ar(t=""){if(!je){var e=on(t+"");return wo(e,e),e}var i=mt;return i.nodeType!==3&&(i.before(i=on()),mi(i)),wo(i,i),i}function Fe(){if(je)return wo(mt,null),mt;var t=document.createDocumentFragment(),e=document.createComment(""),i=on();return t.append(e,i),wo(e,i),t}function b(t,e){if(je){wt.nodes_end=mt,Ni();return}t!==null&&t.before(e)}var Ol=!0;function Cc(t){Ol=t}function ve(t,e){var o;var i=e==null?"":typeof e=="object"?e+"":e;i!==((o=t.__t)!=null?o:t.__t=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function ts(t,e){return _g(t,e)}function vp(t,e){var s;pc(),e.intro=(s=e.intro)!=null?s:!1;let i=e.target,o=je,n=mt;try{for(var a=vi(i);a&&(a.nodeType!==8||a.data!==ps);)a=Vo(a);if(!a)throw Qr;uo(!0),mi(a),Ni();let d=_g(t,{...e,anchor:a});if(mt===null||mt.nodeType!==8||mt.data!==Rs)throw Fs(),Qr;return uo(!1),d}catch(d){if(d===Qr)return e.recover===!1&&Tv(),pc(),El(i),uo(!1),ts(t,e);throw d}finally{uo(o),mi(n),gg()}}var za=new Map;function _g(t,{target:e,anchor:i,props:o={},events:n,context:a,intro:s=!0}){pc();var d=new Set,l=_=>{for(var u=0;u<_.length;u++){var $=_[u];if(!d.has($)){d.add($);var w=pg($);e.addEventListener($,Fa,{passive:w});var y=za.get($);y===void 0?(document.addEventListener($,Fa,{passive:w}),za.set($,1)):za.set($,y+1)}}};l(wl(pp)),Sc.add(l);var p=void 0,f=rg(()=>{var _=i!=null?i:e.appendChild(on());return zi(()=>{if(a){z({});var u=Tt;u.c=a}n&&(o.$$events=n),je&&wo(_,null),Ol=s,p=t(_,o)||{},Ol=!0,je&&(wt.nodes_end=mt),a&&q()}),()=>{var w;for(var u of d){e.removeEventListener(u,Fa);var $=za.get(u);--$===0?(document.removeEventListener(u,Fa),za.delete(u)):za.set(u,$)}Sc.delete(l),_!==i&&((w=_.parentNode)==null||w.removeChild(_))}});return mp.set(p,f),p}var mp=new WeakMap;function Ks(t,e){let i=mp.get(t);return i?(mp.delete(t),i(e)):(Te&&Uv(),Promise.resolve())}function R(t,e,[i,o]=[0,0]){je&&i===0&&Ni();var n=t,a=null,s=null,d=Pi,l=i>0?65536:0,p=!1;let f=(u,$=!0)=>{p=!0,_($,u)},_=(u,$)=>{if(d===(d=u))return;let w=!1;if(je&&o!==-1){if(i===0){let S=n.data;S===ps?o=0:S===Vs?o=1/0:(o=parseInt(S.substring(1)),o!==o&&(o=d?1/0:-1))}let y=o>i;!!d===y&&(n=La(),mi(n),uo(!1),w=!0,o=-1)}d?(a?es(a):$&&(a=zi(()=>$(n))),s&&$n(s,()=>{s=null})):(s?es(s):$&&(s=zi(()=>$(n,[i+1,o]))),a&&$n(a,()=>{a=null})),w&&uo(!0)};po(()=>{p=!1,e(f),p||_(null,null)},l),je&&(n=mt)}function Qs(t,e,i){je&&Ni();var o=t,n=Pi,a,s=Fr()?$v:ka;po(()=>{s(n,n=e())&&(a&&$n(a),a=zi(()=>i(o)))}),je&&(o=mt)}var hs=null;function _p(t){hs=t}function Hl(t,e){return e}function B0(t,e,i,o){for(var n=[],a=e.length,s=0;s<a;s++)yc(e[s].e,n,!0);var d=a>0&&n.length===0&&i!==null;if(d){var l=i.parentNode;El(l),l.append(i),o.clear(),gs(t,e[0].prev,e[a-1].next)}rp(n,()=>{for(var p=0;p<a;p++){var f=e[p];d||(o.delete(f.k),gs(t,f.prev,f.next)),co(f.e,!d)}})}function yi(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 p=t;s=je?mi(vi(p)):p.appendChild(on())}je&&Ni();var f=null,_=!1,u=Tr(()=>{var $=i();return wr($)?$:$==null?[]:wl($)});po(()=>{var $=r(u),w=$.length;if(_&&w===0)return;_=w===0;let y=!1;if(je){var S=s.data===Vs;S!==(w===0)&&(s=La(),mi(s),uo(!1),y=!0)}if(je){for(var k=null,P,A=0;A<w;A++){if(mt.nodeType===8&&mt.data===Rs){s=mt,y=!0,uo(!1);break}var E=$[A],T=o(E,A);P=yg(mt,d,k,null,E,T,A,n,e,i),d.items.set(T,P),k=P}w>0&&mi(La())}je||D0($,d,s,n,e,o,i),a!==null&&(w===0?f?es(f):f=zi(()=>a(s)):f!==null&&$n(f,()=>{f=null})),y&&uo(!0),r(u)}),je&&(s=mt)}function D0(t,e,i,o,n,a,s){var le,Ve,Ae,J;var d=(n&8)!==0,l=(n&3)!==0,p=t.length,f=e.items,_=e.first,u=_,$,w=null,y,S=[],k=[],P,A,E,T;if(d)for(T=0;T<p;T+=1)P=t[T],A=a(P,T),E=f.get(A),E!==void 0&&((le=E.a)==null||le.measure(),(y!=null?y:y=new Set).add(E));for(T=0;T<p;T+=1){if(P=t[T],A=a(P,T),E=f.get(A),E===void 0){var V=u?u.e.nodes_start:i;w=yg(V,e,w,w===null?e.first:w.next,P,A,T,o,n,s),f.set(A,w),S=[],k=[],u=w.next;continue}if(l&&O0(E,P,T,n),(E.e.f&8192)!==0&&(es(E.e),d&&((Ve=E.a)==null||Ve.unfix(),(y!=null?y:y=new Set).delete(E))),E!==u){if($!==void 0&&$.has(E)){if(S.length<k.length){var U=k[0],G;w=U.prev;var F=S[0],Y=S[S.length-1];for(G=0;G<S.length;G+=1)bg(S[G],U,i);for(G=0;G<k.length;G+=1)$.delete(k[G]);gs(e,F.prev,Y.next),gs(e,w,F),gs(e,Y,U),u=U,w=Y,T-=1,S=[],k=[]}else $.delete(E),bg(E,u,i),gs(e,E.prev,E.next),gs(e,E,w===null?e.first:w.next),gs(e,w,E),w=E;continue}for(S=[],k=[];u!==null&&u.k!==A;)(u.e.f&8192)===0&&($!=null?$:$=new Set).add(u),k.push(u),u=u.next;if(u===null)continue;E=u}S.push(E),w=E,u=E.next}if(u!==null||$!==void 0){for(var X=$===void 0?[]:wl($);u!==null;)(u.e.f&8192)===0&&X.push(u),u=u.next;var oe=X.length;if(oe>0){var pe=(n&4)!==0&&p===0?i:null;if(d){for(T=0;T<oe;T+=1)(Ae=X[T].a)==null||Ae.measure();for(T=0;T<oe;T+=1)(J=X[T].a)==null||J.fix()}B0(e,X,pe,f)}}d&&Xo(()=>{var Me;if(y!==void 0)for(E of y)(Me=E.a)==null||Me.apply()}),wt.first=e.first&&e.first.e,wt.last=w&&w.e}function O0(t,e,i,o){(o&1)!==0&&Pa(t.v,e),(o&2)!==0?Pa(t.i,i):t.i=i}function yg(t,e,i,o,n,a,s,d,l,p){var f=hs,_=(l&1)!==0,u=(l&16)===0,$=_?u?Xr(n):Ui(n):n,w=(l&2)===0?s:Ui(s);Te&&_&&($.debug=()=>{var S=typeof w=="number"?s:w.v;p()[S]});var y={i:w,v:$,k:a,a:null,e:null,prev:i,next:o};hs=y;try{return y.e=zi(()=>d(t,$,w,p),je),y.e.prev=i&&i.e,y.e.next=o&&o.e,i===null?e.first=y:(i.next=y,i.e.next=y.e),o!==null&&(o.prev=y,o.e.prev=y.e),y}finally{hs=f}}function bg(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=Vo(a);n.before(a),a=s}}function gs(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 H0(t,e,i){var a,s;if(!e||e===lg(String(i!=null?i:"")))return;let o,n=(a=t.__svelte_meta)==null?void 0:a.loc;n?o=`near ${n.file}:${n.line}:${n.column}`:(s=rn)!=null&&s[fi]&&(o=`in ${rn[fi]}`),Fv(cp(o))}function Fl(t,e,i,o,n){var a=t,s="",d;po(()=>{var l;if(s===(s=(l=e())!=null?l:"")){je&&Ni();return}d!==void 0&&(co(d),d=void 0),s!==""&&(d=zi(()=>{if(je){for(var p=mt.data,f=Ni(),_=f;f!==null&&(f.nodeType!==8||f.data!=="");)_=f,f=Vo(f);if(f===null)throw Fs(),Qr;Te&&!n&&H0(f.parentNode,p,s),wo(mt,_),a=mi(f);return}var u=s+"";i?u=`<svg>${u}</svg>`:o&&(u=`<math>${u}</math>`);var $=Ua(u);if((i||o)&&($=vi($)),wo(vi($),$.lastChild),i||o)for(;vi($);)a.before(vi($));else a.before($)}))})}function ge(t,e,...i){var o=t,n=ie,a;po(()=>{n!==(n=e())&&(a&&(co(a),a=null),Te&&n==null&&kv(),a=zi(()=>n(o,...i)))},65536),je&&(o=mt)}function xi(t,e,i){je&&Ni();var o=t,n,a;po(()=>{n!==(n=e())&&(a&&($n(a),a=null),n&&(a=zi(()=>i(o,n))))},65536),je&&(o=mt)}function Ul(t,e,i,o,n,a){var w;let s=je;je&&Ni();var d=Te&&a&&((w=Tt)==null?void 0:w.function[fi]),l,p,f=null;je&&mt.nodeType===1&&(f=mt,Ni());var _=je?mt:t,u,$=hs;po(()=>{let y=e()||null;var S=n?n():i||y==="svg"?Bu:null;if(y!==l){var k=hs;_p($),u&&(y===null?$n(u,()=>{u=null,p=null}):y===p?es(u):(co(u),Cc(!1))),y&&y!==p&&(u=zi(()=>{if(f=je?f:S?document.createElementNS(S,y):document.createElement(y),Te&&a&&(f.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),wo(f,f),o){je&&fg(y)&&f.append(document.createComment(""));var P=je?vi(f):f.appendChild(on());je&&(P===null?uo(!1):mi(P)),o(f,P)}wt.nodes_end=f,_.before(f)})),l=y,l&&(p=l),Cc(!0),_p(k)}},65536),s&&(uo(!0),mi(_))}var $p;function xg(t){return $p=t.target,new bp(t)}var is,lr,bp=class{constructor(e){us(this,is);us(this,lr);var a,s;var i=new Map,o=(d,l)=>{var p=Xr(l);return i.set(d,p),p};let n=new Proxy({...e.props||{},$$events:{}},{get(d,l){var p;return r((p=i.get(l))!=null?p:o(l,Reflect.get(d,l)))},has(d,l){var p;return l===xl?!0:(r((p=i.get(l))!=null?p:o(l,Reflect.get(d,l))),Reflect.has(d,l))},set(d,l,p){var f;return O((f=i.get(l))!=null?f:o(l,p),p),Reflect.set(d,l,p)}});Ta(this,lr,(e.hydrate?vp:ts)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((s=e==null?void 0:e.props)!=null&&s.$$host)||e.sync===!1)&&Na(),Ta(this,is,n.$$events);for(let d of Object.keys(Ei(this,lr)))d==="$set"||d==="$destroy"||d==="$on"||ao(this,d,{get(){return Ei(this,lr)[d]},set(l){Ei(this,lr)[d]=l},enumerable:!0});Ei(this,lr).$set=d=>{Object.assign(n,d)},Ei(this,lr).$destroy=()=>{Ks(Ei(this,lr))}}$set(e){Ei(this,lr).$set(e)}$on(e,i){Ei(this,is)[e]=Ei(this,is)[e]||[];let o=(...n)=>i.call(this,...n);return Ei(this,is)[e].push(o),()=>{Ei(this,is)[e]=Ei(this,is)[e].filter(n=>n!==o)}}$destroy(){Ei(this,lr).$destroy()}};is=new WeakMap,lr=new WeakMap;function K(t,e){Xo(()=>{var n,a,s;var i=t.getRootNode(),o=i.host?i:(s=(n=i.head)!=null?n:i.ownerDocument.head)!=null?s:(a=$p)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Te&&vg(e.hash,d)}})}function wg(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=wg(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function Sg(){for(var t,e,i=0,o="",n=arguments.length;i<n;i++)(t=arguments[i])&&(e=wg(t))&&(o&&(o+=" "),o+=e);return o}function zl(t){return typeof t=="object"?Sg(t):t!=null?t:""}var Cg=[...`
|
|
48
|
-
\r\f\xA0\v\uFEFF`];function kg(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||Cg.includes(o[s-1]))&&(d===o.length||Cg.includes(o[d]))?o=(s===0?"":o.substring(0,s))+o.substring(d+1):s=d}}return o===""?null:o}function Tg(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 yp(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Ig(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(yp)),n&&l.push(...Object.keys(n).map(yp));var p=0,f=-1;let y=t.length;for(var _=0;_<y;_++){var u=t[_];if(d?u==="/"&&t[_-1]==="*"&&(d=!1):a?a===u&&(a=!1):u==="/"&&t[_+1]==="*"?d=!0:u==='"'||u==="'"?a=u:u==="("?s++:u===")"&&s--,!d&&a===!1&&s===0){if(u===":"&&f===-1)f=_;else if(u===";"||_===y-1){if(f!==-1){var $=yp(t.substring(p,f).trim());if(!l.includes($)){u!==";"&&_++;var w=t.substring(p,_).trim();i+=" "+w+";"}}p=_+1,f=-1}}}}return o&&(i+=Tg(o)),n&&(i+=Tg(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function te(t,e,i,o,n,a){var s=t.__className;if(je||s!==i){var d=kg(i,o,a);(!je||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&n!==a)for(var l in a){var p=!!a[l];(n==null||p!==!!n[l])&&t.classList.toggle(l,p)}return a}function xp(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(je||n!==e){var a=Ig(e,o);(!je||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(xp(t,i==null?void 0:i[0],o[0]),xp(t,i==null?void 0:i[1],o[1],"important")):xp(t,i,o));return o}var qa=Symbol("class"),Wa=Symbol("style"),Ag=Symbol("is custom element"),Mg=Symbol("is html");function Lg(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Oe(t,e,i,o){var n=Vg(t);if(je&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||Q0(t,e,i!=null?i:"");return}n[e]!==(n[e]=i)&&(e==="loading"&&(t[vv]=i),i==null?t.removeAttribute(e):typeof i!="string"&&Rg(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function we(t,e,i,o,n=!1){var E;var a=Vg(t),s=a[Ag],d=!a[Mg];let l=je&&s;l&&uo(!1);var p=e||{},f=t.tagName==="OPTION";for(var _ in e)_ in i||(i[_]=null);i.class?i.class=zl(i.class):(o||i[qa])&&(i.class=null),i[Wa]&&((E=i.style)!=null||(i.style=null));var u=Rg(t);for(let T in i){let V=i[T];if(f&&T==="value"&&V==null){t.value=t.__value="",p[T]=V;continue}if(T==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";te(t,$,V,o,e==null?void 0:e[qa],i[qa]),p[T]=V,p[qa]=i[qa];continue}if(T==="style"){tt(t,V,e==null?void 0:e[Wa],i[Wa]),p[T]=V,p[Wa]=i[Wa];continue}var w=p[T];if(V!==w){p[T]=V;var y=T[0]+T[1];if(y!=="$$")if(y==="on"){let U={},G="$$"+T,F=T.slice(2);var S=cg(F);if(dg(F)&&(F=F.slice(0,-7),U.capture=!0),!S&&w){if(V!=null)continue;t.removeEventListener(F,p[G],U),p[G]=null}if(V!=null)if(S)t[`__${F}`]=V,st([F]);else{let Y=function(X){p[T].call(this,X)};var A=Y;p[G]=fp(F,t,Y,U)}else S&&(t[`__${F}`]=void 0)}else if(T==="style")Oe(t,T,V);else if(T==="autofocus")up(t,!!V);else if(!s&&(T==="__value"||T==="value"&&V!=null))t.value=t.__value=V;else if(T==="selected"&&f)Lg(t,V);else{var k=T;d||(k=ug(k));var P=k==="defaultValue"||k==="defaultChecked";if(V==null&&!s&&!P)if(a[T]=null,k==="value"||k==="checked"){let U=t,G=e===void 0;if(k==="value"){let F=U.defaultValue;U.removeAttribute(k),U.defaultValue=F,U.value=U.__value=G?F:null}else{let F=U.defaultChecked;U.removeAttribute(k),U.defaultChecked=F,U.checked=G?F:!1}}else t.removeAttribute(T);else P||u.includes(k)&&(s||typeof V!="string")?t[k]=V:typeof V!="function"&&Oe(t,k,V,n)}}}return l&&uo(!0),p}function Vg(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[Ag]:t.nodeName.includes("-"),[Mg]:t.namespaceURI===uv}}var Eg=new Map;function Rg(t){var e=Eg.get(t.nodeName);if(e)return e;Eg.set(t.nodeName,e=[]);for(var i,o=t,n=Element.prototype;n!==o;){i=sc(o);for(var a in i)i[a].set&&e.push(a);o=Yr(o)}return e}function Q0(t,e,i){var o;Te&&(e==="srcset"&&G0(t,i)||wp((o=t.getAttribute(e))!=null?o:"",i)||Hv(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function wp(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function Pg(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function G0(t,e){var i=Pg(t.srcset),o=Pg(e);return o.length===i.length&&o.every(([n,a],s)=>a===i[s][1]&&(wp(i[s][0],n)||wp(n,i[s][0])))}var Y0=rc?()=>performance.now():()=>Date.now(),Ir={tick:t=>(rc?requestAnimationFrame:ie)(t),now:()=>Y0(),tasks:new Set};function Ng(){let t=Ir.now();Ir.tasks.forEach(e=>{e.c(t)||(Ir.tasks.delete(e),e.f())}),Ir.tasks.size!==0&&Ir.tick(Ng)}function Bg(t){let e;return Ir.tasks.size===0&&Ir.tick(Ng),{promise:new Promise(i=>{Ir.tasks.add(e={c:t,f:i})}),abort(){Ir.tasks.delete(e)}}}function Tc(t,e){Dl(()=>{t.dispatchEvent(new CustomEvent(e))})}function J0(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 Dg(t){let e={},i=t.split(";");for(let o of i){let[n,a]=o.split(":");if(!n||a===void 0)break;let s=J0(n.trim());e[s]=a.trim()}return e}var e_=t=>t;function Cp(t,e,i,o){var A;var n=(t&1)!==0,a=(t&2)!==0,s=n&&a,d=(t&4)!==0,l=s?"both":n?"in":"out",p,f=e.inert,_=e.style.overflow,u,$;function w(){var V;var E=Bt,T=wt;$o(null),lo(null);try{return p!=null?p:p=i()(e,(V=o==null?void 0:o())!=null?V:{},{direction:l})}finally{$o(E),lo(T)}}var y={is_global:d,in(){var E;if(e.inert=f,!n){$==null||$.abort(),(E=$==null?void 0:$.reset)==null||E.call($);return}a||u==null||u.abort(),Tc(e,"introstart"),u=Sp(e,w(),$,1,()=>{Tc(e,"introend"),u==null||u.abort(),u=p=void 0,e.style.overflow=_})},out(E){if(!a){E==null||E(),p=void 0;return}e.inert=!0,Tc(e,"outrostart"),$=Sp(e,w(),u,0,()=>{Tc(e,"outroend"),E==null||E()})},stop:()=>{u==null||u.abort(),$==null||$.abort()}},S=wt;if(((A=S.transitions)!=null?A:S.transitions=[]).push(y),n&&Ol){var k=d;if(!k){for(var P=S.parent;P&&(P.f&65536)!==0;)for(;(P=P.parent)&&(P.f&16)===0;);k=!P||(P.f&32768)!==0}k&&bn(()=>{$t(()=>y.in())})}}function Sp(t,e,i,o,n){var a=o===1;if(fs(e)){var s,d=!1;return Xo(()=>{if(!d){var S=e({direction:a?"in":"out"});s=Sp(t,S,i,o,n)}}),{abort:()=>{d=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return n(),{abort:ie,deactivate:ie,reset:ie,t:()=>o};let{delay:l=0,css:p,tick:f,easing:_=e_}=e;var u=[];if(a&&i===void 0&&(f&&f(0,1),p)){var $=Dg(p(0,1));u.push($,$)}var w=()=>1-o,y=t.animate(u,{duration:l});return y.onfinish=()=>{var F;var S=(F=i==null?void 0:i.t())!=null?F:1-o;i==null||i.abort();var k=o-S,P=e.duration*Math.abs(k),A=[];if(P>0){var E=!1;if(p)for(var T=Math.ceil(P/16.666666666666668),V=0;V<=T;V+=1){var U=S+k*_(V/T),G=Dg(p(U,1-U));A.push(G),E||(E=G.overflow==="hidden")}E&&(t.style.overflow="hidden"),w=()=>{var Y=y.currentTime;return S+k*_(Y/P)},f&&Bg(()=>{if(y.playState!=="running")return!1;var Y=w();return f(Y,1-Y),!0})}y=t.animate(A,{duration:P,fill:"forwards"}),y.onfinish=()=>{w=()=>o,f==null||f(o,1-o),n()}},{abort:()=>{y&&(y.cancel(),y.effect=null,y.onfinish=ie)},deactivate:()=>{n=ie},reset:()=>{o===0&&(f==null||f(1,0))},t:()=>w()}}var _s,Ka,ql,Ic,Og,Ec=class Ec{constructor(e){us(this,Ic);us(this,_s,new WeakMap);us(this,Ka);us(this,ql);Ta(this,ql,e)}observe(e,i){var o=Ei(this,_s).get(e)||new Set;return o.add(i),Ei(this,_s).set(e,o),dv(this,Ic,Og).call(this).observe(e,Ei(this,ql)),()=>{var n=Ei(this,_s).get(e);n.delete(i),n.size===0&&(Ei(this,_s).delete(e),Ei(this,Ka).unobserve(e))}}};_s=new WeakMap,Ka=new WeakMap,ql=new WeakMap,Ic=new WeakSet,Og=function(){var e;return(e=Ei(this,Ka))!=null?e:Ta(this,Ka,new ResizeObserver(i=>{for(var o of i){Ec.entries.set(o.target,o);for(var n of Ei(this,_s).get(o.target)||[])n(o)}}))},On(Ec,"entries",new WeakMap);var Tp=Ec;var o_=new Tp({box:"border-box"});function Ur(t,e,i){var o=o_.observe(t,()=>i(t[e]));bn(()=>($t(()=>i(t[e])),o))}function Hg(t,e){return t===e||(t==null?void 0:t[Uo])===e}function ct(t={},e,i,o){return bn(()=>{var n,a;return xo(()=>{n=a,a=(o==null?void 0:o())||[],$t(()=>{t!==i(...a)&&(e(t,...a),n&&Hg(i(...n),t)&&e(null,...n))})}),()=>{Xo(()=>{a&&Hg(i(...a),t)&&e(null,...a)})}}),t}function Er(t=!1){let e=Tt,i=e.l.u;if(!i)return;let o=()=>_c(e.s);if(t){let n=0,a={},s=m(()=>{let d=!1,l=e.s;for(let p in l)l[p]!==a[p]&&(a[p]=l[p],d=!0);return d&&n++,n});o=()=>r(s)}i.b.length&&Ba(()=>{Fg(e,o),ms(i.b)}),qe(()=>{let n=$t(()=>i.m.map(_v));return()=>{for(let a of n)typeof a=="function"&&a()}}),i.a.length&&qe(()=>{Fg(e,o),ms(i.a)})}function Fg(t,e){if(t.l.s)for(let i of t.l.s)r(i);e()}if(Te){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;Pv(e)},set:o=>{i=o}})}};r_=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var r_;function Ft(t){Tt===null&&Da("onMount"),Or&&Tt.l!==null?n_(Tt).m.push(t):qe(()=>{let e=$t(t);if(typeof e=="function")return e})}function yn(t){Tt===null&&Da("onDestroy"),Ft(()=>()=>$t(t))}function n_(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}function Wl(t,e,i){if(t==null)return e(void 0),i&&i(void 0),ie;let o=$t(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Qa=[];function dr(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=ie){let i=null,o=new Set;function n(d){if(ka(t,d)&&(t=d,i)){let l=!Qa.length;for(let p of o)p[1](),Qa.push(p,t);if(l){for(let p=0;p<Qa.length;p+=2)Qa[p][0](Qa[p+1]);Qa.length=0}}}function a(d){n(d(t))}function s(d,l=ie){let p=[d,l];return o.add(p),o.size===1&&(i=e(n,a)||ie),d(t),()=>{o.delete(p),o.size===0&&i&&(i(),i=null)}}return{set:n,update:a,subscribe:s}}function gi(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 dr(i,(s,d)=>{let l=!1,p=[],f=0,_=ie,u=()=>{if(f)return;_();let w=e(o?p[0]:p,s,d);a?s(w):_=typeof w=="function"?w:ie},$=n.map((w,y)=>Wl(w,S=>{p[y]=S,f&=~(1<<y),l&&u()},()=>{f|=1<<y}));return l=!0,u(),function(){ms($),_(),l=!1}})}function ye(t){let e;return Wl(t,i=>e=i)(),e}var Pc=!1,kp=Symbol();function C(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:Xr(void 0),unsubscribe:ie};if(o.store!==t&&!(kp in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=ie;else{var n=!0;o.unsubscribe=Wl(t,s=>{n?o.source.v=s:O(o.source,s)}),n=!1}return t&&kp in i?ye(t):r(o.source)}function He(){let t={};function e(){sn(()=>{for(var i in t)t[i].unsubscribe();ao(t,kp,{enumerable:!1,value:!0})})}return[t,e]}function Ip(t){var e=Pc;try{return Pc=!1,[t(),Pc]}finally{Pc=e}}var p_={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Te&&Ev(`${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 ke(t,e,i){return new Proxy(Te?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},p_)}var f_={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(fs(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];fs(n)&&(n=n());let a=Hn(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(fs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let n=Hn(o,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===Uo||e===xl)return!1;for(let i of t.props)if(fs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props){fs(i)&&(i=i());for(let o in i)e.includes(o)||e.push(o)}return e}};function os(...t){return new Proxy({props:t},f_)}function Ug(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function v(t,e,i,o){var U,G;var n=(i&1)!==0,a=!Or||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,l=!1,p;s?[p,l]=Ip(()=>t[e]):p=t[e];var f=Uo in t||xl in t,_=s&&((G=(U=Hn(t,e))==null?void 0:U.set)!=null?G:f&&e in t&&(F=>t[e]=F))||void 0,u=o,$=!0,w=!1,y=()=>(w=!0,$&&($=!1,d?u=$t(o):u=o),u);p===void 0&&o!==void 0&&(_&&a&&Iv(e),p=y(),_&&_(p));var S;if(a)S=()=>{var F=t[e];return F===void 0?y():($=!0,w=!1,F)};else{var k=(n?m:Tr)(()=>t[e]);k.f|=131072,S=()=>{var F=r(k);return F!==void 0&&(u=void 0),F===void 0?u:F}}if((i&4)===0)return S;if(_){var P=t.$$legacy;return function(F,Y){return arguments.length>0?((!a||!Y||P||l)&&_(Y?S():F),F):S()}}var A=!1,E=!1,T=Xr(p),V=m(()=>{var F=S(),Y=r(T);return A?(A=!1,E=!0,Y):(E=!1,T.v=F)});return s&&r(V),n||(V.equals=Ia),function(F,Y){if(Tl!==null&&(A=E,S(),r(T)),arguments.length>0){let X=Y?r(V):a&&s?me(F):F;if(!V.equals(X)){if(A=!0,O(T,X),w&&u!==void 0&&(u=X),Ug(V))return F;$t(()=>r(V))}return F}return Ug(V)?V.v:r(V)}}var m_;typeof HTMLElement=="function"&&(m_=class extends HTMLElement{constructor(e,i,o){super();On(this,"$$ctor");On(this,"$$s");On(this,"$$c");On(this,"$$cn",!1);On(this,"$$d",{});On(this,"$$r",!1);On(this,"$$p_d",{});On(this,"$$l",{});On(this,"$$l_u",new Map);On(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let n=this.$$c.$on(e,i);this.$$l_u.set(i,n)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let n=this.$$l_u.get(i);n&&(n(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(a){return s=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(s,d)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let o={},n=v_(this);for(let a of this.$$s)a in n&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let s=this.$$g_p(a.name);s in this.$$d||(this.$$d[s]=Ep(s,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=xg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=$c(()=>{xo(()=>{var a;this.$$r=!0;for(let s of Du(this.$$c)){if(!((a=this.$$p_d[s])!=null&&a.reflect))continue;this.$$d[s]=this.$$c[s];let d=Ep(s,this.$$d[s],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,d)}this.$$r=!1})});for(let a in this.$$l)for(let s of this.$$l[a]){let d=this.$$c.$on(a,s);this.$$l_u.set(s,d)}this.$$l={}}}attributeChangedCallback(e,i,o){var n;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ep(e,o,this.$$p_d,"toProp"),(n=this.$$c)==null||n.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Du(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function Ep(t,e,i,o){var a;let n=(a=i[t])==null?void 0:a.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?null:e;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 v_(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var zg="5";var qg,Wg,Kg;typeof window!="undefined"&&((Kg=(Wg=(qg=window.__svelte)!=null?qg:window.__svelte={}).v)!=null?Kg:Wg.v=new Set).add(zg);var _u=require("@vkontakte/videoplayer-core/es2018"),XK=require("@vkontakte/videoplayer-core/es2018"),_a=require("@vkontakte/videoplayer-shared/es2018"),z1=require("@vkontakte/videoplayer-statistics/es2018");var Gs=require("@vkontakte/videoplayer-shared/es2018");var h_={isMobile:void 0,debugLog:!1,devNullLog:!1,defaultLanguage:Gs.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:Gs.VideoQuality.Q_480P,highQualityLimit:Gs.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,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,usePuid:!0},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}},Qg=t=>(0,Gs.fillWithDefault)(t,h_),Gg=t=>Ha("ui-config",t),Qt=()=>Oa("ui-config");var Kl="vk_player_debug_panel_opened";var Yg="videoplayer",jg="videoplayer";var zr={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Zg=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Xg=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Jg=new Set(["ShiftRight","ShiftLeft"]);var eh=["TIMELINE"],Ql=[...eh,"GRAPH_BUTTON"],Pp=[...eh,"PLAY_BUTTON"],Gl=[...Ql,"PLAY_BUTTON"];var Pr=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(Pr||{}),js={xs:0,s:1,m:2,l:3,xl:4};var Yl=require("@vkontakte/videoplayer-shared/es2018"),th=require("@vkontakte/videoplayer-core/es2018"),ih=require("@vkontakte/videoplayer-statistics/es2018");var Ac="prod",Zs="1.1.62-dev.b50ee8d3.0";var Xs=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var oh=Symbol("storeContext"),nh=Symbol("microStoresContext"),rh=(t,e)=>{Ha(oh,t),Ha(nh,e),Ac==="dev"&&(window.app={store:t,microStores:e})},Se=()=>{let t=Oa(oh);return(0,Yl.assertNonNullable)(t,"Store context is empty!"),t},fo=()=>{let t=Oa(nh);return(0,Yl.assertNonNullable)(t,"MicroStores context is empty!"),t},Yt=(t,e)=>Lc(t,t.getValue(),e),Lc=(t,e,i)=>dr(e,o=>{let n=t.subscribe(a=>{o(a),i==null||i(a)});return()=>n.unsubscribe()}),sh=(t,e,i)=>{var k,P,A,E,T,V;let o=t.info,{width:n,height:a}=ye(i.ui.playerSize),s=(P=(k=o.throughputEstimation$.getValue())==null?void 0:k.toFixed(0))!=null?P:0,d=(E=(A=o.rttEstimation$.getValue())==null?void 0:A.toFixed(0))!=null?E:0,l=o.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${Zs} (core: ${th.VERSION}, stat: ${ih.VERSION}, shared: ${Yl.VERSION})`,f=ye(i.state.errorLog$),_=f.length?`
|
|
48
|
+
\r\f\xA0\v\uFEFF`];function kg(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||Cg.includes(o[s-1]))&&(d===o.length||Cg.includes(o[d]))?o=(s===0?"":o.substring(0,s))+o.substring(d+1):s=d}}return o===""?null:o}function Tg(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 yp(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Ig(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(yp)),n&&l.push(...Object.keys(n).map(yp));var p=0,f=-1;let y=t.length;for(var _=0;_<y;_++){var u=t[_];if(d?u==="/"&&t[_-1]==="*"&&(d=!1):a?a===u&&(a=!1):u==="/"&&t[_+1]==="*"?d=!0:u==='"'||u==="'"?a=u:u==="("?s++:u===")"&&s--,!d&&a===!1&&s===0){if(u===":"&&f===-1)f=_;else if(u===";"||_===y-1){if(f!==-1){var $=yp(t.substring(p,f).trim());if(!l.includes($)){u!==";"&&_++;var w=t.substring(p,_).trim();i+=" "+w+";"}}p=_+1,f=-1}}}}return o&&(i+=Tg(o)),n&&(i+=Tg(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function te(t,e,i,o,n,a){var s=t.__className;if(je||s!==i){var d=kg(i,o,a);(!je||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&n!==a)for(var l in a){var p=!!a[l];(n==null||p!==!!n[l])&&t.classList.toggle(l,p)}return a}function xp(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(je||n!==e){var a=Ig(e,o);(!je||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(xp(t,i==null?void 0:i[0],o[0]),xp(t,i==null?void 0:i[1],o[1],"important")):xp(t,i,o));return o}var qa=Symbol("class"),Wa=Symbol("style"),Ag=Symbol("is custom element"),Mg=Symbol("is html");function Lg(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Oe(t,e,i,o){var n=Vg(t);if(je&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||Q0(t,e,i!=null?i:"");return}n[e]!==(n[e]=i)&&(e==="loading"&&(t[vv]=i),i==null?t.removeAttribute(e):typeof i!="string"&&Rg(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function we(t,e,i,o,n=!1){var E;var a=Vg(t),s=a[Ag],d=!a[Mg];let l=je&&s;l&&uo(!1);var p=e||{},f=t.tagName==="OPTION";for(var _ in e)_ in i||(i[_]=null);i.class?i.class=zl(i.class):(o||i[qa])&&(i.class=null),i[Wa]&&((E=i.style)!=null||(i.style=null));var u=Rg(t);for(let T in i){let V=i[T];if(f&&T==="value"&&V==null){t.value=t.__value="",p[T]=V;continue}if(T==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";te(t,$,V,o,e==null?void 0:e[qa],i[qa]),p[T]=V,p[qa]=i[qa];continue}if(T==="style"){tt(t,V,e==null?void 0:e[Wa],i[Wa]),p[T]=V,p[Wa]=i[Wa];continue}var w=p[T];if(V!==w){p[T]=V;var y=T[0]+T[1];if(y!=="$$")if(y==="on"){let U={},G="$$"+T,F=T.slice(2);var S=cg(F);if(dg(F)&&(F=F.slice(0,-7),U.capture=!0),!S&&w){if(V!=null)continue;t.removeEventListener(F,p[G],U),p[G]=null}if(V!=null)if(S)t[`__${F}`]=V,st([F]);else{let Y=function(X){p[T].call(this,X)};var A=Y;p[G]=fp(F,t,Y,U)}else S&&(t[`__${F}`]=void 0)}else if(T==="style")Oe(t,T,V);else if(T==="autofocus")up(t,!!V);else if(!s&&(T==="__value"||T==="value"&&V!=null))t.value=t.__value=V;else if(T==="selected"&&f)Lg(t,V);else{var k=T;d||(k=ug(k));var P=k==="defaultValue"||k==="defaultChecked";if(V==null&&!s&&!P)if(a[T]=null,k==="value"||k==="checked"){let U=t,G=e===void 0;if(k==="value"){let F=U.defaultValue;U.removeAttribute(k),U.defaultValue=F,U.value=U.__value=G?F:null}else{let F=U.defaultChecked;U.removeAttribute(k),U.defaultChecked=F,U.checked=G?F:!1}}else t.removeAttribute(T);else P||u.includes(k)&&(s||typeof V!="string")?t[k]=V:typeof V!="function"&&Oe(t,k,V,n)}}}return l&&uo(!0),p}function Vg(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[Ag]:t.nodeName.includes("-"),[Mg]:t.namespaceURI===uv}}var Eg=new Map;function Rg(t){var e=Eg.get(t.nodeName);if(e)return e;Eg.set(t.nodeName,e=[]);for(var i,o=t,n=Element.prototype;n!==o;){i=sc(o);for(var a in i)i[a].set&&e.push(a);o=Yr(o)}return e}function Q0(t,e,i){var o;Te&&(e==="srcset"&&G0(t,i)||wp((o=t.getAttribute(e))!=null?o:"",i)||Hv(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function wp(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function Pg(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function G0(t,e){var i=Pg(t.srcset),o=Pg(e);return o.length===i.length&&o.every(([n,a],s)=>a===i[s][1]&&(wp(i[s][0],n)||wp(n,i[s][0])))}var Y0=rc?()=>performance.now():()=>Date.now(),Ir={tick:t=>(rc?requestAnimationFrame:ie)(t),now:()=>Y0(),tasks:new Set};function Ng(){let t=Ir.now();Ir.tasks.forEach(e=>{e.c(t)||(Ir.tasks.delete(e),e.f())}),Ir.tasks.size!==0&&Ir.tick(Ng)}function Bg(t){let e;return Ir.tasks.size===0&&Ir.tick(Ng),{promise:new Promise(i=>{Ir.tasks.add(e={c:t,f:i})}),abort(){Ir.tasks.delete(e)}}}function Tc(t,e){Dl(()=>{t.dispatchEvent(new CustomEvent(e))})}function J0(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 Dg(t){let e={},i=t.split(";");for(let o of i){let[n,a]=o.split(":");if(!n||a===void 0)break;let s=J0(n.trim());e[s]=a.trim()}return e}var e_=t=>t;function Cp(t,e,i,o){var A;var n=(t&1)!==0,a=(t&2)!==0,s=n&&a,d=(t&4)!==0,l=s?"both":n?"in":"out",p,f=e.inert,_=e.style.overflow,u,$;function w(){var V;var E=Bt,T=wt;$o(null),lo(null);try{return p!=null?p:p=i()(e,(V=o==null?void 0:o())!=null?V:{},{direction:l})}finally{$o(E),lo(T)}}var y={is_global:d,in(){var E;if(e.inert=f,!n){$==null||$.abort(),(E=$==null?void 0:$.reset)==null||E.call($);return}a||u==null||u.abort(),Tc(e,"introstart"),u=Sp(e,w(),$,1,()=>{Tc(e,"introend"),u==null||u.abort(),u=p=void 0,e.style.overflow=_})},out(E){if(!a){E==null||E(),p=void 0;return}e.inert=!0,Tc(e,"outrostart"),$=Sp(e,w(),u,0,()=>{Tc(e,"outroend"),E==null||E()})},stop:()=>{u==null||u.abort(),$==null||$.abort()}},S=wt;if(((A=S.transitions)!=null?A:S.transitions=[]).push(y),n&&Ol){var k=d;if(!k){for(var P=S.parent;P&&(P.f&65536)!==0;)for(;(P=P.parent)&&(P.f&16)===0;);k=!P||(P.f&32768)!==0}k&&bn(()=>{$t(()=>y.in())})}}function Sp(t,e,i,o,n){var a=o===1;if(fs(e)){var s,d=!1;return Xo(()=>{if(!d){var S=e({direction:a?"in":"out"});s=Sp(t,S,i,o,n)}}),{abort:()=>{d=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return n(),{abort:ie,deactivate:ie,reset:ie,t:()=>o};let{delay:l=0,css:p,tick:f,easing:_=e_}=e;var u=[];if(a&&i===void 0&&(f&&f(0,1),p)){var $=Dg(p(0,1));u.push($,$)}var w=()=>1-o,y=t.animate(u,{duration:l});return y.onfinish=()=>{var F;var S=(F=i==null?void 0:i.t())!=null?F:1-o;i==null||i.abort();var k=o-S,P=e.duration*Math.abs(k),A=[];if(P>0){var E=!1;if(p)for(var T=Math.ceil(P/16.666666666666668),V=0;V<=T;V+=1){var U=S+k*_(V/T),G=Dg(p(U,1-U));A.push(G),E||(E=G.overflow==="hidden")}E&&(t.style.overflow="hidden"),w=()=>{var Y=y.currentTime;return S+k*_(Y/P)},f&&Bg(()=>{if(y.playState!=="running")return!1;var Y=w();return f(Y,1-Y),!0})}y=t.animate(A,{duration:P,fill:"forwards"}),y.onfinish=()=>{w=()=>o,f==null||f(o,1-o),n()}},{abort:()=>{y&&(y.cancel(),y.effect=null,y.onfinish=ie)},deactivate:()=>{n=ie},reset:()=>{o===0&&(f==null||f(1,0))},t:()=>w()}}var _s,Ka,ql,Ic,Og,Ec=class Ec{constructor(e){us(this,Ic);us(this,_s,new WeakMap);us(this,Ka);us(this,ql);Ta(this,ql,e)}observe(e,i){var o=Ei(this,_s).get(e)||new Set;return o.add(i),Ei(this,_s).set(e,o),dv(this,Ic,Og).call(this).observe(e,Ei(this,ql)),()=>{var n=Ei(this,_s).get(e);n.delete(i),n.size===0&&(Ei(this,_s).delete(e),Ei(this,Ka).unobserve(e))}}};_s=new WeakMap,Ka=new WeakMap,ql=new WeakMap,Ic=new WeakSet,Og=function(){var e;return(e=Ei(this,Ka))!=null?e:Ta(this,Ka,new ResizeObserver(i=>{for(var o of i){Ec.entries.set(o.target,o);for(var n of Ei(this,_s).get(o.target)||[])n(o)}}))},On(Ec,"entries",new WeakMap);var Tp=Ec;var o_=new Tp({box:"border-box"});function Ur(t,e,i){var o=o_.observe(t,()=>i(t[e]));bn(()=>($t(()=>i(t[e])),o))}function Hg(t,e){return t===e||(t==null?void 0:t[Uo])===e}function ct(t={},e,i,o){return bn(()=>{var n,a;return xo(()=>{n=a,a=(o==null?void 0:o())||[],$t(()=>{t!==i(...a)&&(e(t,...a),n&&Hg(i(...n),t)&&e(null,...n))})}),()=>{Xo(()=>{a&&Hg(i(...a),t)&&e(null,...a)})}}),t}function Er(t=!1){let e=Tt,i=e.l.u;if(!i)return;let o=()=>_c(e.s);if(t){let n=0,a={},s=m(()=>{let d=!1,l=e.s;for(let p in l)l[p]!==a[p]&&(a[p]=l[p],d=!0);return d&&n++,n});o=()=>r(s)}i.b.length&&Ba(()=>{Fg(e,o),ms(i.b)}),qe(()=>{let n=$t(()=>i.m.map(_v));return()=>{for(let a of n)typeof a=="function"&&a()}}),i.a.length&&qe(()=>{Fg(e,o),ms(i.a)})}function Fg(t,e){if(t.l.s)for(let i of t.l.s)r(i);e()}if(Te){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;Pv(e)},set:o=>{i=o}})}};r_=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var r_;function Ft(t){Tt===null&&Da("onMount"),Or&&Tt.l!==null?n_(Tt).m.push(t):qe(()=>{let e=$t(t);if(typeof e=="function")return e})}function yn(t){Tt===null&&Da("onDestroy"),Ft(()=>()=>$t(t))}function n_(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}function Wl(t,e,i){if(t==null)return e(void 0),i&&i(void 0),ie;let o=$t(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Qa=[];function dr(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=ie){let i=null,o=new Set;function n(d){if(ka(t,d)&&(t=d,i)){let l=!Qa.length;for(let p of o)p[1](),Qa.push(p,t);if(l){for(let p=0;p<Qa.length;p+=2)Qa[p][0](Qa[p+1]);Qa.length=0}}}function a(d){n(d(t))}function s(d,l=ie){let p=[d,l];return o.add(p),o.size===1&&(i=e(n,a)||ie),d(t),()=>{o.delete(p),o.size===0&&i&&(i(),i=null)}}return{set:n,update:a,subscribe:s}}function gi(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 dr(i,(s,d)=>{let l=!1,p=[],f=0,_=ie,u=()=>{if(f)return;_();let w=e(o?p[0]:p,s,d);a?s(w):_=typeof w=="function"?w:ie},$=n.map((w,y)=>Wl(w,S=>{p[y]=S,f&=~(1<<y),l&&u()},()=>{f|=1<<y}));return l=!0,u(),function(){ms($),_(),l=!1}})}function ye(t){let e;return Wl(t,i=>e=i)(),e}var Pc=!1,kp=Symbol();function C(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:Xr(void 0),unsubscribe:ie};if(o.store!==t&&!(kp in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=ie;else{var n=!0;o.unsubscribe=Wl(t,s=>{n?o.source.v=s:O(o.source,s)}),n=!1}return t&&kp in i?ye(t):r(o.source)}function He(){let t={};function e(){sn(()=>{for(var i in t)t[i].unsubscribe();ao(t,kp,{enumerable:!1,value:!0})})}return[t,e]}function Ip(t){var e=Pc;try{return Pc=!1,[t(),Pc]}finally{Pc=e}}var p_={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Te&&Ev(`${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 ke(t,e,i){return new Proxy(Te?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},p_)}var f_={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(fs(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];fs(n)&&(n=n());let a=Hn(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(fs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let n=Hn(o,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===Uo||e===xl)return!1;for(let i of t.props)if(fs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props){fs(i)&&(i=i());for(let o in i)e.includes(o)||e.push(o)}return e}};function os(...t){return new Proxy({props:t},f_)}function Ug(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function v(t,e,i,o){var U,G;var n=(i&1)!==0,a=!Or||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,l=!1,p;s?[p,l]=Ip(()=>t[e]):p=t[e];var f=Uo in t||xl in t,_=s&&((G=(U=Hn(t,e))==null?void 0:U.set)!=null?G:f&&e in t&&(F=>t[e]=F))||void 0,u=o,$=!0,w=!1,y=()=>(w=!0,$&&($=!1,d?u=$t(o):u=o),u);p===void 0&&o!==void 0&&(_&&a&&Iv(e),p=y(),_&&_(p));var S;if(a)S=()=>{var F=t[e];return F===void 0?y():($=!0,w=!1,F)};else{var k=(n?m:Tr)(()=>t[e]);k.f|=131072,S=()=>{var F=r(k);return F!==void 0&&(u=void 0),F===void 0?u:F}}if((i&4)===0)return S;if(_){var P=t.$$legacy;return function(F,Y){return arguments.length>0?((!a||!Y||P||l)&&_(Y?S():F),F):S()}}var A=!1,E=!1,T=Xr(p),V=m(()=>{var F=S(),Y=r(T);return A?(A=!1,E=!0,Y):(E=!1,T.v=F)});return s&&r(V),n||(V.equals=Ia),function(F,Y){if(Tl!==null&&(A=E,S(),r(T)),arguments.length>0){let X=Y?r(V):a&&s?me(F):F;if(!V.equals(X)){if(A=!0,O(T,X),w&&u!==void 0&&(u=X),Ug(V))return F;$t(()=>r(V))}return F}return Ug(V)?V.v:r(V)}}var m_;typeof HTMLElement=="function"&&(m_=class extends HTMLElement{constructor(e,i,o){super();On(this,"$$ctor");On(this,"$$s");On(this,"$$c");On(this,"$$cn",!1);On(this,"$$d",{});On(this,"$$r",!1);On(this,"$$p_d",{});On(this,"$$l",{});On(this,"$$l_u",new Map);On(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let n=this.$$c.$on(e,i);this.$$l_u.set(i,n)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let n=this.$$l_u.get(i);n&&(n(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(a){return s=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(s,d)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let o={},n=v_(this);for(let a of this.$$s)a in n&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let s=this.$$g_p(a.name);s in this.$$d||(this.$$d[s]=Ep(s,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=xg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=$c(()=>{xo(()=>{var a;this.$$r=!0;for(let s of Du(this.$$c)){if(!((a=this.$$p_d[s])!=null&&a.reflect))continue;this.$$d[s]=this.$$c[s];let d=Ep(s,this.$$d[s],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,d)}this.$$r=!1})});for(let a in this.$$l)for(let s of this.$$l[a]){let d=this.$$c.$on(a,s);this.$$l_u.set(s,d)}this.$$l={}}}attributeChangedCallback(e,i,o){var n;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ep(e,o,this.$$p_d,"toProp"),(n=this.$$c)==null||n.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Du(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function Ep(t,e,i,o){var a;let n=(a=i[t])==null?void 0:a.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?null:e;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 v_(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var zg="5";var qg,Wg,Kg;typeof window!="undefined"&&((Kg=(Wg=(qg=window.__svelte)!=null?qg:window.__svelte={}).v)!=null?Kg:Wg.v=new Set).add(zg);var _u=require("@vkontakte/videoplayer-core/es2018"),XK=require("@vkontakte/videoplayer-core/es2018"),_a=require("@vkontakte/videoplayer-shared/es2018"),z1=require("@vkontakte/videoplayer-statistics/es2018");var Gs=require("@vkontakte/videoplayer-shared/es2018");var h_={isMobile:void 0,debugLog:!1,devNullLog:!1,defaultLanguage:Gs.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:Gs.VideoQuality.Q_480P,highQualityLimit:Gs.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,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}},Qg=t=>(0,Gs.fillWithDefault)(t,h_),Gg=t=>Ha("ui-config",t),Qt=()=>Oa("ui-config");var Kl="vk_player_debug_panel_opened";var Yg="videoplayer",jg="videoplayer";var zr={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Zg=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Xg=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Jg=new Set(["ShiftRight","ShiftLeft"]);var eh=["TIMELINE"],Ql=[...eh,"GRAPH_BUTTON"],Pp=[...eh,"PLAY_BUTTON"],Gl=[...Ql,"PLAY_BUTTON"];var Pr=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(Pr||{}),js={xs:0,s:1,m:2,l:3,xl:4};var Yl=require("@vkontakte/videoplayer-shared/es2018"),th=require("@vkontakte/videoplayer-core/es2018"),ih=require("@vkontakte/videoplayer-statistics/es2018");var Ac="prod",Zs="1.1.62-dev.cb3c3ded.0";var Xs=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var oh=Symbol("storeContext"),nh=Symbol("microStoresContext"),rh=(t,e)=>{Ha(oh,t),Ha(nh,e),Ac==="dev"&&(window.app={store:t,microStores:e})},Se=()=>{let t=Oa(oh);return(0,Yl.assertNonNullable)(t,"Store context is empty!"),t},fo=()=>{let t=Oa(nh);return(0,Yl.assertNonNullable)(t,"MicroStores context is empty!"),t},Yt=(t,e)=>Lc(t,t.getValue(),e),Lc=(t,e,i)=>dr(e,o=>{let n=t.subscribe(a=>{o(a),i==null||i(a)});return()=>n.unsubscribe()}),sh=(t,e,i)=>{var k,P,A,E,T,V;let o=t.info,{width:n,height:a}=ye(i.ui.playerSize),s=(P=(k=o.throughputEstimation$.getValue())==null?void 0:k.toFixed(0))!=null?P:0,d=(E=(A=o.rttEstimation$.getValue())==null?void 0:A.toFixed(0))!=null?E:0,l=o.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${Zs} (core: ${th.VERSION}, stat: ${ih.VERSION}, shared: ${Yl.VERSION})`,f=ye(i.state.errorLog$),_=f.length?`
|
|
49
49
|
`+f.map((U,G)=>{var oe;let F=`${G}) Type: ${U.id}
|
|
50
50
|
`,Y=`Message: ${U.message} (${U.thrown})
|
|
51
51
|
`,X=`Trace: ${(oe=U.thrown)==null?void 0:oe.stack}
|
|
@@ -226,7 +226,7 @@ Try switching the\xA0quality to\xA0Auto.`},Ih=y_;var ns=new Map;ns.set(Ga.Interf
|
|
|
226
226
|
}
|
|
227
227
|
}`};function Pf(t,e){z(e,!0),K(t,W$);let i=v(e,"isMobile",3,!1),o=m(()=>e.iconState===Ef.ChromecastState.CONNECTED),n=m(()=>e.iconState===Ef.ChromecastState.CONNECTING);var a=Fe(),s=ue(a);{var d=p=>{var f=z$(),_=h(f),u=h(_),$=h(u);_e(),g(u);var w=M(u);_e(),g(_);var y=M(_),S=h(y),k=h(S);g(S),_e(),g(y),g(f),I(()=>{Oe($,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)"),Oe(w,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)"),Oe(k,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)")}),b(p,f)},l=p=>{var f=q$();let _;var u=h(f),$=M(h(u),5);let w;g(u),g(f),I((y,S)=>{_=te(f,0,"svelte-8z1bf5",null,_,y),w=te($,0,"svelte-8z1bf5",null,w,S)},[()=>({connecting:r(n)}),()=>({hidden:!r(o)})]),b(p,f)};R(s,p=>{i()?p(d):p(l,!1)})}b(t,a),q()}var t1=require("@vkontakte/videoplayer-shared/es2018");function gd(t,e){z(e,!0);let i=v(e,"ref",15,void 0),o=v(e,"isMobile",3,!1),n=v(e,"click",3,t1.noop),s=Se().ui.t,d=m(()=>e.state===e1.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,p)=>{Pf(l,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),q()}var K$=L('<div class="tooltip-wrapper svelte-5ygsa2"><div><!></div></div>'),Q$={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 Af(t,e){K(t,Q$);let i=v(e,"active",3,!1),o=v(e,"pointer",3,!1),n=v(e,"translateXPx",3,0),a=v(e,"translateYPx",3,0),s=ee(void 0),d=ee(void 0);function l(w){if(!r(d))return 0;let{width:y}=r(d).getBoundingClientRect(),S=y/2;return w<S?S:w>e.containerWidth-S?e.containerWidth-S:w}let p=m(()=>l(n()));var f=K$(),_=h(f);let u;var $=h(_);ge($,()=>{var w;return(w=e.children)!=null?w:ie}),g(_),ct(_,w=>O(d,w),()=>r(d)),g(f),ct(f,w=>O(s,w),()=>r(s)),I(w=>{tt(f,`transform: translate(${r(p)}px, ${a()}px);`),u=te(_,1,"tooltip svelte-5ygsa2",null,u,w),tt(_,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,f)}var Xc=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var i1=t=>!!(Math.round(Math.abs(t)/90)%2),o1=t=>Math.abs(t)/90%4===1;var G$=L('<div class="preview svelte-1wqg760"></div>'),Y$=L('<div class="time svelte-1wqg760"> </div>'),j$=L('<div><!> <div class="episode svelte-1wqg760"><!></div> <!></div>'),Z$={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 Mf(t,e){z(e,!0),K(t,Z$);let[i,o]=He(),n=()=>C(w,"$rotateAlpha",i),a=()=>C(y,"$playerSize",i),s={MOBILE:150,DESKTOP:278},d=v(e,"time",3,""),l=v(e,"isMobile",3,!1),p=v(e,"videoEpisodes",19,()=>[]),f=v(e,"progress",3,0),_=v(e,"duration",3,0),u=v(e,"isInteractive",3,!1),$=Se(),w=$.ui.rotateAlpha,y=$.ui.playerSize,S=ee(0),k=ee(0),P=ee(""),A=ee(0),E=ee(0),T=ee(0),V=ee(0),U=m(()=>Xc(f(),_(),p())),G=m(()=>i1(n())),F=m(()=>o1(n())),Y=m(pe),X=m(()=>(r(F)?1:-1)*(r(S)/2-r(k)/2)),oe=m(()=>r(X)*-1);qe(()=>{(D=>(O(S,me(D.width)),O(k,me(D.height))))(Ve())}),qe(()=>{(D=>(O(P,me(D.imgSrc)),O(A,me(D.imgWidth)),O(E,me(D.imgHeight)),O(T,me(D.imgOffsetX)),O(V,me(D.imgOffsetY))))(Ae(f()))});function pe(){var Ge;let D=l()?s.MOBILE:s.DESKTOP,{isVertical:de}=le(),Ee=30;return(Ge=r(U))!=null&&Ge.text&&(Ee+=16),(de||r(G))&&(Ee+=18,Ee+=50),Math.min(Math.max(a().height-Ee,0),D)}function le(){let D=e.previewThumbsData.frameWidth,de=e.previewThumbsData.frameHeight,Ee=de>D;return{width:D,height:de,isHorizontal:!Ee,isVertical:Ee}}function Ve(){let{height:D,isHorizontal:de,isVertical:Ee,width:Ge}=le();return de&&(D=D/Ge*r(Y),Ge=r(Y)),Ee&&(Ge=Ge/D*r(Y),D=r(Y)),{width:Ge,height:D}}function Ae(D){let de;e.previewThumbsData.isUV?de=Math.floor(_()*D/e.previewThumbsData.frequency):de=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*D)));let Ee=Math.floor(de/e.previewThumbsData.countPerImage),Ge=Math.floor(de%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),at=de%e.previewThumbsData.countPerRow,Pe=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&Ee===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(Pe=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&Pe++);let $e=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&Ee===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&($e=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Le=r(S)*$e,Ze=r(k)*Pe,ut=-at*r(S),nt=-Ge*r(k);return{imgSrc:e.previewThumbsData.links[Ee],imgWidth:Le,imgHeight:Ze,imgOffsetX:ut,imgOffsetY:nt}}var J=j$();let Me;var j=h(J);{var B=D=>{var de=G$();I(()=>tt(de,`width: ${r(S)}px; height: ${r(k)}px; background-image: url(${r(P)}); background-size: ${r(A)}px ${r(E)}px; background-position: ${r(T)}px ${r(V)}px;
|
|
228
228
|
transform: rotate(${n()}deg) ${r(G)?`translate(${r(X)}px, ${r(oe)}px)`:""};
|
|
229
|
-
`)),b(D,de)};R(j,D=>{r(P)&&D(B)})}var Re=M(j,2),ne=h(Re);{var Ie=D=>{var de=Fe(),Ee=ue(de);{var Ge=Pe=>{var $e=ar();I(Le=>ve($e,Le),[()=>H("tooltip_episode_unfinished")]),b(Pe,$e)},at=Pe=>{var $e=ar();I(()=>ve($e,r(U).text||"")),b(Pe,$e)};R(Ee,Pe=>{u()&&r(U).completed===!1?Pe(Ge):Pe(at,!1)})}b(D,de)};R(ne,D=>{r(U)&&D(Ie)})}g(Re);var Ne=M(Re,2);{var fe=D=>{var de=Y$(),Ee=h(de,!0);g(de),I(()=>ve(Ee,d())),b(D,de)};R(Ne,D=>{u()||D(fe)})}g(J),I(D=>{Me=te(J,1,"timeline-preview svelte-1wqg760",null,Me,D),tt(J,`width: ${r(G)?r(k):r(S)}px;`)},[()=>({mobile:l()})]),b(t,J),q(),o()}var X$=L('<span class="time svelte-1jr6obn"> </span>'),J$=L("<!> <!>",1),e2={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 Lf(t,e){var he;z(e,!0),K(t,e2);let[i,o]=He(),n=()=>C(Y,"$interactiveEpisodes$",i),a=()=>C(E,"$duration$",i),s=()=>C(A,"$position$",i),d=()=>C(pe,"$isInteractiveExpectation$",i),l=()=>C(oe,"$isInteractiveTime$",i),p=()=>C(T,"$isLive$",i),f=()=>C(U,"$isMobile",i),_=()=>C(V,"$isActiveLive$",i),u=()=>C(P,"$bufferedProgress$",i),$=()=>C(Ae,"$disabledControls$",i),w=v(e,"showTimeline",3,!1),y=v(e,"ref",15,void 0),S=Se(),k=Qt(),P=S.state.bufferedProgress$,A=S.state.positionWithScrubbing$,E=S.state.duration$,T=S.state.isLive$,V=S.state.isActiveLive$,U=S.ui.isMobile,G=k.features.episodes?S.actions.internal.getVideoEpisodes():void 0,F=S.actions.internal.getPreviewThumbsData(),Y=S.state.interactiveEpisodes$,X=S.state.isInteractive,oe=S.state.isInteractiveTime$,pe=S.state.isInteractiveExpectation$,le=S.actions.internal.correctSeekTimeToInteractive,Ve=(he=S.callbacks)==null?void 0:he.onDisabledTimelineClick,Ae=S.ui.controls.disabledControls$,J=S.ui.t,Me=k.features.interactiveResponsiveUi,j=m(()=>X?n():G),B=m(()=>cr(a())),Re=m(()=>cr(s())),ne=m(()=>s()/a()),Ie=m(()=>d()||l()),Ne=ee(!1),fe=ee(""),D=ee(0),de=ee(0),Ee=ee(0),Ge=m(()=>({containerWidth:r(de),translateXPx:r(D),translateYPx:X&&F?-36:-16,active:r(Ne)&&w()&&!r(Ie)&&!Me,pointer:!k.features.timelinePreview||!F||p()})),at=J("aria_timeline"),Pe=m(()=>J("aria_timeline_value",{position:r(Re),duration:r(B)}));function $e(Ce){return!le||!X?Ce:le(Ce*a())/a()}function Le(Ce){S.actions.internal.startScrubbing($e(Ce))}function Ze(Ce){l()||S.actions.internal.progressScrubbing($e(Ce))}function ut(Ce){S.actions.internal.completeScrubbing($e(Ce)),O(Ne,!1)}function nt(Ce,De,pt){xt(Ce,De,pt),O(Ne,!0)}function Dt(Ce,De,pt){xt(Ce,De,pt),O(Ne,!0)}function rt(){O(Ne,!1)}function xt(Ce,De,pt){O(Ee,me($e(Ce))),O(D,me(De)),pt&&O(de,me(pt)),O(fe,me(qt(Ce)))}function qt(Ce){let De=cr((p()?1-Ce:Ce)*a());return p()?`-${De}`:De}var Gt=J$(),Be=ue(Gt);Af(Be,os(()=>r(Ge),{children:(Ce,De)=>{var pt=Fe(),Wt=ue(pt);{var Ye=Je=>{Mf(Je,{get time(){return r(fe)},get isMobile(){return f()},get videoEpisodes(){return r(j)},previewThumbsData:F,get progress(){return r(Ee)},get duration(){return a()},isInteractive:X})},lt=Je=>{var kt=X$(),Jt=h(kt,!0);g(kt),I(()=>ve(Jt,r(fe))),b(Je,kt)};R(Wt,Je=>{k.features.timelinePreview&&F&&!p()?Je(Ye):Je(lt,!1)})}b(Ce,pt)},$$slots:{default:!0}}));var re=M(Be,2);let W=m(()=>Math.round(r(ne)*100)),se=m(()=>$().has("TIMELINE"));ca(re,{className:"timeline-slider",get isActiveLive(){return _()},get isMobile(){return f()},ariaLabel:at,ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return r(W)},get ariaValueText(){return r(Pe)},get loadedProgress(){return u()},get filledProgress(){return r(ne)},get handleProgress(){return r(ne)},get videoEpisodes(){return r(j)},onPointerDown:Le,onHandleMove:Ze,onPointerMove:Dt,onPointerUp:ut,onPointerEnter:nt,onPointerLeave:rt,onDisabledClick:Ve,isInteractive:X,get disabled(){return r(se)},get hideHandel(){return l()},get ref(){return y()},set ref(Ce){y(Ce)}}),b(t,Gt),q(),o()}var t2={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 hd(t,e){z(e,!0),K(t,t2);let[i,o]=He(),n=()=>C(l,"$isMobile",i),a=v(e,"position",3,0),s=v(e,"duration",3,0),d=Se(),l=d.ui.isMobile,p=d.ui.t,f=m(()=>cr(s())),_=m(()=>cr(a())),u=m(()=>a()/s()),$=m(()=>p("aria_timeline_value",{position:r(_),duration:r(f)})),w=m(()=>Math.round(r(u)*100));ca(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return s()},get ariaValueNow(){return r(w)},get ariaValueText(){return r($)},get filledProgress(){return r(u)},hideHandel:!0,get squareBorders(){return n()}}),q(),o()}var i2=L("<div><!></div>"),o2=L("<div></div>"),n2={hash:"svelte-1gqonyf",code:".timeline.svelte-1gqonyf {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-1gqonyf {height:16px;padding:6px 12px 7px;margin-top:6px;}.timeline-stub.svelte-1gqonyf {width:100%;min-width:20px;}.timeline-stub.mobile.svelte-1gqonyf {height:8px;}"};function _d(t,e){z(e,!0),K(t,n2);let[i,o]=He(),n=()=>C(u,"$isLive$",i),a=()=>C(y,"$isMobile",i),s=()=>C(w,"$adPosition",i),d=()=>C($,"$adDuration",i),l=v(e,"isAds",3,!1),p=v(e,"isHidden",3,!1),f=v(e,"ref",15,void 0),_=Se(),u=_.state.isLive$,$=_.ads.duration,w=_.ads.position,y=_.ui.isMobile,S=m(()=>!p()&&(!n()||n()&&e.canRewindLive&&e.isRewindableLive||l()));var k=Fe(),P=ue(k);{var A=T=>{var V=i2();let U;var G=h(V);{var F=X=>{hd(X,{get position(){return s()},get duration(){return d()}})},Y=X=>{Lf(X,{get showTimeline(){return r(S)},get ref(){return f()},set ref(oe){f(oe)}})};R(G,X=>{l()?X(F):X(Y,!1)})}g(V),I(X=>U=te(V,1,"timeline svelte-1gqonyf",null,U,X),[()=>({mobile:a()})]),b(T,V)},E=T=>{var V=o2();let U;I(G=>U=te(V,1,"timeline-stub svelte-1gqonyf",null,U,G),[()=>({mobile:a()})]),b(T,V)};R(P,T=>{r(S)?T(A):T(E,!1)})}b(t,k),q(),o()}var n1=require("@vkontakte/videoplayer-shared/es2018");var r2=be('<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 Vf(t,e){let i=ke(e,["$$slots","$$events","$$legacy","children"]);var o=r2();let n;var a=h(o);ge(a,()=>{var s;return(s=e.children)!=null?s:ie}),_e(3),g(o),I(()=>n=we(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})),b(t,o)}var s2=be('<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 Rf(t,e){let i=ke(e,["$$slots","$$events","$$legacy","children"]);var o=s2();let n;var a=h(o);ge(a,()=>{var s;return(s=e.children)!=null?s:ie}),_e(),g(o),I(()=>n=we(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})),b(t,o)}var a2=L('<span class="text mobile svelte-1yhs2ga"> </span> <div class="chevron-episodes svelte-1yhs2ga"><!></div>',1),l2=L('<span class="text svelte-1yhs2ga"> </span>'),d2=L('<span class="text count svelte-1yhs2ga"> </span>'),c2=L("<!> <!>",1),u2={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 bd(t,e){var le,Ve,Ae;z(e,!0),K(t,u2);let[i,o]=He(),n=()=>C(w,"$currentGridType$",i),a=()=>C(y,"$openedByKeyboard$",i),s=()=>C(S,"$panelOpened$",i),d=()=>C(k,"$isMobile",i),l=v(e,"position",3,0),p=v(e,"duration",3,0),f=v(e,"timeCodes",19,()=>[]),_=Se(),u=(Ve=(le=_.callbacks)==null?void 0:le.onEpisodeChanged)!=null?Ve:n1.noop,$=!!((Ae=_.callbacks)!=null&&Ae.onEpisodeClicked),w=_.ui.currentGridType$,y=_.ui.episodes.openedByKeyboard$,S=_.ui.episodes.panelOpened$,k=_.ui.isMobile,P=_.ui.t,A=ee(void 0),E=J=>{var j,B,Re;if(!!((j=_.callbacks)!=null&&j.onEpisodeClicked)){let ne=ws(J);y.set(ne),S.set(!0),(Re=(B=_.callbacks)==null?void 0:B.onEpisodeClicked)==null||Re.call(B,ne)}},T=ee(null),V=m(()=>l()/p());qe(()=>{var Me;let J=Xc(r(V),p(),f());J?((Me=r(T))==null?void 0:Me.time)!==J.time&&(u(J),O(T,me(J))):O(T,null)});let U=m(()=>{var J;return((J=r(T))==null?void 0:J.text)||""}),G=m(()=>qi(n(),"xl")?"FULL":qi(n(),"m")&&Zh(n(),"xl")?"COUNT":"SHORT"),F=m(()=>`${P("tooltip_episodes")}: ${r(U)}`),Y=async(J,Me,j)=>{await yo(),(J==null?void 0:J.getAttribute("aria-expanded"))==="false"&&Me&&!j&&$t(()=>{y.set(!1),J.focus()})};qe(()=>{Y(r(A),a(),s())});var X=Fe(),oe=ue(X);{var pe=J=>{let Me=m(()=>d()?"px-0":"");At(J,{get className(){var j;return`w-max btn-full-opacity btn-jc-l ${(j=r(Me))!=null?j:""}`},testId:"btn-episodes",click:E,disabled:!$,get ariaExpanded(){return s()},get ariaLabel(){return r(F)},get ref(){return r(A)},set ref(j){O(A,me(j))},children:(j,B)=>{var Re=Fe(),ne=ue(Re);{var Ie=fe=>{var D=a2(),de=ue(D),Ee=h(de,!0);g(de);var Ge=M(de,2),at=h(Ge);Rf(at,{}),g(Ge),I(()=>ve(Ee,r(U))),b(fe,D)},Ne=fe=>{var D=c2(),de=ue(D);Vf(de,{});var Ee=M(de,2);{var Ge=Pe=>{var $e=l2(),Le=h($e,!0);g($e),I(()=>ve(Le,r(U))),b(Pe,$e)},at=(Pe,$e)=>{{var Le=Ze=>{var ut=d2(),nt=h(ut,!0);g(ut),I(()=>ve(nt,f().length)),b(Ze,ut)};R(Pe,Ze=>{r(G)==="COUNT"&&Ze(Le)},$e)}};R(Ee,Pe=>{r(G)==="FULL"?Pe(Ge):Pe(at,!1)})}b(fe,D)};R(ne,fe=>{d()?fe(Ie):fe(Ne,!1)})}b(j,Re)},$$slots:{default:!0}})};R(oe,J=>{r(T)&&J(pe)})}b(t,X),q(),o()}var h1=require("@vkontakte/videoplayer-shared/es2018");var li=require("@vkontakte/videoplayer-core/es2018"),ht=require("@vkontakte/videoplayer-shared/es2018"),Wr=require("@vkontakte/videoplayer-statistics/es2018");var We=require("@vkontakte/videoplayer-shared/es2018"),Wi=require("@vkontakte/videoplayer-shared/es2018");var r1=(t,e)=>t<400||e<225?5:t<640||e<360?0:t<960||e<540?1:t<1280||e<720?2:3;var p2="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Jc=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 Wi.Subject,loadStarted$:new Wi.Subject,loadEnded$:new Wi.Subject,loadError$:new Wi.Subject,ready$:new Wi.Subject,slotRequested$:new Wi.Subject,started$:new Wi.Subject,timeRemained$:new Wi.Subject,paused$:new Wi.Subject,resumed$:new Wi.Subject,ended$:new Wi.Subject,empty$:new Wi.Subject,skipped$:new Wi.Subject,clicked$:new Wi.Subject,closed$:new Wi.Subject,error$:new Wi.Subject};this.loadAdman=e=>(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[(0,We.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?(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[(0,We.now)()]}),i(),this.events.loadEnded$.next()):(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[(0,We.now)()]}),o())};(0,Wi.addScript)(p2,e,this.loadTimeout).then(()=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[(0,We.now)()]}),window.AdmanHTML?(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[(0,We.now)()]}),i(),this.events.loadEnded$.next()):(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[(0,We.now)()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout))}).catch(s=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(s)],numbers:[(0,We.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?(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[(0,We.now)()]}),i(),this.events.loadEnded$.next()):(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[(0,We.now)()]}),o())},s=()=>{d=!0,o()},d=!1,l=window.setTimeout(()=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[(0,We.now)()]}),s()},this.loadTimeout);e.addEventListener("abort",s),e.aborted&&(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[(0,We.now)()]}),s()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[(0,We.now)()]}),!d&&(window.AdmanHTML?(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[(0,We.now)()]}),i(),this.events.loadEnded$.next()):(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[(0,We.now)()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout)))},s).finally(()=>{clearTimeout(n),clearTimeout(l),e.removeEventListener("abort",s)})});this.onAdsReady=()=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[(0,We.now)()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[(0,We.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"}),ye(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=()=>{var e;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.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=()=>{var e;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.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(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[(0,We.now)()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.log({message:"ad completed"}),this.currentAdSection?this.events.ended$.next(this.currentAdSection):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[(0,We.now)()]}),this.log({message:e}),this.events.error$.next(e),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[(0,We.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,this.usePuid=i.usePuid}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){var A;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[(0,We.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:p={},duration:f,previewParam:_}=e,u,$=this.playerState&&ye(this.playerState.vsid);$&&(this.isVsidOriginal?u=$:u=parseInt($,36));let{isEmbed:w,immediateOrigin:y}=(0,We.detectEmbed)(),S=(A=w?y:window.location.href)!=null?A:window.location.href,k={...p,dl:encodeURIComponent(S),autoplay:a?1:0,player_width:i,player_height:o,preview:_,...u?{request_id:u}:{},duration:f,...this.usePuid?{puid10:r1(i,o),puid11:n?0:1}:{}};_||delete k.preview;let P={slot:l,wrapper:s,videoEl:d,videoQuality:o,params:k,browser:{mobile:!1}};try{let E=new window.AdmanHTML;E.setDebug(!1),E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.init(P),this.adman=E,this.videoElement=d,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(P)}`})}catch(E){We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[(0,We.now)()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,n,a;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[(0,We.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 s="Switch to video: Adman state was not updated correctly";this.log({message:s}),this.events.error$.next(s)}(a=(n=this.actions).switchFromAdsToVideo)==null||a.call(n,!i)}}togglePlay(){var e;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.adsState){this.log({message:"toggle play"});let i=ye(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[(0,We.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(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&clearTimeout(this.watchDogTimeout),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,n,a,s,d,l,p,f,_,u;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[(0,We.now)()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(n=this.adman)==null||n.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(s=this.adman)==null||s.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(l=this.adman)==null||l.onClicked(void 0),(p=this.adman)==null||p.onTimeRemained(void 0),(f=this.adman)==null||f.onCompleted(void 0),(_=this.adman)==null||_.onError(void 0),(u=this.adman)==null||u.destroy(),this.videoElement&&(0,Wi.clearVideoElement)(this.videoElement),this.isDestroyed=!0}};var s1=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 Nf=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 p=new eu,{startTime:f,endTime:_}=p.parse(l);s.startTime=f,s.endTime=_}else if(l.trim()!==""){let p=new Bf,{texts:f}=p.parse(l);s.texts=[...s.texts,...f]}(s.startTime||s.endTime)&&s.texts.length>0&&o.push(s)}return o}},eu=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}},Bf=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 p=["<",">"].reduce((f,_)=>{let u=s.indexOf(_,d);return f===-1||f>u?u:f},-1);if(p===-1){l.push(s.substring(d));break}l.push(s.substring(d,p)),d=p+1}return l}}),a=new eu;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}},a1=Nf;var iu=require("@vkontakte/videoplayer-shared/es2018"),ua,wi,Df=0,Of=!1,l1="",d1=(t,e=0,i=0)=>t<e&&t<i,tu=(t,e=0,i=0)=>t>=e&&t<=i,f2=(t,e=0,i=0)=>t>e&&t>i,c1=(t,e,i,o=!1)=>{var d;let n=(d=i.find(({id:l})=>l===e.value))==null?void 0:d.subtitles;if(o)return n==null?void 0:n.find(({startTime:p,endTime:f})=>tu(t,p,f));let a=t>=Df,s=t<Df;if(Df=t,s&&(Of=!1),(0,iu.isNonNullable)(ua)&&tu(t,ua.startTime,ua.endTime)&&l1===e.value)return ua;if(!(0,iu.isNonNullable)(wi)&&(n!=null&&n.length)&&!Of){wi=n.find(({startTime:p,endTime:f})=>tu(t,p,f)||a&&d1(t,p,f)),ua=void 0,!(0,iu.isNonNullable)(wi)&&n[n.length-1].endTime<t&&(Of=!0);return}else{if(tu(t,wi==null?void 0:wi.startTime,wi==null?void 0:wi.endTime))return ua=wi,wi=void 0,l1=e.value,ua;(a&&f2(t,wi==null?void 0:wi.startTime,wi==null?void 0:wi.endTime)||s&&d1(t,wi==null?void 0:wi.startTime,wi==null?void 0:wi.endTime))&&(wi=void 0)}};var u1={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"},m2={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"},ou=t=>{var e,i;return(i=(e=u1[t])!=null?e:u1[m2[t]])!=null?i:void 0};var p1=require("@vkontakte/videoplayer-shared/es2018"),iN=require("@vkontakte/videoplayer-statistics/es2018"),nu=class{constructor(e,i=new p1.Subscription){this.oneStat=e;this.statSubscription=i}destroy(){this.oneStat.destroy(),this.statSubscription.unsubscribe()}};var $d=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))($d||{});var qr=t=>t!=null?t:0,sl=(t,e)=>{var n,a;let i=(n=t==null?void 0:t.getBoundingClientRect)==null?void 0:n.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(qr(i==null?void 0:i.top)-qr(o==null?void 0:o.top)),left:Math.round(qr(i==null?void 0:i.left)-qr(o==null?void 0:o.left)),bottom:Math.round(qr(i==null?void 0:i.bottom)-qr(o==null?void 0:o.top)),right:Math.round(qr(i==null?void 0:i.right)-qr(o==null?void 0:o.left))}},al=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:qr(e==null?void 0:e.width),height:qr(e==null?void 0:e.height)}};var f1=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:n,statAuthToken:a,isAudioDisabled:s,canDownload:d,callbacks:l,webApi:p,videoEpisodes:f,previewThumbsData:_,uiConfig:u,coreConfig:$,player:w,disabledControls:y,isInteractive:S,interactiveRanges$:k,isInteractiveTime$:P,replayInteractive:A,stopPlayer:E,hasInteractiveBranches:T,playPrevChapterDisabledTooltip:V,additionalButtons:U,additionalSettingsMenuItems:G,additionalContextMenuItems:F,playPrevVideo:Y,playNextVideo:X,looped:oe=!1,statistics:pe,saveRate:le,internalsExposure:Ve})=>{var Fo,nv,rv;let Ae={...$,configName:[...(Fo=$.configName)!=null?Fo:[],"ui"],isAudioDisabled:s,live:{...(nv=$.live)!=null?nv:{},isLiveCatchUpMode:!!n}},J=u,Me=ht.Tracer.createRootTracer(J.features.saveTraceInfoToFile),j=Me.createComponentTracer("Store"),B=w||new li.Player(Ae,Me);Ve==null||Ve.expose({corePlayer:B});let Re=new ht.Logger,ne=new Jc(Re,{loadTimeout:J.ads.loadTimeout,initTimeout:J.ads.initTimeout,runtimeTimeout:J.ads.runtimeTimeout,useAdmanFromNPM:J.ads.useAdmanFromNPM,volumeMultiplier:J.ads.volumeMultiplier,isVsidOriginal:J.ads.isVsidOriginal,usePuid:J.ads.usePuid}),Ie=ea.getInstance(),Ne=p==null?void 0:p.pictureInPictureApi,fe=p==null?void 0:p.annotationsApi,D=Re.createComponentLog("Store"),de,Ee,Ge={},at=new Mc,Pe=pe?Yt(pe.oneStat.vsid$):dr(void 0),$e=ae($s()),Le=ae(!1),Ze=(rv=Ne==null?void 0:Ne.info.isActive$)!=null?rv:new ht.ValueSubject(!1),ut=ae(0),nt=ae([]),Dt=(0,ht.merge)(B.events.fatalError$,B.events.managedError$).subscribe(c=>nt.update(x=>[...x,c])),rt=dr(!1,c=>{let x=B.events.fatalError$.subscribe(()=>c(!0));return()=>x.unsubscribe()}),xt=async c=>{var ce;let x=Object.values(ht.InterfaceLanguage).includes(c);if(J.downloadVKLanguages&&(x&&J.updateBuiltinLanguages||!zp(c))){let Ke;try{Ke=await(0,ht.loadVKLangPack)(c,Yg,jg)}catch(Ct){(ce=pe==null?void 0:pe.oneStat)==null||ce.logError({errorType:"VKLangPack",fatal:!1}),Ie==null||Ie.report(Ct,{errorType:"VKLangPack",fatal:!1})}Ke&&(Up({language:c,pack:Ke,fallback:J.defaultLanguage}),qt.set(c))}zp(c)&&qt.set(c)},qt=ae(t),Gt=ae(e);xt(t);let Be=(c,x)=>{let N=ye(qt);return qp(N,c,x,J.defaultLanguage)},re=ae("thumb"),W=(()=>{let c=gi([rt,re],([x,N])=>x?"crashed":N);return{...c,is:x=>ye(c)===x}})(),se=(()=>{let c=ae(new Set(y));return{...c,add:x=>{c.update(N=>new Set([...N].concat(x)))},remove:x=>{c.update(N=>{let ce=[...N];return new Set(Array.isArray(x)?ce.filter(Ke=>!x.includes(Ke)):ce.filter(Ke=>Ke!==x))})},includes:x=>{let N=ye(c);return Array.isArray(x)?x.every(ce=>N.has(ce)):N.has(x)}}})();j.log("create store"),D({message:"create store"});let he=c=>{let x=c.container;x.append(B.experimental.element$.getValue()),Je=new MutationObserver(N=>{let{removedNodes:ce}=N[0];ce.length&&x.append(B.experimental.element$.getValue())}),Je.observe(x,{childList:!0})},Ce=c=>{D({message:`init video, config: ${JSON.stringify(c)}`}),S?he(c):(ht.devNull.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[(0,ht.now)()]}),B.initVideo(c)),j.log("init video",{isInteractive:S}),c.subtitles&&B.setExternalTextTracks(c.subtitles),de=c},De=new ht.Subject,pt=c=>De.next(c),Wt=new ht.Subject,Ye=new ht.Subject,lt=new ht.Subject,Je=null,kt={actionRewind$:Wt,actionSeek$:Ye,inPiP$:Ze,inFullscreen$:new ht.Observable(c=>$e.subscribe(x=>c.next(x))),actionSetSubtitle$:lt,nextMovie$:De};if(pe){let{oneStat:c,statSubscription:x}=pe;S||x.add(c.attachTo(B)),x.add(c.attachToUi(kt)),x.add(c.attachToAds(ne.events)),c.authorize(a).catch(N=>{D({message:`onestat auth error ${String(N)}`})})}if(Ie){let c=new ht.Subscription,x=(N,ce)=>c.add(N.subscribe(ce));if(x(B.events.managedError$,N=>{Ie.logIError(N)}),x(B.events.fatalError$,N=>{Ie.logIError(N,!0)}),pe){let{oneStat:N}=pe;x(N.experimental.error$,ce=>{Ie.logIError(ce)})}Ie.sentrySubscription.add(c)}let Jt=()=>{li.clientChecker.device.isIOS&&Ee&&Mh(Ee).catch(c=>{D({message:`exitIosSafariFullscreen failed: ${c}`})})},Qe=new ht.Subscription().add(B.experimental.element$.subscribe(c=>{c&&(Ee=c,c.classList.add("player-media"),ia(Ne)&&(Ne.updateVideoElement(),Ne.registryEventHandlers()),S&&c.setAttribute("pip","false"))})).add(B.events.ended$.subscribe(()=>{var c;Jt(),(c=l==null?void 0:l.onEnded)==null||c.call(l)})).add(B.events.looped$.subscribe(()=>{var c;(c=l==null?void 0:l.onLooped)==null||c.call(l)})).add(B.events.started$.subscribe(async()=>{var x,N;ia(Ne)&&await(Ne==null?void 0:Ne.revealPictureInPicture());let c=B.info.muted$.getValue();(x=l==null?void 0:l.onStarted)==null||x.call(l),(N=Ge.onStarted)==null||N.call(Ge,c)})).add(B.events.willSeek$.subscribe(({from:c,to:x})=>{var N;(N=l==null?void 0:l.onSeek)==null||N.call(l,c,x)})).add(B.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=l==null?void 0:l.onAutoplaySoundProhibited)==null||c.call(l)})).add(B.info.position$.subscribe(c=>{var N;let x=B.info.duration$.getValue();isFinite(x)&&x>0&&((N=l==null?void 0:l.onTimeupdate)==null||N.call(l,x,c),ne.setPosition(c,x))})).add(B.events.fatalError$.subscribe(c=>{var x;(x=l==null?void 0:l.onCrashed)==null||x.call(l,c?`${c.id}: ${c.message}`:void 0)})).add(B.events.fetcherRecoverableError$.subscribe(c=>{var x;(x=l==null?void 0:l.onRecoverableError)==null||x.call(l,c?`${c.id}: ${c.message}`:void 0)})).add(B.events.loadedMetadata$.subscribe(()=>{gt.state.loadedMetadata$.set(!0)})).add(B.info.is3DVideo$.subscribe(c=>{gt.ui.is3DVideo.set(c)})).add(B.info.isEnded$.subscribe(c=>{S&&(c?(P!=null&&P.getValue()&&se.add(Gl),se.add("PLAY_BUTTON")):se.remove("PLAY_BUTTON"))})).add(B.info.liveTime$.subscribe(c=>{var x;(x=l==null?void 0:l.onLiveTime)==null||x.call(l,c)})).add(B.info.isStalled$.subscribe(c=>{var x;(x=l==null?void 0:l.onStalledChanged)==null||x.call(l,c)})).add(B.info.isLiveEnded$.subscribe(c=>{var x;return c&&((x=l==null?void 0:l.onLiveEnded)==null?void 0:x.call(l))})).add(ne.events.loadStarted$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:x.call(c)})).add(ne.events.loadEnded$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:x.call(c)})).add(ne.events.loadError$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadError)==null?void 0:x.call(c)})).add(ne.events.init$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onInit)==null?void 0:x.call(c)})).add(ne.events.ready$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onReady)==null?void 0:x.call(c)})).add(ne.events.started$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onStarted)==null?void 0:N.call(x,c)})).add(ne.events.timeRemained$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onTimeRemained)==null?void 0:N.call(x,c)})).add(ne.events.ended$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onCompleted)==null?void 0:N.call(x,c)})).add(ne.events.empty$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onEmpty)==null?void 0:x.call(c)})).add(ne.events.clicked$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onClicked)==null?void 0:N.call(x,c)})).add(ne.events.closed$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onClosed)==null?void 0:N.call(x,c)})).add(ne.events.error$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onError)==null?void 0:N.call(x,c)})).add(ne.events.paused$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onPaused)==null?void 0:x.call(c)})).add(ne.events.resumed$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onResumed)==null?void 0:x.call(c)})),dt=new ht.Subscription,ti=()=>{var Ct,Rt,zt;let{debugLog:c}=J,x,N="#9df7b7",ce="#efd169";if(c&&c!==!0){let{colors:Nt}=c;x=c.tag,N=(Ct=Nt==null?void 0:Nt[0])!=null?Ct:N,ce=(zt=(Rt=Nt==null?void 0:Nt[1])!=null?Rt:Nt==null?void 0:Nt[0])!=null?zt:ce}let Ke=x?`: ${x}`:"";dt.add(B.events.log$.subscribe(Nt=>{console.debug(`%c sdk${Ke} `,`background:${N};`,`sdk component: ${Nt.component}`,Nt.message)})).add(Re.log$.subscribe(Nt=>{console.debug(`%c ui${Ke} `,`background:${ce};`,`ui component: ${Nt.component}.`,Nt.message)}))},Bi=()=>{dt.unsubscribe()},No=(c,x)=>{j.log("start camera manual rotation",{mx:c,my:x}),B.startCameraManualRotation(c,x)},Di=(c=!1)=>{j.log("stop camera manual rotation",{immediate:c}),B.stopCameraManualRotation(c)},So=(c,x,N)=>{j.log("move camera focus px",{xpx:c,ypx:x,dt:N}),B.moveCameraFocusPX(c,x,N)},Bo=()=>{B.holdCamera()},Mt=()=>{B.releaseCamera()},_t=dr(B.info.position$.getValue(),c=>{let x,N,ce=()=>{let Ke=B.info.playbackState$.getValue(),Ct=B.info.isLive$.getValue(),Rt=B.info.duration$.getValue(),zt=B.info.position$.getValue();if(Ke&&[li.PlaybackState.PLAYING,li.PlaybackState.PAUSED].includes(Ke)){let Nt=Ct?zt-Rt:B.getExactTime();Nt!==N&&c(Nt),N=Nt}x=requestAnimationFrame(ce)};return ce(),()=>cancelAnimationFrame(x)}),Et=Yt(B.info.playbackState$),Z=Yt(B.info.currentBuffer$),ei=Yt(B.info.isEnded$),Mi=Yt(B.info.isLive$),Si=J.features.playbackRate?Yt(B.info.canChangePlaybackSpeed$):dr(!1),ii=Yt(B.info.liveBufferTime$),Qi=Yt(B.info.volume$),Li=Yt(B.info.muted$),Do=Lc(B.info.predefinedQualityLimitType$.pipe((0,ht.map)(c=>c===li.PredefinedQualityLimits.TRAFFIC_SAVING)),B.info.predefinedQualityLimitType$.getValue()===li.PredefinedQualityLimits.TRAFFIC_SAVING),Oi=Lc(B.info.predefinedQualityLimitType$.pipe((0,ht.map)(c=>c===li.PredefinedQualityLimits.HIGH_QUALITY)),B.info.predefinedQualityLimitType$.getValue()===li.PredefinedQualityLimits.HIGH_QUALITY),Ot=Yt(B.info.autoQualityLimitingAvailable$),pi=Yt(B.info.availableQualities$),St=Yt(B.info.availableQualitiesFps$),Kt=Yt(B.info.chromecastState$),mo=Yt(B.info.chromecastDeviceName$),jt=Yt(B.info.currentFormat$),Kn=Yt(B.info.throughputEstimation$),Co=Yt(B.info.videoBitrate$),To=Yt(B.info.intrinsicVideoSize$),si=Yt(B.info.duration$),yt=Yt(B.info.isAudioAvailable$),hi=null,Vi=B.info.isBuffering$,Hi=dr(Vi.getValue(),c=>{let x=Vi.subscribe(N=>{N&&hi===null?hi=window.setTimeout(()=>{c(Vi.getValue()),hi=null},J.loaderDelay):c(N)});return()=>{x.unsubscribe(),hi&&clearTimeout(hi)}}),wn=()=>{hi&&clearTimeout(hi),hi=null},Ci=gi([si,Mi],([c,x])=>x?-c:c),to=gi([Et],([c])=>c===li.PlaybackState.PLAYING),dn=Yt(B.info.atLiveEdge$),Sn=Yt(B.info.atLiveDurationEdge$),Ri=Yt(B.info.position$),Qn=gi([Ri,si],([c,x])=>isFinite(c)&&isFinite(x)&&!!x),cn=gi([Kt],([c])=>c===li.ChromecastState.CONNECTED),ko=Yt(B.info.availableVideoStreams$),Cn=J.features.audioLanguages?Yt(B.info.availableAudioStreams$):dr([]),Vr=Yt(B.info.currentVideoStream$),pr=Yt(B.info.currentAudioStream$),Gn=c=>{c.language&&Fp(c.language),B.setVideoStream(c)},Tn=c=>{c.language&&Fp(c.language),B.setAudioStream(c)},un=c=>{let x;if(c.length===1&&(x=c.at(0)),x!=null||(x=c.find(ce=>"isDefault"in ce&&ce.isDefault)),x)return x;let N=$h();return N&&(x=c.find(({language:ce})=>N===ce)),x!=null||(x=c.at(0)),x},kn=!1;Qe.add(B.info.availableAudioStreams$.subscribe(c=>{if(!kn&&c.length){let x=un(c);x&&(B.setAudioStream(x),kn=!0)}}));let vo=!1;Qe.add(B.info.availableVideoStreams$.subscribe(c=>{if(!vo&&c.length){let x=un(c);x&&(B.setVideoStream(x),vo=!0)}}));let et=ae(void 0),pn=Yt(B.info.isAutoQualityEnabled$,c=>c&&et.set(void 0)),Yn=Yt(B.info.currentQuality$,()=>et.set(void 0)),jn=gi([et,Yn],([c,x])=>c!=null?c:x),In=gi(jt,c=>c!==li.VideoFormat.MPEG),fn=gi([pi,St,pn,jn,In],([c,x,N,ce,Ke])=>{let Ct=[];Ke&&Ct.push({value:"auto",displayValue:Be("auto_quality_option"),selected:N});let Rt=c.filter(zt=>!(0,ht.isInvariantQuality)(zt));for(let zt of Rt){let Nt=x[zt];Ct.push({value:zt,displayValue:`${zt}${Nt?s1(Nt):""}`,selected:N?!1:zt===ce})}return Ct}),mn=Yt(B.info.currentPlaybackRate$),qo=gi([mn,dn,Sn],([c,x,N])=>{let ce=N||S?1:J.controls.playbackRateMin,Ke=x?1:J.controls.playbackRateMax,Ct=J.controls.playbackRateStep,Rt=[];for(let zt=ce;zt<=Ke;zt+=Ct)Rt.push({value:zt,displayValue:zt===1?Be("playback_rate_1"):Be("playback_rate",{multiplier:zt.toString(10)}),selected:c===zt});return Rt}),Gi={displayValue:Be("subtitles_off"),value:"off"},Yi=ae({...Gi}),Zn=J.features.subtitles?Yt(B.info.availableTextTracks$):dr([]),En=uh(),Xn=gi([Zn,Yi],([c,x],N)=>{var Ct;let ce=[],Ke=c.find(({id:Rt})=>Rt===x.value);if(Ke!=null&&Ke.url){let[,Rt]=(Ct=En.find(Ke.url))!=null?Ct:[];if(Rt){N(Rt);return}at.download(Ke.url).then(zt=>{if(!zt||at.isDestroyed())return;let Nt=new a1,cs=Ke.language;if(cs){let J1=!!Ke.isAuto,e0=Nt.parse(zt,cs);ce.push({lang:cs,subtitles:e0,isAuto:J1,id:Ke.id})}En.add(Ke.url,ce),ye(Yi).value===x.value&&N(ce)}).catch(zt=>{var Nt;(Nt=pe==null?void 0:pe.oneStat)==null||Nt.logError({errorType:"Subtitles download",fatal:!1}),Ie==null||Ie.report(zt,{errorType:"Subtitles download",fatal:!1})})}N(ce)}),fr=gi([mn,to,Yi],([c,x,N],ce)=>{let Rt;if(B.info.isLive$.getValue()&&x&&N.value!==Gi.value){let Nt=()=>{let cs=1e3/(3*c);Rt=setTimeout(Nt,cs),ce(Date.now())};return Nt(),()=>clearTimeout(Rt)}}),io=gi([Zn,Yi],([c,x])=>{if(!c.length)return[];let N=[];for(let{language:ce,isAuto:Ke,id:Ct}of c){let Rt=ce&&ou(ce);ce&&Rt&&N.push({displayValue:Ke?Be("subtitles_auto",{language:Rt}):Rt,value:Ct,selected:(x==null?void 0:x.value)===Ct,isAuto:Ke})}return N.length?(N.unshift({...Gi,selected:(x==null?void 0:x.value)===Gi.value}),N):[]}),oo={available:[],prev:[]},Pn=()=>{var x,N;let c=B.experimental.getCurrentTime$.getValue();return(N=(x=c==null?void 0:c())!=null?x:Ee==null?void 0:Ee.currentTime)!=null?N:0},An=gi([_t,Yi,Xn,fr],([c,x,N,ce])=>{var Ct;let Ke=B.info.isLive$.getValue();if(Ke&&oo.prev!==N){let Rt=N.find(({id:Nt})=>Nt===x.value),zt=oo.prev.find(({id:Nt})=>Nt===x.value);if(Rt){let Nt={...Rt,subtitles:[...(Ct=zt==null?void 0:zt.subtitles)!=null?Ct:[],...Rt.subtitles]};oo.available=[Nt],oo.prev=N}}if(x&&x.value!==Gi.value){let Rt=Ke?Pn():c,zt=Ke?oo.available:N;return c1(Rt,x,zt,Ke)}}),go=gi([An],([c])=>c!=null&&c.texts?c.texts:[]),no=ae(!0),Mn=gi([Z,Ci,Ri,ii],([c,x,N,ce])=>{var zt;let Ke=(zt=c==null?void 0:c.end)!=null?zt:0;if(!ce)return Ke/x;let Rt=-N+ce-x;return(Ke-Rt)/x}),Oo=Yt(B.info.availableSources$),Rr=gi([Oo],([c])=>Object.keys((c==null?void 0:c[li.VideoFormat.MPEG])||{}).length>0),Ln=()=>{var N,ce,Ke;let c=Object.keys(((ce=(N=B.info.availableSources$)==null?void 0:N.getValue())==null?void 0:ce[li.VideoFormat.MPEG])||{}),x=(0,ht.getHighestQuality)(c)||ht.VideoQuality.Q_144P;return(Ke=de.sources[li.VideoFormat.MPEG])==null?void 0:Ke[x]},mr=()=>{var x;let c=Ln();if(c)j.log("download video",{url:c}),lh(c,((x=de==null?void 0:de.meta)==null?void 0:x.title)||"video");else{let N="There is no URL for download video";j.log("download video",{message:N}),D({message:N})}},Vn=()=>{D({message:"toggle muted"});let c=B.info.muted$.getValue();B.info.volume$.getValue()===0&&!c?Nn(er()):oi(!c)},Rn=()=>{var c;if(gt.ui.settingsMenu.visible$.set(!1),!ye(gt.ui.settingsSubMenu.visible$)){let x=ye(gt.ui.settingsMenu.ref$);if((c=l==null?void 0:l.uiInfo)!=null&&c.onSettingsMenu&&x){let ce=al(x),Ke={top:0,left:0,bottom:0,right:0};l.uiInfo.onSettingsMenu({visible:!1,size:ce,position:Ke,name:"settings"})}}j.log("close settings menu")},Nr=async(c,x=()=>Promise.resolve())=>{var Ke;gt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),gt.ui.settingsMenu.visible$.set(!0),await x();let N=ye(gt.ui.settingsMenu.ref$),ce=Ls();if((Ke=l==null?void 0:l.uiInfo)!=null&&Ke.onSettingsMenu&&N&&ce){let Rt=al(N),zt=sl(N,ce);l.uiInfo.onSettingsMenu({visible:!0,size:Rt,position:zt,name:"settings"})}j.log("open settings menu",{wasOpenedByKeyboard:c})},Jn=(c,x=!1)=>{var Ct;gt.ui.settingsSubMenu.visible$.set(!1);let N=ye(gt.ui.settingsMenu.ref$),ce=Ls(),Ke=ye(gt.ui.settingsMenu.visible$);if((Ct=l==null?void 0:l.uiInfo)!=null&&Ct.onSettingsMenu&&N&&ce)if(Ke&&!x){let zt=al(N),Nt=sl(N,ce);l.uiInfo.onSettingsMenu({visible:!0,size:zt,position:Nt,name:"settings"})}else{let zt=al(c),Nt={top:0,left:0,bottom:0,right:0},cs=ye(gt.ui.settingsSubMenu.name$);l.uiInfo.onSettingsMenu({visible:!1,size:zt,position:Nt,name:cs})}j.log("close settings sub menu")},vr=(c,x)=>{var ce;gt.ui.settingsSubMenu.visible$.set(!0),gt.ui.settingsSubMenu.ref$.set(x),gt.ui.settingsSubMenu.name$.set(c);let N=Ls();if((ce=l==null?void 0:l.uiInfo)!=null&&ce.onSettingsMenu&&x&&N){let Ct=al(x),Rt=sl(x,N);l.uiInfo.onSettingsMenu({visible:!0,name:c,size:Ct,position:Rt})}j.log("open settings sub menu",{name:c})},er=()=>{var x;let c=Math.max(J.volumeMinRestore,(x=Vc())!=null?x:0);return c===0?J.volumeDefault:c},Nn=c=>{let x=c===0?er():c,N=B.info.muted$.getValue();D({message:`set volume, volume: ${c}, preferredVolume: ${x}`}),N&&c>0&&!s&&(N=!1,Op(!1)),B.setVolume(c,N),ne.setVolume(c),Vp(x)},oi=c=>{let x=B.info.volume$.getValue();if(D({message:`set muted, currentVolume: ${x}, mute: ${c}`}),B.setMuted(c),ne.setVolume(c?0:x),Op(c),!c&&x===0){let N=er();B.setVolume(N),Vp(N),ne.setVolume(N)}},Wo=ae(!1),gr=c=>{j.log("set looped",{isLooped:c}),Wo.set(c),B.setLooped(c)};gr(oe);let Br=()=>{var c,x;(x=(c=l==null?void 0:l.uiInfo)==null?void 0:c.onReportProblem)==null||x.call(c)},it=(c,x=!1)=>{var N;D({message:`set autoplayNextEnabled, value: ${c}`}),j.log("set autoplay next enabled",{autoplayNextEnabled:c}),gt.ui.autoplayNextEnabled$.set(c),wh(c),x&&((N=l==null?void 0:l.onSetAutoplayNextEnabled)==null||N.call(l,c))},ft=c=>{D({message:`set timerNextVideoRunning, value: ${c}`}),j.log("set timer next video running",{timerNextVideoRunning:c}),gt.ui.timerNextVideoRunning$.set(c)},Ti=(c=!0)=>{var ce;let x=!0;if(c&&(l!=null&&l.onPrevVideoClick))try{x=(ce=l==null?void 0:l.onPrevVideoClick)==null?void 0:ce.call(l)}catch(Ke){D({message:"onPrevVideoClick callback failed to execute"})}if(!x)return;c&&ji("prev")||Y()},ro=(c=!0)=>{var ce;let x=!0;if(c&&(l!=null&&l.onNextVideoClick))try{x=(ce=l==null?void 0:l.onNextVideoClick)==null?void 0:ce.call(l)}catch(Ke){D({message:"onNextVideoClick callback failed to execute"})}if(!x)return;c&&ji("next")||X()},ji=c=>{let{isMobile:x,features:{playbackStatusNextVideoShow:N,playbackStatusShow:ce}}=J;return N&&ce&&!x?(gt.ui.aboutToGoNextVideo.set(c),gt.ui.userActionsDisabled.set(!0),!0):!1},Io=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementShow)==null||c.call(l)},Eo=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementClick)==null||c.call(l)},Ko=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementAuto)==null||c.call(l)},Po=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementCancel)==null||c.call(l)},ui=()=>{B.prepare()},Xe=()=>{(0,ht.assertNonNullable)(gt);let c=ye(gt.ui.controls.disabledControls$),x=ye(gt.playerPhase),N={playerPhase:x,isInteractive:S,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(D({message:"toggle play"}),x==="ads"){N.action="play",j.log("toggle adman play",N),ne.togglePlay();return}let ce=()=>{var Ct;D({message:"toggle play, call player.play"}),N.action="play",B.play(),(Ct=l==null?void 0:l.onPlay)==null||Ct.call(l)},Ke=()=>{var Ct;D({message:"toggle play, call player.pause"}),N.action="pause",B.pause(),(Ct=l==null?void 0:l.onPause)==null||Ct.call(l)};if(B.info.isEnded$.getValue()){if(D({message:"toggle play, video ended, seek to 0"}),Wt.next(),Ye.next(Wr.SeekAction.REWIND),S){A==null||A();return}B.seekTime(0),ce()}else B.info.playbackState$.getValue()!==li.PlaybackState.PLAYING?ce():Ke();j.log("toggle play",N)},Lt=(c,{changeReason:x="default",appliesTo:N="to-video"}={})=>{D({message:`set quality, quality: ${c}`}),j.log("set quality",{quality:c}),B.setAutoQuality(c==="auto"),c!=="auto"?(J.features.qualityDetailsSubMenuEnabled?(Rc({type:"exact_quality",quality:c,videoId:i},N),Zl(),B.setPredefinedQualityLimits(li.PredefinedQualityLimits.UNKNOWN)):Rp(i,c),et.set(c),B.setQuality(c)):J.features.qualityDetailsSubMenuEnabled?x==="default"&&(Xi("auto_quality",N),ye(Do)&&Zi(!1),ye(Oi)&&_i(!1)):Zl()},Zi=(c,x="as-default")=>{D({message:`set trafficSavingEnabled, value: ${c}`}),j.log("set traffic saving enabled",{trafficSavingEnabled:c});let N=c?li.PredefinedQualityLimits.TRAFFIC_SAVING:li.PredefinedQualityLimits.UNKNOWN;J.features.qualityDetailsSubMenuEnabled?(bi(N,x),jl(!1)):(B.setPredefinedQualityLimits(N),jl(c))},_i=(c,x="as-default")=>{D({message:`set highQualityEnabled, value: ${c}`}),j.log("set high quality enabled",{highQualityEnabled:c}),bi(c?li.PredefinedQualityLimits.HIGH_QUALITY:li.PredefinedQualityLimits.UNKNOWN,x)},bi=(c,x)=>{c!==li.PredefinedQualityLimits.UNKNOWN&&(ye(Ot)&&!ye(pn)&&Lt("auto",{appliesTo:x,changeReason:"limit-changed"}),Xi(c,x)),B.setPredefinedQualityLimits(c)},Xi=(c,x)=>{Rc({type:c,videoId:i},x),x==="as-default"&&Rc({type:c,videoId:i},"to-video")},Ho=c=>{j.log("set playback rate",{playbackRate:c}),B.setPlaybackRate(c),J.features.saveRate&&le&&!B.info.isLive$.getValue()&&yh(c)},so=()=>{let c=ye(qo),x=c.findIndex(({selected:ce})=>ce);if(x===c.length-1)return;let N=c[x+1];Ho(N.value)},tr=()=>{let c=ye(qo),x=c.findIndex(({selected:ce})=>ce);if(x===0)return;let N=c[x-1];Ho(N.value)},vn=(c={...Gi,selected:!1})=>{j.log("set subtitles",{...c}),c&&c.value!==Gi.value&<.next(c.isAuto?c.value+"_auto":c.value),Yi.set(c)},hr=()=>{j.log("toggle subtitles");let c=ye(io),x=ye(Yi),N=ye(qt);if((x==null?void 0:x.value)===Gi.value){let ce=c.filter(Ke=>Ke.value!==Gi.value).find(Ke=>Ke.value===N)||c[1];vn(ce)}else vn()},Ao=(c,x,N=!0)=>{var ce;if(D({message:`seek to time, time: ${c}`}),j.log("seek to time",{time:c,action:x,forcePrecise:N}),Ye.next(x),B.info.isLive$.getValue()){let Ke=B.info.duration$.getValue(),Ct=Math.min(0,Ke+c);B.seekTime(Ct,N)}else{if(P!=null&&P.getValue())return;B.info.isEnded$.getValue()&&(D({message:"seek after ended, call callbacks.onPlay"}),(ce=l==null?void 0:l.onPlay)==null||ce.call(l)),B.seekTime(Ue(c),N)}},_r=c=>{D({message:`seek to episode start time: ${c}`}),j.log("seek to episode start time",{time:c}),Ao(c,Wr.SeekAction.EPISODE,!0)},br=(c,x)=>{D({message:`seek to percent, percent: ${c}`}),j.log("seek to percent",{percent:c,action:x});let N=ye(Ci)*c;Ao(N,x,!1)},$r=c=>{D({message:`seek external, time: ${c}`}),j.log("seek external",{time:c}),Ye.next(Wr.SeekAction.UNKNOWN),B.seekTime(B.info.isLive$.getValue()?-c:c)},Dr=c=>{var ce,Ke;let x=(ce=c.max)!=null?ce:"none",N=(Ke=c.min)!=null?Ke:"none";D({message:`set auto quality limitation. Max: ${x}. Min: ${N}`}),j.log("set auto quality limits",{max:x,min:N}),B.setAutoQualityLimits(c)},Qo=c=>{D({message:`seek external to episode start time: ${c}`}),j.log("seek external to episode start time",{time:c}),Ao(c,Wr.SeekAction.EPISODE,!0)},yr=c=>{D({message:`set playback rate to: ${c}`}),j.log("set playback rate external",{playbackRate:c}),B.setPlaybackRate(c)},ir=ae(void 0),or=ae(!1),xr=c=>{D({message:`start scrubbing, progress: ${c}`}),j.log("start scrubbing",{progress:c}),or.set(!0),ho(c)},ho=c=>{ir.set(c)},Bn,ot,Ht=()=>{ir.set(void 0),or.set(!1)},ki=()=>{clearTimeout(ot),clearTimeout(Bn),Bn=window.setTimeout(()=>{Ht()},500),Ee==null||Ee.removeEventListener("seeked",ki)},Go=c=>{D({message:`complete scrubbing, progress: ${c}`}),j.log("complete scrubbing",{progress:c}),br(c,Wr.SeekAction.SLIDER),ye(gt.ui.isMobile)&&ye(gt.state.currentFormat$)===li.VideoFormat.HLS?(Ee==null||Ee.addEventListener("seeked",ki),ot=window.setTimeout(()=>{ki()},300)):Ht()},Dn=gi([_t,Ci,ir],([c,x,N],ce)=>{ce((0,ht.isNonNullable)(N)?N*x:c)}),xe=ae(!1),Vt=()=>{xe.set(!0)},di=()=>{xe.set(!1)},Pt=ae({width:0,height:0}),Zt=gi([Pt],([{width:c}],x)=>{let N=Xh(c);x(N)}),ci=ae(!1),Fi=U.filter(c=>dh(c)),_o=gi([Zt,ci],([c,x])=>x?Fi.filter(N=>!N.hideOnMobile):Fi.filter(N=>{var ce;return!((ce=N.hideOnDesktopGridTypes)!=null&&ce.includes(c))})),ni=ae(U.filter(c=>ch(c))),Mo=gi([ni,Zt],([c,x])=>c.filter(N=>{var ce;return!((ce=N.hideOnDesktopGridTypes)!=null&&ce.includes(x))})),ze=gi([Mo,_o],([c,x])=>[...J.features.additionalButtonsDesktopControlPanelRight?c.filter(N=>N.type==="desktop-control-panel-right"):[],...J.features.additionalButtons?x.map((N,ce)=>{var Ke;return{id:ce,weight:ce,type:"desktop-control-panel-right",testId:N.testId,icon:N.iconUrl,onClick:N.onClick,ariaLabel:(Ke=N.ariaLabel)!=null?Ke:N.tooltip,tooltipText:N.tooltip}}):[]]),Ut=ae(G),$i=gi([Ut],([c])=>J.features.additionalSettingsMenuItems?c.map(x=>x.type==="SWITCH"?{...x,onClick:x.onChangeEnabled}:x):[]),Lo=(c,x)=>{let N=ye(ni).map(ce=>ce.id!==c?ce:{...ce,...x});ni.set(N)},Yo=c=>{let x=ye(ni);if(x.some(N=>N.id===c.id)){D({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),ni.set(x)},ds=c=>{let x=ye(ni);if(!x.some(N=>N.id===c)){D({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}x=x.filter(N=>N.id!==c),ni.set(x)},gn=c=>{Ye.next(Wr.SeekAction.LIVE),D({message:"live switch to low latency "+c}),j.log("live switch to low latency "+c),B.setLiveLowLatency(c)},Kr=(c,x)=>{let N=ye(Ut).map(ce=>ce.id!==c?ce:{...ce,...x});Ut.set(N)},$a=c=>{let x=ye(Ut);if(x.some(N=>N.id===c.id)){D({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),Ut.set(x)},ya=c=>{let x=ye(Ut);if(!x.some(N=>N.id===c)){D({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}x=x.filter(N=>N.id!==c),Ut.set(x)},nr=ae(F),_l=gi([nr],([c])=>J.features.additionalContextMenuItems?c:[]),As=(c,x)=>{let N=ye(nr).map(ce=>ce.id!==c?ce:{...ce,...x});nr.set(N)},xa=c=>{let x=ye(nr);if(x.some(N=>N.id===c.id)){D({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),nr.set(x)},vt=c=>{let x=ye(nr);if(!x.some(N=>N.id===c)){D({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}x=x.filter(N=>N.id!==c),nr.set(x)},bt=gi([ci,rt],([c,x],N)=>{N(c&&x)}),Ji=()=>{Ye.next(Wr.SeekAction.LIVE),D({message:"switch to active live"}),j.log("switch to active live"),B.seekTime(0),B.info.playbackState$.getValue()!==li.PlaybackState.PLAYING&>.actions.internal.togglePlay()},jo=()=>{j.log("skip adman"),ne.skip()},eo=(c=!0)=>{(0,ht.assertNonNullable)(gt),D({message:`switch from ads to video, callPlay: ${c}`}),j.log("switch from ads to video",{callPlay:c}),re.set("video"),c&&B.play()},ai=()=>{(0,ht.assertNonNullable)(gt),D({message:"switch from video to ads"}),j.log("switch from video to ads"),gt.actions.internal.pause(),Jt(),re.set("ads")},Ii=c=>{(0,ht.assertNonNullable)(gt);let x=c?"LiveWaitingStart":"thumb";j.log("set live waiting start",{state:c,playerPhase:x}),re.set(x)},Ms=c=>{(0,ht.assertNonNullable)(gt);let x=c?"LiveWaitingRecover":"thumb";j.log("set live waiting recover",{state:c,playerPhase:x}),re.set(x)},wa=c=>{(0,ht.assertNonNullable)(gt);let x=c?"LiveWaitingRecord":"thumb";j.log("set live waiting record",{state:c,playerPhase:x}),re.set(x)},Pu=()=>((0,ht.assertNonNullable)(gt),j.log("get debug text data"),sh(B,de,gt)),Zd=()=>((0,ht.assertNonNullable)(gt),JSON.stringify(Me.getFinishedSpans())),Au=()=>((0,ht.assertNonNullable)(gt),ah(B,de,gt)),Ls=()=>Ee,Mu=()=>{D({message:"toggle chromecast"}),j.log("toggle chromecast"),B.toggleChromecast()},bl=c=>{var N;if((0,ht.assertNonNullable)(gt),B.info.isEnded$.getValue())return;let x=!c;if(ye(gt.playerPhase)==="ads"){D({message:`pause ads, internalCall: ${x}`}),j.log("pause ads",{internalCall:x}),ne.pause();return}D({message:`pause video, internalCall: ${x}`}),j.log("pause video",{internalCall:x}),x&&((N=l==null?void 0:l.onPause)==null||N.call(l)),B.pause()},Xd=c=>{var N;(0,ht.assertNonNullable)(gt);let x=!c;if(ye(gt.playerPhase)==="ads"){D({message:`play ads, internalCall: ${x}`}),j.log("play ads",{internalCall:x}),ne.play();return}D({message:`play video, internalCall: ${x}`}),j.log("play video",{internalCall:x}),x&&((N=l==null?void 0:l.onPlay)==null||N.call(l)),B.play()},Jd=c=>{(0,ht.assertNonNullable)(gt);let x=!c;if(ye(gt.playerPhase)==="ads"){D({message:"player cannot be stopped during ads via external method"});return}D({message:`player will be stopped, internalCall: ${x}`}),E==null||E()},ec=(c,x)=>{(0,ht.assertNonNullable)(gt),D({message:`first start, show ads: ${c}, internalCall: ${!x}`}),j.log("first start",{showAds:c,external:x}),c?re.set("ads"):(re.set("video"),x?B.play():gt.actions.internal.togglePlay())},Sa=()=>(D({message:"getting time codes"}),f),$l=()=>{let c=Sa();if(!c||[0,1].includes(c.length))return;let x=B.info.position$.getValue();return c.find(N=>N.time>x)},tc=c=>{let x=c;x||(x=$l());let N=B.info.position$.getValue();j.log("seek to next episode",{currentTime:N,...x}),x&&(D({message:"seek to next episode"}),Ao(x.time,Wr.SeekAction.EPISODE,!0))},ic=()=>{let c=Sa();if(!c||[0,1].includes(c.length))return;let x=B.info.position$.getValue(),N=c.findIndex(Ke=>Ke.time>x),ce=N===-1?c.length-2:N-2;if(!(ce<0))return c[ce]},oc=c=>{let x=c;x||(x=ic());let N=B.info.position$.getValue();j.log("seek to prev episode",{currentTime:N,...x}),x&&(D({message:"seek to prev episode"}),Ao(x.time,Wr.SeekAction.EPISODE,!0))},Lu=()=>(D({message:"getting preview thumbs data"}),j.log("get preview thumbs data",{..._}),_),nc=async()=>{let c=Ne==null?void 0:Ne.isActive(),x="none";Ne!=null&&Ne.isActive()?(x="remove",await(Ne==null?void 0:Ne.remove())):(x="request",await(Ne==null?void 0:Ne.request())),j.log("toggle picture in picture",{isActive:c,action:x})},Vu=(c=-90)=>{j.log("rotate video",{alphaDiff:c}),ut.update(x=>x+c)},Ca=ae([]);k==null||k.subscribe(c=>{let x=[];for(let N=0;N<c.length;N++){let{range:[ce,Ke],subjects:Ct}=c[N];N===0&&ce!==0&&x.push({time:0,text:"",interactive:!1,completed:!0}),x.push({time:ce/1e3,text:"",interactive:!0,completed:J.features.interactiveTimeOpenUri?!Ct.length||Ct.every(Rt=>Rt.isRemoved):!Ct.length}),Ke!==1/0&&x.push({time:Ke/1e3,text:"",interactive:!1,completed:!0})}Ca.set(x)});let Ru=ae(!1);P==null||P.subscribe(c=>{c&&ye(or)&&Ht()});let Ue=c=>{if(!S)return c;let x=ye(Ca),N=ye(Ci),Ke=ye(Ri)/N,Ct=x.find(Rt=>Rt.interactive&&!Rt.completed&&Rt.time>Ke);return typeof(Ct==null?void 0:Ct.time)=="number"?Math.min(c,Ct.time-.05):c},ri=()=>{gt.ui.episodes.panelOpened$.set(!1)},Zo=()=>{j.log("destroy store"),clearTimeout(ot),clearTimeout(Bn),Qe.unsubscribe(),dt.unsubscribe(),B.destroy(),ne.destroy(),pe==null||pe.destroy(),Ie==null||Ie.destroy(),Dt.unsubscribe(),Je==null||Je.disconnect(),Je=null,at.destroy()},gt={interfaceLanguage$:qt,isCyrillicRelatedInterface$:Gt,initVideo:Ce,videoId:i,isClip:o,playerPhase:W,vsid:Pe,state:{positionExact$:_t,positionWithScrubbing$:Dn,duration$:Ci,playbackState$:Et,isPlaying$:to,isLoaderVisible:Hi,bufferedProgress$:Mn,isLive$:Mi,canChangePlaybackSpeed$:Si,isActiveLive$:dn,isOldestAvailableLive$:Sn,isRewindableLive$:Qn,isEnded$:ei,muted$:Li,volume$:Qi,trafficSavingEnabled$:Do,highQualityEnabled$:Oi,autoQualityLimitingAvailable$:Ot,availableVideoStreams$:ko,availableAudioStreams$:Cn,videoStream$:Vr,audioStream$:pr,currentQuality$:jn,isAutoQualityEnabled$:pn,availableQualities$:fn,currentPlaybackRate$:mn,availablePlaybackRates$:qo,currentSubtitle$:Yi,availableTextTracks$:Zn,availableSubtitlesList$:io,currentSubtitleCaptions$:go,isAutoSubtitleCaptionVisible$:no,chromecastState$:Kt,chromecastDeviceName$:mo,chromecastConnected$:cn,currentFormat$:jt,throughputEstimation$:Kn,videoBitrate$:Co,videoSize$:To,errorLog$:nt,crashed$:rt,isAudioAvailable$:yt,isAudioDisabled:!!s,canDownload:J.features.download&&!!d,availableSources$:Oo,hasMpegSources$:Rr,isInteractive:S,showInteractiveGraph:J.features.interactiveGraph,showSeekToInteractive:J.features.seekToInteractive,showPlayPrevChapter:J.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:J.features.interactiveTimeIndicator&&!!ye(Ca).length,interactiveEpisodes$:Ca,isInteractiveTime$:P?Yt(P):ae(!1),isInteractiveExpectation$:Ru,hasInteractiveBranches:T,playPrevChapterDisabledTooltip:V,looped$:Wo,loadedMetadata$:ae(!1),isAutoQualityAvailable$:In},ui:{t:Be,controlsVisible:ae(!1),touched:ae(!1),controls:{prevButton:ae(void 0),playButton:ae(void 0),replayButton:ae(void 0),nextButton:ae(void 0),playPrevChapterButton:ae(void 0),seekToInteractiveButton:ae(void 0),interactiveGraphButton:ae(void 0),liveButton:ae(void 0),time:ae(void 0),episodes:ae(void 0),volume:ae(void 0),subtitles:ae(void 0),settings:ae(void 0),context:ae(void 0),chromecast:ae(void 0),pip:ae(void 0),fullscreen:ae(void 0),vkLogo:ae(void 0),interactiveTimeIndicator:ae(void 0),timeline:ae(void 0),autoplayNextToggle:ae(void 0),additionalButtons:U.length?U.reduce(c=>[...c,ae(void 0)],[]):[],disabledControls$:se},modals:{hotKeyMap:{show:ae(!1),data:ae({title:"",closeBtnText:"",groups:[]})}},isFullscreen:$e,isFullscreenOpenedByKeyboard:Le,rotateAlpha:ut,isAutoplay:ae(!1),debugPanelVisible:ae(!1),episodes:{panelOpened$:ae(!1),openedByKeyboard$:ae(!1)},contextMenu:{visible$:ae(!1),btnRef$:ae(void 0),openedByBtnKeyboard$:ae(!1),openedByHotKey$:ae(!1),lastActiveElem$:ae(void 0),showContextMenuBtn$:ae(!1),position$:ae({top:0,left:0})},playerSize:Pt,isMobile:ci,mobileNotReportControlHidden$:bt,mobileUnmuteButtonExpanded:ae(!1),mobileUnmuteButtonVisible:ae(!1),icon3DVideoVisible:ae(!1),scrubbingInProgress:or,volumeChangingInProgress:xe,is3DVideo:ae(!1),currentGridType$:Zt,additionalButtonsDeprecated$:_o,additionalDesktopControlPanelRightButtons$:ze,additionalSettingsMenuItems$:$i,additionalContextMenuItems$:_l,interactiveHideMobileControls:ae(!1),overlayContainer$:ae(void 0),startedByKeyboard$:ae(!1),autoplayNextEnabled$:ae(!1),timerNextVideoRunning$:ae(!0),settingsMenu:{visible$:ae(!1),ref$:ae(void 0),openedByBtnKeyboard$:ae(!1)},settingsSubMenu:{visible$:ae(!1),ref$:ae(void 0),name$:ae(void 0)},aboutToGoNextVideo:ae(void 0),userActionsDisabled:ae(!1)},ads:{position:ae(0),duration:ae(0),playbackState:ae("inactive"),canSkip:ae(!1),secondsToWatchBeforeSkip:ae(0),postrollPassed:ae(!1)},webApi:{pictureInPictureApi:Ne,annotationsApi:fe},actions:{internal:{preload:ui,firstStart:c=>ec(c,!1),play:()=>Xd(!1),pause:()=>bl(!1),togglePlay:Xe,toggleMuted:Vn,openSettingsMenu:Nr,closeSettingsMenu:Rn,openSettingsSubMenu:vr,closeSettingsSubMenu:Jn,setVolume:Nn,startVolumeChanging:Vt,stopVolumeChanging:di,setVideoStream:Gn,setAudioStream:Tn,setQuality:Lt,setTrafficSavingEnabled:Zi,setHighQualityEnabled:_i,setPlaybackRate:Ho,incrementPlaybackRate:so,decrementPlaybackRate:tr,setSubtitle:vn,toggleSubtitle:hr,togglePictureInPicture:nc,startScrubbing:xr,progressScrubbing:ho,completeScrubbing:Go,toggleChromecast:Mu,switchToActiveLive:Ji,switchFromAdsToVideo:eo,switchFromVideoToAds:ai,skipAd:jo,setLiveWaitingStart:Ii,setLiveWaitingRecover:Ms,setLiveWaitingRecord:wa,getDebugTextData:Pu,getTraceTextData:Zd,getDebugPanelData:Au,getVideoElement:Ls,seekTime:(c,x,N)=>Ao(c,x,N),clearDelayedBufferingCheckTimeout:wn,seekEpisodeStartTime:_r,seekToPercent:br,getNextEpisode:$l,seekToNextEpisode:tc,getPrevEpisode:ic,seekToPrevEpisode:oc,startLogging:ti,stopLogging:Bi,startCameraManualRotation:No,stopCameraManualRotation:Di,moveCameraFocusPX:So,holdCamera:Bo,releaseCamera:Mt,getVideoEpisodes:Sa,getPreviewThumbsData:Lu,downloadVideo:mr,addLanguage:Up,setLanguage:xt,nextMovie:pt,videoRotate:Vu,correctSeekTimeToInteractive:Ue,replayInteractive:A,setLooped:gr,reportProblem:Br,setAutoplayNextEnabled:it,setTimerNextVideoRunning:ft,prevVideoClick:Ti,nextVideoClick:ro,nextVideoAnnouncementShow:Io,nextVideoAnnouncementClick:Eo,nextVideoAnnouncementAuto:Ko,nextVideoAnnouncementCancel:Po},external:{firstStart:c=>ec(c,!0),play:()=>Xd(!0),pause:()=>bl(!0),stop:()=>Jd(!0),seekTime:c=>$r(c),seekEpisodeStartTime:c=>Qo(c),setPlaybackRate:c=>yr(c),setAutoQualityLimits:c=>Dr(c),setMuted:oi,setVolume:Nn,returnFocusToEpisodes:ri,updateAdditionalSettingsItem:Kr,addAdditionalSettingsItem:$a,removeAdditionalSettingsItem:ya,updateAdditionalContextItem:As,addAdditionalContextItem:xa,removeAdditionalContextItem:vt,updateAdditionalButton:Lo,addAdditionalButton:Yo,removeAdditionalButton:ds,setLiveLowLatency:gn}},callbacks:l,setUiCallbacks:c=>{Ge={...c}},getAdmanWrapper:()=>ne,getLogger:()=>Re,getPlayer:()=>B,destroy:Zo};return gt};function pa(t,e,i,o){var _;let n=["interactiveTimeIndicator"],a=(_=e[i])==null?void 0:_.getBoundingClientRect(),s=(o||n.includes(i))&&!!a&&!!(a.right-a.left),{top:d,left:l,bottom:p,right:f}=sl(e[i],t||void 0);return{left:s?l:0,right:s?f:0,top:s?d:0,bottom:s?p:0,isDisplayed:s}}var ru=(t,e,i,o)=>{if(t)for(let[n,a]of Object.entries(e))["tooltipPointerOffsetX","disabledControls$","additionalButtons"].includes(n)||a.set(pa(t,i,n,o))};var su=async(t,e,i)=>{await yo(),e&&i&&(i.focus(),t.set(!1))};var v2=be('<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 Hf(t,e){let i=ke(e,["$$slots","$$events","$$legacy","children"]);var o=v2();let n;var a=h(o);ge(a,()=>{var s;return(s=e.children)!=null?s:ie}),_e(),g(o),I(()=>n=we(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})),b(t,o)}function Ff(t,e){z(e,!0);let[i,o]=He(),n=()=>C(l,"$contextMenuVisible$",i),a=v(e,"disabled",3,!1),s=v(e,"ariaLabel",3,""),d=Se(),l=d.ui.contextMenu.visible$,p=d.ui.contextMenu.openedByBtnKeyboard$,f=d.ui.contextMenu.showContextMenuBtn$,_=d.ui.contextMenu.position$,u=d.ui.contextMenu.btnRef$,$=ee(void 0);qe(()=>{r($)&&$t(()=>{u.set(r($))})});let w=P=>{let A=ws(P),E=Uh(r($));_.set(E),p.set(A),l.set(!n())},y=()=>{f.set(!0)},S=()=>{f.set(!1)},k=m(()=>n()?"opened":"");At(t,{get className(){return r(k)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return s()},click:w,focus:y,blur:S,get ariaExpanded(){return n()},get ref(){return r($)},set ref(P){O($,me(P))},children:(P,A)=>{Hf(P,{})},$$slots:{default:!0}}),q(),o()}var g2=t=>{t.stopPropagation()},h2=L("<div><!> <div></div> <div></div></div>"),_2={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;}
|
|
229
|
+
`)),b(D,de)};R(j,D=>{r(P)&&D(B)})}var Re=M(j,2),ne=h(Re);{var Ie=D=>{var de=Fe(),Ee=ue(de);{var Ge=Pe=>{var $e=ar();I(Le=>ve($e,Le),[()=>H("tooltip_episode_unfinished")]),b(Pe,$e)},at=Pe=>{var $e=ar();I(()=>ve($e,r(U).text||"")),b(Pe,$e)};R(Ee,Pe=>{u()&&r(U).completed===!1?Pe(Ge):Pe(at,!1)})}b(D,de)};R(ne,D=>{r(U)&&D(Ie)})}g(Re);var Ne=M(Re,2);{var fe=D=>{var de=Y$(),Ee=h(de,!0);g(de),I(()=>ve(Ee,d())),b(D,de)};R(Ne,D=>{u()||D(fe)})}g(J),I(D=>{Me=te(J,1,"timeline-preview svelte-1wqg760",null,Me,D),tt(J,`width: ${r(G)?r(k):r(S)}px;`)},[()=>({mobile:l()})]),b(t,J),q(),o()}var X$=L('<span class="time svelte-1jr6obn"> </span>'),J$=L("<!> <!>",1),e2={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 Lf(t,e){var he;z(e,!0),K(t,e2);let[i,o]=He(),n=()=>C(Y,"$interactiveEpisodes$",i),a=()=>C(E,"$duration$",i),s=()=>C(A,"$position$",i),d=()=>C(pe,"$isInteractiveExpectation$",i),l=()=>C(oe,"$isInteractiveTime$",i),p=()=>C(T,"$isLive$",i),f=()=>C(U,"$isMobile",i),_=()=>C(V,"$isActiveLive$",i),u=()=>C(P,"$bufferedProgress$",i),$=()=>C(Ae,"$disabledControls$",i),w=v(e,"showTimeline",3,!1),y=v(e,"ref",15,void 0),S=Se(),k=Qt(),P=S.state.bufferedProgress$,A=S.state.positionWithScrubbing$,E=S.state.duration$,T=S.state.isLive$,V=S.state.isActiveLive$,U=S.ui.isMobile,G=k.features.episodes?S.actions.internal.getVideoEpisodes():void 0,F=S.actions.internal.getPreviewThumbsData(),Y=S.state.interactiveEpisodes$,X=S.state.isInteractive,oe=S.state.isInteractiveTime$,pe=S.state.isInteractiveExpectation$,le=S.actions.internal.correctSeekTimeToInteractive,Ve=(he=S.callbacks)==null?void 0:he.onDisabledTimelineClick,Ae=S.ui.controls.disabledControls$,J=S.ui.t,Me=k.features.interactiveResponsiveUi,j=m(()=>X?n():G),B=m(()=>cr(a())),Re=m(()=>cr(s())),ne=m(()=>s()/a()),Ie=m(()=>d()||l()),Ne=ee(!1),fe=ee(""),D=ee(0),de=ee(0),Ee=ee(0),Ge=m(()=>({containerWidth:r(de),translateXPx:r(D),translateYPx:X&&F?-36:-16,active:r(Ne)&&w()&&!r(Ie)&&!Me,pointer:!k.features.timelinePreview||!F||p()})),at=J("aria_timeline"),Pe=m(()=>J("aria_timeline_value",{position:r(Re),duration:r(B)}));function $e(Ce){return!le||!X?Ce:le(Ce*a())/a()}function Le(Ce){S.actions.internal.startScrubbing($e(Ce))}function Ze(Ce){l()||S.actions.internal.progressScrubbing($e(Ce))}function ut(Ce){S.actions.internal.completeScrubbing($e(Ce)),O(Ne,!1)}function nt(Ce,De,pt){xt(Ce,De,pt),O(Ne,!0)}function Dt(Ce,De,pt){xt(Ce,De,pt),O(Ne,!0)}function rt(){O(Ne,!1)}function xt(Ce,De,pt){O(Ee,me($e(Ce))),O(D,me(De)),pt&&O(de,me(pt)),O(fe,me(qt(Ce)))}function qt(Ce){let De=cr((p()?1-Ce:Ce)*a());return p()?`-${De}`:De}var Gt=J$(),Be=ue(Gt);Af(Be,os(()=>r(Ge),{children:(Ce,De)=>{var pt=Fe(),Wt=ue(pt);{var Ye=Je=>{Mf(Je,{get time(){return r(fe)},get isMobile(){return f()},get videoEpisodes(){return r(j)},previewThumbsData:F,get progress(){return r(Ee)},get duration(){return a()},isInteractive:X})},lt=Je=>{var kt=X$(),Jt=h(kt,!0);g(kt),I(()=>ve(Jt,r(fe))),b(Je,kt)};R(Wt,Je=>{k.features.timelinePreview&&F&&!p()?Je(Ye):Je(lt,!1)})}b(Ce,pt)},$$slots:{default:!0}}));var re=M(Be,2);let W=m(()=>Math.round(r(ne)*100)),se=m(()=>$().has("TIMELINE"));ca(re,{className:"timeline-slider",get isActiveLive(){return _()},get isMobile(){return f()},ariaLabel:at,ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return r(W)},get ariaValueText(){return r(Pe)},get loadedProgress(){return u()},get filledProgress(){return r(ne)},get handleProgress(){return r(ne)},get videoEpisodes(){return r(j)},onPointerDown:Le,onHandleMove:Ze,onPointerMove:Dt,onPointerUp:ut,onPointerEnter:nt,onPointerLeave:rt,onDisabledClick:Ve,isInteractive:X,get disabled(){return r(se)},get hideHandel(){return l()},get ref(){return y()},set ref(Ce){y(Ce)}}),b(t,Gt),q(),o()}var t2={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 hd(t,e){z(e,!0),K(t,t2);let[i,o]=He(),n=()=>C(l,"$isMobile",i),a=v(e,"position",3,0),s=v(e,"duration",3,0),d=Se(),l=d.ui.isMobile,p=d.ui.t,f=m(()=>cr(s())),_=m(()=>cr(a())),u=m(()=>a()/s()),$=m(()=>p("aria_timeline_value",{position:r(_),duration:r(f)})),w=m(()=>Math.round(r(u)*100));ca(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return s()},get ariaValueNow(){return r(w)},get ariaValueText(){return r($)},get filledProgress(){return r(u)},hideHandel:!0,get squareBorders(){return n()}}),q(),o()}var i2=L("<div><!></div>"),o2=L("<div></div>"),n2={hash:"svelte-1gqonyf",code:".timeline.svelte-1gqonyf {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-1gqonyf {height:16px;padding:6px 12px 7px;margin-top:6px;}.timeline-stub.svelte-1gqonyf {width:100%;min-width:20px;}.timeline-stub.mobile.svelte-1gqonyf {height:8px;}"};function _d(t,e){z(e,!0),K(t,n2);let[i,o]=He(),n=()=>C(u,"$isLive$",i),a=()=>C(y,"$isMobile",i),s=()=>C(w,"$adPosition",i),d=()=>C($,"$adDuration",i),l=v(e,"isAds",3,!1),p=v(e,"isHidden",3,!1),f=v(e,"ref",15,void 0),_=Se(),u=_.state.isLive$,$=_.ads.duration,w=_.ads.position,y=_.ui.isMobile,S=m(()=>!p()&&(!n()||n()&&e.canRewindLive&&e.isRewindableLive||l()));var k=Fe(),P=ue(k);{var A=T=>{var V=i2();let U;var G=h(V);{var F=X=>{hd(X,{get position(){return s()},get duration(){return d()}})},Y=X=>{Lf(X,{get showTimeline(){return r(S)},get ref(){return f()},set ref(oe){f(oe)}})};R(G,X=>{l()?X(F):X(Y,!1)})}g(V),I(X=>U=te(V,1,"timeline svelte-1gqonyf",null,U,X),[()=>({mobile:a()})]),b(T,V)},E=T=>{var V=o2();let U;I(G=>U=te(V,1,"timeline-stub svelte-1gqonyf",null,U,G),[()=>({mobile:a()})]),b(T,V)};R(P,T=>{r(S)?T(A):T(E,!1)})}b(t,k),q(),o()}var n1=require("@vkontakte/videoplayer-shared/es2018");var r2=be('<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 Vf(t,e){let i=ke(e,["$$slots","$$events","$$legacy","children"]);var o=r2();let n;var a=h(o);ge(a,()=>{var s;return(s=e.children)!=null?s:ie}),_e(3),g(o),I(()=>n=we(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})),b(t,o)}var s2=be('<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 Rf(t,e){let i=ke(e,["$$slots","$$events","$$legacy","children"]);var o=s2();let n;var a=h(o);ge(a,()=>{var s;return(s=e.children)!=null?s:ie}),_e(),g(o),I(()=>n=we(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})),b(t,o)}var a2=L('<span class="text mobile svelte-1yhs2ga"> </span> <div class="chevron-episodes svelte-1yhs2ga"><!></div>',1),l2=L('<span class="text svelte-1yhs2ga"> </span>'),d2=L('<span class="text count svelte-1yhs2ga"> </span>'),c2=L("<!> <!>",1),u2={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 bd(t,e){var le,Ve,Ae;z(e,!0),K(t,u2);let[i,o]=He(),n=()=>C(w,"$currentGridType$",i),a=()=>C(y,"$openedByKeyboard$",i),s=()=>C(S,"$panelOpened$",i),d=()=>C(k,"$isMobile",i),l=v(e,"position",3,0),p=v(e,"duration",3,0),f=v(e,"timeCodes",19,()=>[]),_=Se(),u=(Ve=(le=_.callbacks)==null?void 0:le.onEpisodeChanged)!=null?Ve:n1.noop,$=!!((Ae=_.callbacks)!=null&&Ae.onEpisodeClicked),w=_.ui.currentGridType$,y=_.ui.episodes.openedByKeyboard$,S=_.ui.episodes.panelOpened$,k=_.ui.isMobile,P=_.ui.t,A=ee(void 0),E=J=>{var j,B,Re;if(!!((j=_.callbacks)!=null&&j.onEpisodeClicked)){let ne=ws(J);y.set(ne),S.set(!0),(Re=(B=_.callbacks)==null?void 0:B.onEpisodeClicked)==null||Re.call(B,ne)}},T=ee(null),V=m(()=>l()/p());qe(()=>{var Me;let J=Xc(r(V),p(),f());J?((Me=r(T))==null?void 0:Me.time)!==J.time&&(u(J),O(T,me(J))):O(T,null)});let U=m(()=>{var J;return((J=r(T))==null?void 0:J.text)||""}),G=m(()=>qi(n(),"xl")?"FULL":qi(n(),"m")&&Zh(n(),"xl")?"COUNT":"SHORT"),F=m(()=>`${P("tooltip_episodes")}: ${r(U)}`),Y=async(J,Me,j)=>{await yo(),(J==null?void 0:J.getAttribute("aria-expanded"))==="false"&&Me&&!j&&$t(()=>{y.set(!1),J.focus()})};qe(()=>{Y(r(A),a(),s())});var X=Fe(),oe=ue(X);{var pe=J=>{let Me=m(()=>d()?"px-0":"");At(J,{get className(){var j;return`w-max btn-full-opacity btn-jc-l ${(j=r(Me))!=null?j:""}`},testId:"btn-episodes",click:E,disabled:!$,get ariaExpanded(){return s()},get ariaLabel(){return r(F)},get ref(){return r(A)},set ref(j){O(A,me(j))},children:(j,B)=>{var Re=Fe(),ne=ue(Re);{var Ie=fe=>{var D=a2(),de=ue(D),Ee=h(de,!0);g(de);var Ge=M(de,2),at=h(Ge);Rf(at,{}),g(Ge),I(()=>ve(Ee,r(U))),b(fe,D)},Ne=fe=>{var D=c2(),de=ue(D);Vf(de,{});var Ee=M(de,2);{var Ge=Pe=>{var $e=l2(),Le=h($e,!0);g($e),I(()=>ve(Le,r(U))),b(Pe,$e)},at=(Pe,$e)=>{{var Le=Ze=>{var ut=d2(),nt=h(ut,!0);g(ut),I(()=>ve(nt,f().length)),b(Ze,ut)};R(Pe,Ze=>{r(G)==="COUNT"&&Ze(Le)},$e)}};R(Ee,Pe=>{r(G)==="FULL"?Pe(Ge):Pe(at,!1)})}b(fe,D)};R(ne,fe=>{d()?fe(Ie):fe(Ne,!1)})}b(j,Re)},$$slots:{default:!0}})};R(oe,J=>{r(T)&&J(pe)})}b(t,X),q(),o()}var h1=require("@vkontakte/videoplayer-shared/es2018");var li=require("@vkontakte/videoplayer-core/es2018"),ht=require("@vkontakte/videoplayer-shared/es2018"),Wr=require("@vkontakte/videoplayer-statistics/es2018");var We=require("@vkontakte/videoplayer-shared/es2018"),Wi=require("@vkontakte/videoplayer-shared/es2018");var r1=(t,e)=>t<400||e<225?5:t<640||e<360?0:t<960||e<540?1:t<1280||e<720?2:3;var p2="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Jc=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 Wi.Subject,loadStarted$:new Wi.Subject,loadEnded$:new Wi.Subject,loadError$:new Wi.Subject,ready$:new Wi.Subject,slotRequested$:new Wi.Subject,started$:new Wi.Subject,timeRemained$:new Wi.Subject,paused$:new Wi.Subject,resumed$:new Wi.Subject,ended$:new Wi.Subject,empty$:new Wi.Subject,skipped$:new Wi.Subject,clicked$:new Wi.Subject,closed$:new Wi.Subject,error$:new Wi.Subject};this.loadAdman=e=>(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[(0,We.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?(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[(0,We.now)()]}),i(),this.events.loadEnded$.next()):(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[(0,We.now)()]}),o())};(0,Wi.addScript)(p2,e,this.loadTimeout).then(()=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[(0,We.now)()]}),window.AdmanHTML?(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[(0,We.now)()]}),i(),this.events.loadEnded$.next()):(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[(0,We.now)()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout))}).catch(s=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(s)],numbers:[(0,We.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?(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[(0,We.now)()]}),i(),this.events.loadEnded$.next()):(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[(0,We.now)()]}),o())},s=()=>{d=!0,o()},d=!1,l=window.setTimeout(()=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[(0,We.now)()]}),s()},this.loadTimeout);e.addEventListener("abort",s),e.aborted&&(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[(0,We.now)()]}),s()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[(0,We.now)()]}),!d&&(window.AdmanHTML?(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[(0,We.now)()]}),i(),this.events.loadEnded$.next()):(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[(0,We.now)()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout)))},s).finally(()=>{clearTimeout(n),clearTimeout(l),e.removeEventListener("abort",s)})});this.onAdsReady=()=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[(0,We.now)()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[(0,We.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"}),ye(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=()=>{var e;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.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=()=>{var e;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.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(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[(0,We.now)()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.log({message:"ad completed"}),this.currentAdSection?this.events.ended$.next(this.currentAdSection):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[(0,We.now)()]}),this.log({message:e}),this.events.error$.next(e),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[(0,We.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){var A;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[(0,We.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:p={},duration:f,previewParam:_}=e,u,$=this.playerState&&ye(this.playerState.vsid);$&&(this.isVsidOriginal?u=$:u=parseInt($,36));let{isEmbed:w,immediateOrigin:y}=(0,We.detectEmbed)(),S=(A=w?y:window.location.href)!=null?A:window.location.href,k={...p,dl:encodeURIComponent(S),autoplay:a?1:0,player_width:i,player_height:o,preview:_,...u?{request_id:u}:{},duration:f,puid10:r1(i,o),puid11:n?0:1};_||delete k.preview;let P={slot:l,wrapper:s,videoEl:d,videoQuality:o,params:k,browser:{mobile:!1}};try{let E=new window.AdmanHTML;E.setDebug(!1),E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.init(P),this.adman=E,this.videoElement=d,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(P)}`})}catch(E){We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[(0,We.now)()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,n,a;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[(0,We.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 s="Switch to video: Adman state was not updated correctly";this.log({message:s}),this.events.error$.next(s)}(a=(n=this.actions).switchFromAdsToVideo)==null||a.call(n,!i)}}togglePlay(){var e;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.adsState){this.log({message:"toggle play"});let i=ye(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[(0,We.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(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&clearTimeout(this.watchDogTimeout),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[(0,We.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,n,a,s,d,l,p,f,_,u;We.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[(0,We.now)()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(n=this.adman)==null||n.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(s=this.adman)==null||s.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(l=this.adman)==null||l.onClicked(void 0),(p=this.adman)==null||p.onTimeRemained(void 0),(f=this.adman)==null||f.onCompleted(void 0),(_=this.adman)==null||_.onError(void 0),(u=this.adman)==null||u.destroy(),this.videoElement&&(0,Wi.clearVideoElement)(this.videoElement),this.isDestroyed=!0}};var s1=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 Nf=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 p=new eu,{startTime:f,endTime:_}=p.parse(l);s.startTime=f,s.endTime=_}else if(l.trim()!==""){let p=new Bf,{texts:f}=p.parse(l);s.texts=[...s.texts,...f]}(s.startTime||s.endTime)&&s.texts.length>0&&o.push(s)}return o}},eu=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}},Bf=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 p=["<",">"].reduce((f,_)=>{let u=s.indexOf(_,d);return f===-1||f>u?u:f},-1);if(p===-1){l.push(s.substring(d));break}l.push(s.substring(d,p)),d=p+1}return l}}),a=new eu;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}},a1=Nf;var iu=require("@vkontakte/videoplayer-shared/es2018"),ua,wi,Df=0,Of=!1,l1="",d1=(t,e=0,i=0)=>t<e&&t<i,tu=(t,e=0,i=0)=>t>=e&&t<=i,f2=(t,e=0,i=0)=>t>e&&t>i,c1=(t,e,i,o=!1)=>{var d;let n=(d=i.find(({id:l})=>l===e.value))==null?void 0:d.subtitles;if(o)return n==null?void 0:n.find(({startTime:p,endTime:f})=>tu(t,p,f));let a=t>=Df,s=t<Df;if(Df=t,s&&(Of=!1),(0,iu.isNonNullable)(ua)&&tu(t,ua.startTime,ua.endTime)&&l1===e.value)return ua;if(!(0,iu.isNonNullable)(wi)&&(n!=null&&n.length)&&!Of){wi=n.find(({startTime:p,endTime:f})=>tu(t,p,f)||a&&d1(t,p,f)),ua=void 0,!(0,iu.isNonNullable)(wi)&&n[n.length-1].endTime<t&&(Of=!0);return}else{if(tu(t,wi==null?void 0:wi.startTime,wi==null?void 0:wi.endTime))return ua=wi,wi=void 0,l1=e.value,ua;(a&&f2(t,wi==null?void 0:wi.startTime,wi==null?void 0:wi.endTime)||s&&d1(t,wi==null?void 0:wi.startTime,wi==null?void 0:wi.endTime))&&(wi=void 0)}};var u1={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"},m2={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"},ou=t=>{var e,i;return(i=(e=u1[t])!=null?e:u1[m2[t]])!=null?i:void 0};var p1=require("@vkontakte/videoplayer-shared/es2018"),iN=require("@vkontakte/videoplayer-statistics/es2018"),nu=class{constructor(e,i=new p1.Subscription){this.oneStat=e;this.statSubscription=i}destroy(){this.oneStat.destroy(),this.statSubscription.unsubscribe()}};var $d=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))($d||{});var qr=t=>t!=null?t:0,sl=(t,e)=>{var n,a;let i=(n=t==null?void 0:t.getBoundingClientRect)==null?void 0:n.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(qr(i==null?void 0:i.top)-qr(o==null?void 0:o.top)),left:Math.round(qr(i==null?void 0:i.left)-qr(o==null?void 0:o.left)),bottom:Math.round(qr(i==null?void 0:i.bottom)-qr(o==null?void 0:o.top)),right:Math.round(qr(i==null?void 0:i.right)-qr(o==null?void 0:o.left))}},al=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:qr(e==null?void 0:e.width),height:qr(e==null?void 0:e.height)}};var f1=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:n,statAuthToken:a,isAudioDisabled:s,canDownload:d,callbacks:l,webApi:p,videoEpisodes:f,previewThumbsData:_,uiConfig:u,coreConfig:$,player:w,disabledControls:y,isInteractive:S,interactiveRanges$:k,isInteractiveTime$:P,replayInteractive:A,stopPlayer:E,hasInteractiveBranches:T,playPrevChapterDisabledTooltip:V,additionalButtons:U,additionalSettingsMenuItems:G,additionalContextMenuItems:F,playPrevVideo:Y,playNextVideo:X,looped:oe=!1,statistics:pe,saveRate:le,internalsExposure:Ve})=>{var Fo,nv,rv;let Ae={...$,configName:[...(Fo=$.configName)!=null?Fo:[],"ui"],isAudioDisabled:s,live:{...(nv=$.live)!=null?nv:{},isLiveCatchUpMode:!!n}},J=u,Me=ht.Tracer.createRootTracer(J.features.saveTraceInfoToFile),j=Me.createComponentTracer("Store"),B=w||new li.Player(Ae,Me);Ve==null||Ve.expose({corePlayer:B});let Re=new ht.Logger,ne=new Jc(Re,{loadTimeout:J.ads.loadTimeout,initTimeout:J.ads.initTimeout,runtimeTimeout:J.ads.runtimeTimeout,useAdmanFromNPM:J.ads.useAdmanFromNPM,volumeMultiplier:J.ads.volumeMultiplier,isVsidOriginal:J.ads.isVsidOriginal}),Ie=ea.getInstance(),Ne=p==null?void 0:p.pictureInPictureApi,fe=p==null?void 0:p.annotationsApi,D=Re.createComponentLog("Store"),de,Ee,Ge={},at=new Mc,Pe=pe?Yt(pe.oneStat.vsid$):dr(void 0),$e=ae($s()),Le=ae(!1),Ze=(rv=Ne==null?void 0:Ne.info.isActive$)!=null?rv:new ht.ValueSubject(!1),ut=ae(0),nt=ae([]),Dt=(0,ht.merge)(B.events.fatalError$,B.events.managedError$).subscribe(c=>nt.update(x=>[...x,c])),rt=dr(!1,c=>{let x=B.events.fatalError$.subscribe(()=>c(!0));return()=>x.unsubscribe()}),xt=async c=>{var ce;let x=Object.values(ht.InterfaceLanguage).includes(c);if(J.downloadVKLanguages&&(x&&J.updateBuiltinLanguages||!zp(c))){let Ke;try{Ke=await(0,ht.loadVKLangPack)(c,Yg,jg)}catch(Ct){(ce=pe==null?void 0:pe.oneStat)==null||ce.logError({errorType:"VKLangPack",fatal:!1}),Ie==null||Ie.report(Ct,{errorType:"VKLangPack",fatal:!1})}Ke&&(Up({language:c,pack:Ke,fallback:J.defaultLanguage}),qt.set(c))}zp(c)&&qt.set(c)},qt=ae(t),Gt=ae(e);xt(t);let Be=(c,x)=>{let N=ye(qt);return qp(N,c,x,J.defaultLanguage)},re=ae("thumb"),W=(()=>{let c=gi([rt,re],([x,N])=>x?"crashed":N);return{...c,is:x=>ye(c)===x}})(),se=(()=>{let c=ae(new Set(y));return{...c,add:x=>{c.update(N=>new Set([...N].concat(x)))},remove:x=>{c.update(N=>{let ce=[...N];return new Set(Array.isArray(x)?ce.filter(Ke=>!x.includes(Ke)):ce.filter(Ke=>Ke!==x))})},includes:x=>{let N=ye(c);return Array.isArray(x)?x.every(ce=>N.has(ce)):N.has(x)}}})();j.log("create store"),D({message:"create store"});let he=c=>{let x=c.container;x.append(B.experimental.element$.getValue()),Je=new MutationObserver(N=>{let{removedNodes:ce}=N[0];ce.length&&x.append(B.experimental.element$.getValue())}),Je.observe(x,{childList:!0})},Ce=c=>{D({message:`init video, config: ${JSON.stringify(c)}`}),S?he(c):(ht.devNull.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[(0,ht.now)()]}),B.initVideo(c)),j.log("init video",{isInteractive:S}),c.subtitles&&B.setExternalTextTracks(c.subtitles),de=c},De=new ht.Subject,pt=c=>De.next(c),Wt=new ht.Subject,Ye=new ht.Subject,lt=new ht.Subject,Je=null,kt={actionRewind$:Wt,actionSeek$:Ye,inPiP$:Ze,inFullscreen$:new ht.Observable(c=>$e.subscribe(x=>c.next(x))),actionSetSubtitle$:lt,nextMovie$:De};if(pe){let{oneStat:c,statSubscription:x}=pe;S||x.add(c.attachTo(B)),x.add(c.attachToUi(kt)),x.add(c.attachToAds(ne.events)),c.authorize(a).catch(N=>{D({message:`onestat auth error ${String(N)}`})})}if(Ie){let c=new ht.Subscription,x=(N,ce)=>c.add(N.subscribe(ce));if(x(B.events.managedError$,N=>{Ie.logIError(N)}),x(B.events.fatalError$,N=>{Ie.logIError(N,!0)}),pe){let{oneStat:N}=pe;x(N.experimental.error$,ce=>{Ie.logIError(ce)})}Ie.sentrySubscription.add(c)}let Jt=()=>{li.clientChecker.device.isIOS&&Ee&&Mh(Ee).catch(c=>{D({message:`exitIosSafariFullscreen failed: ${c}`})})},Qe=new ht.Subscription().add(B.experimental.element$.subscribe(c=>{c&&(Ee=c,c.classList.add("player-media"),ia(Ne)&&(Ne.updateVideoElement(),Ne.registryEventHandlers()),S&&c.setAttribute("pip","false"))})).add(B.events.ended$.subscribe(()=>{var c;Jt(),(c=l==null?void 0:l.onEnded)==null||c.call(l)})).add(B.events.looped$.subscribe(()=>{var c;(c=l==null?void 0:l.onLooped)==null||c.call(l)})).add(B.events.started$.subscribe(async()=>{var x,N;ia(Ne)&&await(Ne==null?void 0:Ne.revealPictureInPicture());let c=B.info.muted$.getValue();(x=l==null?void 0:l.onStarted)==null||x.call(l),(N=Ge.onStarted)==null||N.call(Ge,c)})).add(B.events.willSeek$.subscribe(({from:c,to:x})=>{var N;(N=l==null?void 0:l.onSeek)==null||N.call(l,c,x)})).add(B.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=l==null?void 0:l.onAutoplaySoundProhibited)==null||c.call(l)})).add(B.info.position$.subscribe(c=>{var N;let x=B.info.duration$.getValue();isFinite(x)&&x>0&&((N=l==null?void 0:l.onTimeupdate)==null||N.call(l,x,c),ne.setPosition(c,x))})).add(B.events.fatalError$.subscribe(c=>{var x;(x=l==null?void 0:l.onCrashed)==null||x.call(l,c?`${c.id}: ${c.message}`:void 0)})).add(B.events.fetcherRecoverableError$.subscribe(c=>{var x;(x=l==null?void 0:l.onRecoverableError)==null||x.call(l,c?`${c.id}: ${c.message}`:void 0)})).add(B.events.loadedMetadata$.subscribe(()=>{gt.state.loadedMetadata$.set(!0)})).add(B.info.is3DVideo$.subscribe(c=>{gt.ui.is3DVideo.set(c)})).add(B.info.isEnded$.subscribe(c=>{S&&(c?(P!=null&&P.getValue()&&se.add(Gl),se.add("PLAY_BUTTON")):se.remove("PLAY_BUTTON"))})).add(B.info.liveTime$.subscribe(c=>{var x;(x=l==null?void 0:l.onLiveTime)==null||x.call(l,c)})).add(B.info.isStalled$.subscribe(c=>{var x;(x=l==null?void 0:l.onStalledChanged)==null||x.call(l,c)})).add(B.info.isLiveEnded$.subscribe(c=>{var x;return c&&((x=l==null?void 0:l.onLiveEnded)==null?void 0:x.call(l))})).add(B.info.currentFormat$.subscribe(()=>{var c;(c=p==null?void 0:p.pictureInPictureApi)==null||c.remove()})).add(ne.events.loadStarted$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:x.call(c)})).add(ne.events.loadEnded$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:x.call(c)})).add(ne.events.loadError$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadError)==null?void 0:x.call(c)})).add(ne.events.init$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onInit)==null?void 0:x.call(c)})).add(ne.events.ready$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onReady)==null?void 0:x.call(c)})).add(ne.events.started$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onStarted)==null?void 0:N.call(x,c)})).add(ne.events.timeRemained$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onTimeRemained)==null?void 0:N.call(x,c)})).add(ne.events.ended$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onCompleted)==null?void 0:N.call(x,c)})).add(ne.events.empty$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onEmpty)==null?void 0:x.call(c)})).add(ne.events.clicked$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onClicked)==null?void 0:N.call(x,c)})).add(ne.events.closed$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onClosed)==null?void 0:N.call(x,c)})).add(ne.events.error$.subscribe(c=>{var x,N;return(N=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onError)==null?void 0:N.call(x,c)})).add(ne.events.paused$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onPaused)==null?void 0:x.call(c)})).add(ne.events.resumed$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onResumed)==null?void 0:x.call(c)})),dt=new ht.Subscription,ti=()=>{var Ct,Rt,zt;let{debugLog:c}=J,x,N="#9df7b7",ce="#efd169";if(c&&c!==!0){let{colors:Nt}=c;x=c.tag,N=(Ct=Nt==null?void 0:Nt[0])!=null?Ct:N,ce=(zt=(Rt=Nt==null?void 0:Nt[1])!=null?Rt:Nt==null?void 0:Nt[0])!=null?zt:ce}let Ke=x?`: ${x}`:"";dt.add(B.events.log$.subscribe(Nt=>{console.debug(`%c sdk${Ke} `,`background:${N};`,`sdk component: ${Nt.component}`,Nt.message)})).add(Re.log$.subscribe(Nt=>{console.debug(`%c ui${Ke} `,`background:${ce};`,`ui component: ${Nt.component}.`,Nt.message)}))},Bi=()=>{dt.unsubscribe()},No=(c,x)=>{j.log("start camera manual rotation",{mx:c,my:x}),B.startCameraManualRotation(c,x)},Di=(c=!1)=>{j.log("stop camera manual rotation",{immediate:c}),B.stopCameraManualRotation(c)},So=(c,x,N)=>{j.log("move camera focus px",{xpx:c,ypx:x,dt:N}),B.moveCameraFocusPX(c,x,N)},Bo=()=>{B.holdCamera()},Mt=()=>{B.releaseCamera()},_t=dr(B.info.position$.getValue(),c=>{let x,N,ce=()=>{let Ke=B.info.playbackState$.getValue(),Ct=B.info.isLive$.getValue(),Rt=B.info.duration$.getValue(),zt=B.info.position$.getValue();if(Ke&&[li.PlaybackState.PLAYING,li.PlaybackState.PAUSED].includes(Ke)){let Nt=Ct?zt-Rt:B.getExactTime();Nt!==N&&c(Nt),N=Nt}x=requestAnimationFrame(ce)};return ce(),()=>cancelAnimationFrame(x)}),Et=Yt(B.info.playbackState$),Z=Yt(B.info.currentBuffer$),ei=Yt(B.info.isEnded$),Mi=Yt(B.info.isLive$),Si=J.features.playbackRate?Yt(B.info.canChangePlaybackSpeed$):dr(!1),ii=Yt(B.info.liveBufferTime$),Qi=Yt(B.info.volume$),Li=Yt(B.info.muted$),Do=Lc(B.info.predefinedQualityLimitType$.pipe((0,ht.map)(c=>c===li.PredefinedQualityLimits.TRAFFIC_SAVING)),B.info.predefinedQualityLimitType$.getValue()===li.PredefinedQualityLimits.TRAFFIC_SAVING),Oi=Lc(B.info.predefinedQualityLimitType$.pipe((0,ht.map)(c=>c===li.PredefinedQualityLimits.HIGH_QUALITY)),B.info.predefinedQualityLimitType$.getValue()===li.PredefinedQualityLimits.HIGH_QUALITY),Ot=Yt(B.info.autoQualityLimitingAvailable$),pi=Yt(B.info.availableQualities$),St=Yt(B.info.availableQualitiesFps$),Kt=Yt(B.info.chromecastState$),mo=Yt(B.info.chromecastDeviceName$),jt=Yt(B.info.currentFormat$),Kn=Yt(B.info.throughputEstimation$),Co=Yt(B.info.videoBitrate$),To=Yt(B.info.intrinsicVideoSize$),si=Yt(B.info.duration$),yt=Yt(B.info.isAudioAvailable$),hi=null,Vi=B.info.isBuffering$,Hi=dr(Vi.getValue(),c=>{let x=Vi.subscribe(N=>{N&&hi===null?hi=window.setTimeout(()=>{c(Vi.getValue()),hi=null},J.loaderDelay):c(N)});return()=>{x.unsubscribe(),hi&&clearTimeout(hi)}}),wn=()=>{hi&&clearTimeout(hi),hi=null},Ci=gi([si,Mi],([c,x])=>x?-c:c),to=gi([Et],([c])=>c===li.PlaybackState.PLAYING),dn=Yt(B.info.atLiveEdge$),Sn=Yt(B.info.atLiveDurationEdge$),Ri=Yt(B.info.position$),Qn=gi([Ri,si],([c,x])=>isFinite(c)&&isFinite(x)&&!!x),cn=gi([Kt],([c])=>c===li.ChromecastState.CONNECTED),ko=Yt(B.info.availableVideoStreams$),Cn=J.features.audioLanguages?Yt(B.info.availableAudioStreams$):dr([]),Vr=Yt(B.info.currentVideoStream$),pr=Yt(B.info.currentAudioStream$),Gn=c=>{c.language&&Fp(c.language),B.setVideoStream(c)},Tn=c=>{c.language&&Fp(c.language),B.setAudioStream(c)},un=c=>{let x;if(c.length===1&&(x=c.at(0)),x!=null||(x=c.find(ce=>"isDefault"in ce&&ce.isDefault)),x)return x;let N=$h();return N&&(x=c.find(({language:ce})=>N===ce)),x!=null||(x=c.at(0)),x},kn=!1;Qe.add(B.info.availableAudioStreams$.subscribe(c=>{if(!kn&&c.length){let x=un(c);x&&(B.setAudioStream(x),kn=!0)}}));let vo=!1;Qe.add(B.info.availableVideoStreams$.subscribe(c=>{if(!vo&&c.length){let x=un(c);x&&(B.setVideoStream(x),vo=!0)}}));let et=ae(void 0),pn=Yt(B.info.isAutoQualityEnabled$,c=>c&&et.set(void 0)),Yn=Yt(B.info.currentQuality$,()=>et.set(void 0)),jn=gi([et,Yn],([c,x])=>c!=null?c:x),In=gi(jt,c=>c!==li.VideoFormat.MPEG),fn=gi([pi,St,pn,jn,In],([c,x,N,ce,Ke])=>{let Ct=[];Ke&&Ct.push({value:"auto",displayValue:Be("auto_quality_option"),selected:N});let Rt=c.filter(zt=>!(0,ht.isInvariantQuality)(zt));for(let zt of Rt){let Nt=x[zt];Ct.push({value:zt,displayValue:`${zt}${Nt?s1(Nt):""}`,selected:N?!1:zt===ce})}return Ct}),mn=Yt(B.info.currentPlaybackRate$),qo=gi([mn,dn,Sn],([c,x,N])=>{let ce=N||S?1:J.controls.playbackRateMin,Ke=x?1:J.controls.playbackRateMax,Ct=J.controls.playbackRateStep,Rt=[];for(let zt=ce;zt<=Ke;zt+=Ct)Rt.push({value:zt,displayValue:zt===1?Be("playback_rate_1"):Be("playback_rate",{multiplier:zt.toString(10)}),selected:c===zt});return Rt}),Gi={displayValue:Be("subtitles_off"),value:"off"},Yi=ae({...Gi}),Zn=J.features.subtitles?Yt(B.info.availableTextTracks$):dr([]),En=uh(),Xn=gi([Zn,Yi],([c,x],N)=>{var Ct;let ce=[],Ke=c.find(({id:Rt})=>Rt===x.value);if(Ke!=null&&Ke.url){let[,Rt]=(Ct=En.find(Ke.url))!=null?Ct:[];if(Rt){N(Rt);return}at.download(Ke.url).then(zt=>{if(!zt||at.isDestroyed())return;let Nt=new a1,cs=Ke.language;if(cs){let J1=!!Ke.isAuto,e0=Nt.parse(zt,cs);ce.push({lang:cs,subtitles:e0,isAuto:J1,id:Ke.id})}En.add(Ke.url,ce),ye(Yi).value===x.value&&N(ce)}).catch(zt=>{var Nt;(Nt=pe==null?void 0:pe.oneStat)==null||Nt.logError({errorType:"Subtitles download",fatal:!1}),Ie==null||Ie.report(zt,{errorType:"Subtitles download",fatal:!1})})}N(ce)}),fr=gi([mn,to,Yi],([c,x,N],ce)=>{let Rt;if(B.info.isLive$.getValue()&&x&&N.value!==Gi.value){let Nt=()=>{let cs=1e3/(3*c);Rt=setTimeout(Nt,cs),ce(Date.now())};return Nt(),()=>clearTimeout(Rt)}}),io=gi([Zn,Yi],([c,x])=>{if(!c.length)return[];let N=[];for(let{language:ce,isAuto:Ke,id:Ct}of c){let Rt=ce&&ou(ce);ce&&Rt&&N.push({displayValue:Ke?Be("subtitles_auto",{language:Rt}):Rt,value:Ct,selected:(x==null?void 0:x.value)===Ct,isAuto:Ke})}return N.length?(N.unshift({...Gi,selected:(x==null?void 0:x.value)===Gi.value}),N):[]}),oo={available:[],prev:[]},Pn=()=>{var x,N;let c=B.experimental.getCurrentTime$.getValue();return(N=(x=c==null?void 0:c())!=null?x:Ee==null?void 0:Ee.currentTime)!=null?N:0},An=gi([_t,Yi,Xn,fr],([c,x,N,ce])=>{var Ct;let Ke=B.info.isLive$.getValue();if(Ke&&oo.prev!==N){let Rt=N.find(({id:Nt})=>Nt===x.value),zt=oo.prev.find(({id:Nt})=>Nt===x.value);if(Rt){let Nt={...Rt,subtitles:[...(Ct=zt==null?void 0:zt.subtitles)!=null?Ct:[],...Rt.subtitles]};oo.available=[Nt],oo.prev=N}}if(x&&x.value!==Gi.value){let Rt=Ke?Pn():c,zt=Ke?oo.available:N;return c1(Rt,x,zt,Ke)}}),go=gi([An],([c])=>c!=null&&c.texts?c.texts:[]),no=ae(!0),Mn=gi([Z,Ci,Ri,ii],([c,x,N,ce])=>{var zt;let Ke=(zt=c==null?void 0:c.end)!=null?zt:0;if(!ce)return Ke/x;let Rt=-N+ce-x;return(Ke-Rt)/x}),Oo=Yt(B.info.availableSources$),Rr=gi([Oo],([c])=>Object.keys((c==null?void 0:c[li.VideoFormat.MPEG])||{}).length>0),Ln=()=>{var N,ce,Ke;let c=Object.keys(((ce=(N=B.info.availableSources$)==null?void 0:N.getValue())==null?void 0:ce[li.VideoFormat.MPEG])||{}),x=(0,ht.getHighestQuality)(c)||ht.VideoQuality.Q_144P;return(Ke=de.sources[li.VideoFormat.MPEG])==null?void 0:Ke[x]},mr=()=>{var x;let c=Ln();if(c)j.log("download video",{url:c}),lh(c,((x=de==null?void 0:de.meta)==null?void 0:x.title)||"video");else{let N="There is no URL for download video";j.log("download video",{message:N}),D({message:N})}},Vn=()=>{D({message:"toggle muted"});let c=B.info.muted$.getValue();B.info.volume$.getValue()===0&&!c?Nn(er()):oi(!c)},Rn=()=>{var c;if(gt.ui.settingsMenu.visible$.set(!1),!ye(gt.ui.settingsSubMenu.visible$)){let x=ye(gt.ui.settingsMenu.ref$);if((c=l==null?void 0:l.uiInfo)!=null&&c.onSettingsMenu&&x){let ce=al(x),Ke={top:0,left:0,bottom:0,right:0};l.uiInfo.onSettingsMenu({visible:!1,size:ce,position:Ke,name:"settings"})}}j.log("close settings menu")},Nr=async(c,x=()=>Promise.resolve())=>{var Ke;gt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),gt.ui.settingsMenu.visible$.set(!0),await x();let N=ye(gt.ui.settingsMenu.ref$),ce=Ls();if((Ke=l==null?void 0:l.uiInfo)!=null&&Ke.onSettingsMenu&&N&&ce){let Rt=al(N),zt=sl(N,ce);l.uiInfo.onSettingsMenu({visible:!0,size:Rt,position:zt,name:"settings"})}j.log("open settings menu",{wasOpenedByKeyboard:c})},Jn=(c,x=!1)=>{var Ct;gt.ui.settingsSubMenu.visible$.set(!1);let N=ye(gt.ui.settingsMenu.ref$),ce=Ls(),Ke=ye(gt.ui.settingsMenu.visible$);if((Ct=l==null?void 0:l.uiInfo)!=null&&Ct.onSettingsMenu&&N&&ce)if(Ke&&!x){let zt=al(N),Nt=sl(N,ce);l.uiInfo.onSettingsMenu({visible:!0,size:zt,position:Nt,name:"settings"})}else{let zt=al(c),Nt={top:0,left:0,bottom:0,right:0},cs=ye(gt.ui.settingsSubMenu.name$);l.uiInfo.onSettingsMenu({visible:!1,size:zt,position:Nt,name:cs})}j.log("close settings sub menu")},vr=(c,x)=>{var ce;gt.ui.settingsSubMenu.visible$.set(!0),gt.ui.settingsSubMenu.ref$.set(x),gt.ui.settingsSubMenu.name$.set(c);let N=Ls();if((ce=l==null?void 0:l.uiInfo)!=null&&ce.onSettingsMenu&&x&&N){let Ct=al(x),Rt=sl(x,N);l.uiInfo.onSettingsMenu({visible:!0,name:c,size:Ct,position:Rt})}j.log("open settings sub menu",{name:c})},er=()=>{var x;let c=Math.max(J.volumeMinRestore,(x=Vc())!=null?x:0);return c===0?J.volumeDefault:c},Nn=c=>{let x=c===0?er():c,N=B.info.muted$.getValue();D({message:`set volume, volume: ${c}, preferredVolume: ${x}`}),N&&c>0&&!s&&(N=!1,Op(!1)),B.setVolume(c,N),ne.setVolume(c),Vp(x)},oi=c=>{let x=B.info.volume$.getValue();if(D({message:`set muted, currentVolume: ${x}, mute: ${c}`}),B.setMuted(c),ne.setVolume(c?0:x),Op(c),!c&&x===0){let N=er();B.setVolume(N),Vp(N),ne.setVolume(N)}},Wo=ae(!1),gr=c=>{j.log("set looped",{isLooped:c}),Wo.set(c),B.setLooped(c)};gr(oe);let Br=()=>{var c,x;(x=(c=l==null?void 0:l.uiInfo)==null?void 0:c.onReportProblem)==null||x.call(c)},it=(c,x=!1)=>{var N;D({message:`set autoplayNextEnabled, value: ${c}`}),j.log("set autoplay next enabled",{autoplayNextEnabled:c}),gt.ui.autoplayNextEnabled$.set(c),wh(c),x&&((N=l==null?void 0:l.onSetAutoplayNextEnabled)==null||N.call(l,c))},ft=c=>{D({message:`set timerNextVideoRunning, value: ${c}`}),j.log("set timer next video running",{timerNextVideoRunning:c}),gt.ui.timerNextVideoRunning$.set(c)},Ti=(c=!0)=>{var ce;let x=!0;if(c&&(l!=null&&l.onPrevVideoClick))try{x=(ce=l==null?void 0:l.onPrevVideoClick)==null?void 0:ce.call(l)}catch(Ke){D({message:"onPrevVideoClick callback failed to execute"})}if(!x)return;c&&ji("prev")||Y()},ro=(c=!0)=>{var ce;let x=!0;if(c&&(l!=null&&l.onNextVideoClick))try{x=(ce=l==null?void 0:l.onNextVideoClick)==null?void 0:ce.call(l)}catch(Ke){D({message:"onNextVideoClick callback failed to execute"})}if(!x)return;c&&ji("next")||X()},ji=c=>{let{isMobile:x,features:{playbackStatusNextVideoShow:N,playbackStatusShow:ce}}=J;return N&&ce&&!x?(gt.ui.aboutToGoNextVideo.set(c),gt.ui.userActionsDisabled.set(!0),!0):!1},Io=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementShow)==null||c.call(l)},Eo=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementClick)==null||c.call(l)},Ko=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementAuto)==null||c.call(l)},Po=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementCancel)==null||c.call(l)},ui=()=>{B.prepare()},Xe=()=>{(0,ht.assertNonNullable)(gt);let c=ye(gt.ui.controls.disabledControls$),x=ye(gt.playerPhase),N={playerPhase:x,isInteractive:S,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(D({message:"toggle play"}),x==="ads"){N.action="play",j.log("toggle adman play",N),ne.togglePlay();return}let ce=()=>{var Ct;D({message:"toggle play, call player.play"}),N.action="play",B.play(),(Ct=l==null?void 0:l.onPlay)==null||Ct.call(l)},Ke=()=>{var Ct;D({message:"toggle play, call player.pause"}),N.action="pause",B.pause(),(Ct=l==null?void 0:l.onPause)==null||Ct.call(l)};if(B.info.isEnded$.getValue()){if(D({message:"toggle play, video ended, seek to 0"}),Wt.next(),Ye.next(Wr.SeekAction.REWIND),S){A==null||A();return}B.seekTime(0),ce()}else B.info.playbackState$.getValue()!==li.PlaybackState.PLAYING?ce():Ke();j.log("toggle play",N)},Lt=(c,{changeReason:x="default",appliesTo:N="to-video"}={})=>{D({message:`set quality, quality: ${c}`}),j.log("set quality",{quality:c}),B.setAutoQuality(c==="auto"),c!=="auto"?(J.features.qualityDetailsSubMenuEnabled?(Rc({type:"exact_quality",quality:c,videoId:i},N),Zl(),B.setPredefinedQualityLimits(li.PredefinedQualityLimits.UNKNOWN)):Rp(i,c),et.set(c),B.setQuality(c)):J.features.qualityDetailsSubMenuEnabled?x==="default"&&(Xi("auto_quality",N),ye(Do)&&Zi(!1),ye(Oi)&&_i(!1)):Zl()},Zi=(c,x="as-default")=>{D({message:`set trafficSavingEnabled, value: ${c}`}),j.log("set traffic saving enabled",{trafficSavingEnabled:c});let N=c?li.PredefinedQualityLimits.TRAFFIC_SAVING:li.PredefinedQualityLimits.UNKNOWN;J.features.qualityDetailsSubMenuEnabled?(bi(N,x),jl(!1)):(B.setPredefinedQualityLimits(N),jl(c))},_i=(c,x="as-default")=>{D({message:`set highQualityEnabled, value: ${c}`}),j.log("set high quality enabled",{highQualityEnabled:c}),bi(c?li.PredefinedQualityLimits.HIGH_QUALITY:li.PredefinedQualityLimits.UNKNOWN,x)},bi=(c,x)=>{c!==li.PredefinedQualityLimits.UNKNOWN&&(ye(Ot)&&!ye(pn)&&Lt("auto",{appliesTo:x,changeReason:"limit-changed"}),Xi(c,x)),B.setPredefinedQualityLimits(c)},Xi=(c,x)=>{Rc({type:c,videoId:i},x),x==="as-default"&&Rc({type:c,videoId:i},"to-video")},Ho=c=>{j.log("set playback rate",{playbackRate:c}),B.setPlaybackRate(c),J.features.saveRate&&le&&!B.info.isLive$.getValue()&&yh(c)},so=()=>{let c=ye(qo),x=c.findIndex(({selected:ce})=>ce);if(x===c.length-1)return;let N=c[x+1];Ho(N.value)},tr=()=>{let c=ye(qo),x=c.findIndex(({selected:ce})=>ce);if(x===0)return;let N=c[x-1];Ho(N.value)},vn=(c={...Gi,selected:!1})=>{j.log("set subtitles",{...c}),c&&c.value!==Gi.value&<.next(c.isAuto?c.value+"_auto":c.value),Yi.set(c)},hr=()=>{j.log("toggle subtitles");let c=ye(io),x=ye(Yi),N=ye(qt);if((x==null?void 0:x.value)===Gi.value){let ce=c.filter(Ke=>Ke.value!==Gi.value).find(Ke=>Ke.value===N)||c[1];vn(ce)}else vn()},Ao=(c,x,N=!0)=>{var ce;if(D({message:`seek to time, time: ${c}`}),j.log("seek to time",{time:c,action:x,forcePrecise:N}),Ye.next(x),B.info.isLive$.getValue()){let Ke=B.info.duration$.getValue(),Ct=Math.min(0,Ke+c);B.seekTime(Ct,N)}else{if(P!=null&&P.getValue())return;B.info.isEnded$.getValue()&&(D({message:"seek after ended, call callbacks.onPlay"}),(ce=l==null?void 0:l.onPlay)==null||ce.call(l)),B.seekTime(Ue(c),N)}},_r=c=>{D({message:`seek to episode start time: ${c}`}),j.log("seek to episode start time",{time:c}),Ao(c,Wr.SeekAction.EPISODE,!0)},br=(c,x)=>{D({message:`seek to percent, percent: ${c}`}),j.log("seek to percent",{percent:c,action:x});let N=ye(Ci)*c;Ao(N,x,!1)},$r=c=>{D({message:`seek external, time: ${c}`}),j.log("seek external",{time:c}),Ye.next(Wr.SeekAction.UNKNOWN),B.seekTime(B.info.isLive$.getValue()?-c:c)},Dr=c=>{var ce,Ke;let x=(ce=c.max)!=null?ce:"none",N=(Ke=c.min)!=null?Ke:"none";D({message:`set auto quality limitation. Max: ${x}. Min: ${N}`}),j.log("set auto quality limits",{max:x,min:N}),B.setAutoQualityLimits(c)},Qo=c=>{D({message:`seek external to episode start time: ${c}`}),j.log("seek external to episode start time",{time:c}),Ao(c,Wr.SeekAction.EPISODE,!0)},yr=c=>{D({message:`set playback rate to: ${c}`}),j.log("set playback rate external",{playbackRate:c}),B.setPlaybackRate(c)},ir=ae(void 0),or=ae(!1),xr=c=>{D({message:`start scrubbing, progress: ${c}`}),j.log("start scrubbing",{progress:c}),or.set(!0),ho(c)},ho=c=>{ir.set(c)},Bn,ot,Ht=()=>{ir.set(void 0),or.set(!1)},ki=()=>{clearTimeout(ot),clearTimeout(Bn),Bn=window.setTimeout(()=>{Ht()},500),Ee==null||Ee.removeEventListener("seeked",ki)},Go=c=>{D({message:`complete scrubbing, progress: ${c}`}),j.log("complete scrubbing",{progress:c}),br(c,Wr.SeekAction.SLIDER),ye(gt.ui.isMobile)&&ye(gt.state.currentFormat$)===li.VideoFormat.HLS?(Ee==null||Ee.addEventListener("seeked",ki),ot=window.setTimeout(()=>{ki()},300)):Ht()},Dn=gi([_t,Ci,ir],([c,x,N],ce)=>{ce((0,ht.isNonNullable)(N)?N*x:c)}),xe=ae(!1),Vt=()=>{xe.set(!0)},di=()=>{xe.set(!1)},Pt=ae({width:0,height:0}),Zt=gi([Pt],([{width:c}],x)=>{let N=Xh(c);x(N)}),ci=ae(!1),Fi=U.filter(c=>dh(c)),_o=gi([Zt,ci],([c,x])=>x?Fi.filter(N=>!N.hideOnMobile):Fi.filter(N=>{var ce;return!((ce=N.hideOnDesktopGridTypes)!=null&&ce.includes(c))})),ni=ae(U.filter(c=>ch(c))),Mo=gi([ni,Zt],([c,x])=>c.filter(N=>{var ce;return!((ce=N.hideOnDesktopGridTypes)!=null&&ce.includes(x))})),ze=gi([Mo,_o],([c,x])=>[...J.features.additionalButtonsDesktopControlPanelRight?c.filter(N=>N.type==="desktop-control-panel-right"):[],...J.features.additionalButtons?x.map((N,ce)=>{var Ke;return{id:ce,weight:ce,type:"desktop-control-panel-right",testId:N.testId,icon:N.iconUrl,onClick:N.onClick,ariaLabel:(Ke=N.ariaLabel)!=null?Ke:N.tooltip,tooltipText:N.tooltip}}):[]]),Ut=ae(G),$i=gi([Ut],([c])=>J.features.additionalSettingsMenuItems?c.map(x=>x.type==="SWITCH"?{...x,onClick:x.onChangeEnabled}:x):[]),Lo=(c,x)=>{let N=ye(ni).map(ce=>ce.id!==c?ce:{...ce,...x});ni.set(N)},Yo=c=>{let x=ye(ni);if(x.some(N=>N.id===c.id)){D({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),ni.set(x)},ds=c=>{let x=ye(ni);if(!x.some(N=>N.id===c)){D({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}x=x.filter(N=>N.id!==c),ni.set(x)},gn=c=>{Ye.next(Wr.SeekAction.LIVE),D({message:"live switch to low latency "+c}),j.log("live switch to low latency "+c),B.setLiveLowLatency(c)},Kr=(c,x)=>{let N=ye(Ut).map(ce=>ce.id!==c?ce:{...ce,...x});Ut.set(N)},$a=c=>{let x=ye(Ut);if(x.some(N=>N.id===c.id)){D({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),Ut.set(x)},ya=c=>{let x=ye(Ut);if(!x.some(N=>N.id===c)){D({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}x=x.filter(N=>N.id!==c),Ut.set(x)},nr=ae(F),_l=gi([nr],([c])=>J.features.additionalContextMenuItems?c:[]),As=(c,x)=>{let N=ye(nr).map(ce=>ce.id!==c?ce:{...ce,...x});nr.set(N)},xa=c=>{let x=ye(nr);if(x.some(N=>N.id===c.id)){D({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),nr.set(x)},vt=c=>{let x=ye(nr);if(!x.some(N=>N.id===c)){D({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}x=x.filter(N=>N.id!==c),nr.set(x)},bt=gi([ci,rt],([c,x],N)=>{N(c&&x)}),Ji=()=>{Ye.next(Wr.SeekAction.LIVE),D({message:"switch to active live"}),j.log("switch to active live"),B.seekTime(0),B.info.playbackState$.getValue()!==li.PlaybackState.PLAYING&>.actions.internal.togglePlay()},jo=()=>{j.log("skip adman"),ne.skip()},eo=(c=!0)=>{(0,ht.assertNonNullable)(gt),D({message:`switch from ads to video, callPlay: ${c}`}),j.log("switch from ads to video",{callPlay:c}),re.set("video"),c&&B.play()},ai=()=>{(0,ht.assertNonNullable)(gt),D({message:"switch from video to ads"}),j.log("switch from video to ads"),gt.actions.internal.pause(),Jt(),re.set("ads")},Ii=c=>{(0,ht.assertNonNullable)(gt);let x=c?"LiveWaitingStart":"thumb";j.log("set live waiting start",{state:c,playerPhase:x}),re.set(x)},Ms=c=>{(0,ht.assertNonNullable)(gt);let x=c?"LiveWaitingRecover":"thumb";j.log("set live waiting recover",{state:c,playerPhase:x}),re.set(x)},wa=c=>{(0,ht.assertNonNullable)(gt);let x=c?"LiveWaitingRecord":"thumb";j.log("set live waiting record",{state:c,playerPhase:x}),re.set(x)},Pu=()=>((0,ht.assertNonNullable)(gt),j.log("get debug text data"),sh(B,de,gt)),Zd=()=>((0,ht.assertNonNullable)(gt),JSON.stringify(Me.getFinishedSpans())),Au=()=>((0,ht.assertNonNullable)(gt),ah(B,de,gt)),Ls=()=>Ee,Mu=()=>{D({message:"toggle chromecast"}),j.log("toggle chromecast"),B.toggleChromecast()},bl=c=>{var N;if((0,ht.assertNonNullable)(gt),B.info.isEnded$.getValue())return;let x=!c;if(ye(gt.playerPhase)==="ads"){D({message:`pause ads, internalCall: ${x}`}),j.log("pause ads",{internalCall:x}),ne.pause();return}D({message:`pause video, internalCall: ${x}`}),j.log("pause video",{internalCall:x}),x&&((N=l==null?void 0:l.onPause)==null||N.call(l)),B.pause()},Xd=c=>{var N;(0,ht.assertNonNullable)(gt);let x=!c;if(ye(gt.playerPhase)==="ads"){D({message:`play ads, internalCall: ${x}`}),j.log("play ads",{internalCall:x}),ne.play();return}D({message:`play video, internalCall: ${x}`}),j.log("play video",{internalCall:x}),x&&((N=l==null?void 0:l.onPlay)==null||N.call(l)),B.play()},Jd=c=>{(0,ht.assertNonNullable)(gt);let x=!c;if(ye(gt.playerPhase)==="ads"){D({message:"player cannot be stopped during ads via external method"});return}D({message:`player will be stopped, internalCall: ${x}`}),E==null||E()},ec=(c,x)=>{(0,ht.assertNonNullable)(gt),D({message:`first start, show ads: ${c}, internalCall: ${!x}`}),j.log("first start",{showAds:c,external:x}),c?re.set("ads"):(re.set("video"),x?B.play():gt.actions.internal.togglePlay())},Sa=()=>(D({message:"getting time codes"}),f),$l=()=>{let c=Sa();if(!c||[0,1].includes(c.length))return;let x=B.info.position$.getValue();return c.find(N=>N.time>x)},tc=c=>{let x=c;x||(x=$l());let N=B.info.position$.getValue();j.log("seek to next episode",{currentTime:N,...x}),x&&(D({message:"seek to next episode"}),Ao(x.time,Wr.SeekAction.EPISODE,!0))},ic=()=>{let c=Sa();if(!c||[0,1].includes(c.length))return;let x=B.info.position$.getValue(),N=c.findIndex(Ke=>Ke.time>x),ce=N===-1?c.length-2:N-2;if(!(ce<0))return c[ce]},oc=c=>{let x=c;x||(x=ic());let N=B.info.position$.getValue();j.log("seek to prev episode",{currentTime:N,...x}),x&&(D({message:"seek to prev episode"}),Ao(x.time,Wr.SeekAction.EPISODE,!0))},Lu=()=>(D({message:"getting preview thumbs data"}),j.log("get preview thumbs data",{..._}),_),nc=async()=>{let c=Ne==null?void 0:Ne.isActive(),x="none";Ne!=null&&Ne.isActive()?(x="remove",await(Ne==null?void 0:Ne.remove())):(x="request",await(Ne==null?void 0:Ne.request())),j.log("toggle picture in picture",{isActive:c,action:x})},Vu=(c=-90)=>{j.log("rotate video",{alphaDiff:c}),ut.update(x=>x+c)},Ca=ae([]);k==null||k.subscribe(c=>{let x=[];for(let N=0;N<c.length;N++){let{range:[ce,Ke],subjects:Ct}=c[N];N===0&&ce!==0&&x.push({time:0,text:"",interactive:!1,completed:!0}),x.push({time:ce/1e3,text:"",interactive:!0,completed:J.features.interactiveTimeOpenUri?!Ct.length||Ct.every(Rt=>Rt.isRemoved):!Ct.length}),Ke!==1/0&&x.push({time:Ke/1e3,text:"",interactive:!1,completed:!0})}Ca.set(x)});let Ru=ae(!1);P==null||P.subscribe(c=>{c&&ye(or)&&Ht()});let Ue=c=>{if(!S)return c;let x=ye(Ca),N=ye(Ci),Ke=ye(Ri)/N,Ct=x.find(Rt=>Rt.interactive&&!Rt.completed&&Rt.time>Ke);return typeof(Ct==null?void 0:Ct.time)=="number"?Math.min(c,Ct.time-.05):c},ri=()=>{gt.ui.episodes.panelOpened$.set(!1)},Zo=()=>{j.log("destroy store"),clearTimeout(ot),clearTimeout(Bn),Qe.unsubscribe(),dt.unsubscribe(),B.destroy(),ne.destroy(),pe==null||pe.destroy(),Ie==null||Ie.destroy(),Dt.unsubscribe(),Je==null||Je.disconnect(),Je=null,at.destroy()},gt={interfaceLanguage$:qt,isCyrillicRelatedInterface$:Gt,initVideo:Ce,videoId:i,isClip:o,playerPhase:W,vsid:Pe,state:{positionExact$:_t,positionWithScrubbing$:Dn,duration$:Ci,playbackState$:Et,isPlaying$:to,isLoaderVisible:Hi,bufferedProgress$:Mn,isLive$:Mi,canChangePlaybackSpeed$:Si,isActiveLive$:dn,isOldestAvailableLive$:Sn,isRewindableLive$:Qn,isEnded$:ei,muted$:Li,volume$:Qi,trafficSavingEnabled$:Do,highQualityEnabled$:Oi,autoQualityLimitingAvailable$:Ot,availableVideoStreams$:ko,availableAudioStreams$:Cn,videoStream$:Vr,audioStream$:pr,currentQuality$:jn,isAutoQualityEnabled$:pn,availableQualities$:fn,currentPlaybackRate$:mn,availablePlaybackRates$:qo,currentSubtitle$:Yi,availableTextTracks$:Zn,availableSubtitlesList$:io,currentSubtitleCaptions$:go,isAutoSubtitleCaptionVisible$:no,chromecastState$:Kt,chromecastDeviceName$:mo,chromecastConnected$:cn,currentFormat$:jt,throughputEstimation$:Kn,videoBitrate$:Co,videoSize$:To,errorLog$:nt,crashed$:rt,isAudioAvailable$:yt,isAudioDisabled:!!s,canDownload:J.features.download&&!!d,availableSources$:Oo,hasMpegSources$:Rr,isInteractive:S,showInteractiveGraph:J.features.interactiveGraph,showSeekToInteractive:J.features.seekToInteractive,showPlayPrevChapter:J.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:J.features.interactiveTimeIndicator&&!!ye(Ca).length,interactiveEpisodes$:Ca,isInteractiveTime$:P?Yt(P):ae(!1),isInteractiveExpectation$:Ru,hasInteractiveBranches:T,playPrevChapterDisabledTooltip:V,looped$:Wo,loadedMetadata$:ae(!1),isAutoQualityAvailable$:In},ui:{t:Be,controlsVisible:ae(!1),touched:ae(!1),controls:{prevButton:ae(void 0),playButton:ae(void 0),replayButton:ae(void 0),nextButton:ae(void 0),playPrevChapterButton:ae(void 0),seekToInteractiveButton:ae(void 0),interactiveGraphButton:ae(void 0),liveButton:ae(void 0),time:ae(void 0),episodes:ae(void 0),volume:ae(void 0),subtitles:ae(void 0),settings:ae(void 0),context:ae(void 0),chromecast:ae(void 0),pip:ae(void 0),fullscreen:ae(void 0),vkLogo:ae(void 0),interactiveTimeIndicator:ae(void 0),timeline:ae(void 0),autoplayNextToggle:ae(void 0),additionalButtons:U.length?U.reduce(c=>[...c,ae(void 0)],[]):[],disabledControls$:se},modals:{hotKeyMap:{show:ae(!1),data:ae({title:"",closeBtnText:"",groups:[]})}},isFullscreen:$e,isFullscreenOpenedByKeyboard:Le,rotateAlpha:ut,isAutoplay:ae(!1),debugPanelVisible:ae(!1),episodes:{panelOpened$:ae(!1),openedByKeyboard$:ae(!1)},contextMenu:{visible$:ae(!1),btnRef$:ae(void 0),openedByBtnKeyboard$:ae(!1),openedByHotKey$:ae(!1),lastActiveElem$:ae(void 0),showContextMenuBtn$:ae(!1),position$:ae({top:0,left:0})},playerSize:Pt,isMobile:ci,mobileNotReportControlHidden$:bt,mobileUnmuteButtonExpanded:ae(!1),mobileUnmuteButtonVisible:ae(!1),icon3DVideoVisible:ae(!1),scrubbingInProgress:or,volumeChangingInProgress:xe,is3DVideo:ae(!1),currentGridType$:Zt,additionalButtonsDeprecated$:_o,additionalDesktopControlPanelRightButtons$:ze,additionalSettingsMenuItems$:$i,additionalContextMenuItems$:_l,interactiveHideMobileControls:ae(!1),overlayContainer$:ae(void 0),startedByKeyboard$:ae(!1),autoplayNextEnabled$:ae(!1),timerNextVideoRunning$:ae(!0),settingsMenu:{visible$:ae(!1),ref$:ae(void 0),openedByBtnKeyboard$:ae(!1)},settingsSubMenu:{visible$:ae(!1),ref$:ae(void 0),name$:ae(void 0)},aboutToGoNextVideo:ae(void 0),userActionsDisabled:ae(!1)},ads:{position:ae(0),duration:ae(0),playbackState:ae("inactive"),canSkip:ae(!1),secondsToWatchBeforeSkip:ae(0),postrollPassed:ae(!1)},webApi:{pictureInPictureApi:Ne,annotationsApi:fe},actions:{internal:{preload:ui,firstStart:c=>ec(c,!1),play:()=>Xd(!1),pause:()=>bl(!1),togglePlay:Xe,toggleMuted:Vn,openSettingsMenu:Nr,closeSettingsMenu:Rn,openSettingsSubMenu:vr,closeSettingsSubMenu:Jn,setVolume:Nn,startVolumeChanging:Vt,stopVolumeChanging:di,setVideoStream:Gn,setAudioStream:Tn,setQuality:Lt,setTrafficSavingEnabled:Zi,setHighQualityEnabled:_i,setPlaybackRate:Ho,incrementPlaybackRate:so,decrementPlaybackRate:tr,setSubtitle:vn,toggleSubtitle:hr,togglePictureInPicture:nc,startScrubbing:xr,progressScrubbing:ho,completeScrubbing:Go,toggleChromecast:Mu,switchToActiveLive:Ji,switchFromAdsToVideo:eo,switchFromVideoToAds:ai,skipAd:jo,setLiveWaitingStart:Ii,setLiveWaitingRecover:Ms,setLiveWaitingRecord:wa,getDebugTextData:Pu,getTraceTextData:Zd,getDebugPanelData:Au,getVideoElement:Ls,seekTime:(c,x,N)=>Ao(c,x,N),clearDelayedBufferingCheckTimeout:wn,seekEpisodeStartTime:_r,seekToPercent:br,getNextEpisode:$l,seekToNextEpisode:tc,getPrevEpisode:ic,seekToPrevEpisode:oc,startLogging:ti,stopLogging:Bi,startCameraManualRotation:No,stopCameraManualRotation:Di,moveCameraFocusPX:So,holdCamera:Bo,releaseCamera:Mt,getVideoEpisodes:Sa,getPreviewThumbsData:Lu,downloadVideo:mr,addLanguage:Up,setLanguage:xt,nextMovie:pt,videoRotate:Vu,correctSeekTimeToInteractive:Ue,replayInteractive:A,setLooped:gr,reportProblem:Br,setAutoplayNextEnabled:it,setTimerNextVideoRunning:ft,prevVideoClick:Ti,nextVideoClick:ro,nextVideoAnnouncementShow:Io,nextVideoAnnouncementClick:Eo,nextVideoAnnouncementAuto:Ko,nextVideoAnnouncementCancel:Po},external:{firstStart:c=>ec(c,!0),play:()=>Xd(!0),pause:()=>bl(!0),stop:()=>Jd(!0),seekTime:c=>$r(c),seekEpisodeStartTime:c=>Qo(c),setPlaybackRate:c=>yr(c),setAutoQualityLimits:c=>Dr(c),setMuted:oi,setVolume:Nn,returnFocusToEpisodes:ri,updateAdditionalSettingsItem:Kr,addAdditionalSettingsItem:$a,removeAdditionalSettingsItem:ya,updateAdditionalContextItem:As,addAdditionalContextItem:xa,removeAdditionalContextItem:vt,updateAdditionalButton:Lo,addAdditionalButton:Yo,removeAdditionalButton:ds,setLiveLowLatency:gn}},callbacks:l,setUiCallbacks:c=>{Ge={...c}},getAdmanWrapper:()=>ne,getLogger:()=>Re,getPlayer:()=>B,destroy:Zo};return gt};function pa(t,e,i,o){var _;let n=["interactiveTimeIndicator"],a=(_=e[i])==null?void 0:_.getBoundingClientRect(),s=(o||n.includes(i))&&!!a&&!!(a.right-a.left),{top:d,left:l,bottom:p,right:f}=sl(e[i],t||void 0);return{left:s?l:0,right:s?f:0,top:s?d:0,bottom:s?p:0,isDisplayed:s}}var ru=(t,e,i,o)=>{if(t)for(let[n,a]of Object.entries(e))["tooltipPointerOffsetX","disabledControls$","additionalButtons"].includes(n)||a.set(pa(t,i,n,o))};var su=async(t,e,i)=>{await yo(),e&&i&&(i.focus(),t.set(!1))};var v2=be('<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 Hf(t,e){let i=ke(e,["$$slots","$$events","$$legacy","children"]);var o=v2();let n;var a=h(o);ge(a,()=>{var s;return(s=e.children)!=null?s:ie}),_e(),g(o),I(()=>n=we(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})),b(t,o)}function Ff(t,e){z(e,!0);let[i,o]=He(),n=()=>C(l,"$contextMenuVisible$",i),a=v(e,"disabled",3,!1),s=v(e,"ariaLabel",3,""),d=Se(),l=d.ui.contextMenu.visible$,p=d.ui.contextMenu.openedByBtnKeyboard$,f=d.ui.contextMenu.showContextMenuBtn$,_=d.ui.contextMenu.position$,u=d.ui.contextMenu.btnRef$,$=ee(void 0);qe(()=>{r($)&&$t(()=>{u.set(r($))})});let w=P=>{let A=ws(P),E=Uh(r($));_.set(E),p.set(A),l.set(!n())},y=()=>{f.set(!0)},S=()=>{f.set(!1)},k=m(()=>n()?"opened":"");At(t,{get className(){return r(k)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return s()},click:w,focus:y,blur:S,get ariaExpanded(){return n()},get ref(){return r($)},set ref(P){O($,me(P))},children:(P,A)=>{Hf(P,{})},$$slots:{default:!0}}),q(),o()}var g2=t=>{t.stopPropagation()},h2=L("<div><!> <div></div> <div></div></div>"),_2={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
230
|
|
|
231
231
|
@media screen and (orientation: portrait) {.interactive-episode-icon-animated.mobile.fullscreen.svelte-od3veb {top:40px;right:16px;}
|
|
232
232
|
}
|
|
@@ -392,4 +392,4 @@ Try switching the\xA0quality to\xA0Auto.`},Ih=y_;var ns=new Map;ns.set(Ga.Interf
|
|
|
392
392
|
/* 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);}
|
|
393
393
|
|
|
394
394
|
/* \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 jm(t,e){z(e,!0),K(t,z3);let[i,o]=He(),n=()=>C(qt,"$isLive$",i),a=v(e,"sources",7),s=v(e,"store",7),d=v(e,"microStoresRoot",7),l=v(e,"videoConfig",7),p=v(e,"uiConfig",7),f=v(e,"title",7),_=v(e,"thumbUrl",7),u=v(e,"interactiveContainer",7),$=v(e,"interactiveController",7),w=v(e,"subtitles",7),y=v(e,"live",7),S=v(e,"preload",7),k=v(e,"autoplay",7),P=v(e,"volume",7,void 0),A=v(e,"muted",7,void 0),E=v(e,"fromTime",7),T=v(e,"canRewindLive",7),V=v(e,"showAds",7),U=v(e,"adsSlotId",7,void 0),G=v(e,"adsParams",7,void 0),F=v(e,"adsPreviewParam",7,void 0),Y=v(e,"adsAutoplayParam",7,void 0),X=v(e,"duration",7,void 0),oe=v(e,"logoClickable",7),pe=v(e,"logoHidden",7),le=v(e,"isMobile",7),Ve=v(e,"showNextPrevButtons",7,!1),Ae=v(e,"nextButtonActive",7,!1),J=v(e,"prevButtonActive",7,!1),Me=v(e,"endScreenVideoTitle",7,void 0),j=v(e,"endScreenVideoThumb",7,void 0),B=v(e,"isOneVideoPlaylist",7,!1),Re=v(e,"supportLink",7),ne=v(e,"shadowRootContainer",7,void 0),Ie=v(e,"outerContainerRef",7,void 0),Ne=v(e,"fullScreenTarget",7,void 0),fe=v(e,"failoverHosts",7,void 0),D=v(e,"showMiniTimer",7,!1),de=v(e,"saveRate",7),Ee=v(e,"seekToInteractive",7,_a.noop),Ge=v(e,"playPrevChapter",7,_a.noop),at=v(e,"volumeMultiplier",7),Pe=v(e,"showAutoplayNext",7),$e=v(e,"showEndScreen",7,!0),Le=v(e,"keyboardControls",15,void 0),{subscribers:Ze,stores:ut}=d();Gg(p());let nt=Qt(),Dt=p().logoLink,rt=s().ui.debugPanelVisible,xt=s().ui.playerSize,qt=s().state.isLive$,Be=s().state.isInteractive&&_u.clientChecker.device.isAndroid,re=ee(void 0),W=null,se=ee(!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}),rh(s(),ut),qe(()=>{s().ui.isMobile.set(le())});let he=(Z=!1)=>{O(se,!0),Z?s().actions.external.firstStart(V()):s().actions.internal.firstStart(V())},Ce=()=>{if(nt.features.qualityDetailsSubMenuEnabled){let Z=Ch(s().videoId);if(Z)switch(Z.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,Z.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,Z.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(Z.quality);break}}else{Th(s().videoId),Hp()&&s().actions.internal.setTrafficSavingEnabled(!0);let ei=Np(s().videoId);ei&&s().actions.internal.setQuality(ei)}};function De(Z){var Qi,Li,Do;let ei=a()||Z;ei&&s().initVideo({container:r(re),sources:ei,failoverHosts:fe(),subtitles:w(),volumeMultiplier:at()});let Mi=_a.safeStorage.get(Kl)==="true";rt.set(Mi),E()>0&&s().actions.external.seekTime(E());let Si=le()?nt.volumeDefault:(Li=(Qi=P())!=null?Qi:Vc())!=null?Li:nt.volumeDefault,ii=(Do=A())!=null?Do:bh();if(s().actions.external.setVolume(Si),s().actions.external.setMuted(ii),s().getAdmanWrapper().setInitialVolume(ii?0:Si),Ce(),nt.features.saveRate&&de()){let Oi=xh();Oi&&!n()&&s().actions.internal.setPlaybackRate(Oi)}if(Pe()){let Oi=Sh();Oi&&s().actions.internal.setAutoplayNextEnabled(Oi)}s().ui.isAutoplay.set(k()),k()?he():S()&&nt.features.preload&&s().actions.internal.preload()}let pt=Z=>{if(window.ResizeObserver){let ei,Mi;W=new ResizeObserver((0,_a.throttleFn)(Si=>{let ii=Si[0];if(ii.contentBoxSize){let Qi=Array.isArray(ii.contentBoxSize)?ii.contentBoxSize[0]:ii.contentBoxSize;ei=Qi.inlineSize,Mi=Qi.blockSize}else ii.contentRect&&(ei=ii.contentRect.width,Mi=ii.contentRect.height);xt.set({width:ei,height:Mi})},300)),W.observe(Z)}xt.set({width:Z.clientWidth,height:Z.clientHeight})},Wt=()=>{document.hidden&&s().actions.external.stop()};Ft(()=>{var Mi,Si,ii,Qi;Be&&document.addEventListener("visibilitychange",Wt),nt.debugLog&&s().actions.internal.startLogging(),pt(r(re));let Z=Ze.map(Li=>Li.init({store:s(),microStores:ut,config:l(),interactiveController:$(),uiConfig:p()})),ei=()=>{Be&&document.removeEventListener("visibilitychange",Wt),W==null||W.disconnect(),Z.forEach(Li=>Li.unsubscribe()),s().destroy()};return((Mi=y())==null?void 0:Mi.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),ei):((Si=y())==null?void 0:Si.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),ei):(((ii=y())==null?void 0:ii.status)==="finished"||((Qi=y())==null?void 0:Qi.status)==="postlive")&&!Object.keys(a()||[]).length?(s().actions.internal.setLiveWaitingRecord(!0),ei):(De(),ei)});function Ye(){r(se)?s().actions.external.play():he(!0)}function lt(){s().actions.external.pause()}function Je(Z){s().actions.external.setMuted(Z)}function kt(Z){le()||Z>=0&&Z<=1&&s().actions.external.setVolume(Z)}function Jt(Z){s().actions.internal.seekTime(Z,z1.SeekAction.UNKNOWN)}function Qe(Z){s().actions.external.seekEpisodeStartTime(Z)}function dt(){s().actions.external.returnFocusToEpisodes()}function ti(Z){s().actions.external.setPlaybackRate(Z)}function Bi(Z){s().actions.external.setAutoQualityLimits(Z)}let No=hu(nt.view);var Di=U3();let So;tt(Di,No);var Bo=h(Di);{var Mt=Z=>{Ym(Z,{get store(){return s()},uiConfig:nt,get thumbUrl(){return _()},get interactiveContainer(){return u()},get live(){return y()},get autoplay(){return k()},get canRewindLive(){return T()},get showAds(){return V()},get adsSlotId(){return U()},get adsParams(){return G()},get adsPreviewParam(){return F()},get adsAutoplayParam(){return Y()},get duration(){return X()},get logoClickable(){return oe()},get logoHidden(){return pe()},logoTargetUrl:Dt,get nextButtonActive(){return Ae()},get prevButtonActive(){return J()},get endScreenVideoTitle(){return Me()},get endScreenVideoThumb(){return j()},get isOneVideoPlaylist(){return B()},get supportLink(){return Re()},get shadowRootContainer(){return ne()},get outerContainerRef(){return Ie()},get fullScreenTarget(){return Ne()},get showMiniTimer(){return D()},get playerStarted(){return r(se)},get seekToInteractive(){return Ee()},get playPrevChapter(){return Ge()},firstStart:he,seekTime:Jt,get showEndScreen(){return $e()},get showAutoplayNext(){return Pe()},get showNextPrevButtons(){return Ve()},get videoContainer(){return r(re)},set videoContainer(ei){O(re,me(ei))}})},_t=Z=>{Qm(Z,{get store(){return s()},uiConfig:nt,get title(){return f()},get thumbUrl(){return _()},get interactiveContainer(){return u()},get live(){return y()},get autoplay(){return k()},get canRewindLive(){return T()},get showAds(){return V()},get adsSlotId(){return U()},get adsParams(){return G()},get adsPreviewParam(){return F()},get adsAutoplayParam(){return Y()},get duration(){return X()},get logoClickable(){return oe()},get logoHidden(){return pe()},logoTargetUrl:Dt,get nextButtonActive(){return Ae()},get prevButtonActive(){return J()},get endScreenVideoTitle(){return Me()},get endScreenVideoThumb(){return j()},get isOneVideoPlaylist(){return B()},get supportLink(){return Re()},get shadowRootContainer(){return ne()},get outerContainerRef(){return Ie()},get fullScreenTarget(){return Ne()},get showMiniTimer(){return D()},get playerStarted(){return r(se)},get seekToInteractive(){return Ee()},get playPrevChapter(){return Ge()},firstStart:he,get showEndScreen(){return $e()},get showAutoplayNext(){return Pe()},get showNextPrevButtons(){return Ve()},get videoContainer(){return r(re)},set videoContainer(ei){O(re,me(ei))},get keyboardControls(){return Le()},set keyboardControls(ei){Le(ei)}})};R(Bo,Z=>{le()?Z(Mt):Z(_t,!1)})}g(Di),I(Z=>So=te(Di,1,"root svelte-15wsbym",null,So,Z),[()=>({"root--miui-browser":_u.clientChecker.device.isMobile&&_u.clientChecker.browser.isMiuiBrowser})]),b(t,Di);var Et=q({initVideo:De,play:Ye,pause:lt,setMuted:Je,setVolume:kt,seekTime:Jt,seekEpisodeStartTime:Qe,returnFocusToEpisodes:dt,setPlaybackRate:ti,setAutoQualityLimits:Bi,get sources(){return a()},set sources(Z){a(Z)},get store(){return s()},set store(Z){s(Z)},get microStoresRoot(){return d()},set microStoresRoot(Z){d(Z)},get videoConfig(){return l()},set videoConfig(Z){l(Z)},get uiConfig(){return p()},set uiConfig(Z){p(Z)},get title(){return f()},set title(Z){f(Z)},get thumbUrl(){return _()},set thumbUrl(Z){_(Z)},get interactiveContainer(){return u()},set interactiveContainer(Z){u(Z)},get interactiveController(){return $()},set interactiveController(Z){$(Z)},get subtitles(){return w()},set subtitles(Z){w(Z)},get live(){return y()},set live(Z){y(Z)},get preload(){return S()},set preload(Z){S(Z)},get autoplay(){return k()},set autoplay(Z){k(Z)},get volume(){return P()},set volume(Z){P(Z)},get muted(){return A()},set muted(Z){A(Z)},get fromTime(){return E()},set fromTime(Z){E(Z)},get canRewindLive(){return T()},set canRewindLive(Z){T(Z)},get showAds(){return V()},set showAds(Z){V(Z)},get adsSlotId(){return U()},set adsSlotId(Z){U(Z)},get adsParams(){return G()},set adsParams(Z){G(Z)},get adsPreviewParam(){return F()},set adsPreviewParam(Z){F(Z)},get adsAutoplayParam(){return Y()},set adsAutoplayParam(Z){Y(Z)},get duration(){return X()},set duration(Z){X(Z)},get logoClickable(){return oe()},set logoClickable(Z){oe(Z)},get logoHidden(){return pe()},set logoHidden(Z){pe(Z)},get isMobile(){return le()},set isMobile(Z){le(Z)},get showNextPrevButtons(){return Ve()},set showNextPrevButtons(Z){Ve(Z)},get nextButtonActive(){return Ae()},set nextButtonActive(Z){Ae(Z)},get prevButtonActive(){return J()},set prevButtonActive(Z){J(Z)},get endScreenVideoTitle(){return Me()},set endScreenVideoTitle(Z){Me(Z)},get endScreenVideoThumb(){return j()},set endScreenVideoThumb(Z){j(Z)},get isOneVideoPlaylist(){return B()},set isOneVideoPlaylist(Z){B(Z)},get supportLink(){return Re()},set supportLink(Z){Re(Z)},get shadowRootContainer(){return ne()},set shadowRootContainer(Z){ne(Z)},get outerContainerRef(){return Ie()},set outerContainerRef(Z){Ie(Z)},get fullScreenTarget(){return Ne()},set fullScreenTarget(Z){Ne(Z)},get failoverHosts(){return fe()},set failoverHosts(Z){fe(Z)},get showMiniTimer(){return D()},set showMiniTimer(Z){D(Z)},get saveRate(){return de()},set saveRate(Z){de(Z)},get showAutoplayNext(){return Pe()},set showAutoplayNext(Z){Pe(Z)},get seekToInteractive(){return Ee()},set seekToInteractive(Z){Ee(Z)},get playPrevChapter(){return Ge()},set playPrevChapter(Z){Ge(Z)},get volumeMultiplier(){return at()},set volumeMultiplier(Z){at(Z)},get showEndScreen(){return $e()},set showEndScreen(Z){$e(Z)},get keyboardControls(){return Le()},set keyboardControls(Z){Le(Z)}});return o(),Et}var q3=be('<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 Zm(t,e){let i=ke(e,["$$slots","$$events","$$legacy","children"]);var o=q3();let n;var a=h(o);ge(a,()=>{var s;return(s=e.children)!=null?s:ie}),_e(),g(o),I(()=>n=we(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})),b(t,o)}function Xm(t,e){let i=v(e,"isWhite",3,!1),o=m(()=>i()?"color: #fff;":"color: #909499;");Zm(t,{get style(){return r(o)}})}var W3=L('<div class="title svelte-1y9fytq"> </div>'),K3=L('<div class="playerStub svelte-1y9fytq"><!> <!></div>'),Q3={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 Jm(t,e){K(t,Q3);var i=K3(),o=h(i);{var n=d=>{var l=W3(),p=h(l,!0);g(l),I(()=>ve(p,e.title)),b(d,l)};R(o,d=>{e.title&&d(n)})}var a=M(o,2);{var s=d=>{let l=m(()=>!!e.thumbUrl);Xm(d,{get isWhite(){return r(l)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(s)})}g(i),I(()=>tt(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var Z1=require("@vkontakte/videoplayer-shared/es2018"),Ki=require("@vkontakte/videoplayer-shared/es2018"),jd=require("@vkontakte/videoplayer-core/es2018"),X1=require("@vkontakte/videoplayer-statistics/es2018");var $u=require("@vkontakte/videoplayer-shared/es2018"),bu=class{constructor(){this.subscription=new $u.Subscription,this.logger=new $u.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){var i,o;if(this.isSupported())for(let[n,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,n,a)}catch(s){throw new Error(`The media session action "${n}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,s;let o=ye(e.state.currentPlaybackRate$),n=ye(e.state.duration$);if(!(!isFinite(i)||!isFinite(n)))try{(s=(a=navigator.mediaSession).setPositionState)==null||s.call(a,{position:i,playbackRate:o,duration:n})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${n}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};var fl=require("@vkontakte/videoplayer-shared/es2018");var G3=be('<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 ev(t,e){let i=ke(e,["$$slots","$$events","$$legacy","children"]);var o=G3();let n;var a=h(o);ge(a,()=>{var s;return(s=e.children)!=null?s:ie}),_e(),g(o),I(()=>n=we(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})),b(t,o)}var Y3=L('<div><div><!></div> <span class="title svelte-1pbsod4"> </span></div>'),j3={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 tv(t,e){z(e,!0),K(t,j3);let[i,o]=He(),n=()=>C(p,"$interfaceLanguage$",i),a=()=>C(f,"$isMobile$",i),s=Se(),d=Qt(),l=!!s.webApi.pictureInPictureApi,p=s.interfaceLanguage$,f=s.ui.isMobile,_=s.ui.t,u=m(()=>n()&&_("pip_dummy_title")),$=hu(d.view);var w=Y3();te(w,1,"player-pip-dummy svelte-1pbsod4",null,{},{"is-pip-api":l}),tt(w,$);var y=h(w);let S;var k=h(y);ev(k,{}),g(y);var P=M(y,2),A=h(P,!0);g(P),g(w),I(E=>{S=te(y,1,"dummy-image svelte-1pbsod4",null,S,E),ve(A,r(u))},[()=>({desktop:!a()})]),b(t,w),q(),o()}var Z3=Object.defineProperty,X3=(t,e,i)=>e in t?Z3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,pl=(t,e,i)=>X3(t,typeof e!="symbol"?e+"":e,i),J3=460,ex=280,Ud=class{constructor({enabled:e=!0}={enabled:!0}){pl(this,"playerDomElement"),pl(this,"playerParentShadowRoot"),pl(this,"playerDummyElement"),pl(this,"svelteContext"),pl(this,"pipWindow"),pl(this,"info",{isActive$:new fl.ValueSubject(!1),isEnabled$:new fl.ValueSubject(!1),type:1}),this.info.isEnabled$=new fl.ValueSubject(e)}isSupported(){let{isEmbed:e}=(0,fl.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(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:J3,height:ex,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(l=>[...l.cssRules].map(p=>p.cssText).join(" ")).filter(Boolean).join(`
|
|
395
|
-
`),n=document.createElement("style");n.textContent=o;let a=this.createStretchedContainer(),s=a.attachShadow({mode:"open"});s.append(n),s.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=ts(tv,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",l=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Ks(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1))})}async remove(){return new Promise(e=>{var i;(i=documentPictureInPicture.window)==null||i.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 q1(t){return t instanceof Ud}var yu=class{static getLatestSupportedVersion(e){let i=new ta,o=new Ud(e);if(o.isSupported())return o;if(i.isSupported())return i}};function xu(t,e){var n,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let s of i)o[s]=(a=(n=e[s])!=null?n:t[s])!=null?a:void 0;return o}var W1="Inner error. Unexpectedly root annotation container null reference exception",K1="Annotation with such name already exists",Q1="Annotation with such name does not exist";var ml=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};var vl=require("@vkontakte/videoplayer-shared/es2018"),tx="1",ix=100,wu=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new vl.Subscription}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=(0,vl.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"},ix);this.subscriptions.add((0,vl.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){var o;if(!this.rootAnnotationsContainer)throw new ml(W1);if(this.annotations.has(e))throw new ml(K1);i.style.zIndex=(o=i.style.zIndex)!=null?o:tx,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 ml(Q1);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let 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 ba=require("@vkontakte/videoplayer-shared/es2018"),zo=class{init({store:e,microStores:i,interactiveController:o,config:n}){return(0,ba.assertNonNullable)(e),(0,ba.assertNonNullable)(i),(0,ba.assertNonNullable)(n),n.interactiveData&&(0,ba.assertNonNullable)(o),this.subscription=new ba.Subscription,this.subscription}};var zd=class extends zo{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...ae(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 qd=class extends zo{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...ae(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:p,isMobile:f}=a.ui,_=ye(f),u=()=>_&&ye(p);return o.add(p.subscribe($=>{if(!_)return;let w=ye(s);ye(l)?this.state$.set($):w!==null&&this.state$.set(!w||$)})),o.add(l.subscribe($=>{this.state$.set(!$||u())})),o.add(s.subscribe($=>{if($===null)return;let w=ye(d);if(u()){this.state$.set(!0);return}w&&this.state$.set(!$)})),o}};var Wd=class extends zo{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=ae("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 G1=require("@vkontakte/videoplayer-shared/es2018"),iv=ae(!1),Su=null,Kd=class extends zo{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...iv,set:(i,o=!1)=>{i!==ye(iv)&&(this.clearTimeout(),iv.set(i),!i&&Su&&(Su=!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:p}=n.ui.controls;o.add(l.subscribe(_=>{ye(s)&&_&&this.state$.set(!1)}));let f=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add((0,G1.combine)({isPlaying$:d,isInteractiveTime$:s,interactiveTimeIndicator:p}).subscribe(({isPlaying$:_,isInteractiveTime$:u,interactiveTimeIndicator:$})=>{var w,y;if(!(!_||!($!=null&&$.isDisplayed))){if(!u)return this.state$.set(!1);f.tooltipHelpHintActive&&Su===null&&(Su=!0,f.tooltipHelpHintActive=!1,this.state$.set(!0),(y=(w=n.callbacks)==null?void 0:w.onInteractiveTimeIndicatorHintDeactivated)==null||y.call(w))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};var Cu=require("@vkontakte/videoplayer-shared/es2018");var Qd=class extends zo{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...ae(null),toggle:Cu.noop};this.checkIfShouldHide=i=>ks(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(ye(s)))return;let l=ye(this.state$),{isEnded$:p,playbackState$:f}=n.state,{disabledControls$:_}=n.ui.controls,u=ye(p),$=ye(f);if(l)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),_.remove(Pp),!u&&this.graphMadePause&&n.actions.internal.play()}catch(w){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{await(a==null?void 0:a.toggleGraphView(!0)),this.state$.set(!0),_.add(Pp),!u&&this.graphMadePause&&n.actions.internal.pause()}catch(w){d({message:"Cant show graph"})}}},o.add((0,Cu.combine)({graphIsOpened:this.state$,currentGridType:s}).subscribe(async({graphIsOpened:l,currentGridType:p})=>{if(this.checkIfShouldHide(p)&&l)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1)}catch(_){d({message:"Cant hide graph"})}})),o}};var ov=require("@vkontakte/videoplayer-shared/es2018"),Gd=class extends zo{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:ae(!1),isEnabled$:ae(!1),type$:ae(void 0)}}init(i){let o=super.init(i),{store:n}=i,{info:{isActive$:a,isEnabled$:s,type:d}}=n.webApi.pictureInPictureApi||{info:{isActive$:new ov.ValueSubject(!1),isEnabled$:new ov.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 ku=require("@vkontakte/videoplayer-shared/es2018");var Tu=require("@vkontakte/videoplayer-shared/es2018"),Y1=({maxShowCount:t,timeout:e})=>{let i=[t!==0?ox({maxCount:t}):void 0,e!==0?nx({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(n=>n.notificationShowed(o)),canShowNotification:o=>i.every(n=>n.canShowNotification(o))}},ox=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,n;e[i]=((o=e[i])!=null?o:0)+1,Tu.safeStorage.set("videoplayer_notifications_manager_count",JSON.stringify((n=e[i])!=null?n:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},nx=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Tu.safeStorage.get(e)||"{}")}catch(a){return{}}},o=a=>Tu.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 Yd=class extends zo{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:ae({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:n,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:s,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:l}}}=i;this.notificationManager=Y1({maxShowCount:a,timeout:s});let p=n.getPlayer();return o.add(p.events.severeStallOccured$.pipe((0,ku.filterChanged)(),(0,ku.filter)(f=>f)).subscribe(()=>{d&&!p.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(l&&n.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var j1=()=>[zd,qd,Wd,Kd,Qd,Gd,Yd].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});var gl=require("@vkontakte/videoplayer-shared/es2018");var rx=Object.defineProperty,sx=(t,e,i)=>e in t?rx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Xt=(t,e,i)=>sx(t,typeof e!="symbol"?e+"":e,i),ax={preload:!0,autoplay:!1,repeat:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Ki.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:(0,jd.isMobile)(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},xn=ee(void 0),Iu=class extends HTMLElement{constructor(){super(),Xt(this,"svelteStubComponent"),Xt(this,"svelteRootComponent"),Xt(this,"store"),Xt(this,"microStoresRoot"),Xt(this,"statistics"),Xt(this,"sentry"),Xt(this,"_shadowRoot"),Xt(this,"playerContainer"),Xt(this,"rootContainer"),Xt(this,"shadowRootContainer"),Xt(this,"uiConfig"),Xt(this,"coreConfig"),Xt(this,"statisticsConfig"),Xt(this,"interactiveController"),Xt(this,"interactiveContainer"),Xt(this,"graphMadePause"),Xt(this,"currentPlayingVideoIndex",0),Xt(this,"needToRepeatPlaylist",!1),Xt(this,"videoConfig"),Xt(this,"pictureInPictureApi"),Xt(this,"mediaSessionApi"),Xt(this,"unsubscribePlayerPhaseSubscription"),Xt(this,"logger"),Xt(this,"log"),Xt(this,"subscription"),Xt(this,"interactiveSubscription"),Xt(this,"annotationsApi"),Xt(this,"slotsApi"),Xt(this,"prevIsid"),Xt(this,"isInited",!1),Xt(this,"internalsExposure",null),Xt(this,"shadowDOMCallbacksDisabled",!1),Xt(this,"createOneStat",(e,i={})=>{var o,n,a,s;let{albumId:d,statPlace:l,statUserSalt:p,statTrackCode:f,statVKAppId:_,refreshStatAuthToken:u,autoplay:$,isMobile:w,isTouch:y,refDomain:S,deviceId:k,interactiveData:P}=xu(this.videoConfig,i),A=(o=P==null?void 0:P.projectInfo)==null?void 0:o.pid,E=(a=(n=this.interactiveController)==null?void 0:n.state.isReplay$.getValue())!=null?a:!1;E&&(this.prevIsid=void 0);let{unitedVideoId:T,isClip:V=!1}=e;if(this.uiConfig.features.statistics&&T)return new X1.OneStat({movieId:T,albumId:d,place:l,trackCode:f,vkAppId:_,autoplay:(s=$&&!this.interactiveController)!=null?s:!1,mobile:y!=null?y:w,clip:V,refDomain:S,deviceId:k,...A&&(!this.isInited||E)&&{projectId:Number(A)}},{refreshAuthToken:u,userSalt:p,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}),gl.devNull.create("ui"),this.logger=new Ki.Logger,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Ki.Subscription,this.interactiveSubscription=new Ki.Subscription,this.graphMadePause=!1}connectedCallback(){var e,i;if(this.isInited||this.shadowDOMCallbacksDisabled)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,n=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=me({title:o,thumbUrl:n}),s={target:this.playerContainer,props:a};this.svelteStubComponent=ts(Jm,s)}disconnectedCallback(){var e,i,o,n,a;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.mediaSessionApi)==null||i.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.subscription.unsubscribe(),(o=this.unsubscribePlayerPhaseSubscription)==null||o.call(this),(n=this.interactiveController)==null||n.destroy(),this.interactiveSubscription.unsubscribe(),(a=this.internalsExposure)==null||a.destroy(),gl.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){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createPlayer(e,i={},o){var n,a,s,d,l,p,f,_;if(!this.videoConfig)return;let{albumId:u,statPlace:$,statAuthToken:w,preload:y,autoplay:S,volume:k,muted:P,fromTime:A,canRewindLive:E,supportLink:T,showAds:V,adsSlotId:U,adsParams:G={},adsPreviewParam:F,adsAutoplayParam:Y,interfaceLanguage:X,isCyrillicRelatedInterface:oe,logoClickable:pe,logoHidden:le,isMobile:Ve,isTouch:Ae,isAudioDisabled:J,isLiveCatchUpMode:Me,fullScreenTarget:j,failoverHosts:B,canDownload:Re,callbacks:ne,interactiveData:Ie,showThumbTimer:Ne,additionalButtons:fe=[],additionalSettingsMenuItems:D=[],additionalContextMenuItems:de=[],repeat:Ee,saveRate:Ge,volumeMultiplier:at,showEndScreen:Pe,showAutoplayNext:$e}=xu(this.videoConfig,i),{sources:Le,title:Ze,thumbUrl:ut,unitedVideoId:nt,isClip:Dt=!1,duration:rt,adsParams:xt={},videoEpisodes:qt,previewThumbsData:Gt,subtitles:Be,live:re}=e,W={...G,...xt},se=this.getNextVideoInfo(),he={sources:Le,title:Ze,thumbUrl:ut,subtitles:Be,unitedVideoId:nt,isClip:Dt,live:re,albumId:u,statPlace:$,autoplay:S,muted:P,volume:k,fromTime:A,canRewindLive:E,showAds:V,adsSlotId:U,adsParams:W,adsPreviewParam:F,adsAutoplayParam:Y,duration:rt,logoClickable:pe,logoHidden:le,isTouch:Ae!=null?Ae:Ve,repeat:Ee,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:se.nextVideoTitle,endScreenVideoThumb:se.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Ce={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi};this.log({message:`create player, props: ${JSON.stringify(he)}`});let De=(n=this.interactiveController)==null?void 0:n.state.statistics$.getValue(),pt=(De==null?void 0:De.oneStat)||this.createOneStat(e,i);pt&&(this.statistics=new nu(pt,De==null?void 0:De.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new ea(this.uiConfig.sentry,{version:Zs,env:Ac},{movieId:nt,albumId:u,place:$,autoplay:(a=S&&!this.interactiveController)!=null?a:!1,mobile:Ae!=null?Ae:Ve,clip:Dt}),this.interactiveController&&((d=this.prevIsid)!=null||(this.prevIsid=(s=this.statistics)==null?void 0:s.oneStat.isid$.getValue())),this.sentry={...this.sentry,...ea.getInstance()};let Ye=!!Ie,lt=[],Je="tooltip_interactive_go_back_disabled_first";if(Ye&&this.interactiveController){let dt=this.interactiveController.state.isInitialChapter$.getValue(),ti=this.interactiveController.getHistoryState();dt&<.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||lt.push("SEEK_TO_INTERACTIVE_BUTTON"),ti.hasPrevChapter$.getValue()||(lt.push("PLAY_PREV_CHAPTER_BUTTON"),dt||(ti.isGoBackLimited$.getValue()?Je="tooltip_interactive_go_back_disabled_limit":Je="tooltip_interactive_go_back_disabled"))}let kt=()=>{var dt;this.isInited=!1,this.prevIsid=void 0;let ti=(o==null?void 0:o.info.isEnded$.getValue())&&((dt=this.interactiveController)==null?void 0:dt.state.isEndChapter$.getValue());ne.onReplayInteractiveVideo&&!ti?ne.onReplayInteractiveVideo():this.replayInteractiveVideo()};this.store=f1({player:o,interfaceLanguage:X,isCyrillicRelatedInterface:oe,videoId:nt,isClip:Dt,isLiveCatchUpMode:Me,isAudioDisabled:J,statAuthToken:w,callbacks:ne,webApi:Ce,videoEpisodes:qt,previewThumbsData:Gt,canDownload:Re,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:lt,isInteractive:Ye,saveRate:Ge,interactiveRanges$:(l=this.interactiveController)==null?void 0:l.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:kt,playPrevChapterDisabledTooltip:Je,hasInteractiveBranches:!!((_=(f=this.interactiveController)==null?void 0:f.getChapterBranches())!=null&&_.length),additionalButtons:this.uiConfig.features.additionalButtons?fe:[],additionalSettingsMenuItems:D!=null?D:[],additionalContextMenuItems:de!=null?de:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),looped:Ee&&this.videoConfig.videos.length===1,statistics:this.statistics,internalsExposure:this.internalsExposure});let{stores:Jt}=this.microStoresRoot=j1(),Qe=()=>{var dt,ti,Bi,No,Di,So;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onCurrentFormatChanged)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(Jt.interactiveControlsOpacity$.subscribe(Mt=>{var _t;Mt!==null&&((_t=this==null?void 0:this.interactiveController)==null||_t.setDisabledControls(Mt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onThroughputEstimationChanged)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onTrafficSavingEnabledChanged)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(new Ki.Observable(Mt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(_t=>Mt.next(_t)))}).pipe(this.uiConfig.features.skipInitialPlaybackRateValue?(0,Ki.skip)(1):Mt=>Mt).subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onCurrentPlaybackRateChanged)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(this.store.state.volume$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onVolumeChange)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(this.store.state.muted$.subscribe(Mt=>{var _t,Et;return Mt?(_t=ne==null?void 0:ne.onMute)==null?void 0:_t.call(ne):(Et=ne==null?void 0:ne.onUnmute)==null?void 0:Et.call(ne)})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onVideoBitrateChanged)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Mt=>{var _t;let Et=(_t=this.store)==null?void 0:_t.ui.controls.disabledControls$;Et&&(Mt&&!Et.includes(Ql)&&Et.add(Ql),Mt||Et.remove(Ql))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async Mt=>{var _t;if(!jd.clientChecker.browser.isSamsungBrowser||!Mt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((_t=this.videoConfig)==null?void 0:_t.callbacks.onExternalFullscreenExit)})),this.statistics&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onVSIDChanged)==null?void 0:_t.call(ne,Mt)})),this.initMediaSession(),O(xn,me({interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Le,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Ze,thumbUrl:ut,subtitles:Be,live:re,preload:y,autoplay:S,muted:P,volume:k,fromTime:A,canRewindLive:E,supportLink:T,showAds:V,adsSlotId:U,adsParams:W,adsPreviewParam:F,adsAutoplayParam:Y,duration:rt,logoClickable:pe,logoHidden:le,isMobile:Ae!=null?Ae:Ve,failoverHosts:B,fullScreenTarget:j,saveRate:Ge,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Ne,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:se.nextVideoTitle,endScreenVideoThumb:se.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:at,showEndScreen:Pe,showAutoplayNext:$e}));let Bo={target:this.playerContainer,props:r(xn)};this.svelteRootComponent=ts(jm,Bo),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(Bi=(ti=(dt=this.videoConfig)==null?void 0:dt.callbacks)==null?void 0:ti.onInited)==null||Bi.call(ti)),(No=this.internalsExposure)==null||No.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((So=(Di=this.videoConfig)==null?void 0:Di.callbacks)!=null&&So.onDevNullLog)?gl.devNull.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):gl.devNull.destroy("ui")};this.coreConfig.asyncResolveClientChecker?jd.clientChecker.isInited$.subscribe(dt=>{dt&&(console.log("UI SDK async start"),Qe())}):Qe()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,n=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!n)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var l;return(l=a.onPlayerPhaseChanged)==null?void 0:l.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var l;return d&&((l=a.onPlaybackStateChanged)==null?void 0:l.call(a,d))})).add(o.state.isLive$.subscribe(d=>{var l;return(l=a.onIsLiveChanged)==null?void 0:l.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var l;return(l=a.onIsActiveLiveChanged)==null?void 0:l.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var l;return(l=a.onIsAudioAvailableChanged)==null?void 0:l.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var l;return(l=a.onCurrentQualityChanged)==null?void 0:l.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var l;return(l=a.onAvailableQualitiesChanged)==null?void 0:l.call(a,d.map(({value:p})=>p).filter(p=>p!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(n.pictureInPicture$.isActive$.subscribe(d=>{var l,p;return d?(l=a.onPiPEnter)==null?void 0:l.call(a):(p=a.onPiPExit)==null?void 0:p.call(a)}));let s=a==null?void 0:a.uiInfo;s&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var l;return(l=s.onControlsVisibleChanged)==null?void 0:l.call(s,d)})).add(o.ui.isMobile.subscribe(d=>{var l;return(l=s.onIsMobileChanged)==null?void 0:l.call(s,d)})).add(o.ui.playerSize.subscribe(d=>{var l;return(l=s.onPlayerSizeChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var l;return(l=s.onPrevButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.playButton.subscribe(d=>{var l;return(l=s.onPlayButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var l;return(l=s.onReplayButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var l;return(l=s.onNextButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var l;return(l=s.onPlayPrevChapterChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var l;return(l=s.onSeekToInteractiveButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var l;return(l=s.onGraphButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var l;return(l=s.onLiveButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.time.subscribe(d=>{var l;return(l=s.onTimeUpdateChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.episodes.subscribe(d=>{var l;return(l=s.onEpisodesChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var l;return(l=s.onSubtitlesChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.settings.subscribe(d=>{var l;return(l=s.onSettingsChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var l;return(l=s.onFullscreenChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var l;return(l=s.onChromecastChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.pip.subscribe(d=>{var l;return(l=s.onPipChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var l;return(l=s.onVkLogoChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var l;return(l=s.onInteractiveTimeIndicatorChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.timeline.subscribe(d=>{var l;return(l=s.onTimelineChanged)==null?void 0:l.call(s,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let n=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!n){this.log({message:"no next video"});return}this.isInited&&(0,Ki.isNonNullable)(n.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(n.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(n,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}async initInteractives(){var e,i,o,n;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:a}=await import("@vkontakte/videoplayer-interactive/es2018");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,d=s?ye(s):this.videoConfig.interfaceLanguage,{projectInfo:l,initChapterId:p,historyApi:f,videoLoader:_}=this.videoConfig.interactiveData;this.interactiveController=new a({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:d,graph:this.uiConfig.features.interactiveGraph,projectInfo:l,initChapterId:p,historyApi:f,vkVideoLoader:_,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation}});let{isInteractiveExpectation$:u,isSeekable$:$}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add($.subscribe(y=>{if(!this.isInited)return;let S=this.store;y?S.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):S.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(u.subscribe(y=>{this.store&&this.store.state.isInteractiveExpectation$.set(y)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(y=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...y.config,title:(l==null?void 0:l.title)||y.config.title};let S=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(y.player,S),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:y,actionType:S})=>{var k,P,A,E,T,V;if(!this.store||!this.microStoresRoot)return;let U=u.getValue();if(y==="action-choice"&&S==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Gl)),y==="action-choice-canceled"){let G=ye(this.store.state.isPlaying$)||U;if(((A=(k=this.videoConfig)==null?void 0:k.isTouch)!=null?A:(P=this.videoConfig)!=null&&P.isMobile)&&G){this.store.ui.interactiveHideMobileControls.set(!0);return}(V=(E=this.videoConfig)==null?void 0:(T=E.callbacks).onDisabledInteractiveClick)==null||V.call(T)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:y,removeAllOpenURI:S})=>{this.store&&y==="container-fake-removed"&&S&&this.store.ui.controls.disabledControls$.remove(Gl)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(n=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&n.onInteractiveHistoryChanged){let y=this.interactiveController.getHistoryState();this.subscription.add(y.history$.subscribe(S=>{var k,P,A;S.length&&((A=(P=(k=this.videoConfig)==null?void 0:k.callbacks)==null?void 0:P.onInteractiveHistoryChanged)==null||A.call(P,S))}))}this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var y,S,k,P;(y=this.microStoresRoot)==null||y.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(P=(S=this.videoConfig)==null?void 0:(k=S.callbacks).onInteractiveTimeIndicatorClick)==null||P.call(k)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(y=>{this.log({message:y.toString()})}))}catch(a){this.log({message:a.message})}}initPlayer(e,i={}){var o,n,a,s,d,l,p,f,_,u,$,w,y,S,k,P,A,E,T,V,U,G,F,Y,X,oe;if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData)throw new Error("empty videos");if(this.videoConfig=xu(ax,(0,Ki.cloneDeepWith)(e,pe=>pe instanceof HTMLElement?pe:void 0)),this.uiConfig=Qg((o=i.ui)!=null?o:{}),this.coreConfig=(n=i.core)!=null?n:{configName:[]},this.statisticsConfig=(a=i.statistics)!=null?a:{},this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer.style.minHeight="unset",this.style.display="block",this.style.width="100%",this.style.height="100%"),this.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},this.uiConfig.features.exposeInternalsToGlobal&&((d=this.internalsExposure)!=null||(this.internalsExposure=new Ki.InternalsExposure("UI"))),gl.devNull.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((l=this.videoConfig)==null?void 0:l.showAds)],numbers:[(0,Z1.now)()]}),(0,Ki.isNonNullable)(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(f=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?f:!0),(0,Ki.isNonNullable)(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(u=(_=this.uiConfig.features.pip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?u:!0,this.uiConfig.features.dpip=(w=($=this.uiConfig.features.dpip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.videoConfig.isTouch=(S=(y=this.uiConfig.isMobile)!=null?y:this.videoConfig.isTouch)!=null?S:this.videoConfig.isMobile,(k=this.videoConfig).autoplay&&(k.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(P=this.uiConfig.ads.enable)!=null?P:this.videoConfig.showAds,this.videoConfig.adsSlotId=(A=this.uiConfig.ads.slot)!=null?A:this.videoConfig.adsSlotId,this.videoConfig.adsPreviewParam=(E=this.uiConfig.ads.preview)!=null?E:this.videoConfig.adsPreviewParam,this.videoConfig.logoHidden=!((T=this.uiConfig.showLogo)!=null?T:!this.videoConfig.logoHidden),(V=this.videoConfig).canRewindLive&&(V.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(U=this.videoConfig.supportLink)!=null?U:this.uiConfig.supportLink,this.videoConfig.showEndScreen=(G=this.uiConfig.features.endScreen)!=null?G:this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=(F=this.uiConfig.features.autoplayNext)!=null?F:this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=(Y=this.uiConfig.features.nextPrevButtons)!=null?Y:this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((X=this.videoConfig.videos)!=null&&X[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let pe={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=yu.getLatestSupportedVersion(pe):this.pictureInPictureApi=new ta(pe)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new bu:void 0,this.slotsApi=this.uiConfig.features.slots?new mu:void 0,this.annotationsApi=this.uiConfig.features.annotations?new wu(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),(oe=this.slotsApi)==null||oe.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]),q1(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(xn)&&(r(xn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(xn).nextButtonActive=this.isNextButtonActive(),r(xn).prevButtonActive=this.isPrevButtonActive(),r(xn).endScreenVideoTitle=o.nextVideoTitle,r(xn).endScreenVideoThumb=o.nextVideoThumb,r(xn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}={...this.videoConfig.videos[this.currentPlayingVideoIndex]},o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",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(){var e,i,o,n;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(n=this.svelteRootComponent)==null||n.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,r(xn)&&(r(xn).needToRepeatPlaylist=this.needToRepeatPlaylist,r(xn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(xn).nextButtonActive=this.isNextButtonActive(),r(xn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,n;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(n=this.svelteRootComponent)==null||n.setAutoQualityLimits(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}async setLanguage(e){var i;await((i=this.store)==null?void 0:i.actions.internal.setLanguage(e))}setLiveStart(e){var i,o;this.log({message:"live started"}),(i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0})}setLiveWaitingRecover(){var e;this.log({message:"live waiting"}),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var i,o;(i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!0),(o=this.store)==null||o.destroy()})}setLiveWaitingRecord(){var e;this.log({message:"post live"}),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var i,o;(i=this.store)==null||i.actions.internal.setLiveWaitingRecord(!0),(o=this.store)==null||o.destroy()})}setLiveEnd(e){var i;this.log({message:"live ended"}),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var o,n;(o=this.store)==null||o.actions.internal.setLiveWaitingRecover(!1),(n=this.store)==null||n.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})})}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i;return(i=(e=this.statistics)==null?void 0:e.oneStat.getDeviceId())!=null?i:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}async replayInteractiveChapter(e){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let n=ye(this.store.state.positionExact$),s=ye(this.store.state.interactiveEpisodes$).find(l=>!l.completed);this.interactiveController.events.playerChanged$.pipe((0,Ki.once)()).subscribe(()=>{s&&n>=s.time?this.seekTime(s.time):this.seekTime(n),e==null||e()});let d=this.interactiveController.getCurrentChapter();await this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&this.statistics.oneStat.updateContext(e)}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}unmountComponent(e){e&&Ks(e)}};var hl=require("@vkontakte/videoplayer-shared/es2018"),Eu=require("@vkontakte/videoplayer-core/es2018"),lx=()=>{window.customElements.define("vk-video-player",Iu)};
|
|
395
|
+
`),n=document.createElement("style");n.textContent=o;let a=this.createStretchedContainer(),s=a.attachShadow({mode:"open"});s.append(n),s.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=ts(tv,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",l=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Ks(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1))})}async remove(){return new Promise(e=>{var i;(i=documentPictureInPicture.window)==null||i.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 q1(t){return t instanceof Ud}var yu=class{static getLatestSupportedVersion(e){let i=new ta,o=new Ud(e);if(o.isSupported())return o;if(i.isSupported())return i}};function xu(t,e){var n,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let s of i)o[s]=(a=(n=e[s])!=null?n:t[s])!=null?a:void 0;return o}var W1="Inner error. Unexpectedly root annotation container null reference exception",K1="Annotation with such name already exists",Q1="Annotation with such name does not exist";var ml=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};var vl=require("@vkontakte/videoplayer-shared/es2018"),tx="1",ix=100,wu=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new vl.Subscription}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=(0,vl.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"},ix);this.subscriptions.add((0,vl.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){var o;if(!this.rootAnnotationsContainer)throw new ml(W1);if(this.annotations.has(e))throw new ml(K1);i.style.zIndex=(o=i.style.zIndex)!=null?o:tx,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 ml(Q1);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let 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 ba=require("@vkontakte/videoplayer-shared/es2018"),zo=class{init({store:e,microStores:i,interactiveController:o,config:n}){return(0,ba.assertNonNullable)(e),(0,ba.assertNonNullable)(i),(0,ba.assertNonNullable)(n),n.interactiveData&&(0,ba.assertNonNullable)(o),this.subscription=new ba.Subscription,this.subscription}};var zd=class extends zo{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...ae(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 qd=class extends zo{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...ae(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:p,isMobile:f}=a.ui,_=ye(f),u=()=>_&&ye(p);return o.add(p.subscribe($=>{if(!_)return;let w=ye(s);ye(l)?this.state$.set($):w!==null&&this.state$.set(!w||$)})),o.add(l.subscribe($=>{this.state$.set(!$||u())})),o.add(s.subscribe($=>{if($===null)return;let w=ye(d);if(u()){this.state$.set(!0);return}w&&this.state$.set(!$)})),o}};var Wd=class extends zo{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=ae("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 G1=require("@vkontakte/videoplayer-shared/es2018"),iv=ae(!1),Su=null,Kd=class extends zo{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...iv,set:(i,o=!1)=>{i!==ye(iv)&&(this.clearTimeout(),iv.set(i),!i&&Su&&(Su=!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:p}=n.ui.controls;o.add(l.subscribe(_=>{ye(s)&&_&&this.state$.set(!1)}));let f=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add((0,G1.combine)({isPlaying$:d,isInteractiveTime$:s,interactiveTimeIndicator:p}).subscribe(({isPlaying$:_,isInteractiveTime$:u,interactiveTimeIndicator:$})=>{var w,y;if(!(!_||!($!=null&&$.isDisplayed))){if(!u)return this.state$.set(!1);f.tooltipHelpHintActive&&Su===null&&(Su=!0,f.tooltipHelpHintActive=!1,this.state$.set(!0),(y=(w=n.callbacks)==null?void 0:w.onInteractiveTimeIndicatorHintDeactivated)==null||y.call(w))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};var Cu=require("@vkontakte/videoplayer-shared/es2018");var Qd=class extends zo{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...ae(null),toggle:Cu.noop};this.checkIfShouldHide=i=>ks(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(ye(s)))return;let l=ye(this.state$),{isEnded$:p,playbackState$:f}=n.state,{disabledControls$:_}=n.ui.controls,u=ye(p),$=ye(f);if(l)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),_.remove(Pp),!u&&this.graphMadePause&&n.actions.internal.play()}catch(w){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{await(a==null?void 0:a.toggleGraphView(!0)),this.state$.set(!0),_.add(Pp),!u&&this.graphMadePause&&n.actions.internal.pause()}catch(w){d({message:"Cant show graph"})}}},o.add((0,Cu.combine)({graphIsOpened:this.state$,currentGridType:s}).subscribe(async({graphIsOpened:l,currentGridType:p})=>{if(this.checkIfShouldHide(p)&&l)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1)}catch(_){d({message:"Cant hide graph"})}})),o}};var ov=require("@vkontakte/videoplayer-shared/es2018"),Gd=class extends zo{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:ae(!1),isEnabled$:ae(!1),type$:ae(void 0)}}init(i){let o=super.init(i),{store:n}=i,{info:{isActive$:a,isEnabled$:s,type:d}}=n.webApi.pictureInPictureApi||{info:{isActive$:new ov.ValueSubject(!1),isEnabled$:new ov.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 ku=require("@vkontakte/videoplayer-shared/es2018");var Tu=require("@vkontakte/videoplayer-shared/es2018"),Y1=({maxShowCount:t,timeout:e})=>{let i=[t!==0?ox({maxCount:t}):void 0,e!==0?nx({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(n=>n.notificationShowed(o)),canShowNotification:o=>i.every(n=>n.canShowNotification(o))}},ox=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,n;e[i]=((o=e[i])!=null?o:0)+1,Tu.safeStorage.set("videoplayer_notifications_manager_count",JSON.stringify((n=e[i])!=null?n:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},nx=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Tu.safeStorage.get(e)||"{}")}catch(a){return{}}},o=a=>Tu.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 Yd=class extends zo{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:ae({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:n,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:s,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:l}}}=i;this.notificationManager=Y1({maxShowCount:a,timeout:s});let p=n.getPlayer();return o.add(p.events.severeStallOccured$.pipe((0,ku.filterChanged)(),(0,ku.filter)(f=>f)).subscribe(()=>{d&&!p.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(l&&n.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var j1=()=>[zd,qd,Wd,Kd,Qd,Gd,Yd].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});var gl=require("@vkontakte/videoplayer-shared/es2018");var rx=Object.defineProperty,sx=(t,e,i)=>e in t?rx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Xt=(t,e,i)=>sx(t,typeof e!="symbol"?e+"":e,i),ax={preload:!0,autoplay:!1,repeat:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Ki.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:(0,jd.isMobile)(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},xn=ee(void 0),Iu=class extends HTMLElement{constructor(){super(),Xt(this,"svelteStubComponent"),Xt(this,"svelteRootComponent"),Xt(this,"store"),Xt(this,"microStoresRoot"),Xt(this,"statistics"),Xt(this,"sentry"),Xt(this,"_shadowRoot"),Xt(this,"playerContainer"),Xt(this,"rootContainer"),Xt(this,"shadowRootContainer"),Xt(this,"uiConfig"),Xt(this,"coreConfig"),Xt(this,"statisticsConfig"),Xt(this,"interactiveController"),Xt(this,"interactiveContainer"),Xt(this,"graphMadePause"),Xt(this,"currentPlayingVideoIndex",0),Xt(this,"needToRepeatPlaylist",!1),Xt(this,"videoConfig"),Xt(this,"pictureInPictureApi"),Xt(this,"mediaSessionApi"),Xt(this,"unsubscribePlayerPhaseSubscription"),Xt(this,"logger"),Xt(this,"log"),Xt(this,"subscription"),Xt(this,"interactiveSubscription"),Xt(this,"annotationsApi"),Xt(this,"slotsApi"),Xt(this,"prevIsid"),Xt(this,"isInited",!1),Xt(this,"internalsExposure",null),Xt(this,"shadowDOMCallbacksDisabled",!1),Xt(this,"createOneStat",(e,i={})=>{var o,n,a,s;let{albumId:d,statPlace:l,statUserSalt:p,statTrackCode:f,statVKAppId:_,refreshStatAuthToken:u,autoplay:$,isMobile:w,isTouch:y,refDomain:S,deviceId:k,interactiveData:P}=xu(this.videoConfig,i),A=(o=P==null?void 0:P.projectInfo)==null?void 0:o.pid,E=(a=(n=this.interactiveController)==null?void 0:n.state.isReplay$.getValue())!=null?a:!1;E&&(this.prevIsid=void 0);let{unitedVideoId:T,isClip:V=!1}=e;if(this.uiConfig.features.statistics&&T)return new X1.OneStat({movieId:T,albumId:d,place:l,trackCode:f,vkAppId:_,autoplay:(s=$&&!this.interactiveController)!=null?s:!1,mobile:y!=null?y:w,clip:V,refDomain:S,deviceId:k,...A&&(!this.isInited||E)&&{projectId:Number(A)}},{refreshAuthToken:u,userSalt:p,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}),gl.devNull.create("ui"),this.logger=new Ki.Logger,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Ki.Subscription,this.interactiveSubscription=new Ki.Subscription,this.graphMadePause=!1}connectedCallback(){var e,i;if(this.isInited||this.shadowDOMCallbacksDisabled)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,n=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=me({title:o,thumbUrl:n}),s={target:this.playerContainer,props:a};this.svelteStubComponent=ts(Jm,s)}disconnectedCallback(){var e,i,o,n,a;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.mediaSessionApi)==null||i.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.subscription.unsubscribe(),(o=this.unsubscribePlayerPhaseSubscription)==null||o.call(this),(n=this.interactiveController)==null||n.destroy(),this.interactiveSubscription.unsubscribe(),(a=this.internalsExposure)==null||a.destroy(),gl.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){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createPlayer(e,i={},o){var n,a,s,d,l,p,f,_;if(!this.videoConfig)return;let{albumId:u,statPlace:$,statAuthToken:w,preload:y,autoplay:S,volume:k,muted:P,fromTime:A,canRewindLive:E,supportLink:T,showAds:V,adsSlotId:U,adsParams:G={},adsPreviewParam:F,adsAutoplayParam:Y,interfaceLanguage:X,isCyrillicRelatedInterface:oe,logoClickable:pe,logoHidden:le,isMobile:Ve,isTouch:Ae,isAudioDisabled:J,isLiveCatchUpMode:Me,fullScreenTarget:j,failoverHosts:B,canDownload:Re,callbacks:ne,interactiveData:Ie,showThumbTimer:Ne,additionalButtons:fe=[],additionalSettingsMenuItems:D=[],additionalContextMenuItems:de=[],repeat:Ee,saveRate:Ge,volumeMultiplier:at,showEndScreen:Pe,showAutoplayNext:$e}=xu(this.videoConfig,i),{sources:Le,title:Ze,thumbUrl:ut,unitedVideoId:nt,isClip:Dt=!1,duration:rt,adsParams:xt={},videoEpisodes:qt,previewThumbsData:Gt,subtitles:Be,live:re}=e,W={...G,...xt},se=this.getNextVideoInfo(),he={sources:Le,title:Ze,thumbUrl:ut,subtitles:Be,unitedVideoId:nt,isClip:Dt,live:re,albumId:u,statPlace:$,autoplay:S,muted:P,volume:k,fromTime:A,canRewindLive:E,showAds:V,adsSlotId:U,adsParams:W,adsPreviewParam:F,adsAutoplayParam:Y,duration:rt,logoClickable:pe,logoHidden:le,isTouch:Ae!=null?Ae:Ve,repeat:Ee,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:se.nextVideoTitle,endScreenVideoThumb:se.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Ce={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi};this.log({message:`create player, props: ${JSON.stringify(he)}`});let De=(n=this.interactiveController)==null?void 0:n.state.statistics$.getValue(),pt=(De==null?void 0:De.oneStat)||this.createOneStat(e,i);pt&&(this.statistics=new nu(pt,De==null?void 0:De.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new ea(this.uiConfig.sentry,{version:Zs,env:Ac},{movieId:nt,albumId:u,place:$,autoplay:(a=S&&!this.interactiveController)!=null?a:!1,mobile:Ae!=null?Ae:Ve,clip:Dt}),this.interactiveController&&((d=this.prevIsid)!=null||(this.prevIsid=(s=this.statistics)==null?void 0:s.oneStat.isid$.getValue())),this.sentry={...this.sentry,...ea.getInstance()};let Ye=!!Ie,lt=[],Je="tooltip_interactive_go_back_disabled_first";if(Ye&&this.interactiveController){let dt=this.interactiveController.state.isInitialChapter$.getValue(),ti=this.interactiveController.getHistoryState();dt&<.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||lt.push("SEEK_TO_INTERACTIVE_BUTTON"),ti.hasPrevChapter$.getValue()||(lt.push("PLAY_PREV_CHAPTER_BUTTON"),dt||(ti.isGoBackLimited$.getValue()?Je="tooltip_interactive_go_back_disabled_limit":Je="tooltip_interactive_go_back_disabled"))}let kt=()=>{var dt;this.isInited=!1,this.prevIsid=void 0;let ti=(o==null?void 0:o.info.isEnded$.getValue())&&((dt=this.interactiveController)==null?void 0:dt.state.isEndChapter$.getValue());ne.onReplayInteractiveVideo&&!ti?ne.onReplayInteractiveVideo():this.replayInteractiveVideo()};this.store=f1({player:o,interfaceLanguage:X,isCyrillicRelatedInterface:oe,videoId:nt,isClip:Dt,isLiveCatchUpMode:Me,isAudioDisabled:J,statAuthToken:w,callbacks:ne,webApi:Ce,videoEpisodes:qt,previewThumbsData:Gt,canDownload:Re,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:lt,isInteractive:Ye,saveRate:Ge,interactiveRanges$:(l=this.interactiveController)==null?void 0:l.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:kt,playPrevChapterDisabledTooltip:Je,hasInteractiveBranches:!!((_=(f=this.interactiveController)==null?void 0:f.getChapterBranches())!=null&&_.length),additionalButtons:this.uiConfig.features.additionalButtons?fe:[],additionalSettingsMenuItems:D!=null?D:[],additionalContextMenuItems:de!=null?de:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),looped:Ee&&this.videoConfig.videos.length===1,statistics:this.statistics,internalsExposure:this.internalsExposure});let{stores:Jt}=this.microStoresRoot=j1(),Qe=()=>{var dt,ti,Bi,No,Di,So;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onCurrentFormatChanged)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(Jt.interactiveControlsOpacity$.subscribe(Mt=>{var _t;Mt!==null&&((_t=this==null?void 0:this.interactiveController)==null||_t.setDisabledControls(Mt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onThroughputEstimationChanged)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onTrafficSavingEnabledChanged)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(new Ki.Observable(Mt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(_t=>Mt.next(_t)))}).pipe(this.uiConfig.features.skipInitialPlaybackRateValue?(0,Ki.skip)(1):Mt=>Mt).subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onCurrentPlaybackRateChanged)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(this.store.state.volume$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onVolumeChange)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(this.store.state.muted$.subscribe(Mt=>{var _t,Et;return Mt?(_t=ne==null?void 0:ne.onMute)==null?void 0:_t.call(ne):(Et=ne==null?void 0:ne.onUnmute)==null?void 0:Et.call(ne)})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onVideoBitrateChanged)==null?void 0:_t.call(ne,Mt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Mt=>{var _t;let Et=(_t=this.store)==null?void 0:_t.ui.controls.disabledControls$;Et&&(Mt&&!Et.includes(Ql)&&Et.add(Ql),Mt||Et.remove(Ql))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async Mt=>{var _t;if(!jd.clientChecker.browser.isSamsungBrowser||!Mt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((_t=this.videoConfig)==null?void 0:_t.callbacks.onExternalFullscreenExit)})),this.statistics&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Mt=>{var _t;return(_t=ne==null?void 0:ne.onVSIDChanged)==null?void 0:_t.call(ne,Mt)})),this.initMediaSession(),O(xn,me({interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Le,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Ze,thumbUrl:ut,subtitles:Be,live:re,preload:y,autoplay:S,muted:P,volume:k,fromTime:A,canRewindLive:E,supportLink:T,showAds:V,adsSlotId:U,adsParams:W,adsPreviewParam:F,adsAutoplayParam:Y,duration:rt,logoClickable:pe,logoHidden:le,isMobile:Ae!=null?Ae:Ve,failoverHosts:B,fullScreenTarget:j,saveRate:Ge,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Ne,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:se.nextVideoTitle,endScreenVideoThumb:se.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:at,showEndScreen:Pe,showAutoplayNext:$e}));let Bo={target:this.playerContainer,props:r(xn)};this.svelteRootComponent=ts(jm,Bo),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(Bi=(ti=(dt=this.videoConfig)==null?void 0:dt.callbacks)==null?void 0:ti.onInited)==null||Bi.call(ti)),(No=this.internalsExposure)==null||No.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((So=(Di=this.videoConfig)==null?void 0:Di.callbacks)!=null&&So.onDevNullLog)?gl.devNull.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):gl.devNull.destroy("ui")};this.coreConfig.asyncResolveClientChecker?jd.clientChecker.isInited$.subscribe(dt=>{dt&&(console.log("UI SDK async start"),Qe())}):Qe()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,n=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!n)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var l;return(l=a.onPlayerPhaseChanged)==null?void 0:l.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var l;return d&&((l=a.onPlaybackStateChanged)==null?void 0:l.call(a,d))})).add(o.state.isLive$.subscribe(d=>{var l;return(l=a.onIsLiveChanged)==null?void 0:l.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var l;return(l=a.onIsActiveLiveChanged)==null?void 0:l.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var l;return(l=a.onIsAudioAvailableChanged)==null?void 0:l.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var l;return(l=a.onCurrentQualityChanged)==null?void 0:l.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var l;return(l=a.onAvailableQualitiesChanged)==null?void 0:l.call(a,d.map(({value:p})=>p).filter(p=>p!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(n.pictureInPicture$.isActive$.subscribe(d=>{var l,p;return d?(l=a.onPiPEnter)==null?void 0:l.call(a):(p=a.onPiPExit)==null?void 0:p.call(a)}));let s=a==null?void 0:a.uiInfo;s&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var l;return(l=s.onControlsVisibleChanged)==null?void 0:l.call(s,d)})).add(o.ui.isMobile.subscribe(d=>{var l;return(l=s.onIsMobileChanged)==null?void 0:l.call(s,d)})).add(o.ui.playerSize.subscribe(d=>{var l;return(l=s.onPlayerSizeChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var l;return(l=s.onPrevButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.playButton.subscribe(d=>{var l;return(l=s.onPlayButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var l;return(l=s.onReplayButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var l;return(l=s.onNextButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var l;return(l=s.onPlayPrevChapterChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var l;return(l=s.onSeekToInteractiveButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var l;return(l=s.onGraphButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var l;return(l=s.onLiveButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.time.subscribe(d=>{var l;return(l=s.onTimeUpdateChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.episodes.subscribe(d=>{var l;return(l=s.onEpisodesChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var l;return(l=s.onSubtitlesChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.settings.subscribe(d=>{var l;return(l=s.onSettingsChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var l;return(l=s.onFullscreenChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var l;return(l=s.onChromecastChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.pip.subscribe(d=>{var l;return(l=s.onPipChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var l;return(l=s.onVkLogoChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var l;return(l=s.onInteractiveTimeIndicatorChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.timeline.subscribe(d=>{var l;return(l=s.onTimelineChanged)==null?void 0:l.call(s,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let n=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!n){this.log({message:"no next video"});return}this.isInited&&(0,Ki.isNonNullable)(n.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(n.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(n,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}async initInteractives(){var e,i,o,n;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:a}=await import("@vkontakte/videoplayer-interactive/es2018");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,d=s?ye(s):this.videoConfig.interfaceLanguage,{projectInfo:l,initChapterId:p,historyApi:f,videoLoader:_}=this.videoConfig.interactiveData;this.interactiveController=new a({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:d,graph:this.uiConfig.features.interactiveGraph,projectInfo:l,initChapterId:p,historyApi:f,vkVideoLoader:_,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation}});let{isInteractiveExpectation$:u,isSeekable$:$}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add($.subscribe(y=>{if(!this.isInited)return;let S=this.store;y?S.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):S.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(u.subscribe(y=>{this.store&&this.store.state.isInteractiveExpectation$.set(y)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(y=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...y.config,title:(l==null?void 0:l.title)||y.config.title};let S=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(y.player,S),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:y,actionType:S})=>{var k,P,A,E,T,V;if(!this.store||!this.microStoresRoot)return;let U=u.getValue();if(y==="action-choice"&&S==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Gl)),y==="action-choice-canceled"){let G=ye(this.store.state.isPlaying$)||U;if(((A=(k=this.videoConfig)==null?void 0:k.isTouch)!=null?A:(P=this.videoConfig)!=null&&P.isMobile)&&G){this.store.ui.interactiveHideMobileControls.set(!0);return}(V=(E=this.videoConfig)==null?void 0:(T=E.callbacks).onDisabledInteractiveClick)==null||V.call(T)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:y,removeAllOpenURI:S})=>{this.store&&y==="container-fake-removed"&&S&&this.store.ui.controls.disabledControls$.remove(Gl)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(n=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&n.onInteractiveHistoryChanged){let y=this.interactiveController.getHistoryState();this.subscription.add(y.history$.subscribe(S=>{var k,P,A;S.length&&((A=(P=(k=this.videoConfig)==null?void 0:k.callbacks)==null?void 0:P.onInteractiveHistoryChanged)==null||A.call(P,S))}))}this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var y,S,k,P;(y=this.microStoresRoot)==null||y.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(P=(S=this.videoConfig)==null?void 0:(k=S.callbacks).onInteractiveTimeIndicatorClick)==null||P.call(k)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(y=>{this.log({message:y.toString()})}))}catch(a){this.log({message:a.message})}}initPlayer(e,i={}){var o,n,a,s,d,l,p,f,_,u,$,w,y,S,k,P,A,E,T,V,U,G,F,Y,X,oe;if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData)throw new Error("empty videos");if(this.videoConfig=xu(ax,(0,Ki.cloneDeepWith)(e,pe=>pe instanceof HTMLElement?pe:void 0)),this.uiConfig=Qg((o=i.ui)!=null?o:{}),this.coreConfig=(n=i.core)!=null?n:{configName:[]},this.statisticsConfig=(a=i.statistics)!=null?a:{},this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer.style.minHeight="unset",this.style.display="block",this.style.width="100%",this.style.height="100%"),this.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},this.uiConfig.features.exposeInternalsToGlobal&&((d=this.internalsExposure)!=null||(this.internalsExposure=new Ki.InternalsExposure("UI"))),gl.devNull.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((l=this.videoConfig)==null?void 0:l.showAds)],numbers:[(0,Z1.now)()]}),(0,Ki.isNonNullable)(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(f=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?f:!0),(0,Ki.isNonNullable)(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(u=(_=this.uiConfig.features.pip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?u:!0,this.uiConfig.features.dpip=(w=($=this.uiConfig.features.dpip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.videoConfig.isTouch=(S=(y=this.uiConfig.isMobile)!=null?y:this.videoConfig.isTouch)!=null?S:this.videoConfig.isMobile,(k=this.videoConfig).autoplay&&(k.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(P=this.uiConfig.ads.enable)!=null?P:this.videoConfig.showAds,this.videoConfig.adsSlotId=(A=this.uiConfig.ads.slot)!=null?A:this.videoConfig.adsSlotId,this.videoConfig.adsPreviewParam=(E=this.uiConfig.ads.preview)!=null?E:this.videoConfig.adsPreviewParam,this.videoConfig.logoHidden=!((T=this.uiConfig.showLogo)!=null?T:!this.videoConfig.logoHidden),(V=this.videoConfig).canRewindLive&&(V.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(U=this.videoConfig.supportLink)!=null?U:this.uiConfig.supportLink,this.videoConfig.showEndScreen=(G=this.uiConfig.features.endScreen)!=null?G:this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=(F=this.uiConfig.features.autoplayNext)!=null?F:this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=(Y=this.uiConfig.features.nextPrevButtons)!=null?Y:this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((X=this.videoConfig.videos)!=null&&X[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let pe={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=yu.getLatestSupportedVersion(pe):this.pictureInPictureApi=new ta(pe)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new bu:void 0,this.slotsApi=this.uiConfig.features.slots?new mu:void 0,this.annotationsApi=this.uiConfig.features.annotations?new wu(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),(oe=this.slotsApi)==null||oe.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]),q1(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(xn)&&(r(xn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(xn).nextButtonActive=this.isNextButtonActive(),r(xn).prevButtonActive=this.isPrevButtonActive(),r(xn).endScreenVideoTitle=o.nextVideoTitle,r(xn).endScreenVideoThumb=o.nextVideoThumb,r(xn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}={...this.videoConfig.videos[this.currentPlayingVideoIndex]},o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",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(){var e,i,o,n;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(n=this.svelteRootComponent)==null||n.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,r(xn)&&(r(xn).needToRepeatPlaylist=this.needToRepeatPlaylist,r(xn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(xn).nextButtonActive=this.isNextButtonActive(),r(xn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,n;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(n=this.svelteRootComponent)==null||n.setAutoQualityLimits(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}async setLanguage(e){var i;await((i=this.store)==null?void 0:i.actions.internal.setLanguage(e))}setLiveStart(e){var i,o;this.log({message:"live started"}),(i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0})}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}setLiveWaitingRecover(){var e;this.log({message:"live waiting recover"}),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var i,o;(i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!0),(o=this.store)==null||o.destroy()})}setLiveWaitingRecord(){var e;this.log({message:"post live"}),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var i,o;(i=this.store)==null||i.actions.internal.setLiveWaitingRecord(!0),(o=this.store)==null||o.destroy()})}setLiveEnd(e){var i;this.log({message:"live ended"}),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var o,n;(o=this.store)==null||o.actions.internal.setLiveWaitingRecover(!1),(n=this.store)==null||n.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})})}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i;return(i=(e=this.statistics)==null?void 0:e.oneStat.getDeviceId())!=null?i:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}async replayInteractiveChapter(e){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let n=ye(this.store.state.positionExact$),s=ye(this.store.state.interactiveEpisodes$).find(l=>!l.completed);this.interactiveController.events.playerChanged$.pipe((0,Ki.once)()).subscribe(()=>{s&&n>=s.time?this.seekTime(s.time):this.seekTime(n),e==null||e()});let d=this.interactiveController.getCurrentChapter();await this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&this.statistics.oneStat.updateContext(e)}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}unmountComponent(e){e&&Ks(e)}};var hl=require("@vkontakte/videoplayer-shared/es2018"),Eu=require("@vkontakte/videoplayer-core/es2018"),lx=()=>{window.customElements.define("vk-video-player",Iu)};
|