@vkontakte/videoplayer 1.1.60 → 1.1.61-dev.6fff06ee.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 +5 -5
- package/es2015.esm.js +5 -5
- package/es2018.cjs.js +5 -5
- package/es2018.esm.js +5 -5
- package/es2024.cjs.js +5 -5
- package/es2024.esm.js +5 -5
- package/esnext.cjs.js +5 -5
- package/esnext.esm.js +5 -5
- package/evergreen.esm.js +5 -5
- package/package.json +5 -5
package/esnext.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.1.
|
|
3
|
-
*
|
|
4
|
-
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-
|
|
2
|
+
* @vkontakte/videoplayer v1.1.61-dev.6fff06ee.0
|
|
3
|
+
* Tue, 15 Apr 2025 06:48:26 GMT
|
|
4
|
+
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-61/doc/
|
|
5
5
|
*/
|
|
6
6
|
"use strict";var T1=Object.create;var zd=Object.defineProperty;var I1=Object.getOwnPropertyDescriptor;var E1=Object.getOwnPropertyNames;var A1=Object.getPrototypeOf,P1=Object.prototype.hasOwnProperty;var M1=(t,e)=>{for(var i in e)zd(t,i,{get:e[i],enumerable:!0})},Hm=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of E1(e))!P1.call(t,n)&&n!==i&&zd(t,n,{get:()=>e[n],enumerable:!(o=I1(e,n))||o.enumerable});return t};var Fm=(t,e,i)=>(i=t!=null?T1(A1(t)):{},Hm(e||!t||!t.__esModule?zd(i,"default",{value:t,enumerable:!0}):i,t)),L1=t=>Hm(zd({},"__esModule",{value:!0}),t);var T3={};M1(T3,{ControlButtonType:()=>nd,GridTypes:()=>hr,InterfaceLanguage:()=>Js.InterfaceLanguage,MenuItemType:()=>Os,PlayerPhase:()=>da,VERSION:()=>Da,VKNumericLanguage:()=>Js.VKNumericLanguage,VideoFormat:()=>uu.VideoFormat,VideoQuality:()=>uu.VideoQuality,loadVKLangPack:()=>Js.loadVKLangPack,registerPlayerWebComponent:()=>k3});module.exports=L1(T3);var oa="[",xa="[!",wa="]",Hr={};var bi=Symbol(),ai=Symbol("filename"),Um=Symbol("hmr"),zm="http://www.w3.org/1999/xhtml",_u="http://www.w3.org/2000/svg";var qd=!0;var bu=globalThis.process?.env?.NODE_ENV;bu||console.warn("If bundling, conditions should include development or production. If not bundling, conditions or NODE_ENV should include development or production. See https://www.npmjs.com/package/esm-env for tips on setting conditions in popular bundlers and runtimes.");var $e=bu&&!bu.toLowerCase().includes("prod");var yo=Symbol("$state"),Fr=Symbol("$state metadata"),al=Symbol("legacy props"),qm=Symbol("");var cr=Array.isArray,Km=Array.prototype.indexOf,sl=Array.from,$u=Object.keys,Oi=Object.defineProperty,In=Object.getOwnPropertyDescriptor,Kd=Object.getOwnPropertyDescriptors,yu=Object.prototype,Wm=Array.prototype,Ur=Object.getPrototypeOf;function na(t){return typeof t=="function"}var J=()=>{};function Qm(t){return t()}function ra(t){for(var e=0;e<t.length;e++)t[e]()}var ll=[],xu=[];function Gm(){var t=ll;ll=[],ra(t)}function V1(){var t=xu;xu=[],ra(t)}function Mo(t){ll.length===0&&queueMicrotask(Gm),ll.push(t)}function wu(){ll.length>0&&Gm(),xu.length>0&&V1()}function Wd(t){return t===this.v}function us(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function jm(t,e){return t!==e}function ps(t){return!us(t,this.v)}function Ym(){if($e){let t=new Error(`derived_references_self
|
|
7
7
|
A derived value cannot reference itself recursively
|
|
@@ -45,7 +45,7 @@ ${l}in ${u}`).join("")}
|
|
|
45
45
|
`)){let o=K1.exec(i)??W1.exec(i);o&&e.push({file:o[1],line:+o[2],column:+o[3]})}return e}function Bv(){let t=Q1()?.slice(4);if(!t)return null;for(let e=0;e<t.length;e++){let i=t[e],o=q1[i.file];if(!o){if(e===0)return null;continue}for(let n of o){if(n.end==null)return null;if(n.start.line<i.line&&n.end.line>i.line)return n.component}}return null}var sc=Symbol("ADD_OWNER");function Uu(t,e,i=!1,o=!1){if(t&&!i){let n=Do,a=t[Fr];if(a&&!zu(a,n)){let s=qu(a);e&&e[ai]!==n[ai]&&!o&&_v(n[ai],e[ai],s[ai])}}lc(t,e,new Set)}function Mu(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 lc(t,e,i){let o=t?.[Fr];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),sc in t&&t[sc])oo(()=>{t[sc](e)});else{var n=Ur(t);if(n===Object.prototype)for(let a in t)if(Object.getOwnPropertyDescriptor(t,a)?.get){let s=bi;oo(()=>{let d=t[a];s!==d&&(s=d,lc(d,e,i))})}else lc(t[a],e,i);else if(n===Array.prototype)for(let a=0;a<t.length;a+=1)lc(t[a],e,i)}}}function zu(t,e){return t.owners===null?!0:t.owners.has(e)||ai in e&&[...t.owners].some(i=>i[ai]===e[ai])||t.parent!==null&&zu(t.parent,e)}function qu(t){return t?.owners?.values().next().value??qu(t.parent)}var G1=!1;function $v(t){if(G1)return;let e=Bv();if(e&&!zu(t,e)){let i=qu(t);i[ai]!==e[ai]?Pu(e[ai],i[ai]):Pu()}}function xs(t){if($e){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 Ct=null;function _l(t){Ct=t}var Do=null;function bl(t){Do=t}function ws(t){return Ku("getContext").get(t)}function Ss(t,e){let i=Ku("setContext");return $e&&mt(()=>Uu(e,null,!0)),i.set(t,e),e}function yl(){return Ku("getAllContexts")}function F(t,e=!1,i){var o=Ct={p:Ct,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};Mr&&!e&&(Ct.l={s:null,u:null,r1:[],r2:Ci(!1)}),Oo(()=>{o.d=!0}),$e&&(Ct.function=i,Do=i)}function U(t){let e=Ct;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=ht,o=Et;e.e=null;try{for(var n=0;n<s.length;n++){var a=s[n];Hi(a.effect),to(a.reaction),rn(a.fn)}}finally{Hi(i),to(o)}}Ct=e.p,$e&&(Do=e.p?.function??null),e.m=!0}return t||{}}function Vr(){return!Mr||Ct!==null&&Ct.l===null}function Ku(t){return Ct===null&&xs(t),Ct.c??=new Map(Y1(Ct)||void 0)}function Y1(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var Z1=/\r/g;function Nv(t){t=t.replace(Z1,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Dv(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var X1=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ov(t){return X1.includes(t)}var J1=["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 Hv(t){return t=t.toLowerCase(),e0[t]??t}var T5=[...J1,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var t0=["touchstart","touchmove"];function Fv(t){return t0.includes(t)}var i0=["textarea","script","style","title"];function Uv(t){return i0.includes(t)}function Wu(t){return t?.replace(/\//g,"/\u200B")}var zv=new Map;function qv(t,e){var i=zv.get(t);i||(i=new Set,zv.set(t,i)),i.add(e)}function Qu(t,e){if(e){let i=document.body;t.autofocus=!0,Mo(()=>{document.activeElement===i&&t.focus()})}}function xl(t){var e=Et,i=ht;to(null),Hi(null);try{return t()}finally{to(e),Hi(i)}}var Gu=new Set,dc=new Set;function La(t){if(!Qe)return;t.onload&&t.removeAttribute("onload"),t.onerror&&t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function ju(t,e,i,o={}){function n(a){if(o.capture||Cs.call(e,a),!a.cancelBubble)return xl(()=>i?.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Mo(()=>{e.addEventListener(t,n,o)}):e.addEventListener(t,n,o),n}function kt(t,e,i,o,n){var a={capture:o,passive:n},s=ju(t,e,i,a);(e===document.body||e===window||e===document)&&Oo(()=>{e.removeEventListener(t,s,a)})}function ot(t){for(var e=0;e<t.length;e++)Gu.add(t[e]);for(var i of dc)i(t)}function Cs(t){var e=this,i=e.ownerDocument,o=t.type,n=t.composedPath?.()||[],a=n[0]||t.target,s=0,d=t.__root;if(d){var l=n.indexOf(d);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var c=n.indexOf(e);if(c===-1)return;l<=c&&(s=l)}if(a=n[s]||t.target,a!==e){Oi(t,"currentTarget",{configurable:!0,get(){return a||i}});var u=Et,_=ht;to(null),Hi(null);try{for(var p,y=[];a!==null;){var x=a.assignedSlot||a.parentNode||a.host||null;try{var w=a["__"+o];if(w!=null&&(!a.disabled||t.target===a))if(cr(w)){var[S,...I]=w;S.apply(a,[t,...I])}else w.call(a,t)}catch(L){p?y.push(L):p=L}if(t.cancelBubble||x===e||x===null)break;a=x}if(p){for(let L of y)queueMicrotask(()=>{throw L});throw p}}finally{t.__root=e,delete t.currentTarget,to(u),Hi(_)}}}var n0;function Kv(){n0=void 0}function ks(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function no(t,e){var i=ht;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function M(t,e){var i=(e&1)!==0,o=(e&2)!==0,n,a=!t.startsWith("<!>");return()=>{if(Qe)return no(dt,null),dt;n===void 0&&(n=ks(a?t:"<!>"+t),i||(n=li(n)));var s=o||pl?document.importNode(n,!0):n.cloneNode(!0);if(i){var d=li(s),l=s.lastChild;no(d,l)}else no(s,s);return s}}function me(t,e,i="svg"){var o=!t.startsWith("<!>"),n=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,s;return()=>{if(Qe)return no(dt,null),dt;if(!s){var d=ks(a),l=li(d);if(n)for(s=document.createDocumentFragment();li(l);)s.appendChild(li(l));else s=li(l)}var c=s.cloneNode(!0);if(n){var u=li(c),_=c.lastChild;no(u,_)}else no(c,c);return c}}function Gn(t=""){if(!Qe){var e=Bo(t+"");return no(e,e),e}var i=dt;return i.nodeType!==3&&(i.before(i=Bo()),si(i)),no(i,i),i}function qe(){if(Qe)return no(dt,null),dt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Bo();return t.append(e,i),no(e,i),t}function b(t,e){if(Qe){ht.nodes_end=dt,yi();return}t!==null&&t.before(e)}var wl=!0;function cc(t){wl=t}function le(t,e){var i=e==null?"":typeof e=="object"?e+"":e;i!==(t.__t??=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function Gr(t,e){return Qv(t,e)}function Zu(t,e){Zd(),e.intro=e.intro??!1;let i=e.target,o=Qe,n=dt;try{for(var a=li(i);a&&(a.nodeType!==8||a.data!==oa);)a=uo(a);if(!a)throw Hr;Ui(!0),si(a),yi();let s=Qv(t,{...e,anchor:a});if(dt===null||dt.nodeType!==8||dt.data!==wa)throw Ea(),Hr;return Ui(!1),s}catch(s){if(s===Hr)return e.recover===!1&&tv(),Zd(),fl(i),Ui(!1),Gr(t,e);throw s}finally{Ui(o),si(n),Kv()}}var Ts=new Map;function Qv(t,{target:e,anchor:i,props:o={},events:n,context:a,intro:s=!0}){Zd();var d=new Set,l=_=>{for(var p=0;p<_.length;p++){var y=_[p];if(!d.has(y)){d.add(y);var x=Fv(y);e.addEventListener(y,Cs,{passive:x});var w=Ts.get(y);w===void 0?(document.addEventListener(y,Cs,{passive:x}),Ts.set(y,1)):Ts.set(y,w+1)}}};l(sl(Gu)),dc.add(l);var c=void 0,u=Vv(()=>{var _=i??e.appendChild(Bo());return ki(()=>{if(a){F({});var p=Ct;p.c=a}n&&(o.$$events=n),Qe&&no(_,null),wl=s,c=t(_,o)||{},wl=!0,Qe&&(ht.nodes_end=dt),a&&U()}),()=>{for(var p of d){e.removeEventListener(p,Cs);var y=Ts.get(p);--y===0?(document.removeEventListener(p,Cs),Ts.delete(p)):Ts.set(p,y)}dc.delete(l),_!==i&&_.parentNode?.removeChild(_)}});return Yu.set(c,u),c}var Yu=new WeakMap;function Va(t,e){let i=Yu.get(t);return i?(Yu.delete(t),i(e)):($e&&hv(),Promise.resolve())}function V(t,e,[i,o]=[0,0]){Qe&&i===0&&yi();var n=t,a=null,s=null,d=bi,l=i>0?65536:0,c=!1;let u=(p,y=!0)=>{c=!0,_(y,p)},_=(p,y)=>{if(d===(d=p))return;let x=!1;if(Qe&&o!==-1){if(i===0){let S=n.data;S===oa?o=0:S===xa?o=1/0:(o=parseInt(S.substring(1)),o!==o&&(o=d?1/0:-1))}let w=o>i;!!d===w&&(n=hs(),si(n),Ui(!1),x=!0,o=-1)}d?(a?Qr(a):y&&(a=ki(()=>y(n))),s&&an(s,()=>{s=null})):(s?Qr(s):y&&(s=ki(()=>y(n,[i+1,o]))),a&&an(a,()=>{a=null})),x&&Ui(!0)};zi(()=>{c=!1,e(u),c||_(null,null)},l),Qe&&(n=dt)}function Sl(t,e,i){Qe&&yi();var o=t,n=bi,a,s=Vr()?jm:us;zi(()=>{s(n,n=e())&&(a&&an(a),a=ki(()=>i(o)))}),Qe&&(o=dt)}var la=null;function ep(t){la=t}function Cl(t,e){return e}function l0(t,e,i,o){for(var n=[],a=e.length,s=0;s<a;s++)ac(e[s].e,n,!0);var d=a>0&&n.length===0&&i!==null;if(d){var l=i.parentNode;fl(l),l.append(i),o.clear(),sa(t,e[0].prev,e[a-1].next)}Fu(n,()=>{for(var c=0;c<a;c++){var u=e[c];d||(o.delete(u.k),sa(t,u.prev,u.next)),Fi(u.e,!d)}})}function mi(t,e,i,o,n,a=null){var s=t,d={flags:e,items:new Map,first:null},l=(e&4)!==0;if(l){var c=t;s=Qe?si(li(c)):c.appendChild(Bo())}Qe&&yi();var u=null,_=!1,p=fr(()=>{var y=i();return cr(y)?y:y==null?[]:sl(y)});zi(()=>{var y=r(p),x=y.length;if(_&&x===0)return;_=x===0;let w=!1;if(Qe){var S=s.data===xa;S!==(x===0)&&(s=hs(),si(s),Ui(!1),w=!0)}if(Qe){for(var I=null,L,A=0;A<x;A++){if(dt.nodeType===8&&dt.data===wa){s=dt,w=!0,Ui(!1);break}var P=y[A],T=o(P,A);L=Yv(dt,d,I,null,P,T,A,n,e,i),d.items.set(T,L),I=L}x>0&&si(hs())}Qe||d0(y,d,s,n,e,o,i),a!==null&&(x===0?u?Qr(u):u=ki(()=>a(s)):u!==null&&an(u,()=>{u=null})),w&&Ui(!0),r(p)}),Qe&&(s=dt)}function d0(t,e,i,o,n,a,s){var d=(n&8)!==0,l=(n&3)!==0,c=t.length,u=e.items,_=e.first,p=_,y,x=null,w,S=[],I=[],L,A,P,T;if(d)for(T=0;T<c;T+=1)L=t[T],A=a(L,T),P=u.get(A),P!==void 0&&(P.a?.measure(),(w??=new Set).add(P));for(T=0;T<c;T+=1){if(L=t[T],A=a(L,T),P=u.get(A),P===void 0){var N=p?p.e.nodes_start:i;x=Yv(N,e,x,x===null?e.first:x.next,L,A,T,o,n,s),u.set(A,x),S=[],I=[],p=x.next;continue}if(l&&c0(P,L,T,n),(P.e.f&8192)!==0&&(Qr(P.e),d&&(P.a?.unfix(),(w??=new Set).delete(P))),P!==p){if(y!==void 0&&y.has(P)){if(S.length<I.length){var Q=I[0],G;x=Q.prev;var ee=S[0],ie=S[S.length-1];for(G=0;G<S.length;G+=1)Gv(S[G],Q,i);for(G=0;G<I.length;G+=1)y.delete(I[G]);sa(e,ee.prev,ie.next),sa(e,x,ee),sa(e,ie,Q),p=Q,x=ie,T-=1,S=[],I=[]}else y.delete(P),Gv(P,p,i),sa(e,P.prev,P.next),sa(e,P,x===null?e.first:x.next),sa(e,x,P),x=P;continue}for(S=[],I=[];p!==null&&p.k!==A;)(p.e.f&8192)===0&&(y??=new Set).add(p),I.push(p),p=p.next;if(p===null)continue;P=p}S.push(P),x=P,p=P.next}if(p!==null||y!==void 0){for(var oe=y===void 0?[]:sl(y);p!==null;)(p.e.f&8192)===0&&oe.push(p),p=p.next;var te=oe.length;if(te>0){var ge=(n&4)!==0&&c===0?i:null;if(d){for(T=0;T<te;T+=1)oe[T].a?.measure();for(T=0;T<te;T+=1)oe[T].a?.fix()}l0(e,oe,ge,u)}}d&&Mo(()=>{if(w!==void 0)for(P of w)P.a?.apply()}),ht.first=e.first&&e.first.e,ht.last=x&&x.e}function c0(t,e,i,o){(o&1)!==0&&ms(t.v,e),(o&2)!==0?ms(t.i,i):t.i=i}function Yv(t,e,i,o,n,a,s,d,l,c){var u=la,_=(l&1)!==0,p=(l&16)===0,y=_?p?Kr(n):Ci(n):n,x=(l&2)===0?s:Ci(s);$e&&_&&(y.debug=()=>{var S=typeof x=="number"?s:x.v;c()[S]});var w={i:x,v:y,k:a,a:null,e:null,prev:i,next:o};la=w;try{return w.e=ki(()=>d(t,y,x,c),Qe),w.e.prev=i&&i.e,w.e.next=o&&o.e,i===null?e.first=w:(i.next=w,i.e.next=w.e),o!==null&&(o.prev=w,o.e.prev=w.e),w}finally{la=u}}function Gv(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=uo(a);n.before(a),a=s}}function sa(t,e,i){e===null?t.first=i:(e.next=i,e.e.next=i&&i.e),i!==null&&(i.prev=e,i.e.prev=e&&e.e)}function u0(t,e,i){if(!e||e===Nv(String(i??"")))return;let o,n=t.__svelte_meta?.loc;n?o=`near ${n.file}:${n.line}:${n.column}`:Do?.[ai]&&(o=`in ${Do[ai]}`),gv(Wu(o))}function kl(t,e,i,o,n){var a=t,s="",d;zi(()=>{if(s===(s=e()??"")){Qe&&yi();return}d!==void 0&&(Fi(d),d=void 0),s!==""&&(d=ki(()=>{if(Qe){for(var l=dt.data,c=yi(),u=c;c!==null&&(c.nodeType!==8||c.data!=="");)u=c,c=uo(c);if(c===null)throw Ea(),Hr;$e&&!n&&u0(c.parentNode,l,s),no(dt,u),a=si(c);return}var _=s+"";i?_=`<svg>${_}</svg>`:o&&(_=`<math>${_}</math>`);var p=ks(_);if((i||o)&&(p=li(p)),no(li(p),p.lastChild),i||o)for(;li(p);)a.before(li(p));else a.before(p)}))})}function de(t,e,...i){var o=t,n=J,a;zi(()=>{n!==(n=e())&&(a&&(Fi(a),a=null),$e&&n==null&&iv(),a=ki(()=>n(o,...i)))},65536),Qe&&(o=dt)}function xi(t,e,i){Qe&&yi();var o=t,n,a;zi(()=>{n!==(n=e())&&(a&&(an(a),a=null),n&&(a=ki(()=>i(o,n))))},65536),Qe&&(o=dt)}function Tl(t,e,i,o,n,a){let s=Qe;Qe&&yi();var d=$e&&a&&Ct?.function[ai],l,c,u=null;Qe&&dt.nodeType===1&&(u=dt,yi());var _=Qe?dt:t,p,y=la;zi(()=>{let x=e()||null;var w=n?n():i||x==="svg"?_u:null;if(x!==l){var S=la;ep(y),p&&(x===null?an(p,()=>{p=null,c=null}):x===c?Qr(p):(Fi(p),cc(!1))),x&&x!==c&&(p=ki(()=>{if(u=Qe?u:w?document.createElementNS(w,x):document.createElement(x),$e&&a&&(u.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),no(u,u),o){Qe&&Uv(x)&&u.append(document.createComment(""));var I=Qe?li(u):u.appendChild(Bo());Qe&&(I===null?Ui(!1):si(I)),o(u,I)}ht.nodes_end=u,_.before(u)})),l=x,l&&(c=l),cc(!0),ep(S)}},65536),s&&(Ui(!0),si(_))}var ip;function Zv(t){return ip=t.target,new tp(t)}var tp=class{#t;#e;constructor(e){var i=new Map,o=(a,s)=>{var d=Kr(s);return i.set(a,d),d};let n=new Proxy({...e.props||{},$$events:{}},{get(a,s){return r(i.get(s)??o(s,Reflect.get(a,s)))},has(a,s){return s===al?!0:(r(i.get(s)??o(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,d){return D(i.get(s)??o(s,d),d),Reflect.set(a,s,d)}});this.#e=(e.hydrate?Zu:Gr)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&$s(),this.#t=n.$$events;for(let a of Object.keys(this.#e))a==="$set"||a==="$destroy"||a==="$on"||Oi(this,a,{get(){return this.#e[a]},set(s){this.#e[a]=s},enumerable:!0});this.#e.$set=a=>{Object.assign(n,a)},this.#e.$destroy=()=>{Va(this.#e)}}$set(e){this.#e.$set(e)}$on(e,i){this.#t[e]=this.#t[e]||[];let o=(...n)=>i.call(this,...n);return this.#t[e].push(o),()=>{this.#t[e]=this.#t[e].filter(n=>n!==o)}}$destroy(){this.#e.$destroy()}};function K(t,e){Mo(()=>{var i=t.getRootNode(),o=i.host?i:i.head??i.ownerDocument.head??ip?.parentNode;if(!o?.querySelector("#"+e.hash)){let n=document.createElement("style");n.id=e.hash,n.textContent=e.code,o.appendChild(n),$e&&qv(e.hash,n)}})}function Xv(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=Xv(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function Jv(){for(var t,e,i=0,o="",n=arguments.length;i<n;i++)(t=arguments[i])&&(e=Xv(t))&&(o&&(o+=" "),o+=e);return o}function Il(t){return typeof t=="object"?Jv(t):t??""}var eg=[...`
|
|
48
|
-
\r\f\xA0\v\uFEFF`];function ig(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||eg.includes(o[s-1]))&&(d===o.length||eg.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 op(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function og(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(op)),n&&l.push(...Object.keys(n).map(op));var c=0,u=-1;let w=t.length;for(var _=0;_<w;_++){var p=t[_];if(d?p==="/"&&t[_-1]==="*"&&(d=!1):a?a===p&&(a=!1):p==="/"&&t[_+1]==="*"?d=!0:p==='"'||p==="'"?a=p:p==="("?s++:p===")"&&s--,!d&&a===!1&&s===0){if(p===":"&&u===-1)u=_;else if(p===";"||_===w-1){if(u!==-1){var y=op(t.substring(c,u).trim());if(!l.includes(y)){p!==";"&&_++;var x=t.substring(c,_).trim();i+=" "+x+";"}}c=_+1,u=-1}}}}return o&&(i+=tg(o)),n&&(i+=tg(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function Z(t,e,i,o,n,a){var s=t.__className;if(Qe||s!==i){var d=ig(i,o,a);(!Qe||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&n!==a)for(var l in a){var c=!!a[l];(n==null||c!==!!n[l])&&t.classList.toggle(l,c)}return a}function np(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 it(t,e,i,o){var n=t.__style;if(Qe||n!==e){var a=og(e,o);(!Qe||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(np(t,i?.[0],o[0]),np(t,i?.[1],o[1],"important")):np(t,i,o));return o}var Is=Symbol("class"),Es=Symbol("style"),ag=Symbol("is custom element"),sg=Symbol("is html");function lg(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Me(t,e,i,o){var n=dg(t);if(Qe&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||_0(t,e,i??"");return}n[e]!==(n[e]=i)&&(e==="loading"&&(t[qm]=i),i==null?t.removeAttribute(e):typeof i!="string"&&cg(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function he(t,e,i,o,n=!1){var a=dg(t),s=a[ag],d=!a[sg];let l=Qe&&s;l&&Ui(!1);var c=e||{},u=t.tagName==="OPTION";for(var _ in e)_ in i||(i[_]=null);i.class?i.class=Il(i.class):(o||i[Is])&&(i.class=null),i[Es]&&(i.style??=null);var p=cg(t);for(let P in i){let T=i[P];if(u&&P==="value"&&T==null){t.value=t.__value="",c[P]=T;continue}if(P==="class"){var y=t.namespaceURI==="http://www.w3.org/1999/xhtml";Z(t,y,T,o,e?.[Is],i[Is]),c[P]=T,c[Is]=i[Is];continue}if(P==="style"){it(t,T,e?.[Es],i[Es]),c[P]=T,c[Es]=i[Es];continue}var x=c[P];if(T!==x){c[P]=T;var w=P[0]+P[1];if(w!=="$$")if(w==="on"){let N={},Q="$$"+P,G=P.slice(2);var S=Ov(G);if(Dv(G)&&(G=G.slice(0,-7),N.capture=!0),!S&&x){if(T!=null)continue;t.removeEventListener(G,c[Q],N),c[Q]=null}if(T!=null)if(S)t[`__${G}`]=T,ot([G]);else{let ee=function(ie){c[P].call(this,ie)};var A=ee;c[Q]=ju(G,t,ee,N)}else S&&(t[`__${G}`]=void 0)}else if(P==="style")Me(t,P,T);else if(P==="autofocus")Qu(t,!!T);else if(!s&&(P==="__value"||P==="value"&&T!=null))t.value=t.__value=T;else if(P==="selected"&&u)lg(t,T);else{var I=P;d||(I=Hv(I));var L=I==="defaultValue"||I==="defaultChecked";if(T==null&&!s&&!L)if(a[P]=null,I==="value"||I==="checked"){let N=t,Q=e===void 0;if(I==="value"){let G=N.defaultValue;N.removeAttribute(I),N.defaultValue=G,N.value=N.__value=Q?G:null}else{let G=N.defaultChecked;N.removeAttribute(I),N.defaultChecked=G,N.checked=Q?G:!1}}else t.removeAttribute(P);else L||p.includes(I)&&(s||typeof T!="string")?t[I]=T:typeof T!="function"&&Me(t,I,T,n)}}}return l&&Ui(!0),c}function dg(t){return t.__attributes??={[ag]:t.nodeName.includes("-"),[sg]:t.namespaceURI===zm}}var ng=new Map;function cg(t){var e=ng.get(t.nodeName);if(e)return e;ng.set(t.nodeName,e=[]);for(var i,o=t,n=Element.prototype;n!==o;){i=Kd(o);for(var a in i)i[a].set&&e.push(a);o=Ur(o)}return e}function _0(t,e,i){$e&&(e==="srcset"&&b0(t,i)||rp(t.getAttribute(e)??"",i)||vv(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function rp(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function rg(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function b0(t,e){var i=rg(t.srcset),o=rg(e);return o.length===i.length&&o.every(([n,a],s)=>a===i[s][1]&&(rp(i[s][0],n)||rp(n,i[s][0])))}var $0=qd?()=>performance.now():()=>Date.now(),vr={tick:t=>(qd?requestAnimationFrame:J)(t),now:()=>$0(),tasks:new Set};function ug(){let t=vr.now();vr.tasks.forEach(e=>{e.c(t)||(vr.tasks.delete(e),e.f())}),vr.tasks.size!==0&&vr.tick(ug)}function pg(t){let e;return vr.tasks.size===0&&vr.tick(ug),{promise:new Promise(i=>{vr.tasks.add(e={c:t,f:i})}),abort(){vr.tasks.delete(e)}}}function uc(t,e){xl(()=>{t.dispatchEvent(new CustomEvent(e))})}function S0(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 fg(t){let e={},i=t.split(";");for(let o of i){let[n,a]=o.split(":");if(!n||a===void 0)break;let s=S0(n.trim());e[s]=a.trim()}return e}var C0=t=>t;function sp(t,e,i,o){var n=(t&1)!==0,a=(t&2)!==0,s=n&&a,d=(t&4)!==0,l=s?"both":n?"in":"out",c,u=e.inert,_=e.style.overflow,p,y;function x(){var A=Et,P=ht;to(null),Hi(null);try{return c??=i()(e,o?.()??{},{direction:l})}finally{to(A),Hi(P)}}var w={is_global:d,in(){if(e.inert=u,!n){y?.abort(),y?.reset?.();return}a||p?.abort(),uc(e,"introstart"),p=ap(e,x(),y,1,()=>{uc(e,"introend"),p?.abort(),p=c=void 0,e.style.overflow=_})},out(A){if(!a){A?.(),c=void 0;return}e.inert=!0,uc(e,"outrostart"),y=ap(e,x(),p,0,()=>{uc(e,"outroend"),A?.()})},stop:()=>{p?.abort(),y?.abort()}},S=ht;if((S.transitions??=[]).push(w),n&&wl){var I=d;if(!I){for(var L=S.parent;L&&(L.f&65536)!==0;)for(;(L=L.parent)&&(L.f&16)===0;);I=!L||(L.f&32768)!==0}I&&rn(()=>{mt(()=>w.in())})}}function ap(t,e,i,o,n){var a=o===1;if(na(e)){var s,d=!1;return Mo(()=>{if(!d){var S=e({direction:a?"in":"out"});s=ap(t,S,i,o,n)}}),{abort:()=>{d=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(i?.deactivate(),!e?.duration)return n(),{abort:J,deactivate:J,reset:J,t:()=>o};let{delay:l=0,css:c,tick:u,easing:_=C0}=e;var p=[];if(a&&i===void 0&&(u&&u(0,1),c)){var y=fg(c(0,1));p.push(y,y)}var x=()=>1-o,w=t.animate(p,{duration:l});return w.onfinish=()=>{var S=i?.t()??1-o;i?.abort();var I=o-S,L=e.duration*Math.abs(I),A=[];if(L>0){var P=!1;if(c)for(var T=Math.ceil(L/16.666666666666668),N=0;N<=T;N+=1){var Q=S+I*_(N/T),G=fg(c(Q,1-Q));A.push(G),P||=G.overflow==="hidden"}P&&(t.style.overflow="hidden"),x=()=>{var ee=w.currentTime;return S+I*_(ee/L)},u&&pg(()=>{if(w.playState!=="running")return!1;var ee=x();return u(ee,1-ee),!0})}w=t.animate(A,{duration:L,fill:"forwards"}),w.onfinish=()=>{x=()=>o,u?.(o,1-o),n()}},{abort:()=>{w&&(w.cancel(),w.effect=null,w.onfinish=J)},deactivate:()=>{n=J},reset:()=>{o===0&&u?.(1,0)},t:()=>x()}}var lp=class t{#t=new WeakMap;#e;#i;static entries=new WeakMap;constructor(e){this.#i=e}observe(e,i){var o=this.#t.get(e)||new Set;return o.add(i),this.#t.set(e,o),this.#o().observe(e,this.#i),()=>{var n=this.#t.get(e);n.delete(i),n.size===0&&(this.#t.delete(e),this.#e.unobserve(e))}}#o(){return this.#e??(this.#e=new ResizeObserver(e=>{for(var i of e){t.entries.set(i.target,i);for(var o of this.#t.get(i.target)||[])o(i)}}))}};var I0=new lp({box:"border-box"});function Rr(t,e,i){var o=I0.observe(t,()=>i(t[e]));rn(()=>(mt(()=>i(t[e])),o))}function mg(t,e){return t===e||t?.[yo]===e}function st(t={},e,i,o){return rn(()=>{var n,a;return oo(()=>{n=a,a=o?.()||[],mt(()=>{t!==i(...a)&&(e(t,...a),n&&mg(i(...n),t)&&e(null,...n))})}),()=>{Mo(()=>{a&&mg(i(...a),t)&&e(null,...a)})}}),t}function gr(t=!1){let e=Ct,i=e.l.u;if(!i)return;let o=()=>oc(e.s);if(t){let n=0,a={},s=m(()=>{let d=!1,l=e.s;for(let c in l)l[c]!==a[c]&&(a[c]=l[c],d=!0);return d&&n++,n});o=()=>r(s)}i.b.length&&ys(()=>{vg(e,o),ra(i.b)}),Ge(()=>{let n=mt(()=>i.m.map(Qm));return()=>{for(let a of n)typeof a=="function"&&a()}}),i.a.length&&Ge(()=>{vg(e,o),ra(i.a)})}function vg(t,e){if(t.l.s)for(let i of t.l.s)r(i);e()}if($e){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;rv(e)},set:o=>{i=o}})}};A0=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var A0;function At(t){Ct===null&&xs("onMount"),Mr&&Ct.l!==null?E0(Ct).m.push(t):Ge(()=>{let e=mt(t);if(typeof e=="function")return e})}function sn(t){Ct===null&&xs("onDestroy"),At(()=>()=>mt(t))}function E0(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function El(t,e,i){if(t==null)return e(void 0),i&&i(void 0),J;let o=mt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var As=[];function jn(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=J){let i=null,o=new Set;function n(d){if(us(t,d)&&(t=d,i)){let l=!As.length;for(let c of o)c[1](),As.push(c,t);if(l){for(let c=0;c<As.length;c+=2)As[c][0](As[c+1]);As.length=0}}}function a(d){n(d(t))}function s(d,l=J){let c=[d,l];return o.add(c),o.size===1&&(i=e(n,a)||J),d(t),()=>{o.delete(c),o.size===0&&i&&(i(),i=null)}}return{set:n,update:a,subscribe:s}}function di(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 jn(i,(s,d)=>{let l=!1,c=[],u=0,_=J,p=()=>{if(u)return;_();let x=e(o?c[0]:c,s,d);a?s(x):_=typeof x=="function"?x:J},y=n.map((x,w)=>El(x,S=>{c[w]=S,u&=~(1<<w),l&&p()},()=>{u|=1<<w}));return l=!0,p(),function(){ra(y),_(),l=!1}})}function ve(t){let e;return El(t,i=>e=i)(),e}var fc=!1,dp=Symbol();function $(t,e,i){let o=i[e]??={store:null,source:Kr(void 0),unsubscribe:J};if(o.store!==t&&!(dp in i))if(o.unsubscribe(),o.store=t??null,t==null)o.source.v=void 0,o.unsubscribe=J;else{var n=!0;o.unsubscribe=El(t,a=>{n?o.source.v=a:D(o.source,a)}),n=!1}return t&&dp in i?ve(t):r(o.source)}function Oe(){let t={};function e(){Oo(()=>{for(var i in t)t[i].unsubscribe();Oi(t,dp,{enumerable:!1,value:!0})})}return[t,e]}function cp(t){var e=fc;try{return fc=!1,[t(),fc]}finally{fc=e}}var N0={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return $e&&nv(`${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 xe(t,e,i){return new Proxy($e?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},N0)}var D0={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(na(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];na(n)&&(n=n());let a=In(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(na(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let n=In(o,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===yo||e===al)return!1;for(let i of t.props)if(na(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props){na(i)&&(i=i());for(let o in i)e.includes(o)||e.push(o)}return e}};function jr(...t){return new Proxy({props:t},D0)}function gg(t){return t.ctx?.d??!1}function v(t,e,i,o){var n=(i&1)!==0,a=!Mr||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,l=!1,c;s?[c,l]=cp(()=>t[e]):c=t[e];var u=yo in t||al in t,_=s&&(In(t,e)?.set??(u&&e in t&&(Q=>t[e]=Q)))||void 0,p=o,y=!0,x=!1,w=()=>(x=!0,y&&(y=!1,d?p=mt(o):p=o),p);c===void 0&&o!==void 0&&(_&&a&&ov(e),c=w(),_&&_(c));var S;if(a)S=()=>{var Q=t[e];return Q===void 0?w():(y=!0,x=!1,Q)};else{var I=(n?m:fr)(()=>t[e]);I.f|=131072,S=()=>{var Q=r(I);return Q!==void 0&&(p=void 0),Q===void 0?p:Q}}if((i&4)===0)return S;if(_){var L=t.$$legacy;return function(Q,G){return arguments.length>0?((!a||!G||L||l)&&_(G?S():Q),Q):S()}}var A=!1,P=!1,T=Kr(c),N=m(()=>{var Q=S(),G=r(T);return A?(A=!1,P=!0,G):(P=!1,T.v=Q)});return s&&r(N),n||(N.equals=ps),function(Q,G){if(cl!==null&&(A=P,S(),r(T)),arguments.length>0){let ee=G?r(N):a&&s?pe(Q):Q;if(!N.equals(ee)){if(A=!0,D(T,ee),x&&p!==void 0&&(p=ee),gg(N))return Q;mt(()=>r(N))}return Q}return gg(N)?N.v:r(N)}}var O0;typeof HTMLElement=="function"&&(O0=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,i){super(),this.$$ctor=t,this.$$s=e,i&&this.attachShadow({mode:"open"})}addEventListener(t,e,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){let o=this.$$c.$on(t,e);this.$$l_u.set(e,o)}super.addEventListener(t,e,i)}removeEventListener(t,e,i){if(super.removeEventListener(t,e,i),this.$$c){let o=this.$$l_u.get(e);o&&(o(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return a=>{let s=document.createElement("slot");n!=="default"&&(s.name=n),b(a,s)}};var t=e;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let i={},o=H0(this);for(let n of this.$$s)n in o&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),i.default=!0):i[n]=e(n));for(let n of this.attributes){let a=this.$$g_p(n.name);a in this.$$d||(this.$$d[a]=up(a,n.value,this.$$p_d,"toProp"))}for(let n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Zv({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:i,$$host:this}}),this.$$me=rc(()=>{oo(()=>{this.$$r=!0;for(let n of $u(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];let a=up(n,this.$$d[n],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,a)}this.$$r=!1})});for(let n in this.$$l)for(let a of this.$$l[n]){let s=this.$$c.$on(n,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(t,e,i){this.$$r||(t=this.$$g_p(t),this.$$d[t]=up(t,i,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return $u(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function up(t,e,i,o){let n=i[t]?.type;if(e=n==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(n){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(n){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function H0(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var hg="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(hg);var m1=require("@vkontakte/videoplayer-core"),nW=require("@vkontakte/videoplayer-core"),as=require("@vkontakte/videoplayer-shared"),v1=require("@vkontakte/videoplayer-statistics");var Ra=require("@vkontakte/videoplayer-shared");var U0={isMobile:void 0,debugLog:!1,devNullLog:!1,defaultLanguage:Ra.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:Ra.VideoQuality.Q_480P,highQualityLimit:Ra.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},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}},_g=t=>(0,Ra.fillWithDefault)(t,U0),bg=t=>Ss("ui-config",t),Bt=()=>ws("ui-config");var Al="vk_player_debug_panel_opened";var $g="videoplayer",yg="videoplayer";var Br={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},xg=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),wg=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Sg=new Set(["ShiftRight","ShiftLeft"]);var Cg=["TIMELINE"],Pl=[...Cg,"GRAPH_BUTTON"],pp=[...Cg,"PLAY_BUTTON"],Ml=[...Pl,"PLAY_BUTTON"];var hr=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(hr||{}),Na={xs:0,s:1,m:2,l:3,xl:4};var Ll=require("@vkontakte/videoplayer-shared"),kg=require("@vkontakte/videoplayer-core"),Tg=require("@vkontakte/videoplayer-statistics");var mc="prod",Da="1.1.60";var Oa=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Ig=Symbol("storeContext"),Eg=Symbol("microStoresContext"),Ag=(t,e)=>{Ss(Ig,t),Ss(Eg,e),mc==="dev"&&(window.app={store:t,microStores:e})},ye=()=>{let t=ws(Ig);return(0,Ll.assertNonNullable)(t,"Store context is empty!"),t},qi=()=>{let t=ws(Eg);return(0,Ll.assertNonNullable)(t,"MicroStores context is empty!"),t},Ut=(t,e)=>gc(t,t.getValue(),e),gc=(t,e,i)=>jn(e,o=>{let n=t.subscribe(a=>{o(a),i?.(a)});return()=>n.unsubscribe()}),Pg=(t,e,i)=>{let o=t.info,{width:n,height:a}=ve(i.ui.playerSize),s=o.throughputEstimation$.getValue()?.toFixed(0)??0,d=o.rttEstimation$.getValue()?.toFixed(0)??0,l=o.isAutoQualityEnabled$.getValue()?"auto":"manual",c=`${Da} (core: ${kg.VERSION}, stat: ${Tg.VERSION}, shared: ${Ll.VERSION})`,u=ve(i.state.errorLog$),_=u.length?`
|
|
48
|
+
\r\f\xA0\v\uFEFF`];function ig(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||eg.includes(o[s-1]))&&(d===o.length||eg.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 op(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function og(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(op)),n&&l.push(...Object.keys(n).map(op));var c=0,u=-1;let w=t.length;for(var _=0;_<w;_++){var p=t[_];if(d?p==="/"&&t[_-1]==="*"&&(d=!1):a?a===p&&(a=!1):p==="/"&&t[_+1]==="*"?d=!0:p==='"'||p==="'"?a=p:p==="("?s++:p===")"&&s--,!d&&a===!1&&s===0){if(p===":"&&u===-1)u=_;else if(p===";"||_===w-1){if(u!==-1){var y=op(t.substring(c,u).trim());if(!l.includes(y)){p!==";"&&_++;var x=t.substring(c,_).trim();i+=" "+x+";"}}c=_+1,u=-1}}}}return o&&(i+=tg(o)),n&&(i+=tg(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function Z(t,e,i,o,n,a){var s=t.__className;if(Qe||s!==i){var d=ig(i,o,a);(!Qe||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&n!==a)for(var l in a){var c=!!a[l];(n==null||c!==!!n[l])&&t.classList.toggle(l,c)}return a}function np(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 it(t,e,i,o){var n=t.__style;if(Qe||n!==e){var a=og(e,o);(!Qe||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(np(t,i?.[0],o[0]),np(t,i?.[1],o[1],"important")):np(t,i,o));return o}var Is=Symbol("class"),Es=Symbol("style"),ag=Symbol("is custom element"),sg=Symbol("is html");function lg(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Me(t,e,i,o){var n=dg(t);if(Qe&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||_0(t,e,i??"");return}n[e]!==(n[e]=i)&&(e==="loading"&&(t[qm]=i),i==null?t.removeAttribute(e):typeof i!="string"&&cg(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function he(t,e,i,o,n=!1){var a=dg(t),s=a[ag],d=!a[sg];let l=Qe&&s;l&&Ui(!1);var c=e||{},u=t.tagName==="OPTION";for(var _ in e)_ in i||(i[_]=null);i.class?i.class=Il(i.class):(o||i[Is])&&(i.class=null),i[Es]&&(i.style??=null);var p=cg(t);for(let P in i){let T=i[P];if(u&&P==="value"&&T==null){t.value=t.__value="",c[P]=T;continue}if(P==="class"){var y=t.namespaceURI==="http://www.w3.org/1999/xhtml";Z(t,y,T,o,e?.[Is],i[Is]),c[P]=T,c[Is]=i[Is];continue}if(P==="style"){it(t,T,e?.[Es],i[Es]),c[P]=T,c[Es]=i[Es];continue}var x=c[P];if(T!==x){c[P]=T;var w=P[0]+P[1];if(w!=="$$")if(w==="on"){let N={},Q="$$"+P,G=P.slice(2);var S=Ov(G);if(Dv(G)&&(G=G.slice(0,-7),N.capture=!0),!S&&x){if(T!=null)continue;t.removeEventListener(G,c[Q],N),c[Q]=null}if(T!=null)if(S)t[`__${G}`]=T,ot([G]);else{let ee=function(ie){c[P].call(this,ie)};var A=ee;c[Q]=ju(G,t,ee,N)}else S&&(t[`__${G}`]=void 0)}else if(P==="style")Me(t,P,T);else if(P==="autofocus")Qu(t,!!T);else if(!s&&(P==="__value"||P==="value"&&T!=null))t.value=t.__value=T;else if(P==="selected"&&u)lg(t,T);else{var I=P;d||(I=Hv(I));var L=I==="defaultValue"||I==="defaultChecked";if(T==null&&!s&&!L)if(a[P]=null,I==="value"||I==="checked"){let N=t,Q=e===void 0;if(I==="value"){let G=N.defaultValue;N.removeAttribute(I),N.defaultValue=G,N.value=N.__value=Q?G:null}else{let G=N.defaultChecked;N.removeAttribute(I),N.defaultChecked=G,N.checked=Q?G:!1}}else t.removeAttribute(P);else L||p.includes(I)&&(s||typeof T!="string")?t[I]=T:typeof T!="function"&&Me(t,I,T,n)}}}return l&&Ui(!0),c}function dg(t){return t.__attributes??={[ag]:t.nodeName.includes("-"),[sg]:t.namespaceURI===zm}}var ng=new Map;function cg(t){var e=ng.get(t.nodeName);if(e)return e;ng.set(t.nodeName,e=[]);for(var i,o=t,n=Element.prototype;n!==o;){i=Kd(o);for(var a in i)i[a].set&&e.push(a);o=Ur(o)}return e}function _0(t,e,i){$e&&(e==="srcset"&&b0(t,i)||rp(t.getAttribute(e)??"",i)||vv(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function rp(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function rg(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function b0(t,e){var i=rg(t.srcset),o=rg(e);return o.length===i.length&&o.every(([n,a],s)=>a===i[s][1]&&(rp(i[s][0],n)||rp(n,i[s][0])))}var $0=qd?()=>performance.now():()=>Date.now(),vr={tick:t=>(qd?requestAnimationFrame:J)(t),now:()=>$0(),tasks:new Set};function ug(){let t=vr.now();vr.tasks.forEach(e=>{e.c(t)||(vr.tasks.delete(e),e.f())}),vr.tasks.size!==0&&vr.tick(ug)}function pg(t){let e;return vr.tasks.size===0&&vr.tick(ug),{promise:new Promise(i=>{vr.tasks.add(e={c:t,f:i})}),abort(){vr.tasks.delete(e)}}}function uc(t,e){xl(()=>{t.dispatchEvent(new CustomEvent(e))})}function S0(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 fg(t){let e={},i=t.split(";");for(let o of i){let[n,a]=o.split(":");if(!n||a===void 0)break;let s=S0(n.trim());e[s]=a.trim()}return e}var C0=t=>t;function sp(t,e,i,o){var n=(t&1)!==0,a=(t&2)!==0,s=n&&a,d=(t&4)!==0,l=s?"both":n?"in":"out",c,u=e.inert,_=e.style.overflow,p,y;function x(){var A=Et,P=ht;to(null),Hi(null);try{return c??=i()(e,o?.()??{},{direction:l})}finally{to(A),Hi(P)}}var w={is_global:d,in(){if(e.inert=u,!n){y?.abort(),y?.reset?.();return}a||p?.abort(),uc(e,"introstart"),p=ap(e,x(),y,1,()=>{uc(e,"introend"),p?.abort(),p=c=void 0,e.style.overflow=_})},out(A){if(!a){A?.(),c=void 0;return}e.inert=!0,uc(e,"outrostart"),y=ap(e,x(),p,0,()=>{uc(e,"outroend"),A?.()})},stop:()=>{p?.abort(),y?.abort()}},S=ht;if((S.transitions??=[]).push(w),n&&wl){var I=d;if(!I){for(var L=S.parent;L&&(L.f&65536)!==0;)for(;(L=L.parent)&&(L.f&16)===0;);I=!L||(L.f&32768)!==0}I&&rn(()=>{mt(()=>w.in())})}}function ap(t,e,i,o,n){var a=o===1;if(na(e)){var s,d=!1;return Mo(()=>{if(!d){var S=e({direction:a?"in":"out"});s=ap(t,S,i,o,n)}}),{abort:()=>{d=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(i?.deactivate(),!e?.duration)return n(),{abort:J,deactivate:J,reset:J,t:()=>o};let{delay:l=0,css:c,tick:u,easing:_=C0}=e;var p=[];if(a&&i===void 0&&(u&&u(0,1),c)){var y=fg(c(0,1));p.push(y,y)}var x=()=>1-o,w=t.animate(p,{duration:l});return w.onfinish=()=>{var S=i?.t()??1-o;i?.abort();var I=o-S,L=e.duration*Math.abs(I),A=[];if(L>0){var P=!1;if(c)for(var T=Math.ceil(L/16.666666666666668),N=0;N<=T;N+=1){var Q=S+I*_(N/T),G=fg(c(Q,1-Q));A.push(G),P||=G.overflow==="hidden"}P&&(t.style.overflow="hidden"),x=()=>{var ee=w.currentTime;return S+I*_(ee/L)},u&&pg(()=>{if(w.playState!=="running")return!1;var ee=x();return u(ee,1-ee),!0})}w=t.animate(A,{duration:L,fill:"forwards"}),w.onfinish=()=>{x=()=>o,u?.(o,1-o),n()}},{abort:()=>{w&&(w.cancel(),w.effect=null,w.onfinish=J)},deactivate:()=>{n=J},reset:()=>{o===0&&u?.(1,0)},t:()=>x()}}var lp=class t{#t=new WeakMap;#e;#i;static entries=new WeakMap;constructor(e){this.#i=e}observe(e,i){var o=this.#t.get(e)||new Set;return o.add(i),this.#t.set(e,o),this.#o().observe(e,this.#i),()=>{var n=this.#t.get(e);n.delete(i),n.size===0&&(this.#t.delete(e),this.#e.unobserve(e))}}#o(){return this.#e??(this.#e=new ResizeObserver(e=>{for(var i of e){t.entries.set(i.target,i);for(var o of this.#t.get(i.target)||[])o(i)}}))}};var I0=new lp({box:"border-box"});function Rr(t,e,i){var o=I0.observe(t,()=>i(t[e]));rn(()=>(mt(()=>i(t[e])),o))}function mg(t,e){return t===e||t?.[yo]===e}function st(t={},e,i,o){return rn(()=>{var n,a;return oo(()=>{n=a,a=o?.()||[],mt(()=>{t!==i(...a)&&(e(t,...a),n&&mg(i(...n),t)&&e(null,...n))})}),()=>{Mo(()=>{a&&mg(i(...a),t)&&e(null,...a)})}}),t}function gr(t=!1){let e=Ct,i=e.l.u;if(!i)return;let o=()=>oc(e.s);if(t){let n=0,a={},s=m(()=>{let d=!1,l=e.s;for(let c in l)l[c]!==a[c]&&(a[c]=l[c],d=!0);return d&&n++,n});o=()=>r(s)}i.b.length&&ys(()=>{vg(e,o),ra(i.b)}),Ge(()=>{let n=mt(()=>i.m.map(Qm));return()=>{for(let a of n)typeof a=="function"&&a()}}),i.a.length&&Ge(()=>{vg(e,o),ra(i.a)})}function vg(t,e){if(t.l.s)for(let i of t.l.s)r(i);e()}if($e){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;rv(e)},set:o=>{i=o}})}};A0=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var A0;function At(t){Ct===null&&xs("onMount"),Mr&&Ct.l!==null?E0(Ct).m.push(t):Ge(()=>{let e=mt(t);if(typeof e=="function")return e})}function sn(t){Ct===null&&xs("onDestroy"),At(()=>()=>mt(t))}function E0(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function El(t,e,i){if(t==null)return e(void 0),i&&i(void 0),J;let o=mt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var As=[];function jn(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=J){let i=null,o=new Set;function n(d){if(us(t,d)&&(t=d,i)){let l=!As.length;for(let c of o)c[1](),As.push(c,t);if(l){for(let c=0;c<As.length;c+=2)As[c][0](As[c+1]);As.length=0}}}function a(d){n(d(t))}function s(d,l=J){let c=[d,l];return o.add(c),o.size===1&&(i=e(n,a)||J),d(t),()=>{o.delete(c),o.size===0&&i&&(i(),i=null)}}return{set:n,update:a,subscribe:s}}function di(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 jn(i,(s,d)=>{let l=!1,c=[],u=0,_=J,p=()=>{if(u)return;_();let x=e(o?c[0]:c,s,d);a?s(x):_=typeof x=="function"?x:J},y=n.map((x,w)=>El(x,S=>{c[w]=S,u&=~(1<<w),l&&p()},()=>{u|=1<<w}));return l=!0,p(),function(){ra(y),_(),l=!1}})}function ve(t){let e;return El(t,i=>e=i)(),e}var fc=!1,dp=Symbol();function $(t,e,i){let o=i[e]??={store:null,source:Kr(void 0),unsubscribe:J};if(o.store!==t&&!(dp in i))if(o.unsubscribe(),o.store=t??null,t==null)o.source.v=void 0,o.unsubscribe=J;else{var n=!0;o.unsubscribe=El(t,a=>{n?o.source.v=a:D(o.source,a)}),n=!1}return t&&dp in i?ve(t):r(o.source)}function Oe(){let t={};function e(){Oo(()=>{for(var i in t)t[i].unsubscribe();Oi(t,dp,{enumerable:!1,value:!0})})}return[t,e]}function cp(t){var e=fc;try{return fc=!1,[t(),fc]}finally{fc=e}}var N0={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return $e&&nv(`${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 xe(t,e,i){return new Proxy($e?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},N0)}var D0={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(na(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];na(n)&&(n=n());let a=In(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(na(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let n=In(o,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===yo||e===al)return!1;for(let i of t.props)if(na(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props){na(i)&&(i=i());for(let o in i)e.includes(o)||e.push(o)}return e}};function jr(...t){return new Proxy({props:t},D0)}function gg(t){return t.ctx?.d??!1}function v(t,e,i,o){var n=(i&1)!==0,a=!Mr||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,l=!1,c;s?[c,l]=cp(()=>t[e]):c=t[e];var u=yo in t||al in t,_=s&&(In(t,e)?.set??(u&&e in t&&(Q=>t[e]=Q)))||void 0,p=o,y=!0,x=!1,w=()=>(x=!0,y&&(y=!1,d?p=mt(o):p=o),p);c===void 0&&o!==void 0&&(_&&a&&ov(e),c=w(),_&&_(c));var S;if(a)S=()=>{var Q=t[e];return Q===void 0?w():(y=!0,x=!1,Q)};else{var I=(n?m:fr)(()=>t[e]);I.f|=131072,S=()=>{var Q=r(I);return Q!==void 0&&(p=void 0),Q===void 0?p:Q}}if((i&4)===0)return S;if(_){var L=t.$$legacy;return function(Q,G){return arguments.length>0?((!a||!G||L||l)&&_(G?S():Q),Q):S()}}var A=!1,P=!1,T=Kr(c),N=m(()=>{var Q=S(),G=r(T);return A?(A=!1,P=!0,G):(P=!1,T.v=Q)});return s&&r(N),n||(N.equals=ps),function(Q,G){if(cl!==null&&(A=P,S(),r(T)),arguments.length>0){let ee=G?r(N):a&&s?pe(Q):Q;if(!N.equals(ee)){if(A=!0,D(T,ee),x&&p!==void 0&&(p=ee),gg(N))return Q;mt(()=>r(N))}return Q}return gg(N)?N.v:r(N)}}var O0;typeof HTMLElement=="function"&&(O0=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,i){super(),this.$$ctor=t,this.$$s=e,i&&this.attachShadow({mode:"open"})}addEventListener(t,e,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){let o=this.$$c.$on(t,e);this.$$l_u.set(e,o)}super.addEventListener(t,e,i)}removeEventListener(t,e,i){if(super.removeEventListener(t,e,i),this.$$c){let o=this.$$l_u.get(e);o&&(o(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return a=>{let s=document.createElement("slot");n!=="default"&&(s.name=n),b(a,s)}};var t=e;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let i={},o=H0(this);for(let n of this.$$s)n in o&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),i.default=!0):i[n]=e(n));for(let n of this.attributes){let a=this.$$g_p(n.name);a in this.$$d||(this.$$d[a]=up(a,n.value,this.$$p_d,"toProp"))}for(let n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Zv({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:i,$$host:this}}),this.$$me=rc(()=>{oo(()=>{this.$$r=!0;for(let n of $u(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];let a=up(n,this.$$d[n],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,a)}this.$$r=!1})});for(let n in this.$$l)for(let a of this.$$l[n]){let s=this.$$c.$on(n,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(t,e,i){this.$$r||(t=this.$$g_p(t),this.$$d[t]=up(t,i,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return $u(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function up(t,e,i,o){let n=i[t]?.type;if(e=n==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(n){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(n){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function H0(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var hg="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(hg);var m1=require("@vkontakte/videoplayer-core"),nW=require("@vkontakte/videoplayer-core"),as=require("@vkontakte/videoplayer-shared"),v1=require("@vkontakte/videoplayer-statistics");var Ra=require("@vkontakte/videoplayer-shared");var U0={isMobile:void 0,debugLog:!1,devNullLog:!1,defaultLanguage:Ra.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:Ra.VideoQuality.Q_480P,highQualityLimit:Ra.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},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}},_g=t=>(0,Ra.fillWithDefault)(t,U0),bg=t=>Ss("ui-config",t),Bt=()=>ws("ui-config");var Al="vk_player_debug_panel_opened";var $g="videoplayer",yg="videoplayer";var Br={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},xg=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),wg=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Sg=new Set(["ShiftRight","ShiftLeft"]);var Cg=["TIMELINE"],Pl=[...Cg,"GRAPH_BUTTON"],pp=[...Cg,"PLAY_BUTTON"],Ml=[...Pl,"PLAY_BUTTON"];var hr=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(hr||{}),Na={xs:0,s:1,m:2,l:3,xl:4};var Ll=require("@vkontakte/videoplayer-shared"),kg=require("@vkontakte/videoplayer-core"),Tg=require("@vkontakte/videoplayer-statistics");var mc="prod",Da="1.1.61-dev.6fff06ee.0";var Oa=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Ig=Symbol("storeContext"),Eg=Symbol("microStoresContext"),Ag=(t,e)=>{Ss(Ig,t),Ss(Eg,e),mc==="dev"&&(window.app={store:t,microStores:e})},ye=()=>{let t=ws(Ig);return(0,Ll.assertNonNullable)(t,"Store context is empty!"),t},qi=()=>{let t=ws(Eg);return(0,Ll.assertNonNullable)(t,"MicroStores context is empty!"),t},Ut=(t,e)=>gc(t,t.getValue(),e),gc=(t,e,i)=>jn(e,o=>{let n=t.subscribe(a=>{o(a),i?.(a)});return()=>n.unsubscribe()}),Pg=(t,e,i)=>{let o=t.info,{width:n,height:a}=ve(i.ui.playerSize),s=o.throughputEstimation$.getValue()?.toFixed(0)??0,d=o.rttEstimation$.getValue()?.toFixed(0)??0,l=o.isAutoQualityEnabled$.getValue()?"auto":"manual",c=`${Da} (core: ${kg.VERSION}, stat: ${Tg.VERSION}, shared: ${Ll.VERSION})`,u=ve(i.state.errorLog$),_=u.length?`
|
|
49
49
|
`+u.map((I,L)=>{let A=`${L}) Type: ${I.id}
|
|
50
50
|
`,P=`Message: ${I.message} (${I.thrown})
|
|
51
51
|
`,T=`Trace: ${I.thrown?.stack}
|
|
@@ -360,5 +360,5 @@ Try switching the\xA0quality to\xA0Auto.`},Jg=W0;var Yr=new Map;Yr.set(Ps.Interf
|
|
|
360
360
|
/* --vk-vp-int-custom-font - vk video player interactive custom font */font-family:var(--vk-vp-int-custom-font, inherit);}*:focus, *:focus-visible {outline:none;}*:focus-visible {box-shadow:var(--focused-element-shadow);}
|
|
361
361
|
/* 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);}
|
|
362
362
|
|
|
363
|
-
/* \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 Mm(t,e){F(e,!0),K(t,u3);let[i,o]=Oe(),n=()=>$(Pt,"$isLive$",i),a=v(e,"sources",7),s=v(e,"store",7),d=v(e,"microStoresRoot",7),l=v(e,"videoConfig",7),c=v(e,"uiConfig",7),u=v(e,"title",7),_=v(e,"thumbUrl",7),p=v(e,"interactiveContainer",7),y=v(e,"interactiveController",7),x=v(e,"subtitles",7),w=v(e,"live",7),S=v(e,"preload",7),I=v(e,"autoplay",7),L=v(e,"volume",7,void 0),A=v(e,"muted",7,void 0),P=v(e,"fromTime",7),T=v(e,"canRewindLive",7),N=v(e,"showAds",7),Q=v(e,"adsSlotId",7,void 0),G=v(e,"adsParams",7,void 0),ee=v(e,"adsPreviewParam",7,void 0),ie=v(e,"adsAutoplayParam",7,void 0),oe=v(e,"duration",7,void 0),te=v(e,"logoClickable",7),ge=v(e,"logoHidden",7),X=v(e,"isMobile",7),Le=v(e,"showNextPrevButtons",7,!1),Ae=v(e,"nextButtonActive",7,!1),se=v(e,"prevButtonActive",7,!1),He=v(e,"endScreenVideoTitle",7,void 0),j=v(e,"endScreenVideoThumb",7,void 0),B=v(e,"isOneVideoPlaylist",7,!1),Ve=v(e,"supportLink",7),_e=v(e,"shadowRootContainer",7,void 0),Ce=v(e,"outerContainerRef",7,void 0),Be=v(e,"fullScreenTarget",7,void 0),ce=v(e,"failoverHosts",7,void 0),R=v(e,"showMiniTimer",7,!1),be=v(e,"saveRate",7),Ie=v(e,"seekToInteractive",7,as.noop),Ye=v(e,"playPrevChapter",7,as.noop),Ke=v(e,"volumeMultiplier",7),ke=v(e,"showAutoplayNext",7),Pe=v(e,"showEndScreen",7,!0),Re=v(e,"keyboardControls",15,void 0),{subscribers:ut,stores:_t}=d();bg(c());let nt=Bt(),It=c().logoLink,rt=s().ui.debugPanelVisible,pt=s().ui.playerSize,Pt=s().state.isLive$,Ne=s().state.isInteractive&&m1.clientChecker.device.isAndroid,Ze=Y(void 0),q=null,re=Y(!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}),Ag(s(),_t),Ge(()=>{s().ui.isMobile.set(X())});let ne=(z=!1)=>{D(re,!0),z?s().actions.external.firstStart(N()):s().actions.internal.firstStart(N())},Fe=()=>{if(nt.features.qualityDetailsSubMenuEnabled){let z=Yg(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{Zg(s().videoId),xp()&&s().actions.internal.setTrafficSavingEnabled(!0);let zt=_p(s().videoId);zt&&s().actions.internal.setQuality(zt)}};function je(z){let zt=a()||z;zt&&s().initVideo({container:r(Ze),sources:zt,failoverHosts:ce(),subtitles:x(),volumeMultiplier:Ke()});let wi=as.safeStorage.get(Al)==="true";rt.set(wi),P()>0&&s().actions.external.seekTime(P());let Wi=X()?nt.volumeDefault:L()??hc()??nt.volumeDefault,Jt=A()??qg();if(s().actions.external.setVolume(Wi),s().actions.external.setMuted(Jt),s().getAdmanWrapper().setInitialVolume(Jt?0:Wi),Fe(),nt.features.saveRate&&be()){let ei=Qg();ei&&!n()&&s().actions.internal.setPlaybackRate(ei)}if(ke()){let ei=jg();ei&&s().actions.internal.setAutoplayNextEnabled(ei)}s().ui.isAutoplay.set(I()),I()?ne():S()&&nt.features.preload&&s().actions.internal.preload()}let wt=z=>{if(window.ResizeObserver){let zt,wi;q=new ResizeObserver((0,as.throttleFn)(Wi=>{let Jt=Wi[0];if(Jt.contentBoxSize){let ei=Array.isArray(Jt.contentBoxSize)?Jt.contentBoxSize[0]:Jt.contentBoxSize;zt=ei.inlineSize,wi=ei.blockSize}else Jt.contentRect&&(zt=Jt.contentRect.width,wi=Jt.contentRect.height);pt.set({width:zt,height:wi})},300)),q.observe(z)}pt.set({width:z.clientWidth,height:z.clientHeight})},We=()=>{document.hidden&&s().actions.external.stop()};At(()=>{Ne&&document.addEventListener("visibilitychange",We),nt.debugLog&&s().actions.internal.startLogging(),wt(r(Ze));let z=ut.map(wi=>wi.init({store:s(),microStores:_t,config:l(),interactiveController:y(),uiConfig:c()})),zt=()=>{Ne&&document.removeEventListener("visibilitychange",We),q?.disconnect(),z.forEach(wi=>wi.unsubscribe()),s().destroy()};return w()?.status==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),zt):w()?.status==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),zt):(w()?.status==="finished"||w()?.status==="postlive")&&!Object.keys(a()||[]).length?(s().actions.internal.setLiveWaitingRecord(!0),zt):(je(),zt)});function Xe(){r(re)?s().actions.external.play():ne(!0)}function Ee(){s().actions.external.pause()}function ct(z){s().actions.external.setMuted(z)}function Nt(z){X()||z>=0&&z<=1&&s().actions.external.setVolume(z)}function Gt(z){s().actions.internal.seekTime(z,v1.SeekAction.UNKNOWN)}function Xt(z){s().actions.external.seekEpisodeStartTime(z)}function pi(){s().actions.external.returnFocusToEpisodes()}function Ki(z){s().actions.external.setPlaybackRate(z)}function Uo(z){s().actions.external.setAutoQualityLimits(z)}let dn=eu(nt.view);var ro=c3();it(ro,dn);var cn=h(ro);{var zo=z=>{Pm(z,{get store(){return s()},uiConfig:nt,get thumbUrl(){return _()},get interactiveContainer(){return p()},get live(){return w()},get autoplay(){return I()},get canRewindLive(){return T()},get showAds(){return N()},get adsSlotId(){return Q()},get adsParams(){return G()},get adsPreviewParam(){return ee()},get adsAutoplayParam(){return ie()},get duration(){return oe()},get logoClickable(){return te()},get logoHidden(){return ge()},logoTargetUrl:It,get nextButtonActive(){return Ae()},get prevButtonActive(){return se()},get endScreenVideoTitle(){return He()},get endScreenVideoThumb(){return j()},get isOneVideoPlaylist(){return B()},get supportLink(){return Ve()},get shadowRootContainer(){return _e()},get outerContainerRef(){return Ce()},get fullScreenTarget(){return Be()},get showMiniTimer(){return R()},get playerStarted(){return r(re)},get seekToInteractive(){return Ie()},get playPrevChapter(){return Ye()},firstStart:ne,seekTime:Gt,get showEndScreen(){return Pe()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return Le()},get videoContainer(){return r(Ze)},set videoContainer(zt){D(Ze,pe(zt))}})},qo=z=>{Em(z,{get store(){return s()},uiConfig:nt,get title(){return u()},get thumbUrl(){return _()},get interactiveContainer(){return p()},get live(){return w()},get autoplay(){return I()},get canRewindLive(){return T()},get showAds(){return N()},get adsSlotId(){return Q()},get adsParams(){return G()},get adsPreviewParam(){return ee()},get adsAutoplayParam(){return ie()},get duration(){return oe()},get logoClickable(){return te()},get logoHidden(){return ge()},logoTargetUrl:It,get nextButtonActive(){return Ae()},get prevButtonActive(){return se()},get endScreenVideoTitle(){return He()},get endScreenVideoThumb(){return j()},get isOneVideoPlaylist(){return B()},get supportLink(){return Ve()},get shadowRootContainer(){return _e()},get outerContainerRef(){return Ce()},get fullScreenTarget(){return Be()},get showMiniTimer(){return R()},get playerStarted(){return r(re)},get seekToInteractive(){return Ie()},get playPrevChapter(){return Ye()},firstStart:ne,get showEndScreen(){return Pe()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return Le()},get videoContainer(){return r(Ze)},set videoContainer(zt){D(Ze,pe(zt))},get keyboardControls(){return Re()},set keyboardControls(zt){Re(zt)}})};V(cn,z=>{X()?z(zo):z(qo,!1)})}g(ro),b(t,ro);var fo=U({initVideo:je,play:Xe,pause:Ee,setMuted:ct,setVolume:Nt,seekTime:Gt,seekEpisodeStartTime:Xt,returnFocusToEpisodes:pi,setPlaybackRate:Ki,setAutoQualityLimits:Uo,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 c()},set uiConfig(z){c(z)},get title(){return u()},set title(z){u(z)},get thumbUrl(){return _()},set thumbUrl(z){_(z)},get interactiveContainer(){return p()},set interactiveContainer(z){p(z)},get interactiveController(){return y()},set interactiveController(z){y(z)},get subtitles(){return x()},set subtitles(z){x(z)},get live(){return w()},set live(z){w(z)},get preload(){return S()},set preload(z){S(z)},get autoplay(){return I()},set autoplay(z){I(z)},get volume(){return L()},set volume(z){L(z)},get muted(){return A()},set muted(z){A(z)},get fromTime(){return P()},set fromTime(z){P(z)},get canRewindLive(){return T()},set canRewindLive(z){T(z)},get showAds(){return N()},set showAds(z){N(z)},get adsSlotId(){return Q()},set adsSlotId(z){Q(z)},get adsParams(){return G()},set adsParams(z){G(z)},get adsPreviewParam(){return ee()},set adsPreviewParam(z){ee(z)},get adsAutoplayParam(){return ie()},set adsAutoplayParam(z){ie(z)},get duration(){return oe()},set duration(z){oe(z)},get logoClickable(){return te()},set logoClickable(z){te(z)},get logoHidden(){return ge()},set logoHidden(z){ge(z)},get isMobile(){return X()},set isMobile(z){X(z)},get showNextPrevButtons(){return Le()},set showNextPrevButtons(z){Le(z)},get nextButtonActive(){return Ae()},set nextButtonActive(z){Ae(z)},get prevButtonActive(){return se()},set prevButtonActive(z){se(z)},get endScreenVideoTitle(){return He()},set endScreenVideoTitle(z){He(z)},get endScreenVideoThumb(){return j()},set endScreenVideoThumb(z){j(z)},get isOneVideoPlaylist(){return B()},set isOneVideoPlaylist(z){B(z)},get supportLink(){return Ve()},set supportLink(z){Ve(z)},get shadowRootContainer(){return _e()},set shadowRootContainer(z){_e(z)},get outerContainerRef(){return Ce()},set outerContainerRef(z){Ce(z)},get fullScreenTarget(){return Be()},set fullScreenTarget(z){Be(z)},get failoverHosts(){return ce()},set failoverHosts(z){ce(z)},get showMiniTimer(){return R()},set showMiniTimer(z){R(z)},get saveRate(){return be()},set saveRate(z){be(z)},get showAutoplayNext(){return ke()},set showAutoplayNext(z){ke(z)},get seekToInteractive(){return Ie()},set seekToInteractive(z){Ie(z)},get playPrevChapter(){return Ye()},set playPrevChapter(z){Ye(z)},get volumeMultiplier(){return Ke()},set volumeMultiplier(z){Ke(z)},get showEndScreen(){return Pe()},set showEndScreen(z){Pe(z)},get keyboardControls(){return Re()},set keyboardControls(z){Re(z)}});return o(),fo}var p3=me('<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 Lm(t,e){let i=xe(e,["$$slots","$$events","$$legacy","children"]);var o=p3();let n;var a=h(o);de(a,()=>e.children??J),fe(),g(o),C(()=>n=he(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 Vm(t,e){let i=v(e,"isWhite",3,!1),o=m(()=>i()?"color: #fff;":"color: #909499;");Lm(t,{get style(){return r(o)}})}var f3=M('<div class="title svelte-1y9fytq"> </div>'),m3=M('<div class="playerStub svelte-1y9fytq"><!> <!></div>'),v3={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 Rm(t,e){K(t,v3);var i=m3(),o=h(i);{var n=d=>{var l=f3(),c=h(l,!0);g(l),C(()=>le(c,e.title)),b(d,l)};V(o,d=>{e.title&&d(n)})}var a=E(o,2);{var s=d=>{let l=m(()=>!!e.thumbUrl);Vm(d,{get isWhite(){return r(l)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(s)})}g(i),C(()=>it(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var w1=require("@vkontakte/videoplayer-shared"),Ei=require("@vkontakte/videoplayer-shared"),Vd=require("@vkontakte/videoplayer-core"),S1=require("@vkontakte/videoplayer-statistics");var iu=require("@vkontakte/videoplayer-shared"),tu=class{constructor(){this.subscription=new iu.Subscription,this.logger=new iu.Logger,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){if(this.isSupported())for(let[i,o]of e)try{navigator.mediaSession.setActionHandler?.(i,o)}catch{throw new Error(`The media session action "${i}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{let o=ve(e.state.currentPlaybackRate$),n=ve(e.state.duration$);if(!(!isFinite(i)||!isFinite(n)))try{navigator.mediaSession.setPositionState?.({position:i,playbackRate:o,duration:n})}catch{this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${n}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};var js=require("@vkontakte/videoplayer-shared");var g3=me('<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 Bm(t,e){let i=xe(e,["$$slots","$$events","$$legacy","children"]);var o=g3();let n;var a=h(o);de(a,()=>e.children??J),fe(),g(o),C(()=>n=he(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 h3=M('<div><div><!></div> <span class="title svelte-1pbsod4"> </span></div>'),_3={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 Nm(t,e){F(e,!0),K(t,_3);let[i,o]=Oe(),n=()=>$(c,"$interfaceLanguage$",i),a=()=>$(u,"$isMobile$",i),s=ye(),d=Bt(),l=!!s.webApi.pictureInPictureApi,c=s.interfaceLanguage$,u=s.ui.isMobile,_=s.ui.t,p=m(()=>n()&&_("pip_dummy_title")),y=eu(d.view);var x=h3();Z(x,1,"player-pip-dummy svelte-1pbsod4",null,{},{"is-pip-api":l}),it(x,y);var w=h(x);let S;var I=h(w);Bm(I,{}),g(w);var L=E(w,2),A=h(L,!0);g(L),g(x),C(P=>{S=Z(w,1,"dummy-image svelte-1pbsod4",null,S,P),le(A,r(p))},[()=>({desktop:!a()})]),b(t,x),U(),o()}var b3=460,$3=280,kd=class{playerDomElement;playerParentShadowRoot;playerDummyElement;svelteContext;pipWindow;info={isActive$:new js.ValueSubject(!1),isEnabled$:new js.ValueSubject(!1),type:1};constructor({enabled:e=!0}={enabled:!0}){this.info.isEnabled$=new js.ValueSubject(e)}isSupported(){let{isEmbed:e}=(0,js.detectEmbed)();return"documentPictureInPicture"in window&&!e}isActive(){return this.isSupported()&&!!documentPictureInPicture.window}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}async request(){if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:b3,height:$3,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let e=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(d=>d.cssText).join(" ")).filter(Boolean).join(`
|
|
363
|
+
/* \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 Mm(t,e){F(e,!0),K(t,u3);let[i,o]=Oe(),n=()=>$(Pt,"$isLive$",i),a=v(e,"sources",7),s=v(e,"store",7),d=v(e,"microStoresRoot",7),l=v(e,"videoConfig",7),c=v(e,"uiConfig",7),u=v(e,"title",7),_=v(e,"thumbUrl",7),p=v(e,"interactiveContainer",7),y=v(e,"interactiveController",7),x=v(e,"subtitles",7),w=v(e,"live",7),S=v(e,"preload",7),I=v(e,"autoplay",7),L=v(e,"volume",7,void 0),A=v(e,"muted",7,void 0),P=v(e,"fromTime",7),T=v(e,"canRewindLive",7),N=v(e,"showAds",7),Q=v(e,"adsSlotId",7,void 0),G=v(e,"adsParams",7,void 0),ee=v(e,"adsPreviewParam",7,void 0),ie=v(e,"adsAutoplayParam",7,void 0),oe=v(e,"duration",7,void 0),te=v(e,"logoClickable",7),ge=v(e,"logoHidden",7),X=v(e,"isMobile",7),Le=v(e,"showNextPrevButtons",7,!1),Ae=v(e,"nextButtonActive",7,!1),se=v(e,"prevButtonActive",7,!1),He=v(e,"endScreenVideoTitle",7,void 0),j=v(e,"endScreenVideoThumb",7,void 0),B=v(e,"isOneVideoPlaylist",7,!1),Ve=v(e,"supportLink",7),_e=v(e,"shadowRootContainer",7,void 0),Ce=v(e,"outerContainerRef",7,void 0),Be=v(e,"fullScreenTarget",7,void 0),ce=v(e,"failoverHosts",7,void 0),R=v(e,"showMiniTimer",7,!1),be=v(e,"saveRate",7),Ie=v(e,"seekToInteractive",7,as.noop),Ye=v(e,"playPrevChapter",7,as.noop),Ke=v(e,"volumeMultiplier",7),ke=v(e,"showAutoplayNext",7),Pe=v(e,"showEndScreen",7,!0),Re=v(e,"keyboardControls",15,void 0),{subscribers:ut,stores:_t}=d();bg(c());let nt=Bt(),It=c().logoLink,rt=s().ui.debugPanelVisible,pt=s().ui.playerSize,Pt=s().state.isLive$,Ne=s().state.isInteractive&&m1.clientChecker.device.isAndroid,Ze=Y(void 0),q=null,re=Y(!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}),Ag(s(),_t),Ge(()=>{s().ui.isMobile.set(X())});let ne=(z=!1)=>{D(re,!0),z?s().actions.external.firstStart(N()):s().actions.internal.firstStart(N())},Fe=()=>{if(nt.features.qualityDetailsSubMenuEnabled){let z=Yg(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{Zg(s().videoId),xp()&&s().actions.internal.setTrafficSavingEnabled(!0);let zt=_p(s().videoId);zt&&s().actions.internal.setQuality(zt)}};function je(z){let zt=a()||z;zt&&s().initVideo({container:r(Ze),sources:zt,failoverHosts:ce(),subtitles:x(),volumeMultiplier:Ke()});let wi=as.safeStorage.get(Al)==="true";rt.set(wi),Number.isFinite(P())&&s().actions.external.seekTime(P());let Wi=X()?nt.volumeDefault:L()??hc()??nt.volumeDefault,Jt=A()??qg();if(s().actions.external.setVolume(Wi),s().actions.external.setMuted(Jt),s().getAdmanWrapper().setInitialVolume(Jt?0:Wi),Fe(),nt.features.saveRate&&be()){let ei=Qg();ei&&!n()&&s().actions.internal.setPlaybackRate(ei)}if(ke()){let ei=jg();ei&&s().actions.internal.setAutoplayNextEnabled(ei)}s().ui.isAutoplay.set(I()),I()?ne():S()&&nt.features.preload&&s().actions.internal.preload()}let wt=z=>{if(window.ResizeObserver){let zt,wi;q=new ResizeObserver((0,as.throttleFn)(Wi=>{let Jt=Wi[0];if(Jt.contentBoxSize){let ei=Array.isArray(Jt.contentBoxSize)?Jt.contentBoxSize[0]:Jt.contentBoxSize;zt=ei.inlineSize,wi=ei.blockSize}else Jt.contentRect&&(zt=Jt.contentRect.width,wi=Jt.contentRect.height);pt.set({width:zt,height:wi})},300)),q.observe(z)}pt.set({width:z.clientWidth,height:z.clientHeight})},We=()=>{document.hidden&&s().actions.external.stop()};At(()=>{Ne&&document.addEventListener("visibilitychange",We),nt.debugLog&&s().actions.internal.startLogging(),wt(r(Ze));let z=ut.map(wi=>wi.init({store:s(),microStores:_t,config:l(),interactiveController:y(),uiConfig:c()})),zt=()=>{Ne&&document.removeEventListener("visibilitychange",We),q?.disconnect(),z.forEach(wi=>wi.unsubscribe()),s().destroy()};return w()?.status==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),zt):w()?.status==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),zt):(w()?.status==="finished"||w()?.status==="postlive")&&!Object.keys(a()||[]).length?(s().actions.internal.setLiveWaitingRecord(!0),zt):(je(),zt)});function Xe(){r(re)?s().actions.external.play():ne(!0)}function Ee(){s().actions.external.pause()}function ct(z){s().actions.external.setMuted(z)}function Nt(z){X()||z>=0&&z<=1&&s().actions.external.setVolume(z)}function Gt(z){s().actions.internal.seekTime(z,v1.SeekAction.UNKNOWN)}function Xt(z){s().actions.external.seekEpisodeStartTime(z)}function pi(){s().actions.external.returnFocusToEpisodes()}function Ki(z){s().actions.external.setPlaybackRate(z)}function Uo(z){s().actions.external.setAutoQualityLimits(z)}let dn=eu(nt.view);var ro=c3();it(ro,dn);var cn=h(ro);{var zo=z=>{Pm(z,{get store(){return s()},uiConfig:nt,get thumbUrl(){return _()},get interactiveContainer(){return p()},get live(){return w()},get autoplay(){return I()},get canRewindLive(){return T()},get showAds(){return N()},get adsSlotId(){return Q()},get adsParams(){return G()},get adsPreviewParam(){return ee()},get adsAutoplayParam(){return ie()},get duration(){return oe()},get logoClickable(){return te()},get logoHidden(){return ge()},logoTargetUrl:It,get nextButtonActive(){return Ae()},get prevButtonActive(){return se()},get endScreenVideoTitle(){return He()},get endScreenVideoThumb(){return j()},get isOneVideoPlaylist(){return B()},get supportLink(){return Ve()},get shadowRootContainer(){return _e()},get outerContainerRef(){return Ce()},get fullScreenTarget(){return Be()},get showMiniTimer(){return R()},get playerStarted(){return r(re)},get seekToInteractive(){return Ie()},get playPrevChapter(){return Ye()},firstStart:ne,seekTime:Gt,get showEndScreen(){return Pe()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return Le()},get videoContainer(){return r(Ze)},set videoContainer(zt){D(Ze,pe(zt))}})},qo=z=>{Em(z,{get store(){return s()},uiConfig:nt,get title(){return u()},get thumbUrl(){return _()},get interactiveContainer(){return p()},get live(){return w()},get autoplay(){return I()},get canRewindLive(){return T()},get showAds(){return N()},get adsSlotId(){return Q()},get adsParams(){return G()},get adsPreviewParam(){return ee()},get adsAutoplayParam(){return ie()},get duration(){return oe()},get logoClickable(){return te()},get logoHidden(){return ge()},logoTargetUrl:It,get nextButtonActive(){return Ae()},get prevButtonActive(){return se()},get endScreenVideoTitle(){return He()},get endScreenVideoThumb(){return j()},get isOneVideoPlaylist(){return B()},get supportLink(){return Ve()},get shadowRootContainer(){return _e()},get outerContainerRef(){return Ce()},get fullScreenTarget(){return Be()},get showMiniTimer(){return R()},get playerStarted(){return r(re)},get seekToInteractive(){return Ie()},get playPrevChapter(){return Ye()},firstStart:ne,get showEndScreen(){return Pe()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return Le()},get videoContainer(){return r(Ze)},set videoContainer(zt){D(Ze,pe(zt))},get keyboardControls(){return Re()},set keyboardControls(zt){Re(zt)}})};V(cn,z=>{X()?z(zo):z(qo,!1)})}g(ro),b(t,ro);var fo=U({initVideo:je,play:Xe,pause:Ee,setMuted:ct,setVolume:Nt,seekTime:Gt,seekEpisodeStartTime:Xt,returnFocusToEpisodes:pi,setPlaybackRate:Ki,setAutoQualityLimits:Uo,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 c()},set uiConfig(z){c(z)},get title(){return u()},set title(z){u(z)},get thumbUrl(){return _()},set thumbUrl(z){_(z)},get interactiveContainer(){return p()},set interactiveContainer(z){p(z)},get interactiveController(){return y()},set interactiveController(z){y(z)},get subtitles(){return x()},set subtitles(z){x(z)},get live(){return w()},set live(z){w(z)},get preload(){return S()},set preload(z){S(z)},get autoplay(){return I()},set autoplay(z){I(z)},get volume(){return L()},set volume(z){L(z)},get muted(){return A()},set muted(z){A(z)},get fromTime(){return P()},set fromTime(z){P(z)},get canRewindLive(){return T()},set canRewindLive(z){T(z)},get showAds(){return N()},set showAds(z){N(z)},get adsSlotId(){return Q()},set adsSlotId(z){Q(z)},get adsParams(){return G()},set adsParams(z){G(z)},get adsPreviewParam(){return ee()},set adsPreviewParam(z){ee(z)},get adsAutoplayParam(){return ie()},set adsAutoplayParam(z){ie(z)},get duration(){return oe()},set duration(z){oe(z)},get logoClickable(){return te()},set logoClickable(z){te(z)},get logoHidden(){return ge()},set logoHidden(z){ge(z)},get isMobile(){return X()},set isMobile(z){X(z)},get showNextPrevButtons(){return Le()},set showNextPrevButtons(z){Le(z)},get nextButtonActive(){return Ae()},set nextButtonActive(z){Ae(z)},get prevButtonActive(){return se()},set prevButtonActive(z){se(z)},get endScreenVideoTitle(){return He()},set endScreenVideoTitle(z){He(z)},get endScreenVideoThumb(){return j()},set endScreenVideoThumb(z){j(z)},get isOneVideoPlaylist(){return B()},set isOneVideoPlaylist(z){B(z)},get supportLink(){return Ve()},set supportLink(z){Ve(z)},get shadowRootContainer(){return _e()},set shadowRootContainer(z){_e(z)},get outerContainerRef(){return Ce()},set outerContainerRef(z){Ce(z)},get fullScreenTarget(){return Be()},set fullScreenTarget(z){Be(z)},get failoverHosts(){return ce()},set failoverHosts(z){ce(z)},get showMiniTimer(){return R()},set showMiniTimer(z){R(z)},get saveRate(){return be()},set saveRate(z){be(z)},get showAutoplayNext(){return ke()},set showAutoplayNext(z){ke(z)},get seekToInteractive(){return Ie()},set seekToInteractive(z){Ie(z)},get playPrevChapter(){return Ye()},set playPrevChapter(z){Ye(z)},get volumeMultiplier(){return Ke()},set volumeMultiplier(z){Ke(z)},get showEndScreen(){return Pe()},set showEndScreen(z){Pe(z)},get keyboardControls(){return Re()},set keyboardControls(z){Re(z)}});return o(),fo}var p3=me('<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 Lm(t,e){let i=xe(e,["$$slots","$$events","$$legacy","children"]);var o=p3();let n;var a=h(o);de(a,()=>e.children??J),fe(),g(o),C(()=>n=he(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 Vm(t,e){let i=v(e,"isWhite",3,!1),o=m(()=>i()?"color: #fff;":"color: #909499;");Lm(t,{get style(){return r(o)}})}var f3=M('<div class="title svelte-1y9fytq"> </div>'),m3=M('<div class="playerStub svelte-1y9fytq"><!> <!></div>'),v3={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 Rm(t,e){K(t,v3);var i=m3(),o=h(i);{var n=d=>{var l=f3(),c=h(l,!0);g(l),C(()=>le(c,e.title)),b(d,l)};V(o,d=>{e.title&&d(n)})}var a=E(o,2);{var s=d=>{let l=m(()=>!!e.thumbUrl);Vm(d,{get isWhite(){return r(l)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(s)})}g(i),C(()=>it(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var w1=require("@vkontakte/videoplayer-shared"),Ei=require("@vkontakte/videoplayer-shared"),Vd=require("@vkontakte/videoplayer-core"),S1=require("@vkontakte/videoplayer-statistics");var iu=require("@vkontakte/videoplayer-shared"),tu=class{constructor(){this.subscription=new iu.Subscription,this.logger=new iu.Logger,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){if(this.isSupported())for(let[i,o]of e)try{navigator.mediaSession.setActionHandler?.(i,o)}catch{throw new Error(`The media session action "${i}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{let o=ve(e.state.currentPlaybackRate$),n=ve(e.state.duration$);if(!(!isFinite(i)||!isFinite(n)))try{navigator.mediaSession.setPositionState?.({position:i,playbackRate:o,duration:n})}catch{this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${n}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};var js=require("@vkontakte/videoplayer-shared");var g3=me('<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 Bm(t,e){let i=xe(e,["$$slots","$$events","$$legacy","children"]);var o=g3();let n;var a=h(o);de(a,()=>e.children??J),fe(),g(o),C(()=>n=he(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 h3=M('<div><div><!></div> <span class="title svelte-1pbsod4"> </span></div>'),_3={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 Nm(t,e){F(e,!0),K(t,_3);let[i,o]=Oe(),n=()=>$(c,"$interfaceLanguage$",i),a=()=>$(u,"$isMobile$",i),s=ye(),d=Bt(),l=!!s.webApi.pictureInPictureApi,c=s.interfaceLanguage$,u=s.ui.isMobile,_=s.ui.t,p=m(()=>n()&&_("pip_dummy_title")),y=eu(d.view);var x=h3();Z(x,1,"player-pip-dummy svelte-1pbsod4",null,{},{"is-pip-api":l}),it(x,y);var w=h(x);let S;var I=h(w);Bm(I,{}),g(w);var L=E(w,2),A=h(L,!0);g(L),g(x),C(P=>{S=Z(w,1,"dummy-image svelte-1pbsod4",null,S,P),le(A,r(p))},[()=>({desktop:!a()})]),b(t,x),U(),o()}var b3=460,$3=280,kd=class{playerDomElement;playerParentShadowRoot;playerDummyElement;svelteContext;pipWindow;info={isActive$:new js.ValueSubject(!1),isEnabled$:new js.ValueSubject(!1),type:1};constructor({enabled:e=!0}={enabled:!0}){this.info.isEnabled$=new js.ValueSubject(e)}isSupported(){let{isEmbed:e}=(0,js.detectEmbed)();return"documentPictureInPicture"in window&&!e}isActive(){return this.isSupported()&&!!documentPictureInPicture.window}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}async request(){if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:b3,height:$3,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let e=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(d=>d.cssText).join(" ")).filter(Boolean).join(`
|
|
364
364
|
`),i=document.createElement("style");i.textContent=e;let o=this.createStretchedContainer(),n=o.attachShadow({mode:"open"});n.append(i),n.append(this.playerDomElement);let a={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=Gr(Nm,a),this.pipWindow?.document.body.append(o),this.info.isActive$.next(!0),this.pipWindow?.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Va(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1))})}async remove(){return new Promise(e=>{documentPictureInPicture.window?.close(),e()})}async dispose(){await this.remove()}setEnabled(e){this.info.isEnabled$.next(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function g1(t){return t instanceof kd}var ou=class{static getLatestSupportedVersion(e){let i=new Ua,o=new kd(e);if(o.isSupported())return o;if(i.isSupported())return i}};function nu(t,e){let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let n of i)o[n]=e[n]??t[n]??void 0;return o}var h1="Inner error. Unexpectedly root annotation container null reference exception",_1="Annotation with such name already exists",b1="Annotation with such name does not exist";var Ys=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};var Zs=require("@vkontakte/videoplayer-shared"),y3="1",x3=100,ru=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new Zs.Subscription}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=(0,Zs.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"},x3);this.subscriptions.add((0,Zs.observeElementSize)(this.rootAnnotationsContainer).subscribe(({width:o,height:n})=>{this.playerSize={width:o,height:n},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){if(!this.rootAnnotationsContainer)throw new Ys(h1);if(this.annotations.has(e))throw new Ys(_1);i.style.zIndex=i.style.zIndex??y3,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 Ys(b1);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){this.annotations.clear(),this.subscriptions.unsubscribe(),this.mutationObserver?.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let n=e.offsetTop,a=e.offsetLeft,s=e.offsetWidth,d=e.offsetHeight;return n<0||a<0||a+s>i||n+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};var ss=require("@vkontakte/videoplayer-shared"),xo=class{init({store:e,microStores:i,interactiveController:o,config:n}){return(0,ss.assertNonNullable)(e),(0,ss.assertNonNullable)(i),(0,ss.assertNonNullable)(n),n.interactiveData&&(0,ss.assertNonNullable)(o),this.subscription=new ss.Subscription,this.subscription}};var Td=class extends xo{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 Id=class extends xo{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:c,isMobile:u}=a.ui,_=ve(u),p=()=>_&&ve(c);return o.add(c.subscribe(y=>{if(!_)return;let x=ve(s);ve(l)?this.state$.set(y):x!==null&&this.state$.set(!x||y)})),o.add(l.subscribe(y=>{this.state$.set(!y||p())})),o.add(s.subscribe(y=>{if(y===null)return;let x=ve(d);if(p()){this.state$.set(!0);return}x&&this.state$.set(!y)})),o}};var Ed=class extends xo{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 $1=require("@vkontakte/videoplayer-shared"),Dm=ae(!1),au=null,Ad=class extends xo{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Dm,set:(i,o=!1)=>{i!==ve(Dm)&&(this.clearTimeout(),Dm.set(i),!i&&au&&(au=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()}}init(i){let o=super.init(i),{store:n,config:a}=i,{isInteractiveTime$:s,isPlaying$:d}=n.state,l=n.ui.controlsVisible,{interactiveTimeIndicator:c}=n.ui.controls;o.add(l.subscribe(_=>{ve(s)&&_&&this.state$.set(!1)}));let u=a?.interactiveData||{tooltipHelpHintActive:!1};return o.add((0,$1.combine)({isPlaying$:d,isInteractiveTime$:s,interactiveTimeIndicator:c}).subscribe(({isPlaying$:_,isInteractiveTime$:p,interactiveTimeIndicator:y})=>{if(!(!_||!y?.isDisplayed)){if(!p)return this.state$.set(!1);u.tooltipHelpHintActive&&au===null&&(au=!0,u.tooltipHelpHintActive=!1,this.state$.set(!0),n.callbacks?.onInteractiveTimeIndicatorHintDeactivated?.())}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};var su=require("@vkontakte/videoplayer-shared");var Pd=class extends xo{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...ae(null),toggle:su.noop};this.checkIfShouldHide=i=>ha(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(ve(s)))return;let l=ve(this.state$),{isEnded$:c,playbackState$:u}=n.state,{disabledControls$:_}=n.ui.controls,p=ve(c),y=ve(u);if(l)try{await a?.toggleGraphView(!1),this.state$.set(!1),_.remove(pp),!p&&this.graphMadePause&&n.actions.internal.play()}catch{d({message:"Cant hide graph"})}else{this.graphMadePause=y==="playing";try{await a?.toggleGraphView(!0),this.state$.set(!0),_.add(pp),!p&&this.graphMadePause&&n.actions.internal.pause()}catch{d({message:"Cant show graph"})}}},o.add((0,su.combine)({graphIsOpened:this.state$,currentGridType:s}).subscribe(async({graphIsOpened:l,currentGridType:c})=>{if(this.checkIfShouldHide(c)&&l)try{await a?.toggleGraphView(!1),this.state$.set(!1)}catch{d({message:"Cant hide graph"})}})),o}};var Om=require("@vkontakte/videoplayer-shared"),Md=class extends xo{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 Om.ValueSubject(!1),isEnabled$:new Om.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 du=require("@vkontakte/videoplayer-shared");var lu=require("@vkontakte/videoplayer-shared"),y1=({maxShowCount:t,timeout:e})=>{let i=[t!==0?w3({maxCount:t}):void 0,e!==0?S3({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(n=>n.notificationShowed(o)),canShowNotification:o=>i.every(n=>n.canShowNotification(o))}},w3=({maxCount:t})=>{let e={};return{notificationShowed:i=>{e[i]=(e[i]??0)+1,lu.safeStorage.set("videoplayer_notifications_manager_count",JSON.stringify(e[i]??0))},canShowNotification:i=>(e[i]??0)<t}},S3=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(lu.safeStorage.get(e)||"{}")}catch{return{}}},o=a=>lu.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 Ld=class extends xo{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 c=n.getPlayer();return o.add(c.events.severeStallOccured$.pipe((0,du.filterChanged)(),(0,du.filter)(u=>u)).subscribe(()=>{d&&!c.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(l&&n.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var x1=()=>[Td,Id,Ed,Ad,Pd,Md,Ld].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});var Xs=require("@vkontakte/videoplayer-shared");var C3={preload:!0,autoplay:!1,repeat:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Ei.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:(0,Vd.isMobile)(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},ln=Y(void 0),cu=class extends HTMLElement{svelteStubComponent;svelteRootComponent;store;microStoresRoot;statistics;sentry;_shadowRoot;playerContainer;rootContainer;shadowRootContainer;uiConfig;coreConfig;statisticsConfig;interactiveController;interactiveContainer;graphMadePause;currentPlayingVideoIndex=0;needToRepeatPlaylist=!1;videoConfig=void 0;pictureInPictureApi=void 0;mediaSessionApi=void 0;unsubscribePlayerPhaseSubscription=void 0;logger;log;subscription;interactiveSubscription;annotationsApi=void 0;slotsApi;prevIsid=void 0;isInited=!1;internalsExposure=null;constructor(){super(),Xs.devNull.create("ui"),this.logger=new Ei.Logger,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Ei.Subscription,this.interactiveSubscription=new Ei.Subscription,this.graphMadePause=!1}connectedCallback(){if(this.isInited)return;this.initPlayerRootContainers();let e=this.getAttribute("stub-title")??void 0,i=this.getAttribute("stub-thumb-url")??void 0,o=pe({title:e,thumbUrl:i}),n={target:this.playerContainer,props:o};this.svelteStubComponent=Gr(Rm,n)}disconnectedCallback(){this.annotationsApi?.destroy(),this.mediaSessionApi?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.subscription.unsubscribe(),this.unsubscribePlayerPhaseSubscription?.(),this.interactiveController?.destroy(),this.interactiveSubscription.unsubscribe(),this.internalsExposure?.destroy(),Xs.devNull.destroy("ui")}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.append(this.rootContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){return this.store?.ui.controls.disabledControls$?.includes(e)||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createOneStat=(e,i={})=>{let{albumId:o,statPlace:n,statUserSalt:a,statTrackCode:s,statVKAppId:d,refreshStatAuthToken:l,autoplay:c,isMobile:u,isTouch:_,refDomain:p,deviceId:y,interactiveData:x}=nu(this.videoConfig,i),w=x?.projectInfo?.pid,S=this.interactiveController?.state.isReplay$.getValue()??!1;S&&(this.prevIsid=void 0);let{unitedVideoId:I,isClip:L=!1}=e;if(this.uiConfig.features.statistics&&I)return new S1.OneStat({movieId:I,albumId:o,place:n,trackCode:s,vkAppId:d,autoplay:(c&&!this.interactiveController)??!1,mobile:_??u,clip:L,refDomain:p,deviceId:y,...w&&(!this.isInited||S)&&{projectId:Number(w)}},{refreshAuthToken:l,userSalt:a,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})};createPlayer(e,i={},o){if(!this.videoConfig)return;let{albumId:n,statPlace:a,statAuthToken:s,preload:d,autoplay:l,volume:c,muted:u,fromTime:_,canRewindLive:p,supportLink:y,showAds:x,adsSlotId:w,adsParams:S={},adsPreviewParam:I,adsAutoplayParam:L,interfaceLanguage:A,isCyrillicRelatedInterface:P,logoClickable:T,logoHidden:N,isMobile:Q,isTouch:G,isAudioDisabled:ee,isLiveCatchUpMode:ie,fullScreenTarget:oe,failoverHosts:te,canDownload:ge,callbacks:X,interactiveData:Le,showThumbTimer:Ae,additionalButtons:se=[],additionalSettingsMenuItems:He=[],additionalContextMenuItems:j=[],repeat:B,saveRate:Ve,volumeMultiplier:_e,showEndScreen:Ce,showAutoplayNext:Be}=nu(this.videoConfig,i),{sources:ce,title:R,thumbUrl:be,unitedVideoId:Ie,isClip:Ye=!1,duration:Ke,adsParams:ke={},videoEpisodes:Pe,previewThumbsData:Re,subtitles:ut,live:_t}=e,nt={...S,...ke},It=this.getNextVideoInfo(),rt={sources:ce,title:R,thumbUrl:be,subtitles:ut,unitedVideoId:Ie,isClip:Ye,live:_t,albumId:n,statPlace:a,autoplay:l,muted:u,volume:c,fromTime:_,canRewindLive:p,showAds:x,adsSlotId:w,adsParams:nt,adsPreviewParam:I,adsAutoplayParam:L,duration:Ke,logoClickable:T,logoHidden:N,isTouch:G??Q,repeat:B,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:It.nextVideoTitle,endScreenVideoThumb:It.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},pt={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi};this.log({message:`create player, props: ${JSON.stringify(rt)}`});let Pt=this.interactiveController?.state.statistics$.getValue(),we=Pt?.oneStat||this.createOneStat(e,i);we&&(this.statistics=new Fc(we,Pt?.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Fa(this.uiConfig.sentry,{version:Da,env:mc},{movieId:Ie,albumId:n,place:a,autoplay:(l&&!this.interactiveController)??!1,mobile:G??Q,clip:Ye}),this.interactiveController&&(this.prevIsid??=this.statistics?.oneStat.isid$.getValue()),this.sentry={...this.sentry,...Fa.getInstance()};let Ze=!!Le,q=[],re="tooltip_interactive_go_back_disabled_first";if(Ze&&this.interactiveController){let wt=this.interactiveController.state.isInitialChapter$.getValue(),We=this.interactiveController.getHistoryState();wt&&q.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||q.push("SEEK_TO_INTERACTIVE_BUTTON"),We.hasPrevChapter$.getValue()||(q.push("PLAY_PREV_CHAPTER_BUTTON"),wt||(We.isGoBackLimited$.getValue()?re="tooltip_interactive_go_back_disabled_limit":re="tooltip_interactive_go_back_disabled"))}let ne=()=>{this.isInited=!1,this.prevIsid=void 0;let wt=o?.info.isEnded$.getValue()&&this.interactiveController?.state.isEndChapter$.getValue();X.onReplayInteractiveVideo&&!wt?X.onReplayInteractiveVideo():this.replayInteractiveVideo()};this.store=Dh({player:o,interfaceLanguage:A,isCyrillicRelatedInterface:P,videoId:Ie,isClip:Ye,isLiveCatchUpMode:ie,isAudioDisabled:ee,statAuthToken:s,callbacks:X,webApi:pt,videoEpisodes:Pe,previewThumbsData:Re,canDownload:ge,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:q,isInteractive:Ze,saveRate:Ve,interactiveRanges$:this.interactiveController?.state.interactiveRanges$,isInteractiveTime$:this.interactiveController?.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ne,playPrevChapterDisabledTooltip:re,hasInteractiveBranches:!!this.interactiveController?.getChapterBranches()?.length,additionalButtons:this.uiConfig.features.additionalButtons?se:[],additionalSettingsMenuItems:He??[],additionalContextMenuItems:j??[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),looped:B&&this.videoConfig.videos.length===1,statistics:this.statistics,internalsExposure:this.internalsExposure});let{stores:Fe}=this.microStoresRoot=x1(),je=()=>{if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(We=>X?.onCurrentFormatChanged?.(We))),this.subscription.add(Fe.interactiveControlsOpacity$.subscribe(We=>{We!==null&&this?.interactiveController?.setDisabledControls(We)})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(We=>X?.onThroughputEstimationChanged?.(We))),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(We=>X?.onTrafficSavingEnabledChanged?.(We))),this.subscription.add(new Ei.Observable(We=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Xe=>We.next(Xe)))}).pipe(this.uiConfig.features.skipInitialPlaybackRateValue?(0,Ei.skip)(1):We=>We).subscribe(We=>X?.onCurrentPlaybackRateChanged?.(We))),this.subscription.add(this.store.state.volume$.subscribe(We=>X?.onVolumeChange?.(We))),this.subscription.add(this.store.state.muted$.subscribe(We=>We?X?.onMute?.():X?.onUnmute?.())),this.subscription.add(this.store.state.videoBitrate$.subscribe(We=>X?.onVideoBitrateChanged?.(We))),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(We=>{let Xe=this.store?.ui.controls.disabledControls$;Xe&&(We&&!Xe.includes(Pl)&&Xe.add(Pl),We||Xe.remove(Pl))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async We=>{if(!Vd.clientChecker.browser.isSamsungBrowser||!We||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter(this.videoConfig?.callbacks.onExternalFullscreenExit)})),this.statistics&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(We=>X?.onVSIDChanged?.(We))),this.initMediaSession(),D(ln,pe({interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ce,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:R,thumbUrl:be,subtitles:ut,live:_t,preload:d,autoplay:l,muted:u,volume:c,fromTime:_,canRewindLive:p,supportLink:y,showAds:x,adsSlotId:w,adsParams:nt,adsPreviewParam:I,adsAutoplayParam:L,duration:Ke,logoClickable:T,logoHidden:N,isMobile:G??Q,failoverHosts:te,fullScreenTarget:oe,saveRate:Ve,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Ae,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:It.nextVideoTitle,endScreenVideoThumb:It.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:_e,showEndScreen:Ce,showAutoplayNext:Be}));let wt={target:this.playerContainer,props:r(ln)};this.svelteRootComponent=Gr(Mm,wt),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,this.videoConfig?.callbacks?.onInited?.()),this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&this.videoConfig?.callbacks?.onDevNullLog?Xs.devNull.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Xs.devNull.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Vd.clientChecker.isInited$.subscribe(wt=>{wt&&(console.log("UI SDK async start"),je())}):je()}addPlayerInfoSubscriptions(){let e=this.store,i=this.microStoresRoot?.stores;if(!e||!i)return;let o=this.videoConfig?.callbacks;o&&this.subscription.add(e.playerPhase.subscribe(a=>o.onPlayerPhaseChanged?.(a))).add(e.state.playbackState$.subscribe(a=>a&&o.onPlaybackStateChanged?.(a))).add(e.state.isLive$.subscribe(a=>o.onIsLiveChanged?.(a))).add(e.state.isActiveLive$.subscribe(a=>o.onIsActiveLiveChanged?.(a))).add(e.state.isAudioAvailable$.subscribe(a=>o.onIsAudioAvailableChanged?.(a))).add(e.state.currentQuality$.subscribe(a=>o.onCurrentQualityChanged?.(a))).add(e.state.availableQualities$.subscribe(a=>o.onAvailableQualitiesChanged?.(a.map(({value:s})=>s).filter(s=>s!=="auto")))).add(e.state.availableAudioStreams$.subscribe(a=>{a.length>1&&o.onAudioLanguagesAvailable&&o.onAudioLanguagesAvailable()})).add(i.pictureInPicture$.isActive$.subscribe(a=>a?o.onPiPEnter?.():o.onPiPExit?.()));let n=o?.uiInfo;n&&this.subscription.add(e.ui.controlsVisible.subscribe(a=>n.onControlsVisibleChanged?.(a))).add(e.ui.isMobile.subscribe(a=>n.onIsMobileChanged?.(a))).add(e.ui.playerSize.subscribe(a=>n.onPlayerSizeChanged?.(a))).add(e.ui.controls.prevButton.subscribe(a=>n.onPrevButtonChanged?.(a))).add(e.ui.controls.playButton.subscribe(a=>n.onPlayButtonChanged?.(a))).add(e.ui.controls.replayButton.subscribe(a=>n.onReplayButtonChanged?.(a))).add(e.ui.controls.nextButton.subscribe(a=>n.onNextButtonChanged?.(a))).add(e.ui.controls.playPrevChapterButton.subscribe(a=>n.onPlayPrevChapterChanged?.(a))).add(e.ui.controls.seekToInteractiveButton.subscribe(a=>n.onSeekToInteractiveButtonChanged?.(a))).add(e.ui.controls.interactiveGraphButton.subscribe(a=>n.onGraphButtonChanged?.(a))).add(e.ui.controls.liveButton.subscribe(a=>n.onLiveButtonChanged?.(a))).add(e.ui.controls.time.subscribe(a=>n.onTimeUpdateChanged?.(a))).add(e.ui.controls.episodes.subscribe(a=>n.onEpisodesChanged?.(a))).add(e.ui.controls.subtitles.subscribe(a=>n.onSubtitlesChanged?.(a))).add(e.ui.controls.settings.subscribe(a=>n.onSettingsChanged?.(a))).add(e.ui.controls.fullscreen.subscribe(a=>n.onFullscreenChanged?.(a))).add(e.ui.controls.chromecast.subscribe(a=>n.onChromecastChanged?.(a))).add(e.ui.controls.pip.subscribe(a=>n.onPipChanged?.(a))).add(e.ui.controls.vkLogo.subscribe(a=>n.onVkLogoChanged?.(a))).add(e.ui.controls.interactiveTimeIndicator.subscribe(a=>n.onInteractiveTimeIndicatorChanged?.(a))).add(e.ui.controls.timeline.subscribe(a=>n.onTimelineChanged?.(a)))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){if(!this.videoConfig)return;let o=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!o){this.log({message:"no next video"});return}this.isInited&&(0,Ei.isNonNullable)(o.unitedVideoId)&&this.store.actions.internal.nextMovie(o.unitedVideoId),this.unmountComponent(this.svelteRootComponent),this.createPlayer(o,{autoplay:i,fromTime:0},e)}playPrevChapter(){this.interactiveController?.playPrevChapter()}seekToInteractive(){let e=this.interactiveController?.getNextInteractiveStartTime();typeof e=="number"&&this.seekTime(e/1e3)}async initInteractives(){if(this.videoConfig?.interactiveData)try{let{Interactives:e}=await import("@vkontakte/videoplayer-interactive");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let i=this.store?.interfaceLanguage$,o=i?ve(i):this.videoConfig.interfaceLanguage,{projectInfo:n,initChapterId:a,historyApi:s,videoLoader:d}=this.videoConfig.interactiveData;this.interactiveController=new e({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:o,graph:this.uiConfig.features.interactiveGraph,projectInfo:n,initChapterId:a,historyApi:s,vkVideoLoader:d,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation}});let{isInteractiveExpectation$:l,isSeekable$:c}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(c.subscribe(_=>{if(!this.isInited)return;let p=this.store;_?p.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):p.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(l.subscribe(_=>{this.store&&this.store.state.isInteractiveExpectation$.set(_)}));let u=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(_=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={..._.config,title:n?.title||_.config.title};let p=u?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(_.player,p),u&&(u=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:_,actionType:p})=>{if(!this.store||!this.microStoresRoot)return;let y=l.getValue();if(_==="action-choice"&&p==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Ml)),_==="action-choice-canceled"){let x=ve(this.store.state.isPlaying$)||y;if((this.videoConfig?.isTouch??this.videoConfig?.isMobile)&&x){this.store.ui.interactiveHideMobileControls.set(!0);return}this.videoConfig?.callbacks.onDisabledInteractiveClick?.()}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:_,removeAllOpenURI:p})=>{this.store&&_==="container-fake-removed"&&p&&this.store.ui.controls.disabledControls$.remove(Ml)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),this.videoConfig?.callbacks?.onInteractiveHistoryChanged){let _=this.interactiveController.getHistoryState();this.subscription.add(_.history$.subscribe(p=>{p.length&&this.videoConfig?.callbacks?.onInteractiveHistoryChanged?.(p)}))}this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{this.microStoresRoot?.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),this.videoConfig?.callbacks.onInteractiveTimeIndicatorClick?.()})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(_=>{this.log({message:_.toString()})}))}catch(e){this.log({message:e.message})}}initPlayer(e,i={}){if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData)throw new Error("empty videos");if(this.videoConfig=nu(C3,(0,Ei.cloneDeepWith)(e,o=>o instanceof HTMLElement?o:void 0)),this.uiConfig=_g(i.ui??{}),this.coreConfig=i.core??{configName:[]},this.statisticsConfig=i.statistics??{},this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer.style.minHeight="unset",this.style.display="block",this.style.width="100%",this.style.height="100%"),this.sentry={config:this.uiConfig.sentry??{}},this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new Ei.InternalsExposure("UI")),Xs.devNull.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+this.videoConfig?.showAds],numbers:[(0,w1.now)()]}),(0,Ei.isNonNullable)(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=this.uiConfig.features.mediaSession??this.videoConfig.isMediaSessionEnabled??!0),(0,Ei.isNonNullable)(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=this.uiConfig.features.pip??this.videoConfig.isPictureInPictureEnabled??!0,this.uiConfig.features.dpip=this.uiConfig.features.dpip??this.videoConfig.isPictureInPictureEnabled??!0),this.videoConfig.isTouch=this.uiConfig.isMobile??this.videoConfig.isTouch??this.videoConfig.isMobile,this.videoConfig.autoplay&&=this.uiConfig.features.autoplay,this.videoConfig.showAds=this.uiConfig.ads.enable??this.videoConfig.showAds,this.videoConfig.adsSlotId=this.uiConfig.ads.slot??this.videoConfig.adsSlotId,this.videoConfig.adsPreviewParam=this.uiConfig.ads.preview??this.videoConfig.adsPreviewParam,this.videoConfig.logoHidden=!(this.uiConfig.showLogo??!this.videoConfig.logoHidden),this.videoConfig.canRewindLive&&=this.uiConfig.features.liveRewind,this.videoConfig.supportLink=this.videoConfig.supportLink??this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen??this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext??this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons??this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&this.videoConfig.videos?.[this.videoConfig.videoIndex]?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let o={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=ou.getLatestSupportedVersion(o):this.pictureInPictureApi=new Ua(o)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new tu:void 0,this.slotsApi=this.uiConfig.features.slots?new Zc:void 0,this.annotationsApi=this.uiConfig.features.annotations?new ru(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.slotsApi?.init(this.shadowRootContainer),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveSubscription.unsubscribe()),this.videoConfig.interactiveData?this.initInteractives():this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex]),g1(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(ln)&&(r(ln).showNextPrevButtons=this.needToShowNextPrevButtons(),r(ln).nextButtonActive=this.isNextButtonActive(),r(ln).prevButtonActive=this.isPrevButtonActive(),r(ln).endScreenVideoTitle=o.nextVideoTitle,r(ln).endScreenVideoThumb=o.nextVideoThumb,r(ln).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){this.mediaSessionApi&&(this.unsubscribePlayerPhaseSubscription?.(),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=this.store?.playerPhase.subscribe(e=>{e==="video"?this.setupMediaSessionForVideo():e==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}={...this.videoConfig.videos[this.currentPlayingVideoIndex]},o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",n=>this.seekTime(n.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>this.playNextVideo()]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>this.playPrevVideo()])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="\u0420\u0435\u043A\u043B\u0430\u043C\u0430",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}play(){this.isControlDisabled("PLAY_BUTTON")||this.store?.playerPhase.is("LiveWaitingStart")||this.store?.playerPhase.is("LiveWaitingRecover")||this.store?.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),this.svelteRootComponent?.play())}pause(){this.log({message:"pause"}),this.svelteRootComponent?.pause()}stop(){if(!this.videoConfig)return;this.log({message:"stop"});let e=!!this.interactiveController;e&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),this.mediaSessionApi?.destroy();let i=this.videoConfig.videos[0];i&&(this.unmountComponent(this.svelteRootComponent),e?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(i))}setMuted(e){this.log({message:`set muted, muted: ${e}`}),this.svelteRootComponent?.setMuted(e)}setPiPEnabled(e){this.store?.webApi.pictureInPictureApi?.setEnabled(e)}setVolume(e){this.log({message:`set volume, volume: ${e}`}),this.svelteRootComponent?.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,r(ln)&&(r(ln).needToRepeatPlaylist=this.needToRepeatPlaylist,r(ln).showNextPrevButtons=this.needToShowNextPrevButtons(),r(ln).nextButtonActive=this.isNextButtonActive(),r(ln).prevButtonActive=this.isPrevButtonActive())}seekTime(e){this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),this.svelteRootComponent?.seekTime(e))}seekEpisodeStartTime(e){this.log({message:`seek episode start time, time: ${e}`}),this.svelteRootComponent?.seekEpisodeStartTime(e)}returnFocusToEpisodes(){this.log({message:"return focus to episodes button"}),this.svelteRootComponent?.returnFocusToEpisodes()}setPlaybackRate(e){this.log({message:`set playback rate to: ${e}`}),this.svelteRootComponent?.setPlaybackRate(e)}setAutoQualityLimits(e){this.log({message:`set auto quality limitation. Max: ${e.max??"none"}. Min: ${e.min??"none"}`}),this.svelteRootComponent?.setAutoQualityLimits(e)}addLanguage(e){this.store?.actions.internal.addLanguage(e)}async setLanguage(e){await this.store?.actions.internal.setLanguage(e)}setLiveStart(e){this.log({message:"live started"}),this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0})}setLiveWaitingRecover(){this.log({message:"live waiting"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0),this.store?.destroy()})}setLiveWaitingRecord(){this.log({message:"post live"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0),this.store?.destroy()})}setLiveEnd(e){this.log({message:"live ended"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})})}setLiveLowLatency(e){this.log({message:"live switch to low latency "+e}),this.store?.actions.external.setLiveLowLatency(e)}getDeviceId(){return this.statistics?.oneStat.getDeviceId()??void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}async replayInteractiveChapter(e){if(this.interactiveController&&this.store?.state.positionExact$){let i=ve(this.store.state.positionExact$),n=ve(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe((0,Ei.once)()).subscribe(()=>{n&&i>=n.time?this.seekTime(n.time):this.seekTime(i),e?.()});let a=this.interactiveController.getCurrentChapter();await this.interactiveController.setChapter({chapterId:a?.chapter?.id,pushToHistory:!1})}}showInteractiveIndicatorTooltip(e,i=!1){this.microStoresRoot?.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){this.store?.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){this.store?.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){this.store?.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){this.store?.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){this.store?.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){this.store?.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){this.store?.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){this.store?.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){this.store?.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){this.store?.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&this.statistics.oneStat.updateContext(e)}handleTimerNextVideo(e){this.store?.actions.internal.setTimerNextVideoRunning(e)}focus(){this.svelteRootComponent?.keyboardControls?.focus?.()}unmountComponent(e){e&&Va(e)}};var Js=require("@vkontakte/videoplayer-shared"),uu=require("@vkontakte/videoplayer-core"),k3=()=>{window.customElements.define("vk-video-player",cu)};
|