@vkontakte/videoplayer 1.1.40-beta.0 → 1.1.40
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 +4 -4
- package/es2015.esm.js +4 -4
- package/es2018.cjs.js +4 -4
- package/es2018.esm.js +4 -4
- package/esnext.cjs.js +4 -4
- package/esnext.esm.js +4 -4
- package/evergreen.esm.js +4 -4
- package/package.json +5 -5
package/es2015.cjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.1.40
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer v1.1.40
|
|
3
|
+
* Mon, 26 Aug 2024 13:14:33 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-40/doc/
|
|
5
5
|
*/
|
|
6
|
-
"use strict";var Y_=Object.create;var Fl=Object.defineProperty,Z_=Object.defineProperties,X_=Object.getOwnPropertyDescriptor,J_=Object.getOwnPropertyDescriptors,x_=Object.getOwnPropertyNames,Wf=Object.getOwnPropertySymbols,$_=Object.getPrototypeOf,Gf=Object.prototype.hasOwnProperty,eh=Object.prototype.propertyIsEnumerable;var As=(i,e,t)=>e in i?Fl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,rt=(i,e)=>{for(var t in e||(e={}))Gf.call(e,t)&&As(i,t,e[t]);if(Wf)for(var t of Wf(e))eh.call(e,t)&&As(i,t,e[t]);return i},Nt=(i,e)=>Z_(i,J_(e));var th=(i,e)=>{for(var t in e)Fl(i,t,{get:e[t],enumerable:!0})},Qf=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of x_(e))!Gf.call(i,o)&&o!==t&&Fl(i,o,{get:()=>e[o],enumerable:!(n=X_(e,o))||n.enumerable});return i};var Ms=(i,e,t)=>(t=i!=null?Y_($_(i)):{},Qf(e||!i||!i.__esModule?Fl(t,"default",{value:i,enumerable:!0}):t,i)),ih=i=>Qf(Fl({},"__esModule",{value:!0}),i);var Qi=(i,e,t)=>As(i,typeof e!="symbol"?e+"":e,t);var ft=(i,e,t)=>new Promise((n,o)=>{var r=s=>{try{a(t.next(s))}catch(u){o(u)}},l=s=>{try{a(t.throw(s))}catch(u){o(u)}},a=s=>s.done?n(s.value):Promise.resolve(s.value).then(r,l);a((t=t.apply(i,e)).next())});var t8={};th(t8,{GridTypes:()=>go,InterfaceLanguage:()=>Bl.InterfaceLanguage,VERSION:()=>Oo,VKNumericLanguage:()=>Bl.VKNumericLanguage,VideoFormat:()=>Es.VideoFormat,VideoQuality:()=>Es.VideoQuality,loadVKLangPack:()=>Bl.loadVKLangPack,registerPlayerWebComponent:()=>e8});module.exports=ih(t8);function Ce(){}function se(i,e){for(let t in e)i[t]=e[t];return i}function Vs(i){return i()}function sr(){return Object.create(null)}function nt(i){i.forEach(Vs)}function Vi(i){return typeof i=="function"}function H(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}var rr;function Rs(i,e){return i===e?!0:(rr||(rr=document.createElement("a")),rr.href=e,i===rr.href)}function Yf(i){return Object.keys(i).length===0}function Jt(i,...e){if(i==null){for(let n of e)n(void 0);return Ce}let t=i.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function et(i){let e;return Jt(i,t=>e=t)(),e}function F(i,e,t){i.$$.on_destroy.push(Jt(e,t))}function Ee(i,e,t,n){if(i){let o=Zf(i,e,t,n);return i[0](o)}}function Zf(i,e,t,n){return i[1]&&n?se(t.ctx.slice(),i[1](n(e))):t.ctx}function Le(i,e,t,n){if(i[2]&&n){let o=i[2](n(t));if(e.dirty===void 0)return o;if(typeof o=="object"){let r=[],l=Math.max(e.dirty.length,o.length);for(let a=0;a<l;a+=1)r[a]=e.dirty[a]|o[a];return r}return e.dirty|o}return e.dirty}function Ae(i,e,t,n,o,r){if(o){let l=Zf(e,t,n,r);i.p(l,o)}}function Me(i){if(i.ctx.length>32){let e=[],t=i.ctx.length/32;for(let n=0;n<t;n++)e[n]=-1;return e}return-1}function ye(i){let e={};for(let t in i)t[0]!=="$"&&(e[t]=i[t]);return e}function Xf(i){return i==null?"":i}var Ro=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;var ar=class i{constructor(e){Qi(this,"_listeners","WeakMap"in Ro?new WeakMap:void 0);Qi(this,"_observer");Qi(this,"options");this.options=e}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!=null?e:this._observer=new ResizeObserver(t=>{var n;for(let o of t)i.entries.set(o.target,o),(n=this._listeners.get(o.target))==null||n(o)})}};ar.entries="WeakMap"in Ro?new WeakMap:void 0;var Jf=!1;function xf(){Jf=!0}function $f(){Jf=!1}function p(i,e){i.appendChild(e)}function Te(i,e,t){let n=ec(i);if(!n.getElementById(e)){let o=T("style");o.id=e,o.textContent=t,lh(n,o)}}function ec(i){if(!i)return document;let e=i.getRootNode?i.getRootNode():i.ownerDocument;return e&&e.host?e:i.ownerDocument}function lh(i,e){return p(i.head||i,e),e.sheet}function S(i,e,t){i.insertBefore(e,t||null)}function C(i){i.parentNode&&i.parentNode.removeChild(i)}function Ri(i,e){for(let t=0;t<i.length;t+=1)i[t]&&i[t].d(e)}function T(i){return document.createElement(i)}function N(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Be(i){return document.createTextNode(i)}function D(){return Be(" ")}function ct(){return Be("")}function _e(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function zt(i){return function(e){return e.preventDefault(),i.call(this,e)}}function at(i){return function(e){return e.stopPropagation(),i.call(this,e)}}function f(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function we(i,e){for(let t in e)f(i,t,e[t])}function tc(i){return Array.from(i.childNodes)}function Ye(i,e){e=""+e,i.data!==e&&(i.data=e)}function wi(i,e,t,n){t==null?i.style.removeProperty(e):i.style.setProperty(e,t,n?"important":"")}var ur;function rh(){if(ur===void 0){ur=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){ur=!0}}return ur}function il(i,e){getComputedStyle(i).position==="static"&&(i.style.position="relative");let n=T("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;let o=rh(),r;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",r=_e(window,"message",l=>{l.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{r=_e(n.contentWindow,"resize",e),e()}),p(i,n),()=>{(o||r&&n.contentWindow)&&r(),C(n)}}function O(i,e,t){i.classList.toggle(e,!!t)}function ic(i){let e={};return i.childNodes.forEach(t=>{e[t.slot||"default"]=!0}),e}function Rn(i,e){return new i(e)}var ho;function so(i){ho=i}function nl(){if(!ho)throw new Error("Function called outside component initialization");return ho}function Ut(i){nl().$$.on_mount.push(i)}function Yn(i){nl().$$.on_destroy.push(i)}function ol(i,e){return nl().$$.context.set(i,e),e}function ll(i){return nl().$$.context.get(i)}function Hl(){return nl().$$.context}function qn(i,e){let t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}var Bo=[];var ge=[],sl=[],Ds=[],oc=Promise.resolve(),Ns=!1;function qs(){Ns||(Ns=!0,oc.then(fr))}function Zn(){return qs(),oc}function Xn(i){sl.push(i)}function Oe(i){Ds.push(i)}var Bs=new Set,rl=0;function fr(){if(rl!==0)return;let i=ho;do{try{for(;rl<Bo.length;){let e=Bo[rl];rl++,so(e),dh(e.$$)}}catch(e){throw Bo.length=0,rl=0,e}for(so(null),Bo.length=0,rl=0;ge.length;)ge.pop()();for(let e=0;e<sl.length;e+=1){let t=sl[e];Bs.has(t)||(Bs.add(t),t())}sl.length=0}while(Bo.length);for(;Ds.length;)Ds.pop()();Ns=!1,Bs.clear(),so(i)}function dh(i){if(i.fragment!==null){i.update(),nt(i.before_update);let e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(Xn)}}function lc(i){let e=[],t=[];sl.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),sl=e}var cr=new Set,Do;function ce(){Do={r:0,c:[],p:Do}}function de(){Do.r||nt(Do.c),Do=Do.p}function d(i,e){i&&i.i&&(cr.delete(i),i.i(e))}function _(i,e,t,n){if(i&&i.o){if(cr.has(i))return;cr.add(i),Do.c.push(()=>{cr.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function It(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function De(i,e){let t={},n={},o={$$scope:1},r=i.length;for(;r--;){let l=i[r],a=e[r];if(a){for(let s in l)s in a||(n[s]=1);for(let s in a)o[s]||(t[s]=a[s],o[s]=1);i[r]=a}else for(let s in l)o[s]=1}for(let l in n)l in t||(t[l]=void 0);return t}function rc(i){return typeof i=="object"&&i!==null?i:{}}var mh=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],ph=new Set([...mh]);function Fe(i,e,t){let n=i.$$.props[e];n!==void 0&&(i.$$.bound[n]=t,t(i.$$.ctx[n]))}function B(i){i&&i.c()}function V(i,e,t){let{fragment:n,after_update:o}=i.$$;n&&n.m(e,t),Xn(()=>{let r=i.$$.on_mount.map(Vs).filter(Vi);i.$$.on_destroy?i.$$.on_destroy.push(...r):nt(r),i.$$.on_mount=[]}),o.forEach(Xn)}function R(i,e){let t=i.$$;t.fragment!==null&&(lc(t.after_update),nt(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function hh(i,e){i.$$.dirty[0]===-1&&(Bo.push(i),qs(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function j(i,e,t,n,o,r,l=null,a=[-1]){let s=ho;so(i);let u=i.$$={fragment:null,ctx:[],props:r,update:Ce,not_equal:o,bound:sr(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(s?s.$$.context:[])),callbacks:sr(),dirty:a,skip_bound:!1,root:e.target||s.$$.root};l&&l(u.root);let c=!1;if(u.ctx=t?t(i,e.props||{},(m,h,...w)=>{let b=w.length?w[0]:h;return u.ctx&&o(u.ctx[m],u.ctx[m]=b)&&(!u.skip_bound&&u.bound[m]&&u.bound[m](b),c&&hh(i,m)),h}):[],u.update(),c=!0,nt(u.before_update),u.fragment=n?n(u.ctx):!1,e.target){if(e.hydrate){xf();let m=tc(e.target);u.fragment&&u.fragment.l(m),m.forEach(C)}else u.fragment&&u.fragment.c();e.intro&&d(i.$$.fragment),V(i,e.target,e.anchor),$f(),fr()}so(s)}var gh;typeof HTMLElement=="function"&&(gh=class extends HTMLElement{constructor(e,t,n){super();Qi(this,"$$ctor");Qi(this,"$$s");Qi(this,"$$c");Qi(this,"$$cn",!1);Qi(this,"$$d",{});Qi(this,"$$r",!1);Qi(this,"$$p_d",{});Qi(this,"$$l",{});Qi(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let o=this.$$c.$on(e,t);this.$$l_u.set(t,o)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let o=this.$$l_u.get(t);o&&(o(),this.$$l_u.delete(t))}}connectedCallback(){return ft(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(l){return()=>{let a;return{c:function(){a=T("slot"),l!=="default"&&f(a,"name",l)},m:function(c,m){S(c,a,m)},d:function(c){c&&C(a)}}}};var e=t;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let n={},o=ic(this);for(let l of this.$$s)l in o&&(n[l]=[t(l)]);for(let l of this.attributes){let a=this.$$g_p(l.name);a in this.$$d||(this.$$d[a]=Os(a,l.value,this.$$p_d,"toProp"))}for(let l in this.$$p_d)!(l in this.$$d)&&this[l]!==void 0&&(this.$$d[l]=this[l],delete this[l]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Nt(rt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});let r=()=>{this.$$r=!0;for(let l in this.$$p_d)if(this.$$d[l]=this.$$c.$$.ctx[this.$$c.$$.props[l]],this.$$p_d[l].reflect){let a=Os(l,this.$$d[l],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,a)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(let l in this.$$l)for(let a of this.$$l[l]){let s=this.$$c.$on(l,a);this.$$l_u.set(a,s)}this.$$l={}}})}attributeChangedCallback(e,t,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Os(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Os(i,e,t,n){var r;let o=(r=t[i])==null?void 0:r.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!t[i])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}var U=class{constructor(){Qi(this,"$$");Qi(this,"$$set")}$destroy(){R(this,1),this.$destroy=Ce}$on(e,t){if(!Vi(t))return Ce;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}$set(e){this.$$set&&!Yf(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var sc="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(sc);var mD=require("@vkontakte/videoplayer-core"),xn=require("@vkontakte/videoplayer-shared"),l_=require("@vkontakte/videoplayer-statistics");var al=require("@vkontakte/videoplayer-shared");var bh={isMobile:void 0,defaultLanguage:al.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:al.VideoQuality.Q_480P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,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,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,interactiveGraph:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,additionalButtons:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1},controls:{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,slot:void 0,preview:void 0},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4}},ac=i=>(0,al.fillWithDefault)(i,bh),uc=i=>ol("ui-config",i),Yt=()=>ll("ui-config");var zl="vk_player_debug_panel_opened";var fc="videoplayer",cc="videoplayer";var eo={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},dc=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),mc=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),pc=new Set(["ShiftRight","ShiftLeft"]);var _c=["TIMELINE"],Ul=[..._c,"GRAPH_BUTTON"],Fs=[..._c,"PLAY_BUTTON"],dr=[...Ul,"PLAY_BUTTON"];var go=(r=>(r.XS="xs",r.S="s",r.M="m",r.L="l",r.XL="xl",r))(go||{}),qo={xs:0,s:1,m:2,l:3,xl:4};var ul=[];function Wn(i,e){return{subscribe:qe(i,e).subscribe}}function qe(i,e=Ce){let t,n=new Set;function o(a){if(H(i,a)&&(i=a,t)){let s=!ul.length;for(let u of n)u[1](),ul.push(u,i);if(s){for(let u=0;u<ul.length;u+=2)ul[u][0](ul[u+1]);ul.length=0}}}function r(a){o(a(i))}function l(a,s=Ce){let u=[a,s];return n.add(u),n.size===1&&(t=e(o,r)||Ce),a(i),()=>{n.delete(u),n.size===0&&t&&(t(),t=null)}}return{set:o,update:r,subscribe:l}}function Bi(i,e,t){let n=!Array.isArray(i),o=n?[i]:i;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let r=e.length<2;return Wn(t,(l,a)=>{let s=!1,u=[],c=0,m=Ce,h=()=>{if(c)return;m();let b=e(n?u[0]:u,l,a);r?l(b):m=Vi(b)?b:Ce},w=o.map((b,k)=>Jt(b,y=>{u[k]=y,c&=~(1<<k),s&&h()},()=>{c|=1<<k}));return s=!0,h(),function(){nt(w),m(),s=!1}})}var Kl=require("@vkontakte/videoplayer-shared"),hc=require("@vkontakte/videoplayer-core"),gc=require("@vkontakte/videoplayer-statistics");var mr="prod",Oo="1.1.40-beta.0";var pr=(i,e,t)=>{let n=document.createElement("a");n.href=i,n.download=`${e}.${t}`,n.style.display="none",n.click()};var bc=Symbol("storeContext"),vc=Symbol("microStoresContext"),yc=(i,e)=>{ol(bc,i),ol(vc,e),mr==="dev"&&(window.app={store:i,microStores:e})},lt=()=>{let i=ll(bc);return(0,Kl.assertNonNullable)(i,"Store context is empty!"),i},Gn=()=>{let i=ll(vc);return(0,Kl.assertNonNullable)(i,"MicroStores context is empty!"),i},St=(i,e)=>Hs(i,i.getValue(),e),Hs=(i,e,t)=>Wn(e,n=>{let o=i.subscribe(r=>{n(r),t==null||t(r)});return()=>o.unsubscribe()}),wc=(i,e,t)=>{var I,v,g,P,M,A;let n=i.info,{width:o,height:r}=et(t.ui.playerSize),l=(v=(I=n.throughputEstimation$.getValue())==null?void 0:I.toFixed(0))!=null?v:0,a=(P=(g=n.rttEstimation$.getValue())==null?void 0:g.toFixed(0))!=null?P:0,s=n.isAutoQualityEnabled$.getValue()?"auto":"manual",u=`${Oo} (core: ${hc.VERSION}, stat: ${gc.VERSION}, shared: ${Kl.VERSION})`,c=et(t.state.errorLog$),m=c.length?`
|
|
6
|
+
"use strict";var Y_=Object.create;var Fl=Object.defineProperty,Z_=Object.defineProperties,X_=Object.getOwnPropertyDescriptor,J_=Object.getOwnPropertyDescriptors,x_=Object.getOwnPropertyNames,Wf=Object.getOwnPropertySymbols,$_=Object.getPrototypeOf,Gf=Object.prototype.hasOwnProperty,eh=Object.prototype.propertyIsEnumerable;var As=(i,e,t)=>e in i?Fl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,rt=(i,e)=>{for(var t in e||(e={}))Gf.call(e,t)&&As(i,t,e[t]);if(Wf)for(var t of Wf(e))eh.call(e,t)&&As(i,t,e[t]);return i},Nt=(i,e)=>Z_(i,J_(e));var th=(i,e)=>{for(var t in e)Fl(i,t,{get:e[t],enumerable:!0})},Qf=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of x_(e))!Gf.call(i,o)&&o!==t&&Fl(i,o,{get:()=>e[o],enumerable:!(n=X_(e,o))||n.enumerable});return i};var Ms=(i,e,t)=>(t=i!=null?Y_($_(i)):{},Qf(e||!i||!i.__esModule?Fl(t,"default",{value:i,enumerable:!0}):t,i)),ih=i=>Qf(Fl({},"__esModule",{value:!0}),i);var Qi=(i,e,t)=>As(i,typeof e!="symbol"?e+"":e,t);var ft=(i,e,t)=>new Promise((n,o)=>{var r=s=>{try{a(t.next(s))}catch(u){o(u)}},l=s=>{try{a(t.throw(s))}catch(u){o(u)}},a=s=>s.done?n(s.value):Promise.resolve(s.value).then(r,l);a((t=t.apply(i,e)).next())});var t8={};th(t8,{GridTypes:()=>go,InterfaceLanguage:()=>Bl.InterfaceLanguage,VERSION:()=>Oo,VKNumericLanguage:()=>Bl.VKNumericLanguage,VideoFormat:()=>Es.VideoFormat,VideoQuality:()=>Es.VideoQuality,loadVKLangPack:()=>Bl.loadVKLangPack,registerPlayerWebComponent:()=>e8});module.exports=ih(t8);function Ce(){}function se(i,e){for(let t in e)i[t]=e[t];return i}function Vs(i){return i()}function sr(){return Object.create(null)}function nt(i){i.forEach(Vs)}function Vi(i){return typeof i=="function"}function H(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}var rr;function Rs(i,e){return i===e?!0:(rr||(rr=document.createElement("a")),rr.href=e,i===rr.href)}function Yf(i){return Object.keys(i).length===0}function Jt(i,...e){if(i==null){for(let n of e)n(void 0);return Ce}let t=i.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function et(i){let e;return Jt(i,t=>e=t)(),e}function F(i,e,t){i.$$.on_destroy.push(Jt(e,t))}function Ee(i,e,t,n){if(i){let o=Zf(i,e,t,n);return i[0](o)}}function Zf(i,e,t,n){return i[1]&&n?se(t.ctx.slice(),i[1](n(e))):t.ctx}function Le(i,e,t,n){if(i[2]&&n){let o=i[2](n(t));if(e.dirty===void 0)return o;if(typeof o=="object"){let r=[],l=Math.max(e.dirty.length,o.length);for(let a=0;a<l;a+=1)r[a]=e.dirty[a]|o[a];return r}return e.dirty|o}return e.dirty}function Ae(i,e,t,n,o,r){if(o){let l=Zf(e,t,n,r);i.p(l,o)}}function Me(i){if(i.ctx.length>32){let e=[],t=i.ctx.length/32;for(let n=0;n<t;n++)e[n]=-1;return e}return-1}function ye(i){let e={};for(let t in i)t[0]!=="$"&&(e[t]=i[t]);return e}function Xf(i){return i==null?"":i}var Ro=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;var ar=class i{constructor(e){Qi(this,"_listeners","WeakMap"in Ro?new WeakMap:void 0);Qi(this,"_observer");Qi(this,"options");this.options=e}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!=null?e:this._observer=new ResizeObserver(t=>{var n;for(let o of t)i.entries.set(o.target,o),(n=this._listeners.get(o.target))==null||n(o)})}};ar.entries="WeakMap"in Ro?new WeakMap:void 0;var Jf=!1;function xf(){Jf=!0}function $f(){Jf=!1}function p(i,e){i.appendChild(e)}function Te(i,e,t){let n=ec(i);if(!n.getElementById(e)){let o=T("style");o.id=e,o.textContent=t,lh(n,o)}}function ec(i){if(!i)return document;let e=i.getRootNode?i.getRootNode():i.ownerDocument;return e&&e.host?e:i.ownerDocument}function lh(i,e){return p(i.head||i,e),e.sheet}function S(i,e,t){i.insertBefore(e,t||null)}function C(i){i.parentNode&&i.parentNode.removeChild(i)}function Ri(i,e){for(let t=0;t<i.length;t+=1)i[t]&&i[t].d(e)}function T(i){return document.createElement(i)}function N(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Be(i){return document.createTextNode(i)}function D(){return Be(" ")}function ct(){return Be("")}function _e(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function zt(i){return function(e){return e.preventDefault(),i.call(this,e)}}function at(i){return function(e){return e.stopPropagation(),i.call(this,e)}}function f(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function we(i,e){for(let t in e)f(i,t,e[t])}function tc(i){return Array.from(i.childNodes)}function Ye(i,e){e=""+e,i.data!==e&&(i.data=e)}function wi(i,e,t,n){t==null?i.style.removeProperty(e):i.style.setProperty(e,t,n?"important":"")}var ur;function rh(){if(ur===void 0){ur=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){ur=!0}}return ur}function il(i,e){getComputedStyle(i).position==="static"&&(i.style.position="relative");let n=T("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;let o=rh(),r;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",r=_e(window,"message",l=>{l.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{r=_e(n.contentWindow,"resize",e),e()}),p(i,n),()=>{(o||r&&n.contentWindow)&&r(),C(n)}}function O(i,e,t){i.classList.toggle(e,!!t)}function ic(i){let e={};return i.childNodes.forEach(t=>{e[t.slot||"default"]=!0}),e}function Rn(i,e){return new i(e)}var ho;function so(i){ho=i}function nl(){if(!ho)throw new Error("Function called outside component initialization");return ho}function Ut(i){nl().$$.on_mount.push(i)}function Yn(i){nl().$$.on_destroy.push(i)}function ol(i,e){return nl().$$.context.set(i,e),e}function ll(i){return nl().$$.context.get(i)}function Hl(){return nl().$$.context}function qn(i,e){let t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}var Bo=[];var ge=[],sl=[],Ds=[],oc=Promise.resolve(),Ns=!1;function qs(){Ns||(Ns=!0,oc.then(fr))}function Zn(){return qs(),oc}function Xn(i){sl.push(i)}function Oe(i){Ds.push(i)}var Bs=new Set,rl=0;function fr(){if(rl!==0)return;let i=ho;do{try{for(;rl<Bo.length;){let e=Bo[rl];rl++,so(e),dh(e.$$)}}catch(e){throw Bo.length=0,rl=0,e}for(so(null),Bo.length=0,rl=0;ge.length;)ge.pop()();for(let e=0;e<sl.length;e+=1){let t=sl[e];Bs.has(t)||(Bs.add(t),t())}sl.length=0}while(Bo.length);for(;Ds.length;)Ds.pop()();Ns=!1,Bs.clear(),so(i)}function dh(i){if(i.fragment!==null){i.update(),nt(i.before_update);let e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(Xn)}}function lc(i){let e=[],t=[];sl.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),sl=e}var cr=new Set,Do;function ce(){Do={r:0,c:[],p:Do}}function de(){Do.r||nt(Do.c),Do=Do.p}function d(i,e){i&&i.i&&(cr.delete(i),i.i(e))}function _(i,e,t,n){if(i&&i.o){if(cr.has(i))return;cr.add(i),Do.c.push(()=>{cr.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function It(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function De(i,e){let t={},n={},o={$$scope:1},r=i.length;for(;r--;){let l=i[r],a=e[r];if(a){for(let s in l)s in a||(n[s]=1);for(let s in a)o[s]||(t[s]=a[s],o[s]=1);i[r]=a}else for(let s in l)o[s]=1}for(let l in n)l in t||(t[l]=void 0);return t}function rc(i){return typeof i=="object"&&i!==null?i:{}}var mh=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],ph=new Set([...mh]);function Fe(i,e,t){let n=i.$$.props[e];n!==void 0&&(i.$$.bound[n]=t,t(i.$$.ctx[n]))}function B(i){i&&i.c()}function V(i,e,t){let{fragment:n,after_update:o}=i.$$;n&&n.m(e,t),Xn(()=>{let r=i.$$.on_mount.map(Vs).filter(Vi);i.$$.on_destroy?i.$$.on_destroy.push(...r):nt(r),i.$$.on_mount=[]}),o.forEach(Xn)}function R(i,e){let t=i.$$;t.fragment!==null&&(lc(t.after_update),nt(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function hh(i,e){i.$$.dirty[0]===-1&&(Bo.push(i),qs(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function j(i,e,t,n,o,r,l=null,a=[-1]){let s=ho;so(i);let u=i.$$={fragment:null,ctx:[],props:r,update:Ce,not_equal:o,bound:sr(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(s?s.$$.context:[])),callbacks:sr(),dirty:a,skip_bound:!1,root:e.target||s.$$.root};l&&l(u.root);let c=!1;if(u.ctx=t?t(i,e.props||{},(m,h,...w)=>{let b=w.length?w[0]:h;return u.ctx&&o(u.ctx[m],u.ctx[m]=b)&&(!u.skip_bound&&u.bound[m]&&u.bound[m](b),c&&hh(i,m)),h}):[],u.update(),c=!0,nt(u.before_update),u.fragment=n?n(u.ctx):!1,e.target){if(e.hydrate){xf();let m=tc(e.target);u.fragment&&u.fragment.l(m),m.forEach(C)}else u.fragment&&u.fragment.c();e.intro&&d(i.$$.fragment),V(i,e.target,e.anchor),$f(),fr()}so(s)}var gh;typeof HTMLElement=="function"&&(gh=class extends HTMLElement{constructor(e,t,n){super();Qi(this,"$$ctor");Qi(this,"$$s");Qi(this,"$$c");Qi(this,"$$cn",!1);Qi(this,"$$d",{});Qi(this,"$$r",!1);Qi(this,"$$p_d",{});Qi(this,"$$l",{});Qi(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let o=this.$$c.$on(e,t);this.$$l_u.set(t,o)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let o=this.$$l_u.get(t);o&&(o(),this.$$l_u.delete(t))}}connectedCallback(){return ft(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(l){return()=>{let a;return{c:function(){a=T("slot"),l!=="default"&&f(a,"name",l)},m:function(c,m){S(c,a,m)},d:function(c){c&&C(a)}}}};var e=t;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let n={},o=ic(this);for(let l of this.$$s)l in o&&(n[l]=[t(l)]);for(let l of this.attributes){let a=this.$$g_p(l.name);a in this.$$d||(this.$$d[a]=Os(a,l.value,this.$$p_d,"toProp"))}for(let l in this.$$p_d)!(l in this.$$d)&&this[l]!==void 0&&(this.$$d[l]=this[l],delete this[l]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Nt(rt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});let r=()=>{this.$$r=!0;for(let l in this.$$p_d)if(this.$$d[l]=this.$$c.$$.ctx[this.$$c.$$.props[l]],this.$$p_d[l].reflect){let a=Os(l,this.$$d[l],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,a)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(let l in this.$$l)for(let a of this.$$l[l]){let s=this.$$c.$on(l,a);this.$$l_u.set(a,s)}this.$$l={}}})}attributeChangedCallback(e,t,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Os(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Os(i,e,t,n){var r;let o=(r=t[i])==null?void 0:r.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!t[i])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}var U=class{constructor(){Qi(this,"$$");Qi(this,"$$set")}$destroy(){R(this,1),this.$destroy=Ce}$on(e,t){if(!Vi(t))return Ce;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}$set(e){this.$$set&&!Yf(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var sc="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(sc);var mD=require("@vkontakte/videoplayer-core"),xn=require("@vkontakte/videoplayer-shared"),l_=require("@vkontakte/videoplayer-statistics");var al=require("@vkontakte/videoplayer-shared");var bh={isMobile:void 0,defaultLanguage:al.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:al.VideoQuality.Q_480P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,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,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,interactiveGraph:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,additionalButtons:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1},controls:{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,slot:void 0,preview:void 0},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4}},ac=i=>(0,al.fillWithDefault)(i,bh),uc=i=>ol("ui-config",i),Yt=()=>ll("ui-config");var zl="vk_player_debug_panel_opened";var fc="videoplayer",cc="videoplayer";var eo={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},dc=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),mc=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),pc=new Set(["ShiftRight","ShiftLeft"]);var _c=["TIMELINE"],Ul=[..._c,"GRAPH_BUTTON"],Fs=[..._c,"PLAY_BUTTON"],dr=[...Ul,"PLAY_BUTTON"];var go=(r=>(r.XS="xs",r.S="s",r.M="m",r.L="l",r.XL="xl",r))(go||{}),qo={xs:0,s:1,m:2,l:3,xl:4};var ul=[];function Wn(i,e){return{subscribe:qe(i,e).subscribe}}function qe(i,e=Ce){let t,n=new Set;function o(a){if(H(i,a)&&(i=a,t)){let s=!ul.length;for(let u of n)u[1](),ul.push(u,i);if(s){for(let u=0;u<ul.length;u+=2)ul[u][0](ul[u+1]);ul.length=0}}}function r(a){o(a(i))}function l(a,s=Ce){let u=[a,s];return n.add(u),n.size===1&&(t=e(o,r)||Ce),a(i),()=>{n.delete(u),n.size===0&&t&&(t(),t=null)}}return{set:o,update:r,subscribe:l}}function Bi(i,e,t){let n=!Array.isArray(i),o=n?[i]:i;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let r=e.length<2;return Wn(t,(l,a)=>{let s=!1,u=[],c=0,m=Ce,h=()=>{if(c)return;m();let b=e(n?u[0]:u,l,a);r?l(b):m=Vi(b)?b:Ce},w=o.map((b,k)=>Jt(b,y=>{u[k]=y,c&=~(1<<k),s&&h()},()=>{c|=1<<k}));return s=!0,h(),function(){nt(w),m(),s=!1}})}var Kl=require("@vkontakte/videoplayer-shared"),hc=require("@vkontakte/videoplayer-core"),gc=require("@vkontakte/videoplayer-statistics");var mr="prod",Oo="1.1.40";var pr=(i,e,t)=>{let n=document.createElement("a");n.href=i,n.download=`${e}.${t}`,n.style.display="none",n.click()};var bc=Symbol("storeContext"),vc=Symbol("microStoresContext"),yc=(i,e)=>{ol(bc,i),ol(vc,e),mr==="dev"&&(window.app={store:i,microStores:e})},lt=()=>{let i=ll(bc);return(0,Kl.assertNonNullable)(i,"Store context is empty!"),i},Gn=()=>{let i=ll(vc);return(0,Kl.assertNonNullable)(i,"MicroStores context is empty!"),i},St=(i,e)=>Hs(i,i.getValue(),e),Hs=(i,e,t)=>Wn(e,n=>{let o=i.subscribe(r=>{n(r),t==null||t(r)});return()=>o.unsubscribe()}),wc=(i,e,t)=>{var I,v,g,P,M,A;let n=i.info,{width:o,height:r}=et(t.ui.playerSize),l=(v=(I=n.throughputEstimation$.getValue())==null?void 0:I.toFixed(0))!=null?v:0,a=(P=(g=n.rttEstimation$.getValue())==null?void 0:g.toFixed(0))!=null?P:0,s=n.isAutoQualityEnabled$.getValue()?"auto":"manual",u=`${Oo} (core: ${hc.VERSION}, stat: ${gc.VERSION}, shared: ${Kl.VERSION})`,c=et(t.state.errorLog$),m=c.length?`
|
|
7
7
|
`+c.map((q,ie)=>{var L;let me=`${ie}) Type: ${q.id}
|
|
8
8
|
`,Y=`Message: ${q.message} (${q.thrown})
|
|
9
9
|
`,x=`Trace: ${(L=q.thrown)==null?void 0:L.stack}
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
rgba(0, 0, 0, 0.96) 86.67%,
|
|
50
50
|
rgba(0, 0, 0, 0.99) 93.33%,
|
|
51
51
|
#000 100%
|
|
52
|
-
);--timeline-preview-shadow:rgba(0, 0, 0, 0.08);--timeline-preview-bg:rgba(34, 34, 34, 1);--mobile-settings-bg:#2C2D2E;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--rotate-transition-duration:0.25s;position:relative;width:100%;height:100%;color:var(--white);font-size:12px;line-height:normal;overflow:hidden;outline:0;user-select:none;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;background:var(--black)}*{-webkit-tap-highlight-color:transparent}button{border:none;margin:0;padding:0;width:auto;overflow:visible;background:transparent;color:inherit;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}svg:not(.interactiveContainer svg){pointer-events:none}*:focus, *:focus-visible{outline:none}*:focus-visible{box-shadow:var(--focused-element-shadow)}.hidden{visibility:hidden;opacity:0}.overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:10000}.out-of-view{position:absolute !important;left:-1000vh !important}`)}function R6(i){let e,t,n;function o(l){i[61](l)}let r={store:i[0],uiConfig:i[35],title:i[1],thumbUrl:i[2],interactiveContainer:i[3],live:i[4],autoplay:i[5],canRewindLive:i[6],showAds:i[7],adsSlotId:i[8],adsParams:i[9],adsPreviewParam:i[10],duration:i[11],logoClickable:i[12],logoHidden:i[13],logoTargetUrl:i[36],showNextPrevButtons:i[15],nextButtonActive:i[16],prevButtonActive:i[17],endScreenVideoTitle:i[18],endScreenVideoThumb:i[19],isOneVideoPlaylist:i[20],supportLink:i[21],shadowRootContainer:i[22],outerContainerRef:i[23],fullScreenTarget:i[24],showMiniTimer:i[25],playerStarted:i[34],playNextVideo:i[26],playPrevVideo:i[27],repeatPlaylist:i[28],seekToInteractive:i[29],toggleGraph:i[30],playPrevChapter:i[31],firstStart:i[38]};return i[33]!==void 0&&(r.videoContainer=i[33]),e=new Op({props:r}),ge.push(()=>Fe(e,"videoContainer",o)),{c(){B(e.$$.fragment)},m(l,a){V(e,l,a),n=!0},p(l,a){let s={};a[0]&1&&(s.store=l[0]),a[0]&2&&(s.title=l[1]),a[0]&4&&(s.thumbUrl=l[2]),a[0]&8&&(s.interactiveContainer=l[3]),a[0]&16&&(s.live=l[4]),a[0]&32&&(s.autoplay=l[5]),a[0]&64&&(s.canRewindLive=l[6]),a[0]&128&&(s.showAds=l[7]),a[0]&256&&(s.adsSlotId=l[8]),a[0]&512&&(s.adsParams=l[9]),a[0]&1024&&(s.adsPreviewParam=l[10]),a[0]&2048&&(s.duration=l[11]),a[0]&4096&&(s.logoClickable=l[12]),a[0]&8192&&(s.logoHidden=l[13]),a[0]&32768&&(s.showNextPrevButtons=l[15]),a[0]&65536&&(s.nextButtonActive=l[16]),a[0]&131072&&(s.prevButtonActive=l[17]),a[0]&262144&&(s.endScreenVideoTitle=l[18]),a[0]&524288&&(s.endScreenVideoThumb=l[19]),a[0]&1048576&&(s.isOneVideoPlaylist=l[20]),a[0]&2097152&&(s.supportLink=l[21]),a[0]&4194304&&(s.shadowRootContainer=l[22]),a[0]&8388608&&(s.outerContainerRef=l[23]),a[0]&16777216&&(s.fullScreenTarget=l[24]),a[0]&33554432&&(s.showMiniTimer=l[25]),a[1]&8&&(s.playerStarted=l[34]),a[0]&67108864&&(s.playNextVideo=l[26]),a[0]&134217728&&(s.playPrevVideo=l[27]),a[0]&268435456&&(s.repeatPlaylist=l[28]),a[0]&536870912&&(s.seekToInteractive=l[29]),a[0]&1073741824&&(s.toggleGraph=l[30]),a[1]&1&&(s.playPrevChapter=l[31]),!t&&a[1]&4&&(t=!0,s.videoContainer=l[33],Oe(()=>t=!1)),e.$set(s)},i(l){n||(d(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){R(e,l)}}}function B6(i){let e,t,n;function o(l){i[60](l)}let r={store:i[0],uiConfig:i[35],thumbUrl:i[2],interactiveContainer:i[3],live:i[4],autoplay:i[5],canRewindLive:i[6],showAds:i[7],adsSlotId:i[8],adsParams:i[9],adsPreviewParam:i[10],duration:i[11],logoClickable:i[12],logoHidden:i[13],logoTargetUrl:i[36],showNextPrevButtons:i[15],nextButtonActive:i[16],prevButtonActive:i[17],endScreenVideoTitle:i[18],endScreenVideoThumb:i[19],isOneVideoPlaylist:i[20],supportLink:i[21],shadowRootContainer:i[22],outerContainerRef:i[23],fullScreenTarget:i[24],showMiniTimer:i[25],playerStarted:i[34],playNextVideo:i[26],playPrevVideo:i[27],repeatPlaylist:i[28],seekToInteractive:i[29],toggleGraph:i[30],playPrevChapter:i[31],firstStart:i[38],seekTime:i[32]};return i[33]!==void 0&&(r.videoContainer=i[33]),e=new o_({props:r}),ge.push(()=>Fe(e,"videoContainer",o)),{c(){B(e.$$.fragment)},m(l,a){V(e,l,a),n=!0},p(l,a){let s={};a[0]&1&&(s.store=l[0]),a[0]&4&&(s.thumbUrl=l[2]),a[0]&8&&(s.interactiveContainer=l[3]),a[0]&16&&(s.live=l[4]),a[0]&32&&(s.autoplay=l[5]),a[0]&64&&(s.canRewindLive=l[6]),a[0]&128&&(s.showAds=l[7]),a[0]&256&&(s.adsSlotId=l[8]),a[0]&512&&(s.adsParams=l[9]),a[0]&1024&&(s.adsPreviewParam=l[10]),a[0]&2048&&(s.duration=l[11]),a[0]&4096&&(s.logoClickable=l[12]),a[0]&8192&&(s.logoHidden=l[13]),a[0]&32768&&(s.showNextPrevButtons=l[15]),a[0]&65536&&(s.nextButtonActive=l[16]),a[0]&131072&&(s.prevButtonActive=l[17]),a[0]&262144&&(s.endScreenVideoTitle=l[18]),a[0]&524288&&(s.endScreenVideoThumb=l[19]),a[0]&1048576&&(s.isOneVideoPlaylist=l[20]),a[0]&2097152&&(s.supportLink=l[21]),a[0]&4194304&&(s.shadowRootContainer=l[22]),a[0]&8388608&&(s.outerContainerRef=l[23]),a[0]&16777216&&(s.fullScreenTarget=l[24]),a[0]&33554432&&(s.showMiniTimer=l[25]),a[1]&8&&(s.playerStarted=l[34]),a[0]&67108864&&(s.playNextVideo=l[26]),a[0]&134217728&&(s.playPrevVideo=l[27]),a[0]&268435456&&(s.repeatPlaylist=l[28]),a[0]&536870912&&(s.seekToInteractive=l[29]),a[0]&1073741824&&(s.toggleGraph=l[30]),a[1]&1&&(s.playPrevChapter=l[31]),!t&&a[1]&4&&(t=!0,s.videoContainer=l[33],Oe(()=>t=!1)),e.$set(s)},i(l){n||(d(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){R(e,l)}}}function D6(i){let e,t,n,o,r=[B6,R6],l=[];function a(s,u){return s[14]?0:1}return t=a(i,[-1,-1,-1]),n=l[t]=r[t](i),{c(){e=T("div"),n.c(),f(e,"class","root svelte-xfba9d")},m(s,u){S(s,e,u),l[t].m(e,null),o=!0},p(s,u){let c=t;t=a(s,u),t===c?l[t].p(s,u):(ce(),_(l[c],1,1,()=>{l[c]=null}),de(),n=l[t],n?n.p(s,u):(n=l[t]=r[t](s),n.c()),d(n,1),n.m(e,null))},i(s){o||(d(n),o=!0)},o(s){_(n),o=!1},d(s){s&&C(e),l[t].d()}}}function N6(i,e,t){let n,{sources:o}=e,{store:r}=e,{microStoresRoot:l}=e,{videoConfig:a}=e,{uiConfig:s}=e,{title:u}=e,{thumbUrl:c}=e,{interactiveContainer:m}=e,{subtitles:h}=e,{live:w}=e,{preload:b}=e,{autoplay:k}=e,{volume:y=void 0}=e,{muted:I=void 0}=e,{fromTime:v}=e,{canRewindLive:g}=e,{showAds:P}=e,{adsSlotId:M=void 0}=e,{adsParams:A=void 0}=e,{adsPreviewParam:q=void 0}=e,{duration:ie=void 0}=e,{logoClickable:me}=e,{logoHidden:Y}=e,{isMobile:x}=e,{showNextPrevButtons:L=!1}=e,{nextButtonActive:$=!1}=e,{prevButtonActive:ae=!1}=e,{endScreenVideoTitle:Z=void 0}=e,{endScreenVideoThumb:K=void 0}=e,{isOneVideoPlaylist:G=!1}=e,{supportLink:Q}=e,{shadowRootContainer:X=void 0}=e,{outerContainerRef:fe=void 0}=e,{fullScreenTarget:Re=void 0}=e,{failoverHosts:it=void 0}=e,{showMiniTimer:Pe=!1}=e,{saveRate:Ve}=e,{playNextVideo:Ne=xn.noop}=e,{playPrevVideo:Je=xn.noop}=e,{repeatPlaylist:re=xn.noop}=e,{seekToInteractive:pe=xn.noop}=e,{toggleGraph:st=xn.noop}=e,{playPrevChapter:ke=xn.noop}=e,{volumeMultiplier:Ue}=e,{subscribers:ht,stores:Ze}=l;uc(s);let He=Yt(),$e=s.logoLink,ot=r.ui.debugPanelVisible,ue=r.ui.playerSize,Se=r.state.isLive$;F(i,Se,ve=>t(63,n=ve));let ze,W=null,be=!1;r.getAdmanWrapper().init({switchFromAdsToVideo:r.actions.internal.switchFromAdsToVideo,switchFromVideoToAds:r.actions.internal.switchFromVideoToAds,setMuted:r.actions.external.setMuted},r.ads,{isMobile:r.ui.isMobile,mobileUnmuteButtonVisible:r.ui.mobileUnmuteButtonVisible,vsid:r.vsid}),yc(r,Ze);let xe=(ve=!1)=>{t(34,be=!0),ve?r.actions.external.firstStart(P):r.actions.internal.firstStart(P)};function dt(ve){var gi;let Qe=o||ve;Qe&&r.initVideo({container:ze,sources:Qe,failoverHosts:it,subtitles:h,volumeMultiplier:Ue});let _t=xn.safeStorage.get(zl)==="true";ot.set(_t),v>0&&r.actions.external.seekTime(v);let ut=x?He.volumeDefault:(gi=y!=null?y:_r())!=null?gi:He.volumeDefault,Xe=I!=null?I:Bc();if(r.actions.external.setVolume(ut),r.actions.external.setMuted(Xe),r.getAdmanWrapper().setInitialVolume(Xe?0:ut),He.features.trafficSaving){let Ft=Nc();Ft&&r.actions.internal.setTrafficSavingEnabled(Ft)}if(He.features.saveRate&&Ve){let Ft=Fc();Ft&&!n&&r.actions.internal.setPlaybackRate(Ft)}let Pt=Mc(r.videoId);Pt&&r.actions.internal.setQuality(Pt),r.ui.isAutoplay.set(k),k?xe():b&&He.features.preload&&r.actions.internal.preload()}let bt=ve=>{if(window.ResizeObserver){let Qe,_t;W=new ResizeObserver((0,xn.throttleFn)(ut=>{let Xe=ut[0];if(Xe){if(Xe.contentBoxSize){let Pt=Array.isArray(Xe.contentBoxSize)?Xe.contentBoxSize[0]:Xe.contentBoxSize;Qe=Pt.inlineSize,_t=Pt.blockSize}else Xe.contentRect&&(Qe=Xe.contentRect.width,_t=Xe.contentRect.height);ue.set({width:Qe,height:_t})}},300)),W.observe(ve)}ue.set({width:ve.clientWidth,height:ve.clientHeight})};Ut(()=>{bt(ze);let ve=ht.map(_t=>_t.init({store:r,microStores:Ze,config:a}));if((w==null?void 0:w.status)==="upcoming"){r.actions.internal.setLiveWaitingStart(!0);return}if((w==null?void 0:w.status)==="waiting"){r.actions.internal.setLiveWaitingRecover(!0);return}if(((w==null?void 0:w.status)==="finished"||(w==null?void 0:w.status)==="postlive")&&!Object.keys(o||[]).length){r.actions.internal.setLiveWaitingRecord(!0);return}return dt(),()=>{W==null||W.disconnect(),ve.forEach(_t=>_t.unsubscribe()),r.destroy()}});function he(){be?r.actions.external.play():xe(!0)}function mt(){r.actions.external.pause()}function Et(ve){x||r.actions.external.setMuted(ve)}function Tt(ve){x||ve>=0&&ve<=1&&r.actions.external.setVolume(ve)}function Ke(ve){r.actions.internal.seekTime(ve,l_.SeekAction.UNKNOWN)}function Xt(ve){r.actions.external.seekEpisodeStartTime(ve)}function qt(){r.actions.external.returnFocusToEpisodes()}function Lt(ve){r.actions.external.setPlaybackRate(ve)}function ii(ve){r.actions.external.setAutoQualityLimits(ve)}function Ot(ve){ze=ve,t(33,ze)}function Qt(ve){ze=ve,t(33,ze)}return i.$$set=ve=>{"sources"in ve&&t(39,o=ve.sources),"store"in ve&&t(0,r=ve.store),"microStoresRoot"in ve&&t(40,l=ve.microStoresRoot),"videoConfig"in ve&&t(41,a=ve.videoConfig),"uiConfig"in ve&&t(42,s=ve.uiConfig),"title"in ve&&t(1,u=ve.title),"thumbUrl"in ve&&t(2,c=ve.thumbUrl),"interactiveContainer"in ve&&t(3,m=ve.interactiveContainer),"subtitles"in ve&&t(43,h=ve.subtitles),"live"in ve&&t(4,w=ve.live),"preload"in ve&&t(44,b=ve.preload),"autoplay"in ve&&t(5,k=ve.autoplay),"volume"in ve&&t(45,y=ve.volume),"muted"in ve&&t(46,I=ve.muted),"fromTime"in ve&&t(47,v=ve.fromTime),"canRewindLive"in ve&&t(6,g=ve.canRewindLive),"showAds"in ve&&t(7,P=ve.showAds),"adsSlotId"in ve&&t(8,M=ve.adsSlotId),"adsParams"in ve&&t(9,A=ve.adsParams),"adsPreviewParam"in ve&&t(10,q=ve.adsPreviewParam),"duration"in ve&&t(11,ie=ve.duration),"logoClickable"in ve&&t(12,me=ve.logoClickable),"logoHidden"in ve&&t(13,Y=ve.logoHidden),"isMobile"in ve&&t(14,x=ve.isMobile),"showNextPrevButtons"in ve&&t(15,L=ve.showNextPrevButtons),"nextButtonActive"in ve&&t(16,$=ve.nextButtonActive),"prevButtonActive"in ve&&t(17,ae=ve.prevButtonActive),"endScreenVideoTitle"in ve&&t(18,Z=ve.endScreenVideoTitle),"endScreenVideoThumb"in ve&&t(19,K=ve.endScreenVideoThumb),"isOneVideoPlaylist"in ve&&t(20,G=ve.isOneVideoPlaylist),"supportLink"in ve&&t(21,Q=ve.supportLink),"shadowRootContainer"in ve&&t(22,X=ve.shadowRootContainer),"outerContainerRef"in ve&&t(23,fe=ve.outerContainerRef),"fullScreenTarget"in ve&&t(24,Re=ve.fullScreenTarget),"failoverHosts"in ve&&t(48,it=ve.failoverHosts),"showMiniTimer"in ve&&t(25,Pe=ve.showMiniTimer),"saveRate"in ve&&t(49,Ve=ve.saveRate),"playNextVideo"in ve&&t(26,Ne=ve.playNextVideo),"playPrevVideo"in ve&&t(27,Je=ve.playPrevVideo),"repeatPlaylist"in ve&&t(28,re=ve.repeatPlaylist),"seekToInteractive"in ve&&t(29,pe=ve.seekToInteractive),"toggleGraph"in ve&&t(30,st=ve.toggleGraph),"playPrevChapter"in ve&&t(31,ke=ve.playPrevChapter),"volumeMultiplier"in ve&&t(50,Ue=ve.volumeMultiplier)},i.$$.update=()=>{i.$$.dirty[0]&16385&&r.ui.isMobile.set(x)},[r,u,c,m,w,k,g,P,M,A,q,ie,me,Y,x,L,$,ae,Z,K,G,Q,X,fe,Re,Pe,Ne,Je,re,pe,st,ke,Ke,ze,be,He,$e,Se,xe,o,l,a,s,h,b,y,I,v,it,Ve,Ue,dt,he,mt,Et,Tt,Xt,qt,Lt,ii,Ot,Qt]}var Df=class extends U{constructor(e){super(),j(this,e,N6,D6,H,{sources:39,store:0,microStoresRoot:40,videoConfig:41,uiConfig:42,title:1,thumbUrl:2,interactiveContainer:3,subtitles:43,live:4,preload:44,autoplay:5,volume:45,muted:46,fromTime:47,canRewindLive:6,showAds:7,adsSlotId:8,adsParams:9,adsPreviewParam:10,duration:11,logoClickable:12,logoHidden:13,isMobile:14,showNextPrevButtons:15,nextButtonActive:16,prevButtonActive:17,endScreenVideoTitle:18,endScreenVideoThumb:19,isOneVideoPlaylist:20,supportLink:21,shadowRootContainer:22,outerContainerRef:23,fullScreenTarget:24,failoverHosts:48,showMiniTimer:25,saveRate:49,playNextVideo:26,playPrevVideo:27,repeatPlaylist:28,seekToInteractive:29,toggleGraph:30,playPrevChapter:31,volumeMultiplier:50,initVideo:51,play:52,pause:53,setMuted:54,setVolume:55,seekTime:32,seekEpisodeStartTime:56,returnFocusToEpisodes:57,setPlaybackRate:58,setAutoQualityLimits:59},V6,[-1,-1,-1])}get initVideo(){return this.$$.ctx[51]}get play(){return this.$$.ctx[52]}get pause(){return this.$$.ctx[53]}get setMuted(){return this.$$.ctx[54]}get setVolume(){return this.$$.ctx[55]}get seekTime(){return this.$$.ctx[32]}get seekEpisodeStartTime(){return this.$$.ctx[56]}get returnFocusToEpisodes(){return this.$$.ctx[57]}get setPlaybackRate(){return this.$$.ctx[58]}get setAutoQualityLimits(){return this.$$.ctx[59]}},r_=Df;function q6(i){let e,t,n,o=i[2].default,r=Ee(o,i,i[1],null),l=[{xmlns:"http://www.w3.org/2000/svg"},{width:"57"},{height:"60"},{fill:"none"},{"aria-hidden":"true"},{"data-testid":"stub-icon"},{role:"img"},i[0]],a={};for(let s=0;s<l.length;s+=1)a=se(a,l[s]);return{c(){e=N("svg"),r&&r.c(),t=N("path"),f(t,"fill","currentColor"),f(t,"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"),we(e,a)},m(s,u){S(s,e,u),r&&r.m(e,null),p(e,t),n=!0},p(s,[u]){r&&r.p&&(!n||u&2)&&Ae(r,o,s,s[1],n?Le(o,s[1],u,null):Me(s[1]),null),we(e,a=De(l,[{xmlns:"http://www.w3.org/2000/svg"},{width:"57"},{height:"60"},{fill:"none"},{"aria-hidden":"true"},{"data-testid":"stub-icon"},{role:"img"},u&1&&s[0]]))},i(s){n||(d(r,s),n=!0)},o(s){_(r,s),n=!1},d(s){s&&C(e),r&&r.d(s)}}}function O6(i,e,t){let{$$slots:n={},$$scope:o}=e;return i.$$set=r=>{t(0,e=se(se({},e),ye(r))),"$$scope"in r&&t(1,o=r.$$scope)},e=ye(e),[e,o,n]}var Nf=class extends U{constructor(e){super(),j(this,e,O6,q6,H,{})}},s_=Nf;function F6(i){let e,t;return e=new s_({props:{style:i[0]}}),{c(){B(e.$$.fragment)},m(n,o){V(e,n,o),t=!0},p(n,[o]){let r={};o&1&&(r.style=n[0]),e.$set(r)},i(n){t||(d(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){R(e,n)}}}function H6(i,e,t){let n,{isWhite:o=!1}=e;return i.$$set=r=>{"isWhite"in r&&t(1,o=r.isWhite)},i.$$.update=()=>{i.$$.dirty&2&&t(0,n=o?"color: #fff;":"color: #909499;")},[n,o]}var qf=class extends U{constructor(e){super(),j(this,e,H6,F6,H,{isWhite:1})}},a_=qf;function z6(i){Te(i,"svelte-1y9fytq",".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 u_(i){let e,t;return{c(){e=T("div"),t=Be(i[0]),f(e,"class","title svelte-1y9fytq")},m(n,o){S(n,e,o),p(e,t)},p(n,o){o&1&&Ye(t,n[0])},d(n){n&&C(e)}}}function f_(i){let e,t;return e=new a_({props:{isWhite:!!i[1]}}),{c(){B(e.$$.fragment)},m(n,o){V(e,n,o),t=!0},p(n,o){let r={};o&2&&(r.isWhite=!!n[1]),e.$set(r)},i(n){t||(d(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){R(e,n)}}}function U6(i){let e,t,n,o,r=i[0]&&u_(i),l=(!i[0]||!i[1])&&f_(i);return{c(){e=T("div"),r&&r.c(),t=D(),l&&l.c(),f(e,"class","playerStub svelte-1y9fytq"),f(e,"style",n=i[1]?`background-image: url('${i[1]}')`:"")},m(a,s){S(a,e,s),r&&r.m(e,null),p(e,t),l&&l.m(e,null),o=!0},p(a,[s]){a[0]?r?r.p(a,s):(r=u_(a),r.c(),r.m(e,t)):r&&(r.d(1),r=null),!a[0]||!a[1]?l?(l.p(a,s),s&3&&d(l,1)):(l=f_(a),l.c(),d(l,1),l.m(e,null)):l&&(ce(),_(l,1,1,()=>{l=null}),de()),(!o||s&2&&n!==(n=a[1]?`background-image: url('${a[1]}')`:""))&&f(e,"style",n)},i(a){o||(d(l),o=!0)},o(a){_(l),o=!1},d(a){a&&C(e),r&&r.d(),l&&l.d()}}}function K6(i,e,t){let{title:n}=e,{thumbUrl:o}=e;return i.$$set=r=>{"title"in r&&t(0,n=r.title),"thumbUrl"in r&&t(1,o=r.thumbUrl)},[n,o]}var Of=class extends U{constructor(e){super(),j(this,e,K6,U6,H,{title:0,thumbUrl:1},z6)}},c_=Of;var Yi=require("@vkontakte/videoplayer-shared"),VN=require("@vkontakte/videoplayer-core"),Rl=require("@vkontakte/videoplayer-statistics");var d_=require("@vkontakte/videoplayer-shared"),Cs=class{constructor(){this.subscription=new d_.Subscription}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:t="",thumbUrl:n=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:t,artwork:[{src:n,sizes:"96x96",type:"image/png"},{src:n,sizes:"128x128",type:"image/png"},{src:n,sizes:"192x192",type:"image/png"},{src:n,sizes:"256x256",type:"image/png"},{src:n,sizes:"384x384",type:"image/png"},{src:n,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",t=>null],["seekbackward",t=>null],["seekforward",t=>null]];this.setActionHandlers(e)}setActionHandlers(e){if(this.isSupported())for(let[t,n]of e)try{navigator.mediaSession.setActionHandler(t,n)}catch(o){throw new Error(`The media session action "${t}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||this.subscription.add(e.state.positionExact$.subscribe(t=>{let n=et(e.state.currentPlaybackRate$),o=et(e.state.duration$);navigator.mediaSession.setPositionState({position:t,playbackRate:n,duration:o})}))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};var Ll=require("@vkontakte/videoplayer-shared");function j6(i){let e,t,n,o,r,l=i[2].default,a=Ee(l,i,i[1],null),s=[{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[0]],u={};for(let c=0;c<s.length;c+=1)u=se(u,s[c]);return{c(){e=N("svg"),a&&a.c(),t=N("g"),n=N("path"),o=N("path"),f(n,"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"),f(o,"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"),f(t,"fill","#fff"),we(e,u)},m(c,m){S(c,e,m),a&&a.m(e,null),p(e,t),p(t,n),p(t,o),r=!0},p(c,[m]){a&&a.p&&(!r||m&2)&&Ae(a,l,c,c[1],r?Le(l,c[1],m,null):Me(c[1]),null),we(e,u=De(s,[{xmlns:"http://www.w3.org/2000/svg"},{width:"57"},{height:"56"},{fill:"none"},{"aria-label":"dummy-image"},{"data-testid":"pip-dummy-icon"},{role:"img"},m&1&&c[0]]))},i(c){r||(d(a,c),r=!0)},o(c){_(a,c),r=!1},d(c){c&&C(e),a&&a.d(c)}}}function W6(i,e,t){let{$$slots:n={},$$scope:o}=e;return i.$$set=r=>{t(0,e=se(se({},e),ye(r))),"$$scope"in r&&t(1,o=r.$$scope)},e=ye(e),[e,o,n]}var Ff=class extends U{constructor(e){super(),j(this,e,W6,j6,H,{})}},m_=Ff;function G6(i){Te(i,"svelte-1pbsod4",".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 Q6(i){let e,t,n,o,r,l,a;return n=new m_({}),{c(){e=T("div"),t=T("div"),B(n.$$.fragment),o=D(),r=T("span"),l=Be(i[0]),f(t,"class","dummy-image svelte-1pbsod4"),O(t,"desktop",!i[1]),f(r,"class","title svelte-1pbsod4"),f(e,"class","player-pip-dummy svelte-1pbsod4"),O(e,"is-pip-api",i[2])},m(s,u){S(s,e,u),p(e,t),V(n,t,null),p(e,o),p(e,r),p(r,l),a=!0},p(s,[u]){(!a||u&2)&&O(t,"desktop",!s[1]),(!a||u&1)&&Ye(l,s[0])},i(s){a||(d(n.$$.fragment,s),a=!0)},o(s){_(n.$$.fragment,s),a=!1},d(s){s&&C(e),R(n)}}}function Y6(i,e,t){let n,o,r=lt(),l=!!r.webApi.pictureInPictureApi,a=r.interfaceLanguage$;F(i,a,c=>t(5,n=c));let s=r.ui.isMobile;F(i,s,c=>t(1,o=c));let u;return i.$$.update=()=>{i.$$.dirty&32&&t(0,u=n&&z("pip_dummy_title"))},[u,o,l,a,s,n]}var Hf=class extends U{constructor(e){super(),j(this,e,Y6,Q6,H,{},G6)}},p_=Hf;var Z6=460,X6=280,Xl=class{constructor(){this.info={isActive$:new Ll.ValueSubject(!1),type:1}}isSupported(){let{isEmbed:e}=(0,Ll.detectEmbed)();return"documentPictureInPicture"in window&&!Ll.clientChecker.isYandex&&!e}isActive(){return this.isSupported()&&!!documentPictureInPicture.window}setPlayerDomElement(e,t){this.playerDomElement=e,this.playerParentShadowRoot=t}setContext(e){this.svelteContext=e}request(){return ft(this,null,function*(){var r,l;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:Z6,height:X6,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let e=[...this.playerParentShadowRoot.styleSheets].map(a=>[...a.cssRules].map(s=>s.cssText).join(" ")).filter(Boolean).join(`
|
|
52
|
+
);--timeline-preview-shadow:rgba(0, 0, 0, 0.08);--timeline-preview-bg:rgba(34, 34, 34, 1);--mobile-settings-bg:#2C2D2E;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--rotate-transition-duration:0.25s;position:relative;width:100%;height:100%;color:var(--white);font-size:12px;line-height:normal;overflow:hidden;outline:0;user-select:none;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;background:var(--black)}*{-webkit-tap-highlight-color:transparent}button{border:none;margin:0;padding:0;width:auto;overflow:visible;background:transparent;color:inherit;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}svg:not(.interactiveContainer svg){pointer-events:none}*:focus, *:focus-visible{outline:none}*:focus-visible{box-shadow:var(--focused-element-shadow)}.hidden{visibility:hidden;opacity:0}.overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:10000}.out-of-view{position:absolute !important;left:-1000vh !important}`)}function R6(i){let e,t,n;function o(l){i[61](l)}let r={store:i[0],uiConfig:i[35],title:i[1],thumbUrl:i[2],interactiveContainer:i[3],live:i[4],autoplay:i[5],canRewindLive:i[6],showAds:i[7],adsSlotId:i[8],adsParams:i[9],adsPreviewParam:i[10],duration:i[11],logoClickable:i[12],logoHidden:i[13],logoTargetUrl:i[36],showNextPrevButtons:i[15],nextButtonActive:i[16],prevButtonActive:i[17],endScreenVideoTitle:i[18],endScreenVideoThumb:i[19],isOneVideoPlaylist:i[20],supportLink:i[21],shadowRootContainer:i[22],outerContainerRef:i[23],fullScreenTarget:i[24],showMiniTimer:i[25],playerStarted:i[34],playNextVideo:i[26],playPrevVideo:i[27],repeatPlaylist:i[28],seekToInteractive:i[29],toggleGraph:i[30],playPrevChapter:i[31],firstStart:i[38]};return i[33]!==void 0&&(r.videoContainer=i[33]),e=new Op({props:r}),ge.push(()=>Fe(e,"videoContainer",o)),{c(){B(e.$$.fragment)},m(l,a){V(e,l,a),n=!0},p(l,a){let s={};a[0]&1&&(s.store=l[0]),a[0]&2&&(s.title=l[1]),a[0]&4&&(s.thumbUrl=l[2]),a[0]&8&&(s.interactiveContainer=l[3]),a[0]&16&&(s.live=l[4]),a[0]&32&&(s.autoplay=l[5]),a[0]&64&&(s.canRewindLive=l[6]),a[0]&128&&(s.showAds=l[7]),a[0]&256&&(s.adsSlotId=l[8]),a[0]&512&&(s.adsParams=l[9]),a[0]&1024&&(s.adsPreviewParam=l[10]),a[0]&2048&&(s.duration=l[11]),a[0]&4096&&(s.logoClickable=l[12]),a[0]&8192&&(s.logoHidden=l[13]),a[0]&32768&&(s.showNextPrevButtons=l[15]),a[0]&65536&&(s.nextButtonActive=l[16]),a[0]&131072&&(s.prevButtonActive=l[17]),a[0]&262144&&(s.endScreenVideoTitle=l[18]),a[0]&524288&&(s.endScreenVideoThumb=l[19]),a[0]&1048576&&(s.isOneVideoPlaylist=l[20]),a[0]&2097152&&(s.supportLink=l[21]),a[0]&4194304&&(s.shadowRootContainer=l[22]),a[0]&8388608&&(s.outerContainerRef=l[23]),a[0]&16777216&&(s.fullScreenTarget=l[24]),a[0]&33554432&&(s.showMiniTimer=l[25]),a[1]&8&&(s.playerStarted=l[34]),a[0]&67108864&&(s.playNextVideo=l[26]),a[0]&134217728&&(s.playPrevVideo=l[27]),a[0]&268435456&&(s.repeatPlaylist=l[28]),a[0]&536870912&&(s.seekToInteractive=l[29]),a[0]&1073741824&&(s.toggleGraph=l[30]),a[1]&1&&(s.playPrevChapter=l[31]),!t&&a[1]&4&&(t=!0,s.videoContainer=l[33],Oe(()=>t=!1)),e.$set(s)},i(l){n||(d(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){R(e,l)}}}function B6(i){let e,t,n;function o(l){i[60](l)}let r={store:i[0],uiConfig:i[35],thumbUrl:i[2],interactiveContainer:i[3],live:i[4],autoplay:i[5],canRewindLive:i[6],showAds:i[7],adsSlotId:i[8],adsParams:i[9],adsPreviewParam:i[10],duration:i[11],logoClickable:i[12],logoHidden:i[13],logoTargetUrl:i[36],showNextPrevButtons:i[15],nextButtonActive:i[16],prevButtonActive:i[17],endScreenVideoTitle:i[18],endScreenVideoThumb:i[19],isOneVideoPlaylist:i[20],supportLink:i[21],shadowRootContainer:i[22],outerContainerRef:i[23],fullScreenTarget:i[24],showMiniTimer:i[25],playerStarted:i[34],playNextVideo:i[26],playPrevVideo:i[27],repeatPlaylist:i[28],seekToInteractive:i[29],toggleGraph:i[30],playPrevChapter:i[31],firstStart:i[38],seekTime:i[32]};return i[33]!==void 0&&(r.videoContainer=i[33]),e=new o_({props:r}),ge.push(()=>Fe(e,"videoContainer",o)),{c(){B(e.$$.fragment)},m(l,a){V(e,l,a),n=!0},p(l,a){let s={};a[0]&1&&(s.store=l[0]),a[0]&4&&(s.thumbUrl=l[2]),a[0]&8&&(s.interactiveContainer=l[3]),a[0]&16&&(s.live=l[4]),a[0]&32&&(s.autoplay=l[5]),a[0]&64&&(s.canRewindLive=l[6]),a[0]&128&&(s.showAds=l[7]),a[0]&256&&(s.adsSlotId=l[8]),a[0]&512&&(s.adsParams=l[9]),a[0]&1024&&(s.adsPreviewParam=l[10]),a[0]&2048&&(s.duration=l[11]),a[0]&4096&&(s.logoClickable=l[12]),a[0]&8192&&(s.logoHidden=l[13]),a[0]&32768&&(s.showNextPrevButtons=l[15]),a[0]&65536&&(s.nextButtonActive=l[16]),a[0]&131072&&(s.prevButtonActive=l[17]),a[0]&262144&&(s.endScreenVideoTitle=l[18]),a[0]&524288&&(s.endScreenVideoThumb=l[19]),a[0]&1048576&&(s.isOneVideoPlaylist=l[20]),a[0]&2097152&&(s.supportLink=l[21]),a[0]&4194304&&(s.shadowRootContainer=l[22]),a[0]&8388608&&(s.outerContainerRef=l[23]),a[0]&16777216&&(s.fullScreenTarget=l[24]),a[0]&33554432&&(s.showMiniTimer=l[25]),a[1]&8&&(s.playerStarted=l[34]),a[0]&67108864&&(s.playNextVideo=l[26]),a[0]&134217728&&(s.playPrevVideo=l[27]),a[0]&268435456&&(s.repeatPlaylist=l[28]),a[0]&536870912&&(s.seekToInteractive=l[29]),a[0]&1073741824&&(s.toggleGraph=l[30]),a[1]&1&&(s.playPrevChapter=l[31]),!t&&a[1]&4&&(t=!0,s.videoContainer=l[33],Oe(()=>t=!1)),e.$set(s)},i(l){n||(d(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){R(e,l)}}}function D6(i){let e,t,n,o,r=[B6,R6],l=[];function a(s,u){return s[14]?0:1}return t=a(i,[-1,-1,-1]),n=l[t]=r[t](i),{c(){e=T("div"),n.c(),f(e,"class","root svelte-xfba9d")},m(s,u){S(s,e,u),l[t].m(e,null),o=!0},p(s,u){let c=t;t=a(s,u),t===c?l[t].p(s,u):(ce(),_(l[c],1,1,()=>{l[c]=null}),de(),n=l[t],n?n.p(s,u):(n=l[t]=r[t](s),n.c()),d(n,1),n.m(e,null))},i(s){o||(d(n),o=!0)},o(s){_(n),o=!1},d(s){s&&C(e),l[t].d()}}}function N6(i,e,t){let n,{sources:o}=e,{store:r}=e,{microStoresRoot:l}=e,{videoConfig:a}=e,{uiConfig:s}=e,{title:u}=e,{thumbUrl:c}=e,{interactiveContainer:m}=e,{subtitles:h}=e,{live:w}=e,{preload:b}=e,{autoplay:k}=e,{volume:y=void 0}=e,{muted:I=void 0}=e,{fromTime:v}=e,{canRewindLive:g}=e,{showAds:P}=e,{adsSlotId:M=void 0}=e,{adsParams:A=void 0}=e,{adsPreviewParam:q=void 0}=e,{duration:ie=void 0}=e,{logoClickable:me}=e,{logoHidden:Y}=e,{isMobile:x}=e,{showNextPrevButtons:L=!1}=e,{nextButtonActive:$=!1}=e,{prevButtonActive:ae=!1}=e,{endScreenVideoTitle:Z=void 0}=e,{endScreenVideoThumb:K=void 0}=e,{isOneVideoPlaylist:G=!1}=e,{supportLink:Q}=e,{shadowRootContainer:X=void 0}=e,{outerContainerRef:fe=void 0}=e,{fullScreenTarget:Re=void 0}=e,{failoverHosts:it=void 0}=e,{showMiniTimer:Pe=!1}=e,{saveRate:Ve}=e,{playNextVideo:Ne=xn.noop}=e,{playPrevVideo:Je=xn.noop}=e,{repeatPlaylist:re=xn.noop}=e,{seekToInteractive:pe=xn.noop}=e,{toggleGraph:st=xn.noop}=e,{playPrevChapter:ke=xn.noop}=e,{volumeMultiplier:Ue}=e,{subscribers:ht,stores:Ze}=l;uc(s);let He=Yt(),$e=s.logoLink,ot=r.ui.debugPanelVisible,ue=r.ui.playerSize,Se=r.state.isLive$;F(i,Se,ve=>t(63,n=ve));let ze,W=null,be=!1;r.getAdmanWrapper().init({switchFromAdsToVideo:r.actions.internal.switchFromAdsToVideo,switchFromVideoToAds:r.actions.internal.switchFromVideoToAds,setMuted:r.actions.external.setMuted},r.ads,{isMobile:r.ui.isMobile,mobileUnmuteButtonVisible:r.ui.mobileUnmuteButtonVisible,vsid:r.vsid}),yc(r,Ze);let xe=(ve=!1)=>{t(34,be=!0),ve?r.actions.external.firstStart(P):r.actions.internal.firstStart(P)};function dt(ve){var gi;let Qe=o||ve;Qe&&r.initVideo({container:ze,sources:Qe,failoverHosts:it,subtitles:h,volumeMultiplier:Ue});let _t=xn.safeStorage.get(zl)==="true";ot.set(_t),v>0&&r.actions.external.seekTime(v);let ut=x?He.volumeDefault:(gi=y!=null?y:_r())!=null?gi:He.volumeDefault,Xe=I!=null?I:Bc();if(r.actions.external.setVolume(ut),r.actions.external.setMuted(Xe),r.getAdmanWrapper().setInitialVolume(Xe?0:ut),He.features.trafficSaving){let Ft=Nc();Ft&&r.actions.internal.setTrafficSavingEnabled(Ft)}if(He.features.saveRate&&Ve){let Ft=Fc();Ft&&!n&&r.actions.internal.setPlaybackRate(Ft)}let Pt=Mc(r.videoId);Pt&&r.actions.internal.setQuality(Pt),r.ui.isAutoplay.set(k),k?xe():b&&He.features.preload&&r.actions.internal.preload()}let bt=ve=>{if(window.ResizeObserver){let Qe,_t;W=new ResizeObserver((0,xn.throttleFn)(ut=>{let Xe=ut[0];if(Xe){if(Xe.contentBoxSize){let Pt=Array.isArray(Xe.contentBoxSize)?Xe.contentBoxSize[0]:Xe.contentBoxSize;Qe=Pt.inlineSize,_t=Pt.blockSize}else Xe.contentRect&&(Qe=Xe.contentRect.width,_t=Xe.contentRect.height);ue.set({width:Qe,height:_t})}},300)),W.observe(ve)}ue.set({width:ve.clientWidth,height:ve.clientHeight})};Ut(()=>{bt(ze);let ve=ht.map(_t=>_t.init({store:r,microStores:Ze,config:a}));if((w==null?void 0:w.status)==="upcoming"){r.actions.internal.setLiveWaitingStart(!0);return}if((w==null?void 0:w.status)==="waiting"){r.actions.internal.setLiveWaitingRecover(!0);return}if(((w==null?void 0:w.status)==="finished"||(w==null?void 0:w.status)==="postlive")&&!Object.keys(o||[]).length){r.actions.internal.setLiveWaitingRecord(!0);return}return dt(),()=>{W==null||W.disconnect(),ve.forEach(_t=>_t.unsubscribe()),r.destroy()}});function he(){be?r.actions.external.play():xe(!0)}function mt(){r.actions.external.pause()}function Et(ve){x||r.actions.external.setMuted(ve)}function Tt(ve){x||ve>=0&&ve<=1&&r.actions.external.setVolume(ve)}function Ke(ve){r.actions.internal.seekTime(ve,l_.SeekAction.UNKNOWN)}function Xt(ve){r.actions.external.seekEpisodeStartTime(ve)}function qt(){r.actions.external.returnFocusToEpisodes()}function Lt(ve){r.actions.external.setPlaybackRate(ve)}function ii(ve){r.actions.external.setAutoQualityLimits(ve)}function Ot(ve){ze=ve,t(33,ze)}function Qt(ve){ze=ve,t(33,ze)}return i.$$set=ve=>{"sources"in ve&&t(39,o=ve.sources),"store"in ve&&t(0,r=ve.store),"microStoresRoot"in ve&&t(40,l=ve.microStoresRoot),"videoConfig"in ve&&t(41,a=ve.videoConfig),"uiConfig"in ve&&t(42,s=ve.uiConfig),"title"in ve&&t(1,u=ve.title),"thumbUrl"in ve&&t(2,c=ve.thumbUrl),"interactiveContainer"in ve&&t(3,m=ve.interactiveContainer),"subtitles"in ve&&t(43,h=ve.subtitles),"live"in ve&&t(4,w=ve.live),"preload"in ve&&t(44,b=ve.preload),"autoplay"in ve&&t(5,k=ve.autoplay),"volume"in ve&&t(45,y=ve.volume),"muted"in ve&&t(46,I=ve.muted),"fromTime"in ve&&t(47,v=ve.fromTime),"canRewindLive"in ve&&t(6,g=ve.canRewindLive),"showAds"in ve&&t(7,P=ve.showAds),"adsSlotId"in ve&&t(8,M=ve.adsSlotId),"adsParams"in ve&&t(9,A=ve.adsParams),"adsPreviewParam"in ve&&t(10,q=ve.adsPreviewParam),"duration"in ve&&t(11,ie=ve.duration),"logoClickable"in ve&&t(12,me=ve.logoClickable),"logoHidden"in ve&&t(13,Y=ve.logoHidden),"isMobile"in ve&&t(14,x=ve.isMobile),"showNextPrevButtons"in ve&&t(15,L=ve.showNextPrevButtons),"nextButtonActive"in ve&&t(16,$=ve.nextButtonActive),"prevButtonActive"in ve&&t(17,ae=ve.prevButtonActive),"endScreenVideoTitle"in ve&&t(18,Z=ve.endScreenVideoTitle),"endScreenVideoThumb"in ve&&t(19,K=ve.endScreenVideoThumb),"isOneVideoPlaylist"in ve&&t(20,G=ve.isOneVideoPlaylist),"supportLink"in ve&&t(21,Q=ve.supportLink),"shadowRootContainer"in ve&&t(22,X=ve.shadowRootContainer),"outerContainerRef"in ve&&t(23,fe=ve.outerContainerRef),"fullScreenTarget"in ve&&t(24,Re=ve.fullScreenTarget),"failoverHosts"in ve&&t(48,it=ve.failoverHosts),"showMiniTimer"in ve&&t(25,Pe=ve.showMiniTimer),"saveRate"in ve&&t(49,Ve=ve.saveRate),"playNextVideo"in ve&&t(26,Ne=ve.playNextVideo),"playPrevVideo"in ve&&t(27,Je=ve.playPrevVideo),"repeatPlaylist"in ve&&t(28,re=ve.repeatPlaylist),"seekToInteractive"in ve&&t(29,pe=ve.seekToInteractive),"toggleGraph"in ve&&t(30,st=ve.toggleGraph),"playPrevChapter"in ve&&t(31,ke=ve.playPrevChapter),"volumeMultiplier"in ve&&t(50,Ue=ve.volumeMultiplier)},i.$$.update=()=>{i.$$.dirty[0]&16385&&r.ui.isMobile.set(x)},[r,u,c,m,w,k,g,P,M,A,q,ie,me,Y,x,L,$,ae,Z,K,G,Q,X,fe,Re,Pe,Ne,Je,re,pe,st,ke,Ke,ze,be,He,$e,Se,xe,o,l,a,s,h,b,y,I,v,it,Ve,Ue,dt,he,mt,Et,Tt,Xt,qt,Lt,ii,Ot,Qt]}var Df=class extends U{constructor(e){super(),j(this,e,N6,D6,H,{sources:39,store:0,microStoresRoot:40,videoConfig:41,uiConfig:42,title:1,thumbUrl:2,interactiveContainer:3,subtitles:43,live:4,preload:44,autoplay:5,volume:45,muted:46,fromTime:47,canRewindLive:6,showAds:7,adsSlotId:8,adsParams:9,adsPreviewParam:10,duration:11,logoClickable:12,logoHidden:13,isMobile:14,showNextPrevButtons:15,nextButtonActive:16,prevButtonActive:17,endScreenVideoTitle:18,endScreenVideoThumb:19,isOneVideoPlaylist:20,supportLink:21,shadowRootContainer:22,outerContainerRef:23,fullScreenTarget:24,failoverHosts:48,showMiniTimer:25,saveRate:49,playNextVideo:26,playPrevVideo:27,repeatPlaylist:28,seekToInteractive:29,toggleGraph:30,playPrevChapter:31,volumeMultiplier:50,initVideo:51,play:52,pause:53,setMuted:54,setVolume:55,seekTime:32,seekEpisodeStartTime:56,returnFocusToEpisodes:57,setPlaybackRate:58,setAutoQualityLimits:59},V6,[-1,-1,-1])}get initVideo(){return this.$$.ctx[51]}get play(){return this.$$.ctx[52]}get pause(){return this.$$.ctx[53]}get setMuted(){return this.$$.ctx[54]}get setVolume(){return this.$$.ctx[55]}get seekTime(){return this.$$.ctx[32]}get seekEpisodeStartTime(){return this.$$.ctx[56]}get returnFocusToEpisodes(){return this.$$.ctx[57]}get setPlaybackRate(){return this.$$.ctx[58]}get setAutoQualityLimits(){return this.$$.ctx[59]}},r_=Df;function q6(i){let e,t,n,o=i[2].default,r=Ee(o,i,i[1],null),l=[{xmlns:"http://www.w3.org/2000/svg"},{width:"57"},{height:"60"},{fill:"none"},{"aria-hidden":"true"},{"data-testid":"stub-icon"},{role:"img"},i[0]],a={};for(let s=0;s<l.length;s+=1)a=se(a,l[s]);return{c(){e=N("svg"),r&&r.c(),t=N("path"),f(t,"fill","currentColor"),f(t,"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"),we(e,a)},m(s,u){S(s,e,u),r&&r.m(e,null),p(e,t),n=!0},p(s,[u]){r&&r.p&&(!n||u&2)&&Ae(r,o,s,s[1],n?Le(o,s[1],u,null):Me(s[1]),null),we(e,a=De(l,[{xmlns:"http://www.w3.org/2000/svg"},{width:"57"},{height:"60"},{fill:"none"},{"aria-hidden":"true"},{"data-testid":"stub-icon"},{role:"img"},u&1&&s[0]]))},i(s){n||(d(r,s),n=!0)},o(s){_(r,s),n=!1},d(s){s&&C(e),r&&r.d(s)}}}function O6(i,e,t){let{$$slots:n={},$$scope:o}=e;return i.$$set=r=>{t(0,e=se(se({},e),ye(r))),"$$scope"in r&&t(1,o=r.$$scope)},e=ye(e),[e,o,n]}var Nf=class extends U{constructor(e){super(),j(this,e,O6,q6,H,{})}},s_=Nf;function F6(i){let e,t;return e=new s_({props:{style:i[0]}}),{c(){B(e.$$.fragment)},m(n,o){V(e,n,o),t=!0},p(n,[o]){let r={};o&1&&(r.style=n[0]),e.$set(r)},i(n){t||(d(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){R(e,n)}}}function H6(i,e,t){let n,{isWhite:o=!1}=e;return i.$$set=r=>{"isWhite"in r&&t(1,o=r.isWhite)},i.$$.update=()=>{i.$$.dirty&2&&t(0,n=o?"color: #fff;":"color: #909499;")},[n,o]}var qf=class extends U{constructor(e){super(),j(this,e,H6,F6,H,{isWhite:1})}},a_=qf;function z6(i){Te(i,"svelte-1y9fytq",".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 u_(i){let e,t;return{c(){e=T("div"),t=Be(i[0]),f(e,"class","title svelte-1y9fytq")},m(n,o){S(n,e,o),p(e,t)},p(n,o){o&1&&Ye(t,n[0])},d(n){n&&C(e)}}}function f_(i){let e,t;return e=new a_({props:{isWhite:!!i[1]}}),{c(){B(e.$$.fragment)},m(n,o){V(e,n,o),t=!0},p(n,o){let r={};o&2&&(r.isWhite=!!n[1]),e.$set(r)},i(n){t||(d(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){R(e,n)}}}function U6(i){let e,t,n,o,r=i[0]&&u_(i),l=(!i[0]||!i[1])&&f_(i);return{c(){e=T("div"),r&&r.c(),t=D(),l&&l.c(),f(e,"class","playerStub svelte-1y9fytq"),f(e,"style",n=i[1]?`background-image: url('${i[1]}')`:"")},m(a,s){S(a,e,s),r&&r.m(e,null),p(e,t),l&&l.m(e,null),o=!0},p(a,[s]){a[0]?r?r.p(a,s):(r=u_(a),r.c(),r.m(e,t)):r&&(r.d(1),r=null),!a[0]||!a[1]?l?(l.p(a,s),s&3&&d(l,1)):(l=f_(a),l.c(),d(l,1),l.m(e,null)):l&&(ce(),_(l,1,1,()=>{l=null}),de()),(!o||s&2&&n!==(n=a[1]?`background-image: url('${a[1]}')`:""))&&f(e,"style",n)},i(a){o||(d(l),o=!0)},o(a){_(l),o=!1},d(a){a&&C(e),r&&r.d(),l&&l.d()}}}function K6(i,e,t){let{title:n}=e,{thumbUrl:o}=e;return i.$$set=r=>{"title"in r&&t(0,n=r.title),"thumbUrl"in r&&t(1,o=r.thumbUrl)},[n,o]}var Of=class extends U{constructor(e){super(),j(this,e,K6,U6,H,{title:0,thumbUrl:1},z6)}},c_=Of;var Yi=require("@vkontakte/videoplayer-shared"),VN=require("@vkontakte/videoplayer-core"),Rl=require("@vkontakte/videoplayer-statistics");var d_=require("@vkontakte/videoplayer-shared"),Cs=class{constructor(){this.subscription=new d_.Subscription}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:t="",thumbUrl:n=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:t,artwork:[{src:n,sizes:"96x96",type:"image/png"},{src:n,sizes:"128x128",type:"image/png"},{src:n,sizes:"192x192",type:"image/png"},{src:n,sizes:"256x256",type:"image/png"},{src:n,sizes:"384x384",type:"image/png"},{src:n,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",t=>null],["seekbackward",t=>null],["seekforward",t=>null]];this.setActionHandlers(e)}setActionHandlers(e){if(this.isSupported())for(let[t,n]of e)try{navigator.mediaSession.setActionHandler(t,n)}catch(o){throw new Error(`The media session action "${t}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||this.subscription.add(e.state.positionExact$.subscribe(t=>{let n=et(e.state.currentPlaybackRate$),o=et(e.state.duration$);!isFinite(t)||!isFinite(o)||navigator.mediaSession.setPositionState({position:t,playbackRate:n,duration:o})}))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};var Ll=require("@vkontakte/videoplayer-shared");function j6(i){let e,t,n,o,r,l=i[2].default,a=Ee(l,i,i[1],null),s=[{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[0]],u={};for(let c=0;c<s.length;c+=1)u=se(u,s[c]);return{c(){e=N("svg"),a&&a.c(),t=N("g"),n=N("path"),o=N("path"),f(n,"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"),f(o,"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"),f(t,"fill","#fff"),we(e,u)},m(c,m){S(c,e,m),a&&a.m(e,null),p(e,t),p(t,n),p(t,o),r=!0},p(c,[m]){a&&a.p&&(!r||m&2)&&Ae(a,l,c,c[1],r?Le(l,c[1],m,null):Me(c[1]),null),we(e,u=De(s,[{xmlns:"http://www.w3.org/2000/svg"},{width:"57"},{height:"56"},{fill:"none"},{"aria-label":"dummy-image"},{"data-testid":"pip-dummy-icon"},{role:"img"},m&1&&c[0]]))},i(c){r||(d(a,c),r=!0)},o(c){_(a,c),r=!1},d(c){c&&C(e),a&&a.d(c)}}}function W6(i,e,t){let{$$slots:n={},$$scope:o}=e;return i.$$set=r=>{t(0,e=se(se({},e),ye(r))),"$$scope"in r&&t(1,o=r.$$scope)},e=ye(e),[e,o,n]}var Ff=class extends U{constructor(e){super(),j(this,e,W6,j6,H,{})}},m_=Ff;function G6(i){Te(i,"svelte-1pbsod4",".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 Q6(i){let e,t,n,o,r,l,a;return n=new m_({}),{c(){e=T("div"),t=T("div"),B(n.$$.fragment),o=D(),r=T("span"),l=Be(i[0]),f(t,"class","dummy-image svelte-1pbsod4"),O(t,"desktop",!i[1]),f(r,"class","title svelte-1pbsod4"),f(e,"class","player-pip-dummy svelte-1pbsod4"),O(e,"is-pip-api",i[2])},m(s,u){S(s,e,u),p(e,t),V(n,t,null),p(e,o),p(e,r),p(r,l),a=!0},p(s,[u]){(!a||u&2)&&O(t,"desktop",!s[1]),(!a||u&1)&&Ye(l,s[0])},i(s){a||(d(n.$$.fragment,s),a=!0)},o(s){_(n.$$.fragment,s),a=!1},d(s){s&&C(e),R(n)}}}function Y6(i,e,t){let n,o,r=lt(),l=!!r.webApi.pictureInPictureApi,a=r.interfaceLanguage$;F(i,a,c=>t(5,n=c));let s=r.ui.isMobile;F(i,s,c=>t(1,o=c));let u;return i.$$.update=()=>{i.$$.dirty&32&&t(0,u=n&&z("pip_dummy_title"))},[u,o,l,a,s,n]}var Hf=class extends U{constructor(e){super(),j(this,e,Y6,Q6,H,{},G6)}},p_=Hf;var Z6=460,X6=280,Xl=class{constructor(){this.info={isActive$:new Ll.ValueSubject(!1),type:1}}isSupported(){let{isEmbed:e}=(0,Ll.detectEmbed)();return"documentPictureInPicture"in window&&!Ll.clientChecker.isYandex&&!e}isActive(){return this.isSupported()&&!!documentPictureInPicture.window}setPlayerDomElement(e,t){this.playerDomElement=e,this.playerParentShadowRoot=t}setContext(e){this.svelteContext=e}request(){return ft(this,null,function*(){var r,l;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:Z6,height:X6,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let e=[...this.playerParentShadowRoot.styleSheets].map(a=>[...a.cssRules].map(s=>s.cssText).join(" ")).filter(Boolean).join(`
|
|
53
53
|
`),t=document.createElement("style");t.textContent=e;let n=this.createStretchedContainer(),o=n.attachShadow({mode:"open"});o.append(t),o.append(this.playerDomElement),this.playerDummyElement=new p_({target:this.playerParentShadowRoot,context:this.svelteContext}),(r=this.pipWindow)==null||r.document.body.append(n),this.info.isActive$.next(!0),(l=this.pipWindow)==null||l.addEventListener("unload",a=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(this.playerDummyElement.$destroy(),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1))})})}remove(){return ft(this,null,function*(){return new Promise(e=>{var t;(t=documentPictureInPicture.window)==null||t.close(),e()})})}dispose(){return ft(this,null,function*(){yield this.remove()})}createStretchedContainer(){let e=document.createElement("div");return e.style.width="100%",e.style.height="100%",e}};function __(i){return i instanceof Xl}var Ss=class{static getLatestSupportedVersion(){let e=new zo,t=new Xl;if(t.isSupported())return t;if(e.isSupported())return e}};function zf(i,e){var o,r;let t=new Set([...Object.keys(i),...Object.keys(e)]),n={};for(let l of t)n[l]=(r=(o=e[l])!=null?o:i[l])!=null?r:void 0;return n}var h_="Inner error. Unexpectedly root annotation container null reference exception",g_="Annotation with such name already exists",b_="Annotation with such name does not exist";var Al=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};var Ml=require("@vkontakte/videoplayer-shared"),J6="1",x6=100,Ts=class{constructor(e){this.annotations=new Map;this.subscriptions=new Ml.Subscription;this.rootAnnotationsContainer=e;let t=(0,Ml.throttleFn)(()=>{for(let n of this.annotations.values())this.isElementExceedsBoundaries(n,this.playerSize.width,this.playerSize.height)?n.style.visibility="hidden":n.style.visibility="visible"},x6);this.subscriptions.add((0,Ml.observeElementSize)(this.rootAnnotationsContainer).subscribe(({width:n,height:o})=>{this.playerSize={width:n,height:o},t()})),this.mutationObserver=new MutationObserver(t),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,t){var n;if(!this.rootAnnotationsContainer)throw new Al(h_);if(this.annotations.has(e))throw new Al(g_);t.style.zIndex=(n=t.style.zIndex)!=null?n:J6,t.style.position="absolute",this.rootAnnotationsContainer.append(t),this.annotations.set(e,t)}get(e){let t=this.annotations.get(e);if(!t)throw new Al(b_);return t}remove(e){let t=this.get(e);this.annotations.delete(e)&&t.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,t,n){let o=e.offsetTop,r=e.offsetLeft,l=e.offsetWidth,a=e.offsetHeight;return o<0||r<0||r+l>t||o+a>n}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};var Vl=require("@vkontakte/videoplayer-shared"),io=class{init({store:e,microStores:t,config:n}){return(0,Vl.assertNonNullable)(e),(0,Vl.assertNonNullable)(t),(0,Vl.assertNonNullable)(n),this.subscription=new Vl.Subscription,this.subscription}};var Jl=class extends io{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Nt(rt({},qe(null)),{toggle:()=>this.state$.update(t=>!t)})}init(t){let n=super.init(t),{isInteractiveExpectation$:o}=t.store.state;return n.add(o.subscribe(r=>{this.state$.set(r?!0:null)})),n}};var xl=class extends io{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Nt(rt({},qe(null)),{toggle:()=>this.state$.update(t=>!t)})}init(t){let n=super.init(t),{microStores:o,store:r}=t,{fakeIsPlaying$:l}=o,{isInteractiveExpectation$:a,isPlaying$:s}=r.state,{controlsVisible:u,isMobile:c}=r.ui,m=et(c),h=()=>m&&et(u);return n.add(u.subscribe(w=>{if(!m)return;let b=et(l);et(s)?this.state$.set(w):b!==null&&this.state$.set(!b||w)})),n.add(s.subscribe(w=>{this.state$.set(!w||h())})),n.add(l.subscribe(w=>{if(w===null)return;let b=et(a);if(h()){this.state$.set(!0);return}b&&this.state$.set(!w)})),n}};var $l=class extends io{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=qe("tooltip_chapter_without_interactive")}init(t){let n=super.init(t),{store:o}=t;return n.add(o.state.interactiveEpisodes$.subscribe(r=>{r.length&&(r.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),n}};var v_=require("@vkontakte/videoplayer-shared");var Uf=qe(!1),Ps=null,er=class extends io{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Nt(rt({},Uf),{set:(t,n=!1)=>{t!==et(Uf)&&(this.clearTimeout(),Uf.set(t),!t&&Ps&&(Ps=!1),t&&n&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(t){let n=super.init(t),{store:o,config:r}=t,{isInteractiveTime$:l,isPlaying$:a}=o.state,s=o.ui.controlsVisible,{interactiveTimeIndicator:u}=o.ui.controls;n.add(s.subscribe(m=>{et(l)&&m&&this.state$.set(!1)}));let c=(r==null?void 0:r.interactiveData)||{tooltipHelpHintActive:!1};return n.add((0,v_.combine)({isPlaying$:a,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:m,isInteractiveTime$:h,interactiveTimeIndicator:w})=>{var b,k;if(!(!m||!(w!=null&&w.isDisplayed))){if(!h)return this.state$.set(!1);c.tooltipHelpHintActive&&Ps===null&&(Ps=!0,c.tooltipHelpHintActive=!1,this.state$.set(!0),(k=(b=o.callbacks)==null?void 0:b.onInteractiveTimeIndicatorHintDeactivated)==null||k.call(b))}})),n}clearTimeout(){window.clearTimeout(this.timeout)}};var y_=()=>[Jl,xl,$l,er].reduce(({subscribers:i,stores:e},t)=>{let n=new t;return{subscribers:[...i,n],stores:Nt(rt({},e),{[n.stateName]:n.state$})}},{subscribers:[],stores:{}});var $6={preload:!0,autoplay:!1,repeat:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Yi.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isMobile:(0,Yi.isMobile)(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1},Is=class extends HTMLElement{constructor(){var t;super();this.currentPlayingVideoIndex=0;this.needToRepeatPlaylist=!1;this.videoConfig=void 0;this.pictureInPictureApi=void 0;this.mediaSessionApi=void 0;this.unsubscribePlayerPhaseSubscription=void 0;this.annotationsApi=void 0;this.prevIsid=void 0;this.isInited=!1;this.logger=new Yi.Logger,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Yi.Subscription,this.graphMadePause=!1,(t=window==null?void 0:window.videoPlayerConfig)!=null&&t.debugLogs&&this.subscription.add(this.logger.log$.subscribe(n=>{console.log("%c player web component ","background:#77dd77;",`${n.component}`,n.message)}))}connectedCallback(){var o,r;if(this.isInited)return;this.initPlayerRootContainers();let t=(o=this.getAttribute("stub-title"))!=null?o:void 0,n=(r=this.getAttribute("stub-thumb-url"))!=null?r:void 0;this.svelteStubComponent=new c_({target:this.playerContainer,props:{title:t,thumbUrl:n}})}disconnectedCallback(){var t,n,o,r,l,a;(t=this.annotationsApi)==null||t.destroy(),(n=this.mediaSessionApi)==null||n.destroy(),(o=this.svelteRootComponent)==null||o.$destroy(),(r=this.svelteStubComponent)==null||r.$destroy(),this.subscription.unsubscribe(),(l=this.unsubscribePlayerPhaseSubscription)==null||l.call(this),(a=this.interactiveController)==null||a.destroy()}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.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:!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(t){var o;let n=(o=this.store)==null?void 0:o.ui.controls.disabledControls$;return(n==null?void 0:n.includes(t))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let t=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:t.title,nextVideoThumb:t.thumbUrl}}createPlayer(t,n={},o){var mt,Et,Tt,Ke,Xt,qt,Lt,ii,Ot,Qt,ve,Qe,_t;if(!this.videoConfig)return;let{albumId:r,statPlace:l,statUserSalt:a,statAuthToken:s,statTrackCode:u,refreshStatAuthToken:c,preload:m,autoplay:h,volume:w,muted:b,fromTime:k,canRewindLive:y,supportLink:I,showAds:v,adsSlotId:g,adsParams:P={},adsPreviewParam:M,interfaceLanguage:A,isCyrillicRelatedInterface:q,logoClickable:ie,logoHidden:me,isMobile:Y,isAudioDisabled:x,isLiveCatchUpMode:L,fullScreenTarget:$,failoverHosts:ae,canDownload:Z,callbacks:K,interactiveData:G,showThumbTimer:Q,additionalButtons:X=[],repeat:fe,saveRate:Re,volumeMultiplier:it}=zf(this.videoConfig,n),{sources:Pe,title:Ve,thumbUrl:Ne,unitedVideoId:Je,isClip:re=!1,duration:pe,adsParams:st={},videoEpisodes:ke,previewThumbsData:Ue,subtitles:ht,live:Ze}=t,He=rt(rt({},P),st),$e=this.getNextVideoInfo(),ot={sources:Pe,title:Ve,thumbUrl:Ne,subtitles:ht,unitedVideoId:Je,isClip:re,live:Ze,albumId:r,statPlace:l,autoplay:h,muted:b,volume:w,fromTime:k,canRewindLive:y,showAds:v,adsSlotId:g,adsParams:He,adsPreviewParam:M,duration:pe,logoClickable:ie,logoHidden:me,isMobile:Y,repeat:fe,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:$e.nextVideoTitle,endScreenVideoThumb:$e.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},ue={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi};this.log({message:`create player, props: ${JSON.stringify(ot)}`});let Se=this.uiConfig.features.statistics&&!!Je,{pid:ze}=((Et=(mt=this.videoConfig)==null?void 0:mt.interactiveData)==null?void 0:Et.projectInfo)||{};Se&&(this.statistics=new us(rt({movieId:Je,albumId:r,place:l,trackCode:u,autoplay:(Tt=h&&!this.interactiveController)!=null?Tt:!1,mobile:Y,clip:re,refDomain:this.videoConfig.refDomain,deviceId:this.videoConfig.deviceId},ze&&!this.isInited&&{projectId:Number(ze)}),rt({refreshAuthToken:c,userSalt:a,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Ho(this.uiConfig.sentry,{version:Oo,env:mr},{movieId:Je,albumId:r,place:l,autoplay:(Ke=h&&!this.interactiveController)!=null?Ke:!1,mobile:Y,clip:re}),this.interactiveController&&((qt=this.prevIsid)!=null||(this.prevIsid=(Xt=this.statistics)==null?void 0:Xt.oneStat.isid$.getValue())),this.sentry=rt(rt({},this.sentry),Ho.getInstance());let be=!!G,xe=[],dt="tooltip_interactive_go_back_disabled_first";if(be&&this.interactiveController){let ut=this.interactiveController.state.isInitialChapter$.getValue(),Xe=this.interactiveController.getHistoryState();ut&&xe.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||xe.push("SEEK_TO_INTERACTIVE_BUTTON"),Xe.hasPrevChapter$.getValue()||(xe.push("PLAY_PREV_CHAPTER_BUTTON"),ut||(Xe.isGoBackLimited$.getValue()?dt="tooltip_interactive_go_back_disabled_limit":dt="tooltip_interactive_go_back_disabled"))}let bt=()=>{var Xe;this.isInited=!1,this.prevIsid=void 0;let ut=(o==null?void 0:o.info.isEnded$.getValue())&&((Xe=this.interactiveController)==null?void 0:Xe.state.isEndChapter$.getValue());K.onReplayInteractiveVideo&&!ut?K.onReplayInteractiveVideo():this.replayInteractiveVideo()};this.store=Fm({player:o,interfaceLanguage:A,isCyrillicRelatedInterface:q,videoId:Je,isClip:re,isLiveCatchUpMode:L,isAudioDisabled:x,statAuthToken:s,callbacks:K,webApi:ue,videoEpisodes:ke,previewThumbsData:Ue,canDownload:Z,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:xe,isInteractive:be,saveRate:Re,interactiveRanges$:(Lt=this.interactiveController)==null?void 0:Lt.state.interactiveRanges$,isInteractiveTime$:(ii=this.interactiveController)==null?void 0:ii.state.isInteractiveTime$,replayInteractive:bt,playPrevChapterDisabledTooltip:dt,hasInteractiveBranches:!!((Qt=(Ot=this.interactiveController)==null?void 0:Ot.getChapterBranches())!=null&&Qt.length),additionalButtons:this.uiConfig.features.additionalButtons?X:[],looped:fe&&this.videoConfig.videos.length===1,statistics:this.statistics});let{stores:he}=this.microStoresRoot=y_();this.subscription.add(this.store.state.currentFormat$.subscribe(ut=>{var Xe;return(Xe=K==null?void 0:K.onCurrentFormatChanged)==null?void 0:Xe.call(K,ut)})),this.subscription.add(he.interactiveControlsOpacity$.subscribe(ut=>{var Xe;ut!==null&&((Xe=this==null?void 0:this.interactiveController)==null||Xe.setDisabledControls(ut))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(ut=>{var Xe;return(Xe=K==null?void 0:K.onThroughputEstimationChanged)==null?void 0:Xe.call(K,ut)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(ut=>{var Xe;return(Xe=K==null?void 0:K.onTrafficSavingEnabledChanged)==null?void 0:Xe.call(K,ut)})),this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(ut=>{var Xe;return(Xe=K==null?void 0:K.onCurrentPlaybackRateChanged)==null?void 0:Xe.call(K,ut)})),this.subscription.add(this.store.state.volume$.subscribe(ut=>{var Xe;return(Xe=K==null?void 0:K.onVolumeChange)==null?void 0:Xe.call(K,ut)})),this.subscription.add(this.store.state.muted$.subscribe(ut=>{var Xe,Pt;return ut?(Xe=K==null?void 0:K.onMute)==null?void 0:Xe.call(K):(Pt=K==null?void 0:K.onUnmute)==null?void 0:Pt.call(K)})),this.subscription.add(this.store.state.videoBitrate$.subscribe(ut=>{var Xe;return(Xe=K==null?void 0:K.onVideoBitrateChanged)==null?void 0:Xe.call(K,ut)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(ut=>{var Pt;let Xe=(Pt=this.store)==null?void 0:Pt.ui.controls.disabledControls$;Xe&&(ut&&!Xe.includes(Ul)&&Xe.add(Ul),ut||Xe.remove(Ul))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(ut=>ft(this,null,function*(){var Pt;if(!Yi.clientChecker.isSamsungBrowser||!ut||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((Pt=this.videoConfig)==null?void 0:Pt.callbacks.onExternalFullscreenExit))}))),this.subscription.add(this.statistics.oneStat.vsid$.subscribe(ut=>{var Xe;return(Xe=K==null?void 0:K.onVSIDChanged)==null?void 0:Xe.call(K,ut)})),this.initMediaSession(),this.interactiveController&&Se&&this.initInteractivesStatistics(),this.svelteRootComponent=new r_({target:this.playerContainer,props:{interactiveContainer:this.interactiveContainer,sources:Pe,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Ve,thumbUrl:Ne,subtitles:ht,live:Ze,preload:m,autoplay:h,muted:b,volume:w,fromTime:k,canRewindLive:y,supportLink:I,showAds:v,adsSlotId:g,adsParams:He,adsPreviewParam:M,duration:pe,logoClickable:ie,logoHidden:me,isMobile:Y,failoverHosts:ae,fullScreenTarget:$,saveRate:Re,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Q,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:$e.nextVideoTitle,endScreenVideoThumb:$e.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playNextVideo:()=>this.playNextVideo(),playPrevVideo:()=>this.playPrevVideo(),repeatPlaylist:()=>this.repeatPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),toggleGraph:()=>this.toggleGraph(),volumeMultiplier:it}}),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(_t=(Qe=(ve=this.videoConfig)==null?void 0:ve.callbacks)==null?void 0:Qe.onInited)==null||_t.call(Qe))}addPlayerInfoSubscriptions(){var r;let t=this.store;if(!t)return;let n=(r=this.videoConfig)==null?void 0:r.callbacks;n&&this.subscription.add(t.playerPhase.subscribe(l=>{var a;return(a=n.onPlayerPhaseChanged)==null?void 0:a.call(n,l)})).add(t.state.playbackState$.subscribe(l=>{var a;return(a=n.onPlaybackStateChanged)==null?void 0:a.call(n,l)})).add(t.state.isLive$.subscribe(l=>{var a;return(a=n.onIsLiveChanged)==null?void 0:a.call(n,l)})).add(t.state.isActiveLive$.subscribe(l=>{var a;return(a=n.onIsActiveLiveChanged)==null?void 0:a.call(n,l)})).add(t.state.isAudioAvailable$.subscribe(l=>{var a;return(a=n.onIsAudioAvailableChanged)==null?void 0:a.call(n,l)})).add(t.state.currentQuality$.subscribe(l=>{var a;return(a=n.onCurrentQualityChanged)==null?void 0:a.call(n,l)})).add(t.state.availableQualities$.subscribe(l=>{var a;return(a=n.onAvailableQualitiesChanged)==null?void 0:a.call(n,l.map(({value:s})=>s).filter(s=>s!=="auto"))})).add(t.state.availableAudioStreams$.subscribe(l=>{l.length>1&&n.onAudioLanguagesAvailable&&n.onAudioLanguagesAvailable()})).add(t.ui.isPictureInPictureActive$.subscribe(l=>{var a,s;return l?(a=n.onPiPEnter)==null?void 0:a.call(n):(s=n.onPiPExit)==null?void 0:s.call(n)}));let o=n==null?void 0:n.uiInfo;o&&this.subscription.add(t.ui.controlsVisible.subscribe(l=>{var a;return(a=o.onControlsVisibleChanged)==null?void 0:a.call(o,l)})).add(t.ui.isMobile.subscribe(l=>{var a;return(a=o.onIsMobileChanged)==null?void 0:a.call(o,l)})).add(t.ui.playerSize.subscribe(l=>{var a;return(a=o.onPlayerSizeChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.prevButton.subscribe(l=>{var a;return(a=o.onPrevButtonChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.playButton.subscribe(l=>{var a;return(a=o.onPlayButtonChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.replayButton.subscribe(l=>{var a;return(a=o.onReplayButtonChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.nextButton.subscribe(l=>{var a;return(a=o.onNextButtonChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.playPrevChapterButton.subscribe(l=>{var a;return(a=o.onPlayPrevChapterChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.seekToInteractiveButton.subscribe(l=>{var a;return(a=o.onSeekToInteractiveButtonChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.interactiveGraphButton.subscribe(l=>{var a;return(a=o.onGraphButtonChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.liveButton.subscribe(l=>{var a;return(a=o.onLiveButtonChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.time.subscribe(l=>{var a;return(a=o.onTimeUpdateChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.episodes.subscribe(l=>{var a;return(a=o.onEpisodesChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.subtitles.subscribe(l=>{var a;return(a=o.onSubtitlesChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.settings.subscribe(l=>{var a;return(a=o.onSettingsChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.fullscreen.subscribe(l=>{var a;return(a=o.onFullscreenChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.chromecast.subscribe(l=>{var a;return(a=o.onChromecastChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.pip.subscribe(l=>{var a;return(a=o.onPipChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.vkLogo.subscribe(l=>{var a;return(a=o.onVkLogoChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.interactiveTimeIndicator.subscribe(l=>{var a;return(a=o.onInteractiveTimeIndicatorChanged)==null?void 0:a.call(o,l)})).add(t.ui.controls.timeline.subscribe(l=>{var a;return(a=o.onTimelineChanged)==null?void 0:a.call(o,l)}))}playNextVideo(){var n;if(!this.videoConfig)return;let t=!0;if((n=this.videoConfig.callbacks)!=null&&n.onNextVideoClick)try{t=this.videoConfig.callbacks.onNextVideoClick()}catch(o){this.log({message:"onNextVideoClick callback failed to execute"})}t&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){var n;if(!this.videoConfig)return;let t=!0;if((n=this.videoConfig.callbacks)!=null&&n.onPrevVideoClick)try{t=this.videoConfig.callbacks.onPrevVideoClick()}catch(o){this.log({message:"onPrevVideoClick callback failed to execute"})}t&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}repeatPlaylist(){this.currentPlayingVideoIndex=0,this.log({message:"repeat playlist"}),this.createPlayerWithCurrentVideo()}createPlayerWithCurrentVideo(t,n=!0){var r;if(!this.videoConfig)return;let o=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!o){this.log({message:"no next video"});return}this.isInited&&(0,Yi.isNonNullable)(o.unitedVideoId)&&this.store.actions.internal.nextMovie(o.unitedVideoId),(r=this.svelteRootComponent)==null||r.$destroy(),this.createPlayer(o,{autoplay:n,fromTime:0},t)}playPrevChapter(){var t;(t=this.interactiveController)==null||t.playPrevChapter()}seekToInteractive(){var n;let t=(n=this.interactiveController)==null?void 0:n.getNextInteractiveStartTime();typeof t=="number"&&this.seekTime(t/1e3)}toggleGraph(){var c,m;if(!this.isInited)return;let t=this.store,{isEnded$:n,playbackState$:o,graphIsOpened$:r}=t.state,{disabledControls$:l}=t.ui.controls,a=et(n),s=et(o);et(r)?(r.set(!1),(c=this.interactiveController)==null||c.toggleGraphView(!1),l.remove(Fs),!a&&this.graphMadePause&&this.play()):(this.graphMadePause=s==="playing",r.set(!0),(m=this.interactiveController)==null||m.toggleGraphView(!0),l.add(Fs),!a&&this.graphMadePause&&this.pause())}initInteractives(){return ft(this,null,function*(){var t,n,o,r;if((t=this.videoConfig)!=null&&t.interactiveData)try{let{Interactives:l,EVENT_NAMES:a,CustomError:s}=yield import("@vkontakte/videoplayer-interactive");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactiveContainer");let u=(n=this.store)==null?void 0:n.interfaceLanguage$,c=u?et(u):this.videoConfig.interfaceLanguage,{projectInfo:m,initChapterId:h,historyApi:w,videoLoader:b}=this.videoConfig.interactiveData;this.interactiveController=new l({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:c,graph:this.uiConfig.features.interactiveGraph,projectInfo:m,initChapterId:h,historyApi:w,vkVideoLoader:b,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig});let{isInteractiveExpectation$:k}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(this.interactiveController.getIsSeekable().subscribe(I=>{if(!this.isInited)return;let v=this.store;I?v.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):v.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(k.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let y=!0;if(this.interactiveController.on(a.playerChanged,I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=Nt(rt({},I.config),{title:(m==null?void 0:m.title)||I.config.title});let v=y?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,v),y&&(y=!1)}),this.interactiveController.on(a.interactives,({type:I,actionType:v})=>{var P,M,A,q;if(!this.store)return;let g=k.getValue();if(I==="action-choice"&&v==="setRandomBranch"&&(this.store.state.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(dr)),I==="action-choice-canceled"){let ie=et(this.store.state.isPlaying$)||g;if((P=this.videoConfig)!=null&&P.isMobile&&ie){this.store.ui.interactiveHideMobileControls.set(!0);return}(q=(M=this.videoConfig)==null?void 0:(A=M.callbacks).onDisabledInteractiveClick)==null||q.call(A)}}),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(v=>{var g,P,M;v.length&&((M=(P=(g=this.videoConfig)==null?void 0:g.callbacks)==null?void 0:P.onInteractiveHistoryChanged)==null||M.call(P,v))}))}this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,v,g,P;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(P=(v=this.videoConfig)==null?void 0:(g=v.callbacks).onInteractiveTimeIndicatorClick)==null||P.call(g)})),this.interactiveController.on(a.errors,I=>{this.log({message:I.toString()})})}catch(l){this.log({message:l.message})}})}initInteractivesStatistics(){return ft(this,null,function*(){var o,r;let{statSubscription:t,oneStat:n}=this.statistics;if(!(!t||!n||!this.interactiveController))try{let{INTERACTIVE_CLICK_ACTIONS:l}=yield import("@vkontakte/videoplayer-interactive"),a={[l.GO_NEXT_BUTTON]:Rl.InteractiveInterfaceClick.NEXT_BUTTON,[l.GO_NEXT_AREA]:Rl.InteractiveInterfaceClick.NEXT_AREA,[l.WATCH_AGAIN]:Rl.InteractiveInterfaceClick.WATCH_AGAIN,[l.OPEN_GRAPH]:Rl.InteractiveInterfaceClick.GRAPH_SHOW,[l.CLOSE_GRAPH]:Rl.InteractiveInterfaceClick.GRAPH_HIDE},{click$:s,nextMovie$:u}=this.interactiveController.getStatEvents(),c=new Yi.Subject;s.subscribe(m=>{var h,w;m in a?c.next(a[m]):(n==null||n.logError({errorType:"InteractiveVideosAction",fatal:!1}),(w=(h=this.sentry).report)==null||w.call(h,new Error("InteractiveVideosAction"),{errorType:"InteractiveVideosAction",fatal:!1}))}),t.add(n.attachToInteractive({click$:c,nextMovie$:u}))}catch(l){n==null||n.logError({errorType:"InteractiveVideos",fatal:!1}),(r=(o=this.sentry).report)==null||r.call(o,l,{errorType:"InteractiveVideosAction",fatal:!1})}})}initPlayer(t,n={}){var o,r,l,a,s,u,c,m,h,w,b,k,y,I,v,g,P,M,A;if(!Array.isArray(t.videos)||t.videos.length===0&&!t.interactiveData)throw new Error("empty videos");this.videoConfig=zf($6,(0,Yi.cloneDeepWith)(t,q=>q instanceof HTMLElement?q:void 0)),this.uiConfig=ac((o=n.ui)!=null?o:{}),this.coreConfig=(r=n.core)!=null?r:{configName:[]},this.statisticsConfig=(l=n.statistics)!=null?l:{},this.sentry={config:(a=this.uiConfig.sentry)!=null?a:{}},(0,Yi.isNonNullable)(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(s=this.videoConfig.isMediaSessionEnabled)!=null?s:!0),(0,Yi.isNonNullable)(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(c=(u=this.uiConfig.features.pip)!=null?u:this.videoConfig.isPictureInPictureEnabled)!=null?c:!0,this.uiConfig.features.dpip=(h=(m=this.uiConfig.features.dpip)!=null?m:this.videoConfig.isPictureInPictureEnabled)!=null?h:!0),this.videoConfig.isMobile=(w=this.uiConfig.isMobile)!=null?w:this.videoConfig.isMobile,(b=this.videoConfig).autoplay&&(b.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(k=this.uiConfig.ads.enable)!=null?k:this.videoConfig.showAds,this.videoConfig.adsSlotId=(y=this.uiConfig.ads.slot)!=null?y:this.videoConfig.adsSlotId,this.videoConfig.adsPreviewParam=(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam,this.videoConfig.logoHidden=!((v=this.uiConfig.showLogo)!=null?v:!this.videoConfig.logoHidden),(g=this.videoConfig).canRewindLive&&(g.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(P=this.videoConfig.supportLink)!=null?P:this.uiConfig.supportLink,this.currentPlayingVideoIndex=0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip&&(this.uiConfig.features.dpip?this.pictureInPictureApi=Ss.getLatestSupportedVersion():this.pictureInPictureApi=new zo),this.mediaSessionApi=this.uiConfig.features.mediaSession?new Cs:void 0,this.annotationsApi=this.uiConfig.features.annotations?new Ts(this.rootContainer):void 0,(M=this.svelteStubComponent)==null||M.$destroy(),(A=this.svelteRootComponent)==null||A.$destroy(),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0),t.interactiveData?this.initInteractives():this.createPlayer(t.videos[0]),__(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateNextVideos(t){var o;if(!this.videoConfig)return;this.log({message:`update next videos, videos: ${JSON.stringify(t)}`}),this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...t);let n=this.getNextVideoInfo();(o=this.svelteRootComponent)==null||o.$set({showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:n.nextVideoTitle,endScreenVideoThumb:n.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()})}initMediaSession(){var t,n;this.mediaSessionApi&&((t=this.unsubscribePlayerPhaseSubscription)==null||t.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(n=this.store)==null?void 0:n.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:t,thumbUrl:n}=rt({},this.videoConfig.videos[this.currentPlayingVideoIndex]),o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",r=>this.seekTime(r.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>this.playNextVideo()]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>this.playPrevVideo()])),this.mediaSessionApi.setMetaData({title:t,thumbUrl:n}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(t){this.log({message:t.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let t="\u0420\u0435\u043A\u043B\u0430\u043C\u0430",n=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:t}),this.mediaSessionApi.updateActionHandlers(n),this.mediaSessionApi.attachToStore(this.store)}catch(t){this.log({message:t.message})}}play(){var t,n,o,r;this.isControlDisabled("PLAY_BUTTON")||(t=this.store)!=null&&t.playerPhase.is("LiveWaitingStart")||(n=this.store)!=null&&n.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(r=this.svelteRootComponent)==null||r.play())}pause(){var t;this.log({message:"pause"}),(t=this.svelteRootComponent)==null||t.pause()}stop(){var n,o,r;if(!this.videoConfig)return;this.log({message:"stop"}),(n=this.svelteStubComponent)==null||n.$destroy(),(o=this.mediaSessionApi)==null||o.destroy();let t=this.videoConfig.videos[0];t&&((r=this.svelteRootComponent)==null||r.$destroy(),this.createPlayer(t))}setMuted(t){var n;this.log({message:`set muted, muted: ${t}`}),(n=this.svelteRootComponent)==null||n.setMuted(t)}setVolume(t){var n;this.log({message:`set volume, volume: ${t}`}),(n=this.svelteRootComponent)==null||n.setVolume(t)}setRepeat(t){var n;this.log({message:`set repeat, repeat: ${t}`}),this.needToRepeatPlaylist=t,(n=this.svelteRootComponent)==null||n.$set({needToRepeatPlaylist:this.needToRepeatPlaylist,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive()})}seekTime(t){var n;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${t}`}),(n=this.svelteRootComponent)==null||n.seekTime(t))}seekEpisodeStartTime(t){var n;this.log({message:`seek episode start time, time: ${t}`}),(n=this.svelteRootComponent)==null||n.seekEpisodeStartTime(t)}returnFocusToEpisodes(){var t;this.log({message:"return focus to episodes button"}),(t=this.svelteRootComponent)==null||t.returnFocusToEpisodes()}setPlaybackRate(t){var n;this.log({message:`set playback rate to: ${t}`}),(n=this.svelteRootComponent)==null||n.setPlaybackRate(t)}setAutoQualityLimits(t){var n,o,r;this.log({message:`set auto quality limitation. Max: ${(n=t.max)!=null?n:"none"}. Min: ${(o=t.min)!=null?o:"none"}`}),(r=this.svelteRootComponent)==null||r.setAutoQualityLimits(t)}addLanguage(t){var n;(n=this.store)==null||n.actions.internal.addLanguage(t)}setLanguage(t){return ft(this,null,function*(){var n;yield(n=this.store)==null?void 0:n.actions.internal.setLanguage(t)})}setLiveStart(t){var n,o,r;this.log({message:"live started"}),(n=this.store)==null||n.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),(r=this.svelteRootComponent)==null||r.$destroy(),this.createPlayer(t,{autoplay:!0})}setLiveWaitingRecover(){var t,n;this.log({message:"live waiting"}),(t=this.store)==null||t.actions.internal.setLiveWaitingRecover(!0),(n=this.store)==null||n.destroy()}setLiveWaitingRecord(){var t,n;this.log({message:"post live"}),(t=this.store)==null||t.actions.internal.setLiveWaitingRecord(!0),(n=this.store)==null||n.destroy()}setLiveEnd(t){var n,o,r;this.log({message:"live ended"}),(n=this.store)==null||n.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingRecord(!1),(r=this.svelteRootComponent)==null||r.$destroy(),this.createPlayer(t,{autoplay:!1})}getDeviceId(){var t,n;return(n=(t=this.statistics)==null?void 0:t.oneStat.getDeviceId())!=null?n:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(t){return ft(this,null,function*(){var n;if(this.interactiveController&&((n=this.store)!=null&&n.state.positionExact$)){let{EVENT_NAMES:o}=yield import("@vkontakte/videoplayer-interactive"),r=et(this.store.state.positionExact$),a=et(this.store.state.interactiveEpisodes$).find(u=>!u.completed);this.interactiveController.once(o.playerChanged,()=>{a&&r>=a.time?this.seekTime(a.time):this.seekTime(r),t==null||t()});let s=this.interactiveController.getCurrentChapter();yield this.interactiveController.setChapter({chapterId:s.chapter.id,pushToHistory:!1})}})}showInteractiveIndicatorTooltip(t,n=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(t,n)}switchToActiveLive(){var t;(t=this.store)==null||t.actions.internal.switchToActiveLive()}updateStatContext(t){this.statistics.oneStat.updateContext(t)}};var Bl=require("@vkontakte/videoplayer-shared"),Es=require("@vkontakte/videoplayer-core"),e8=()=>{window.customElements.define("vk-video-player",Is)};
|