@vkontakte/videoplayer 1.0.3 → 1.0.4
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/index.cjs.js +3 -3
- package/index.d.ts +3 -0
- package/index.esm.js +3 -3
- package/package.json +3 -3
package/index.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.0.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer v1.0.4
|
|
3
|
+
* Thu, 09 Dec 2021 12:13:48 GMT
|
|
4
4
|
*/
|
|
5
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@vkontakte/videoplayer-core"),t=require("@vkontakte/videoplayer-shared"),i=require("@vkontakte/videoplayer-statistics");function n(){}function s(e){return e()}function l(){return Object.create(null)}function o(e){e.forEach(s)}function a(e){return"function"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let c,d;function u(e,t){return c||(c=document.createElement("a")),c.href=t,e===c.href}function p(e,...t){if(null==e)return n;const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function v(e){let t;return p(e,(e=>t=e))(),t}function h(e,t,i){e.$$.on_destroy.push(p(t,i))}function m(e,t){e.appendChild(t)}function g(e,t,i){const n=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;if(t.host)return t;return document}(e);if(!n.getElementById(t)){const e=y("style");e.id=t,e.textContent=i,function(e,t){m(e.head||e,t)}(n,e)}}function f(e,t,i){e.insertBefore(t,i||null)}function w(e){e.parentNode.removeChild(e)}function y(e){return document.createElement(e)}function b(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function x(e){return document.createTextNode(e)}function $(){return x(" ")}function k(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function V(e){return function(t){return t.preventDefault(),e.call(this,t)}}function P(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function C(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function S(e,t,i,n){e.style.setProperty(t,i,n?"important":"")}function A(e,t,i){e.classList[i?"add":"remove"](t)}function M(e){d=e}function N(){if(!d)throw new Error("Function called outside component initialization");return d}function z(e){N().$$.on_mount.push(e)}function T(e,t){const i=e.$$.callbacks[t.type];i&&i.slice().forEach((e=>e.call(this,t)))}const L=[],j=[],E=[],F=[],I=Promise.resolve();let R=!1;function B(e){E.push(e)}function H(e){F.push(e)}let Q=!1;const _=new Set;function D(){if(!Q){Q=!0;do{for(let e=0;e<L.length;e+=1){const t=L[e];M(t),O(t.$$)}for(M(null),L.length=0;j.length;)j.pop()();for(let e=0;e<E.length;e+=1){const t=E[e];_.has(t)||(_.add(t),t())}E.length=0}while(L.length);for(;F.length;)F.pop()();R=!1,Q=!1,_.clear()}}function O(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(B)}}const U=new Set;let W;function q(){W={r:0,c:[],p:W}}function K(){W.r||o(W.c),W=W.p}function X(e,t){e&&e.i&&(U.delete(e),e.i(t))}function Y(e,t,i,n){if(e&&e.o){if(U.has(e))return;U.add(e),W.c.push((()=>{U.delete(e),n&&(i&&e.d(1),n())})),e.o(t)}}const G="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function J(e,t,i){const n=e.$$.props[t];void 0!==n&&(e.$$.bound[n]=i,i(e.$$.ctx[n]))}function Z(e){e&&e.c()}function ee(e,t,i,n){const{fragment:l,on_mount:r,on_destroy:c,after_update:d}=e.$$;l&&l.m(t,i),n||B((()=>{const t=r.map(s).filter(a);c?c.push(...t):o(t),e.$$.on_mount=[]})),d.forEach(B)}function te(e,t){const i=e.$$;null!==i.fragment&&(o(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function ie(e,t){-1===e.$$.dirty[0]&&(L.push(e),R||(R=!0,I.then(D)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ne(e,t,i,s,a,r,c,u=[-1]){const p=d;M(e);const v=e.$$={fragment:null,ctx:null,props:r,update:n,not_equal:a,bound:l(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(p?p.$$.context:t.context||[]),callbacks:l(),dirty:u,skip_bound:!1,root:t.target||p.$$.root};c&&c(v.root);let h=!1;if(v.ctx=i?i(e,t.props||{},((t,i,...n)=>{const s=n.length?n[0]:i;return v.ctx&&a(v.ctx[t],v.ctx[t]=s)&&(!v.skip_bound&&v.bound[t]&&v.bound[t](s),h&&ie(e,t)),i})):[],v.update(),h=!0,o(v.before_update),v.fragment=!!s&&s(v.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);v.fragment&&v.fragment.l(e),e.forEach(w)}else v.fragment&&v.fragment.c();t.intro&&X(e.$$.fragment),ee(e,t.target,t.anchor,t.customElement),D()}M(p)}class se{$destroy(){te(this,1),this.$destroy=n}$on(e,t){const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var oe=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ae="object"==typeof le&&le&&le.Object===Object&&le,re="object"==typeof self&&self&&self.Object===Object&&self,ce=ae||re||Function("return this")(),de=ce,ue=function(){return de.Date.now()},pe=/\s/;var ve=function(e){for(var t=e.length;t--&&pe.test(e.charAt(t)););return t},he=/^\s+/;var me=function(e){return e?e.slice(0,ve(e)+1).replace(he,""):e},ge=ce.Symbol,fe=ge,we=Object.prototype,ye=we.hasOwnProperty,be=we.toString,xe=fe?fe.toStringTag:void 0;var $e=function(e){var t=ye.call(e,xe),i=e[xe];try{e[xe]=void 0;var n=!0}catch(e){}var s=be.call(e);return n&&(t?e[xe]=i:delete e[xe]),s},ke=Object.prototype.toString;var Ve=$e,Pe=function(e){return ke.call(e)},Ce=ge?ge.toStringTag:void 0;var Se=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ce&&Ce in Object(e)?Ve(e):Pe(e)},Ae=function(e){return null!=e&&"object"==typeof e};var Me=me,Ne=oe,ze=function(e){return"symbol"==typeof e||Ae(e)&&"[object Symbol]"==Se(e)},Te=/^[-+]0x[0-9a-f]+$/i,Le=/^0b[01]+$/i,je=/^0o[0-7]+$/i,Ee=parseInt;var Fe=oe,Ie=ue,Re=function(e){if("number"==typeof e)return e;if(ze(e))return NaN;if(Ne(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ne(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Me(e);var i=Le.test(e);return i||je.test(e)?Ee(e.slice(2),i?2:8):Te.test(e)?NaN:+e},Be=Math.max,He=Math.min;var Qe=function(e,t,i){var n,s,l,o,a,r,c=0,d=!1,u=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var i=n,l=s;return n=s=void 0,c=t,o=e.apply(l,i)}function h(e){return c=e,a=setTimeout(g,t),d?v(e):o}function m(e){var i=e-r;return void 0===r||i>=t||i<0||u&&e-c>=l}function g(){var e=Ie();if(m(e))return f(e);a=setTimeout(g,function(e){var i=t-(e-r);return u?He(i,l-(e-c)):i}(e))}function f(e){return a=void 0,p&&n?v(e):(n=s=void 0,o)}function w(){var e=Ie(),i=m(e);if(n=arguments,s=this,r=e,i){if(void 0===a)return h(r);if(u)return clearTimeout(a),a=setTimeout(g,t),v(r)}return void 0===a&&(a=setTimeout(g,t)),o}return t=Re(t)||0,Fe(i)&&(d=!!i.leading,l=(u="maxWait"in i)?Be(Re(i.maxWait)||0,t):l,p="trailing"in i?!!i.trailing:p),w.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=r=s=a=void 0},w.flush=function(){return void 0===a?o:f(Ie())},w};const _e=[];function De(e,t){return{subscribe:Oe(e,t).subscribe}}function Oe(e,t=n){let i;const s=new Set;function l(t){if(r(e,t)&&(e=t,i)){const t=!_e.length;for(const t of s)t[1](),_e.push(t,e);if(t){for(let e=0;e<_e.length;e+=2)_e[e][0](_e[e+1]);_e.length=0}}}return{set:l,update:function(t){l(t(e))},subscribe:function(o,a=n){const r=[o,a];return s.add(r),1===s.size&&(i=t(l)||n),o(e),()=>{s.delete(r),0===s.size&&(i(),i=null)}}}}function Ue(e,t,i){const s=!Array.isArray(e),l=s?[e]:e,r=t.length<2;return De(i,(e=>{let i=!1;const c=[];let d=0,u=n;const v=()=>{if(d)return;u();const i=t(s?c[0]:c,e);r?e(i):u=a(i)?i:n},h=l.map(((e,t)=>p(e,(e=>{c[t]=e,d&=~(1<<t),i&&v()}),(()=>{d|=1<<t}))));return i=!0,v(),function(){o(h),u()}}))}const We=Symbol("storeContext"),qe=e=>{var t,i;t=We,i=e,N().$$.context.set(t,i)},Ke=()=>{const e=(i=We,N().$$.context.get(i));var i;return t.assertNonNullable(e,"Store context is empty!"),e},Xe=t=>t&&{[e.VideoQuality.INVARIANT]:i.Quality.UNKNOWN,[e.VideoQuality.Q_144P]:i.Quality.Q144P,[e.VideoQuality.Q_240P]:i.Quality.Q240P,[e.VideoQuality.Q_360P]:i.Quality.Q360P,[e.VideoQuality.Q_480P]:i.Quality.Q480P,[e.VideoQuality.Q_720P]:i.Quality.Q720P,[e.VideoQuality.Q_1080P]:i.Quality.Q1080P,[e.VideoQuality.Q_1440P]:i.Quality.Q1440P,[e.VideoQuality.Q_2160P]:i.Quality.Q2160P,[e.VideoQuality.Q_4320P]:i.Quality.Q4320P}[t],Ye=n=>{if(void 0!==n)switch(n){case e.VideoFormat.MPEG:return i.ContentType.MP4;case e.VideoFormat.DASH:case e.VideoFormat.DASH_SEP:case e.VideoFormat.DASH_ONDEMAND:case e.VideoFormat.DASH_LIVE:return i.ContentType.DASH;case e.VideoFormat.DASH_WEBM:case e.VideoFormat.DASH_LIVE_WEBM:return i.ContentType.WEBM;case e.VideoFormat.HLS:case e.VideoFormat.HLS_ONDEMAND:case e.VideoFormat.HLS_JS:case e.VideoFormat.HLS_LIVE:return i.ContentType.HLS;default:return t.assertNever(n)}},Ge=(e,t)=>De(e.getValue(),(i=>{const n=e.subscribe((e=>{i(e),null==t||t(e)}));return()=>n.unsubscribe()})),Je="https://vk.com/support?act=new&from=v";var Ze;!function(e){e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Space="Space",e.KeyM="KeyM",e.KeyF="KeyF",e.KeyK="KeyK",e.KeyL="KeyL",e.KeyJ="KeyJ"}(Ze||(Ze={}));var et="data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M13.25 2.833c.222.74.378 1.479 1.574 2.19a.574.574 0 0 0 .12.05c1.355.35 2.028-.021 2.654-.439.663-.442.86-.314 1.124-.053l.644.643c.294.294.412.412 0 1.178-.366.68-.779 1.313-.435 2.662a.469.469 0 0 0 .05.12c.71 1.206 1.448 1.418 2.186 1.566.78.156.83.386.833.757v.91c0 .416 0 .583-.833.833-.74.222-1.479.378-2.19 1.574a.469.469 0 0 0-.05.12c-.35 1.355.021 2.028.439 2.654.442.663.314.86.053 1.124l-.643.644c-.294.294-.412.412-1.178 0-.68-.366-1.313-.779-2.662-.435a.464.464 0 0 0-.12.05c-1.206.71-1.418 1.448-1.566 2.186-.156.78-.386.83-.757.833h-.91c-.416 0-.583 0-.833-.833-.222-.74-.378-1.479-1.574-2.19a.468.468 0 0 0-.12-.05c-1.355-.35-2.028.021-2.654.439-.663.442-.86.314-1.124.053l-.644-.643c-.294-.294-.412-.412 0-1.178.366-.68.779-1.313.435-2.662a.466.466 0 0 0-.05-.12c-.71-1.206-1.448-1.418-2.186-1.566-.78-.156-.83-.386-.833-.757v-.91c0-.416 0-.583.833-.833.74-.222 1.479-.378 2.19-1.574a.467.467 0 0 0 .05-.12c.35-1.355-.021-2.028-.439-2.654-.442-.663-.314-.86-.053-1.124l.643-.644c.294-.294.412-.412 1.178 0 .68.366 1.313.779 2.662.435a.467.467 0 0 0 .12-.05c1.206-.71 1.418-1.448 1.566-2.186.156-.78.386-.83.757-.833h.91c.416 0 .583 0 .833.833zM12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5z' fill='white'/%3e%3c/svg%3e";function tt(e){g(e,"svelte-wpcxjk",".settingsButton.svelte-wpcxjk.svelte-wpcxjk{display:flex;align-items:center;padding:0 0 0 8px;cursor:pointer;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity}.settingsButton.svelte-wpcxjk.svelte-wpcxjk:hover{opacity:0.8}.settingsButton-icon.svelte-wpcxjk.svelte-wpcxjk{display:block;width:40px;height:24px}.settingsMenu.svelte-wpcxjk.svelte-wpcxjk{background-color:rgba(17, 17, 17, 0.8);border-radius:8px;bottom:24px;font-size:13px;line-height:40px;overflow:hidden;padding:4px 0;right:17px;margin-bottom:18px;position:absolute;transition:opacity 0.2s, visibility 0.2s}.settingsMenu.hidden.svelte-wpcxjk.svelte-wpcxjk{visibility:hidden;opacity:0}.settingsMenu-subList.svelte-wpcxjk.svelte-wpcxjk{min-width:134px;padding-bottom:0}.settingsMenu-item.svelte-wpcxjk.svelte-wpcxjk{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;outline:none;padding:0 24px 0 18px;white-space:nowrap;position:relative}.settingsMenu-item.svelte-wpcxjk.svelte-wpcxjk:hover{background-color:rgba(255, 255, 255, 0.08)}.settingsMenu-subList.svelte-wpcxjk .settingsMenu-item.svelte-wpcxjk{color:rgba(255, 255, 255, 0.9)}.settingsMenu-subList.svelte-wpcxjk .settingsMenu-item.svelte-wpcxjk:last-child{margin-bottom:4px}.settingsMenu-icon.svelte-wpcxjk.svelte-wpcxjk{margin-right:16px}.settingsMenu-title.svelte-wpcxjk.svelte-wpcxjk{flex-grow:1;margin-right:24px}.settingsMenu-value.svelte-wpcxjk.svelte-wpcxjk{position:relative;opacity:0.7}.settingsMenu-valueIcon.svelte-wpcxjk.svelte-wpcxjk{position:absolute;top:10px;margin-left:4px;width:15px}.settingsMenu-valueIcon-list.svelte-wpcxjk.svelte-wpcxjk{position:absolute;top:12px;width:15px;right:6px}.settingsMenu-divider.svelte-wpcxjk.svelte-wpcxjk{background-color:rgba(255, 255, 255, 0.3);height:1px;margin:4px 9px 0 9px}.settingsMenu-header.svelte-wpcxjk.svelte-wpcxjk{display:flex;align-items:center;line-height:32px;padding:0 24px 0 18px;color:var(--white);cursor:pointer}.settingsMenu-headerText.svelte-wpcxjk.svelte-wpcxjk{margin-left:auto}.settingsMenu-headerIcon.svelte-wpcxjk.svelte-wpcxjk{width:16px;height:24px}.settingsMenu-header.svelte-wpcxjk:hover .settingsMenu-headerIcon.svelte-wpcxjk{opacity:0.8;transition:opacity 0.2s}.settingsMenu-itemIcon.svelte-wpcxjk.svelte-wpcxjk{margin-right:auto;opacity:0.9}.settingsMenu-items.svelte-wpcxjk.svelte-wpcxjk::-webkit-scrollbar{width:8px}.settingsMenu-items.svelte-wpcxjk.svelte-wpcxjk::-webkit-scrollbar-track{box-shadow:none;background-color:#3a3a3a;border-radius:4px}.settingsMenu-items.svelte-wpcxjk.svelte-wpcxjk::-webkit-scrollbar-thumb{min-height:40px;border-radius:5px;background-color:#666;border:1px solid transparent;background-clip:padding-box}.settingsMenu-items.svelte-wpcxjk.svelte-wpcxjk::-webkit-scrollbar-thumb:hover{background-color:#777}")}function it(e,t,i){const n=e.slice();return n[24]=t[i],n}function nt(e){let t,i;return{c(){t=y("img"),P(t,"class","settingsMenu-valueIcon svelte-wpcxjk"),u(t.src,i=e[5])||P(t,"src",i),P(t,"alt","")},m(e,i){f(e,t,i)},p(e,n){32&n&&!u(t.src,i=e[5])&&P(t,"src",i)},d(e){e&&w(t)}}}function st(e){let t,i;return{c(){t=y("img"),P(t,"class","settingsMenu-itemIcon svelte-wpcxjk"),u(t.src,i="data:image/svg+xml,%3csvg height='16' width='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z' fill='white'/%3e%3c/svg%3e")||P(t,"src","data:image/svg+xml,%3csvg height='16' width='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z' fill='white'/%3e%3c/svg%3e"),P(t,"alt","")},m(e,i){f(e,t,i)},p:n,d(e){e&&w(t)}}}function lt(e){let t,i,n,s,l,o,a,r,c,d,p=e[24].displayValue+"",v=e[24].selected&&st();function h(){return e[19](e[24])}return{c(){t=y("div"),v&&v.c(),i=$(),n=x(p),s=$(),l=y("img"),a=$(),P(l,"class","settingsMenu-valueIcon-list svelte-wpcxjk"),u(l.src,o=e[16](e[24].value))||P(l,"src",o),P(l,"alt",""),P(t,"class","settingsMenu-item svelte-wpcxjk"),P(t,"data-value",r=e[24].value),P(t,"role","menuitemradio"),P(t,"tabindex","0")},m(e,o){f(e,t,o),v&&v.m(t,null),m(t,i),m(t,n),m(t,s),m(t,l),m(t,a),c||(d=k(t,"click",h),c=!0)},p(s,a){(e=s)[24].selected?v?v.p(e,a):(v=st(),v.c(),v.m(t,i)):v&&(v.d(1),v=null),64&a&&p!==(p=e[24].displayValue+"")&&C(n,p),64&a&&!u(l.src,o=e[16](e[24].value))&&P(l,"src",o),64&a&&r!==(r=e[24].value)&&P(t,"data-value",r)},d(e){e&&w(t),v&&v.d(),c=!1,d()}}}function ot(e){let t,i,s,l,a,r,c,d,p,v,h,g,b,V,S,M,N,z,T,L,j,E,F,I,R,B,H,Q,_,D,O=e[5]&&nt(e),U=e[6],W=[];for(let t=0;t<U.length;t+=1)W[t]=lt(it(e,U,t));return{c(){t=y("div"),i=y("div"),s=y("img"),r=$(),c=y("div"),d=y("div"),p=y("div"),v=y("img"),g=$(),b=y("div"),b.textContent="Качество",V=$(),S=y("div"),M=x(e[3]),N=$(),O&&O.c(),z=$(),T=y("div"),L=y("div"),j=y("img"),F=$(),I=y("div"),I.textContent="Качество",R=$(),B=y("div"),H=$(),Q=y("div");for(let e=0;e<W.length;e+=1)W[e].c();u(s.src,l=e[4])||P(s,"src",l),P(s,"alt",""),P(i,"class","settingsButton-icon svelte-wpcxjk"),P(t,"class",a="settingsButton "+e[0]+" svelte-wpcxjk"),P(t,"aria-label","Открыть настройки видеоплеера"),P(t,"tabindex","-1"),P(t,"role","button"),P(v,"class","settingsMenu-icon svelte-wpcxjk"),u(v.src,h=et)||P(v,"src","data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M13.25 2.833c.222.74.378 1.479 1.574 2.19a.574.574 0 0 0 .12.05c1.355.35 2.028-.021 2.654-.439.663-.442.86-.314 1.124-.053l.644.643c.294.294.412.412 0 1.178-.366.68-.779 1.313-.435 2.662a.469.469 0 0 0 .05.12c.71 1.206 1.448 1.418 2.186 1.566.78.156.83.386.833.757v.91c0 .416 0 .583-.833.833-.74.222-1.479.378-2.19 1.574a.469.469 0 0 0-.05.12c-.35 1.355.021 2.028.439 2.654.442.663.314.86.053 1.124l-.643.644c-.294.294-.412.412-1.178 0-.68-.366-1.313-.779-2.662-.435a.464.464 0 0 0-.12.05c-1.206.71-1.418 1.448-1.566 2.186-.156.78-.386.83-.757.833h-.91c-.416 0-.583 0-.833-.833-.222-.74-.378-1.479-1.574-2.19a.468.468 0 0 0-.12-.05c-1.355-.35-2.028.021-2.654.439-.663.442-.86.314-1.124.053l-.644-.643c-.294-.294-.412-.412 0-1.178.366-.68.779-1.313.435-2.662a.466.466 0 0 0-.05-.12c-.71-1.206-1.448-1.418-2.186-1.566-.78-.156-.83-.386-.833-.757v-.91c0-.416 0-.583.833-.833.74-.222 1.479-.378 2.19-1.574a.467.467 0 0 0 .05-.12c.35-1.355-.021-2.028-.439-2.654-.442-.663-.314-.86-.053-1.124l.643-.644c.294-.294.412-.412 1.178 0 .68.366 1.313.779 2.662.435a.467.467 0 0 0 .12-.05c1.206-.71 1.418-1.448 1.566-2.186.156-.78.386-.83.757-.833h.91c.416 0 .583 0 .833.833zM12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5z' fill='white'/%3e%3c/svg%3e"),P(v,"alt",""),P(b,"class","settingsMenu-title svelte-wpcxjk"),P(S,"class","settingsMenu-value svelte-wpcxjk"),P(p,"class","settingsMenu-item svelte-wpcxjk"),P(p,"role","menuitemradio"),P(p,"tabindex","0"),P(d,"class","settingsMenu svelte-wpcxjk"),P(d,"role","menu"),A(d,"hidden",!e[1]),u(j.src,E="data:image/svg+xml,%3csvg width='12' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z' fill='white'/%3e%3c/svg%3e")||P(j,"src","data:image/svg+xml,%3csvg width='12' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z' fill='white'/%3e%3c/svg%3e"),P(j,"class","settingsMenu-headerIcon svelte-wpcxjk"),P(j,"alt",""),P(I,"class","settingsMenu-headerText svelte-wpcxjk"),P(L,"class","settingsMenu-header svelte-wpcxjk"),P(B,"class","settingsMenu-divider svelte-wpcxjk"),P(Q,"class","settingsMenu-items svelte-wpcxjk"),P(T,"class","settingsMenu settingsMenu-subList svelte-wpcxjk"),A(T,"hidden",!e[2])},m(n,l){f(n,t,l),m(t,i),m(i,s),f(n,r,l),f(n,c,l),m(c,d),m(d,p),m(p,v),m(p,g),m(p,b),m(p,V),m(p,S),m(S,M),m(S,N),O&&O.m(S,null),m(c,z),m(c,T),m(T,L),m(L,j),m(L,F),m(L,I),m(T,R),m(T,B),m(T,H),m(T,Q);for(let e=0;e<W.length;e+=1)W[e].m(Q,null);_||(D=[k(i,"mouseenter",e[11]),k(i,"mouseleave",e[12]),k(t,"click",e[10]),k(p,"click",e[13]),k(d,"mouseenter",e[11]),k(d,"mouseleave",e[12]),k(L,"click",e[15]),k(T,"mouseenter",e[11]),k(T,"mouseleave",e[12])],_=!0)},p(e,[i]){if(16&i&&!u(s.src,l=e[4])&&P(s,"src",l),1&i&&a!==(a="settingsButton "+e[0]+" svelte-wpcxjk")&&P(t,"class",a),8&i&&C(M,e[3]),e[5]?O?O.p(e,i):(O=nt(e),O.c(),O.m(S,null)):O&&(O.d(1),O=null),2&i&&A(d,"hidden",!e[1]),81984&i){let t;for(U=e[6],t=0;t<U.length;t+=1){const n=it(e,U,t);W[t]?W[t].p(n,i):(W[t]=lt(n),W[t].c(),W[t].m(Q,null))}for(;t<W.length;t+=1)W[t].d(1);W.length=U.length}4&i&&A(T,"hidden",!e[2])},i:n,o:n,d(e){e&&w(t),e&&w(r),e&&w(c),O&&O.d(),function(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}(W,e),_=!1,o(D)}}}function at(t,i,n){let s,l,o,a,r,c,{className:d=""}=i;const u=Ke(),p=u.state.currentQuality$;h(t,p,(e=>n(18,r=e)));const v=u.state.availableQualities$;h(t,v,(e=>n(6,c=e)));const m=u.state.isAutoQualityEnabled$;h(t,m,(e=>n(17,a=e)));let g,f=!1,w=!1;function y(e){u.actions.internal.setQuality(e),n(1,f=!1),n(2,w=!1)}function b(t){switch(t){case e.VideoQuality.Q_720P:return"data:image/svg+xml,%3csvg width='15' height='5' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.516 5h1.107C8.103 5 9 4.065 9 2.5S8.103 0 6.623 0H5.516C5.191 0 5 .2 5 .537V4.46c0 .342.191.54.516.54zm.516-.854V.852H6.5C7.41.852 8 1.468 8 2.5c0 1.066-.577 1.646-1.5 1.646h-.468zM.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S4 4.802 4 4.464V.54C4 .198 3.809 0 3.484 0s-.516.198-.516.54v1.531H1.032V.54C1.032.198.841 0 .516 0S0 .198 0 .54v3.989C0 4.867.191 5 .516 5z' fill='%2370C1FF'/%3e%3c/svg%3e";case e.VideoQuality.Q_1080P:return"data:image/svg+xml,%3csvg width='15' height='5' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.516 5h1.107C12.103 5 13 4.065 13 2.5S12.103 0 10.623 0H9.516C9.191 0 9 .2 9 .537V4.46c0 .342.191.54.516.54zm.516-.854V.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646h-.468zM4.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S8 4.802 8 4.464V.54C8 .198 7.809 0 7.484 0s-.516.198-.516.54v1.531H5.032V.54c0-.342-.191-.54-.516-.54S4 .198 4 .54v3.989c0 .338.191.471.516.471zm-4 0c.325 0 .516-.198.516-.537V3h1.332c.27 0 .441-.154.441-.41 0-.253-.174-.407-.44-.407H1.031V.854h1.5c.28 0 .468-.16.468-.427C3 .161 2.815 0 2.532 0H.516C.191 0 0 .198 0 .537v3.926C0 4.802.191 5 .516 5z' fill='%2370C1FF'/%3e%3c/svg%3e";case e.VideoQuality.Q_1440P:return"data:image/svg+xml,%3csvg width='15' height='6' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11.516 5h1.107C14.103 5 15 4.065 15 2.5S14.103 0 12.623 0h-1.107C11.191 0 11 .2 11 .537V4.46c0 .342.191.54.516.54zm.516-.854V.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646h-.468zM6.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S10 4.802 10 4.464V.54C10 .198 9.809 0 9.484 0s-.516.198-.516.54v1.531H7.032V.54c0-.342-.191-.54-.516-.54S6 .198 6 .54v3.989c0 .338.191.471.516.471z' fill='%2370C1FF'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.338 4.909A3.9 3.9 0 0 1 2.5 5C1.037 5 0 4.135 0 2.553 0 .983 1.037 0 2.5 0 3.96 0 5 .984 5 2.553c0 .863-.274 1.46-.778 1.88l.194.29a.5.5 0 0 1-.832.554l-.246-.368zm-.52-.78-.234-.352a.5.5 0 1 1 .832-.554l.245.367c.184-.26.286-.615.286-1.037C3.947 1.517 3.307.9 2.5.9c-.81 0-1.447.617-1.447 1.653 0 1.032.637 1.596 1.447 1.596.08 0 .208-.007.318-.02z' fill='%2370C1FF'/%3e%3c/svg%3e";case e.VideoQuality.Q_2160P:return"data:image/svg+xml,%3csvg width='15' height='6' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.517 5c.325 0 .516-.198.516-.536v-.97l.492-.517 1.46 1.74c.16.205.304.283.516.283A.491.491 0 0 0 9 4.501c0-.14-.068-.287-.222-.478l-1.47-1.73L8.818.868C8.949.731 9 .618 9 .475A.474.474 0 0 0 8.515 0c-.171 0-.301.065-.445.222L6.064 2.25h-.03V.54c0-.342-.192-.54-.517-.54s-.516.198-.516.54v3.924c0 .338.191.536.516.536z' fill='%2370C1FF'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='m2.551 1.052-1.51 2.052h1.51V1.052zM3.5 3.104V.832c0-.81-1.089-1.14-1.556-.48L.139 2.821a.75.75 0 0 0 .612 1.183h1.8v.55c0 .248.25.45.499.45a.45.45 0 0 0 .45-.45v-.55h.052a.45.45 0 0 0 0-.9H3.5z' fill='%2370C1FF'/%3e%3c/svg%3e";case e.VideoQuality.Q_4320P:return"data:image/svg+xml,%3csvg width='15' height='5' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.513 5c.323 0 .513-.198.513-.537v-.97l.49-.516L7.99 4.715c.16.205.302.284.513.284A.49.49 0 0 0 9 4.5c0-.14-.068-.287-.22-.478L7.293 2.293 8.82.868C8.949.731 9 .618 9 .475A.473.473 0 0 0 8.517 0c-.17 0-.299.065-.441.222L6.056 2.25h-.03V.54c0-.342-.19-.54-.513-.54S5 .198 5 .54v3.923c0 .339.19.537.513.537z' fill='%2370C1FF'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 0c-.353 0-.671.057-.952.173a1.492 1.492 0 0 0-.654.484c-.154.208-.23.445-.23.71 0 .423.208.756.613.995a1.46 1.46 0 0 0-.547.44c-.154.203-.23.441-.23.71 0 .288.084.548.252.778l.001.001c.173.224.412.398.712.523C1.267 4.939 1.612 5 2 5c.388 0 .733-.061 1.035-.186.3-.125.537-.299.705-.524.174-.23.26-.49.26-.777 0-.27-.076-.508-.23-.711a1.448 1.448 0 0 0-.552-.44c.409-.235.618-.569.618-.994a1.14 1.14 0 0 0-.238-.711 1.436 1.436 0 0 0-.653-.484A2.427 2.427 0 0 0 2 0zm-.573.964C1.563.86 1.75.804 2 .804c.25 0 .434.055.564.16h.001a.512.512 0 0 1 .204.43.52.52 0 0 1-.204.437c-.13.105-.315.161-.565.161-.25 0-.437-.056-.573-.161a.519.519 0 0 1-.203-.437c0-.185.07-.326.203-.43zm-.345 2.522c0-.217.08-.381.233-.503.16-.122.385-.188.685-.188.3 0 .522.066.677.188.16.122.24.287.24.503a.628.628 0 0 1-.24.523c-.155.122-.377.188-.677.188-.3 0-.524-.065-.684-.187a.637.637 0 0 1-.234-.524z' fill='%2370C1FF'/%3e%3c/svg%3e"}}return t.$$set=e=>{"className"in e&&n(0,d=e.className)},t.$$.update=()=>{262144&t.$$.dirty&&n(5,s=b(r)),262144&t.$$.dirty&&n(4,l=function(t){switch(t){case e.VideoQuality.Q_720P:return"data:image/svg+xml,%3csvg width='34' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.466.466 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.466.466 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.465.465 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438.041.01.083.028.12.05 1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.467.467 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.598.598 0 0 0-.413-.519 7.464 7.464 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.581.581 0 0 0 .633-.44 7.448 7.448 0 0 1 .749-1.967z' fill='white'/%3e%3crect x='15' y='3' width='17' height='11' rx='5.5' fill='%23689FF8'/%3e%3cpath d='M24.516 11h1.107C27.103 11 28 10.066 28 8.5S27.103 6 25.623 6h-1.107c-.325 0-.516.2-.516.537v3.923c0 .342.191.54.516.54zm.516-.854V6.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646h-.468zM19.516 11c.325 0 .516-.198.516-.536V8.922h1.936v1.542c0 .338.191.537.516.537s.516-.199.516-.537V6.54c0-.342-.191-.54-.516-.54s-.516.198-.516.54v1.531h-1.936V6.54c0-.342-.191-.54-.516-.54S19 6.198 19 6.54v3.989c0 .338.191.472.516.472z' fill='white'/%3e%3c/svg%3e";case e.VideoQuality.Q_1080P:return"data:image/svg+xml,%3csvg width='38' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.466.466 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.466.466 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.465.465 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438.041.01.083.028.12.05 1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.467.467 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.598.598 0 0 0-.413-.519 7.464 7.464 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.581.581 0 0 0 .633-.44 7.448 7.448 0 0 1 .749-1.967z' fill='white'/%3e%3crect x='15' y='3' width='21' height='11' rx='5.5' fill='%23689FF8'/%3e%3cpath d='M28.516 11h1.107C31.103 11 32 10.066 32 8.5S31.103 6 29.623 6h-1.107c-.325 0-.516.2-.516.537v3.923c0 .342.191.54.516.54zm.516-.854V6.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646h-.468zM23.516 11c.325 0 .516-.198.516-.536V8.922h1.936v1.542c0 .338.191.537.516.537s.516-.199.516-.537V6.54c0-.342-.191-.54-.516-.54s-.516.198-.516.54v1.531h-1.936V6.54c0-.342-.191-.54-.516-.54S23 6.198 23 6.54v3.989c0 .338.191.472.516.472zm-4 0c.325 0 .516-.198.516-.537V9h1.332c.27 0 .441-.154.441-.41 0-.253-.174-.407-.44-.407h-1.333V6.854h1.5c.28 0 .468-.16.468-.427 0-.266-.185-.427-.468-.427h-2.016c-.325 0-.516.198-.516.537v3.926c0 .339.191.537.516.537z' fill='white'/%3e%3c/svg%3e";case e.VideoQuality.Q_1440P:return"data:image/svg+xml,%3csvg width='40' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.466.466 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.466.466 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.465.465 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438.041.01.083.028.12.05 1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.467.467 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.598.598 0 0 0-.413-.519 7.464 7.464 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.581.581 0 0 0 .633-.44 7.448 7.448 0 0 1 .749-1.967z' fill='white'/%3e%3cpath d='M15 8.5A5.5 5.5 0 0 1 20.5 3h12a5.5 5.5 0 1 1 0 11h-12A5.5 5.5 0 0 1 15 8.5z' fill='%23689FF8'/%3e%3cpath d='M30.516 11h1.107C33.103 11 34 10.066 34 8.5S33.103 6 31.623 6h-1.107c-.325 0-.516.2-.516.537v3.923c0 .342.191.54.516.54zm.516-.854V6.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646h-.468zM25.516 11c.325 0 .516-.198.516-.536V8.922h1.936v1.542c0 .338.191.537.516.537s.516-.199.516-.537V6.54c0-.342-.191-.54-.516-.54s-.516.198-.516.54v1.531h-1.936V6.54c0-.342-.191-.54-.516-.54S25 6.198 25 6.54v3.989c0 .338.191.472.516.472z' fill='white'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M22.338 10.909c-.254.06-.58.091-.838.091-1.463 0-2.5-.865-2.5-2.447C19 6.983 20.037 6 21.5 6c1.46 0 2.5.984 2.5 2.553 0 .863-.274 1.46-.777 1.88l.193.29a.5.5 0 1 1-.832.554l-.246-.368zm-.52-.78-.234-.352a.5.5 0 0 1 .832-.554l.245.367c.184-.26.286-.615.286-1.037 0-1.036-.64-1.653-1.447-1.653-.81 0-1.447.617-1.447 1.653 0 1.032.637 1.596 1.447 1.596.08 0 .208-.007.318-.02z' fill='white'/%3e%3c/svg%3e";case e.VideoQuality.Q_2160P:return"data:image/svg+xml,%3csvg width='34' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.466.466 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.466.466 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.465.465 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438.041.01.083.028.12.05 1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.467.467 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.598.598 0 0 0-.413-.519 7.464 7.464 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.581.581 0 0 0 .633-.44 7.448 7.448 0 0 1 .749-1.967z' fill='white'/%3e%3crect x='15' y='3' width='17' height='11' rx='5.5' fill='%23689FF8'/%3e%3cpath d='M24.517 11c.325 0 .516-.198.516-.536v-.97l.492-.517 1.46 1.74c.16.205.304.284.516.284a.491.491 0 0 0 .499-.5c0-.14-.068-.287-.222-.478l-1.47-1.73 1.51-1.425c.13-.137.182-.25.182-.393A.474.474 0 0 0 27.515 6c-.171 0-.301.065-.445.222L25.064 8.25h-.03V6.54c0-.342-.192-.54-.517-.54s-.516.198-.516.54v3.924c0 .338.191.537.516.537z' fill='white'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='m21.551 7.052-1.51 2.052h1.51V7.052zm.949 2.052V6.832c0-.81-1.089-1.14-1.556-.48l-1.805 2.469a.75.75 0 0 0 .612 1.183h1.8v.55c0 .248.25.45.499.45a.45.45 0 0 0 .45-.45v-.55h.052a.45.45 0 1 0 0-.9H22.5z' fill='white'/%3e%3c/svg%3e";case e.VideoQuality.Q_4320P:return"data:image/svg+xml,%3csvg width='34' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.466.466 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.466.466 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.465.465 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438.041.01.083.028.12.05 1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.467.467 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.598.598 0 0 0-.413-.519 7.464 7.464 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.581.581 0 0 0 .633-.44 7.448 7.448 0 0 1 .749-1.967z' fill='white'/%3e%3crect x='15' y='3' width='17' height='11' rx='5.5' fill='%23689FF8'/%3e%3cpath d='M24.513 11c.323 0 .513-.198.513-.537v-.97l.49-.516 1.475 1.738c.16.205.302.284.513.284A.49.49 0 0 0 28 10.5c0-.14-.068-.287-.22-.478l-1.486-1.729 1.526-1.425c.129-.137.18-.25.18-.393A.473.473 0 0 0 27.517 6c-.17 0-.299.065-.441.222l-2.02 2.027h-.03V6.54c0-.342-.19-.54-.513-.54S24 6.198 24 6.54v3.923c0 .339.19.537.513.537z' fill='white'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M21 6c-.353 0-.671.057-.952.173a1.493 1.493 0 0 0-.654.484c-.154.208-.23.445-.23.71 0 .423.208.756.613.995a1.46 1.46 0 0 0-.547.44c-.154.203-.23.441-.23.71 0 .288.084.548.252.777l.001.002c.173.224.412.398.712.523.302.125.647.186 1.035.186.388 0 .733-.061 1.035-.186.3-.125.537-.299.705-.524.174-.23.26-.49.26-.777 0-.27-.076-.508-.23-.711a1.448 1.448 0 0 0-.552-.44c.409-.235.618-.569.618-.994a1.14 1.14 0 0 0-.238-.711 1.436 1.436 0 0 0-.653-.484A2.428 2.428 0 0 0 21 6zm-.573.964c.136-.105.323-.16.573-.16.25 0 .434.055.564.16h.001a.512.512 0 0 1 .203.43c0 .19-.07.333-.203.437-.13.105-.315.161-.565.161-.25 0-.437-.056-.573-.161a.519.519 0 0 1-.203-.437c0-.185.07-.326.203-.43zm-.345 2.522c0-.217.08-.381.233-.503.16-.122.385-.188.685-.188.3 0 .522.066.677.188.16.122.24.287.24.503a.628.628 0 0 1-.24.523c-.155.122-.377.188-.677.188-.3 0-.524-.065-.684-.188a.636.636 0 0 1-.234-.523z' fill='white'/%3e%3c/svg%3e";default:return et}}(r)),393216&t.$$.dirty&&n(3,o=function(t,i){return t?i?t===e.VideoQuality.INVARIANT?"Авто":`Авто ${t}`:t:"..."}(r,a))},[d,f,w,o,l,s,c,p,v,m,function(){w?n(2,w=!1):n(1,f=!f)},function(){clearTimeout(g)},function(){g=window.setTimeout((()=>{n(1,f=!1),n(2,w=!1)}),1e3)},function(){n(1,f=!1),n(2,w=!0)},y,function(){n(1,f=!0),n(2,w=!1)},b,a,r,e=>y(e.value)]}class rt extends se{constructor(e){super(),ne(this,e,at,ot,r,{className:0},tt)}}const ct=e=>{if(!isFinite(e))return"00:00";let t=Math.round(e);const i=Math.floor(t/3600);t-=3600*i;const n=Math.floor(t/60);t-=60*n;return(i>0?[i,n,t]:[n,t]).map((e=>e>9?String(e):`0${e}`)).join(":")};function dt(e){g(e,"svelte-1biumvr",".time.svelte-1biumvr{display:flex;align-items:center;padding:0 8px;font-weight:500;cursor:default;will-change:opacity}.current.svelte-1biumvr{position:relative}.duration.svelte-1biumvr{opacity:0.7}.duration.svelte-1biumvr:before{content:' / ';white-space:pre}")}function ut(e){let t,i,s,l,o,a,r,c;return{c(){t=y("div"),i=y("span"),s=x(e[3]),l=$(),o=y("span"),a=x(e[2]),P(i,"class","current svelte-1biumvr"),P(o,"class",r="duration "+e[1]+" svelte-1biumvr"),P(t,"class",c="time "+e[0]+" svelte-1biumvr")},m(e,n){f(e,t,n),m(t,i),m(i,s),m(t,l),m(t,o),m(o,a)},p(e,[i]){8&i&&C(s,e[3]),4&i&&C(a,e[2]),2&i&&r!==(r="duration "+e[1]+" svelte-1biumvr")&&P(o,"class",r),1&i&&c!==(c="time "+e[0]+" svelte-1biumvr")&&P(t,"class",c)},i:n,o:n,d(e){e&&w(t)}}}function pt(e,t,i){let n,s,{duration:l}=t,{position:o}=t,{className:a=""}=t,{durationClassName:r=""}=t;return e.$$set=e=>{"duration"in e&&i(4,l=e.duration),"position"in e&&i(5,o=e.position),"className"in e&&i(0,a=e.className),"durationClassName"in e&&i(1,r=e.durationClassName)},e.$$.update=()=>{16&e.$$.dirty&&i(2,n=ct(l)),32&e.$$.dirty&&i(3,s=ct(o))},[a,r,n,s,l,o]}class vt extends se{constructor(e){super(),ne(this,e,pt,ut,r,{duration:4,position:5,className:0,durationClassName:1},dt)}}function ht(e){g(e,"svelte-ugg7st",".slider.svelte-ugg7st.svelte-ugg7st{position:relative;height:var(--videoplayer-slider-height);border-radius:var(--videoplayer-slider-radius);background:var(--videoplayer-slider-bg);cursor:pointer;outline:none;transition:visibility 0.2s, opacity 0.2s;will-change:opacity, transform;width:100%}.no-handle.svelte-ugg7st.svelte-ugg7st{cursor:default}.slider.svelte-ugg7st.svelte-ugg7st:before{content:'';position:absolute;left:0;right:0;top:calc(-1 * (var(--videoplayer-controls-height) - var(--videoplayer-slider-height)) / 2);height:var(--videoplayer-controls-height)}.bars.svelte-ugg7st.svelte-ugg7st{position:absolute;width:100%;height:100%;border-radius:var(--videoplayer-slider-radius);overflow:hidden}.loaded.svelte-ugg7st.svelte-ugg7st{position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--videoplayer-slider-radius);background:var(--videoplayer-slider-loaded-bg);transition:transform 0.2s}.filled.svelte-ugg7st.svelte-ugg7st{position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--videoplayer-slider-radius);background-color:var(--videoplayer-slider-filled-bg)}.filled.active-live.svelte-ugg7st.svelte-ugg7st{background-color:var(--videoplayer-slider-filled-active-live-bg)}.filled.ads.svelte-ugg7st.svelte-ugg7st{background-color:var(--videoplayer-slider-filled-ads)}.handleWrap.svelte-ugg7st.svelte-ugg7st{position:absolute;left:-100%;width:100%}.handle.svelte-ugg7st.svelte-ugg7st{position:absolute;width:var(--videoplayer-slider-handle-size);height:var(--videoplayer-slider-handle-size);right:calc(-1 * var(--videoplayer-slider-handle-size) / 2);top:calc((var(--videoplayer-slider-height) - var(--videoplayer-slider-handle-size)) / 2);border-radius:50%;background-color:var(--videoplayer-slider-filled-bg);visibility:hidden;opacity:0;transform:scale(0);transition:opacity 0.2s, transform 0.2s, visibility 0.2s;will-change:opacity, transform}.handle.active-live.svelte-ugg7st.svelte-ugg7st{background-color:var(--videoplayer-slider-filled-active-live-bg)}.slider.svelte-ugg7st:hover .handle.svelte-ugg7st,.slider-dragging.svelte-ugg7st .handle.svelte-ugg7st{visibility:visible;opacity:1;transform:scale(1)}.slider-dragging.svelte-ugg7st .handle.svelte-ugg7st{transform:scale(1.3)}.slider-vertical.svelte-ugg7st.svelte-ugg7st{position:absolute;left:-26px;top:-18px;transform-origin:0 0;transform:rotate(-90deg)}.hidden.svelte-ugg7st.svelte-ugg7st{visibility:hidden;opacity:0}")}function mt(e){let t,i,s,l,r,c,d,u,p,v,h,g,b,x;return{c(){t=y("div"),i=y("div"),s=y("div"),r=$(),c=y("div"),u=$(),p=y("div"),v=y("div"),P(s,"class","loaded svelte-ugg7st"),P(s,"style",l=`transform: translateX(${100*e[11]}%);`),P(c,"class","filled svelte-ugg7st"),P(c,"style",d=`transform: translateX(${100*e[12]}%);`),A(c,"active-live",e[5]),A(c,"ads",e[6]),P(i,"class","bars svelte-ugg7st"),P(v,"class","handle svelte-ugg7st"),A(v,"active-live",e[5]),P(p,"class","handleWrap svelte-ugg7st"),P(p,"style",h=`transform: translateX(${100*e[13]}%);`),A(p,"hidden",e[6]),P(t,"class",g="slider "+e[1]+" svelte-ugg7st"),P(t,"aria-label",e[14]),P(t,"aria-valuemin",e[15]),P(t,"aria-valuemax",e[16]),P(t,"aria-valuenow",e[17]),P(t,"aria-valuetext",e[18]),P(t,"role","slider"),P(t,"tabindex","0"),A(t,"slider-dragging",e[2]),A(t,"hidden",e[3]),A(t,"slider-vertical",e[4]),A(t,"no-handle",e[6])},m(n,l){f(n,t,l),m(t,i),m(i,s),m(i,r),m(i,c),m(t,u),m(t,p),m(p,v),e[19](t),b||(x=[k(t,"pointerdown",(function(){a(e[10])&&e[10].apply(this,arguments)})),k(t,"mouseenter",(function(){a(e[7])&&e[7].apply(this,arguments)})),k(t,"mousemove",(function(){a(e[8])&&e[8].apply(this,arguments)})),k(t,"mouseleave",(function(){a(e[9])&&e[9].apply(this,arguments)}))],b=!0)},p(i,[n]){e=i,2048&n&&l!==(l=`transform: translateX(${100*e[11]}%);`)&&P(s,"style",l),4096&n&&d!==(d=`transform: translateX(${100*e[12]}%);`)&&P(c,"style",d),32&n&&A(c,"active-live",e[5]),64&n&&A(c,"ads",e[6]),32&n&&A(v,"active-live",e[5]),8192&n&&h!==(h=`transform: translateX(${100*e[13]}%);`)&&P(p,"style",h),64&n&&A(p,"hidden",e[6]),2&n&&g!==(g="slider "+e[1]+" svelte-ugg7st")&&P(t,"class",g),16384&n&&P(t,"aria-label",e[14]),32768&n&&P(t,"aria-valuemin",e[15]),65536&n&&P(t,"aria-valuemax",e[16]),131072&n&&P(t,"aria-valuenow",e[17]),262144&n&&P(t,"aria-valuetext",e[18]),6&n&&A(t,"slider-dragging",e[2]),10&n&&A(t,"hidden",e[3]),18&n&&A(t,"slider-vertical",e[4]),66&n&&A(t,"no-handle",e[6])},i:n,o:n,d(i){i&&w(t),e[19](null),b=!1,o(x)}}}function gt(e,t,i){let{className:s=""}=t,{isDragging:l=!1}=t,{isHidden:o=!1}=t,{isVertical:a=!1}=t,{isActiveLive:r=!1}=t,{isAds:c=!1}=t,{element:d}=t,{onMouseEnter:u=n}=t,{onMouseMove:p=n}=t,{onMouseLeave:v=n}=t,{onPointerDown:h=n}=t,{loadedProgress:m=0}=t,{filledProgress:g=0}=t,{handleProgress:f=0}=t,{ariaLabel:w=""}=t,{ariaValueMin:y}=t,{ariaValueMax:b}=t,{ariaValueNow:x}=t,{ariaValueText:$=""}=t;return e.$$set=e=>{"className"in e&&i(1,s=e.className),"isDragging"in e&&i(2,l=e.isDragging),"isHidden"in e&&i(3,o=e.isHidden),"isVertical"in e&&i(4,a=e.isVertical),"isActiveLive"in e&&i(5,r=e.isActiveLive),"isAds"in e&&i(6,c=e.isAds),"element"in e&&i(0,d=e.element),"onMouseEnter"in e&&i(7,u=e.onMouseEnter),"onMouseMove"in e&&i(8,p=e.onMouseMove),"onMouseLeave"in e&&i(9,v=e.onMouseLeave),"onPointerDown"in e&&i(10,h=e.onPointerDown),"loadedProgress"in e&&i(11,m=e.loadedProgress),"filledProgress"in e&&i(12,g=e.filledProgress),"handleProgress"in e&&i(13,f=e.handleProgress),"ariaLabel"in e&&i(14,w=e.ariaLabel),"ariaValueMin"in e&&i(15,y=e.ariaValueMin),"ariaValueMax"in e&&i(16,b=e.ariaValueMax),"ariaValueNow"in e&&i(17,x=e.ariaValueNow),"ariaValueText"in e&&i(18,$=e.ariaValueText)},[d,s,l,o,a,r,c,u,p,v,h,m,g,f,w,y,b,x,$,function(e){j[e?"unshift":"push"]((()=>{d=e,i(0,d)}))}]}class ft extends se{constructor(e){super(),ne(this,e,gt,mt,r,{className:1,isDragging:2,isHidden:3,isVertical:4,isActiveLive:5,isAds:6,element:0,onMouseEnter:7,onMouseMove:8,onMouseLeave:9,onPointerDown:10,loadedProgress:11,filledProgress:12,handleProgress:13,ariaLabel:14,ariaValueMin:15,ariaValueMax:16,ariaValueNow:17,ariaValueText:18},ht)}}const{window:wt}=G;function yt(e){g(e,"svelte-8tpe0o",".volumeButton.svelte-8tpe0o.svelte-8tpe0o{display:flex;align-items:center;padding:0 10px 0 8px;position:relative;cursor:pointer;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity}.volumeButton.svelte-8tpe0o.svelte-8tpe0o:hover{opacity:0.8}.icon.svelte-8tpe0o.svelte-8tpe0o{display:block;width:24px;height:24px}.icon.svelte-8tpe0o .cross.svelte-8tpe0o{visibility:hidden}.icon[data-value='off'].svelte-8tpe0o .wave1.svelte-8tpe0o,.icon[data-value='off'].svelte-8tpe0o .wave2.svelte-8tpe0o{visibility:hidden}.icon[data-value='off'].svelte-8tpe0o .cross.svelte-8tpe0o{visibility:visible}.icon[data-value='mid'].svelte-8tpe0o .wave2.svelte-8tpe0o,.icon[data-value='min'].svelte-8tpe0o .wave2.svelte-8tpe0o{visibility:hidden}.volumeBar.svelte-8tpe0o.svelte-8tpe0o{display:flex;align-items:center;padding-right:8px;position:relative;width:86px}.volumeBar-slider-vertical{width:50px !important}.volumeBar-vertical.svelte-8tpe0o.svelte-8tpe0o{padding:0;width:0}")}function bt(e){let t,i,n,s,l,a,r,c,d,u,p,v,h;function g(t){e[16](t)}let x={className:e[0]?"volumeBar-slider-vertical":"",isDragging:e[2],isHidden:e[0]&&!e[3],isVertical:e[0],onPointerDown:e[8],onMouseEnter:e[11],onMouseLeave:e[12],ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,ariaValueNow:Math.round(100*e[5]),ariaValueText:`${Math.round(100*e[5])}%`,filledProgress:e[5],handleProgress:e[5]};return void 0!==e[1]&&(x.element=e[1]),d=new ft({props:x}),j.push((()=>J(d,"element",g))),{c(){t=y("div"),i=b("svg"),n=b("g"),s=b("path"),l=b("path"),a=b("path"),r=$(),c=y("div"),Z(d.$$.fragment),P(s,"class","wave2 svelte-8tpe0o"),P(s,"d","M12.980843 18.8227621c-.032051 1.2070086-.6704932 1.608931-1.8287519.6202507-1.7185995-1.4687545-3.60887471-3.1942931-4.24215929-3.7215065-.63217937-.528454-1.64491897-.6202511-3.07284859-.6202511-1.42682441 0-1.81505873-.6202511-1.81505873-1.2405016s-.01369327-1.8288162-.01369327-2.001246c0-.0549443.00464608-.085056.01369327-.1291845.01954957-.0953551-.05817756-.9728525 0-1.591076.08510106-.90556663.38823432-1.24050252 1.81505873-1.24050252 1.42792962 0 2.44066922-.09179716 3.07284859-.62025109.63328458-.52845393 2.52355979-2.25275186 4.24215929-3.72150644 1.1582587-.98868024 1.7967003-.58675756 1.8287514.62025106.0431031 1.60645033 5e-7 3.85020301 5e-7 6.68226949 0 2.8295855.0431032 5.3568042 0 6.9632545zm2.9004386-8.7040437c-.3417088-.34170872-.3417088-.89572808 0-1.23743683.3417087-.34170876.8957281-.34170876 1.2374368 0 .1762598.17625972.4111566.46988072.6409943.87209686C18.1429358 10.4240187 18.375 11.1782274 18.375 12s-.2320642 1.5759813-.6152873 2.2466216c-.2298377.4022161-.4647345.6958371-.6409943.8720968-.3417087.3417088-.8957281.3417088-1.2374368 0-.3417088-.3417087-.3417088-.8957281 0-1.2374368.0737402-.0737403.2138434-.2488693.3590057-.5029032C16.4820642 12.9552687 16.625 12.4907274 16.625 12s-.1429358-.9552687-.3847127-1.3783784c-.1451623-.2540339-.2852655-.4291629-.3590057-.5029032zm3-1.99999997c-.3417088-.34170875-.3417088-.89572811 0-1.23743686.3417087-.34170876.8957281-.34170876 1.2374368 0 .2637116.26371158.6207023.73969919.9665078 1.43131016.5167785 1.03355701.842501 2.25503497.8892639 3.71655167-.0467629 1.4032299-.3724854 2.6247079-.8892639 3.6582649-.3458055.6916109-.7027962 1.1675985-.9665078 1.4313101-.3417087.3417088-.8957281.3417088-1.2374368 0-.3417088-.3417087-.3417088-.8957281 0-1.2374368.1375896-.1375897.3825507-.4642045.638697-.9764971.4071252-.8142505.6673665-1.7901701.7054825-2.8756411-.038116-1.1437578-.2983573-2.11967743-.7054825-2.93392787-.2561463-.51229266-.5011074-.83890747-.638697-.9764971z"),P(l,"class","wave1 svelte-8tpe0o"),P(l,"d","M12.980843 18.8227621c-.032051 1.2070086-.6704932 1.608931-1.8287519.6202507-1.7185995-1.4687545-3.60887471-3.1942931-4.24215929-3.7215065-.63217937-.528454-1.64491897-.6202511-3.07284859-.6202511-1.42682441 0-1.81505873-.6202511-1.81505873-1.2405016s-.01369327-1.8288162-.01369327-2.001246c0-.0549443.00464608-.085056.01369327-.1291845.01954957-.0953551-.05817756-.9728525 0-1.591076.08510106-.90556663.38823432-1.24050252 1.81505873-1.24050252 1.42792962 0 2.44066922-.09179716 3.07284859-.62025109.63328458-.52845393 2.52355979-2.25275186 4.24215929-3.72150644 1.1582587-.98868024 1.7967003-.58675756 1.8287514.62025106.0431031 1.60645033 5e-7 3.85020301 5e-7 6.68226949 0 2.8295855.0431032 5.3568042 0 6.9632545zm2.9004386-8.7040437c-.3417088-.34170872-.3417088-.89572808 0-1.23743683.3417087-.34170876.8957281-.34170876 1.2374368 0 .1762598.17625972.4111566.46988072.6409943.87209686C18.1429358 10.4240187 18.375 11.1782274 18.375 12s-.2320642 1.5759813-.6152873 2.2466216c-.2298377.4022161-.4647345.6958371-.6409943.8720968-.3417087.3417088-.8957281.3417088-1.2374368 0-.3417088-.3417087-.3417088-.8957281 0-1.2374368.0737402-.0737403.2138434-.2488693.3590057-.5029032C16.4820642 12.9552687 16.625 12.4907274 16.625 12s-.1429358-.9552687-.3847127-1.3783784c-.1451623-.2540339-.2852655-.4291629-.3590057-.5029032z"),P(a,"class","cross svelte-8tpe0o"),P(a,"d","M20 10.7625631l2.3812816-2.38128153c.3417087-.34170876.8957281-.34170876 1.2374368 0 .3417088.34170875.3417088.89572811 0 1.23743686L21.2374369 12l2.3812815 2.3812816c.3417088.3417087.3417088.8957281 0 1.2374368-.3417087.3417088-.8957281.3417088-1.2374368 0L20 13.2374369l-2.3812816 2.3812815c-.3417087.3417088-.8957281.3417088-1.2374368 0-.3417088-.3417087-.3417088-.8957281 0-1.2374368L18.7625631 12l-2.3812815-2.38128157c-.3417088-.34170875-.3417088-.89572811 0-1.23743686.3417087-.34170876.8957281-.34170876 1.2374368 0zm-7.019157 8.060199c-.032051 1.2070086-.6704932 1.608931-1.8287519.6202507-1.7185995-1.4687545-3.60887471-3.1942931-4.24215929-3.7215065-.63217937-.528454-1.64491897-.6202511-3.07284859-.6202511-1.42682441 0-1.81505873-.6202511-1.81505873-1.2405016s-.01369327-1.8288162-.01369327-2.001246c0-.0549443.00464608-.085056.01369327-.1291845.01954957-.0953551-.05817756-.9728525 0-1.591076.08510106-.90556663.38823432-1.24050252 1.81505873-1.24050252 1.42792962 0 2.44066922-.09179716 3.07284859-.62025109.63328458-.52845393 2.52355979-2.25275186 4.24215929-3.72150644 1.1582587-.98868024 1.7967003-.58675756 1.8287514.62025106.0431031 1.60645033 5e-7 3.85020301 5e-7 6.68226949 0 2.8295855.0431032 5.3568042 0 6.9632545z"),P(n,"fill","#fff"),P(n,"fill-rule","evenodd"),P(i,"xmlns","http://www.w3.org/2000/svg"),P(i,"class","icon svelte-8tpe0o"),P(i,"data-value",e[4]),P(t,"class","volumeButton svelte-8tpe0o"),P(t,"tabindex","0"),P(t,"role","button"),P(c,"class","volumeBar svelte-8tpe0o"),A(c,"volumeBar-vertical",e[0])},m(o,u){f(o,t,u),m(t,i),m(i,n),m(n,s),m(n,l),m(n,a),f(o,r,u),f(o,c,u),ee(d,c,null),p=!0,v||(h=[k(wt,"pointermove",e[9]),k(wt,"pointerup",e[10]),k(t,"mouseenter",e[11]),k(t,"mouseleave",e[12]),k(t,"click",e[15])],v=!0)},p(e,[t]){(!p||16&t)&&P(i,"data-value",e[4]);const n={};1&t&&(n.className=e[0]?"volumeBar-slider-vertical":""),4&t&&(n.isDragging=e[2]),9&t&&(n.isHidden=e[0]&&!e[3]),1&t&&(n.isVertical=e[0]),32&t&&(n.ariaValueNow=Math.round(100*e[5])),32&t&&(n.ariaValueText=`${Math.round(100*e[5])}%`),32&t&&(n.filledProgress=e[5]),32&t&&(n.handleProgress=e[5]),!u&&2&t&&(u=!0,n.element=e[1],H((()=>u=!1))),d.$set(n),1&t&&A(c,"volumeBar-vertical",e[0])},i(e){p||(X(d.$$.fragment,e),p=!0)},o(e){Y(d.$$.fragment,e),p=!1},d(e){e&&w(t),e&&w(r),e&&w(c),te(d),v=!1,o(h)}}}function xt(e,t,i){let n,s,{isVerticalVolume:l=!1}=t;const o=Ke(),a=o.state.volume$;h(e,a,(e=>i(13,n=e)));const r=o.state.muted$;h(e,r,(e=>i(14,s=e)));const c=o.actions.internal.setVolume;let d,u,p,v,m,g=!1,f=!1,w=1;function y(e){return l?Math.max(0,Math.min(1,(u.height-(e.clientY-u.top))/u.height)):Math.min(Math.max(e.clientX-u.x,0),u.width)/u.width}return e.$$set=e=>{"isVerticalVolume"in e&&i(0,l=e.isVerticalVolume)},e.$$.update=()=>{var t;24576&e.$$.dirty&&i(4,(t=n,v=s?"off":t>.5?"max":t>.2?"mid":t>0?"min":"off")),24576&e.$$.dirty&&i(5,m=s?0:n)},[l,d,g,f,v,m,a,r,function(e){e.preventDefault(),i(2,g=!0),u=d.getBoundingClientRect(),w=n,c(y(e))},function(e){g&&c(y(e))},function(e){if(!g)return;const t=y(e);c(t,0===t?w:t),i(2,g=!1)},function(){l&&(clearTimeout(p),i(3,f=!0))},function(){l&&(p=window.setTimeout((()=>{i(3,f=!1)}),300))},n,s,function(t){T.call(this,e,t)},function(e){d=e,i(1,d)}]}class $t extends se{constructor(e){super(),ne(this,e,xt,bt,r,{isVerticalVolume:0},yt)}}function kt(e){g(e,"svelte-r0c8lv",".container.svelte-r0c8lv{display:flex;align-items:center;height:100%;padding-right:8px;cursor:pointer;outline:none;transition:var(--videoplayer-button-hover-transition);will-change:opacity}.container.svelte-r0c8lv:hover{opacity:0.8}.icon.svelte-r0c8lv{display:block;will-change:opacity;width:24px;height:24px}")}function Vt(e){let t;return{c(){t=b("path"),P(t,"class","_enter"),P(t,"d","M10.5 19c0 .5522847-.4477153 1-1 1H5c-.55228475 0-1-.4477153-1-1v-4.5c0-.5522847.44771525-1 1-1s1 .4477153 1 1v2.0715l3.36290054-3.3643932.00012963-.0001296c.39052429-.3905243 1.02368923-.3905243 1.41421353 0l.0157791.0157791.0001297.0001296c.3904527.3905959.3903366 1.0237609-.0002593 1.4142136L7.4285 18H9.5c.5522847 0 1 .4477153 1 1zM18 7.4285l-3.3629005 3.3643932c-.0000432.0000432-.0000865.0000864-.0001297.0001296-.3905243.3905243-1.0236892.3905243-1.4142135 0l-.0157791-.0157791c-.0000433-.0000432-.0000865-.0000864-.0001297-.0001296-.3904527-.3905959-.3903366-1.02376087.0002593-1.41421356L16.5715 6H14.5c-.5522847 0-1-.44771525-1-1s.4477153-1 1-1H19c.5522847 0 1 .44771525 1 1v4.5c0 .5522847-.4477153 1-1 1s-1-.4477153-1-1z")},m(e,i){f(e,t,i)},d(e){e&&w(t)}}}function Pt(e){let t;return{c(){t=b("path"),P(t,"class","_exit"),P(t,"d","M4.57969048 13.9787492c0-.5464165.44295809-.9893746.9893746-.9893746h4.45218572c.5464165 0 .9893746.4429581.9893746.9893746v4.4521857c0 .5464165-.4429581.9893746-.9893746.9893746-.54641651 0-.98937461-.4429581-.98937461-.9893746v-2.0494895l-3.3196551 3.3211319-.00012963.0001297c-.39052429.3905243-1.02368927.3905243-1.41421356 0l-.00058487-.0005849-.00012964-.0001297c-.39045268-.3905958-.3903366-1.0237608.00025929-1.4142135l3.32113189-3.3196551H5.56906508c-.54641651 0-.9893746-.4429581-.9893746-.9893746zM14.9681238 7.61855457l3.3196551-3.32113189.0001296-.00012966c.3905243-.39052429 1.0236893-.39052429 1.4142136 0l.0005849.00058488.0001296.00012965c.3904527.39059589.3903366 1.02376086-.0002593 1.41421354l-3.3211319 3.3196551h2.0494895c.5464165 0 .9893746.4429581.9893746.98937461 0 .5464165-.4429581.9893746-.9893746.9893746h-4.4415603c-.5522847 0-1-.4477153-1-1V5.56906508c0-.54641651.4429581-.9893746.9893746-.9893746s.9893746.44295809.9893746.9893746z")},m(e,i){f(e,t,i)},d(e){e&&w(t)}}}function Ct(e){let t,i,s,l,o;function a(e,t){return e[0]?Pt:Vt}let r=a(e),c=r(e);return{c(){t=y("div"),i=b("svg"),s=b("g"),c.c(),P(s,"fill","#fff"),P(s,"fill-rule","evenodd"),P(i,"class","icon svelte-r0c8lv"),P(i,"xmlns","http://www.w3.org/2000/svg"),P(t,"class","container svelte-r0c8lv"),P(t,"role","button"),P(t,"tabindex","0")},m(n,a){f(n,t,a),m(t,i),m(i,s),c.m(s,null),l||(o=k(t,"click",e[2]),l=!0)},p(e,[t]){r!==(r=a(e))&&(c.d(1),c=r(e),c&&(c.c(),c.m(s,null)))},i:n,o:n,d(e){e&&w(t),c.d(),l=!1,o()}}}function St(e,t,i){let n;const s=Ke().ui.isFullscreen;return h(e,s,(e=>i(0,n=e))),[n,s,function(t){T.call(this,e,t)}]}class At extends se{constructor(e){super(),ne(this,e,St,Ct,r,{},kt)}}var Mt,Nt,zt,Tt,Lt="data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M17.671 10.923c.82.483.82 1.67 0 2.154l-8.787 5.175A1.25 1.25 0 0 1 7 17.174V6.826a1.25 1.25 0 0 1 1.884-1.078l8.787 5.175z' fill='white'/%3e%3c/svg%3e",jt="data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8.712 5c.448 0 .61.047.774.134a.913.913 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134H6.788c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.913.913 0 0 1 .38-.38C6.178 5.047 6.34 5 6.788 5h1.924zm8 0c.448 0 .61.047.774.134a.914.914 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134h-1.924c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.914.914 0 0 1 .38-.38c.164-.087.326-.134.774-.134h1.924z' fill='white'/%3e%3c/svg%3e";function Et(e){g(e,"svelte-1vr05a0",".container.svelte-1vr05a0{display:flex;align-items:center;padding:0 8px 0 16px;cursor:pointer;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity}.container.svelte-1vr05a0:hover{opacity:0.8}.icon.svelte-1vr05a0{display:block;width:24px;height:24px}")}function Ft(e){let t,i,s,l,o,r;return{c(){t=y("div"),i=y("img"),u(i.src,s=e[2])||P(i,"src",s),P(i,"class","icon svelte-1vr05a0"),P(i,"alt",""),P(t,"class",l="container "+e[0]+" svelte-1vr05a0"),P(t,"role","button"),P(t,"tabindex","0")},m(n,s){f(n,t,s),m(t,i),o||(r=k(t,"click",(function(){a(e[1])&&e[1].apply(this,arguments)})),o=!0)},p(n,[o]){e=n,4&o&&!u(i.src,s=e[2])&&P(i,"src",s),1&o&&l!==(l="container "+e[0]+" svelte-1vr05a0")&&P(t,"class",l)},i:n,o:n,d(e){e&&w(t),o=!1,r()}}}function It(t,i,n){let s,l,{isEnded:o}=i,{isAds:a}=i,{playbackState:r}=i,{adPlaybackState:c}=i,{className:d=""}=i,{handlePlayClick:u}=i,{repeatPlaylist:p}=i,{isOneVideoPlaylist:v}=i;return t.$$set=e=>{"isEnded"in e&&n(3,o=e.isEnded),"isAds"in e&&n(4,a=e.isAds),"playbackState"in e&&n(5,r=e.playbackState),"adPlaybackState"in e&&n(6,c=e.adPlaybackState),"className"in e&&n(0,d=e.className),"handlePlayClick"in e&&n(7,u=e.handlePlayClick),"repeatPlaylist"in e&&n(8,p=e.repeatPlaylist),"isOneVideoPlaylist"in e&&n(9,v=e.isOneVideoPlaylist)},t.$$.update=()=>{120&t.$$.dirty&&n(2,s=a?function(e){return e===Tt.PLAYING?jt:Lt}(c):function(t,i){return i?"data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 9.096a.4.4 0 0 1-.67.296L7.044 5.493a.668.668 0 0 1 0-.986L11.33.608A.4.4 0 0 1 12 .904V4a8 8 0 1 1-8 8 1 1 0 1 1 2 0 6 6 0 1 0 6-6v3.096z' fill='white'/%3e%3c/svg%3e":t===e.PlaybackState.PLAYING?jt:Lt}(r,o)),920&t.$$.dirty&&n(1,l=a||!o||v?u:p)},[d,l,s,o,a,r,c,u,p,v]}!function(e){e.AUTO="auto"}(Mt||(Mt={})),function(e){e.Thumb="thumb",e.Video="video",e.Ads="ads"}(Nt||(Nt={})),function(e){e.Preroll="preroll",e.Midroll="midroll",e.Postroll="postroll"}(zt||(zt={})),function(e){e.INACTIVE="inactive",e.PLAYING="playing",e.PAUSED="paused"}(Tt||(Tt={}));class Rt extends se{constructor(e){super(),ne(this,e,It,Ft,r,{isEnded:3,isAds:4,playbackState:5,adPlaybackState:6,className:0,handlePlayClick:7,repeatPlaylist:8,isOneVideoPlaylist:9},Et)}}function Bt(e){g(e,"svelte-1rcixu9",".container.svelte-1rcixu9{display:flex;align-items:center;padding:0 8px;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity;cursor:pointer}.container.svelte-1rcixu9:hover{opacity:0.8}.icon.svelte-1rcixu9{display:block;width:24px;height:24px}")}function Ht(e){let t,i,s;return{c(){t=y("div"),t.innerHTML='<svg height="24" width="24" class="icon svelte-1rcixu9" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m0 0h24v24h-24z" opacity=".3"></path><path d="m16 11.919v-5.417c0-.276.214-.5.505-.5h.99c.279 0 .505.229.505.5v11.003c0 .277-.214.5-.505.5h-.99a.506.506 0 0 1 -.505-.5v-5.413c-.031.158-.147.312-.352.437l-8.788 5.361c-.475.289-.86.068-.86-.482v-10.805c0-.556.374-.778.86-.482l8.788 5.36c.203.123.32.278.352.438z" fill="#fff"></path></g></svg>',P(t,"class","container svelte-1rcixu9"),P(t,"role","button"),P(t,"tabindex","0")},m(n,l){f(n,t,l),i||(s=k(t,"click",e[0]),i=!0)},p:n,i:n,o:n,d(e){e&&w(t),i=!1,s()}}}function Qt(e){return[function(t){T.call(this,e,t)}]}class _t extends se{constructor(e){super(),ne(this,e,Qt,Ht,r,{},Bt)}}var Dt="data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.265 4.265C3 5.531 3 7.567 3 11.64v.72c0 4.073 0 6.11 1.265 7.375C5.531 21 7.567 21 11.64 21h.72c4.073 0 6.11 0 7.375-1.265C21 18.469 21 16.433 21 12.36v-.72c0-4.073 0-6.11-1.265-7.375C18.469 3 16.433 3 12.36 3h-.72C7.567 3 5.53 3 4.265 4.265zM6 8.5c.096 4.682 2.556 7.5 6.61 7.5h.235v-2.679c1.476.15 2.577 1.254 3.026 2.679H18c-.578-2.132-2.075-3.31-3.005-3.76.93-.558 2.246-1.908 2.556-3.74h-1.937c-.406 1.49-1.615 2.84-2.77 2.968V8.5h-1.968v5.197c-1.197-.3-2.759-1.757-2.823-5.197H6z' fill='white'/%3e%3c/svg%3e";function Ot(e){g(e,"svelte-175bte1",".container.svelte-175bte1{display:flex;align-items:center;padding:0 16px 0 8px;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity}.container.svelte-175bte1:hover{opacity:0.8}.container.no-hover.svelte-175bte1{pointer-events:none}.icon.svelte-175bte1{display:block;width:24px;height:24px}")}function Ut(e){let t,i;return{c(){t=y("img"),u(t.src,i=Dt)||P(t,"src","data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.265 4.265C3 5.531 3 7.567 3 11.64v.72c0 4.073 0 6.11 1.265 7.375C5.531 21 7.567 21 11.64 21h.72c4.073 0 6.11 0 7.375-1.265C21 18.469 21 16.433 21 12.36v-.72c0-4.073 0-6.11-1.265-7.375C18.469 3 16.433 3 12.36 3h-.72C7.567 3 5.53 3 4.265 4.265zM6 8.5c.096 4.682 2.556 7.5 6.61 7.5h.235v-2.679c1.476.15 2.577 1.254 3.026 2.679H18c-.578-2.132-2.075-3.31-3.005-3.76.93-.558 2.246-1.908 2.556-3.74h-1.937c-.406 1.49-1.615 2.84-2.77 2.968V8.5h-1.968v5.197c-1.197-.3-2.759-1.757-2.823-5.197H6z' fill='white'/%3e%3c/svg%3e"),P(t,"class","icon svelte-175bte1"),P(t,"alt","")},m(e,i){f(e,t,i)},p:n,d(e){e&&w(t)}}}function Wt(e){let t,i,s,l,o;return{c(){t=y("a"),i=y("img"),u(i.src,s=Dt)||P(i,"src","data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.265 4.265C3 5.531 3 7.567 3 11.64v.72c0 4.073 0 6.11 1.265 7.375C5.531 21 7.567 21 11.64 21h.72c4.073 0 6.11 0 7.375-1.265C21 18.469 21 16.433 21 12.36v-.72c0-4.073 0-6.11-1.265-7.375C18.469 3 16.433 3 12.36 3h-.72C7.567 3 5.53 3 4.265 4.265zM6 8.5c.096 4.682 2.556 7.5 6.61 7.5h.235v-2.679c1.476.15 2.577 1.254 3.026 2.679H18c-.578-2.132-2.075-3.31-3.005-3.76.93-.558 2.246-1.908 2.556-3.74h-1.937c-.406 1.49-1.615 2.84-2.77 2.968V8.5h-1.968v5.197c-1.197-.3-2.759-1.757-2.823-5.197H6z' fill='white'/%3e%3c/svg%3e"),P(i,"class","icon svelte-175bte1"),P(i,"alt",""),P(t,"href","https://vk.com/video"),P(t,"target","_blank")},m(n,s){f(n,t,s),m(t,i),l||(o=k(t,"click",e[1]),l=!0)},p:n,d(e){e&&w(t),l=!1,o()}}}function qt(e){let t;function i(e,t){return e[0]?Wt:Ut}let s=i(e),l=s(e);return{c(){t=y("div"),l.c(),P(t,"class","container svelte-175bte1"),P(t,"role","button"),P(t,"tabindex","0"),A(t,"no-hover",!e[0])},m(e,i){f(e,t,i),l.m(t,null)},p(e,[n]){s===(s=i(e))&&l?l.p(e,n):(l.d(1),l=s(e),l&&(l.c(),l.m(t,null))),1&n&&A(t,"no-hover",!e[0])},i:n,o:n,d(e){e&&w(t),l.d()}}}function Kt(e,t,i){let{logoClickable:n=!1}=t;return e.$$set=e=>{"logoClickable"in e&&i(0,n=e.logoClickable)},[n,function(t){T.call(this,e,t)}]}class Xt extends se{constructor(e){super(),ne(this,e,Kt,qt,r,{logoClickable:0},Ot)}}function Yt(e){g(e,"svelte-a43kjp",".container.svelte-a43kjp{display:flex;align-items:center;padding:0 4px;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity;cursor:pointer}.container.svelte-a43kjp:hover{opacity:0.8}.icon.svelte-a43kjp{display:block;width:24px;height:24px}.wave.svelte-a43kjp{animation-duration:1s;animation-iteration-count:infinite}.wave1.svelte-a43kjp{animation-name:svelte-a43kjp-wave1}.wave2.svelte-a43kjp{animation-name:svelte-a43kjp-wave2}.wave3.svelte-a43kjp{animation-name:svelte-a43kjp-wave3}@keyframes svelte-a43kjp-wave1{0%{opacity:0.3}33%{opacity:1}66%{opacity:1}100%{opacity:1}}@keyframes svelte-a43kjp-wave2{0%{opacity:0.3}33%{opacity:0.3}66%{opacity:1}100%{opacity:1}}@keyframes svelte-a43kjp-wave3{0%{opacity:0.3}33%{opacity:0.3}66%{opacity:0.3}100%{opacity:1}}")}function Gt(t){let i,n,s,l;function o(t,i){return t[1]===e.ChromecastState.AVAILABLE?ei:t[1]===e.ChromecastState.CONNECTED?Zt:t[1]===e.ChromecastState.CONNECTING?Jt:void 0}let a=o(t),r=a&&a(t);return{c(){i=y("div"),r&&r.c(),P(i,"class",n="container "+t[0]+" svelte-a43kjp"),P(i,"role","button"),P(i,"tabindex","0")},m(e,n){f(e,i,n),r&&r.m(i,null),s||(l=k(i,"click",t[4]),s=!0)},p(e,t){a!==(a=o(e))&&(r&&r.d(1),r=a&&a(e),r&&(r.c(),r.m(i,null))),1&t&&n!==(n="container "+e[0]+" svelte-a43kjp")&&P(i,"class",n)},d(e){e&&w(i),r&&r.d(),s=!1,l()}}}function Jt(e){let t,i,n,s,l,o,a;return{c(){t=b("svg"),i=b("g"),n=b("path"),s=b("path"),l=b("path"),o=b("path"),a=b("path"),P(n,"class","wave wave1 svelte-a43kjp"),P(n,"d","M1 18v3h3c0-1.66-1.34-3-3-3z"),P(n,"opacity",".3"),P(n,"fill","#fff"),P(s,"class","wave wave2 svelte-a43kjp"),P(s,"d","M1 14v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7z"),P(s,"opacity",".3"),P(s,"fill","#fff"),P(l,"class","wave wave3 svelte-a43kjp"),P(l,"d","M1 10v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11z"),P(l,"opacity",".3"),P(l,"fill","#fff"),P(o,"d","M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"),P(o,"fill","#fff"),P(a,"d","M0 0h24v24H0z"),P(i,"fill","none"),P(i,"fill-rule","evenodd"),P(t,"class","icon svelte-a43kjp"),P(t,"width","22"),P(t,"height","22"),P(t,"viewBox","0 0 24 24"),P(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){f(e,t,r),m(t,i),m(i,n),m(i,s),m(i,l),m(i,o),m(i,a)},d(e){e&&w(t)}}}function Zt(e){let t,i,n,s;return{c(){t=b("svg"),i=b("g"),n=b("path"),s=b("path"),P(n,"d","M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"),P(n,"fill","#fff"),P(s,"d","M0 0h24v24H0z"),P(i,"fill","none"),P(i,"fill-rule","evenodd"),P(t,"class","icon svelte-a43kjp"),P(t,"width","22"),P(t,"height","22"),P(t,"viewBox","0 0 24 24"),P(t,"xmlns","http://www.w3.org/2000/svg")},m(e,l){f(e,t,l),m(t,i),m(i,n),m(i,s)},d(e){e&&w(t)}}}function ei(e){let t,i,n,s;return{c(){t=b("svg"),i=b("g"),n=b("path"),s=b("path"),P(n,"d","M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"),P(n,"fill","#fff"),P(s,"d","M0 0h24v24H0z"),P(i,"fill","none"),P(i,"fill-rule","evenodd"),P(t,"class","icon svelte-a43kjp"),P(t,"width","22"),P(t,"height","22"),P(t,"viewBox","0 0 24 24"),P(t,"xmlns","http://www.w3.org/2000/svg")},m(e,l){f(e,t,l),m(t,i),m(i,n),m(i,s)},d(e){e&&w(t)}}}function ti(t){let i,s=t[1]!==e.ChromecastState.NOT_AVAILABLE&&Gt(t);return{c(){s&&s.c(),i=x("")},m(e,t){s&&s.m(e,t),f(e,i,t)},p(t,[n]){t[1]!==e.ChromecastState.NOT_AVAILABLE?s?s.p(t,n):(s=Gt(t),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},i:n,o:n,d(e){s&&s.d(e),e&&w(i)}}}function ii(e,t,i){let n,{className:s=""}=t;const l=Ke().state.chromecastState$;let o;return h(e,l,(e=>i(3,n=e))),e.$$set=e=>{"className"in e&&i(0,s=e.className)},e.$$.update=()=>{8&e.$$.dirty&&i(1,o=n)},[s,o,l,n,function(t){T.call(this,e,t)}]}class ni extends se{constructor(e){super(),ne(this,e,ii,ti,r,{className:0},Yt)}}function si(e){g(e,"svelte-1515uit",".container.svelte-1515uit{display:flex;align-items:center;height:100%;padding:0 8px;cursor:pointer;outline:none;transition:opacity 0.2s;will-change:opacity}.container.svelte-1515uit:hover{opacity:0.8}.icon.svelte-1515uit{display:block;width:42px;height:20px}")}function li(e){let t,i,s,l,o;return{c(){t=y("div"),i=y("img"),u(i.src,s=e[0])||P(i,"src",s),P(i,"class","icon svelte-1515uit"),P(i,"alt",""),P(t,"class","container svelte-1515uit"),P(t,"role","button"),P(t,"tabindex","0")},m(n,s){f(n,t,s),m(t,i),l||(o=k(t,"click",e[2]),l=!0)},p(e,[t]){1&t&&!u(i.src,s=e[0])&&P(i,"src",s)},i:n,o:n,d(e){e&&w(t),l=!1,o()}}}function oi(e,t,i){let{isActiveLive:n=!1}=t,s="";return e.$$set=e=>{"isActiveLive"in e&&i(1,n=e.isActiveLive)},e.$$.update=()=>{2&e.$$.dirty&&i(0,s=n?"data:image/svg+xml,%3csvg width='42' height='20' viewBox='0 0 42 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect width='42' height='20' rx='5' fill='%23FF3347'/%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 5C7.44772 5 7 5.44772 7 6V14C7 14.5523 7.44772 15 8 15H12C12.5523 15 13 14.5523 13 14C13 13.4477 12.5523 13 12 13H9V6C9 5.44772 8.55228 5 8 5ZM15 6C15 5.44772 15.4477 5 16 5C16.5523 5 17 5.44772 17 6V14C17 14.5523 16.5523 15 16 15C15.4477 15 15 14.5523 15 14V6ZM30 5C29.4822 5 29.0564 5.3935 29.0052 5.89776C29.0017 5.93137 29 5.96548 29 6V10V14C29 14.5523 29.4477 15 30 15H34C34.5523 15 35 14.5523 35 14C35 13.4477 34.5523 13 34 13H31V11H34C34.5523 11 35 10.5523 35 10C35 9.44772 34.5523 9 34 9H31V7H34C34.5523 7 35 6.55228 35 6C35 5.44772 34.5523 5 34 5H30ZM21.6751 14.3098L19.1257 6.48574C19.0645 6.37589 19.0235 6.25331 19.0075 6.12299L19 6.10001L19.0049 6.09952C19.0017 6.06678 19 6.03358 19 6C19 5.44772 19.4477 5 20 5C20.5187 5 20.9452 5.39492 20.9951 5.90048L21 5.89999L23 12.3L25 5.89999L25.0049 5.90048C25.0548 5.39492 25.4813 5 26 5C26.5523 5 27 5.44772 27 6C27 6.03358 26.9983 6.06678 26.9951 6.09952L27 6.10001L26.9925 6.12299C26.9765 6.25331 26.9355 6.37589 26.8743 6.48574L24.3249 14.3098C24.1908 14.7214 23.807 15 23.3741 15H22.6259C22.193 15 21.8092 14.7214 21.6751 14.3098Z' fill='%23F2F3F5'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg viewBox='0 0 42 20' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='m6.41 1a6.46 6.46 0 0 0 -3.41.55 3.52 3.52 0 0 0 -1.45 1.45 6.46 6.46 0 0 0 -.55 3.41v7.18a6.46 6.46 0 0 0 .55 3.41 3.52 3.52 0 0 0 1.45 1.45 6.46 6.46 0 0 0 3.41.55h29.18a6.46 6.46 0 0 0 3.41-.55 3.52 3.52 0 0 0 1.45-1.45 6.46 6.46 0 0 0 .55-3.41v-7.18a6.46 6.46 0 0 0 -.55-3.41 3.52 3.52 0 0 0 -1.45-1.45 6.46 6.46 0 0 0 -3.41-.55z' fill='none' stroke='white' stroke-width='2'/%3e %3cpath d='m8 5a1 1 0 0 1 1 1v7h3a1 1 0 0 1 1 .88v.12a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1-.77v-.11a.49.49 0 0 1 0-.12v-8a1 1 0 0 1 .88-1zm8 0a1 1 0 0 1 1 1v8a1 1 0 0 1 -.88 1h-.12a1 1 0 0 1 -1-1v-8a1 1 0 0 1 .88-1zm18 0a1 1 0 0 1 1 .88v.12a1 1 0 0 1 -1 1h-3v2h3a1 1 0 0 1 1 .88v.12a1 1 0 0 1 -1 1h-3v2h3a1 1 0 0 1 1 .88v.12a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1-.77v-.11a.49.49 0 0 1 0-.12v-8a1 1 0 0 1 .56-.9 1 1 0 0 1 .44-.1zm-8 0a1 1 0 0 1 1 1v.1a.89.89 0 0 1 -.11.35l-2.47 7.57a1.48 1.48 0 0 1 -1.32.98h-.2a1.48 1.48 0 0 1 -1.31-.95l-2.47-7.57a.89.89 0 0 1 -.12-.36v-.12a1 1 0 0 1 .88-1h.12a1 1 0 0 1 1 1v-.1l2 6.4 2-6.4a1 1 0 0 1 1-.9z' fill='%23f0f2f5' fill-rule='evenodd'/%3e%3c/svg%3e")},[s,n,function(t){T.call(this,e,t)}]}class ai extends se{constructor(e){super(),ne(this,e,oi,li,r,{isActiveLive:1},si)}}function ri(e){g(e,"svelte-1bwjmdb",'.tooltip-wrapper.svelte-1bwjmdb{position:relative;display:block}.tooltip.svelte-1bwjmdb{position:absolute;opacity:0;visibility:hidden;transition:opacity 200ms, visibility 200ms;bottom:100%;transform:translateX(-50%)}.tooltip.svelte-1bwjmdb:after{position:absolute;bottom:0;left:50%;width:0;border-top:5px solid rgba(41, 41, 41, .8);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0;transform:translate(-50%, 5px)}.content.svelte-1bwjmdb{display:inline-block;padding:6px 10px;border-radius:3px;color:var(--white);background-color:rgba(41, 41, 41, .8)}.tooltip.active.svelte-1bwjmdb{opacity:1;visibility:visible}')}function ci(e){let t,i,s,l,o;return{c(){t=y("div"),i=y("div"),s=y("div"),l=x(e[0]),P(s,"class","content svelte-1bwjmdb"),P(i,"class","tooltip svelte-1bwjmdb"),A(i,"active",e[1]),P(t,"class","tooltip-wrapper svelte-1bwjmdb"),P(t,"style",o=`transform: translate(${e[2]}px, ${e[3]}px);`)},m(e,n){f(e,t,n),m(t,i),m(i,s),m(s,l)},p(e,[n]){1&n&&C(l,e[0]),2&n&&A(i,"active",e[1]),12&n&&o!==(o=`transform: translate(${e[2]}px, ${e[3]}px);`)&&P(t,"style",o)},i:n,o:n,d(e){e&&w(t)}}}function di(e,t,i){let{content:n=""}=t,{active:s=!1}=t,{translateXPx:l=0}=t,{translateYPx:o=0}=t;return e.$$set=e=>{"content"in e&&i(0,n=e.content),"active"in e&&i(1,s=e.active),"translateXPx"in e&&i(2,l=e.translateXPx),"translateYPx"in e&&i(3,o=e.translateYPx)},[n,s,l,o]}class ui extends se{constructor(e){super(),ne(this,e,di,ci,r,{content:0,active:1,translateXPx:2,translateYPx:3},ri)}}function pi(e){let t,i,n,s,l,a,r;function c(t){e[23](t)}t=new ui({props:{content:e[7],active:e[6],translateXPx:e[8],translateYPx:-16}});let d={isDragging:e[5],isActiveLive:e[9],onPointerDown:e[16],ariaLabel:"Ползунок временной шкалы",ariaValueMin:0,ariaValueMax:e[0],ariaValueNow:Math.round(100*e[3]),ariaValueText:`${e[2]} (общая длительность ${e[1]})`,loadedProgress:e[10],filledProgress:e[3],handleProgress:e[3],onMouseEnter:e[19],onMouseMove:e[20],onMouseLeave:e[21]};return void 0!==e[4]&&(d.element=e[4]),n=new ft({props:d}),j.push((()=>J(n,"element",c))),{c(){Z(t.$$.fragment),i=$(),Z(n.$$.fragment)},m(s,o){ee(t,s,o),f(s,i,o),ee(n,s,o),l=!0,a||(r=[k(window,"pointermove",e[17]),k(window,"pointerup",e[18])],a=!0)},p(e,[i]){const l={};128&i&&(l.content=e[7]),64&i&&(l.active=e[6]),256&i&&(l.translateXPx=e[8]),t.$set(l);const o={};32&i&&(o.isDragging=e[5]),512&i&&(o.isActiveLive=e[9]),1&i&&(o.ariaValueMax=e[0]),8&i&&(o.ariaValueNow=Math.round(100*e[3])),6&i&&(o.ariaValueText=`${e[2]} (общая длительность ${e[1]})`),1024&i&&(o.loadedProgress=e[10]),8&i&&(o.filledProgress=e[3]),8&i&&(o.handleProgress=e[3]),!s&&16&i&&(s=!0,o.element=e[4],H((()=>s=!1))),n.$set(o)},i(e){l||(X(t.$$.fragment,e),X(n.$$.fragment,e),l=!0)},o(e){Y(t.$$.fragment,e),Y(n.$$.fragment,e),l=!1},d(e){te(t,e),e&&w(i),te(n,e),a=!1,o(r)}}}function vi(e,i,n){let s,l,o,a,r;const c=Ke(),d=c.state.bufferedProgress$;h(e,d,(e=>n(10,r=e)));const u=c.state.positionWithScrubbing$;h(e,u,(e=>n(22,o=e)));const p=c.state.duration$;h(e,p,(e=>n(0,l=e)));const v=c.state.isLive$;h(e,v,(e=>n(25,s=e)));const m=c.state.isActiveLive$;let g,f,w,y,b;h(e,m,(e=>n(9,a=e)));let x=!1,$=!1,k="",V=0;function P(e){return t.isNullable(b)?w:Math.min(Math.max(e-b.x,0),b.width)/b.width}function C(e){var i;n(8,(i=e,V=t.isNullable(b)?0:Math.min(Math.max(i-b.x,0),b.width))),n(7,k=function(e){if(t.isNullable(b))return"";let i=P(e);const n=ct((s?1-i:i)*l);return s?`-${n}`:n}(e))}return e.$$.update=()=>{1&e.$$.dirty&&n(1,g=ct(l)),4194304&e.$$.dirty&&n(2,f=ct(o)),4194305&e.$$.dirty&&n(3,w=o/l)},[l,g,f,w,y,x,$,k,V,a,r,d,u,p,v,m,function(e){e.preventDefault(),x||(n(5,x=!0),b=null==y?void 0:y.getBoundingClientRect(),c.actions.internal.startScrubbing(P(e.clientX)),C(e.clientX))},function(e){x&&(c.actions.internal.progressScrubbing(P(e.clientX)),C(e.clientX))},function(e){x&&(n(5,x=!1),c.actions.internal.completeScrubbing(P(e.clientX)))},function(e){b=null==y?void 0:y.getBoundingClientRect(),C(e.clientX),n(6,$=!0)},function(e){C(e.clientX)},function(){n(6,$=!1)},o,function(e){y=e,n(4,y)}]}class hi extends se{constructor(e){super(),ne(this,e,vi,pi,r,{})}}function mi(e){let t,i;return t=new ft({props:{ariaValueMin:0,ariaValueMax:e[0],ariaValueNow:Math.round(100*e[3]),ariaValueText:`${e[2]} (общая длительность ${e[1]})`,filledProgress:e[3],isAds:!0}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,[i]){const n={};1&i&&(n.ariaValueMax=e[0]),8&i&&(n.ariaValueNow=Math.round(100*e[3])),6&i&&(n.ariaValueText=`${e[2]} (общая длительность ${e[1]})`),8&i&&(n.filledProgress=e[3]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function gi(e,t,i){let n,s,l,{position:o=0}=t,{duration:a=0}=t;return e.$$set=e=>{"position"in e&&i(4,o=e.position),"duration"in e&&i(0,a=e.duration)},e.$$.update=()=>{1&e.$$.dirty&&i(1,n=ct(a)),16&e.$$.dirty&&i(2,s=ct(o)),17&e.$$.dirty&&i(3,l=o/a)},[a,n,s,l,o]}class fi extends se{constructor(e){super(),ne(this,e,gi,mi,r,{position:4,duration:0})}}function wi(e){g(e,"svelte-1w6u5wr",".wrapper.svelte-1w6u5wr.svelte-1w6u5wr{position:absolute;width:100%;bottom:0;left:0;height:var(--videoplayer-controls-height)}.controls.svelte-1w6u5wr.svelte-1w6u5wr{display:flex;align-items:center;height:100%;width:100%;white-space:nowrap;font-size:13px;transition:transform var(--videoplayer-controls-transition-duration)\n var(--videoplayer-controls-transition-fn);will-change:transform}.hidden.svelte-1w6u5wr.svelte-1w6u5wr{visibility:hidden;opacity:0}.controls-hidden.svelte-1w6u5wr.svelte-1w6u5wr{visibility:visible;transform:translateY(100%)}.wrapper-fullscreen.svelte-1w6u5wr .controls.svelte-1w6u5wr{--videoplayer-controls-height:50px;font-size:16px}.wrapper-fullscreen.svelte-1w6u5wr .ui-time{padding-left:20px;padding-right:15px}.wrapper-fullscreen.svelte-1w6u5wr .controls-play-button{padding-left:20px;padding-right:11px}.wrapper.width380.svelte-1w6u5wr .ui-settings,.wrapper.width380.svelte-1w6u5wr .ui-chromecast,.wrapper.width380.svelte-1w6u5wr .ui-time-duration{display:none !important}.wrapper.width450.svelte-1w6u5wr .ui-chromecast,.wrapper.width450.svelte-1w6u5wr .ui-time-duration{display:none !important}.wrapper.width550.svelte-1w6u5wr .ui-time-duration{display:none !important}.timeline.svelte-1w6u5wr.svelte-1w6u5wr{display:flex;align-items:center;width:100%;margin:0 8px;min-width:86px}.timeline-stub.svelte-1w6u5wr.svelte-1w6u5wr{width:100%}")}function yi(e){let t,i;return t=new _t({}),t.$on("click",(function(){a(e[7])&&e[7].apply(this,arguments)})),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(t,i){e=t},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function bi(e){let t,i;return t=new ai({props:{isActiveLive:e[19]}}),t.$on("click",e[41]),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};524288&i[0]&&(n.isActiveLive=e[19]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function xi(e){let t;return{c(){t=y("div"),P(t,"class","timeline-stub svelte-1w6u5wr")},m(e,i){f(e,t,i)},p:n,i:n,o:n,d(e){e&&w(t)}}}function $i(e){let t,i,n,s;const l=[Vi,ki],o=[];function a(e,t){return e[3]?0:1}return i=a(e),n=o[i]=l[i](e),{c(){t=y("div"),n.c(),P(t,"class","timeline svelte-1w6u5wr")},m(e,n){f(e,t,n),o[i].m(t,null),s=!0},p(e,s){let r=i;i=a(e),i===r?o[i].p(e,s):(q(),Y(o[r],1,1,(()=>{o[r]=null})),K(),n=o[i],n?n.p(e,s):(n=o[i]=l[i](e),n.c()),X(n,1),n.m(t,null))},i(e){s||(X(n),s=!0)},o(e){Y(n),s=!1},d(e){e&&w(t),o[i].d()}}}function ki(e){let t,i;return t=new hi({}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p:n,i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Vi(e){let t,i;return t=new fi({props:{position:e[20],duration:e[21]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};1048576&i[0]&&(n.position=e[20]),2097152&i[0]&&(n.duration=e[21]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Pi(e){let t,i;return t=new vt({props:{className:"ui-time",durationClassName:"ui-time-duration",position:e[3]?e[20]:e[22],duration:e[3]?e[21]:e[23]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};5242888&i[0]&&(n.position=e[3]?e[20]:e[22]),10485768&i[0]&&(n.duration=e[3]?e[21]:e[23]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Ci(e){let t,i;return t=new rt({props:{className:"ui-settings"}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Si(e){let t,i,n,s,l,o,r,c,d,u,p,v,h,g,b,x,k,V,C,S;n=new Rt({props:{className:"controls-play-button",playbackState:e[16],adPlaybackState:e[17],isAds:e[3],handlePlayClick:e[26],repeatPlaylist:e[8],isEnded:e[18],isOneVideoPlaylist:e[6]}});let M=e[5]&&!e[3]&&yi(e),N=!e[3]&&e[10]&&bi(e);const z=[$i,xi],T=[];function L(e,t){return e[13]?0:1}r=L(e),c=T[r]=z[r](e);let j=e[14]&&Pi(e);p=new $t({props:{isVerticalVolume:e[12]}}),p.$on("click",e[25]);let E=!e[24]&&!e[3]&&Ci();return g=new At({}),g.$on("click",(function(){a(e[9])&&e[9].apply(this,arguments)})),x=new ni({props:{className:"ui-chromecast"}}),x.$on("click",e[40]),V=new Xt({props:{logoClickable:e[4]}}),V.$on("click",e[27]),{c(){t=y("div"),i=y("div"),Z(n.$$.fragment),s=$(),M&&M.c(),l=$(),N&&N.c(),o=$(),c.c(),d=$(),j&&j.c(),u=$(),Z(p.$$.fragment),v=$(),E&&E.c(),h=$(),Z(g.$$.fragment),b=$(),Z(x.$$.fragment),k=$(),Z(V.$$.fragment),P(i,"class","controls svelte-1w6u5wr"),A(i,"controls-hidden",!e[2]),P(t,"class",C="wrapper "+e[11]+" svelte-1w6u5wr"),A(t,"hidden",e[1]),A(t,"wrapper-fullscreen",e[15])},m(a,c){f(a,t,c),m(t,i),ee(n,i,null),m(i,s),M&&M.m(i,null),m(i,l),N&&N.m(i,null),m(i,o),T[r].m(i,null),m(i,d),j&&j.m(i,null),m(i,u),ee(p,i,null),m(i,v),E&&E.m(i,null),m(i,h),ee(g,i,null),m(i,b),ee(x,i,null),m(i,k),ee(V,i,null),e[44](t),S=!0},p(s,a){e=s;const v={};65536&a[0]&&(v.playbackState=e[16]),131072&a[0]&&(v.adPlaybackState=e[17]),8&a[0]&&(v.isAds=e[3]),256&a[0]&&(v.repeatPlaylist=e[8]),262144&a[0]&&(v.isEnded=e[18]),64&a[0]&&(v.isOneVideoPlaylist=e[6]),n.$set(v),e[5]&&!e[3]?M?(M.p(e,a),40&a[0]&&X(M,1)):(M=yi(e),M.c(),X(M,1),M.m(i,l)):M&&(q(),Y(M,1,1,(()=>{M=null})),K()),!e[3]&&e[10]?N?(N.p(e,a),1032&a[0]&&X(N,1)):(N=bi(e),N.c(),X(N,1),N.m(i,o)):N&&(q(),Y(N,1,1,(()=>{N=null})),K());let m=r;r=L(e),r===m?T[r].p(e,a):(q(),Y(T[m],1,1,(()=>{T[m]=null})),K(),c=T[r],c?c.p(e,a):(c=T[r]=z[r](e),c.c()),X(c,1),c.m(i,d)),e[14]?j?(j.p(e,a),16384&a[0]&&X(j,1)):(j=Pi(e),j.c(),X(j,1),j.m(i,u)):j&&(q(),Y(j,1,1,(()=>{j=null})),K());const g={};4096&a[0]&&(g.isVerticalVolume=e[12]),p.$set(g),e[24]||e[3]?E&&(q(),Y(E,1,1,(()=>{E=null})),K()):E?16777224&a[0]&&X(E,1):(E=Ci(),E.c(),X(E,1),E.m(i,h));const f={};16&a[0]&&(f.logoClickable=e[4]),V.$set(f),4&a[0]&&A(i,"controls-hidden",!e[2]),(!S||2048&a[0]&&C!==(C="wrapper "+e[11]+" svelte-1w6u5wr"))&&P(t,"class",C),2050&a[0]&&A(t,"hidden",e[1]),34816&a[0]&&A(t,"wrapper-fullscreen",e[15])},i(e){S||(X(n.$$.fragment,e),X(M),X(N),X(c),X(j),X(p.$$.fragment,e),X(E),X(g.$$.fragment,e),X(x.$$.fragment,e),X(V.$$.fragment,e),S=!0)},o(e){Y(n.$$.fragment,e),Y(M),Y(N),Y(c),Y(j),Y(p.$$.fragment,e),Y(E),Y(g.$$.fragment,e),Y(x.$$.fragment,e),Y(V.$$.fragment,e),S=!1},d(i){i&&w(t),te(n),M&&M.d(),N&&N.d(),T[r].d(),j&&j.d(),te(p),E&&E.d(),te(g),te(x),te(V),e[44](null)}}}function Ai(e,t,i){let n,s,l,o,a,r,c,d,u,p,v,m,{hidden:g}=t,{showControls:f}=t,{controlsElementRef:w}=t,{isAds:y=!1}=t,{canRewindLive:b}=t,{logoClickable:x}=t,{showNextVideoButton:$}=t,{isOneVideoPlaylist:k=!1}=t,{playNextVideo:V}=t,{repeatPlaylist:P}=t,{toggleFullscreen:C}=t;const S=Ke(),A=S.actions.internal.toggleMuted,M=S.actions.internal.togglePlay,N=S.actions.internal.pause,z=S.state.duration$;h(e,z,(e=>i(23,v=e)));const T=S.state.positionWithScrubbing$;h(e,T,(e=>i(22,p=e)));const L=S.state.playbackState$;h(e,L,(e=>i(16,o=e)));const E=S.state.chromecastConnected$;h(e,E,(e=>i(24,m=e)));const F=S.state.isEnded$;h(e,F,(e=>i(18,r=e)));const I=S.state.isLive$;h(e,I,(e=>i(10,n=e)));const R=S.state.isActiveLive$;h(e,R,(e=>i(19,c=e)));const B=S.ads.duration;h(e,B,(e=>i(21,u=e)));const H=S.ads.position;h(e,H,(e=>i(20,d=e)));const Q=S.ads.playbackState;h(e,Q,(e=>i(17,a=e)));const _=S.ui.isFullscreen;h(e,_,(e=>i(15,l=e)));const D=S.ui.playerSize;h(e,D,(e=>i(43,s=e)));let O,U,W,q;return e.$$set=e=>{"hidden"in e&&i(1,g=e.hidden),"showControls"in e&&i(2,f=e.showControls),"controlsElementRef"in e&&i(0,w=e.controlsElementRef),"isAds"in e&&i(3,y=e.isAds),"canRewindLive"in e&&i(42,b=e.canRewindLive),"logoClickable"in e&&i(4,x=e.logoClickable),"showNextVideoButton"in e&&i(5,$=e.showNextVideoButton),"isOneVideoPlaylist"in e&&i(6,k=e.isOneVideoPlaylist),"playNextVideo"in e&&i(7,V=e.playNextVideo),"repeatPlaylist"in e&&i(8,P=e.repeatPlaylist),"toggleFullscreen"in e&&i(9,C=e.toggleFullscreen)},e.$$.update=()=>{var t;4096&e.$$.dirty[1]&&i(11,(t=s.width,O=t<380?"width380":t<450?"width450":t<550?"width550":"")),4096&e.$$.dirty[1]&&i(12,U=s.width<550),1032&e.$$.dirty[0]|2048&e.$$.dirty[1]&&i(13,W=!n||n&&b||y),1032&e.$$.dirty[0]&&i(14,q=!n||y)},[w,g,f,y,x,$,k,V,P,C,n,O,U,W,q,l,o,a,r,c,d,u,p,v,m,A,M,N,z,T,L,E,F,I,R,B,H,Q,_,D,()=>S.actions.internal.toggleChromecast(),()=>S.actions.internal.switchToActiveLive(),b,s,function(e){j[e?"unshift":"push"]((()=>{w=e,i(0,w)}))}]}class Mi extends se{constructor(e){super(),ne(this,e,Ai,Si,r,{hidden:1,showControls:2,controlsElementRef:0,isAds:3,canRewindLive:42,logoClickable:4,showNextVideoButton:5,isOneVideoPlaylist:6,playNextVideo:7,repeatPlaylist:8,toggleFullscreen:9},wi,[-1,-1])}}function Ni(e){g(e,"svelte-y9pij4",".container.svelte-y9pij4.svelte-y9pij4{position:absolute;top:0;bottom:0;left:0;right:0;background-position:center;background-size:cover;cursor:pointer;transition:opacity 0.2s, visibility 0.2s;will-change:opacity}.container.hidden.svelte-y9pij4.svelte-y9pij4{opacity:0;visibility:hidden}.playButton.svelte-y9pij4.svelte-y9pij4{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;width:var(--videoplayer-big-play-size);height:var(--videoplayer-big-play-size);display:flex;align-items:center;justify-content:center}.playButtonBackground.svelte-y9pij4.svelte-y9pij4{position:absolute;top:0;bottom:0;left:0;right:0;border-radius:var(--videoplayer-big-play-radius);background-color:var(--videoplayer-big-play-bg-color);transition:background 0.2s, transform 0.2s;transition-timing-function:ease-out;will-change:background, transform}.container.svelte-y9pij4:hover .playButtonBackground.svelte-y9pij4{background-color:var(--videoplayer-big-play-hover-bg-color);transform:scale(1.15)}.playButtonIcon.svelte-y9pij4.svelte-y9pij4{position:relative;width:48px;height:48px}")}function zi(e){let t,i,s,l,o,r,c,d,p;return{c(){t=y("div"),i=y("div"),s=y("div"),l=$(),o=y("img"),P(s,"class","playButtonBackground svelte-y9pij4"),u(o.src,r="data:image/svg+xml,%3csvg width='40' height='40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 10.023a1.5 1.5 0 0 1 2.267-1.29L31.023 18.7a1.5 1.5 0 0 1 .001 2.578l-16.756 9.987A1.5 1.5 0 0 1 12 29.976V10.023z' fill='white'/%3e%3c/svg%3e")||P(o,"src","data:image/svg+xml,%3csvg width='40' height='40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 10.023a1.5 1.5 0 0 1 2.267-1.29L31.023 18.7a1.5 1.5 0 0 1 .001 2.578l-16.756 9.987A1.5 1.5 0 0 1 12 29.976V10.023z' fill='white'/%3e%3c/svg%3e"),P(o,"class","playButtonIcon svelte-y9pij4"),P(o,"alt",""),P(i,"class","playButton svelte-y9pij4"),P(t,"class","container svelte-y9pij4"),P(t,"style",c=`background-image: url('${e[0]}')`),A(t,"hidden",e[1])},m(n,r){f(n,t,r),m(t,i),m(i,s),m(i,l),m(i,o),d||(p=k(t,"click",(function(){a(e[2])&&e[2].apply(this,arguments)})),d=!0)},p(i,[n]){e=i,1&n&&c!==(c=`background-image: url('${e[0]}')`)&&P(t,"style",c),2&n&&A(t,"hidden",e[1])},i:n,o:n,d(e){e&&w(t),d=!1,p()}}}function Ti(e,t,i){let{thumbUrl:n}=t,{hidden:s}=t,{startVideo:l}=t;return e.$$set=e=>{"thumbUrl"in e&&i(0,n=e.thumbUrl),"hidden"in e&&i(1,s=e.hidden),"startVideo"in e&&i(2,l=e.startVideo)},[n,s,l]}class Li extends se{constructor(e){super(),ne(this,e,Ti,zi,r,{thumbUrl:0,hidden:1,startVideo:2},Ni)}}function ji(e){g(e,"svelte-8nkw5s",".container.svelte-8nkw5s.svelte-8nkw5s{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;display:flex}.dot.svelte-8nkw5s.svelte-8nkw5s:nth-child(1){animation-delay:calc(0 * 180ms)}.dot.svelte-8nkw5s.svelte-8nkw5s:nth-child(2){animation-delay:calc(1 * 180ms)}.dot.svelte-8nkw5s.svelte-8nkw5s:nth-child(3){animation-delay:calc(2 * 180ms)}@keyframes svelte-8nkw5s-dot_animation{0%{opacity:0.2}30%{opacity:1}100%{opacity:0.2}}.dot.svelte-8nkw5s.svelte-8nkw5s{border-radius:4px;width:8px;height:8px;background:var(--white);animation-duration:750ms;animation-name:svelte-8nkw5s-dot_animation;animation-iteration-count:infinite}.dot.svelte-8nkw5s+.dot.svelte-8nkw5s{margin-left:4px}")}function Ei(e){let t;return{c(){t=y("div"),t.innerHTML='<div class="dot svelte-8nkw5s"></div> \n <div class="dot svelte-8nkw5s"></div> \n <div class="dot svelte-8nkw5s"></div>',P(t,"class","container svelte-8nkw5s")},m(e,i){f(e,t,i)},p:n,i:n,o:n,d(e){e&&w(t)}}}class Fi extends se{constructor(e){super(),ne(this,e,null,Ei,r,{},ji)}}function Ii(e){const t=Ke();return z((()=>{t.getAdmanWrapper().startPostroll()})),[]}class Ri extends se{constructor(e){super(),ne(this,e,Ii,null,r,{})}}function Bi(e){g(e,"svelte-3vdrx8",".container.svelte-3vdrx8{position:absolute;top:14px;left:16px;padding:4px 8px;font-size:13px;color:var(--white);background:rgba(0, 0, 0, 0.35);border-radius:4px}")}function Hi(e){let t,i,s;return{c(){t=y("div"),i=x("Реклама "),s=x(e[0]),P(t,"class","container svelte-3vdrx8")},m(e,n){f(e,t,n),m(t,i),m(t,s)},p(e,[t]){1&t&&C(s,e[0])},i:n,o:n,d(e){e&&w(t)}}}function Qi(e,t,i){let n,{position:s=0}=t,{duration:l=0}=t;return e.$$set=e=>{"position"in e&&i(1,s=e.position),"duration"in e&&i(2,l=e.duration)},e.$$.update=()=>{6&e.$$.dirty&&i(0,n=ct(l-s))},[n,s,l]}class _i extends se{constructor(e){super(),ne(this,e,Qi,Hi,r,{position:1,duration:2},Bi)}}function Di(e){g(e,"svelte-1gfemsb",".container.svelte-1gfemsb.svelte-1gfemsb{position:absolute;top:14px;right:16px;padding:4px 8px;font-size:13px;color:#bbb;background:rgba(0, 0, 0, 0.35);border-radius:4px;transition:color .2s}.icon.svelte-1gfemsb.svelte-1gfemsb{margin-left:4px;position:relative;top:2px;fill:var(--white);transition:fill .2s}.skippable.svelte-1gfemsb.svelte-1gfemsb{cursor:pointer;color:var(--white)}.skippable.svelte-1gfemsb.svelte-1gfemsb:hover{color:rgba(255, 255, 255, .75)}.skippable.svelte-1gfemsb:hover .icon.svelte-1gfemsb{fill:rgba(255, 255, 255, .75)}")}function Oi(e){let t,i,n,s=Math.ceil(e[1]-e[0])+"";return{c(){t=x("Пропустить рекламу через "),i=x(s),n=x(" с")},m(e,s){f(e,t,s),f(e,i,s),f(e,n,s)},p(e,t){3&t&&s!==(s=Math.ceil(e[1]-e[0])+"")&&C(i,s)},d(e){e&&w(t),e&&w(i),e&&w(n)}}}function Ui(e){let t,i,n;return{c(){t=y("div"),t.innerHTML='Пропустить рекламу\n <svg class="icon svelte-1gfemsb" width="7" height="12" viewBox="0 0 7 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.263627 0.263605C-0.0878444 0.615078 -0.0878429 1.18493 0.26363 1.5364L4.72723 5.99998L0.263627 10.4636C-0.0878444 10.8151 -0.0878429 11.3849 0.26363 11.7364C0.615103 12.0879 1.18495 12.0879 1.53642 11.7364L6.63642 6.63637C6.98789 6.2849 6.98789 5.71505 6.63642 5.36358L1.53642 0.263602C1.18495 -0.0878686 0.615098 -0.0878673 0.263627 0.263605Z"></path></svg>'},m(s,l){f(s,t,l),i||(n=k(t,"click",(function(){a(e[2])&&e[2].apply(this,arguments)})),i=!0)},p(t,i){e=t},d(e){e&&w(t),i=!1,n()}}}function Wi(e){let t;function i(e,t){return e[3]?Ui:Oi}let s=i(e),l=s(e);return{c(){t=y("div"),l.c(),P(t,"class","container svelte-1gfemsb"),A(t,"skippable",e[3])},m(e,i){f(e,t,i),l.m(t,null)},p(e,[n]){s===(s=i(e))&&l?l.p(e,n):(l.d(1),l=s(e),l&&(l.c(),l.m(t,null))),8&n&&A(t,"skippable",e[3])},i:n,o:n,d(e){e&&w(t),l.d()}}}function qi(e,t,i){let s,{position:l=0}=t,{secondsToWatchBeforeSkip:o=0}=t,{skipAd:a=n}=t;return e.$$set=e=>{"position"in e&&i(0,l=e.position),"secondsToWatchBeforeSkip"in e&&i(1,o=e.secondsToWatchBeforeSkip),"skipAd"in e&&i(2,a=e.skipAd)},e.$$.update=()=>{3&e.$$.dirty&&i(3,s=l>0&&l>=o)},[l,o,a,s]}class Ki extends se{constructor(e){super(),ne(this,e,qi,Wi,r,{position:0,secondsToWatchBeforeSkip:1,skipAd:2},Di)}}function Xi(e){g(e,"svelte-12w2063",".container.svelte-12w2063{width:100%;height:100%}")}function Yi(e){let t,i;return t=new _i({props:{position:e[4],duration:e[5]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};16&i&&(n.position=e[4]),32&i&&(n.duration=e[5]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Gi(e){let t,i;return t=new Ki({props:{position:e[4],secondsToWatchBeforeSkip:e[6],skipAd:e[8].actions.internal.skipAd}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};16&i&&(n.position=e[4]),64&i&&(n.secondsToWatchBeforeSkip=e[6]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Ji(e){let t,i;return t=new Ri({}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Zi(e){let t,i,n,s,l,o,a=e[2]&&Yi(e),r=e[3]&&Gi(e),c=e[7]&&Ji();return{c(){t=y("div"),i=y("video"),n=$(),a&&a.c(),s=$(),r&&r.c(),l=$(),c&&c.c(),S(i,"width","100%"),S(i,"height","100%"),P(t,"class","container svelte-12w2063")},m(d,u){f(d,t,u),m(t,i),e[18](i),m(t,n),a&&a.m(t,null),m(t,s),r&&r.m(t,null),m(t,l),c&&c.m(t,null),e[19](t),o=!0},p(e,[i]){e[2]?a?(a.p(e,i),4&i&&X(a,1)):(a=Yi(e),a.c(),X(a,1),a.m(t,s)):a&&(q(),Y(a,1,1,(()=>{a=null})),K()),e[3]?r?(r.p(e,i),8&i&&X(r,1)):(r=Gi(e),r.c(),X(r,1),r.m(t,l)):r&&(q(),Y(r,1,1,(()=>{r=null})),K()),e[7]?c?128&i&&X(c,1):(c=Ji(),c.c(),X(c,1),c.m(t,null)):c&&(q(),Y(c,1,1,(()=>{c=null})),K())},i(e){o||(X(a),X(r),X(c),o=!0)},o(e){Y(a),Y(r),Y(c),o=!1},d(i){i&&w(t),e[18](null),a&&a.d(),r&&r.d(),c&&c.d(),e[19](null)}}}function en(e,t,i){let n,s,l,o,a,{adsSlotId:r}=t,{adsPreviewParam:c}=t,{duration:d=0}=t;const u=Ke(),p=u.state.isEnded$;let m,g;h(e,p,(e=>i(7,a=e)));let f=!1;const w=u.ads.playbackState;h(e,w,(e=>i(17,n=e)));const y=u.ads.canSkip,b=u.ads.duration;h(e,b,(e=>i(5,l=e)));const x=u.ads.position;h(e,x,(e=>i(4,s=e)));const $=u.ads.secondsToWatchBeforeSkip;let k,V;return h(e,$,(e=>i(6,o=e))),z((()=>{const e=new AbortController;const t=u.getAdmanWrapper();if(!r)return void t.onAdmanLoadingError();const{width:i,height:n}=v(u.ui.playerSize),s={width:i,height:n,isFullscreen:v(u.ui.isFullscreen),isAutoplay:v(u.ui.isAutoplay),adsContainer:m,adsVideoElement:g,slotId:r,previewParam:c,duration:d};return window.AdmanHTML?(t.initAdman(s),f=!0):t.loadAdman(e.signal).then((()=>{t.initAdman(s),f=!0})).catch((()=>{t.onAdmanLoadingError()})),()=>{!f&&e.abort()}})),e.$$set=e=>{"adsSlotId"in e&&i(14,r=e.adsSlotId),"adsPreviewParam"in e&&i(15,c=e.adsPreviewParam),"duration"in e&&i(16,d=e.duration)},e.$$.update=()=>{131072&e.$$.dirty&&i(2,k=n!==Tt.INACTIVE),131072&e.$$.dirty&&i(3,V=y&&n!==Tt.INACTIVE)},[m,g,k,V,s,l,o,a,u,p,w,b,x,$,r,c,d,n,function(e){j[e?"unshift":"push"]((()=>{g=e,i(1,g)}))},function(e){j[e?"unshift":"push"]((()=>{m=e,i(0,m)}))}]}class tn extends se{constructor(e){super(),ne(this,e,en,Zi,r,{adsSlotId:14,adsPreviewParam:15,duration:16},Xi)}}function nn(e){g(e,"svelte-p5rs9b","ul.svelte-p5rs9b{position:absolute;border-radius:3px;background:rgba(0, 0, 0, 0.88);overflow:hidden;transition:visibility .1s,opacity .1s;font-size:13px;list-style:none;margin:0;padding:0}.hidden.svelte-p5rs9b{visibility:hidden;opacity:0}li.svelte-p5rs9b{padding:8px 20px;cursor:pointer;position:relative;display:block;color:rgba(255, 255, 255, 0.72);font-size:13px;white-space:nowrap}li.svelte-p5rs9b:hover{background:rgba(66, 66, 66, .5);color:var(--white)}")}function sn(e){let t,i,s,l,a,r;return{c(){t=y("ul"),i=y("li"),i.textContent="Сообщить о проблеме",s=$(),l=y("li"),l.textContent="Копировать данные для диагностики",P(i,"class","svelte-p5rs9b"),P(l,"class","svelte-p5rs9b"),S(t,"top",e[1]+"px"),S(t,"left",e[0]+"px"),P(t,"class","svelte-p5rs9b"),A(t,"hidden",!e[2])},m(n,o){f(n,t,o),m(t,i),m(t,s),m(t,l),e[9](t),a||(r=[k(i,"click",e[4]),k(l,"click",e[5])],a=!0)},p(e,[i]){2&i&&S(t,"top",e[1]+"px"),1&i&&S(t,"left",e[0]+"px"),4&i&&A(t,"hidden",!e[2])},i:n,o:n,d(i){i&&w(t),e[9](null),a=!1,o(r)}}}function ln(e,t,i){let{visible:n=!1}=t,{supportLink:s}=t,{x:l=0}=t,{y:o=0}=t,{playerContainerRef:a}=t,{controlsContainerRef:r}=t;const c=Ke(),d=c.ui.contextMenuVisible;let u;return e.$$set=e=>{"visible"in e&&i(2,n=e.visible),"supportLink"in e&&i(6,s=e.supportLink),"x"in e&&i(0,l=e.x),"y"in e&&i(1,o=e.y),"playerContainerRef"in e&&i(7,a=e.playerContainerRef),"controlsContainerRef"in e&&i(8,r=e.controlsContainerRef)},e.$$.update=()=>{3&e.$$.dirty&&((e,t)=>{if(!u||!a||!r)return;const n=u.getBoundingClientRect(),s=a.getBoundingClientRect(),c=r.getBoundingClientRect();i(0,l=e-s.left),i(1,o=t-s.top),l+n.width>s.width&&i(0,l-=n.width),o+n.height>s.height-c.height&&i(1,o-=n.height)})(l,o)},[l,o,n,u,e=>{window.open(s,"_blank"),d.set(!1),c.actions.internal.pause(),e.stopPropagation()},e=>{(e=>{if(document.queryCommandSupported&&document.queryCommandSupported("copy")){const t=document.createElement("textarea");t.textContent=e,t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}})(c.actions.internal.getDebugData()),d.set(!1),e.stopPropagation()},s,a,r,function(e){j[e?"unshift":"push"]((()=>{u=e,i(3,u)}))}]}class on extends se{constructor(e){super(),ne(this,e,ln,sn,r,{visible:2,supportLink:6,x:0,y:1,playerContainerRef:7,controlsContainerRef:8},nn)}}function an(e){g(e,"svelte-1ome55p",".close.svelte-1ome55p{cursor:pointer;opacity:0.8;transition:opacity 0.2s;position:relative;width:16px;height:16px}.close.svelte-1ome55p:hover{opacity:1}.close.svelte-1ome55p:before,.close.svelte-1ome55p:after{position:absolute;left:8px;content:' ';height:16px;width:2px;background-color:var(--white)}.close.svelte-1ome55p:before{transform:rotate(45deg)}.close.svelte-1ome55p:after{transform:rotate(-45deg)}")}function rn(e){let t,i,s;return{c(){t=y("div"),P(t,"class","close svelte-1ome55p")},m(n,l){f(n,t,l),i||(s=k(t,"click",e[0]),i=!0)},p:n,i:n,o:n,d(e){e&&w(t),i=!1,s()}}}function cn(e){return[function(t){T.call(this,e,t)}]}class dn extends se{constructor(e){super(),ne(this,e,cn,rn,r,{},an)}}function un(e){g(e,"svelte-8jhsry",".timer.svelte-8jhsry{border-radius:50%;transition:background .2s;background:rgba(31, 31, 31, .65);width:50px;height:50px;display:flex;align-items:center;justify-content:space-around}.timer.svelte-8jhsry:hover{background:rgba(31, 31, 31, .85)\n }.timer-canvas.svelte-8jhsry{width:50px;height:50px;position:absolute}.timer-play-icon.svelte-8jhsry{width:22px;height:26px}")}function pn(e){let t,i,s,l,o,a,r;return{c(){t=y("div"),i=y("canvas"),s=$(),l=b("svg"),o=b("g"),a=b("g"),r=b("path"),P(i,"class","timer-canvas svelte-8jhsry"),P(i,"width","100"),P(i,"height","100"),P(r,"class","_play"),P(r,"d","m8.13340613 5.10548415 10.49681277 6.24354325c.3559987.2117494.472936.6720001.2611866 1.0279989-.0638111.1072809-.1533894.1969388-.2606135.2608453l-10.4968128 6.256187c-.35581027.2120659-.81616483.095538-1.02823068-.2602722-.06921066-.1161237-.10574852-.2487949-.10574852-.3839792v-12.49973035c0-.41421357.33578644-.75.75-.75.13495801 0 .26741554.03641567.38340613.1054073z"),P(r,"fill","#fff"),P(a,"fill-rule","nonzero"),P(o,"fill","none"),P(o,"fill-rule","evenodd"),P(l,"class","timer-play-icon svelte-8jhsry"),P(l,"viewBox","0 0 24 24"),P(l,"xmlns","http://www.w3.org/2000/svg"),P(t,"class","timer svelte-8jhsry")},m(n,c){f(n,t,c),m(t,i),e[2](i),m(t,s),m(t,l),m(l,o),m(o,a),m(a,r)},p:n,i:n,o:n,d(i){i&&w(t),e[2](null)}}}function vn(e,t,i){let s,{onTimerEnded:l=n}=t;return z((()=>{let e;const t=s.getContext("2d");if(!t)return;t.lineWidth=6,t.lineCap="round",t.strokeStyle="#fff";const i=Date.now(),n=()=>{const s=(Date.now()-i)/5e3;s<1?(t.clearRect(0,0,100,100),t.beginPath(),t.arc(50,50,47,-Math.PI/2,-Math.PI/2+2*Math.PI*s),t.stroke(),e=requestAnimationFrame(n)):l()};return e=requestAnimationFrame(n),()=>{cancelAnimationFrame(e)}})),e.$$set=e=>{"onTimerEnded"in e&&i(1,l=e.onTimerEnded)},[s,l,function(e){j[e?"unshift":"push"]((()=>{s=e,i(0,s)}))}]}class hn extends se{constructor(e){super(),ne(this,e,vn,pn,r,{onTimerEnded:1},un)}}function mn(e){g(e,"svelte-kisfwc",".overlay.svelte-kisfwc{width:100%;height:100%;background:rgba(0, 0, 0, 0.72);position:absolute}.next-video.svelte-kisfwc{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;width:362px;flex-direction:column}.top.svelte-kisfwc{display:flex;justify-content:space-between}.caption.svelte-kisfwc{font-size:11px;font-weight:bold;color:var(--white);text-transform:uppercase;opacity:0.8}.row.svelte-kisfwc{height:102px;background:rgba(48, 48, 48, .8);cursor:pointer;margin-top:6px;display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.column.svelte-kisfwc{display:flex;flex-direction:column;flex-basis:50%}.thumb.svelte-kisfwc{width:100%;height:100%;background:no-repeat center;background-size:cover;display:flex;align-items:center;position:relative;justify-content:space-around}.thumb-overlay.svelte-kisfwc{width:100%;height:100%;background:var(--black);opacity:0.3;position:absolute}.title.svelte-kisfwc{padding:10px 16px;font-size:12px;font-weight:bold;color:var(--white);line-height:1.6;max-height:52px;overflow:hidden}")}function gn(e){let t,i;return t=new hn({props:{onTimerEnded:e[2]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};4&i&&(n.onTimerEnded=e[2]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function fn(e){let t,i,n,s,l,o,r,c,d,u,p,v,h,g,b,V,S,A,M,N,z;r=new dn({}),r.$on("click",e[4]);let T=e[3]&&gn(e);return{c(){t=y("div"),i=$(),n=y("div"),s=y("div"),l=y("div"),l.textContent="следующее видео",o=$(),Z(r.$$.fragment),c=$(),d=y("div"),u=y("div"),p=y("div"),v=y("div"),h=$(),T&&T.c(),b=$(),V=y("div"),S=y("div"),A=x(e[0]),P(t,"class","overlay svelte-kisfwc"),P(l,"class","caption svelte-kisfwc"),P(s,"class","top svelte-kisfwc"),P(v,"class","thumb-overlay svelte-kisfwc"),P(p,"class","thumb svelte-kisfwc"),P(p,"style",g=`background-image: url('${e[1]}')`),P(u,"class","column svelte-kisfwc"),P(S,"class","title svelte-kisfwc"),P(V,"class","column svelte-kisfwc"),P(d,"class","row svelte-kisfwc"),P(n,"class","next-video svelte-kisfwc")},m(g,w){f(g,t,w),f(g,i,w),f(g,n,w),m(n,s),m(s,l),m(s,o),ee(r,s,null),m(n,c),m(n,d),m(d,u),m(u,p),m(p,v),m(p,h),T&&T.m(p,null),m(d,b),m(d,V),m(V,S),m(S,A),M=!0,N||(z=k(d,"click",(function(){a(e[2])&&e[2].apply(this,arguments)})),N=!0)},p(t,[i]){(e=t)[3]?T?(T.p(e,i),8&i&&X(T,1)):(T=gn(e),T.c(),X(T,1),T.m(p,null)):T&&(q(),Y(T,1,1,(()=>{T=null})),K()),(!M||2&i&&g!==(g=`background-image: url('${e[1]}')`))&&P(p,"style",g),(!M||1&i)&&C(A,e[0])},i(e){M||(X(r.$$.fragment,e),X(T),M=!0)},o(e){Y(r.$$.fragment,e),Y(T),M=!1},d(e){e&&w(t),e&&w(i),e&&w(n),te(r),T&&T.d(),N=!1,z()}}}function wn(e,t,i){let{title:n}=t,{thumb:s}=t,{playNextVideo:l}=t,o=!0;return e.$$set=e=>{"title"in e&&i(0,n=e.title),"thumb"in e&&i(1,s=e.thumb),"playNextVideo"in e&&i(2,l=e.playNextVideo)},[n,s,l,o,()=>i(3,o=!1)]}class yn extends se{constructor(e){super(),ne(this,e,wn,fn,r,{title:0,thumb:1,playNextVideo:2},mn)}}function bn(e){g(e,"svelte-1fmik5c",".title.svelte-1fmik5c{position:absolute;left:0;top:0;width:100%;font-size:15px;color:var(--white);box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition-property:visibility, transform, opacity;transition-duration:var(--videoplayer-controls-transition-duration);transition-timing-function:var(--videoplayer-controls-transition-fn);will-change:transform, opacity}.hidden.svelte-1fmik5c{visibility:hidden;transform:translateY(-44px);opacity:0}")}function xn(e){let t,i;return{c(){t=y("div"),i=x(e[0]),P(t,"class","title svelte-1fmik5c"),A(t,"hidden",e[1])},m(e,n){f(e,t,n),m(t,i)},p(e,[n]){1&n&&C(i,e[0]),2&n&&A(t,"hidden",e[1])},i:n,o:n,d(e){e&&w(t)}}}function $n(e,t,i){let{title:n=""}=t,{isHidden:s=!1}=t;return e.$$set=e=>{"title"in e&&i(0,n=e.title),"isHidden"in e&&i(1,s=e.isHidden)},[n,s]}class kn extends se{constructor(e){super(),ne(this,e,$n,xn,r,{title:0,isHidden:1},bn)}}function Vn(e){g(e,"svelte-1o62kpz",".wrapper.svelte-1o62kpz{height:100%;background-position:center;background-size:cover;display:flex;align-items:center;justify-content:center;font-size:16px;flex-direction:column}.icon_wrapper.svelte-1o62kpz{display:flex;flex-direction:column;align-items:center;width:400px}.icon.svelte-1o62kpz{width:50px;height:50px}.text.svelte-1o62kpz{margin-top:20px}")}function Pn(e){let t,i,n;return{c(){t=y("div"),i=x("Видео воспроизводится на "),n=x(e[1]),P(t,"class","text svelte-1o62kpz")},m(e,s){f(e,t,s),m(t,i),m(t,n)},p(e,t){2&t&&C(n,e[1])},d(e){e&&w(t)}}}function Cn(e){let t,i,s,l,o,a,r=e[1]&&Pn(e);return{c(){t=y("div"),i=y("div"),i.innerHTML='<svg class="icon svelte-1o62kpz" width="22" height="22" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" fill="#fff"></path><path d="M0 0h24v24H0z"></path></g></svg>',s=$(),r&&r.c(),P(i,"class","icon_wrapper svelte-1o62kpz"),P(t,"class","wrapper svelte-1o62kpz"),P(t,"style",l=`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e[0]}')`)},m(n,l){f(n,t,l),m(t,i),m(t,s),r&&r.m(t,null),o||(a=k(t,"click",e[2]),o=!0)},p(e,[i]){e[1]?r?r.p(e,i):(r=Pn(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null),1&i&&l!==(l=`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e[0]}')`)&&P(t,"style",l)},i:n,o:n,d(e){e&&w(t),r&&r.d(),o=!1,a()}}}function Sn(e,t,i){let{thumbUrl:n}=t,{chromecastDeviceName:s}=t;return e.$$set=e=>{"thumbUrl"in e&&i(0,n=e.thumbUrl),"chromecastDeviceName"in e&&i(1,s=e.chromecastDeviceName)},[n,s,function(t){T.call(this,e,t)}]}class An extends se{constructor(e){super(),ne(this,e,Sn,Cn,r,{thumbUrl:0,chromecastDeviceName:1},Vn)}}function Mn(i,n,s){let l,o,a,r,c,{isAds:d}=n,{hideContextMenu:u}=n,{toggleFullscreen:p}=n;const v=Ke(),m=v.state.playbackState$;h(i,m,(e=>s(13,c=e)));const g=v.ads.playbackState;h(i,g,(e=>s(12,r=e)));const f=v.state.positionExact$;h(i,f,(e=>s(11,a=e)));const w=v.state.duration$;h(i,w,(e=>s(10,o=e)));const y=v.state.volume$;h(i,y,(e=>s(9,l=e)));return i.$$set=e=>{"isAds"in e&&s(5,d=e.isAds),"hideContextMenu"in e&&s(6,u=e.hideContextMenu),"toggleFullscreen"in e&&s(7,p=e.toggleFullscreen)},[m,g,f,w,y,d,u,p,i=>{u();const n=i.code;if(i.ctrlKey||i.altKey||i.metaKey)return;const s=c===e.PlaybackState.PLAYING||c===e.PlaybackState.PAUSED,h=d&&(r===Tt.PAUSED||r===Tt.PLAYING);if(s||h)switch(n){case Ze.KeyJ:case Ze.ArrowLeft:{const e=Math.max(a-10,0);a>0&&v.actions.internal.seekTime(e);break}case Ze.KeyL:case Ze.ArrowRight:{const e=Math.min(a+10,o);a<o&&v.actions.internal.seekTime(e);break}case Ze.ArrowUp:{const e=Math.min(l+.05,1);l<1&&v.actions.internal.setVolume(e);break}case Ze.ArrowDown:{const e=Math.max(l-.05,0);l>0&&v.actions.internal.setVolume(e);break}case Ze.KeyK:case Ze.Space:v.actions.internal.togglePlay();break;case Ze.KeyM:v.actions.internal.toggleMuted();break;case Ze.KeyF:p();break;default:t.checkNever(n)}}]}class Nn extends se{constructor(e){super(),ne(this,e,Mn,null,r,{isAds:5,hideContextMenu:6,toggleFullscreen:7,keyDownHandler:8})}get keyDownHandler(){return this.$$.ctx[8]}}const zn={set:(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch(e){}},get:e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},remove(e){try{localStorage.removeItem(e)}catch(e){}}},Tn=e=>e>1?1:e<0?0:e,Ln=e=>zn.set("vk_player_preferred_volume",Tn(e)),jn=()=>{const e=parseFloat(zn.get("vk_player_preferred_volume"));return isNaN(e)?1:Tn(e)},En=e=>zn.set("vk_player_prefer_volume_mute",e),Fn=(e,t)=>e<400||t<225?5:e<640||t<360?0:e<960||t<540?1:e<1280||t<720?2:3;class In{constructor(){this.adman=null,this.initialVolume=1,this.videoElement=null,this.currentAdSection=null,this.actions=null,this.adsState=null,this.loadAdman=e=>new Promise(((i,n)=>{let s;const l=()=>{clearTimeout(s),delete window.admanAsyncInit,window.AdmanHTML?i():n()};t.addScript("//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",e,2e3).then((()=>{window.AdmanHTML?i():(window.admanAsyncInit=l,s=window.setTimeout(l,2e3))})).catch((()=>{n()}))})),this.onAdsReady=()=>{this.startPreroll()},this.onAdStarted=(e,i)=>{t.assertNonNullable(this.adsState),t.assertNonNullable(this.actions),i.muted&&(this.setVolume(0),this.actions.setMuted(!0)),this.adsState.duration.set(i.duration),this.adsState.playbackState.set(Tt.PLAYING),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay)},this.onAdTimeRemained=({currentTime:e})=>{t.assertNonNullable(this.adsState),this.adsState.position.set(e)},this.onAdPaused=()=>{t.assertNonNullable(this.adsState),this.adsState.playbackState.set(Tt.PAUSED)},this.onAdPlayed=()=>{t.assertNonNullable(this.adsState),this.adsState.playbackState.set(Tt.PLAYING)},this.onAdMidrollPoint=()=>{t.assertNonNullable(this.adman),t.assertNonNullable(this.actions),this.actions.switchFromVideoToAds(),this.adman.start(zt.Midroll),this.currentAdSection=zt.Midroll},this.onAdSkipped=()=>{this.switchToVideo()},this.onAdClosed=()=>{this.switchToVideo()},this.onAdCompleted=()=>{this.switchToVideo()},this.onAdClicked=()=>{var e;null===(e=this.videoElement)||void 0===e||e.pause()},this.onAdError=()=>{this.switchToVideo()}}init(e,t){this.actions=e,this.adsState=t}onAdmanLoadingError(){this.switchToVideo(!0)}initAdman(e){const{width:t,height:i,isFullscreen:n,isAutoplay:s,adsContainer:l,adsVideoElement:o,slotId:a,duration:r,previewParam:c}=e,d={slot:a,wrapper:l,videoEl:o,videoQuality:i,params:{dl:encodeURIComponent(window.location.href),autoplay:s,player_width:t,player_height:i,puid10:Fn(t,i),puid11:n?0:1,preview:c,duration:r},browser:{mobile:!1}},u=new window.AdmanHTML;u.setDebug(!1),u.onReady(this.onAdsReady),u.onStarted(this.onAdStarted),u.onPlayed(this.onAdPlayed),u.onPaused(this.onAdPaused),u.adMidrollPoint(this.onAdMidrollPoint),u.onClosed(this.onAdClosed),u.onSkipped(this.onAdSkipped),u.onClicked(this.onAdClicked),u.onTimeRemained(this.onAdTimeRemained),u.onCompleted(this.onAdCompleted),u.onError(this.onAdError),u.init(d),this.adman=u,this.videoElement=o}switchToVideo(e=!1){if(null===this.currentAdSection&&!e)return;t.assertNonNullable(this.actions),t.assertNonNullable(this.adsState);const i=this.currentAdSection===zt.Postroll;this.adsState.playbackState.set(Tt.INACTIVE),this.currentAdSection=null,i&&this.adsState.postrollPassed.set(!0),this.actions.switchFromAdsToVideo(!i)}togglePlay(){t.assertNonNullable(this.adsState);const e=v(this.adsState.playbackState);e===Tt.PLAYING?this.pause():e===Tt.PAUSED&&this.play()}setInitialVolume(e){this.initialVolume=e}setVolume(e){var t;null===(t=this.adman)||void 0===t||t.setVolume(e),this.videoElement&&(this.videoElement.volume=e)}setFullscreen(e){var t;null===(t=this.adman)||void 0===t||t.setFullscreen(e)}startPreroll(){t.assertNonNullable(this.adman),this.setVolume(this.initialVolume),this.adman.start(zt.Preroll),this.currentAdSection=zt.Preroll}startPostroll(){t.assertNonNullable(this.adman),t.assertNonNullable(this.actions),this.actions.switchFromVideoToAds(),this.adman.start(zt.Postroll),this.currentAdSection=zt.Postroll}play(){t.assertNonNullable(this.adman),this.adman.resume()}pause(){t.assertNonNullable(this.adman),this.adman.pause()}skip(){t.assertNonNullable(this.adman),this.adman.skip()}setPosition(e,t){var i;null===(i=this.adman)||void 0===i||i.setPosition(Math.floor(e),Math.floor(t))}destroy(){var e;null===(e=this.adman)||void 0===e||e.destroy()}}let Rn,Bn,Hn,Qn;const _n=({videoId:n,albumId:s,autoplay:l,statPlace:o,callbacks:a})=>{var r;Rn=new e.Player,Qn=new In;const c=new i.OneStat({movieId:n,albumId:s,place:o,autoplay:l,quality:Xe(Rn.info.currentQuality$.getValue()),contentType:Ye(Rn.info.currentFormat$.getValue()),cdnHostname:Rn.info.hostname$.getValue()},{apiEnv:i.ApiEnv.PROD}),d=((n,s)=>(new t.Subscription).add(n.events.started$.subscribe((()=>{s.logStarted()}))).add(n.events.seeked$.subscribe((()=>{s.logSeek()}))).add(n.events.willPause$.subscribe((()=>{s.logPause({position:n.info.position$.getValue()})}))).add(n.events.willResume$.subscribe((()=>{s.logPlay()}))).add(n.events.managedError$.subscribe((({id:e})=>{s.logError({errorType:e})}))).add(n.events.fatalError$.subscribe((({id:e})=>{s.logError({errorType:e})}))).add(n.events.firstBytes$.subscribe((e=>{s.logFirstBytes({time:e})}))).add(n.events.firstFrame$.subscribe((e=>{s.logFirstFrame({time:e})}))).add(n.events.watchCoverageRecord$.subscribe((e=>{s.logWatchCoverageRecord(e)}))).add(n.events.watchCoverageLive$.subscribe((e=>{s.logWatchCoverageLive(e)}))).add(n.info.hostname$.subscribe((e=>{s.updateContext({cdnHostname:e})}))).add(n.info.currentQuality$.subscribe((e=>{s.updateContext({quality:Xe(e)})}))).add(n.info.currentFormat$.subscribe((e=>{s.updateContext({contentType:Ye(e)})}))).add(n.info.chromecastState$.subscribe((t=>{s.updateContext({destination:t===e.ChromecastState.CONNECTED?i.ScreenDestination.CHROMECAST:i.ScreenDestination.SCREEN})}))))(Rn,c),u=(new t.Subscription).add(Rn.experimental.element$.subscribe((e=>{e&&e.classList.add("player-media")}))).add(Rn.events.ended$.subscribe((()=>{var e;null===(e=a.onEnded)||void 0===e||e.call(a)}))).add(Rn.events.started$.subscribe((()=>{var e;null===(e=a.onStarted)||void 0===e||e.call(a)}))).add(Rn.events.willSeek$.subscribe((({from:e,to:t})=>{var i;null===(i=a.onSeek)||void 0===i||i.call(a,e,t)}))).add(Rn.info.position$.subscribe((e=>{var t;const i=Rn.info.duration$.getValue();null===(t=a.onTimeupdate)||void 0===t||t.call(a,i,e),Qn.setPosition(e,i)})));(null===(r=null===window||void 0===window?void 0:window.videoPlayerConfig)||void 0===r?void 0:r.debugLogs)&&u.add(Rn.events.log$.subscribe((e=>{console.log("%c sdk ","background:#9ddcf7;",`sdk component: ${e.component}`,e.message)})));const p=(new t.Subscription).add(Rn.events.startAttempt$.subscribe((e=>{var t;null===(t=a.onFirstStartAttempt)||void 0===t||t.call(a,e),p.unsubscribe()}))),h=De(Rn.info.position$.getValue(),(t=>{let i,n;const s=()=>{const l=Rn.info.playbackState$.getValue(),o=Rn.info.isLive$.getValue(),a=Rn.info.duration$.getValue(),r=Rn.info.position$.getValue();if([e.PlaybackState.PLAYING,e.PlaybackState.PAUSED].includes(l)){const e=o?r-a:Rn.getExactTime();e!==n&&t(e),n=e}i=requestAnimationFrame(s)};return s(),()=>cancelAnimationFrame(i)})),m=Ge(Rn.info.playbackState$),g=Ge(Rn.info.currentBuffer$),f=Ge(Rn.info.isEnded$),w=Ge(Rn.info.isLive$),y=Ge(Rn.info.volume$),b=Ge(Rn.info.muted$),x=Ge(Rn.info.availableQualities$),$=Ge(Rn.info.chromecastState$),k=Ge(Rn.info.chromecastDeviceName$),V=Ge(Rn.info.duration$);let P=null;const C=Rn.info.isBuffering$,S=De(C.getValue(),(e=>{const t=C.subscribe((t=>{t&&null===P?P=window.setTimeout((()=>{e(C.getValue()),P=null}),500):e(t)}));return()=>{t.unsubscribe(),P&&clearTimeout(P)}})),A=Ue([V,w],(([e,t])=>t?-e:e)),M=Ue([w,Ge(Rn.info.position$)],(([e,t])=>Boolean(e&&t>-5))),N=Ue([$],(([t])=>t===e.ChromecastState.CONNECTED)),z=Oe(void 0),T=Ge(Rn.info.isAutoQualityEnabled$,(e=>e&&z.set(void 0))),L=Ge(Rn.info.currentQuality$,(()=>z.set(void 0))),j=Ue([z,L],(([e,t])=>null!=e?e:t)),E=Ue([x,T,j],(([t,i,n])=>{const s=[{value:Mt.AUTO,displayValue:"Авто",selected:i}],l=t.filter((t=>t!==e.VideoQuality.INVARIANT));for(const e of l)s.push({value:e,displayValue:e,selected:!i&&e===n});return s})),F=Ue([g,A],(([e,t],i)=>{var n;return i((null!==(n=null==e?void 0:e.end)&&void 0!==n?n:0)/t)})),I=(e,t=e,i=!1)=>{var n,s;const l=!i,o=Rn.info.muted$.getValue();Rn.setVolume(e),Qn.setVolume(e),l&&(null===(n=a.onVolumeChange)||void 0===n||n.call(a,e)),Ln(t),o&&(Rn.setMuted(!1),l&&(null===(s=a.onUnmute)||void 0===s||s.call(a)),En(!1))},R=(e,t=!1)=>{var i,n,s;const l=!t,o=Rn.info.volume$.getValue();if(Rn.setMuted(e),Qn.setVolume(e?0:o),En(e),l&&(e?null===(i=a.onMute)||void 0===i||i.call(a):null===(n=a.onUnmute)||void 0===n||n.call(a)),0===o){let e=jn();0===e&&(e=.05,Ln(e)),Rn.setVolume(e),Qn.setVolume(e),l&&(null===(s=a.onVolumeChange)||void 0===s||s.call(a,e))}},B=e=>{if(Rn.info.isLive$.getValue()){const t=Rn.info.duration$.getValue(),i=Math.min(0,t+e);Rn.seekTime(i)}else Rn.seekTime(e)},H=e=>{const t=v(A)*e;B(t)},Q=Oe(void 0);let _=!1;const D=e=>{Q.set(e)},O=Ue([h,A,Q],(([e,i,n],s)=>{s(t.isNonNullable(n)?n*i:e)})),U=e=>{var i;if(t.assertNonNullable(Hn),v(Hn.playerPhase)===Nt.Ads)return void Qn.pause();!e&&(null===(i=a.onPause)||void 0===i||i.call(a)),Rn.pause()},W=(e,i)=>{t.assertNonNullable(Hn),e?Hn.playerPhase.set(Nt.Ads):(Hn.playerPhase.set(Nt.Video),i?Rn.play():Hn.actions.internal.togglePlay())};return Hn={initVideo:e=>{Rn.initVideo(e),Bn=e},playerPhase:Oe(Nt.Thumb),state:{positionExact$:h,positionWithScrubbing$:O,duration$:A,playbackState$:m,isLoaderVisible:S,bufferedProgress$:F,isLive$:w,isActiveLive$:M,isEnded$:f,muted$:b,volume$:y,currentQuality$:j,isAutoQualityEnabled$:T,availableQualities$:E,chromecastState$:$,chromecastDeviceName$:k,chromecastConnected$:N},ui:{controlsVisible:Oe(!0),isFullscreen:Oe(!1),isAutoplay:Oe(!1),contextMenuVisible:Oe(!1),playerSize:Oe({width:0,height:0})},ads:{position:Oe(0),duration:Oe(0),playbackState:Oe(Tt.INACTIVE),canSkip:Oe(!1),secondsToWatchBeforeSkip:Oe(0),postrollPassed:Oe(!1)},actions:{internal:{firstStart:e=>W(e,!1),pause:()=>U(!1),togglePlay:()=>{var i,n;t.assertNonNullable(Hn),v(Hn.playerPhase)!==Nt.Ads?Rn.info.playbackState$.getValue()!==e.PlaybackState.PLAYING?(Rn.info.isEnded$.getValue()&&Rn.seekTime(0),Rn.play(),null===(i=a.onPlay)||void 0===i||i.call(a)):(Rn.pause(),null===(n=a.onPause)||void 0===n||n.call(a)):Qn.togglePlay()},toggleMuted:()=>{const e=Rn.info.muted$.getValue(),t=Rn.info.volume$.getValue();R(!(0===t||e))},setVolume:I,setQuality:e=>{Rn.setAutoQuality(e===Mt.AUTO),e!==Mt.AUTO&&(z.set(e),Rn.setQuality(e))},startScrubbing:t=>{_=Rn.info.playbackState$.getValue()===e.PlaybackState.PLAYING,Rn.pause(),H(t),D(t)},progressScrubbing:D,completeScrubbing:e=>{H(e),_&&Rn.play(),Q.set(void 0),_=!1},toggleChromecast:()=>Rn.toggleChromecast(),switchToActiveLive:()=>Rn.seekTime(0),switchFromAdsToVideo:(e=!0)=>{t.assertNonNullable(Hn),Hn.playerPhase.set(Nt.Video),e&&Rn.play()},switchFromVideoToAds:()=>{t.assertNonNullable(Hn),Hn.actions.internal.pause(),Hn.playerPhase.set(Nt.Ads)},skipAd:()=>Qn.skip(),getDebugData:()=>(t.assertNonNullable(Hn),((e,t,i)=>{var n;const s=[],l=e.info,{width:o,height:a}=v(i.ui.playerSize);return s.push(["Browser",navigator.userAgent]),s.push(["Content host",l.hostname$.getValue()]),s.push(["Media provider",l.currentFormat$.getValue()]),s.push(["Available URLs",Object.keys(t.sources).join(", ")]),s.push(["Quality",l.currentQuality$.getValue()]),s.push(["Available qualities",l.availableQualities$.getValue().join(", ")]),s.push(["Auto quality enabled",l.isAutoQualityEnabled$.getValue()]),s.push(["Throughput estimation",null!==(n=l.throughputEstimation$.getValue())&&void 0!==n?n:0]),s.push(["Position",v(i.state.positionExact$)]),s.push(["Player playback state",l.playbackState$.getValue()]),s.push(["Player size",`${o}x${a}`]),s.push(["URL",window.location.href]),s.push(["Application version","@vkontakte/videoplayer@1.0.3"]),s.map((e=>e.join(": "))).join("\n")})(Rn,Bn,Hn)),seekTime:e=>B(e)},external:{firstStart:e=>W(e,!0),play:()=>(e=>{var i;if(t.assertNonNullable(Hn),v(Hn.playerPhase)===Nt.Ads)return void Qn.play();!e&&(null===(i=a.onPlay)||void 0===i||i.call(a)),Rn.play()})(!0),pause:()=>U(!0),seekTime:e=>(e=>{Rn.seekTime(Rn.info.isLive$.getValue()?-e:e)})(e),setMuted:e=>R(e,!0),setVolume:e=>I(e,e,!0)}},callbacks:a,getAdmanWrapper:()=>Qn,destroy:()=>{d.unsubscribe(),u.unsubscribe(),p.unsubscribe(),Rn.destroy(),Qn.destroy()}},Hn},Dn=e=>e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():Promise.reject(),On=()=>{const e=document;return!!(e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement)},{window:Un}=G;function Wn(e){g(e,"svelte-1525i7o",".player-wrapper.svelte-1525i7o{--white:#fff;--black:#000;--red:#ff3347;--videoplayer-controls-height:45px;--videoplayer-controls-fullscreen-height:50px;--videoplayer-controls-transition-duration:0.25s;--videoplayer-controls-transition-fn:cubic-bezier(0.455, 0.03, 0.515, 0.955);--videoplayer-focused-element-shadow:inset 0 0 0 2px #2a5885;--videoplayer-focused-slider-shadow:0 0 0 2px #2a5885;--videoplayer-big-play-size:75px;--videoplayer-big-play-radius:50%;--videoplayer-big-play-bg-color:rgba(0, 0, 0, 0.5);--videoplayer-big-play-hover-bg-color:rgba(0, 0, 0, 0.6);--videoplayer-big-play-icon-width:38px;--videoplayer-big-play-icon-height:33px;--videoplayer-slider-height:5px;--videoplayer-slider-radius:calc(var(--videoplayer-slider-height) / 2);--videoplayer-slider-handle-size:13px;--videoplayer-slider-bg:rgba(255, 255, 255, 0.4);--videoplayer-slider-loaded-bg:rgba(255, 255, 255, 0.4);--videoplayer-slider-filled-bg:var(--white);--videoplayer-slider-filled-active-live-bg:var(--red);--videoplayer-slider-filled-ads:rgba(103, 165, 235, 1);--videoplayer-slider-disabled-color:rgba(248, 248, 248, 0.31);--videoplayer-button-hover-transition:opacity 0.2s;position:relative;width:100%;height:100%;min-width:328px;min-height:206px;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}.player-wrapper.svelte-1525i7o .player-media{position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out}.video-container.svelte-1525i7o,.ads-container.svelte-1525i7o{position:absolute;width:100%;height:100%;left:0;top:0}.ads-container.svelte-1525i7o{background:var(--black)}.hidden.svelte-1525i7o{visibility:hidden}")}function qn(e){let t,i,n;return i=new tn({props:{adsSlotId:e[5],adsPreviewParam:e[6],duration:e[7]}}),{c(){t=y("div"),Z(i.$$.fragment),P(t,"class","ads-container svelte-1525i7o"),A(t,"hidden",e[16]!==Nt.Ads)},m(e,s){f(e,t,s),ee(i,t,null),n=!0},p(e,n){const s={};32&n[0]&&(s.adsSlotId=e[5]),64&n[0]&&(s.adsPreviewParam=e[6]),128&n[0]&&(s.duration=e[7]),i.$set(s),65536&n[0]&&A(t,"hidden",e[16]!==Nt.Ads)},i(e){n||(X(i.$$.fragment,e),n=!0)},o(e){Y(i.$$.fragment,e),n=!1},d(e){e&&w(t),te(i)}}}function Kn(e){let t,i;return t=new Fi({}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Xn(e){let t,i;return t=new yn({props:{title:e[10],thumb:e[11],playNextVideo:e[13]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};1024&i[0]&&(n.title=e[10]),2048&i[0]&&(n.thumb=e[11]),8192&i[0]&&(n.playNextVideo=e[13]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Yn(e){let t,i;return t=new kn({props:{title:e[0],isHidden:!e[25]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};1&i[0]&&(n.title=e[0]),33554432&i[0]&&(n.isHidden=!e[25]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Gn(e){let t,i;return t=new An({props:{thumbUrl:e[1],chromecastDeviceName:e[28]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};2&i[0]&&(n.thumbUrl=e[1]),268435456&i[0]&&(n.chromecastDeviceName=e[28]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Jn(e){let t,i,n,s,l,a,r,c,d,u,p,v,h,g,b,x,C,S,M;i=new Li({props:{hidden:e[16]!==Nt.Thumb,thumbUrl:e[1],startVideo:e[43]}});let N=e[4]&&e[20]&&qn(e);r=new on({props:{supportLink:e[3],visible:e[27],playerContainerRef:e[17],controlsContainerRef:e[19],x:e[21],y:e[22]}});let z=e[24]&&Kn(),T=e[26]&&e[10]&&e[11]&&Xn(e),L=e[16]===Nt.Video&&Yn(e),E=e[15]&&Gn(e),F={toggleFullscreen:e[44],hideContextMenu:e[45],isAds:e[16]===Nt.Ads};function I(t){e[71](t)}h=new Nn({props:F}),e[70](h);let R={hidden:e[16]===Nt.Thumb,showControls:e[25],isAds:e[16]===Nt.Ads,canRewindLive:e[2],logoClickable:e[8],showNextVideoButton:e[9],isOneVideoPlaylist:e[12],playNextVideo:e[13],repeatPlaylist:e[14],toggleFullscreen:e[44]};return void 0!==e[19]&&(R.controlsElementRef=e[19]),b=new Mi({props:R}),j.push((()=>J(b,"controlsElementRef",I))),{c(){t=y("div"),Z(i.$$.fragment),n=$(),s=y("div"),l=$(),N&&N.c(),a=$(),Z(r.$$.fragment),c=$(),z&&z.c(),d=$(),T&&T.c(),u=$(),L&&L.c(),p=$(),E&&E.c(),v=$(),Z(h.$$.fragment),g=$(),Z(b.$$.fragment),P(s,"class","video-container svelte-1525i7o"),A(s,"hidden",e[16]!==Nt.Video),P(t,"class","player-wrapper svelte-1525i7o"),P(t,"tabindex","0")},m(o,w){f(o,t,w),ee(i,t,null),m(t,n),m(t,s),e[69](s),m(t,l),N&&N.m(t,null),m(t,a),ee(r,t,null),m(t,c),z&&z.m(t,null),m(t,d),T&&T.m(t,null),m(t,u),L&&L.m(t,null),m(t,p),E&&E.m(t,null),m(t,v),ee(h,t,null),m(t,g),ee(b,t,null),e[72](t),C=!0,S||(M=[k(Un,"blur",e[45]),k(s,"contextmenu",V(e[46])),k(s,"click",e[47]),k(t,"mouseenter",e[40]),k(t,"mouseleave",e[41]),k(t,"mousemove",e[42]),k(t,"keydown",V(e[48]))],S=!0)},p(e,n){const l={};65536&n[0]&&(l.hidden=e[16]!==Nt.Thumb),2&n[0]&&(l.thumbUrl=e[1]),i.$set(l),65536&n[0]&&A(s,"hidden",e[16]!==Nt.Video),e[4]&&e[20]?N?(N.p(e,n),1048592&n[0]&&X(N,1)):(N=qn(e),N.c(),X(N,1),N.m(t,a)):N&&(q(),Y(N,1,1,(()=>{N=null})),K());const o={};8&n[0]&&(o.supportLink=e[3]),134217728&n[0]&&(o.visible=e[27]),131072&n[0]&&(o.playerContainerRef=e[17]),524288&n[0]&&(o.controlsContainerRef=e[19]),2097152&n[0]&&(o.x=e[21]),4194304&n[0]&&(o.y=e[22]),r.$set(o),e[24]?z?16777216&n[0]&&X(z,1):(z=Kn(),z.c(),X(z,1),z.m(t,d)):z&&(q(),Y(z,1,1,(()=>{z=null})),K()),e[26]&&e[10]&&e[11]?T?(T.p(e,n),67111936&n[0]&&X(T,1)):(T=Xn(e),T.c(),X(T,1),T.m(t,u)):T&&(q(),Y(T,1,1,(()=>{T=null})),K()),e[16]===Nt.Video?L?(L.p(e,n),65536&n[0]&&X(L,1)):(L=Yn(e),L.c(),X(L,1),L.m(t,p)):L&&(q(),Y(L,1,1,(()=>{L=null})),K()),e[15]?E?(E.p(e,n),32768&n[0]&&X(E,1)):(E=Gn(e),E.c(),X(E,1),E.m(t,v)):E&&(q(),Y(E,1,1,(()=>{E=null})),K());const c={};65536&n[0]&&(c.isAds=e[16]===Nt.Ads),h.$set(c);const m={};65536&n[0]&&(m.hidden=e[16]===Nt.Thumb),33554432&n[0]&&(m.showControls=e[25]),65536&n[0]&&(m.isAds=e[16]===Nt.Ads),4&n[0]&&(m.canRewindLive=e[2]),256&n[0]&&(m.logoClickable=e[8]),512&n[0]&&(m.showNextVideoButton=e[9]),4096&n[0]&&(m.isOneVideoPlaylist=e[12]),8192&n[0]&&(m.playNextVideo=e[13]),16384&n[0]&&(m.repeatPlaylist=e[14]),!x&&524288&n[0]&&(x=!0,m.controlsElementRef=e[19],H((()=>x=!1))),b.$set(m)},i(e){C||(X(i.$$.fragment,e),X(N),X(r.$$.fragment,e),X(z),X(T),X(L),X(E),X(h.$$.fragment,e),X(b.$$.fragment,e),C=!0)},o(e){Y(i.$$.fragment,e),Y(N),Y(r.$$.fragment,e),Y(z),Y(T),Y(L),Y(E),Y(h.$$.fragment,e),Y(b.$$.fragment,e),C=!1},d(n){n&&w(t),te(i),e[69](null),N&&N.d(),te(r),z&&z.d(),T&&T.d(),L&&L.d(),E&&E.d(),e[70](null),te(h),te(b),e[72](null),S=!1,o(M)}}}function Zn(t,i,s){let l,o,a,r,c,d,u,p,v,m,g,{sources:f}=i,{title:w}=i,{thumbUrl:y}=i,{unitedVideoId:b}=i,{albumId:x}=i,{statPlace:$}=i,{autoplay:k=!1}=i,{volume:V}=i,{muted:P}=i,{fromTime:C=0}=i,{canRewindLive:S=!0}=i,{supportLink:A=Je}=i,{showAds:M=!1}=i,{adsSlotId:N}=i,{adsPreviewParam:T}=i,{duration:L}=i,{logoClickable:E=!1}=i,{showNextVideoButton:F=!1}=i,{endScreenVideoTitle:I}=i,{endScreenVideoThumb:R}=i,{isOneVideoPlaylist:B=!1}=i,{outerContainerRef:H}=i,{playNextVideo:Q=n}=i,{repeatPlaylist:_=n}=i,{callbacks:D={}}=i;const O=_n({videoId:b,autoplay:k,albumId:x,statPlace:$,callbacks:D});O.getAdmanWrapper().init({switchFromAdsToVideo:O.actions.internal.switchFromAdsToVideo,switchFromVideoToAds:O.actions.internal.switchFromVideoToAds,setMuted:O.actions.external.setMuted},O.ads);const U=O.state.playbackState$;h(t,U,(e=>s(76,r=e)));const W=O.ads.playbackState;h(t,W,(e=>s(67,p=e)));const q=O.playerPhase;h(t,q,(e=>s(16,v=e)));const K=O.ui.isFullscreen;h(t,K,(e=>s(75,a=e)));const X=O.ui.controlsVisible;h(t,X,(e=>s(66,u=e)));const Y=O.ui.playerSize,G=O.ui.contextMenuVisible;h(t,G,(e=>s(27,o=e)));const J=O.state.isLoaderVisible;h(t,J,(e=>s(68,m=e)));const Z=O.state.isEnded$;h(t,Z,(e=>s(64,l=e)));const ee=O.state.chromecastConnected$;h(t,ee,(e=>s(15,d=e)));const te=O.state.chromecastDeviceName$;h(t,te,(e=>s(28,g=e)));const ie=O.ads.postrollPassed;let ne,se,le,oe;h(t,ie,(e=>s(65,c=e))),qe(O);let ae,re,ce,de,ue=null,pe=!1,ve=0,he=0;const me=(e=!1)=>{s(20,pe=!0),e?O.actions.external.firstStart(M):O.actions.internal.firstStart(M)};z((()=>{var e;e=fe,document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),(e=>{if(ResizeObserver){let t,i;ue=new ResizeObserver(Qe((e=>{const n=e[0];if(n){if(n.contentBoxSize){const e=Array.isArray(n.contentBoxSize)?n.contentBoxSize[0]:n.contentBoxSize;t=e.inlineSize,i=e.blockSize}else n.contentRect&&(t=n.contentRect.width,i=n.contentRect.height);Y.set({width:t,height:i})}}),300)),ue.observe(e)}Y.set({width:e.clientWidth,height:e.clientHeight})})(ne),O.initVideo({container:se,sources:f}),C>0&&O.actions.external.seekTime(C);const t=null!=V?V:jn(),i=null!=P?P:(()=>{const e=zn.get("vk_player_prefer_volume_mute");return"boolean"==typeof e&&e})();return O.actions.external.setVolume(t),O.actions.external.setMuted(i),O.getAdmanWrapper().setInitialVolume(i?0:t),O.ui.isAutoplay.set(k),k&&me(),()=>{(e=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)})(fe),null==ue||ue.disconnect(),O.destroy()}}));const ge=()=>{var e;On()?(e=document).exitFullscreen?e.exitFullscreen():e.msExitFullscreen?e.msExitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():Promise.reject():H?Dn(H):ne&&Dn(ne)},fe=()=>{var e,t,i,n;const s=On();K.set(s),O.getAdmanWrapper().setFullscreen(s),a?null===(t=(e=O.callbacks).onFullscreenEnter)||void 0===t||t.call(e):null===(n=(i=O.callbacks).onFullscreenExit)||void 0===n||n.call(i)},we=()=>G.set(!1);return t.$$set=e=>{"sources"in e&&s(49,f=e.sources),"title"in e&&s(0,w=e.title),"thumbUrl"in e&&s(1,y=e.thumbUrl),"unitedVideoId"in e&&s(50,b=e.unitedVideoId),"albumId"in e&&s(51,x=e.albumId),"statPlace"in e&&s(52,$=e.statPlace),"autoplay"in e&&s(53,k=e.autoplay),"volume"in e&&s(54,V=e.volume),"muted"in e&&s(55,P=e.muted),"fromTime"in e&&s(56,C=e.fromTime),"canRewindLive"in e&&s(2,S=e.canRewindLive),"supportLink"in e&&s(3,A=e.supportLink),"showAds"in e&&s(4,M=e.showAds),"adsSlotId"in e&&s(5,N=e.adsSlotId),"adsPreviewParam"in e&&s(6,T=e.adsPreviewParam),"duration"in e&&s(7,L=e.duration),"logoClickable"in e&&s(8,E=e.logoClickable),"showNextVideoButton"in e&&s(9,F=e.showNextVideoButton),"endScreenVideoTitle"in e&&s(10,I=e.endScreenVideoTitle),"endScreenVideoThumb"in e&&s(11,R=e.endScreenVideoThumb),"isOneVideoPlaylist"in e&&s(12,B=e.isOneVideoPlaylist),"outerContainerRef"in e&&s(57,H=e.outerContainerRef),"playNextVideo"in e&&s(13,Q=e.playNextVideo),"repeatPlaylist"in e&&s(14,_=e.repeatPlaylist),"callbacks"in e&&s(58,D=e.callbacks)},t.$$.update=()=>{65536&t.$$.dirty[0]|96&t.$$.dirty[2]&&s(24,re=v===Nt.Video&&m||v===Nt.Ads&&p===Tt.INACTIVE),32768&t.$$.dirty[0]|16&t.$$.dirty[2]&&s(25,ce=u||d),16&t.$$.dirty[0]|12&t.$$.dirty[2]&&s(26,de=(M&&c||!M)&&l)},[w,y,S,A,M,N,T,L,E,F,I,R,B,Q,_,d,v,ne,se,le,pe,ve,he,ae,re,ce,de,o,g,U,W,q,K,X,G,J,Z,ee,te,ie,function(){clearTimeout(oe),X.set(!0)},function(){oe=window.setTimeout((()=>{r===e.PlaybackState.PLAYING&&X.set(!1)}),500)},function(){clearTimeout(oe),X.set(!0),a&&le&&!function(e,t){var i,n,s,l,o;return!!e&&(null!==(o=null!==(l=null!==(s=null!==(n=null!==(i=e.matches)&&void 0!==i?i:e.matchesSelector)&&void 0!==n?n:e.mozMatchesSelector)&&void 0!==s?s:e.msMatchesSelector)&&void 0!==l?l:e.oMatchesSelector)&&void 0!==o?o:e.webkitMatchesSelector).call(e,t)}(le,":hover")&&(oe=window.setTimeout((()=>{r===e.PlaybackState.PLAYING&&X.set(!1)}),3e3))},me,ge,we,e=>{G.set(!0),s(21,ve=e.clientX),s(22,he=e.clientY)},e=>{o?we():(we(),l||(O.actions.internal.togglePlay(),2===e.detail&&ge()))},e=>{ae.keyDownHandler(e)},f,b,x,$,k,V,P,C,H,D,function(){pe?O.actions.external.play():me(!0)},function(){O.actions.external.pause()},function(e){O.actions.external.setMuted(e)},function(e){e>=0&&e<=1&&O.actions.external.setVolume(e)},function(e){O.actions.external.seekTime(e)},l,c,u,p,m,function(e){j[e?"unshift":"push"]((()=>{se=e,s(18,se)}))},function(e){j[e?"unshift":"push"]((()=>{ae=e,s(23,ae)}))},function(e){le=e,s(19,le)},function(e){j[e?"unshift":"push"]((()=>{ne=e,s(17,ne)}))}]}class es extends se{constructor(e){super(),ne(this,e,Zn,Jn,r,{sources:49,title:0,thumbUrl:1,unitedVideoId:50,albumId:51,statPlace:52,autoplay:53,volume:54,muted:55,fromTime:56,canRewindLive:2,supportLink:3,showAds:4,adsSlotId:5,adsPreviewParam:6,duration:7,logoClickable:8,showNextVideoButton:9,endScreenVideoTitle:10,endScreenVideoThumb:11,isOneVideoPlaylist:12,outerContainerRef:57,playNextVideo:13,repeatPlaylist:14,callbacks:58,play:59,pause:60,setMuted:61,setVolume:62,seekTime:63},Wn,[-1,-1,-1])}get play(){return this.$$.ctx[59]}get pause(){return this.$$.ctx[60]}get setMuted(){return this.$$.ctx[61]}get setVolume(){return this.$$.ctx[62]}get seekTime(){return this.$$.ctx[63]}}function ts(e){g(e,"svelte-1oqts7t",".playerStub.svelte-1oqts7t{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}.stubImage.svelte-1oqts7t{height:60px}.stubImage-white.svelte-1oqts7t{filter:brightness(0) invert(1)}.title.svelte-1oqts7t{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 is(e){let t,i;return{c(){t=y("div"),i=x(e[0]),P(t,"class","title svelte-1oqts7t")},m(e,n){f(e,t,n),m(t,i)},p(e,t){1&t&&C(i,e[0])},d(e){e&&w(t)}}}function ns(e){let t,i;return{c(){t=y("img"),u(t.src,i="data:image/svg+xml,%3csvg width='57' height='60' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath 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 6h19.489zm.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.91.91 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436z' fill='%23909499'/%3e%3c/svg%3e")||P(t,"src","data:image/svg+xml,%3csvg width='57' height='60' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath 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 6h19.489zm.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.91.91 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436z' fill='%23909499'/%3e%3c/svg%3e"),P(t,"class","stubImage svelte-1oqts7t"),P(t,"alt",""),A(t,"stubImage-white",e[1])},m(e,i){f(e,t,i)},p(e,i){2&i&&A(t,"stubImage-white",e[1])},d(e){e&&w(t)}}}function ss(e){let t,i,s,l=e[0]&&is(e),o=(!e[0]||!e[1])&&ns(e);return{c(){t=y("div"),l&&l.c(),i=$(),o&&o.c(),P(t,"class","playerStub svelte-1oqts7t"),P(t,"style",s=e[1]?`background-image: url('${e[1]}')`:"")},m(e,n){f(e,t,n),l&&l.m(t,null),m(t,i),o&&o.m(t,null)},p(e,[n]){e[0]?l?l.p(e,n):(l=is(e),l.c(),l.m(t,i)):l&&(l.d(1),l=null),e[0]&&e[1]?o&&(o.d(1),o=null):o?o.p(e,n):(o=ns(e),o.c(),o.m(t,null)),2&n&&s!==(s=e[1]?`background-image: url('${e[1]}')`:"")&&P(t,"style",s)},i:n,o:n,d(e){e&&w(t),l&&l.d(),o&&o.d()}}}function ls(e,t,i){let{title:n}=t,{thumbUrl:s}=t;return e.$$set=e=>{"title"in e&&i(0,n=e.title),"thumbUrl"in e&&i(1,s=e.thumbUrl)},[n,s]}class os extends se{constructor(e){super(),ne(this,e,ls,ss,r,{title:0,thumbUrl:1},ts)}}class as extends HTMLElement{constructor(){super(),this.currentPlayingVideoIndex=0,this.repeatPlaylist=!1,this.config=void 0,this._shadowRoot=this.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer)}connectedCallback(){const e=this.getAttribute("stub-title"),t=this.getAttribute("stub-thumb-url");this.svelteStubComponent=new os({target:this.playerContainer,props:{title:e,thumbUrl:t}})}disconnectedCallback(){var e,t;null===(e=this.svelteRootComponent)||void 0===e||e.$destroy(),null===(t=this.svelteStubComponent)||void 0===t||t.$destroy()}needToShowNextButton(){return!(!this.config||this.currentPlayingVideoIndex<0||1===this.config.videos.length)&&(this.repeatPlaylist||this.currentPlayingVideoIndex<this.config.videos.length-1)}getNextVideoInfo(){if(!this.config)return{needToShowNextButton:!1,nextVideoTitle:void 0,nextVideoThumb:void 0};const e=this.config.videos[this.currentPlayingVideoIndex+1]||{};return{needToShowNextButton:this.needToShowNextButton(),nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createPlayer(e,t={}){if(!this.config)return;const{albumId:i,statPlace:n,autoplay:s,volume:l,muted:o,fromTime:a,canRewindLive:r,supportLink:c,showAds:d,adsSlotId:u,adsPreviewParam:p,logoClickable:v,callbacks:h}=Object.assign(Object.assign({},this.config),t),{sources:m,title:g,thumbUrl:f,unitedVideoId:w,duration:y}=e,b=this.getNextVideoInfo();this.svelteRootComponent=new es({target:this.playerContainer,props:{sources:m,title:g,thumbUrl:f,unitedVideoId:w,albumId:i,statPlace:n,autoplay:s,muted:o,volume:l,fromTime:a,canRewindLive:r,supportLink:c,showAds:d,adsSlotId:u,adsPreviewParam:p,duration:y,logoClickable:v,callbacks:h,outerContainerRef:this.playerContainer,showNextVideoButton:b.needToShowNextButton,endScreenVideoTitle:b.nextVideoTitle,endScreenVideoThumb:b.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playNextVideo:()=>this.playNextVideo(),repeatPlaylist:()=>this.playNextVideo(!0)}})}playNextVideo(e=!1){var t;if(!this.config)return;e||this.currentPlayingVideoIndex===this.config.videos.length-1&&this.repeatPlaylist?this.currentPlayingVideoIndex=0:this.currentPlayingVideoIndex++;const i=this.config.videos[this.currentPlayingVideoIndex];i&&(null===(t=this.svelteRootComponent)||void 0===t||t.$destroy(),this.createPlayer(i,{autoplay:!0,fromTime:0}))}initPlayer(e){var t,i;if(!Array.isArray(e.videos)||0===e.videos.length)throw new Error("empty videos");this.config=JSON.parse(JSON.stringify(e)),this.currentPlayingVideoIndex=0,null===(t=this.svelteStubComponent)||void 0===t||t.$destroy(),null===(i=this.svelteRootComponent)||void 0===i||i.$destroy(),this.createPlayer(e.videos[0])}isOneVideoPlaylist(){return!!this.config&&1===this.config.videos.length}updateNextVideos(e){var t;if(!this.config)return;this.config.videos.splice(this.currentPlayingVideoIndex+1),this.config.videos.push(...e);const i=this.getNextVideoInfo();null===(t=this.svelteRootComponent)||void 0===t||t.$set({showNextVideoButton:i.needToShowNextButton,endScreenVideoTitle:i.nextVideoTitle,endScreenVideoThumb:i.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()})}play(){var e;null===(e=this.svelteRootComponent)||void 0===e||e.play()}pause(){var e;null===(e=this.svelteRootComponent)||void 0===e||e.pause()}stop(){var e,t;if(!this.config)return;null===(e=this.svelteStubComponent)||void 0===e||e.$destroy();const i=this.config.videos[0];i&&(null===(t=this.svelteRootComponent)||void 0===t||t.$destroy(),this.createPlayer(i))}setMuted(e){var t;null===(t=this.svelteRootComponent)||void 0===t||t.setMuted(e)}setVolume(e){var t;null===(t=this.svelteRootComponent)||void 0===t||t.setVolume(e)}setRepeat(e){var t;this.repeatPlaylist=e,null===(t=this.svelteRootComponent)||void 0===t||t.$set({showNextVideoButton:this.needToShowNextButton()})}seekTime(e){var t;null===(t=this.svelteRootComponent)||void 0===t||t.seekTime(e)}}exports.registerPlayerWebComponent=()=>{window.customElements.define("vk-video-player",as)};
|
|
5
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@vkontakte/videoplayer-core"),t=require("@vkontakte/videoplayer-shared"),i=require("@vkontakte/videoplayer-statistics");function n(){}function s(e){return e()}function l(){return Object.create(null)}function o(e){e.forEach(s)}function a(e){return"function"==typeof e}function r(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let c,d;function u(e,t){return c||(c=document.createElement("a")),c.href=t,e===c.href}function p(e,...t){if(null==e)return n;const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function v(e){let t;return p(e,(e=>t=e))(),t}function h(e,t,i){e.$$.on_destroy.push(p(t,i))}function g(e,t){e.appendChild(t)}function m(e,t,i){const n=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;if(t&&t.host)return t;return e.ownerDocument}(e);if(!n.getElementById(t)){const e=b("style");e.id=t,e.textContent=i,function(e,t){g(e.head||e,t)}(n,e)}}function f(e,t,i){e.insertBefore(t,i||null)}function w(e){e.parentNode.removeChild(e)}function b(e){return document.createElement(e)}function y(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function x(e){return document.createTextNode(e)}function $(){return x(" ")}function k(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function V(e){return function(t){return t.preventDefault(),e.call(this,t)}}function C(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function P(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function S(e,t,i,n){e.style.setProperty(t,i,n?"important":"")}function A(e,t,i){e.classList[i?"add":"remove"](t)}function M(e){d=e}function N(){if(!d)throw new Error("Function called outside component initialization");return d}function z(e){N().$$.on_mount.push(e)}function T(e,t){const i=e.$$.callbacks[t.type];i&&i.slice().forEach((e=>e.call(this,t)))}const L=[],j=[],E=[],I=[],F=Promise.resolve();let R=!1;function B(e){E.push(e)}function H(e){I.push(e)}let Q=!1;const _=new Set;function O(){if(!Q){Q=!0;do{for(let e=0;e<L.length;e+=1){const t=L[e];M(t),D(t.$$)}for(M(null),L.length=0;j.length;)j.pop()();for(let e=0;e<E.length;e+=1){const t=E[e];_.has(t)||(_.add(t),t())}E.length=0}while(L.length);for(;I.length;)I.pop()();R=!1,Q=!1,_.clear()}}function D(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(B)}}const U=new Set;let q;function W(){q={r:0,c:[],p:q}}function K(){q.r||o(q.c),q=q.p}function X(e,t){e&&e.i&&(U.delete(e),e.i(t))}function Y(e,t,i,n){if(e&&e.o){if(U.has(e))return;U.add(e),q.c.push((()=>{U.delete(e),n&&(i&&e.d(1),n())})),e.o(t)}}const G="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function J(e,t,i){const n=e.$$.props[t];void 0!==n&&(e.$$.bound[n]=i,i(e.$$.ctx[n]))}function Z(e){e&&e.c()}function ee(e,t,i,n){const{fragment:l,on_mount:r,on_destroy:c,after_update:d}=e.$$;l&&l.m(t,i),n||B((()=>{const t=r.map(s).filter(a);c?c.push(...t):o(t),e.$$.on_mount=[]})),d.forEach(B)}function te(e,t){const i=e.$$;null!==i.fragment&&(o(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function ie(e,t){-1===e.$$.dirty[0]&&(L.push(e),R||(R=!0,F.then(O)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ne(e,t,i,s,a,r,c,u=[-1]){const p=d;M(e);const v=e.$$={fragment:null,ctx:null,props:r,update:n,not_equal:a,bound:l(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(p?p.$$.context:[])),callbacks:l(),dirty:u,skip_bound:!1,root:t.target||p.$$.root};c&&c(v.root);let h=!1;if(v.ctx=i?i(e,t.props||{},((t,i,...n)=>{const s=n.length?n[0]:i;return v.ctx&&a(v.ctx[t],v.ctx[t]=s)&&(!v.skip_bound&&v.bound[t]&&v.bound[t](s),h&&ie(e,t)),i})):[],v.update(),h=!0,o(v.before_update),v.fragment=!!s&&s(v.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);v.fragment&&v.fragment.l(e),e.forEach(w)}else v.fragment&&v.fragment.c();t.intro&&X(e.$$.fragment),ee(e,t.target,t.anchor,t.customElement),O()}M(p)}class se{$destroy(){te(this,1),this.$destroy=n}$on(e,t){const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var oe=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ae="object"==typeof le&&le&&le.Object===Object&&le,re="object"==typeof self&&self&&self.Object===Object&&self,ce=ae||re||Function("return this")(),de=ce,ue=function(){return de.Date.now()},pe=/\s/;var ve=function(e){for(var t=e.length;t--&&pe.test(e.charAt(t)););return t},he=/^\s+/;var ge=function(e){return e?e.slice(0,ve(e)+1).replace(he,""):e},me=ce.Symbol,fe=me,we=Object.prototype,be=we.hasOwnProperty,ye=we.toString,xe=fe?fe.toStringTag:void 0;var $e=function(e){var t=be.call(e,xe),i=e[xe];try{e[xe]=void 0;var n=!0}catch(e){}var s=ye.call(e);return n&&(t?e[xe]=i:delete e[xe]),s},ke=Object.prototype.toString;var Ve=$e,Ce=function(e){return ke.call(e)},Pe=me?me.toStringTag:void 0;var Se=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Pe&&Pe in Object(e)?Ve(e):Ce(e)},Ae=function(e){return null!=e&&"object"==typeof e};var Me=ge,Ne=oe,ze=function(e){return"symbol"==typeof e||Ae(e)&&"[object Symbol]"==Se(e)},Te=/^[-+]0x[0-9a-f]+$/i,Le=/^0b[01]+$/i,je=/^0o[0-7]+$/i,Ee=parseInt;var Ie=oe,Fe=ue,Re=function(e){if("number"==typeof e)return e;if(ze(e))return NaN;if(Ne(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ne(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Me(e);var i=Le.test(e);return i||je.test(e)?Ee(e.slice(2),i?2:8):Te.test(e)?NaN:+e},Be=Math.max,He=Math.min;var Qe=function(e,t,i){var n,s,l,o,a,r,c=0,d=!1,u=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var i=n,l=s;return n=s=void 0,c=t,o=e.apply(l,i)}function h(e){return c=e,a=setTimeout(m,t),d?v(e):o}function g(e){var i=e-r;return void 0===r||i>=t||i<0||u&&e-c>=l}function m(){var e=Fe();if(g(e))return f(e);a=setTimeout(m,function(e){var i=t-(e-r);return u?He(i,l-(e-c)):i}(e))}function f(e){return a=void 0,p&&n?v(e):(n=s=void 0,o)}function w(){var e=Fe(),i=g(e);if(n=arguments,s=this,r=e,i){if(void 0===a)return h(r);if(u)return clearTimeout(a),a=setTimeout(m,t),v(r)}return void 0===a&&(a=setTimeout(m,t)),o}return t=Re(t)||0,Ie(i)&&(d=!!i.leading,l=(u="maxWait"in i)?Be(Re(i.maxWait)||0,t):l,p="trailing"in i?!!i.trailing:p),w.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=r=s=a=void 0},w.flush=function(){return void 0===a?o:f(Fe())},w};const _e=[];function Oe(e,t){return{subscribe:De(e,t).subscribe}}function De(e,t=n){let i;const s=new Set;function l(t){if(r(e,t)&&(e=t,i)){const t=!_e.length;for(const t of s)t[1](),_e.push(t,e);if(t){for(let e=0;e<_e.length;e+=2)_e[e][0](_e[e+1]);_e.length=0}}}return{set:l,update:function(t){l(t(e))},subscribe:function(o,a=n){const r=[o,a];return s.add(r),1===s.size&&(i=t(l)||n),o(e),()=>{s.delete(r),0===s.size&&(i(),i=null)}}}}function Ue(e,t,i){const s=!Array.isArray(e),l=s?[e]:e,r=t.length<2;return Oe(i,(e=>{let i=!1;const c=[];let d=0,u=n;const v=()=>{if(d)return;u();const i=t(s?c[0]:c,e);r?e(i):u=a(i)?i:n},h=l.map(((e,t)=>p(e,(e=>{c[t]=e,d&=~(1<<t),i&&v()}),(()=>{d|=1<<t}))));return i=!0,v(),function(){o(h),u()}}))}const qe=Symbol("storeContext"),We=e=>{var t,i;t=qe,i=e,N().$$.context.set(t,i)},Ke=()=>{const e=(i=qe,N().$$.context.get(i));var i;return t.assertNonNullable(e,"Store context is empty!"),e},Xe=t=>t&&{[e.VideoQuality.INVARIANT]:i.Quality.UNKNOWN,[e.VideoQuality.Q_144P]:i.Quality.Q144P,[e.VideoQuality.Q_240P]:i.Quality.Q240P,[e.VideoQuality.Q_360P]:i.Quality.Q360P,[e.VideoQuality.Q_480P]:i.Quality.Q480P,[e.VideoQuality.Q_720P]:i.Quality.Q720P,[e.VideoQuality.Q_1080P]:i.Quality.Q1080P,[e.VideoQuality.Q_1440P]:i.Quality.Q1440P,[e.VideoQuality.Q_2160P]:i.Quality.Q2160P,[e.VideoQuality.Q_4320P]:i.Quality.Q4320P}[t],Ye=n=>{if(void 0!==n)switch(n){case e.VideoFormat.MPEG:return i.ContentType.MP4;case e.VideoFormat.DASH:case e.VideoFormat.DASH_SEP:case e.VideoFormat.DASH_ONDEMAND:case e.VideoFormat.DASH_LIVE:return i.ContentType.DASH;case e.VideoFormat.DASH_WEBM:case e.VideoFormat.DASH_LIVE_WEBM:return i.ContentType.WEBM;case e.VideoFormat.HLS:case e.VideoFormat.HLS_ONDEMAND:case e.VideoFormat.HLS_JS:case e.VideoFormat.HLS_LIVE:return i.ContentType.HLS;default:return t.assertNever(n)}},Ge=(e,t)=>Oe(e.getValue(),(i=>{const n=e.subscribe((e=>{i(e),null==t||t(e)}));return()=>n.unsubscribe()})),Je="https://vk.com/support?act=new&from=v";var Ze;!function(e){e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Space="Space",e.KeyM="KeyM",e.KeyF="KeyF",e.KeyK="KeyK",e.KeyL="KeyL",e.KeyJ="KeyJ"}(Ze||(Ze={}));var et="data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M13.25 2.833c.222.74.378 1.479 1.574 2.19a.574.574 0 0 0 .12.05c1.355.35 2.028-.021 2.654-.439.663-.442.86-.314 1.124-.053l.644.643c.294.294.412.412 0 1.178-.366.68-.779 1.313-.435 2.662a.469.469 0 0 0 .05.12c.71 1.206 1.448 1.418 2.186 1.566.78.156.83.386.833.757v.91c0 .416 0 .583-.833.833-.74.222-1.479.378-2.19 1.574a.469.469 0 0 0-.05.12c-.35 1.355.021 2.028.439 2.654.442.663.314.86.053 1.124l-.643.644c-.294.294-.412.412-1.178 0-.68-.366-1.313-.779-2.662-.435a.464.464 0 0 0-.12.05c-1.206.71-1.418 1.448-1.566 2.186-.156.78-.386.83-.757.833h-.91c-.416 0-.583 0-.833-.833-.222-.74-.378-1.479-1.574-2.19a.468.468 0 0 0-.12-.05c-1.355-.35-2.028.021-2.654.439-.663.442-.86.314-1.124.053l-.644-.643c-.294-.294-.412-.412 0-1.178.366-.68.779-1.313.435-2.662a.466.466 0 0 0-.05-.12c-.71-1.206-1.448-1.418-2.186-1.566-.78-.156-.83-.386-.833-.757v-.91c0-.416 0-.583.833-.833.74-.222 1.479-.378 2.19-1.574a.467.467 0 0 0 .05-.12c.35-1.355-.021-2.028-.439-2.654-.442-.663-.314-.86-.053-1.124l.643-.644c.294-.294.412-.412 1.178 0 .68.366 1.313.779 2.662.435a.467.467 0 0 0 .12-.05c1.206-.71 1.418-1.448 1.566-2.186.156-.78.386-.83.757-.833h.91c.416 0 .583 0 .833.833zM12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5z' fill='white'/%3e%3c/svg%3e";function tt(e){m(e,"svelte-wpcxjk",".settingsButton.svelte-wpcxjk.svelte-wpcxjk{display:flex;align-items:center;padding:0 0 0 8px;cursor:pointer;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity}.settingsButton.svelte-wpcxjk.svelte-wpcxjk:hover{opacity:0.8}.settingsButton-icon.svelte-wpcxjk.svelte-wpcxjk{display:block;width:40px;height:24px}.settingsMenu.svelte-wpcxjk.svelte-wpcxjk{background-color:rgba(17, 17, 17, 0.8);border-radius:8px;bottom:24px;font-size:13px;line-height:40px;overflow:hidden;padding:4px 0;right:17px;margin-bottom:18px;position:absolute;transition:opacity 0.2s, visibility 0.2s}.settingsMenu.hidden.svelte-wpcxjk.svelte-wpcxjk{visibility:hidden;opacity:0}.settingsMenu-subList.svelte-wpcxjk.svelte-wpcxjk{min-width:134px;padding-bottom:0}.settingsMenu-item.svelte-wpcxjk.svelte-wpcxjk{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;outline:none;padding:0 24px 0 18px;white-space:nowrap;position:relative}.settingsMenu-item.svelte-wpcxjk.svelte-wpcxjk:hover{background-color:rgba(255, 255, 255, 0.08)}.settingsMenu-subList.svelte-wpcxjk .settingsMenu-item.svelte-wpcxjk{color:rgba(255, 255, 255, 0.9)}.settingsMenu-subList.svelte-wpcxjk .settingsMenu-item.svelte-wpcxjk:last-child{margin-bottom:4px}.settingsMenu-icon.svelte-wpcxjk.svelte-wpcxjk{margin-right:16px}.settingsMenu-title.svelte-wpcxjk.svelte-wpcxjk{flex-grow:1;margin-right:24px}.settingsMenu-value.svelte-wpcxjk.svelte-wpcxjk{position:relative;opacity:0.7}.settingsMenu-valueIcon.svelte-wpcxjk.svelte-wpcxjk{position:absolute;top:10px;margin-left:4px;width:15px}.settingsMenu-valueIcon-list.svelte-wpcxjk.svelte-wpcxjk{position:absolute;top:12px;width:15px;right:6px}.settingsMenu-divider.svelte-wpcxjk.svelte-wpcxjk{background-color:rgba(255, 255, 255, 0.3);height:1px;margin:4px 9px 0 9px}.settingsMenu-header.svelte-wpcxjk.svelte-wpcxjk{display:flex;align-items:center;line-height:32px;padding:0 24px 0 18px;color:var(--white);cursor:pointer}.settingsMenu-headerText.svelte-wpcxjk.svelte-wpcxjk{margin-left:auto}.settingsMenu-headerIcon.svelte-wpcxjk.svelte-wpcxjk{width:16px;height:24px}.settingsMenu-header.svelte-wpcxjk:hover .settingsMenu-headerIcon.svelte-wpcxjk{opacity:0.8;transition:opacity 0.2s}.settingsMenu-itemIcon.svelte-wpcxjk.svelte-wpcxjk{margin-right:auto;opacity:0.9}.settingsMenu-items.svelte-wpcxjk.svelte-wpcxjk::-webkit-scrollbar{width:8px}.settingsMenu-items.svelte-wpcxjk.svelte-wpcxjk::-webkit-scrollbar-track{box-shadow:none;background-color:#3a3a3a;border-radius:4px}.settingsMenu-items.svelte-wpcxjk.svelte-wpcxjk::-webkit-scrollbar-thumb{min-height:40px;border-radius:5px;background-color:#666;border:1px solid transparent;background-clip:padding-box}.settingsMenu-items.svelte-wpcxjk.svelte-wpcxjk::-webkit-scrollbar-thumb:hover{background-color:#777}")}function it(e,t,i){const n=e.slice();return n[24]=t[i],n}function nt(e){let t,i;return{c(){t=b("img"),C(t,"class","settingsMenu-valueIcon svelte-wpcxjk"),u(t.src,i=e[5])||C(t,"src",i),C(t,"alt","")},m(e,i){f(e,t,i)},p(e,n){32&n&&!u(t.src,i=e[5])&&C(t,"src",i)},d(e){e&&w(t)}}}function st(e){let t,i;return{c(){t=b("img"),C(t,"class","settingsMenu-itemIcon svelte-wpcxjk"),u(t.src,i="data:image/svg+xml,%3csvg height='16' width='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z' fill='white'/%3e%3c/svg%3e")||C(t,"src","data:image/svg+xml,%3csvg height='16' width='16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z' fill='white'/%3e%3c/svg%3e"),C(t,"alt","")},m(e,i){f(e,t,i)},p:n,d(e){e&&w(t)}}}function lt(e){let t,i,n,s,l,o,a,r,c,d,p=e[24].displayValue+"",v=e[24].selected&&st();function h(){return e[19](e[24])}return{c(){t=b("div"),v&&v.c(),i=$(),n=x(p),s=$(),l=b("img"),a=$(),C(l,"class","settingsMenu-valueIcon-list svelte-wpcxjk"),u(l.src,o=e[16](e[24].value))||C(l,"src",o),C(l,"alt",""),C(t,"class","settingsMenu-item svelte-wpcxjk"),C(t,"data-value",r=e[24].value),C(t,"role","menuitemradio"),C(t,"tabindex","0")},m(e,o){f(e,t,o),v&&v.m(t,null),g(t,i),g(t,n),g(t,s),g(t,l),g(t,a),c||(d=k(t,"click",h),c=!0)},p(s,a){(e=s)[24].selected?v?v.p(e,a):(v=st(),v.c(),v.m(t,i)):v&&(v.d(1),v=null),64&a&&p!==(p=e[24].displayValue+"")&&P(n,p),64&a&&!u(l.src,o=e[16](e[24].value))&&C(l,"src",o),64&a&&r!==(r=e[24].value)&&C(t,"data-value",r)},d(e){e&&w(t),v&&v.d(),c=!1,d()}}}function ot(e){let t,i,s,l,a,r,c,d,p,v,h,m,y,V,S,M,N,z,T,L,j,E,I,F,R,B,H,Q,_,O,D=e[5]&&nt(e),U=e[6],q=[];for(let t=0;t<U.length;t+=1)q[t]=lt(it(e,U,t));return{c(){t=b("div"),i=b("div"),s=b("img"),r=$(),c=b("div"),d=b("div"),p=b("div"),v=b("img"),m=$(),y=b("div"),y.textContent="Качество",V=$(),S=b("div"),M=x(e[3]),N=$(),D&&D.c(),z=$(),T=b("div"),L=b("div"),j=b("img"),I=$(),F=b("div"),F.textContent="Качество",R=$(),B=b("div"),H=$(),Q=b("div");for(let e=0;e<q.length;e+=1)q[e].c();u(s.src,l=e[4])||C(s,"src",l),C(s,"alt",""),C(i,"class","settingsButton-icon svelte-wpcxjk"),C(t,"class",a="settingsButton "+e[0]+" svelte-wpcxjk"),C(t,"aria-label","Открыть настройки видеоплеера"),C(t,"tabindex","-1"),C(t,"role","button"),C(v,"class","settingsMenu-icon svelte-wpcxjk"),u(v.src,h=et)||C(v,"src","data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M13.25 2.833c.222.74.378 1.479 1.574 2.19a.574.574 0 0 0 .12.05c1.355.35 2.028-.021 2.654-.439.663-.442.86-.314 1.124-.053l.644.643c.294.294.412.412 0 1.178-.366.68-.779 1.313-.435 2.662a.469.469 0 0 0 .05.12c.71 1.206 1.448 1.418 2.186 1.566.78.156.83.386.833.757v.91c0 .416 0 .583-.833.833-.74.222-1.479.378-2.19 1.574a.469.469 0 0 0-.05.12c-.35 1.355.021 2.028.439 2.654.442.663.314.86.053 1.124l-.643.644c-.294.294-.412.412-1.178 0-.68-.366-1.313-.779-2.662-.435a.464.464 0 0 0-.12.05c-1.206.71-1.418 1.448-1.566 2.186-.156.78-.386.83-.757.833h-.91c-.416 0-.583 0-.833-.833-.222-.74-.378-1.479-1.574-2.19a.468.468 0 0 0-.12-.05c-1.355-.35-2.028.021-2.654.439-.663.442-.86.314-1.124.053l-.644-.643c-.294-.294-.412-.412 0-1.178.366-.68.779-1.313.435-2.662a.466.466 0 0 0-.05-.12c-.71-1.206-1.448-1.418-2.186-1.566-.78-.156-.83-.386-.833-.757v-.91c0-.416 0-.583.833-.833.74-.222 1.479-.378 2.19-1.574a.467.467 0 0 0 .05-.12c.35-1.355-.021-2.028-.439-2.654-.442-.663-.314-.86-.053-1.124l.643-.644c.294-.294.412-.412 1.178 0 .68.366 1.313.779 2.662.435a.467.467 0 0 0 .12-.05c1.206-.71 1.418-1.448 1.566-2.186.156-.78.386-.83.757-.833h.91c.416 0 .583 0 .833.833zM12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5z' fill='white'/%3e%3c/svg%3e"),C(v,"alt",""),C(y,"class","settingsMenu-title svelte-wpcxjk"),C(S,"class","settingsMenu-value svelte-wpcxjk"),C(p,"class","settingsMenu-item svelte-wpcxjk"),C(p,"role","menuitemradio"),C(p,"tabindex","0"),C(d,"class","settingsMenu svelte-wpcxjk"),C(d,"role","menu"),A(d,"hidden",!e[1]),u(j.src,E="data:image/svg+xml,%3csvg width='12' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z' fill='white'/%3e%3c/svg%3e")||C(j,"src","data:image/svg+xml,%3csvg width='12' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z' fill='white'/%3e%3c/svg%3e"),C(j,"class","settingsMenu-headerIcon svelte-wpcxjk"),C(j,"alt",""),C(F,"class","settingsMenu-headerText svelte-wpcxjk"),C(L,"class","settingsMenu-header svelte-wpcxjk"),C(B,"class","settingsMenu-divider svelte-wpcxjk"),C(Q,"class","settingsMenu-items svelte-wpcxjk"),C(T,"class","settingsMenu settingsMenu-subList svelte-wpcxjk"),A(T,"hidden",!e[2])},m(n,l){f(n,t,l),g(t,i),g(i,s),f(n,r,l),f(n,c,l),g(c,d),g(d,p),g(p,v),g(p,m),g(p,y),g(p,V),g(p,S),g(S,M),g(S,N),D&&D.m(S,null),g(c,z),g(c,T),g(T,L),g(L,j),g(L,I),g(L,F),g(T,R),g(T,B),g(T,H),g(T,Q);for(let e=0;e<q.length;e+=1)q[e].m(Q,null);_||(O=[k(i,"mouseenter",e[11]),k(i,"mouseleave",e[12]),k(t,"click",e[10]),k(p,"click",e[13]),k(d,"mouseenter",e[11]),k(d,"mouseleave",e[12]),k(L,"click",e[15]),k(T,"mouseenter",e[11]),k(T,"mouseleave",e[12])],_=!0)},p(e,[i]){if(16&i&&!u(s.src,l=e[4])&&C(s,"src",l),1&i&&a!==(a="settingsButton "+e[0]+" svelte-wpcxjk")&&C(t,"class",a),8&i&&P(M,e[3]),e[5]?D?D.p(e,i):(D=nt(e),D.c(),D.m(S,null)):D&&(D.d(1),D=null),2&i&&A(d,"hidden",!e[1]),81984&i){let t;for(U=e[6],t=0;t<U.length;t+=1){const n=it(e,U,t);q[t]?q[t].p(n,i):(q[t]=lt(n),q[t].c(),q[t].m(Q,null))}for(;t<q.length;t+=1)q[t].d(1);q.length=U.length}4&i&&A(T,"hidden",!e[2])},i:n,o:n,d(e){e&&w(t),e&&w(r),e&&w(c),D&&D.d(),function(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}(q,e),_=!1,o(O)}}}function at(t,i,n){let s,l,o,a,r,c,{className:d=""}=i;const u=Ke(),p=u.state.currentQuality$;h(t,p,(e=>n(18,r=e)));const v=u.state.availableQualities$;h(t,v,(e=>n(6,c=e)));const g=u.state.isAutoQualityEnabled$;h(t,g,(e=>n(17,a=e)));let m,f=!1,w=!1;function b(e){u.actions.internal.setQuality(e),n(1,f=!1),n(2,w=!1)}function y(t){switch(t){case e.VideoQuality.Q_720P:return"data:image/svg+xml,%3csvg width='15' height='5' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.516 5h1.107C8.103 5 9 4.065 9 2.5S8.103 0 6.623 0H5.516C5.191 0 5 .2 5 .537V4.46c0 .342.191.54.516.54zm.516-.854V.852H6.5C7.41.852 8 1.468 8 2.5c0 1.066-.577 1.646-1.5 1.646h-.468zM.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S4 4.802 4 4.464V.54C4 .198 3.809 0 3.484 0s-.516.198-.516.54v1.531H1.032V.54C1.032.198.841 0 .516 0S0 .198 0 .54v3.989C0 4.867.191 5 .516 5z' fill='%2370C1FF'/%3e%3c/svg%3e";case e.VideoQuality.Q_1080P:return"data:image/svg+xml,%3csvg width='15' height='5' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.516 5h1.107C12.103 5 13 4.065 13 2.5S12.103 0 10.623 0H9.516C9.191 0 9 .2 9 .537V4.46c0 .342.191.54.516.54zm.516-.854V.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646h-.468zM4.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S8 4.802 8 4.464V.54C8 .198 7.809 0 7.484 0s-.516.198-.516.54v1.531H5.032V.54c0-.342-.191-.54-.516-.54S4 .198 4 .54v3.989c0 .338.191.471.516.471zm-4 0c.325 0 .516-.198.516-.537V3h1.332c.27 0 .441-.154.441-.41 0-.253-.174-.407-.44-.407H1.031V.854h1.5c.28 0 .468-.16.468-.427C3 .161 2.815 0 2.532 0H.516C.191 0 0 .198 0 .537v3.926C0 4.802.191 5 .516 5z' fill='%2370C1FF'/%3e%3c/svg%3e";case e.VideoQuality.Q_1440P:return"data:image/svg+xml,%3csvg width='15' height='6' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11.516 5h1.107C14.103 5 15 4.065 15 2.5S14.103 0 12.623 0h-1.107C11.191 0 11 .2 11 .537V4.46c0 .342.191.54.516.54zm.516-.854V.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646h-.468zM6.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S10 4.802 10 4.464V.54C10 .198 9.809 0 9.484 0s-.516.198-.516.54v1.531H7.032V.54c0-.342-.191-.54-.516-.54S6 .198 6 .54v3.989c0 .338.191.471.516.471z' fill='%2370C1FF'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.338 4.909A3.9 3.9 0 0 1 2.5 5C1.037 5 0 4.135 0 2.553 0 .983 1.037 0 2.5 0 3.96 0 5 .984 5 2.553c0 .863-.274 1.46-.778 1.88l.194.29a.5.5 0 0 1-.832.554l-.246-.368zm-.52-.78-.234-.352a.5.5 0 1 1 .832-.554l.245.367c.184-.26.286-.615.286-1.037C3.947 1.517 3.307.9 2.5.9c-.81 0-1.447.617-1.447 1.653 0 1.032.637 1.596 1.447 1.596.08 0 .208-.007.318-.02z' fill='%2370C1FF'/%3e%3c/svg%3e";case e.VideoQuality.Q_2160P:return"data:image/svg+xml,%3csvg width='15' height='6' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.517 5c.325 0 .516-.198.516-.536v-.97l.492-.517 1.46 1.74c.16.205.304.283.516.283A.491.491 0 0 0 9 4.501c0-.14-.068-.287-.222-.478l-1.47-1.73L8.818.868C8.949.731 9 .618 9 .475A.474.474 0 0 0 8.515 0c-.171 0-.301.065-.445.222L6.064 2.25h-.03V.54c0-.342-.192-.54-.517-.54s-.516.198-.516.54v3.924c0 .338.191.536.516.536z' fill='%2370C1FF'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='m2.551 1.052-1.51 2.052h1.51V1.052zM3.5 3.104V.832c0-.81-1.089-1.14-1.556-.48L.139 2.821a.75.75 0 0 0 .612 1.183h1.8v.55c0 .248.25.45.499.45a.45.45 0 0 0 .45-.45v-.55h.052a.45.45 0 0 0 0-.9H3.5z' fill='%2370C1FF'/%3e%3c/svg%3e";case e.VideoQuality.Q_4320P:return"data:image/svg+xml,%3csvg width='15' height='5' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.513 5c.323 0 .513-.198.513-.537v-.97l.49-.516L7.99 4.715c.16.205.302.284.513.284A.49.49 0 0 0 9 4.5c0-.14-.068-.287-.22-.478L7.293 2.293 8.82.868C8.949.731 9 .618 9 .475A.473.473 0 0 0 8.517 0c-.17 0-.299.065-.441.222L6.056 2.25h-.03V.54c0-.342-.19-.54-.513-.54S5 .198 5 .54v3.923c0 .339.19.537.513.537z' fill='%2370C1FF'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 0c-.353 0-.671.057-.952.173a1.492 1.492 0 0 0-.654.484c-.154.208-.23.445-.23.71 0 .423.208.756.613.995a1.46 1.46 0 0 0-.547.44c-.154.203-.23.441-.23.71 0 .288.084.548.252.778l.001.001c.173.224.412.398.712.523C1.267 4.939 1.612 5 2 5c.388 0 .733-.061 1.035-.186.3-.125.537-.299.705-.524.174-.23.26-.49.26-.777 0-.27-.076-.508-.23-.711a1.448 1.448 0 0 0-.552-.44c.409-.235.618-.569.618-.994a1.14 1.14 0 0 0-.238-.711 1.436 1.436 0 0 0-.653-.484A2.427 2.427 0 0 0 2 0zm-.573.964C1.563.86 1.75.804 2 .804c.25 0 .434.055.564.16h.001a.512.512 0 0 1 .204.43.52.52 0 0 1-.204.437c-.13.105-.315.161-.565.161-.25 0-.437-.056-.573-.161a.519.519 0 0 1-.203-.437c0-.185.07-.326.203-.43zm-.345 2.522c0-.217.08-.381.233-.503.16-.122.385-.188.685-.188.3 0 .522.066.677.188.16.122.24.287.24.503a.628.628 0 0 1-.24.523c-.155.122-.377.188-.677.188-.3 0-.524-.065-.684-.187a.637.637 0 0 1-.234-.524z' fill='%2370C1FF'/%3e%3c/svg%3e"}}return t.$$set=e=>{"className"in e&&n(0,d=e.className)},t.$$.update=()=>{262144&t.$$.dirty&&n(5,s=y(r)),262144&t.$$.dirty&&n(4,l=function(t){switch(t){case e.VideoQuality.Q_720P:return"data:image/svg+xml,%3csvg width='34' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.466.466 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.466.466 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.465.465 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438.041.01.083.028.12.05 1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.467.467 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.598.598 0 0 0-.413-.519 7.464 7.464 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.581.581 0 0 0 .633-.44 7.448 7.448 0 0 1 .749-1.967z' fill='white'/%3e%3crect x='15' y='3' width='17' height='11' rx='5.5' fill='%23689FF8'/%3e%3cpath d='M24.516 11h1.107C27.103 11 28 10.066 28 8.5S27.103 6 25.623 6h-1.107c-.325 0-.516.2-.516.537v3.923c0 .342.191.54.516.54zm.516-.854V6.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646h-.468zM19.516 11c.325 0 .516-.198.516-.536V8.922h1.936v1.542c0 .338.191.537.516.537s.516-.199.516-.537V6.54c0-.342-.191-.54-.516-.54s-.516.198-.516.54v1.531h-1.936V6.54c0-.342-.191-.54-.516-.54S19 6.198 19 6.54v3.989c0 .338.191.472.516.472z' fill='white'/%3e%3c/svg%3e";case e.VideoQuality.Q_1080P:return"data:image/svg+xml,%3csvg width='38' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.466.466 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.466.466 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.465.465 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438.041.01.083.028.12.05 1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.467.467 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.598.598 0 0 0-.413-.519 7.464 7.464 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.581.581 0 0 0 .633-.44 7.448 7.448 0 0 1 .749-1.967z' fill='white'/%3e%3crect x='15' y='3' width='21' height='11' rx='5.5' fill='%23689FF8'/%3e%3cpath d='M28.516 11h1.107C31.103 11 32 10.066 32 8.5S31.103 6 29.623 6h-1.107c-.325 0-.516.2-.516.537v3.923c0 .342.191.54.516.54zm.516-.854V6.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646h-.468zM23.516 11c.325 0 .516-.198.516-.536V8.922h1.936v1.542c0 .338.191.537.516.537s.516-.199.516-.537V6.54c0-.342-.191-.54-.516-.54s-.516.198-.516.54v1.531h-1.936V6.54c0-.342-.191-.54-.516-.54S23 6.198 23 6.54v3.989c0 .338.191.472.516.472zm-4 0c.325 0 .516-.198.516-.537V9h1.332c.27 0 .441-.154.441-.41 0-.253-.174-.407-.44-.407h-1.333V6.854h1.5c.28 0 .468-.16.468-.427 0-.266-.185-.427-.468-.427h-2.016c-.325 0-.516.198-.516.537v3.926c0 .339.191.537.516.537z' fill='white'/%3e%3c/svg%3e";case e.VideoQuality.Q_1440P:return"data:image/svg+xml,%3csvg width='40' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.466.466 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.466.466 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.465.465 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438.041.01.083.028.12.05 1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.467.467 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.598.598 0 0 0-.413-.519 7.464 7.464 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.581.581 0 0 0 .633-.44 7.448 7.448 0 0 1 .749-1.967z' fill='white'/%3e%3cpath d='M15 8.5A5.5 5.5 0 0 1 20.5 3h12a5.5 5.5 0 1 1 0 11h-12A5.5 5.5 0 0 1 15 8.5z' fill='%23689FF8'/%3e%3cpath d='M30.516 11h1.107C33.103 11 34 10.066 34 8.5S33.103 6 31.623 6h-1.107c-.325 0-.516.2-.516.537v3.923c0 .342.191.54.516.54zm.516-.854V6.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646h-.468zM25.516 11c.325 0 .516-.198.516-.536V8.922h1.936v1.542c0 .338.191.537.516.537s.516-.199.516-.537V6.54c0-.342-.191-.54-.516-.54s-.516.198-.516.54v1.531h-1.936V6.54c0-.342-.191-.54-.516-.54S25 6.198 25 6.54v3.989c0 .338.191.472.516.472z' fill='white'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M22.338 10.909c-.254.06-.58.091-.838.091-1.463 0-2.5-.865-2.5-2.447C19 6.983 20.037 6 21.5 6c1.46 0 2.5.984 2.5 2.553 0 .863-.274 1.46-.777 1.88l.193.29a.5.5 0 1 1-.832.554l-.246-.368zm-.52-.78-.234-.352a.5.5 0 0 1 .832-.554l.245.367c.184-.26.286-.615.286-1.037 0-1.036-.64-1.653-1.447-1.653-.81 0-1.447.617-1.447 1.653 0 1.032.637 1.596 1.447 1.596.08 0 .208-.007.318-.02z' fill='white'/%3e%3c/svg%3e";case e.VideoQuality.Q_2160P:return"data:image/svg+xml,%3csvg width='34' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.466.466 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.466.466 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.465.465 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438.041.01.083.028.12.05 1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.467.467 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.598.598 0 0 0-.413-.519 7.464 7.464 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.581.581 0 0 0 .633-.44 7.448 7.448 0 0 1 .749-1.967z' fill='white'/%3e%3crect x='15' y='3' width='17' height='11' rx='5.5' fill='%23689FF8'/%3e%3cpath d='M24.517 11c.325 0 .516-.198.516-.536v-.97l.492-.517 1.46 1.74c.16.205.304.284.516.284a.491.491 0 0 0 .499-.5c0-.14-.068-.287-.222-.478l-1.47-1.73 1.51-1.425c.13-.137.182-.25.182-.393A.474.474 0 0 0 27.515 6c-.171 0-.301.065-.445.222L25.064 8.25h-.03V6.54c0-.342-.192-.54-.517-.54s-.516.198-.516.54v3.924c0 .338.191.537.516.537z' fill='white'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='m21.551 7.052-1.51 2.052h1.51V7.052zm.949 2.052V6.832c0-.81-1.089-1.14-1.556-.48l-1.805 2.469a.75.75 0 0 0 .612 1.183h1.8v.55c0 .248.25.45.499.45a.45.45 0 0 0 .45-.45v-.55h.052a.45.45 0 1 0 0-.9H22.5z' fill='white'/%3e%3c/svg%3e";case e.VideoQuality.Q_4320P:return"data:image/svg+xml,%3csvg width='34' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.466.466 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.466.466 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.465.465 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438.041.01.083.028.12.05 1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.467.467 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.598.598 0 0 0-.413-.519 7.464 7.464 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.581.581 0 0 0 .633-.44 7.448 7.448 0 0 1 .749-1.967z' fill='white'/%3e%3crect x='15' y='3' width='17' height='11' rx='5.5' fill='%23689FF8'/%3e%3cpath d='M24.513 11c.323 0 .513-.198.513-.537v-.97l.49-.516 1.475 1.738c.16.205.302.284.513.284A.49.49 0 0 0 28 10.5c0-.14-.068-.287-.22-.478l-1.486-1.729 1.526-1.425c.129-.137.18-.25.18-.393A.473.473 0 0 0 27.517 6c-.17 0-.299.065-.441.222l-2.02 2.027h-.03V6.54c0-.342-.19-.54-.513-.54S24 6.198 24 6.54v3.923c0 .339.19.537.513.537z' fill='white'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M21 6c-.353 0-.671.057-.952.173a1.493 1.493 0 0 0-.654.484c-.154.208-.23.445-.23.71 0 .423.208.756.613.995a1.46 1.46 0 0 0-.547.44c-.154.203-.23.441-.23.71 0 .288.084.548.252.777l.001.002c.173.224.412.398.712.523.302.125.647.186 1.035.186.388 0 .733-.061 1.035-.186.3-.125.537-.299.705-.524.174-.23.26-.49.26-.777 0-.27-.076-.508-.23-.711a1.448 1.448 0 0 0-.552-.44c.409-.235.618-.569.618-.994a1.14 1.14 0 0 0-.238-.711 1.436 1.436 0 0 0-.653-.484A2.428 2.428 0 0 0 21 6zm-.573.964c.136-.105.323-.16.573-.16.25 0 .434.055.564.16h.001a.512.512 0 0 1 .203.43c0 .19-.07.333-.203.437-.13.105-.315.161-.565.161-.25 0-.437-.056-.573-.161a.519.519 0 0 1-.203-.437c0-.185.07-.326.203-.43zm-.345 2.522c0-.217.08-.381.233-.503.16-.122.385-.188.685-.188.3 0 .522.066.677.188.16.122.24.287.24.503a.628.628 0 0 1-.24.523c-.155.122-.377.188-.677.188-.3 0-.524-.065-.684-.188a.636.636 0 0 1-.234-.523z' fill='white'/%3e%3c/svg%3e";default:return et}}(r)),393216&t.$$.dirty&&n(3,o=function(t,i){return t?i?t===e.VideoQuality.INVARIANT?"Авто":`Авто ${t}`:t:"..."}(r,a))},[d,f,w,o,l,s,c,p,v,g,function(){w?n(2,w=!1):n(1,f=!f)},function(){clearTimeout(m)},function(){m=window.setTimeout((()=>{n(1,f=!1),n(2,w=!1)}),1e3)},function(){n(1,f=!1),n(2,w=!0)},b,function(){n(1,f=!0),n(2,w=!1)},y,a,r,e=>b(e.value)]}class rt extends se{constructor(e){super(),ne(this,e,at,ot,r,{className:0},tt)}}const ct=e=>{if(!isFinite(e))return"00:00";let t=Math.round(e);const i=Math.floor(t/3600);t-=3600*i;const n=Math.floor(t/60);t-=60*n;return(i>0?[i,n,t]:[n,t]).map((e=>e>9?String(e):`0${e}`)).join(":")};function dt(e){m(e,"svelte-1biumvr",".time.svelte-1biumvr{display:flex;align-items:center;padding:0 8px;font-weight:500;cursor:default;will-change:opacity}.current.svelte-1biumvr{position:relative}.duration.svelte-1biumvr{opacity:0.7}.duration.svelte-1biumvr:before{content:' / ';white-space:pre}")}function ut(e){let t,i,s,l,o,a,r,c;return{c(){t=b("div"),i=b("span"),s=x(e[3]),l=$(),o=b("span"),a=x(e[2]),C(i,"class","current svelte-1biumvr"),C(o,"class",r="duration "+e[1]+" svelte-1biumvr"),C(t,"class",c="time "+e[0]+" svelte-1biumvr")},m(e,n){f(e,t,n),g(t,i),g(i,s),g(t,l),g(t,o),g(o,a)},p(e,[i]){8&i&&P(s,e[3]),4&i&&P(a,e[2]),2&i&&r!==(r="duration "+e[1]+" svelte-1biumvr")&&C(o,"class",r),1&i&&c!==(c="time "+e[0]+" svelte-1biumvr")&&C(t,"class",c)},i:n,o:n,d(e){e&&w(t)}}}function pt(e,t,i){let n,s,{duration:l}=t,{position:o}=t,{className:a=""}=t,{durationClassName:r=""}=t;return e.$$set=e=>{"duration"in e&&i(4,l=e.duration),"position"in e&&i(5,o=e.position),"className"in e&&i(0,a=e.className),"durationClassName"in e&&i(1,r=e.durationClassName)},e.$$.update=()=>{16&e.$$.dirty&&i(2,n=ct(l)),32&e.$$.dirty&&i(3,s=ct(o))},[a,r,n,s,l,o]}class vt extends se{constructor(e){super(),ne(this,e,pt,ut,r,{duration:4,position:5,className:0,durationClassName:1},dt)}}function ht(e){m(e,"svelte-ugg7st",".slider.svelte-ugg7st.svelte-ugg7st{position:relative;height:var(--videoplayer-slider-height);border-radius:var(--videoplayer-slider-radius);background:var(--videoplayer-slider-bg);cursor:pointer;outline:none;transition:visibility 0.2s, opacity 0.2s;will-change:opacity, transform;width:100%}.no-handle.svelte-ugg7st.svelte-ugg7st{cursor:default}.slider.svelte-ugg7st.svelte-ugg7st:before{content:'';position:absolute;left:0;right:0;top:calc(-1 * (var(--videoplayer-controls-height) - var(--videoplayer-slider-height)) / 2);height:var(--videoplayer-controls-height)}.bars.svelte-ugg7st.svelte-ugg7st{position:absolute;width:100%;height:100%;border-radius:var(--videoplayer-slider-radius);overflow:hidden}.loaded.svelte-ugg7st.svelte-ugg7st{position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--videoplayer-slider-radius);background:var(--videoplayer-slider-loaded-bg);transition:transform 0.2s}.filled.svelte-ugg7st.svelte-ugg7st{position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--videoplayer-slider-radius);background-color:var(--videoplayer-slider-filled-bg)}.filled.active-live.svelte-ugg7st.svelte-ugg7st{background-color:var(--videoplayer-slider-filled-active-live-bg)}.filled.ads.svelte-ugg7st.svelte-ugg7st{background-color:var(--videoplayer-slider-filled-ads)}.handleWrap.svelte-ugg7st.svelte-ugg7st{position:absolute;left:-100%;width:100%}.handle.svelte-ugg7st.svelte-ugg7st{position:absolute;width:var(--videoplayer-slider-handle-size);height:var(--videoplayer-slider-handle-size);right:calc(-1 * var(--videoplayer-slider-handle-size) / 2);top:calc((var(--videoplayer-slider-height) - var(--videoplayer-slider-handle-size)) / 2);border-radius:50%;background-color:var(--videoplayer-slider-filled-bg);visibility:hidden;opacity:0;transform:scale(0);transition:opacity 0.2s, transform 0.2s, visibility 0.2s;will-change:opacity, transform}.handle.active-live.svelte-ugg7st.svelte-ugg7st{background-color:var(--videoplayer-slider-filled-active-live-bg)}.slider.svelte-ugg7st:hover .handle.svelte-ugg7st,.slider-dragging.svelte-ugg7st .handle.svelte-ugg7st{visibility:visible;opacity:1;transform:scale(1)}.slider-dragging.svelte-ugg7st .handle.svelte-ugg7st{transform:scale(1.3)}.slider-vertical.svelte-ugg7st.svelte-ugg7st{position:absolute;left:-26px;top:-18px;transform-origin:0 0;transform:rotate(-90deg)}.hidden.svelte-ugg7st.svelte-ugg7st{visibility:hidden;opacity:0}")}function gt(e){let t,i,s,l,r,c,d,u,p,v,h,m,y,x;return{c(){t=b("div"),i=b("div"),s=b("div"),r=$(),c=b("div"),u=$(),p=b("div"),v=b("div"),C(s,"class","loaded svelte-ugg7st"),C(s,"style",l=`transform: translateX(${100*e[11]}%);`),C(c,"class","filled svelte-ugg7st"),C(c,"style",d=`transform: translateX(${100*e[12]}%);`),A(c,"active-live",e[5]),A(c,"ads",e[6]),C(i,"class","bars svelte-ugg7st"),C(v,"class","handle svelte-ugg7st"),A(v,"active-live",e[5]),C(p,"class","handleWrap svelte-ugg7st"),C(p,"style",h=`transform: translateX(${100*e[13]}%);`),A(p,"hidden",e[6]),C(t,"class",m="slider "+e[1]+" svelte-ugg7st"),C(t,"aria-label",e[14]),C(t,"aria-valuemin",e[15]),C(t,"aria-valuemax",e[16]),C(t,"aria-valuenow",e[17]),C(t,"aria-valuetext",e[18]),C(t,"role","slider"),C(t,"tabindex","0"),A(t,"slider-dragging",e[2]),A(t,"hidden",e[3]),A(t,"slider-vertical",e[4]),A(t,"no-handle",e[6])},m(n,l){f(n,t,l),g(t,i),g(i,s),g(i,r),g(i,c),g(t,u),g(t,p),g(p,v),e[19](t),y||(x=[k(t,"pointerdown",(function(){a(e[10])&&e[10].apply(this,arguments)})),k(t,"mouseenter",(function(){a(e[7])&&e[7].apply(this,arguments)})),k(t,"mousemove",(function(){a(e[8])&&e[8].apply(this,arguments)})),k(t,"mouseleave",(function(){a(e[9])&&e[9].apply(this,arguments)}))],y=!0)},p(i,[n]){e=i,2048&n&&l!==(l=`transform: translateX(${100*e[11]}%);`)&&C(s,"style",l),4096&n&&d!==(d=`transform: translateX(${100*e[12]}%);`)&&C(c,"style",d),32&n&&A(c,"active-live",e[5]),64&n&&A(c,"ads",e[6]),32&n&&A(v,"active-live",e[5]),8192&n&&h!==(h=`transform: translateX(${100*e[13]}%);`)&&C(p,"style",h),64&n&&A(p,"hidden",e[6]),2&n&&m!==(m="slider "+e[1]+" svelte-ugg7st")&&C(t,"class",m),16384&n&&C(t,"aria-label",e[14]),32768&n&&C(t,"aria-valuemin",e[15]),65536&n&&C(t,"aria-valuemax",e[16]),131072&n&&C(t,"aria-valuenow",e[17]),262144&n&&C(t,"aria-valuetext",e[18]),6&n&&A(t,"slider-dragging",e[2]),10&n&&A(t,"hidden",e[3]),18&n&&A(t,"slider-vertical",e[4]),66&n&&A(t,"no-handle",e[6])},i:n,o:n,d(i){i&&w(t),e[19](null),y=!1,o(x)}}}function mt(e,t,i){let{className:s=""}=t,{isDragging:l=!1}=t,{isHidden:o=!1}=t,{isVertical:a=!1}=t,{isActiveLive:r=!1}=t,{isAds:c=!1}=t,{element:d}=t,{onMouseEnter:u=n}=t,{onMouseMove:p=n}=t,{onMouseLeave:v=n}=t,{onPointerDown:h=n}=t,{loadedProgress:g=0}=t,{filledProgress:m=0}=t,{handleProgress:f=0}=t,{ariaLabel:w=""}=t,{ariaValueMin:b}=t,{ariaValueMax:y}=t,{ariaValueNow:x}=t,{ariaValueText:$=""}=t;return e.$$set=e=>{"className"in e&&i(1,s=e.className),"isDragging"in e&&i(2,l=e.isDragging),"isHidden"in e&&i(3,o=e.isHidden),"isVertical"in e&&i(4,a=e.isVertical),"isActiveLive"in e&&i(5,r=e.isActiveLive),"isAds"in e&&i(6,c=e.isAds),"element"in e&&i(0,d=e.element),"onMouseEnter"in e&&i(7,u=e.onMouseEnter),"onMouseMove"in e&&i(8,p=e.onMouseMove),"onMouseLeave"in e&&i(9,v=e.onMouseLeave),"onPointerDown"in e&&i(10,h=e.onPointerDown),"loadedProgress"in e&&i(11,g=e.loadedProgress),"filledProgress"in e&&i(12,m=e.filledProgress),"handleProgress"in e&&i(13,f=e.handleProgress),"ariaLabel"in e&&i(14,w=e.ariaLabel),"ariaValueMin"in e&&i(15,b=e.ariaValueMin),"ariaValueMax"in e&&i(16,y=e.ariaValueMax),"ariaValueNow"in e&&i(17,x=e.ariaValueNow),"ariaValueText"in e&&i(18,$=e.ariaValueText)},[d,s,l,o,a,r,c,u,p,v,h,g,m,f,w,b,y,x,$,function(e){j[e?"unshift":"push"]((()=>{d=e,i(0,d)}))}]}class ft extends se{constructor(e){super(),ne(this,e,mt,gt,r,{className:1,isDragging:2,isHidden:3,isVertical:4,isActiveLive:5,isAds:6,element:0,onMouseEnter:7,onMouseMove:8,onMouseLeave:9,onPointerDown:10,loadedProgress:11,filledProgress:12,handleProgress:13,ariaLabel:14,ariaValueMin:15,ariaValueMax:16,ariaValueNow:17,ariaValueText:18},ht)}}const{window:wt}=G;function bt(e){m(e,"svelte-8tpe0o",".volumeButton.svelte-8tpe0o.svelte-8tpe0o{display:flex;align-items:center;padding:0 10px 0 8px;position:relative;cursor:pointer;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity}.volumeButton.svelte-8tpe0o.svelte-8tpe0o:hover{opacity:0.8}.icon.svelte-8tpe0o.svelte-8tpe0o{display:block;width:24px;height:24px}.icon.svelte-8tpe0o .cross.svelte-8tpe0o{visibility:hidden}.icon[data-value='off'].svelte-8tpe0o .wave1.svelte-8tpe0o,.icon[data-value='off'].svelte-8tpe0o .wave2.svelte-8tpe0o{visibility:hidden}.icon[data-value='off'].svelte-8tpe0o .cross.svelte-8tpe0o{visibility:visible}.icon[data-value='mid'].svelte-8tpe0o .wave2.svelte-8tpe0o,.icon[data-value='min'].svelte-8tpe0o .wave2.svelte-8tpe0o{visibility:hidden}.volumeBar.svelte-8tpe0o.svelte-8tpe0o{display:flex;align-items:center;padding-right:8px;position:relative;width:86px}.volumeBar-slider-vertical{width:50px !important}.volumeBar-vertical.svelte-8tpe0o.svelte-8tpe0o{padding:0;width:0}")}function yt(e){let t,i,n,s,l,a,r,c,d,u,p,v,h;function m(t){e[16](t)}let x={className:e[0]?"volumeBar-slider-vertical":"",isDragging:e[2],isHidden:e[0]&&!e[3],isVertical:e[0],onPointerDown:e[8],onMouseEnter:e[11],onMouseLeave:e[12],ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,ariaValueNow:Math.round(100*e[5]),ariaValueText:`${Math.round(100*e[5])}%`,filledProgress:e[5],handleProgress:e[5]};return void 0!==e[1]&&(x.element=e[1]),d=new ft({props:x}),j.push((()=>J(d,"element",m))),{c(){t=b("div"),i=y("svg"),n=y("g"),s=y("path"),l=y("path"),a=y("path"),r=$(),c=b("div"),Z(d.$$.fragment),C(s,"class","wave2 svelte-8tpe0o"),C(s,"d","M12.980843 18.8227621c-.032051 1.2070086-.6704932 1.608931-1.8287519.6202507-1.7185995-1.4687545-3.60887471-3.1942931-4.24215929-3.7215065-.63217937-.528454-1.64491897-.6202511-3.07284859-.6202511-1.42682441 0-1.81505873-.6202511-1.81505873-1.2405016s-.01369327-1.8288162-.01369327-2.001246c0-.0549443.00464608-.085056.01369327-.1291845.01954957-.0953551-.05817756-.9728525 0-1.591076.08510106-.90556663.38823432-1.24050252 1.81505873-1.24050252 1.42792962 0 2.44066922-.09179716 3.07284859-.62025109.63328458-.52845393 2.52355979-2.25275186 4.24215929-3.72150644 1.1582587-.98868024 1.7967003-.58675756 1.8287514.62025106.0431031 1.60645033 5e-7 3.85020301 5e-7 6.68226949 0 2.8295855.0431032 5.3568042 0 6.9632545zm2.9004386-8.7040437c-.3417088-.34170872-.3417088-.89572808 0-1.23743683.3417087-.34170876.8957281-.34170876 1.2374368 0 .1762598.17625972.4111566.46988072.6409943.87209686C18.1429358 10.4240187 18.375 11.1782274 18.375 12s-.2320642 1.5759813-.6152873 2.2466216c-.2298377.4022161-.4647345.6958371-.6409943.8720968-.3417087.3417088-.8957281.3417088-1.2374368 0-.3417088-.3417087-.3417088-.8957281 0-1.2374368.0737402-.0737403.2138434-.2488693.3590057-.5029032C16.4820642 12.9552687 16.625 12.4907274 16.625 12s-.1429358-.9552687-.3847127-1.3783784c-.1451623-.2540339-.2852655-.4291629-.3590057-.5029032zm3-1.99999997c-.3417088-.34170875-.3417088-.89572811 0-1.23743686.3417087-.34170876.8957281-.34170876 1.2374368 0 .2637116.26371158.6207023.73969919.9665078 1.43131016.5167785 1.03355701.842501 2.25503497.8892639 3.71655167-.0467629 1.4032299-.3724854 2.6247079-.8892639 3.6582649-.3458055.6916109-.7027962 1.1675985-.9665078 1.4313101-.3417087.3417088-.8957281.3417088-1.2374368 0-.3417088-.3417087-.3417088-.8957281 0-1.2374368.1375896-.1375897.3825507-.4642045.638697-.9764971.4071252-.8142505.6673665-1.7901701.7054825-2.8756411-.038116-1.1437578-.2983573-2.11967743-.7054825-2.93392787-.2561463-.51229266-.5011074-.83890747-.638697-.9764971z"),C(l,"class","wave1 svelte-8tpe0o"),C(l,"d","M12.980843 18.8227621c-.032051 1.2070086-.6704932 1.608931-1.8287519.6202507-1.7185995-1.4687545-3.60887471-3.1942931-4.24215929-3.7215065-.63217937-.528454-1.64491897-.6202511-3.07284859-.6202511-1.42682441 0-1.81505873-.6202511-1.81505873-1.2405016s-.01369327-1.8288162-.01369327-2.001246c0-.0549443.00464608-.085056.01369327-.1291845.01954957-.0953551-.05817756-.9728525 0-1.591076.08510106-.90556663.38823432-1.24050252 1.81505873-1.24050252 1.42792962 0 2.44066922-.09179716 3.07284859-.62025109.63328458-.52845393 2.52355979-2.25275186 4.24215929-3.72150644 1.1582587-.98868024 1.7967003-.58675756 1.8287514.62025106.0431031 1.60645033 5e-7 3.85020301 5e-7 6.68226949 0 2.8295855.0431032 5.3568042 0 6.9632545zm2.9004386-8.7040437c-.3417088-.34170872-.3417088-.89572808 0-1.23743683.3417087-.34170876.8957281-.34170876 1.2374368 0 .1762598.17625972.4111566.46988072.6409943.87209686C18.1429358 10.4240187 18.375 11.1782274 18.375 12s-.2320642 1.5759813-.6152873 2.2466216c-.2298377.4022161-.4647345.6958371-.6409943.8720968-.3417087.3417088-.8957281.3417088-1.2374368 0-.3417088-.3417087-.3417088-.8957281 0-1.2374368.0737402-.0737403.2138434-.2488693.3590057-.5029032C16.4820642 12.9552687 16.625 12.4907274 16.625 12s-.1429358-.9552687-.3847127-1.3783784c-.1451623-.2540339-.2852655-.4291629-.3590057-.5029032z"),C(a,"class","cross svelte-8tpe0o"),C(a,"d","M20 10.7625631l2.3812816-2.38128153c.3417087-.34170876.8957281-.34170876 1.2374368 0 .3417088.34170875.3417088.89572811 0 1.23743686L21.2374369 12l2.3812815 2.3812816c.3417088.3417087.3417088.8957281 0 1.2374368-.3417087.3417088-.8957281.3417088-1.2374368 0L20 13.2374369l-2.3812816 2.3812815c-.3417087.3417088-.8957281.3417088-1.2374368 0-.3417088-.3417087-.3417088-.8957281 0-1.2374368L18.7625631 12l-2.3812815-2.38128157c-.3417088-.34170875-.3417088-.89572811 0-1.23743686.3417087-.34170876.8957281-.34170876 1.2374368 0zm-7.019157 8.060199c-.032051 1.2070086-.6704932 1.608931-1.8287519.6202507-1.7185995-1.4687545-3.60887471-3.1942931-4.24215929-3.7215065-.63217937-.528454-1.64491897-.6202511-3.07284859-.6202511-1.42682441 0-1.81505873-.6202511-1.81505873-1.2405016s-.01369327-1.8288162-.01369327-2.001246c0-.0549443.00464608-.085056.01369327-.1291845.01954957-.0953551-.05817756-.9728525 0-1.591076.08510106-.90556663.38823432-1.24050252 1.81505873-1.24050252 1.42792962 0 2.44066922-.09179716 3.07284859-.62025109.63328458-.52845393 2.52355979-2.25275186 4.24215929-3.72150644 1.1582587-.98868024 1.7967003-.58675756 1.8287514.62025106.0431031 1.60645033 5e-7 3.85020301 5e-7 6.68226949 0 2.8295855.0431032 5.3568042 0 6.9632545z"),C(n,"fill","#fff"),C(n,"fill-rule","evenodd"),C(i,"xmlns","http://www.w3.org/2000/svg"),C(i,"class","icon svelte-8tpe0o"),C(i,"data-value",e[4]),C(t,"class","volumeButton svelte-8tpe0o"),C(t,"tabindex","0"),C(t,"role","button"),C(c,"class","volumeBar svelte-8tpe0o"),A(c,"volumeBar-vertical",e[0])},m(o,u){f(o,t,u),g(t,i),g(i,n),g(n,s),g(n,l),g(n,a),f(o,r,u),f(o,c,u),ee(d,c,null),p=!0,v||(h=[k(wt,"pointermove",e[9]),k(wt,"pointerup",e[10]),k(t,"mouseenter",e[11]),k(t,"mouseleave",e[12]),k(t,"click",e[15])],v=!0)},p(e,[t]){(!p||16&t)&&C(i,"data-value",e[4]);const n={};1&t&&(n.className=e[0]?"volumeBar-slider-vertical":""),4&t&&(n.isDragging=e[2]),9&t&&(n.isHidden=e[0]&&!e[3]),1&t&&(n.isVertical=e[0]),32&t&&(n.ariaValueNow=Math.round(100*e[5])),32&t&&(n.ariaValueText=`${Math.round(100*e[5])}%`),32&t&&(n.filledProgress=e[5]),32&t&&(n.handleProgress=e[5]),!u&&2&t&&(u=!0,n.element=e[1],H((()=>u=!1))),d.$set(n),1&t&&A(c,"volumeBar-vertical",e[0])},i(e){p||(X(d.$$.fragment,e),p=!0)},o(e){Y(d.$$.fragment,e),p=!1},d(e){e&&w(t),e&&w(r),e&&w(c),te(d),v=!1,o(h)}}}function xt(e,t,i){let n,s,{isVerticalVolume:l=!1}=t;const o=Ke(),a=o.state.volume$;h(e,a,(e=>i(13,n=e)));const r=o.state.muted$;h(e,r,(e=>i(14,s=e)));const c=o.actions.internal.setVolume;let d,u,p,v,g,m=!1,f=!1,w=1;function b(e){return l?Math.max(0,Math.min(1,(u.height-(e.clientY-u.top))/u.height)):Math.min(Math.max(e.clientX-u.x,0),u.width)/u.width}return e.$$set=e=>{"isVerticalVolume"in e&&i(0,l=e.isVerticalVolume)},e.$$.update=()=>{var t;24576&e.$$.dirty&&i(4,(t=n,v=s?"off":t>.5?"max":t>.2?"mid":t>0?"min":"off")),24576&e.$$.dirty&&i(5,g=s?0:n)},[l,d,m,f,v,g,a,r,function(e){e.preventDefault(),i(2,m=!0),u=d.getBoundingClientRect(),w=n,c(b(e))},function(e){m&&c(b(e))},function(e){if(!m)return;const t=b(e);c(t,0===t?w:t),i(2,m=!1)},function(){l&&(clearTimeout(p),i(3,f=!0))},function(){l&&(p=window.setTimeout((()=>{i(3,f=!1)}),300))},n,s,function(t){T.call(this,e,t)},function(e){d=e,i(1,d)}]}class $t extends se{constructor(e){super(),ne(this,e,xt,yt,r,{isVerticalVolume:0},bt)}}function kt(e){m(e,"svelte-r0c8lv",".container.svelte-r0c8lv{display:flex;align-items:center;height:100%;padding-right:8px;cursor:pointer;outline:none;transition:var(--videoplayer-button-hover-transition);will-change:opacity}.container.svelte-r0c8lv:hover{opacity:0.8}.icon.svelte-r0c8lv{display:block;will-change:opacity;width:24px;height:24px}")}function Vt(e){let t;return{c(){t=y("path"),C(t,"class","_enter"),C(t,"d","M10.5 19c0 .5522847-.4477153 1-1 1H5c-.55228475 0-1-.4477153-1-1v-4.5c0-.5522847.44771525-1 1-1s1 .4477153 1 1v2.0715l3.36290054-3.3643932.00012963-.0001296c.39052429-.3905243 1.02368923-.3905243 1.41421353 0l.0157791.0157791.0001297.0001296c.3904527.3905959.3903366 1.0237609-.0002593 1.4142136L7.4285 18H9.5c.5522847 0 1 .4477153 1 1zM18 7.4285l-3.3629005 3.3643932c-.0000432.0000432-.0000865.0000864-.0001297.0001296-.3905243.3905243-1.0236892.3905243-1.4142135 0l-.0157791-.0157791c-.0000433-.0000432-.0000865-.0000864-.0001297-.0001296-.3904527-.3905959-.3903366-1.02376087.0002593-1.41421356L16.5715 6H14.5c-.5522847 0-1-.44771525-1-1s.4477153-1 1-1H19c.5522847 0 1 .44771525 1 1v4.5c0 .5522847-.4477153 1-1 1s-1-.4477153-1-1z")},m(e,i){f(e,t,i)},d(e){e&&w(t)}}}function Ct(e){let t;return{c(){t=y("path"),C(t,"class","_exit"),C(t,"d","M4.57969048 13.9787492c0-.5464165.44295809-.9893746.9893746-.9893746h4.45218572c.5464165 0 .9893746.4429581.9893746.9893746v4.4521857c0 .5464165-.4429581.9893746-.9893746.9893746-.54641651 0-.98937461-.4429581-.98937461-.9893746v-2.0494895l-3.3196551 3.3211319-.00012963.0001297c-.39052429.3905243-1.02368927.3905243-1.41421356 0l-.00058487-.0005849-.00012964-.0001297c-.39045268-.3905958-.3903366-1.0237608.00025929-1.4142135l3.32113189-3.3196551H5.56906508c-.54641651 0-.9893746-.4429581-.9893746-.9893746zM14.9681238 7.61855457l3.3196551-3.32113189.0001296-.00012966c.3905243-.39052429 1.0236893-.39052429 1.4142136 0l.0005849.00058488.0001296.00012965c.3904527.39059589.3903366 1.02376086-.0002593 1.41421354l-3.3211319 3.3196551h2.0494895c.5464165 0 .9893746.4429581.9893746.98937461 0 .5464165-.4429581.9893746-.9893746.9893746h-4.4415603c-.5522847 0-1-.4477153-1-1V5.56906508c0-.54641651.4429581-.9893746.9893746-.9893746s.9893746.44295809.9893746.9893746z")},m(e,i){f(e,t,i)},d(e){e&&w(t)}}}function Pt(e){let t,i,s,l,o;function a(e,t){return e[0]?Ct:Vt}let r=a(e),c=r(e);return{c(){t=b("div"),i=y("svg"),s=y("g"),c.c(),C(s,"fill","#fff"),C(s,"fill-rule","evenodd"),C(i,"class","icon svelte-r0c8lv"),C(i,"xmlns","http://www.w3.org/2000/svg"),C(t,"class","container svelte-r0c8lv"),C(t,"role","button"),C(t,"tabindex","0")},m(n,a){f(n,t,a),g(t,i),g(i,s),c.m(s,null),l||(o=k(t,"click",e[2]),l=!0)},p(e,[t]){r!==(r=a(e))&&(c.d(1),c=r(e),c&&(c.c(),c.m(s,null)))},i:n,o:n,d(e){e&&w(t),c.d(),l=!1,o()}}}function St(e,t,i){let n;const s=Ke().ui.isFullscreen;return h(e,s,(e=>i(0,n=e))),[n,s,function(t){T.call(this,e,t)}]}class At extends se{constructor(e){super(),ne(this,e,St,Pt,r,{},kt)}}var Mt,Nt,zt,Tt,Lt="data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M17.671 10.923c.82.483.82 1.67 0 2.154l-8.787 5.175A1.25 1.25 0 0 1 7 17.174V6.826a1.25 1.25 0 0 1 1.884-1.078l8.787 5.175z' fill='white'/%3e%3c/svg%3e",jt="data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8.712 5c.448 0 .61.047.774.134a.913.913 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134H6.788c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.913.913 0 0 1 .38-.38C6.178 5.047 6.34 5 6.788 5h1.924zm8 0c.448 0 .61.047.774.134a.914.914 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134h-1.924c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.914.914 0 0 1 .38-.38c.164-.087.326-.134.774-.134h1.924z' fill='white'/%3e%3c/svg%3e";function Et(e){m(e,"svelte-1vr05a0",".container.svelte-1vr05a0{display:flex;align-items:center;padding:0 8px 0 16px;cursor:pointer;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity}.container.svelte-1vr05a0:hover{opacity:0.8}.icon.svelte-1vr05a0{display:block;width:24px;height:24px}")}function It(e){let t,i,s,l,o,r;return{c(){t=b("div"),i=b("img"),u(i.src,s=e[2])||C(i,"src",s),C(i,"class","icon svelte-1vr05a0"),C(i,"alt",""),C(t,"class",l="container "+e[0]+" svelte-1vr05a0"),C(t,"role","button"),C(t,"tabindex","0")},m(n,s){f(n,t,s),g(t,i),o||(r=k(t,"click",(function(){a(e[1])&&e[1].apply(this,arguments)})),o=!0)},p(n,[o]){e=n,4&o&&!u(i.src,s=e[2])&&C(i,"src",s),1&o&&l!==(l="container "+e[0]+" svelte-1vr05a0")&&C(t,"class",l)},i:n,o:n,d(e){e&&w(t),o=!1,r()}}}function Ft(t,i,n){let s,l,{isEnded:o}=i,{isAds:a}=i,{playbackState:r}=i,{adPlaybackState:c}=i,{className:d=""}=i,{handlePlayClick:u}=i,{repeatPlaylist:p}=i,{isOneVideoPlaylist:v}=i;return t.$$set=e=>{"isEnded"in e&&n(3,o=e.isEnded),"isAds"in e&&n(4,a=e.isAds),"playbackState"in e&&n(5,r=e.playbackState),"adPlaybackState"in e&&n(6,c=e.adPlaybackState),"className"in e&&n(0,d=e.className),"handlePlayClick"in e&&n(7,u=e.handlePlayClick),"repeatPlaylist"in e&&n(8,p=e.repeatPlaylist),"isOneVideoPlaylist"in e&&n(9,v=e.isOneVideoPlaylist)},t.$$.update=()=>{120&t.$$.dirty&&n(2,s=a?function(e){return e===Tt.PLAYING?jt:Lt}(c):function(t,i){return i?"data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 9.096a.4.4 0 0 1-.67.296L7.044 5.493a.668.668 0 0 1 0-.986L11.33.608A.4.4 0 0 1 12 .904V4a8 8 0 1 1-8 8 1 1 0 1 1 2 0 6 6 0 1 0 6-6v3.096z' fill='white'/%3e%3c/svg%3e":t===e.PlaybackState.PLAYING?jt:Lt}(r,o)),920&t.$$.dirty&&n(1,l=a||!o||v?u:p)},[d,l,s,o,a,r,c,u,p,v]}!function(e){e.AUTO="auto"}(Mt||(Mt={})),function(e){e.Thumb="thumb",e.Video="video",e.Ads="ads"}(Nt||(Nt={})),function(e){e.Preroll="preroll",e.Midroll="midroll",e.Postroll="postroll"}(zt||(zt={})),function(e){e.INACTIVE="inactive",e.PLAYING="playing",e.PAUSED="paused"}(Tt||(Tt={}));class Rt extends se{constructor(e){super(),ne(this,e,Ft,It,r,{isEnded:3,isAds:4,playbackState:5,adPlaybackState:6,className:0,handlePlayClick:7,repeatPlaylist:8,isOneVideoPlaylist:9},Et)}}function Bt(e){m(e,"svelte-1rcixu9",".container.svelte-1rcixu9{display:flex;align-items:center;padding:0 8px;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity;cursor:pointer}.container.svelte-1rcixu9:hover{opacity:0.8}.icon.svelte-1rcixu9{display:block;width:24px;height:24px}")}function Ht(e){let t,i,s;return{c(){t=b("div"),t.innerHTML='<svg height="24" width="24" class="icon svelte-1rcixu9" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m0 0h24v24h-24z" opacity=".3"></path><path d="m16 11.919v-5.417c0-.276.214-.5.505-.5h.99c.279 0 .505.229.505.5v11.003c0 .277-.214.5-.505.5h-.99a.506.506 0 0 1 -.505-.5v-5.413c-.031.158-.147.312-.352.437l-8.788 5.361c-.475.289-.86.068-.86-.482v-10.805c0-.556.374-.778.86-.482l8.788 5.36c.203.123.32.278.352.438z" fill="#fff"></path></g></svg>',C(t,"class","container svelte-1rcixu9"),C(t,"role","button"),C(t,"tabindex","0")},m(n,l){f(n,t,l),i||(s=k(t,"click",e[0]),i=!0)},p:n,i:n,o:n,d(e){e&&w(t),i=!1,s()}}}function Qt(e){return[function(t){T.call(this,e,t)}]}class _t extends se{constructor(e){super(),ne(this,e,Qt,Ht,r,{},Bt)}}var Ot="data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.265 4.265C3 5.531 3 7.567 3 11.64v.72c0 4.073 0 6.11 1.265 7.375C5.531 21 7.567 21 11.64 21h.72c4.073 0 6.11 0 7.375-1.265C21 18.469 21 16.433 21 12.36v-.72c0-4.073 0-6.11-1.265-7.375C18.469 3 16.433 3 12.36 3h-.72C7.567 3 5.53 3 4.265 4.265zM6 8.5c.096 4.682 2.556 7.5 6.61 7.5h.235v-2.679c1.476.15 2.577 1.254 3.026 2.679H18c-.578-2.132-2.075-3.31-3.005-3.76.93-.558 2.246-1.908 2.556-3.74h-1.937c-.406 1.49-1.615 2.84-2.77 2.968V8.5h-1.968v5.197c-1.197-.3-2.759-1.757-2.823-5.197H6z' fill='white'/%3e%3c/svg%3e";function Dt(e){m(e,"svelte-175bte1",".container.svelte-175bte1{display:flex;align-items:center;padding:0 16px 0 8px;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity}.container.svelte-175bte1:hover{opacity:0.8}.container.no-hover.svelte-175bte1{pointer-events:none}.icon.svelte-175bte1{display:block;width:24px;height:24px}")}function Ut(e){let t,i;return{c(){t=b("img"),u(t.src,i=Ot)||C(t,"src","data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.265 4.265C3 5.531 3 7.567 3 11.64v.72c0 4.073 0 6.11 1.265 7.375C5.531 21 7.567 21 11.64 21h.72c4.073 0 6.11 0 7.375-1.265C21 18.469 21 16.433 21 12.36v-.72c0-4.073 0-6.11-1.265-7.375C18.469 3 16.433 3 12.36 3h-.72C7.567 3 5.53 3 4.265 4.265zM6 8.5c.096 4.682 2.556 7.5 6.61 7.5h.235v-2.679c1.476.15 2.577 1.254 3.026 2.679H18c-.578-2.132-2.075-3.31-3.005-3.76.93-.558 2.246-1.908 2.556-3.74h-1.937c-.406 1.49-1.615 2.84-2.77 2.968V8.5h-1.968v5.197c-1.197-.3-2.759-1.757-2.823-5.197H6z' fill='white'/%3e%3c/svg%3e"),C(t,"class","icon svelte-175bte1"),C(t,"alt","")},m(e,i){f(e,t,i)},p:n,d(e){e&&w(t)}}}function qt(e){let t,i,s,l,o;return{c(){t=b("a"),i=b("img"),u(i.src,s=Ot)||C(i,"src","data:image/svg+xml,%3csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.265 4.265C3 5.531 3 7.567 3 11.64v.72c0 4.073 0 6.11 1.265 7.375C5.531 21 7.567 21 11.64 21h.72c4.073 0 6.11 0 7.375-1.265C21 18.469 21 16.433 21 12.36v-.72c0-4.073 0-6.11-1.265-7.375C18.469 3 16.433 3 12.36 3h-.72C7.567 3 5.53 3 4.265 4.265zM6 8.5c.096 4.682 2.556 7.5 6.61 7.5h.235v-2.679c1.476.15 2.577 1.254 3.026 2.679H18c-.578-2.132-2.075-3.31-3.005-3.76.93-.558 2.246-1.908 2.556-3.74h-1.937c-.406 1.49-1.615 2.84-2.77 2.968V8.5h-1.968v5.197c-1.197-.3-2.759-1.757-2.823-5.197H6z' fill='white'/%3e%3c/svg%3e"),C(i,"class","icon svelte-175bte1"),C(i,"alt",""),C(t,"href","https://vk.com/video"),C(t,"target","_blank")},m(n,s){f(n,t,s),g(t,i),l||(o=k(t,"click",e[1]),l=!0)},p:n,d(e){e&&w(t),l=!1,o()}}}function Wt(e){let t;function i(e,t){return e[0]?qt:Ut}let s=i(e),l=s(e);return{c(){t=b("div"),l.c(),C(t,"class","container svelte-175bte1"),C(t,"role","button"),C(t,"tabindex","0"),A(t,"no-hover",!e[0])},m(e,i){f(e,t,i),l.m(t,null)},p(e,[n]){s===(s=i(e))&&l?l.p(e,n):(l.d(1),l=s(e),l&&(l.c(),l.m(t,null))),1&n&&A(t,"no-hover",!e[0])},i:n,o:n,d(e){e&&w(t),l.d()}}}function Kt(e,t,i){let{logoClickable:n=!1}=t;return e.$$set=e=>{"logoClickable"in e&&i(0,n=e.logoClickable)},[n,function(t){T.call(this,e,t)}]}class Xt extends se{constructor(e){super(),ne(this,e,Kt,Wt,r,{logoClickable:0},Dt)}}function Yt(e){m(e,"svelte-a43kjp",".container.svelte-a43kjp{display:flex;align-items:center;padding:0 4px;outline:none;height:100%;transition:opacity 0.2s;will-change:opacity;cursor:pointer}.container.svelte-a43kjp:hover{opacity:0.8}.icon.svelte-a43kjp{display:block;width:24px;height:24px}.wave.svelte-a43kjp{animation-duration:1s;animation-iteration-count:infinite}.wave1.svelte-a43kjp{animation-name:svelte-a43kjp-wave1}.wave2.svelte-a43kjp{animation-name:svelte-a43kjp-wave2}.wave3.svelte-a43kjp{animation-name:svelte-a43kjp-wave3}@keyframes svelte-a43kjp-wave1{0%{opacity:0.3}33%{opacity:1}66%{opacity:1}100%{opacity:1}}@keyframes svelte-a43kjp-wave2{0%{opacity:0.3}33%{opacity:0.3}66%{opacity:1}100%{opacity:1}}@keyframes svelte-a43kjp-wave3{0%{opacity:0.3}33%{opacity:0.3}66%{opacity:0.3}100%{opacity:1}}")}function Gt(t){let i,n,s,l;function o(t,i){return t[1]===e.ChromecastState.AVAILABLE?ei:t[1]===e.ChromecastState.CONNECTED?Zt:t[1]===e.ChromecastState.CONNECTING?Jt:void 0}let a=o(t),r=a&&a(t);return{c(){i=b("div"),r&&r.c(),C(i,"class",n="container "+t[0]+" svelte-a43kjp"),C(i,"role","button"),C(i,"tabindex","0")},m(e,n){f(e,i,n),r&&r.m(i,null),s||(l=k(i,"click",t[4]),s=!0)},p(e,t){a!==(a=o(e))&&(r&&r.d(1),r=a&&a(e),r&&(r.c(),r.m(i,null))),1&t&&n!==(n="container "+e[0]+" svelte-a43kjp")&&C(i,"class",n)},d(e){e&&w(i),r&&r.d(),s=!1,l()}}}function Jt(e){let t,i,n,s,l,o,a;return{c(){t=y("svg"),i=y("g"),n=y("path"),s=y("path"),l=y("path"),o=y("path"),a=y("path"),C(n,"class","wave wave1 svelte-a43kjp"),C(n,"d","M1 18v3h3c0-1.66-1.34-3-3-3z"),C(n,"opacity",".3"),C(n,"fill","#fff"),C(s,"class","wave wave2 svelte-a43kjp"),C(s,"d","M1 14v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7z"),C(s,"opacity",".3"),C(s,"fill","#fff"),C(l,"class","wave wave3 svelte-a43kjp"),C(l,"d","M1 10v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11z"),C(l,"opacity",".3"),C(l,"fill","#fff"),C(o,"d","M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"),C(o,"fill","#fff"),C(a,"d","M0 0h24v24H0z"),C(i,"fill","none"),C(i,"fill-rule","evenodd"),C(t,"class","icon svelte-a43kjp"),C(t,"width","22"),C(t,"height","22"),C(t,"viewBox","0 0 24 24"),C(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){f(e,t,r),g(t,i),g(i,n),g(i,s),g(i,l),g(i,o),g(i,a)},d(e){e&&w(t)}}}function Zt(e){let t,i,n,s;return{c(){t=y("svg"),i=y("g"),n=y("path"),s=y("path"),C(n,"d","M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"),C(n,"fill","#fff"),C(s,"d","M0 0h24v24H0z"),C(i,"fill","none"),C(i,"fill-rule","evenodd"),C(t,"class","icon svelte-a43kjp"),C(t,"width","22"),C(t,"height","22"),C(t,"viewBox","0 0 24 24"),C(t,"xmlns","http://www.w3.org/2000/svg")},m(e,l){f(e,t,l),g(t,i),g(i,n),g(i,s)},d(e){e&&w(t)}}}function ei(e){let t,i,n,s;return{c(){t=y("svg"),i=y("g"),n=y("path"),s=y("path"),C(n,"d","M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"),C(n,"fill","#fff"),C(s,"d","M0 0h24v24H0z"),C(i,"fill","none"),C(i,"fill-rule","evenodd"),C(t,"class","icon svelte-a43kjp"),C(t,"width","22"),C(t,"height","22"),C(t,"viewBox","0 0 24 24"),C(t,"xmlns","http://www.w3.org/2000/svg")},m(e,l){f(e,t,l),g(t,i),g(i,n),g(i,s)},d(e){e&&w(t)}}}function ti(t){let i,s=t[1]!==e.ChromecastState.NOT_AVAILABLE&&Gt(t);return{c(){s&&s.c(),i=x("")},m(e,t){s&&s.m(e,t),f(e,i,t)},p(t,[n]){t[1]!==e.ChromecastState.NOT_AVAILABLE?s?s.p(t,n):(s=Gt(t),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},i:n,o:n,d(e){s&&s.d(e),e&&w(i)}}}function ii(e,t,i){let n,{className:s=""}=t;const l=Ke().state.chromecastState$;let o;return h(e,l,(e=>i(3,n=e))),e.$$set=e=>{"className"in e&&i(0,s=e.className)},e.$$.update=()=>{8&e.$$.dirty&&i(1,o=n)},[s,o,l,n,function(t){T.call(this,e,t)}]}class ni extends se{constructor(e){super(),ne(this,e,ii,ti,r,{className:0},Yt)}}function si(e){m(e,"svelte-1515uit",".container.svelte-1515uit{display:flex;align-items:center;height:100%;padding:0 8px;cursor:pointer;outline:none;transition:opacity 0.2s;will-change:opacity}.container.svelte-1515uit:hover{opacity:0.8}.icon.svelte-1515uit{display:block;width:42px;height:20px}")}function li(e){let t,i,s,l,o;return{c(){t=b("div"),i=b("img"),u(i.src,s=e[0])||C(i,"src",s),C(i,"class","icon svelte-1515uit"),C(i,"alt",""),C(t,"class","container svelte-1515uit"),C(t,"role","button"),C(t,"tabindex","0")},m(n,s){f(n,t,s),g(t,i),l||(o=k(t,"click",e[2]),l=!0)},p(e,[t]){1&t&&!u(i.src,s=e[0])&&C(i,"src",s)},i:n,o:n,d(e){e&&w(t),l=!1,o()}}}function oi(e,t,i){let{isActiveLive:n=!1}=t,s="";return e.$$set=e=>{"isActiveLive"in e&&i(1,n=e.isActiveLive)},e.$$.update=()=>{2&e.$$.dirty&&i(0,s=n?"data:image/svg+xml,%3csvg width='42' height='20' viewBox='0 0 42 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3crect width='42' height='20' rx='5' fill='%23FF3347'/%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 5C7.44772 5 7 5.44772 7 6V14C7 14.5523 7.44772 15 8 15H12C12.5523 15 13 14.5523 13 14C13 13.4477 12.5523 13 12 13H9V6C9 5.44772 8.55228 5 8 5ZM15 6C15 5.44772 15.4477 5 16 5C16.5523 5 17 5.44772 17 6V14C17 14.5523 16.5523 15 16 15C15.4477 15 15 14.5523 15 14V6ZM30 5C29.4822 5 29.0564 5.3935 29.0052 5.89776C29.0017 5.93137 29 5.96548 29 6V10V14C29 14.5523 29.4477 15 30 15H34C34.5523 15 35 14.5523 35 14C35 13.4477 34.5523 13 34 13H31V11H34C34.5523 11 35 10.5523 35 10C35 9.44772 34.5523 9 34 9H31V7H34C34.5523 7 35 6.55228 35 6C35 5.44772 34.5523 5 34 5H30ZM21.6751 14.3098L19.1257 6.48574C19.0645 6.37589 19.0235 6.25331 19.0075 6.12299L19 6.10001L19.0049 6.09952C19.0017 6.06678 19 6.03358 19 6C19 5.44772 19.4477 5 20 5C20.5187 5 20.9452 5.39492 20.9951 5.90048L21 5.89999L23 12.3L25 5.89999L25.0049 5.90048C25.0548 5.39492 25.4813 5 26 5C26.5523 5 27 5.44772 27 6C27 6.03358 26.9983 6.06678 26.9951 6.09952L27 6.10001L26.9925 6.12299C26.9765 6.25331 26.9355 6.37589 26.8743 6.48574L24.3249 14.3098C24.1908 14.7214 23.807 15 23.3741 15H22.6259C22.193 15 21.8092 14.7214 21.6751 14.3098Z' fill='%23F2F3F5'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg viewBox='0 0 42 20' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='m6.41 1a6.46 6.46 0 0 0 -3.41.55 3.52 3.52 0 0 0 -1.45 1.45 6.46 6.46 0 0 0 -.55 3.41v7.18a6.46 6.46 0 0 0 .55 3.41 3.52 3.52 0 0 0 1.45 1.45 6.46 6.46 0 0 0 3.41.55h29.18a6.46 6.46 0 0 0 3.41-.55 3.52 3.52 0 0 0 1.45-1.45 6.46 6.46 0 0 0 .55-3.41v-7.18a6.46 6.46 0 0 0 -.55-3.41 3.52 3.52 0 0 0 -1.45-1.45 6.46 6.46 0 0 0 -3.41-.55z' fill='none' stroke='white' stroke-width='2'/%3e %3cpath d='m8 5a1 1 0 0 1 1 1v7h3a1 1 0 0 1 1 .88v.12a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1-.77v-.11a.49.49 0 0 1 0-.12v-8a1 1 0 0 1 .88-1zm8 0a1 1 0 0 1 1 1v8a1 1 0 0 1 -.88 1h-.12a1 1 0 0 1 -1-1v-8a1 1 0 0 1 .88-1zm18 0a1 1 0 0 1 1 .88v.12a1 1 0 0 1 -1 1h-3v2h3a1 1 0 0 1 1 .88v.12a1 1 0 0 1 -1 1h-3v2h3a1 1 0 0 1 1 .88v.12a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1-.77v-.11a.49.49 0 0 1 0-.12v-8a1 1 0 0 1 .56-.9 1 1 0 0 1 .44-.1zm-8 0a1 1 0 0 1 1 1v.1a.89.89 0 0 1 -.11.35l-2.47 7.57a1.48 1.48 0 0 1 -1.32.98h-.2a1.48 1.48 0 0 1 -1.31-.95l-2.47-7.57a.89.89 0 0 1 -.12-.36v-.12a1 1 0 0 1 .88-1h.12a1 1 0 0 1 1 1v-.1l2 6.4 2-6.4a1 1 0 0 1 1-.9z' fill='%23f0f2f5' fill-rule='evenodd'/%3e%3c/svg%3e")},[s,n,function(t){T.call(this,e,t)}]}class ai extends se{constructor(e){super(),ne(this,e,oi,li,r,{isActiveLive:1},si)}}function ri(e){m(e,"svelte-1bwjmdb",'.tooltip-wrapper.svelte-1bwjmdb{position:relative;display:block}.tooltip.svelte-1bwjmdb{position:absolute;opacity:0;visibility:hidden;transition:opacity 200ms, visibility 200ms;bottom:100%;transform:translateX(-50%)}.tooltip.svelte-1bwjmdb:after{position:absolute;bottom:0;left:50%;width:0;border-top:5px solid rgba(41, 41, 41, .8);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0;transform:translate(-50%, 5px)}.content.svelte-1bwjmdb{display:inline-block;padding:6px 10px;border-radius:3px;color:var(--white);background-color:rgba(41, 41, 41, .8)}.tooltip.active.svelte-1bwjmdb{opacity:1;visibility:visible}')}function ci(e){let t,i,s,l,o;return{c(){t=b("div"),i=b("div"),s=b("div"),l=x(e[0]),C(s,"class","content svelte-1bwjmdb"),C(i,"class","tooltip svelte-1bwjmdb"),A(i,"active",e[1]),C(t,"class","tooltip-wrapper svelte-1bwjmdb"),C(t,"style",o=`transform: translate(${e[2]}px, ${e[3]}px);`)},m(e,n){f(e,t,n),g(t,i),g(i,s),g(s,l)},p(e,[n]){1&n&&P(l,e[0]),2&n&&A(i,"active",e[1]),12&n&&o!==(o=`transform: translate(${e[2]}px, ${e[3]}px);`)&&C(t,"style",o)},i:n,o:n,d(e){e&&w(t)}}}function di(e,t,i){let{content:n=""}=t,{active:s=!1}=t,{translateXPx:l=0}=t,{translateYPx:o=0}=t;return e.$$set=e=>{"content"in e&&i(0,n=e.content),"active"in e&&i(1,s=e.active),"translateXPx"in e&&i(2,l=e.translateXPx),"translateYPx"in e&&i(3,o=e.translateYPx)},[n,s,l,o]}class ui extends se{constructor(e){super(),ne(this,e,di,ci,r,{content:0,active:1,translateXPx:2,translateYPx:3},ri)}}function pi(e){let t,i,n,s,l,a,r;function c(t){e[23](t)}t=new ui({props:{content:e[7],active:e[6],translateXPx:e[8],translateYPx:-16}});let d={isDragging:e[5],isActiveLive:e[9],onPointerDown:e[16],ariaLabel:"Ползунок временной шкалы",ariaValueMin:0,ariaValueMax:e[0],ariaValueNow:Math.round(100*e[3]),ariaValueText:`${e[2]} (общая длительность ${e[1]})`,loadedProgress:e[10],filledProgress:e[3],handleProgress:e[3],onMouseEnter:e[19],onMouseMove:e[20],onMouseLeave:e[21]};return void 0!==e[4]&&(d.element=e[4]),n=new ft({props:d}),j.push((()=>J(n,"element",c))),{c(){Z(t.$$.fragment),i=$(),Z(n.$$.fragment)},m(s,o){ee(t,s,o),f(s,i,o),ee(n,s,o),l=!0,a||(r=[k(window,"pointermove",e[17]),k(window,"pointerup",e[18])],a=!0)},p(e,[i]){const l={};128&i&&(l.content=e[7]),64&i&&(l.active=e[6]),256&i&&(l.translateXPx=e[8]),t.$set(l);const o={};32&i&&(o.isDragging=e[5]),512&i&&(o.isActiveLive=e[9]),1&i&&(o.ariaValueMax=e[0]),8&i&&(o.ariaValueNow=Math.round(100*e[3])),6&i&&(o.ariaValueText=`${e[2]} (общая длительность ${e[1]})`),1024&i&&(o.loadedProgress=e[10]),8&i&&(o.filledProgress=e[3]),8&i&&(o.handleProgress=e[3]),!s&&16&i&&(s=!0,o.element=e[4],H((()=>s=!1))),n.$set(o)},i(e){l||(X(t.$$.fragment,e),X(n.$$.fragment,e),l=!0)},o(e){Y(t.$$.fragment,e),Y(n.$$.fragment,e),l=!1},d(e){te(t,e),e&&w(i),te(n,e),a=!1,o(r)}}}function vi(e,i,n){let s,l,o,a,r;const c=Ke(),d=c.state.bufferedProgress$;h(e,d,(e=>n(10,r=e)));const u=c.state.positionWithScrubbing$;h(e,u,(e=>n(22,o=e)));const p=c.state.duration$;h(e,p,(e=>n(0,l=e)));const v=c.state.isLive$;h(e,v,(e=>n(25,s=e)));const g=c.state.isActiveLive$;let m,f,w,b,y;h(e,g,(e=>n(9,a=e)));let x=!1,$=!1,k="",V=0;function C(e){return t.isNullable(y)?w:Math.min(Math.max(e-y.x,0),y.width)/y.width}function P(e){var i;n(8,(i=e,V=t.isNullable(y)?0:Math.min(Math.max(i-y.x,0),y.width))),n(7,k=function(e){if(t.isNullable(y))return"";let i=C(e);const n=ct((s?1-i:i)*l);return s?`-${n}`:n}(e))}return e.$$.update=()=>{1&e.$$.dirty&&n(1,m=ct(l)),4194304&e.$$.dirty&&n(2,f=ct(o)),4194305&e.$$.dirty&&n(3,w=o/l)},[l,m,f,w,b,x,$,k,V,a,r,d,u,p,v,g,function(e){e.preventDefault(),x||(n(5,x=!0),y=null==b?void 0:b.getBoundingClientRect(),c.actions.internal.startScrubbing(C(e.clientX)),P(e.clientX))},function(e){x&&(c.actions.internal.progressScrubbing(C(e.clientX)),P(e.clientX))},function(e){x&&(n(5,x=!1),c.actions.internal.completeScrubbing(C(e.clientX)))},function(e){y=null==b?void 0:b.getBoundingClientRect(),P(e.clientX),n(6,$=!0)},function(e){P(e.clientX)},function(){n(6,$=!1)},o,function(e){b=e,n(4,b)}]}class hi extends se{constructor(e){super(),ne(this,e,vi,pi,r,{})}}function gi(e){let t,i;return t=new ft({props:{ariaValueMin:0,ariaValueMax:e[0],ariaValueNow:Math.round(100*e[3]),ariaValueText:`${e[2]} (общая длительность ${e[1]})`,filledProgress:e[3],isAds:!0}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,[i]){const n={};1&i&&(n.ariaValueMax=e[0]),8&i&&(n.ariaValueNow=Math.round(100*e[3])),6&i&&(n.ariaValueText=`${e[2]} (общая длительность ${e[1]})`),8&i&&(n.filledProgress=e[3]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function mi(e,t,i){let n,s,l,{position:o=0}=t,{duration:a=0}=t;return e.$$set=e=>{"position"in e&&i(4,o=e.position),"duration"in e&&i(0,a=e.duration)},e.$$.update=()=>{1&e.$$.dirty&&i(1,n=ct(a)),16&e.$$.dirty&&i(2,s=ct(o)),17&e.$$.dirty&&i(3,l=o/a)},[a,n,s,l,o]}class fi extends se{constructor(e){super(),ne(this,e,mi,gi,r,{position:4,duration:0})}}function wi(e){m(e,"svelte-1w6u5wr",".wrapper.svelte-1w6u5wr.svelte-1w6u5wr{position:absolute;width:100%;bottom:0;left:0;height:var(--videoplayer-controls-height)}.controls.svelte-1w6u5wr.svelte-1w6u5wr{display:flex;align-items:center;height:100%;width:100%;white-space:nowrap;font-size:13px;transition:transform var(--videoplayer-controls-transition-duration)\n var(--videoplayer-controls-transition-fn);will-change:transform}.hidden.svelte-1w6u5wr.svelte-1w6u5wr{visibility:hidden;opacity:0}.controls-hidden.svelte-1w6u5wr.svelte-1w6u5wr{visibility:visible;transform:translateY(100%)}.wrapper-fullscreen.svelte-1w6u5wr .controls.svelte-1w6u5wr{--videoplayer-controls-height:50px;font-size:16px}.wrapper-fullscreen.svelte-1w6u5wr .ui-time{padding-left:20px;padding-right:15px}.wrapper-fullscreen.svelte-1w6u5wr .controls-play-button{padding-left:20px;padding-right:11px}.wrapper.width380.svelte-1w6u5wr .ui-settings,.wrapper.width380.svelte-1w6u5wr .ui-chromecast,.wrapper.width380.svelte-1w6u5wr .ui-time-duration{display:none !important}.wrapper.width450.svelte-1w6u5wr .ui-chromecast,.wrapper.width450.svelte-1w6u5wr .ui-time-duration{display:none !important}.wrapper.width550.svelte-1w6u5wr .ui-time-duration{display:none !important}.timeline.svelte-1w6u5wr.svelte-1w6u5wr{display:flex;align-items:center;width:100%;margin:0 8px;min-width:86px}.timeline-stub.svelte-1w6u5wr.svelte-1w6u5wr{width:100%}")}function bi(e){let t,i;return t=new _t({}),t.$on("click",(function(){a(e[7])&&e[7].apply(this,arguments)})),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(t,i){e=t},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function yi(e){let t,i;return t=new ai({props:{isActiveLive:e[19]}}),t.$on("click",e[41]),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};524288&i[0]&&(n.isActiveLive=e[19]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function xi(e){let t;return{c(){t=b("div"),C(t,"class","timeline-stub svelte-1w6u5wr")},m(e,i){f(e,t,i)},p:n,i:n,o:n,d(e){e&&w(t)}}}function $i(e){let t,i,n,s;const l=[Vi,ki],o=[];function a(e,t){return e[3]?0:1}return i=a(e),n=o[i]=l[i](e),{c(){t=b("div"),n.c(),C(t,"class","timeline svelte-1w6u5wr")},m(e,n){f(e,t,n),o[i].m(t,null),s=!0},p(e,s){let r=i;i=a(e),i===r?o[i].p(e,s):(W(),Y(o[r],1,1,(()=>{o[r]=null})),K(),n=o[i],n?n.p(e,s):(n=o[i]=l[i](e),n.c()),X(n,1),n.m(t,null))},i(e){s||(X(n),s=!0)},o(e){Y(n),s=!1},d(e){e&&w(t),o[i].d()}}}function ki(e){let t,i;return t=new hi({}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p:n,i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Vi(e){let t,i;return t=new fi({props:{position:e[20],duration:e[21]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};1048576&i[0]&&(n.position=e[20]),2097152&i[0]&&(n.duration=e[21]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Ci(e){let t,i;return t=new vt({props:{className:"ui-time",durationClassName:"ui-time-duration",position:e[3]?e[20]:e[22],duration:e[3]?e[21]:e[23]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};5242888&i[0]&&(n.position=e[3]?e[20]:e[22]),10485768&i[0]&&(n.duration=e[3]?e[21]:e[23]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Pi(e){let t,i;return t=new rt({props:{className:"ui-settings"}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Si(e){let t,i,n,s,l,o,r,c,d,u,p,v,h,m,y,x,k,V,P,S;n=new Rt({props:{className:"controls-play-button",playbackState:e[16],adPlaybackState:e[17],isAds:e[3],handlePlayClick:e[26],repeatPlaylist:e[8],isEnded:e[18],isOneVideoPlaylist:e[6]}});let M=e[5]&&!e[3]&&bi(e),N=!e[3]&&e[10]&&yi(e);const z=[$i,xi],T=[];function L(e,t){return e[13]?0:1}r=L(e),c=T[r]=z[r](e);let j=e[14]&&Ci(e);p=new $t({props:{isVerticalVolume:e[12]}}),p.$on("click",e[25]);let E=!e[24]&&!e[3]&&Pi();return m=new At({}),m.$on("click",(function(){a(e[9])&&e[9].apply(this,arguments)})),x=new ni({props:{className:"ui-chromecast"}}),x.$on("click",e[40]),V=new Xt({props:{logoClickable:e[4]}}),V.$on("click",e[27]),{c(){t=b("div"),i=b("div"),Z(n.$$.fragment),s=$(),M&&M.c(),l=$(),N&&N.c(),o=$(),c.c(),d=$(),j&&j.c(),u=$(),Z(p.$$.fragment),v=$(),E&&E.c(),h=$(),Z(m.$$.fragment),y=$(),Z(x.$$.fragment),k=$(),Z(V.$$.fragment),C(i,"class","controls svelte-1w6u5wr"),A(i,"controls-hidden",!e[2]),C(t,"class",P="wrapper "+e[11]+" svelte-1w6u5wr"),A(t,"hidden",e[1]),A(t,"wrapper-fullscreen",e[15])},m(a,c){f(a,t,c),g(t,i),ee(n,i,null),g(i,s),M&&M.m(i,null),g(i,l),N&&N.m(i,null),g(i,o),T[r].m(i,null),g(i,d),j&&j.m(i,null),g(i,u),ee(p,i,null),g(i,v),E&&E.m(i,null),g(i,h),ee(m,i,null),g(i,y),ee(x,i,null),g(i,k),ee(V,i,null),e[44](t),S=!0},p(s,a){e=s;const v={};65536&a[0]&&(v.playbackState=e[16]),131072&a[0]&&(v.adPlaybackState=e[17]),8&a[0]&&(v.isAds=e[3]),256&a[0]&&(v.repeatPlaylist=e[8]),262144&a[0]&&(v.isEnded=e[18]),64&a[0]&&(v.isOneVideoPlaylist=e[6]),n.$set(v),e[5]&&!e[3]?M?(M.p(e,a),40&a[0]&&X(M,1)):(M=bi(e),M.c(),X(M,1),M.m(i,l)):M&&(W(),Y(M,1,1,(()=>{M=null})),K()),!e[3]&&e[10]?N?(N.p(e,a),1032&a[0]&&X(N,1)):(N=yi(e),N.c(),X(N,1),N.m(i,o)):N&&(W(),Y(N,1,1,(()=>{N=null})),K());let g=r;r=L(e),r===g?T[r].p(e,a):(W(),Y(T[g],1,1,(()=>{T[g]=null})),K(),c=T[r],c?c.p(e,a):(c=T[r]=z[r](e),c.c()),X(c,1),c.m(i,d)),e[14]?j?(j.p(e,a),16384&a[0]&&X(j,1)):(j=Ci(e),j.c(),X(j,1),j.m(i,u)):j&&(W(),Y(j,1,1,(()=>{j=null})),K());const m={};4096&a[0]&&(m.isVerticalVolume=e[12]),p.$set(m),e[24]||e[3]?E&&(W(),Y(E,1,1,(()=>{E=null})),K()):E?16777224&a[0]&&X(E,1):(E=Pi(),E.c(),X(E,1),E.m(i,h));const f={};16&a[0]&&(f.logoClickable=e[4]),V.$set(f),4&a[0]&&A(i,"controls-hidden",!e[2]),(!S||2048&a[0]&&P!==(P="wrapper "+e[11]+" svelte-1w6u5wr"))&&C(t,"class",P),2050&a[0]&&A(t,"hidden",e[1]),34816&a[0]&&A(t,"wrapper-fullscreen",e[15])},i(e){S||(X(n.$$.fragment,e),X(M),X(N),X(c),X(j),X(p.$$.fragment,e),X(E),X(m.$$.fragment,e),X(x.$$.fragment,e),X(V.$$.fragment,e),S=!0)},o(e){Y(n.$$.fragment,e),Y(M),Y(N),Y(c),Y(j),Y(p.$$.fragment,e),Y(E),Y(m.$$.fragment,e),Y(x.$$.fragment,e),Y(V.$$.fragment,e),S=!1},d(i){i&&w(t),te(n),M&&M.d(),N&&N.d(),T[r].d(),j&&j.d(),te(p),E&&E.d(),te(m),te(x),te(V),e[44](null)}}}function Ai(e,t,i){let n,s,l,o,a,r,c,d,u,p,v,g,{hidden:m}=t,{showControls:f}=t,{controlsElementRef:w}=t,{isAds:b=!1}=t,{canRewindLive:y}=t,{logoClickable:x}=t,{showNextVideoButton:$}=t,{isOneVideoPlaylist:k=!1}=t,{playNextVideo:V}=t,{repeatPlaylist:C}=t,{toggleFullscreen:P}=t;const S=Ke(),A=S.actions.internal.toggleMuted,M=S.actions.internal.togglePlay,N=S.actions.internal.pause,z=S.state.duration$;h(e,z,(e=>i(23,v=e)));const T=S.state.positionWithScrubbing$;h(e,T,(e=>i(22,p=e)));const L=S.state.playbackState$;h(e,L,(e=>i(16,o=e)));const E=S.state.chromecastConnected$;h(e,E,(e=>i(24,g=e)));const I=S.state.isEnded$;h(e,I,(e=>i(18,r=e)));const F=S.state.isLive$;h(e,F,(e=>i(10,n=e)));const R=S.state.isActiveLive$;h(e,R,(e=>i(19,c=e)));const B=S.ads.duration;h(e,B,(e=>i(21,u=e)));const H=S.ads.position;h(e,H,(e=>i(20,d=e)));const Q=S.ads.playbackState;h(e,Q,(e=>i(17,a=e)));const _=S.ui.isFullscreen;h(e,_,(e=>i(15,l=e)));const O=S.ui.playerSize;h(e,O,(e=>i(43,s=e)));let D,U,q,W;return e.$$set=e=>{"hidden"in e&&i(1,m=e.hidden),"showControls"in e&&i(2,f=e.showControls),"controlsElementRef"in e&&i(0,w=e.controlsElementRef),"isAds"in e&&i(3,b=e.isAds),"canRewindLive"in e&&i(42,y=e.canRewindLive),"logoClickable"in e&&i(4,x=e.logoClickable),"showNextVideoButton"in e&&i(5,$=e.showNextVideoButton),"isOneVideoPlaylist"in e&&i(6,k=e.isOneVideoPlaylist),"playNextVideo"in e&&i(7,V=e.playNextVideo),"repeatPlaylist"in e&&i(8,C=e.repeatPlaylist),"toggleFullscreen"in e&&i(9,P=e.toggleFullscreen)},e.$$.update=()=>{var t;4096&e.$$.dirty[1]&&i(11,(t=s.width,D=t<380?"width380":t<450?"width450":t<550?"width550":"")),4096&e.$$.dirty[1]&&i(12,U=s.width<550),1032&e.$$.dirty[0]|2048&e.$$.dirty[1]&&i(13,q=!n||n&&y||b),1032&e.$$.dirty[0]&&i(14,W=!n||b)},[w,m,f,b,x,$,k,V,C,P,n,D,U,q,W,l,o,a,r,c,d,u,p,v,g,A,M,N,z,T,L,E,I,F,R,B,H,Q,_,O,()=>S.actions.internal.toggleChromecast(),()=>S.actions.internal.switchToActiveLive(),y,s,function(e){j[e?"unshift":"push"]((()=>{w=e,i(0,w)}))}]}class Mi extends se{constructor(e){super(),ne(this,e,Ai,Si,r,{hidden:1,showControls:2,controlsElementRef:0,isAds:3,canRewindLive:42,logoClickable:4,showNextVideoButton:5,isOneVideoPlaylist:6,playNextVideo:7,repeatPlaylist:8,toggleFullscreen:9},wi,[-1,-1])}}function Ni(e){m(e,"svelte-y9pij4",".container.svelte-y9pij4.svelte-y9pij4{position:absolute;top:0;bottom:0;left:0;right:0;background-position:center;background-size:cover;cursor:pointer;transition:opacity 0.2s, visibility 0.2s;will-change:opacity}.container.hidden.svelte-y9pij4.svelte-y9pij4{opacity:0;visibility:hidden}.playButton.svelte-y9pij4.svelte-y9pij4{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;width:var(--videoplayer-big-play-size);height:var(--videoplayer-big-play-size);display:flex;align-items:center;justify-content:center}.playButtonBackground.svelte-y9pij4.svelte-y9pij4{position:absolute;top:0;bottom:0;left:0;right:0;border-radius:var(--videoplayer-big-play-radius);background-color:var(--videoplayer-big-play-bg-color);transition:background 0.2s, transform 0.2s;transition-timing-function:ease-out;will-change:background, transform}.container.svelte-y9pij4:hover .playButtonBackground.svelte-y9pij4{background-color:var(--videoplayer-big-play-hover-bg-color);transform:scale(1.15)}.playButtonIcon.svelte-y9pij4.svelte-y9pij4{position:relative;width:48px;height:48px}")}function zi(e){let t,i,s,l,o,r,c,d,p;return{c(){t=b("div"),i=b("div"),s=b("div"),l=$(),o=b("img"),C(s,"class","playButtonBackground svelte-y9pij4"),u(o.src,r="data:image/svg+xml,%3csvg width='40' height='40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 10.023a1.5 1.5 0 0 1 2.267-1.29L31.023 18.7a1.5 1.5 0 0 1 .001 2.578l-16.756 9.987A1.5 1.5 0 0 1 12 29.976V10.023z' fill='white'/%3e%3c/svg%3e")||C(o,"src","data:image/svg+xml,%3csvg width='40' height='40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 10.023a1.5 1.5 0 0 1 2.267-1.29L31.023 18.7a1.5 1.5 0 0 1 .001 2.578l-16.756 9.987A1.5 1.5 0 0 1 12 29.976V10.023z' fill='white'/%3e%3c/svg%3e"),C(o,"class","playButtonIcon svelte-y9pij4"),C(o,"alt",""),C(i,"class","playButton svelte-y9pij4"),C(t,"class","container svelte-y9pij4"),C(t,"style",c=`background-image: url('${e[0]}')`),A(t,"hidden",e[1])},m(n,r){f(n,t,r),g(t,i),g(i,s),g(i,l),g(i,o),d||(p=k(t,"click",(function(){a(e[2])&&e[2].apply(this,arguments)})),d=!0)},p(i,[n]){e=i,1&n&&c!==(c=`background-image: url('${e[0]}')`)&&C(t,"style",c),2&n&&A(t,"hidden",e[1])},i:n,o:n,d(e){e&&w(t),d=!1,p()}}}function Ti(e,t,i){let{thumbUrl:n}=t,{hidden:s}=t,{startVideo:l}=t;return e.$$set=e=>{"thumbUrl"in e&&i(0,n=e.thumbUrl),"hidden"in e&&i(1,s=e.hidden),"startVideo"in e&&i(2,l=e.startVideo)},[n,s,l]}class Li extends se{constructor(e){super(),ne(this,e,Ti,zi,r,{thumbUrl:0,hidden:1,startVideo:2},Ni)}}function ji(e){m(e,"svelte-8nkw5s",".container.svelte-8nkw5s.svelte-8nkw5s{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;display:flex}.dot.svelte-8nkw5s.svelte-8nkw5s:nth-child(1){animation-delay:calc(0 * 180ms)}.dot.svelte-8nkw5s.svelte-8nkw5s:nth-child(2){animation-delay:calc(1 * 180ms)}.dot.svelte-8nkw5s.svelte-8nkw5s:nth-child(3){animation-delay:calc(2 * 180ms)}@keyframes svelte-8nkw5s-dot_animation{0%{opacity:0.2}30%{opacity:1}100%{opacity:0.2}}.dot.svelte-8nkw5s.svelte-8nkw5s{border-radius:4px;width:8px;height:8px;background:var(--white);animation-duration:750ms;animation-name:svelte-8nkw5s-dot_animation;animation-iteration-count:infinite}.dot.svelte-8nkw5s+.dot.svelte-8nkw5s{margin-left:4px}")}function Ei(e){let t;return{c(){t=b("div"),t.innerHTML='<div class="dot svelte-8nkw5s"></div> \n <div class="dot svelte-8nkw5s"></div> \n <div class="dot svelte-8nkw5s"></div>',C(t,"class","container svelte-8nkw5s")},m(e,i){f(e,t,i)},p:n,i:n,o:n,d(e){e&&w(t)}}}class Ii extends se{constructor(e){super(),ne(this,e,null,Ei,r,{},ji)}}function Fi(e){const t=Ke();return z((()=>{t.getAdmanWrapper().startPostroll()})),[]}class Ri extends se{constructor(e){super(),ne(this,e,Fi,null,r,{})}}function Bi(e){m(e,"svelte-3vdrx8",".container.svelte-3vdrx8{position:absolute;top:14px;left:16px;padding:4px 8px;font-size:13px;color:var(--white);background:rgba(0, 0, 0, 0.35);border-radius:4px}")}function Hi(e){let t,i,s;return{c(){t=b("div"),i=x("Реклама "),s=x(e[0]),C(t,"class","container svelte-3vdrx8")},m(e,n){f(e,t,n),g(t,i),g(t,s)},p(e,[t]){1&t&&P(s,e[0])},i:n,o:n,d(e){e&&w(t)}}}function Qi(e,t,i){let n,{position:s=0}=t,{duration:l=0}=t;return e.$$set=e=>{"position"in e&&i(1,s=e.position),"duration"in e&&i(2,l=e.duration)},e.$$.update=()=>{6&e.$$.dirty&&i(0,n=ct(l-s))},[n,s,l]}class _i extends se{constructor(e){super(),ne(this,e,Qi,Hi,r,{position:1,duration:2},Bi)}}function Oi(e){m(e,"svelte-1gfemsb",".container.svelte-1gfemsb.svelte-1gfemsb{position:absolute;top:14px;right:16px;padding:4px 8px;font-size:13px;color:#bbb;background:rgba(0, 0, 0, 0.35);border-radius:4px;transition:color .2s}.icon.svelte-1gfemsb.svelte-1gfemsb{margin-left:4px;position:relative;top:2px;fill:var(--white);transition:fill .2s}.skippable.svelte-1gfemsb.svelte-1gfemsb{cursor:pointer;color:var(--white)}.skippable.svelte-1gfemsb.svelte-1gfemsb:hover{color:rgba(255, 255, 255, .75)}.skippable.svelte-1gfemsb:hover .icon.svelte-1gfemsb{fill:rgba(255, 255, 255, .75)}")}function Di(e){let t,i,n,s=Math.ceil(e[1]-e[0])+"";return{c(){t=x("Пропустить рекламу через "),i=x(s),n=x(" с")},m(e,s){f(e,t,s),f(e,i,s),f(e,n,s)},p(e,t){3&t&&s!==(s=Math.ceil(e[1]-e[0])+"")&&P(i,s)},d(e){e&&w(t),e&&w(i),e&&w(n)}}}function Ui(e){let t,i,n;return{c(){t=b("div"),t.innerHTML='Пропустить рекламу\n <svg class="icon svelte-1gfemsb" width="7" height="12" viewBox="0 0 7 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.263627 0.263605C-0.0878444 0.615078 -0.0878429 1.18493 0.26363 1.5364L4.72723 5.99998L0.263627 10.4636C-0.0878444 10.8151 -0.0878429 11.3849 0.26363 11.7364C0.615103 12.0879 1.18495 12.0879 1.53642 11.7364L6.63642 6.63637C6.98789 6.2849 6.98789 5.71505 6.63642 5.36358L1.53642 0.263602C1.18495 -0.0878686 0.615098 -0.0878673 0.263627 0.263605Z"></path></svg>'},m(s,l){f(s,t,l),i||(n=k(t,"click",(function(){a(e[2])&&e[2].apply(this,arguments)})),i=!0)},p(t,i){e=t},d(e){e&&w(t),i=!1,n()}}}function qi(e){let t;function i(e,t){return e[3]?Ui:Di}let s=i(e),l=s(e);return{c(){t=b("div"),l.c(),C(t,"class","container svelte-1gfemsb"),A(t,"skippable",e[3])},m(e,i){f(e,t,i),l.m(t,null)},p(e,[n]){s===(s=i(e))&&l?l.p(e,n):(l.d(1),l=s(e),l&&(l.c(),l.m(t,null))),8&n&&A(t,"skippable",e[3])},i:n,o:n,d(e){e&&w(t),l.d()}}}function Wi(e,t,i){let s,{position:l=0}=t,{secondsToWatchBeforeSkip:o=0}=t,{skipAd:a=n}=t;return e.$$set=e=>{"position"in e&&i(0,l=e.position),"secondsToWatchBeforeSkip"in e&&i(1,o=e.secondsToWatchBeforeSkip),"skipAd"in e&&i(2,a=e.skipAd)},e.$$.update=()=>{3&e.$$.dirty&&i(3,s=l>0&&l>=o)},[l,o,a,s]}class Ki extends se{constructor(e){super(),ne(this,e,Wi,qi,r,{position:0,secondsToWatchBeforeSkip:1,skipAd:2},Oi)}}function Xi(e){m(e,"svelte-12w2063",".container.svelte-12w2063{width:100%;height:100%}")}function Yi(e){let t,i;return t=new _i({props:{position:e[4],duration:e[5]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};16&i&&(n.position=e[4]),32&i&&(n.duration=e[5]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Gi(e){let t,i;return t=new Ki({props:{position:e[4],secondsToWatchBeforeSkip:e[6],skipAd:e[8].actions.internal.skipAd}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};16&i&&(n.position=e[4]),64&i&&(n.secondsToWatchBeforeSkip=e[6]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Ji(e){let t,i;return t=new Ri({}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Zi(e){let t,i,n,s,l,o,a=e[2]&&Yi(e),r=e[3]&&Gi(e),c=e[7]&&Ji();return{c(){t=b("div"),i=b("video"),n=$(),a&&a.c(),s=$(),r&&r.c(),l=$(),c&&c.c(),S(i,"width","100%"),S(i,"height","100%"),C(t,"class","container svelte-12w2063")},m(d,u){f(d,t,u),g(t,i),e[18](i),g(t,n),a&&a.m(t,null),g(t,s),r&&r.m(t,null),g(t,l),c&&c.m(t,null),e[19](t),o=!0},p(e,[i]){e[2]?a?(a.p(e,i),4&i&&X(a,1)):(a=Yi(e),a.c(),X(a,1),a.m(t,s)):a&&(W(),Y(a,1,1,(()=>{a=null})),K()),e[3]?r?(r.p(e,i),8&i&&X(r,1)):(r=Gi(e),r.c(),X(r,1),r.m(t,l)):r&&(W(),Y(r,1,1,(()=>{r=null})),K()),e[7]?c?128&i&&X(c,1):(c=Ji(),c.c(),X(c,1),c.m(t,null)):c&&(W(),Y(c,1,1,(()=>{c=null})),K())},i(e){o||(X(a),X(r),X(c),o=!0)},o(e){Y(a),Y(r),Y(c),o=!1},d(i){i&&w(t),e[18](null),a&&a.d(),r&&r.d(),c&&c.d(),e[19](null)}}}function en(e,t,i){let n,s,l,o,a,{adsSlotId:r}=t,{adsPreviewParam:c}=t,{duration:d=0}=t;const u=Ke(),p=u.state.isEnded$;let g,m;h(e,p,(e=>i(7,a=e)));let f=!1;const w=u.ads.playbackState;h(e,w,(e=>i(17,n=e)));const b=u.ads.canSkip,y=u.ads.duration;h(e,y,(e=>i(5,l=e)));const x=u.ads.position;h(e,x,(e=>i(4,s=e)));const $=u.ads.secondsToWatchBeforeSkip;let k,V;return h(e,$,(e=>i(6,o=e))),z((()=>{const e=new AbortController;const t=u.getAdmanWrapper();if(!r)return void t.onAdmanLoadingError();const{width:i,height:n}=v(u.ui.playerSize),s={width:i,height:n,isFullscreen:v(u.ui.isFullscreen),isAutoplay:v(u.ui.isAutoplay),adsContainer:g,adsVideoElement:m,slotId:r,previewParam:c,duration:d};return window.AdmanHTML?(t.initAdman(s),f=!0):t.loadAdman(e.signal).then((()=>{t.initAdman(s),f=!0})).catch((()=>{t.onAdmanLoadingError()})),()=>{!f&&e.abort()}})),e.$$set=e=>{"adsSlotId"in e&&i(14,r=e.adsSlotId),"adsPreviewParam"in e&&i(15,c=e.adsPreviewParam),"duration"in e&&i(16,d=e.duration)},e.$$.update=()=>{131072&e.$$.dirty&&i(2,k=n!==Tt.INACTIVE),131072&e.$$.dirty&&i(3,V=b&&n!==Tt.INACTIVE)},[g,m,k,V,s,l,o,a,u,p,w,y,x,$,r,c,d,n,function(e){j[e?"unshift":"push"]((()=>{m=e,i(1,m)}))},function(e){j[e?"unshift":"push"]((()=>{g=e,i(0,g)}))}]}class tn extends se{constructor(e){super(),ne(this,e,en,Zi,r,{adsSlotId:14,adsPreviewParam:15,duration:16},Xi)}}function nn(e){m(e,"svelte-p5rs9b","ul.svelte-p5rs9b{position:absolute;border-radius:3px;background:rgba(0, 0, 0, 0.88);overflow:hidden;transition:visibility .1s,opacity .1s;font-size:13px;list-style:none;margin:0;padding:0}.hidden.svelte-p5rs9b{visibility:hidden;opacity:0}li.svelte-p5rs9b{padding:8px 20px;cursor:pointer;position:relative;display:block;color:rgba(255, 255, 255, 0.72);font-size:13px;white-space:nowrap}li.svelte-p5rs9b:hover{background:rgba(66, 66, 66, .5);color:var(--white)}")}function sn(e){let t,i,s,l,a,r;return{c(){t=b("ul"),i=b("li"),i.textContent="Сообщить о проблеме",s=$(),l=b("li"),l.textContent="Копировать данные для диагностики",C(i,"class","svelte-p5rs9b"),C(l,"class","svelte-p5rs9b"),S(t,"top",e[1]+"px"),S(t,"left",e[0]+"px"),C(t,"class","svelte-p5rs9b"),A(t,"hidden",!e[2])},m(n,o){f(n,t,o),g(t,i),g(t,s),g(t,l),e[9](t),a||(r=[k(i,"click",e[4]),k(l,"click",e[5])],a=!0)},p(e,[i]){2&i&&S(t,"top",e[1]+"px"),1&i&&S(t,"left",e[0]+"px"),4&i&&A(t,"hidden",!e[2])},i:n,o:n,d(i){i&&w(t),e[9](null),a=!1,o(r)}}}function ln(e,t,i){let{visible:n=!1}=t,{supportLink:s}=t,{x:l=0}=t,{y:o=0}=t,{playerContainerRef:a}=t,{controlsContainerRef:r}=t;const c=Ke(),d=c.ui.contextMenuVisible;let u;return e.$$set=e=>{"visible"in e&&i(2,n=e.visible),"supportLink"in e&&i(6,s=e.supportLink),"x"in e&&i(0,l=e.x),"y"in e&&i(1,o=e.y),"playerContainerRef"in e&&i(7,a=e.playerContainerRef),"controlsContainerRef"in e&&i(8,r=e.controlsContainerRef)},e.$$.update=()=>{3&e.$$.dirty&&((e,t)=>{if(!u||!a||!r)return;const n=u.getBoundingClientRect(),s=a.getBoundingClientRect(),c=r.getBoundingClientRect();i(0,l=e-s.left),i(1,o=t-s.top),l+n.width>s.width&&i(0,l-=n.width),o+n.height>s.height-c.height&&i(1,o-=n.height)})(l,o)},[l,o,n,u,e=>{window.open(s,"_blank"),d.set(!1),c.actions.internal.pause(),e.stopPropagation()},e=>{(e=>{if(document.queryCommandSupported&&document.queryCommandSupported("copy")){const t=document.createElement("textarea");t.textContent=e,t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}})(c.actions.internal.getDebugData()),d.set(!1),e.stopPropagation()},s,a,r,function(e){j[e?"unshift":"push"]((()=>{u=e,i(3,u)}))}]}class on extends se{constructor(e){super(),ne(this,e,ln,sn,r,{visible:2,supportLink:6,x:0,y:1,playerContainerRef:7,controlsContainerRef:8},nn)}}function an(e){m(e,"svelte-1ome55p",".close.svelte-1ome55p{cursor:pointer;opacity:0.8;transition:opacity 0.2s;position:relative;width:16px;height:16px}.close.svelte-1ome55p:hover{opacity:1}.close.svelte-1ome55p:before,.close.svelte-1ome55p:after{position:absolute;left:8px;content:' ';height:16px;width:2px;background-color:var(--white)}.close.svelte-1ome55p:before{transform:rotate(45deg)}.close.svelte-1ome55p:after{transform:rotate(-45deg)}")}function rn(e){let t,i,s;return{c(){t=b("div"),C(t,"class","close svelte-1ome55p")},m(n,l){f(n,t,l),i||(s=k(t,"click",e[0]),i=!0)},p:n,i:n,o:n,d(e){e&&w(t),i=!1,s()}}}function cn(e){return[function(t){T.call(this,e,t)}]}class dn extends se{constructor(e){super(),ne(this,e,cn,rn,r,{},an)}}function un(e){m(e,"svelte-8jhsry",".timer.svelte-8jhsry{border-radius:50%;transition:background .2s;background:rgba(31, 31, 31, .65);width:50px;height:50px;display:flex;align-items:center;justify-content:space-around}.timer.svelte-8jhsry:hover{background:rgba(31, 31, 31, .85)\n }.timer-canvas.svelte-8jhsry{width:50px;height:50px;position:absolute}.timer-play-icon.svelte-8jhsry{width:22px;height:26px}")}function pn(e){let t,i,s,l,o,a,r;return{c(){t=b("div"),i=b("canvas"),s=$(),l=y("svg"),o=y("g"),a=y("g"),r=y("path"),C(i,"class","timer-canvas svelte-8jhsry"),C(i,"width","100"),C(i,"height","100"),C(r,"class","_play"),C(r,"d","m8.13340613 5.10548415 10.49681277 6.24354325c.3559987.2117494.472936.6720001.2611866 1.0279989-.0638111.1072809-.1533894.1969388-.2606135.2608453l-10.4968128 6.256187c-.35581027.2120659-.81616483.095538-1.02823068-.2602722-.06921066-.1161237-.10574852-.2487949-.10574852-.3839792v-12.49973035c0-.41421357.33578644-.75.75-.75.13495801 0 .26741554.03641567.38340613.1054073z"),C(r,"fill","#fff"),C(a,"fill-rule","nonzero"),C(o,"fill","none"),C(o,"fill-rule","evenodd"),C(l,"class","timer-play-icon svelte-8jhsry"),C(l,"viewBox","0 0 24 24"),C(l,"xmlns","http://www.w3.org/2000/svg"),C(t,"class","timer svelte-8jhsry")},m(n,c){f(n,t,c),g(t,i),e[2](i),g(t,s),g(t,l),g(l,o),g(o,a),g(a,r)},p:n,i:n,o:n,d(i){i&&w(t),e[2](null)}}}function vn(e,t,i){let s,{onTimerEnded:l=n}=t;return z((()=>{let e;const t=s.getContext("2d");if(!t)return;t.lineWidth=6,t.lineCap="round",t.strokeStyle="#fff";const i=Date.now(),n=()=>{const s=(Date.now()-i)/5e3;s<1?(t.clearRect(0,0,100,100),t.beginPath(),t.arc(50,50,47,-Math.PI/2,-Math.PI/2+2*Math.PI*s),t.stroke(),e=requestAnimationFrame(n)):l()};return e=requestAnimationFrame(n),()=>{cancelAnimationFrame(e)}})),e.$$set=e=>{"onTimerEnded"in e&&i(1,l=e.onTimerEnded)},[s,l,function(e){j[e?"unshift":"push"]((()=>{s=e,i(0,s)}))}]}class hn extends se{constructor(e){super(),ne(this,e,vn,pn,r,{onTimerEnded:1},un)}}function gn(e){m(e,"svelte-kisfwc",".overlay.svelte-kisfwc{width:100%;height:100%;background:rgba(0, 0, 0, 0.72);position:absolute}.next-video.svelte-kisfwc{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;width:362px;flex-direction:column}.top.svelte-kisfwc{display:flex;justify-content:space-between}.caption.svelte-kisfwc{font-size:11px;font-weight:bold;color:var(--white);text-transform:uppercase;opacity:0.8}.row.svelte-kisfwc{height:102px;background:rgba(48, 48, 48, .8);cursor:pointer;margin-top:6px;display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.column.svelte-kisfwc{display:flex;flex-direction:column;flex-basis:50%}.thumb.svelte-kisfwc{width:100%;height:100%;background:no-repeat center;background-size:cover;display:flex;align-items:center;position:relative;justify-content:space-around}.thumb-overlay.svelte-kisfwc{width:100%;height:100%;background:var(--black);opacity:0.3;position:absolute}.title.svelte-kisfwc{padding:10px 16px;font-size:12px;font-weight:bold;color:var(--white);line-height:1.6;max-height:52px;overflow:hidden}")}function mn(e){let t,i;return t=new hn({props:{onTimerEnded:e[2]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};4&i&&(n.onTimerEnded=e[2]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function fn(e){let t,i,n,s,l,o,r,c,d,u,p,v,h,m,y,V,S,A,M,N,z;r=new dn({}),r.$on("click",e[4]);let T=e[3]&&mn(e);return{c(){t=b("div"),i=$(),n=b("div"),s=b("div"),l=b("div"),l.textContent="следующее видео",o=$(),Z(r.$$.fragment),c=$(),d=b("div"),u=b("div"),p=b("div"),v=b("div"),h=$(),T&&T.c(),y=$(),V=b("div"),S=b("div"),A=x(e[0]),C(t,"class","overlay svelte-kisfwc"),C(l,"class","caption svelte-kisfwc"),C(s,"class","top svelte-kisfwc"),C(v,"class","thumb-overlay svelte-kisfwc"),C(p,"class","thumb svelte-kisfwc"),C(p,"style",m=`background-image: url('${e[1]}')`),C(u,"class","column svelte-kisfwc"),C(S,"class","title svelte-kisfwc"),C(V,"class","column svelte-kisfwc"),C(d,"class","row svelte-kisfwc"),C(n,"class","next-video svelte-kisfwc")},m(m,w){f(m,t,w),f(m,i,w),f(m,n,w),g(n,s),g(s,l),g(s,o),ee(r,s,null),g(n,c),g(n,d),g(d,u),g(u,p),g(p,v),g(p,h),T&&T.m(p,null),g(d,y),g(d,V),g(V,S),g(S,A),M=!0,N||(z=k(d,"click",(function(){a(e[2])&&e[2].apply(this,arguments)})),N=!0)},p(t,[i]){(e=t)[3]?T?(T.p(e,i),8&i&&X(T,1)):(T=mn(e),T.c(),X(T,1),T.m(p,null)):T&&(W(),Y(T,1,1,(()=>{T=null})),K()),(!M||2&i&&m!==(m=`background-image: url('${e[1]}')`))&&C(p,"style",m),(!M||1&i)&&P(A,e[0])},i(e){M||(X(r.$$.fragment,e),X(T),M=!0)},o(e){Y(r.$$.fragment,e),Y(T),M=!1},d(e){e&&w(t),e&&w(i),e&&w(n),te(r),T&&T.d(),N=!1,z()}}}function wn(e,t,i){let{title:n}=t,{thumb:s}=t,{playNextVideo:l}=t,o=!0;return e.$$set=e=>{"title"in e&&i(0,n=e.title),"thumb"in e&&i(1,s=e.thumb),"playNextVideo"in e&&i(2,l=e.playNextVideo)},[n,s,l,o,()=>i(3,o=!1)]}class bn extends se{constructor(e){super(),ne(this,e,wn,fn,r,{title:0,thumb:1,playNextVideo:2},gn)}}function yn(e){m(e,"svelte-1fmik5c",".title.svelte-1fmik5c{position:absolute;left:0;top:0;width:100%;font-size:15px;color:var(--white);box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition-property:visibility, transform, opacity;transition-duration:var(--videoplayer-controls-transition-duration);transition-timing-function:var(--videoplayer-controls-transition-fn);will-change:transform, opacity}.hidden.svelte-1fmik5c{visibility:hidden;transform:translateY(-44px);opacity:0}")}function xn(e){let t,i;return{c(){t=b("div"),i=x(e[0]),C(t,"class","title svelte-1fmik5c"),A(t,"hidden",e[1])},m(e,n){f(e,t,n),g(t,i)},p(e,[n]){1&n&&P(i,e[0]),2&n&&A(t,"hidden",e[1])},i:n,o:n,d(e){e&&w(t)}}}function $n(e,t,i){let{title:n=""}=t,{isHidden:s=!1}=t;return e.$$set=e=>{"title"in e&&i(0,n=e.title),"isHidden"in e&&i(1,s=e.isHidden)},[n,s]}class kn extends se{constructor(e){super(),ne(this,e,$n,xn,r,{title:0,isHidden:1},yn)}}function Vn(e){m(e,"svelte-1o62kpz",".wrapper.svelte-1o62kpz{height:100%;background-position:center;background-size:cover;display:flex;align-items:center;justify-content:center;font-size:16px;flex-direction:column}.icon_wrapper.svelte-1o62kpz{display:flex;flex-direction:column;align-items:center;width:400px}.icon.svelte-1o62kpz{width:50px;height:50px}.text.svelte-1o62kpz{margin-top:20px}")}function Cn(e){let t,i,n;return{c(){t=b("div"),i=x("Видео воспроизводится на "),n=x(e[1]),C(t,"class","text svelte-1o62kpz")},m(e,s){f(e,t,s),g(t,i),g(t,n)},p(e,t){2&t&&P(n,e[1])},d(e){e&&w(t)}}}function Pn(e){let t,i,s,l,o,a,r=e[1]&&Cn(e);return{c(){t=b("div"),i=b("div"),i.innerHTML='<svg class="icon svelte-1o62kpz" width="22" height="22" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" fill="#fff"></path><path d="M0 0h24v24H0z"></path></g></svg>',s=$(),r&&r.c(),C(i,"class","icon_wrapper svelte-1o62kpz"),C(t,"class","wrapper svelte-1o62kpz"),C(t,"style",l=`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e[0]}')`)},m(n,l){f(n,t,l),g(t,i),g(t,s),r&&r.m(t,null),o||(a=k(t,"click",e[2]),o=!0)},p(e,[i]){e[1]?r?r.p(e,i):(r=Cn(e),r.c(),r.m(t,null)):r&&(r.d(1),r=null),1&i&&l!==(l=`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e[0]}')`)&&C(t,"style",l)},i:n,o:n,d(e){e&&w(t),r&&r.d(),o=!1,a()}}}function Sn(e,t,i){let{thumbUrl:n}=t,{chromecastDeviceName:s}=t;return e.$$set=e=>{"thumbUrl"in e&&i(0,n=e.thumbUrl),"chromecastDeviceName"in e&&i(1,s=e.chromecastDeviceName)},[n,s,function(t){T.call(this,e,t)}]}class An extends se{constructor(e){super(),ne(this,e,Sn,Pn,r,{thumbUrl:0,chromecastDeviceName:1},Vn)}}function Mn(i,n,s){let l,o,a,r,c,{isAds:d}=n,{hideContextMenu:u}=n,{toggleFullscreen:p}=n;const v=Ke(),g=v.getLogger().createComponentLog("KeyboardControls component"),m=v.state.playbackState$;h(i,m,(e=>s(13,c=e)));const f=v.ads.playbackState;h(i,f,(e=>s(12,r=e)));const w=v.state.positionExact$;h(i,w,(e=>s(11,a=e)));const b=v.state.duration$;h(i,b,(e=>s(10,o=e)));const y=v.state.volume$;h(i,y,(e=>s(9,l=e)));return i.$$set=e=>{"isAds"in e&&s(5,d=e.isAds),"hideContextMenu"in e&&s(6,u=e.hideContextMenu),"toggleFullscreen"in e&&s(7,p=e.toggleFullscreen)},[m,f,w,b,y,d,u,p,i=>{u();const n=i.code;if(i.ctrlKey||i.altKey||i.metaKey)return;const s=c===e.PlaybackState.PLAYING||c===e.PlaybackState.PAUSED,h=d&&(r===Tt.PAUSED||r===Tt.PLAYING);if(s||h)switch(g({message:`key down, code: ${n}`}),n){case Ze.KeyJ:case Ze.ArrowLeft:{if(h)break;const e=Math.max(a-10,0);a>0&&v.actions.internal.seekTime(e);break}case Ze.KeyL:case Ze.ArrowRight:{if(h)break;const e=Math.min(a+10,o);a<o&&v.actions.internal.seekTime(e);break}case Ze.ArrowUp:{const e=Math.min(l+.05,1);l<1&&v.actions.internal.setVolume(e);break}case Ze.ArrowDown:{const e=Math.max(l-.05,0);l>0&&v.actions.internal.setVolume(e);break}case Ze.KeyK:case Ze.Space:v.actions.internal.togglePlay();break;case Ze.KeyM:v.actions.internal.toggleMuted();break;case Ze.KeyF:p();break;default:t.checkNever(n)}}]}class Nn extends se{constructor(e){super(),ne(this,e,Mn,null,r,{isAds:5,hideContextMenu:6,toggleFullscreen:7,keyDownHandler:8})}get keyDownHandler(){return this.$$.ctx[8]}}const zn={set:(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch(e){}},get:e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},remove(e){try{localStorage.removeItem(e)}catch(e){}}},Tn=e=>e>1?1:e<0?0:e,Ln=e=>zn.set("vk_player_preferred_volume",Tn(e)),jn=()=>{const e=parseFloat(zn.get("vk_player_preferred_volume"));return isNaN(e)?1:Tn(e)},En=e=>zn.set("vk_player_prefer_volume_mute",e),In=(e,t)=>e<400||t<225?5:e<640||t<360?0:e<960||t<540?1:e<1280||t<720?2:3;class Fn{constructor(e){this.adman=null,this.initialVolume=1,this.videoElement=null,this.currentAdSection=null,this.actions=null,this.adsState=null,this.events={slotRequested$:new t.Subject,started$:new t.Subject,paused$:new t.Subject,resumed$:new t.Subject,ended$:new t.Subject,skipped$:new t.Subject,clicked$:new t.Subject},this.loadAdman=e=>new Promise(((i,n)=>{let s;const l=()=>{clearTimeout(s),delete window.admanAsyncInit,window.AdmanHTML?i():n()};t.addScript("//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",e,2e3).then((()=>{window.AdmanHTML?i():(window.admanAsyncInit=l,s=window.setTimeout(l,2e3))})).catch((()=>{n()}))})),this.onAdsReady=()=>{this.log({message:"ads ready"}),this.startPreroll()},this.onAdStarted=(e,i)=>{t.assertNonNullable(this.adsState),t.assertNonNullable(this.actions),this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set(Tt.PLAYING),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay)},this.onAdTimeRemained=({currentTime:e})=>{t.assertNonNullable(this.adsState),this.adsState.position.set(e)},this.onAdPaused=()=>{t.assertNonNullable(this.adsState),this.log({message:"ad paused"}),this.adsState.playbackState.set(Tt.PAUSED)},this.onAdPlayed=()=>{t.assertNonNullable(this.adsState),this.log({message:"ad played"}),this.adsState.playbackState.set(Tt.PLAYING)},this.onAdMidrollPoint=()=>{t.assertNonNullable(this.adman),t.assertNonNullable(this.actions),this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection=zt.Midroll,this.adman.start(zt.Midroll)},this.onAdSkipped=()=>{this.log({message:"ad skipped"}),this.switchToVideo()},this.onAdClosed=()=>{this.log({message:"ad closed"}),this.switchToVideo()},this.onAdCompleted=()=>{this.log({message:"ad completed"}),this.events.ended$.next(),this.switchToVideo()},this.onAdClicked=()=>{var e;this.log({message:"ad clicked"}),null===(e=this.videoElement)||void 0===e||e.pause(),this.events.clicked$.next()},this.onAdError=()=>{this.log({message:"ad error"}),this.switchToVideo()},this.log=e.createComponentLog("AdmanWrapper")}init(e,t){this.actions=e,this.adsState=t}onAdmanLoadingError(){this.log({message:"adman loading error"}),this.switchToVideo(!0)}initAdman(e){const{width:t,height:i,isFullscreen:n,isAutoplay:s,adsContainer:l,adsVideoElement:o,slotId:a,duration:r,previewParam:c}=e,d={slot:a,wrapper:l,videoEl:o,videoQuality:i,params:{dl:encodeURIComponent(window.location.href),autoplay:s,player_width:t,player_height:i,puid10:In(t,i),puid11:n?0:1,preview:c,duration:r},browser:{mobile:!1}},u=new window.AdmanHTML;u.setDebug(!1),u.onReady(this.onAdsReady),u.onStarted(this.onAdStarted),u.onPlayed(this.onAdPlayed),u.onPaused(this.onAdPaused),u.adMidrollPoint(this.onAdMidrollPoint),u.onClosed(this.onAdClosed),u.onSkipped(this.onAdSkipped),u.onClicked(this.onAdClicked),u.onTimeRemained(this.onAdTimeRemained),u.onCompleted(this.onAdCompleted),u.onError(this.onAdError),u.init(d),this.adman=u,this.videoElement=o,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(d)}`})}switchToVideo(e=!1){if(null===this.currentAdSection&&!e)return void this.log({message:"switch to video, no currentAdSection. can't switch"});t.assertNonNullable(this.actions),t.assertNonNullable(this.adsState);const i=this.currentAdSection===zt.Postroll;this.adsState.playbackState.set(Tt.INACTIVE),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`}),i&&(this.adsState.postrollPassed.set(!0),this.log({message:"postroll passed"})),this.actions.switchFromAdsToVideo(!i)}togglePlay(){t.assertNonNullable(this.adsState),this.log({message:"toggle play"});const e=v(this.adsState.playbackState);e===Tt.PLAYING?this.pause():e===Tt.PAUSED&&this.play()}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){var t;this.log({message:`set volume ${e}`}),null===(t=this.adman)||void 0===t||t.setVolume(e),this.videoElement&&(this.videoElement.volume=e)}setFullscreen(e){var t;this.log({message:`set fullscreen ${e}`}),null===(t=this.adman)||void 0===t||t.setFullscreen(e)}startPreroll(){t.assertNonNullable(this.adman),this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection=zt.Preroll,this.adman.start(zt.Preroll)}startPostroll(){t.assertNonNullable(this.adman),t.assertNonNullable(this.actions),this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection=zt.Postroll,this.adman.start(zt.Postroll)}play(){t.assertNonNullable(this.adman),this.log({message:"ad play"}),this.adman.resume(),this.events.resumed$.next()}pause(){t.assertNonNullable(this.adman),this.log({message:"ad pause"}),this.adman.pause(),this.events.paused$.next()}skip(){t.assertNonNullable(this.adman),this.log({message:"ad skip"}),this.adman.skip(),this.events.skipped$.next()}setPosition(e,t){var i;null===(i=this.adman)||void 0===i||i.setPosition(Math.floor(e),Math.floor(t))}destroy(){var e;this.log({message:"destroy"}),null===(e=this.adman)||void 0===e||e.destroy()}}let Rn,Bn,Hn,Qn,_n,On;const Dn=({videoId:n,albumId:s,autoplay:l,statPlace:o,callbacks:a})=>{var r;Rn=new e.Player,_n=new t.Logger,On=_n.createComponentLog("Store"),On({message:"create store"}),Qn=new Fn(_n);const c=new i.OneStat({movieId:n,albumId:s,place:o,autoplay:l,quality:Xe(Rn.info.currentQuality$.getValue()),contentType:Ye(Rn.info.currentFormat$.getValue()),cdnHostname:Rn.info.hostname$.getValue()},{apiEnv:i.ApiEnv.PROD}),d=((n,s,l)=>(new t.Subscription).add(n.events.started$.subscribe((()=>{l.logStarted()}))).add(n.events.seeked$.subscribe((()=>{l.logSeek()}))).add(n.events.willPause$.subscribe((()=>{l.logPause({position:n.info.position$.getValue()})}))).add(n.events.willResume$.subscribe((()=>{l.logPlay()}))).add(n.events.managedError$.subscribe((({id:e})=>{l.logError({errorType:e})}))).add(n.events.fatalError$.subscribe((({id:e})=>{l.logError({errorType:e})}))).add(n.events.firstBytes$.subscribe((e=>{l.logFirstBytes({time:e})}))).add(n.events.firstFrame$.subscribe((e=>{l.logFirstFrame({time:e})}))).add(n.events.watchCoverageRecord$.subscribe((e=>{l.logWatchCoverageRecord(e)}))).add(n.events.watchCoverageLive$.subscribe((e=>{l.logWatchCoverageLive(e)}))).add(n.info.hostname$.subscribe((e=>{l.updateContext({cdnHostname:e})}))).add(n.info.currentQuality$.subscribe((e=>{l.updateContext({quality:Xe(e)})}))).add(n.info.currentFormat$.subscribe((e=>{l.updateContext({contentType:Ye(e)})}))).add(n.info.chromecastState$.subscribe((t=>{l.updateContext({destination:t===e.ChromecastState.CONNECTED?i.ScreenDestination.CHROMECAST:i.ScreenDestination.SCREEN})}))).add(s.slotRequested$.subscribe((()=>{l.logAdSlotRequest()}))).add(s.started$.subscribe((e=>{l.logAdStarted(e)}))).add(s.paused$.subscribe((()=>{l.logAdPaused()}))).add(s.resumed$.subscribe((()=>{l.logAdResumed()}))).add(s.ended$.subscribe((()=>{l.logAdEnded()}))).add(s.skipped$.subscribe((()=>{l.logAdSkipped()}))).add(s.clicked$.subscribe((()=>{l.logAdClicked()}))))(Rn,Qn.events,c),u=(new t.Subscription).add(Rn.experimental.element$.subscribe((e=>{e&&e.classList.add("player-media")}))).add(Rn.events.ended$.subscribe((()=>{var e;null===(e=a.onEnded)||void 0===e||e.call(a)}))).add(Rn.events.started$.subscribe((()=>{var e;null===(e=a.onStarted)||void 0===e||e.call(a)}))).add(Rn.events.willSeek$.subscribe((({from:e,to:t})=>{var i;null===(i=a.onSeek)||void 0===i||i.call(a,e,t)}))).add(Rn.info.position$.subscribe((e=>{var t;const i=Rn.info.duration$.getValue();null===(t=a.onTimeupdate)||void 0===t||t.call(a,i,e),Qn.setPosition(e,i)})));(null===(r=null===window||void 0===window?void 0:window.videoPlayerConfig)||void 0===r?void 0:r.debugLogs)&&u.add(Rn.events.log$.subscribe((e=>{console.log("%c sdk ","background:#9ddcf7;",`sdk component: ${e.component}`,e.message)}))).add(_n.log$.subscribe((e=>{console.log("%c ui ","background:#f3da0b;",`ui component: ${e.component}.`,e.message)})));const p=(new t.Subscription).add(Rn.events.startAttempt$.subscribe((e=>{var t;null===(t=a.onFirstStartAttempt)||void 0===t||t.call(a,e),p.unsubscribe()}))),h=Oe(Rn.info.position$.getValue(),(t=>{let i,n;const s=()=>{const l=Rn.info.playbackState$.getValue(),o=Rn.info.isLive$.getValue(),a=Rn.info.duration$.getValue(),r=Rn.info.position$.getValue();if([e.PlaybackState.PLAYING,e.PlaybackState.PAUSED].includes(l)){const e=o?r-a:Rn.getExactTime();e!==n&&t(e),n=e}i=requestAnimationFrame(s)};return s(),()=>cancelAnimationFrame(i)})),g=Ge(Rn.info.playbackState$),m=Ge(Rn.info.currentBuffer$),f=Ge(Rn.info.isEnded$),w=Ge(Rn.info.isLive$),b=Ge(Rn.info.volume$),y=Ge(Rn.info.muted$),x=Ge(Rn.info.availableQualities$),$=Ge(Rn.info.chromecastState$),k=Ge(Rn.info.chromecastDeviceName$),V=Ge(Rn.info.duration$);let C=null;const P=Rn.info.isBuffering$,S=Oe(P.getValue(),(e=>{const t=P.subscribe((t=>{t&&null===C?C=window.setTimeout((()=>{e(P.getValue()),C=null}),500):e(t)}));return()=>{t.unsubscribe(),C&&clearTimeout(C)}})),A=Ue([V,w],(([e,t])=>t?-e:e)),M=Ue([w,Ge(Rn.info.position$)],(([e,t])=>Boolean(e&&t>-5))),N=Ue([$],(([t])=>t===e.ChromecastState.CONNECTED)),z=De(void 0),T=Ge(Rn.info.isAutoQualityEnabled$,(e=>e&&z.set(void 0))),L=Ge(Rn.info.currentQuality$,(()=>z.set(void 0))),j=Ue([z,L],(([e,t])=>null!=e?e:t)),E=Ue([x,T,j],(([t,i,n])=>{const s=[{value:Mt.AUTO,displayValue:"Авто",selected:i}],l=t.filter((t=>t!==e.VideoQuality.INVARIANT));for(const e of l)s.push({value:e,displayValue:e,selected:!i&&e===n});return s})),I=Ue([m,A],(([e,t],i)=>{var n;return i((null!==(n=null==e?void 0:e.end)&&void 0!==n?n:0)/t)})),F=(e,t=e,i=!1)=>{var n,s;const l=!i,o=Rn.info.muted$.getValue();On({message:`set volume, volume: ${e}, preferredVolume: ${t}, internalCall: ${l}`}),Rn.setVolume(e),Qn.setVolume(e),l&&(null===(n=a.onVolumeChange)||void 0===n||n.call(a,e)),Ln(t),o&&(Rn.setMuted(!1),l&&(null===(s=a.onUnmute)||void 0===s||s.call(a)),En(!1))},R=(e,t=!1)=>{var i,n,s;const l=!t,o=Rn.info.volume$.getValue();if(On({message:`set muted, currentVolume: ${o}, mute: ${e}, internalCall: ${l}`}),Rn.setMuted(e),Qn.setVolume(e?0:o),En(e),l&&(e?null===(i=a.onMute)||void 0===i||i.call(a):null===(n=a.onUnmute)||void 0===n||n.call(a)),0===o){let e=jn();0===e&&(e=.05,Ln(e)),Rn.setVolume(e),Qn.setVolume(e),l&&(null===(s=a.onVolumeChange)||void 0===s||s.call(a,e))}},B=e=>{if(On({message:`seek to time, time: ${e}`}),Rn.info.isLive$.getValue()){const t=Rn.info.duration$.getValue(),i=Math.min(0,t+e);Rn.seekTime(i)}else Rn.seekTime(e)},H=e=>{On({message:`seek to percent, percent: ${e}`});const t=v(A)*e;B(t)},Q=De(void 0);let _=!1;const O=e=>{Q.set(e)},D=Ue([h,A,Q],(([e,i,n],s)=>{s(t.isNonNullable(n)?n*i:e)})),U=e=>{var i;t.assertNonNullable(Hn);const n=!e;if(v(Hn.playerPhase)===Nt.Ads)return On({message:`pause ads, internalCall: ${n}`}),void Qn.pause();On({message:`pause video, internalCall: ${n}`}),n&&(null===(i=a.onPause)||void 0===i||i.call(a)),Rn.pause()},q=(e,i)=>{t.assertNonNullable(Hn),On({message:`first start, show ads: ${e}, internalCall: ${!i}`}),e?Hn.playerPhase.set(Nt.Ads):(Hn.playerPhase.set(Nt.Video),i?Rn.play():Hn.actions.internal.togglePlay())};return Hn={initVideo:e=>{On({message:`init video, config: ${JSON.stringify(e)}`}),Rn.initVideo(e),Bn=e},playerPhase:De(Nt.Thumb),state:{positionExact$:h,positionWithScrubbing$:D,duration$:A,playbackState$:g,isLoaderVisible:S,bufferedProgress$:I,isLive$:w,isActiveLive$:M,isEnded$:f,muted$:y,volume$:b,currentQuality$:j,isAutoQualityEnabled$:T,availableQualities$:E,chromecastState$:$,chromecastDeviceName$:k,chromecastConnected$:N},ui:{controlsVisible:De(!0),isFullscreen:De(!1),isAutoplay:De(!1),contextMenuVisible:De(!1),playerSize:De({width:0,height:0})},ads:{position:De(0),duration:De(0),playbackState:De(Tt.INACTIVE),canSkip:De(!1),secondsToWatchBeforeSkip:De(0),postrollPassed:De(!1)},actions:{internal:{firstStart:e=>q(e,!1),pause:()=>U(!1),togglePlay:()=>{var i,n;t.assertNonNullable(Hn),On({message:"toggle play"}),v(Hn.playerPhase)!==Nt.Ads?Rn.info.playbackState$.getValue()!==e.PlaybackState.PLAYING?(Rn.info.isEnded$.getValue()&&(On({message:"toggle play, video ended, seek to 0"}),Rn.seekTime(0)),On({message:"toggle play, call player.play"}),Rn.play(),null===(i=a.onPlay)||void 0===i||i.call(a)):(On({message:"toggle play, call player.pause"}),Rn.pause(),null===(n=a.onPause)||void 0===n||n.call(a)):Qn.togglePlay()},toggleMuted:()=>{On({message:"toggle muted"});const e=Rn.info.muted$.getValue(),t=Rn.info.volume$.getValue();R(!(0===t||e))},setVolume:F,setQuality:e=>{On({message:`set quality, quality: ${e}`}),Rn.setAutoQuality(e===Mt.AUTO),e!==Mt.AUTO&&(z.set(e),Rn.setQuality(e))},startScrubbing:t=>{On({message:`start scrubbing, progress: ${t}`}),_=Rn.info.playbackState$.getValue()===e.PlaybackState.PLAYING,Rn.pause(),H(t),O(t)},progressScrubbing:O,completeScrubbing:e=>{On({message:`complete scrubbing, progress: ${e}`}),H(e),_&&(On({message:"progress scrubbing, play after scrubbing"}),Rn.play()),Q.set(void 0),_=!1},toggleChromecast:()=>{On({message:"toggle chromecast"}),Rn.toggleChromecast()},switchToActiveLive:()=>{On({message:"switch to active live"}),Rn.seekTime(0)},switchFromAdsToVideo:(e=!0)=>{t.assertNonNullable(Hn),On({message:`switch from ads to video, callPlay: ${e}`}),Hn.playerPhase.set(Nt.Video),e&&Rn.play()},switchFromVideoToAds:()=>{t.assertNonNullable(Hn),On({message:"switch from video to ads"}),Hn.actions.internal.pause(),Hn.playerPhase.set(Nt.Ads)},skipAd:()=>Qn.skip(),getDebugData:()=>(t.assertNonNullable(Hn),((e,t,i)=>{var n;const s=[],l=e.info,{width:o,height:a}=v(i.ui.playerSize);return s.push(["Browser",navigator.userAgent]),s.push(["Content host",l.hostname$.getValue()]),s.push(["Media provider",l.currentFormat$.getValue()]),s.push(["Available URLs",Object.keys(t.sources).join(", ")]),s.push(["Quality",l.currentQuality$.getValue()]),s.push(["Available qualities",l.availableQualities$.getValue().join(", ")]),s.push(["Auto quality enabled",l.isAutoQualityEnabled$.getValue()]),s.push(["Throughput estimation",null!==(n=l.throughputEstimation$.getValue())&&void 0!==n?n:0]),s.push(["Position",v(i.state.positionExact$)]),s.push(["Player playback state",l.playbackState$.getValue()]),s.push(["Player size",`${o}x${a}`]),s.push(["URL",window.location.href]),s.push(["Application version","@vkontakte/videoplayer@1.0.4"]),s.map((e=>e.join(": "))).join("\n")})(Rn,Bn,Hn)),seekTime:e=>B(e)},external:{firstStart:e=>q(e,!0),play:()=>(e=>{var i;t.assertNonNullable(Hn);const n=!e;if(v(Hn.playerPhase)===Nt.Ads)return On({message:`play ads, internalCall: ${n}`}),void Qn.play();On({message:`play video, internalCall: ${n}`}),n&&(null===(i=a.onPlay)||void 0===i||i.call(a)),Rn.play()})(!0),pause:()=>U(!0),seekTime:e=>(e=>{On({message:`seek external, time: ${e}`}),Rn.seekTime(Rn.info.isLive$.getValue()?-e:e)})(e),setMuted:e=>R(e,!0),setVolume:e=>F(e,e,!0)}},callbacks:a,getAdmanWrapper:()=>Qn,getLogger:()=>_n,destroy:()=>{d.unsubscribe(),u.unsubscribe(),p.unsubscribe(),Rn.destroy(),Qn.destroy()}},Hn},Un=e=>e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():Promise.reject(),qn=()=>{const e=document;return!!(e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement)},{window:Wn}=G;function Kn(e){m(e,"svelte-1525i7o",".player-wrapper.svelte-1525i7o{--white:#fff;--black:#000;--red:#ff3347;--videoplayer-controls-height:45px;--videoplayer-controls-fullscreen-height:50px;--videoplayer-controls-transition-duration:0.25s;--videoplayer-controls-transition-fn:cubic-bezier(0.455, 0.03, 0.515, 0.955);--videoplayer-focused-element-shadow:inset 0 0 0 2px #2a5885;--videoplayer-focused-slider-shadow:0 0 0 2px #2a5885;--videoplayer-big-play-size:75px;--videoplayer-big-play-radius:50%;--videoplayer-big-play-bg-color:rgba(0, 0, 0, 0.5);--videoplayer-big-play-hover-bg-color:rgba(0, 0, 0, 0.6);--videoplayer-big-play-icon-width:38px;--videoplayer-big-play-icon-height:33px;--videoplayer-slider-height:5px;--videoplayer-slider-radius:calc(var(--videoplayer-slider-height) / 2);--videoplayer-slider-handle-size:13px;--videoplayer-slider-bg:rgba(255, 255, 255, 0.4);--videoplayer-slider-loaded-bg:rgba(255, 255, 255, 0.4);--videoplayer-slider-filled-bg:var(--white);--videoplayer-slider-filled-active-live-bg:var(--red);--videoplayer-slider-filled-ads:rgba(103, 165, 235, 1);--videoplayer-slider-disabled-color:rgba(248, 248, 248, 0.31);--videoplayer-button-hover-transition:opacity 0.2s;position:relative;width:100%;height:100%;min-width:328px;min-height:206px;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}.player-wrapper.svelte-1525i7o .player-media{position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out}.video-container.svelte-1525i7o,.ads-container.svelte-1525i7o{position:absolute;width:100%;height:100%;left:0;top:0}.ads-container.svelte-1525i7o{background:var(--black)}.hidden.svelte-1525i7o{visibility:hidden}")}function Xn(e){let t,i,n;return i=new tn({props:{adsSlotId:e[5],adsPreviewParam:e[6],duration:e[7]}}),{c(){t=b("div"),Z(i.$$.fragment),C(t,"class","ads-container svelte-1525i7o"),A(t,"hidden",e[16]!==Nt.Ads)},m(e,s){f(e,t,s),ee(i,t,null),n=!0},p(e,n){const s={};32&n[0]&&(s.adsSlotId=e[5]),64&n[0]&&(s.adsPreviewParam=e[6]),128&n[0]&&(s.duration=e[7]),i.$set(s),65536&n[0]&&A(t,"hidden",e[16]!==Nt.Ads)},i(e){n||(X(i.$$.fragment,e),n=!0)},o(e){Y(i.$$.fragment,e),n=!1},d(e){e&&w(t),te(i)}}}function Yn(e){let t,i;return t=new Ii({}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Gn(e){let t,i;return t=new bn({props:{title:e[10],thumb:e[11],playNextVideo:e[13]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};1024&i[0]&&(n.title=e[10]),2048&i[0]&&(n.thumb=e[11]),8192&i[0]&&(n.playNextVideo=e[13]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Jn(e){let t,i;return t=new kn({props:{title:e[0],isHidden:!e[25]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};1&i[0]&&(n.title=e[0]),33554432&i[0]&&(n.isHidden=!e[25]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function Zn(e){let t,i;return t=new An({props:{thumbUrl:e[1],chromecastDeviceName:e[28]}}),{c(){Z(t.$$.fragment)},m(e,n){ee(t,e,n),i=!0},p(e,i){const n={};2&i[0]&&(n.thumbUrl=e[1]),268435456&i[0]&&(n.chromecastDeviceName=e[28]),t.$set(n)},i(e){i||(X(t.$$.fragment,e),i=!0)},o(e){Y(t.$$.fragment,e),i=!1},d(e){te(t,e)}}}function es(e){let t,i,n,s,l,a,r,c,d,u,p,v,h,m,y,x,P,S,M;i=new Li({props:{hidden:e[16]!==Nt.Thumb,thumbUrl:e[1],startVideo:e[43]}});let N=e[4]&&e[20]&&Xn(e);r=new on({props:{supportLink:e[3],visible:e[27],playerContainerRef:e[17],controlsContainerRef:e[19],x:e[21],y:e[22]}});let z=e[24]&&Yn(),T=e[26]&&e[10]&&e[11]&&Gn(e),L=e[16]===Nt.Video&&Jn(e),E=e[15]&&Zn(e),I={toggleFullscreen:e[44],hideContextMenu:e[45],isAds:e[16]===Nt.Ads};function F(t){e[71](t)}h=new Nn({props:I}),e[70](h);let R={hidden:e[16]===Nt.Thumb,showControls:e[25],isAds:e[16]===Nt.Ads,canRewindLive:e[2],logoClickable:e[8],showNextVideoButton:e[9],isOneVideoPlaylist:e[12],playNextVideo:e[13],repeatPlaylist:e[14],toggleFullscreen:e[44]};return void 0!==e[19]&&(R.controlsElementRef=e[19]),y=new Mi({props:R}),j.push((()=>J(y,"controlsElementRef",F))),{c(){t=b("div"),Z(i.$$.fragment),n=$(),s=b("div"),l=$(),N&&N.c(),a=$(),Z(r.$$.fragment),c=$(),z&&z.c(),d=$(),T&&T.c(),u=$(),L&&L.c(),p=$(),E&&E.c(),v=$(),Z(h.$$.fragment),m=$(),Z(y.$$.fragment),C(s,"class","video-container svelte-1525i7o"),A(s,"hidden",e[16]!==Nt.Video),C(t,"class","player-wrapper svelte-1525i7o"),C(t,"tabindex","0")},m(o,w){f(o,t,w),ee(i,t,null),g(t,n),g(t,s),e[69](s),g(t,l),N&&N.m(t,null),g(t,a),ee(r,t,null),g(t,c),z&&z.m(t,null),g(t,d),T&&T.m(t,null),g(t,u),L&&L.m(t,null),g(t,p),E&&E.m(t,null),g(t,v),ee(h,t,null),g(t,m),ee(y,t,null),e[72](t),P=!0,S||(M=[k(Wn,"blur",e[45]),k(s,"contextmenu",V(e[46])),k(s,"click",e[47]),k(t,"mouseenter",e[40]),k(t,"mouseleave",e[41]),k(t,"mousemove",e[42]),k(t,"keydown",V(e[48]))],S=!0)},p(e,n){const l={};65536&n[0]&&(l.hidden=e[16]!==Nt.Thumb),2&n[0]&&(l.thumbUrl=e[1]),i.$set(l),65536&n[0]&&A(s,"hidden",e[16]!==Nt.Video),e[4]&&e[20]?N?(N.p(e,n),1048592&n[0]&&X(N,1)):(N=Xn(e),N.c(),X(N,1),N.m(t,a)):N&&(W(),Y(N,1,1,(()=>{N=null})),K());const o={};8&n[0]&&(o.supportLink=e[3]),134217728&n[0]&&(o.visible=e[27]),131072&n[0]&&(o.playerContainerRef=e[17]),524288&n[0]&&(o.controlsContainerRef=e[19]),2097152&n[0]&&(o.x=e[21]),4194304&n[0]&&(o.y=e[22]),r.$set(o),e[24]?z?16777216&n[0]&&X(z,1):(z=Yn(),z.c(),X(z,1),z.m(t,d)):z&&(W(),Y(z,1,1,(()=>{z=null})),K()),e[26]&&e[10]&&e[11]?T?(T.p(e,n),67111936&n[0]&&X(T,1)):(T=Gn(e),T.c(),X(T,1),T.m(t,u)):T&&(W(),Y(T,1,1,(()=>{T=null})),K()),e[16]===Nt.Video?L?(L.p(e,n),65536&n[0]&&X(L,1)):(L=Jn(e),L.c(),X(L,1),L.m(t,p)):L&&(W(),Y(L,1,1,(()=>{L=null})),K()),e[15]?E?(E.p(e,n),32768&n[0]&&X(E,1)):(E=Zn(e),E.c(),X(E,1),E.m(t,v)):E&&(W(),Y(E,1,1,(()=>{E=null})),K());const c={};65536&n[0]&&(c.isAds=e[16]===Nt.Ads),h.$set(c);const g={};65536&n[0]&&(g.hidden=e[16]===Nt.Thumb),33554432&n[0]&&(g.showControls=e[25]),65536&n[0]&&(g.isAds=e[16]===Nt.Ads),4&n[0]&&(g.canRewindLive=e[2]),256&n[0]&&(g.logoClickable=e[8]),512&n[0]&&(g.showNextVideoButton=e[9]),4096&n[0]&&(g.isOneVideoPlaylist=e[12]),8192&n[0]&&(g.playNextVideo=e[13]),16384&n[0]&&(g.repeatPlaylist=e[14]),!x&&524288&n[0]&&(x=!0,g.controlsElementRef=e[19],H((()=>x=!1))),y.$set(g)},i(e){P||(X(i.$$.fragment,e),X(N),X(r.$$.fragment,e),X(z),X(T),X(L),X(E),X(h.$$.fragment,e),X(y.$$.fragment,e),P=!0)},o(e){Y(i.$$.fragment,e),Y(N),Y(r.$$.fragment,e),Y(z),Y(T),Y(L),Y(E),Y(h.$$.fragment,e),Y(y.$$.fragment,e),P=!1},d(n){n&&w(t),te(i),e[69](null),N&&N.d(),te(r),z&&z.d(),T&&T.d(),L&&L.d(),E&&E.d(),e[70](null),te(h),te(y),e[72](null),S=!1,o(M)}}}function ts(t,i,s){let l,o,a,r,c,d,u,p,v,g,m,{sources:f}=i,{title:w}=i,{thumbUrl:b}=i,{unitedVideoId:y}=i,{albumId:x}=i,{statPlace:$}=i,{autoplay:k=!1}=i,{volume:V}=i,{muted:C}=i,{fromTime:P=0}=i,{canRewindLive:S=!0}=i,{supportLink:A=Je}=i,{showAds:M=!1}=i,{adsSlotId:N}=i,{adsPreviewParam:T}=i,{duration:L}=i,{logoClickable:E=!1}=i,{showNextVideoButton:I=!1}=i,{endScreenVideoTitle:F}=i,{endScreenVideoThumb:R}=i,{isOneVideoPlaylist:B=!1}=i,{outerContainerRef:H}=i,{playNextVideo:Q=n}=i,{repeatPlaylist:_=n}=i,{callbacks:O={}}=i;const D=Dn({videoId:y,autoplay:k,albumId:x,statPlace:$,callbacks:O});D.getAdmanWrapper().init({switchFromAdsToVideo:D.actions.internal.switchFromAdsToVideo,switchFromVideoToAds:D.actions.internal.switchFromVideoToAds,setMuted:D.actions.external.setMuted},D.ads);const U=D.getLogger().createComponentLog("Root component"),q=D.state.playbackState$;h(t,q,(e=>s(76,r=e)));const W=D.ads.playbackState;h(t,W,(e=>s(67,p=e)));const K=D.playerPhase;h(t,K,(e=>s(16,v=e)));const X=D.ui.isFullscreen;h(t,X,(e=>s(75,a=e)));const Y=D.ui.controlsVisible;h(t,Y,(e=>s(66,u=e)));const G=D.ui.playerSize,J=D.ui.contextMenuVisible;h(t,J,(e=>s(27,o=e)));const Z=D.state.isLoaderVisible;h(t,Z,(e=>s(68,g=e)));const ee=D.state.isEnded$;h(t,ee,(e=>s(64,l=e)));const te=D.state.chromecastConnected$;h(t,te,(e=>s(15,d=e)));const ie=D.state.chromecastDeviceName$;h(t,ie,(e=>s(28,m=e)));const ne=D.ads.postrollPassed;let se,le,oe,ae;h(t,ne,(e=>s(65,c=e))),We(D);let re,ce,de,ue,pe=null,ve=!1,he=0,ge=0;const me=(e=!1)=>{s(20,ve=!0),e?D.actions.external.firstStart(M):D.actions.internal.firstStart(M)};z((()=>{var e;e=we,document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),(e=>{if(ResizeObserver){let t,i;pe=new ResizeObserver(Qe((e=>{const n=e[0];if(n){if(n.contentBoxSize){const e=Array.isArray(n.contentBoxSize)?n.contentBoxSize[0]:n.contentBoxSize;t=e.inlineSize,i=e.blockSize}else n.contentRect&&(t=n.contentRect.width,i=n.contentRect.height);G.set({width:t,height:i})}}),300)),pe.observe(e)}G.set({width:e.clientWidth,height:e.clientHeight})})(se),D.initVideo({container:le,sources:f}),P>0&&D.actions.external.seekTime(P);const t=null!=V?V:jn(),i=null!=C?C:(()=>{const e=zn.get("vk_player_prefer_volume_mute");return"boolean"==typeof e&&e})();return D.actions.external.setVolume(t),D.actions.external.setMuted(i),D.getAdmanWrapper().setInitialVolume(i?0:t),D.ui.isAutoplay.set(k),k&&me(),()=>{(e=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)})(we),null==pe||pe.disconnect(),D.destroy()}}));const fe=()=>{var e;qn()?((e=document).exitFullscreen?e.exitFullscreen():e.msExitFullscreen?e.msExitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():Promise.reject(),U({message:"exit fullscreen"})):(U({message:"request fullscreen"}),H?Un(H):se&&Un(se))},we=()=>{var e,t,i,n;const s=qn();X.set(s),D.getAdmanWrapper().setFullscreen(s),a?null===(t=(e=D.callbacks).onFullscreenEnter)||void 0===t||t.call(e):null===(n=(i=D.callbacks).onFullscreenExit)||void 0===n||n.call(i)},be=()=>J.set(!1);return t.$$set=e=>{"sources"in e&&s(49,f=e.sources),"title"in e&&s(0,w=e.title),"thumbUrl"in e&&s(1,b=e.thumbUrl),"unitedVideoId"in e&&s(50,y=e.unitedVideoId),"albumId"in e&&s(51,x=e.albumId),"statPlace"in e&&s(52,$=e.statPlace),"autoplay"in e&&s(53,k=e.autoplay),"volume"in e&&s(54,V=e.volume),"muted"in e&&s(55,C=e.muted),"fromTime"in e&&s(56,P=e.fromTime),"canRewindLive"in e&&s(2,S=e.canRewindLive),"supportLink"in e&&s(3,A=e.supportLink),"showAds"in e&&s(4,M=e.showAds),"adsSlotId"in e&&s(5,N=e.adsSlotId),"adsPreviewParam"in e&&s(6,T=e.adsPreviewParam),"duration"in e&&s(7,L=e.duration),"logoClickable"in e&&s(8,E=e.logoClickable),"showNextVideoButton"in e&&s(9,I=e.showNextVideoButton),"endScreenVideoTitle"in e&&s(10,F=e.endScreenVideoTitle),"endScreenVideoThumb"in e&&s(11,R=e.endScreenVideoThumb),"isOneVideoPlaylist"in e&&s(12,B=e.isOneVideoPlaylist),"outerContainerRef"in e&&s(57,H=e.outerContainerRef),"playNextVideo"in e&&s(13,Q=e.playNextVideo),"repeatPlaylist"in e&&s(14,_=e.repeatPlaylist),"callbacks"in e&&s(58,O=e.callbacks)},t.$$.update=()=>{65536&t.$$.dirty[0]|96&t.$$.dirty[2]&&s(24,ce=v===Nt.Video&&g||v===Nt.Ads&&p===Tt.INACTIVE),32768&t.$$.dirty[0]|16&t.$$.dirty[2]&&s(25,de=u||d),16&t.$$.dirty[0]|12&t.$$.dirty[2]&&s(26,ue=(M&&c||!M)&&l)},[w,b,S,A,M,N,T,L,E,I,F,R,B,Q,_,d,v,se,le,oe,ve,he,ge,re,ce,de,ue,o,m,q,W,K,X,Y,J,Z,ee,te,ie,ne,function(){clearTimeout(ae),Y.set(!0)},function(){ae=window.setTimeout((()=>{r===e.PlaybackState.PLAYING&&Y.set(!1)}),500)},function(){clearTimeout(ae),Y.set(!0),a&&oe&&!function(e,t){var i,n,s,l,o;return!!e&&(null!==(o=null!==(l=null!==(s=null!==(n=null!==(i=e.matches)&&void 0!==i?i:e.matchesSelector)&&void 0!==n?n:e.mozMatchesSelector)&&void 0!==s?s:e.msMatchesSelector)&&void 0!==l?l:e.oMatchesSelector)&&void 0!==o?o:e.webkitMatchesSelector).call(e,t)}(oe,":hover")&&(ae=window.setTimeout((()=>{r===e.PlaybackState.PLAYING&&Y.set(!1)}),3e3))},me,fe,be,e=>{J.set(!0),s(21,he=e.clientX),s(22,ge=e.clientY)},e=>{o?be():(be(),l||(D.actions.internal.togglePlay(),2===e.detail&&(U({message:"double click on video"}),fe())))},e=>{re.keyDownHandler(e)},f,y,x,$,k,V,C,P,H,O,function(){ve?D.actions.external.play():me(!0)},function(){D.actions.external.pause()},function(e){D.actions.external.setMuted(e)},function(e){e>=0&&e<=1&&D.actions.external.setVolume(e)},function(e){D.actions.external.seekTime(e)},l,c,u,p,g,function(e){j[e?"unshift":"push"]((()=>{le=e,s(18,le)}))},function(e){j[e?"unshift":"push"]((()=>{re=e,s(23,re)}))},function(e){oe=e,s(19,oe)},function(e){j[e?"unshift":"push"]((()=>{se=e,s(17,se)}))}]}class is extends se{constructor(e){super(),ne(this,e,ts,es,r,{sources:49,title:0,thumbUrl:1,unitedVideoId:50,albumId:51,statPlace:52,autoplay:53,volume:54,muted:55,fromTime:56,canRewindLive:2,supportLink:3,showAds:4,adsSlotId:5,adsPreviewParam:6,duration:7,logoClickable:8,showNextVideoButton:9,endScreenVideoTitle:10,endScreenVideoThumb:11,isOneVideoPlaylist:12,outerContainerRef:57,playNextVideo:13,repeatPlaylist:14,callbacks:58,play:59,pause:60,setMuted:61,setVolume:62,seekTime:63},Kn,[-1,-1,-1])}get play(){return this.$$.ctx[59]}get pause(){return this.$$.ctx[60]}get setMuted(){return this.$$.ctx[61]}get setVolume(){return this.$$.ctx[62]}get seekTime(){return this.$$.ctx[63]}}function ns(e){m(e,"svelte-1oqts7t",".playerStub.svelte-1oqts7t{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}.stubImage.svelte-1oqts7t{height:60px}.stubImage-white.svelte-1oqts7t{filter:brightness(0) invert(1)}.title.svelte-1oqts7t{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 ss(e){let t,i;return{c(){t=b("div"),i=x(e[0]),C(t,"class","title svelte-1oqts7t")},m(e,n){f(e,t,n),g(t,i)},p(e,t){1&t&&P(i,e[0])},d(e){e&&w(t)}}}function ls(e){let t,i;return{c(){t=b("img"),u(t.src,i="data:image/svg+xml,%3csvg width='57' height='60' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath 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 6h19.489zm.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.91.91 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436z' fill='%23909499'/%3e%3c/svg%3e")||C(t,"src","data:image/svg+xml,%3csvg width='57' height='60' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath 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 6h19.489zm.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.91.91 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436zm-20-8c.445 0 .607.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.91.91 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.908.908 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.908.908 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.908.908 0 0 1 .378-.378c.163-.088.324-.134.77-.134h1.436z' fill='%23909499'/%3e%3c/svg%3e"),C(t,"class","stubImage svelte-1oqts7t"),C(t,"alt",""),A(t,"stubImage-white",e[1])},m(e,i){f(e,t,i)},p(e,i){2&i&&A(t,"stubImage-white",e[1])},d(e){e&&w(t)}}}function os(e){let t,i,s,l=e[0]&&ss(e),o=(!e[0]||!e[1])&&ls(e);return{c(){t=b("div"),l&&l.c(),i=$(),o&&o.c(),C(t,"class","playerStub svelte-1oqts7t"),C(t,"style",s=e[1]?`background-image: url('${e[1]}')`:"")},m(e,n){f(e,t,n),l&&l.m(t,null),g(t,i),o&&o.m(t,null)},p(e,[n]){e[0]?l?l.p(e,n):(l=ss(e),l.c(),l.m(t,i)):l&&(l.d(1),l=null),e[0]&&e[1]?o&&(o.d(1),o=null):o?o.p(e,n):(o=ls(e),o.c(),o.m(t,null)),2&n&&s!==(s=e[1]?`background-image: url('${e[1]}')`:"")&&C(t,"style",s)},i:n,o:n,d(e){e&&w(t),l&&l.d(),o&&o.d()}}}function as(e,t,i){let{title:n}=t,{thumbUrl:s}=t;return e.$$set=e=>{"title"in e&&i(0,n=e.title),"thumbUrl"in e&&i(1,s=e.thumbUrl)},[n,s]}class rs extends se{constructor(e){super(),ne(this,e,as,os,r,{title:0,thumbUrl:1},ns)}}class cs extends HTMLElement{constructor(){var e;super(),this.currentPlayingVideoIndex=0,this.repeatPlaylist=!1,this.config=void 0,this._shadowRoot=this.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.logger=new t.Logger,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new t.Subscription,(null===(e=null===window||void 0===window?void 0:window.videoPlayerConfig)||void 0===e?void 0:e.debugLogs)&&this.subscription.add(this.logger.log$.subscribe((e=>{console.log("%c player web component ","background:#77dd77;",`${e.component}`,e.message)})))}connectedCallback(){const e=this.getAttribute("stub-title"),t=this.getAttribute("stub-thumb-url");this.svelteStubComponent=new rs({target:this.playerContainer,props:{title:e,thumbUrl:t}})}disconnectedCallback(){var e,t;null===(e=this.svelteRootComponent)||void 0===e||e.$destroy(),null===(t=this.svelteStubComponent)||void 0===t||t.$destroy(),this.subscription.unsubscribe()}needToShowNextButton(){return!(!this.config||this.currentPlayingVideoIndex<0||1===this.config.videos.length)&&(this.repeatPlaylist||this.currentPlayingVideoIndex<this.config.videos.length-1)}getNextVideoInfo(){if(!this.config)return{needToShowNextButton:!1,nextVideoTitle:void 0,nextVideoThumb:void 0};const e=this.config.videos[this.currentPlayingVideoIndex+1]||{};return{needToShowNextButton:this.needToShowNextButton(),nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createPlayer(e,t={}){if(!this.config)return;const{albumId:i,statPlace:n,autoplay:s,volume:l,muted:o,fromTime:a,canRewindLive:r,supportLink:c,showAds:d,adsSlotId:u,adsPreviewParam:p,logoClickable:v,callbacks:h}=Object.assign(Object.assign({},this.config),t),{sources:g,title:m,thumbUrl:f,unitedVideoId:w,duration:b}=e,y=this.getNextVideoInfo(),x={sources:g,title:m,thumbUrl:f,unitedVideoId:w,albumId:i,statPlace:n,autoplay:s,muted:o,volume:l,fromTime:a,canRewindLive:r,supportLink:c,showAds:d,adsSlotId:u,adsPreviewParam:p,duration:b,logoClickable:v,showNextVideoButton:y.needToShowNextButton,endScreenVideoTitle:y.nextVideoTitle,endScreenVideoThumb:y.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()};this.log({message:`create player, props: ${JSON.stringify(x)}`}),this.svelteRootComponent=new is({target:this.playerContainer,props:{sources:g,title:m,thumbUrl:f,unitedVideoId:w,albumId:i,statPlace:n,autoplay:s,muted:o,volume:l,fromTime:a,canRewindLive:r,supportLink:c,showAds:d,adsSlotId:u,adsPreviewParam:p,duration:b,logoClickable:v,callbacks:h,outerContainerRef:this.playerContainer,showNextVideoButton:y.needToShowNextButton,endScreenVideoTitle:y.nextVideoTitle,endScreenVideoThumb:y.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playNextVideo:()=>this.playNextVideo(),repeatPlaylist:()=>this.playNextVideo(!0)}})}playNextVideo(e=!1){var t;if(!this.config)return;e||this.currentPlayingVideoIndex===this.config.videos.length-1&&this.repeatPlaylist?this.currentPlayingVideoIndex=0:this.currentPlayingVideoIndex++,this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`});const i=this.config.videos[this.currentPlayingVideoIndex];i?(null===(t=this.svelteRootComponent)||void 0===t||t.$destroy(),this.createPlayer(i,{autoplay:!0,fromTime:0})):this.log({message:"no next video"})}initPlayer(e){var t,i;if(!Array.isArray(e.videos)||0===e.videos.length)throw new Error("empty videos");this.config=JSON.parse(JSON.stringify(e)),this.currentPlayingVideoIndex=0,null===(t=this.svelteStubComponent)||void 0===t||t.$destroy(),null===(i=this.svelteRootComponent)||void 0===i||i.$destroy(),this.createPlayer(e.videos[0])}isOneVideoPlaylist(){return!!this.config&&1===this.config.videos.length}updateNextVideos(e){var t;if(!this.config)return;this.log({message:`update next videos, videos: ${JSON.stringify(e)}`}),this.config.videos.splice(this.currentPlayingVideoIndex+1),this.config.videos.push(...e);const i=this.getNextVideoInfo();null===(t=this.svelteRootComponent)||void 0===t||t.$set({showNextVideoButton:i.needToShowNextButton,endScreenVideoTitle:i.nextVideoTitle,endScreenVideoThumb:i.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()})}play(){var e;this.log({message:"play"}),null===(e=this.svelteRootComponent)||void 0===e||e.play()}pause(){var e;this.log({message:"pause"}),null===(e=this.svelteRootComponent)||void 0===e||e.pause()}stop(){var e,t;if(!this.config)return;this.log({message:"stop"}),null===(e=this.svelteStubComponent)||void 0===e||e.$destroy();const i=this.config.videos[0];i&&(null===(t=this.svelteRootComponent)||void 0===t||t.$destroy(),this.createPlayer(i))}setMuted(e){var t;this.log({message:`set muted, muted: ${e}`}),null===(t=this.svelteRootComponent)||void 0===t||t.setMuted(e)}setVolume(e){var t;this.log({message:`set volume, volume: ${e}`}),null===(t=this.svelteRootComponent)||void 0===t||t.setVolume(e)}setRepeat(e){var t;this.log({message:`set repeat, repeat: ${e}`}),this.repeatPlaylist=e,null===(t=this.svelteRootComponent)||void 0===t||t.$set({showNextVideoButton:this.needToShowNextButton()})}seekTime(e){var t;this.log({message:`seek time, time: ${e}`}),null===(t=this.svelteRootComponent)||void 0===t||t.seekTime(e)}}exports.registerPlayerWebComponent=()=>{window.customElements.define("vk-video-player",cs)};
|