@vkontakte/videoplayer-tv 1.0.4-dev.0da85b58.0 → 1.0.4-dev.bdbbdd48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esnext.esm.js +47 -44
- package/package.json +5 -4
- package/types/VKVideoPlayerTv/HTMLElement.d.ts +2 -0
- package/types/VKVideoPlayerTv/index.svelte.d.ts +96 -0
- package/types/components/Ads/admanWrapper.d.ts +75 -75
- package/types/components/Ads/types.d.ts +26 -26
- package/types/components/Controls/types.d.ts +3 -3
- package/types/components/Icons/constants.d.ts +5 -5
- package/types/components/Icons/utils.d.ts +2 -2
- package/types/components/Root/types.d.ts +51 -24
- package/types/config.d.ts +95 -95
- package/types/constans/index.d.ts +2 -2
- package/types/index.d.ts +11 -10
- package/types/services/statistics.d.ts +13 -13
- package/types/store/index.d.ts +220 -5
- package/types/store/utils.d.ts +34 -35
- package/types/translation/index.d.ts +2 -2
- package/types/translation/labels.d.ts +1 -1
- package/types/translation/packs/en.d.ts +1 -1
- package/types/translation/packs/ru.d.ts +1 -1
- package/types/translation/types.d.ts +5 -5
- package/types/types/index.d.ts +199 -442
- package/types/types/svg.d.d.ts +5 -0
- package/types/utils/WebVttParser.d.ts +11 -11
- package/types/utils/attachments/defferedDisableByCondition.d.ts +3 -3
- package/types/utils/changeVolume.d.ts +6 -6
- package/types/utils/elementHelpers.d.ts +2 -2
- package/types/utils/findCurrentSubtltlePhrase.d.ts +1 -1
- package/types/utils/fullscreen.d.ts +14 -14
- package/types/utils/roundFps.d.ts +1 -1
- package/types/utils/sanitizeHtml.d.ts +3 -3
- package/types/utils/sorts.d.ts +2 -2
- package/types/utils/stack/index.d.ts +7 -7
- package/types/utils/stack/node.d.ts +3 -3
- package/types/utils/subtitles.d.ts +8 -8
- package/types/utils/timeout.d.ts +2 -2
- package/types/utils/userSettings.d.ts +24 -19
- package/types/utils/videoConfig.d.ts +6 -2
- package/types/utils/volumeChange.d.ts +1 -1
- package/types/utils/webAPI/focusLock.d.ts +30 -30
- package/types/utils/webAPI/focusManager.d.ts +15 -15
- package/types/utils/webAPI/language.d.ts +1 -1
- package/es2015.cjs +0 -52
- package/es2015.esm.js +0 -52
- package/es2018.cjs +0 -52
- package/es2018.esm.js +0 -52
- package/es2024.cjs +0 -52
- package/es2024.esm.js +0 -52
- package/esnext.cjs +0 -52
- package/evergreen.esm.js +0 -52
- package/types/AndroidTvPlayer.d.ts +0 -43
- package/types/components/Controls/CircleButton/types.d.ts +0 -12
- package/types/components/Controls/ProgressBar/types.d.ts +0 -7
- package/types/components/List/types.d.ts +0 -8
- package/types/components/Time/constants.d.ts +0 -4
- package/types/consts.d.ts +0 -1
- package/types/services/BackButton.d.ts +0 -8
- package/types/services/DeviceCapabilities.d.ts +0 -5
- package/types/services/FocusManager.d.ts +0 -8
- package/types/store/types.d.ts +0 -433
- package/types/store/ui.d.ts +0 -2
- package/types/utils/formatTime.d.ts +0 -1
package/esnext.esm.js
CHANGED
|
@@ -1,52 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-tv v1.0.4-dev.
|
|
3
|
-
* Fri, 27 Feb 2026
|
|
2
|
+
* @vkontakte/videoplayer-tv v1.0.4-dev.bdbbdd48.0
|
|
3
|
+
* Fri, 27 Feb 2026 10:48:04 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-4/doc/
|
|
5
5
|
*/
|
|
6
|
-
var Ou=Object.create;var Es=Object.defineProperty;var Pu=Object.getOwnPropertyDescriptor;var Ru=Object.getOwnPropertyNames;var Vu=Object.getPrototypeOf,ju=Object.prototype.hasOwnProperty;var zu=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Uu=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ru(t))!ju.call(e,r)&&r!==i&&Es(e,r,{get:()=>t[r],enumerable:!(n=Pu(t,r))||n.enumerable});return e};var Fu=(e,t,i)=>(i=e!=null?Ou(Vu(e)):{},Uu(t||!e||!e.__esModule?Es(i,"default",{value:e,enumerable:!0}):i,e));var Wl=zu(()=>{"use strict";AdmanHTML=function(){"use strict";function e(T){T&&typeof T=="string"&&new AdmanHTML.OpenLinkPopupRender(R).open(T)}function t(T){Ye.initMode(T.slot?"slot":"json",{slot:T.slot,version:R.version}),R.slotId=T.slot,R.playerEl=T.playerEl,R.wrapper=T.wrapper,R.videoEl=T.videoEl,R.audioEl=T.audioEl,R.clickEl=T.clickEl,R.quality=parseInt(T.videoQuality||T.params&&T.params.videoQuality||360,10),R.browser=T.browser||{},R.config=T.config||{},R.pauseOnHide=T.pauseOnHide||!1,R.viewabilityValue=T.viewabilityValue||.5,R.viewabilityEl=T.viewabilityEl||R.videoEl,R.disclaimer=T.disclaimer!==!1,R.callToActionButton=T.callToActionButton!==!1,R.forcePreloadAdditionalData=!!T.forcePreloadAdditionalData,R.ctaStyles=T.ctaStyles,R.pause=p,R.resume=s,R.openPopup=e;var ie=AdmanHTML.Utils.getPageLocation(),ae=AdmanHTML.Utils.getHostname(ie||""),He=AdmanHTML.Utils.isMobile(navigator.userAgent||navigator.vendor||window.opera);AdmanHTML.Utils.isElement(R.videoEl)&&He&&R.videoEl.setAttribute("playsinline",""),R.location={top:ie,topEncoded:encodeURIComponent(ie||""),hostname:ae,hostnameEncoded:encodeURIComponent(ae||"")},Ye.rb(Ye.code.ADMAN_SUCCESSFULLY_INITIALIZED),R.stats.metrics("initing"),w=T.midrollPointsP||null,Pe=!w&&T.midrollPoints?T.midrollPoints:null,R.config.vpaidJsInterface||(R.config.vpaidJsInterface=ge),R.config.vpaidHtmlInterface||(R.config.vpaidHtmlInterface=xe);var Ve="https://ad.mail.ru/vp/"+R.slotId+"?app_name=admanhtml&version="+this.getVersion();if(T.params&&T.params.constructor&&T.params.constructor===Object){var lt=[];"flash"in T.params||(T.params.flash=AdmanHTML.Utils.checkFlash()?1:0);for(var it in T.params)T.params.hasOwnProperty(it)&<.push(it+"="+T.params[it]);var ft=AdmanHTML.Utils.getUserIdQuery();ft&<.push(ft),lt.length&&(Ve+="&"+lt.join("&"))}if((R.slotId||T.json||T.adUrl)&&!R.browser.adBlock){var at={},Ai=this;R.slotId?at.url=Ve:T.adUrl?(T.adUrl.indexOf("ad.mail.ru/")!==-1&&(T.adUrl+=T.adUrl.indexOf("?")===-1?"?":"&",T.adUrl+="version="+this.getVersion()),at.url=T.adUrl):at.data=T.json,pe=new AdmanHTML.AdSlot(R,at,function(){var Ei=pe.getRootSettings()||{},ki=Ei.requestHostname;if(ki&&!AdmanHTML.Utils.matchHostname(R.location.hostname,ki,te))return R.stats.logError("HOSTNAME_MISMATCH:"+ki+":"+R.location.topEncoded,{impressionID:Ei.impressionID,padID:Ei.padID,bannerIDs:Ei.bannerIDs}),void(R.callbacks.onError&&R.callbacks.onError());R.location.hostname||R.stats.logError("HOSTNAME_EMPTY:"+ki+":"+R.location.topEncoded),R.cb("onReady",[{settings:pe.settings}]);var Bi=1e6,Ri=[],Ge=[],We=T.params&&T.params.duration?parseInt(T.params.duration,10):Bi;We===0&&(We=Bi),Pe&&Pe.sort(AdmanHTML.Utils.numSorter),w&&w.sort(AdmanHTML.Utils.numSorter);var dt=pe.getSection("midroll")||[],oo=pe.getServices("midroll",function(Et){return!Et.started()&&Et.isAfter()})||[];dt=dt.concat(oo),dt.forEach(function(Et){var st=Et.getAd();st.point||st.pointP||(st.pointP=50)}),dt.sort(function(Et,st){var an=Et.getAd(),Qi=st.getAd();return an.pointP&&Qi.pointP?an.pointP-Qi.pointP:(an.point||an.pointP/100*We)-(Qi.point||Qi.pointP/100*We)}).forEach(function(Et){if(!Et.isEmpty||!Et.isEmpty()){var st=Et.getAd();Pe&&Pe.length?(st.point=Pe.shift(),st.pointP=null,Ge.push(st.point),Et.addImmutableProperty("point",st.point)):w&&w.length?(st.pointP=w.shift(),st.point=null,Ri.push(st.pointP),Et.addImmutableProperty("pointP",st.pointP)):Pe||w||(st.point?(Et.addImmutableProperty("point",st.point),Ge.push(st.point)):st.pointP&&(Et.addImmutableProperty("pointP",st.pointP),Ri.push(st.pointP)))}}),V=Ri.sort(AdmanHTML.Utils.numSorter),D=Ge.sort(AdmanHTML.Utils.numSorter);var on=pe.getSection("research");on&&on.length>0&&(re=on[0]),R.pauseOnHide&&de(Ai)})}else{Ye.logError("Adman init failed");var ri=R.callbacks.onError;ri&&ri(),Z=Ae=K=null}}function i(T,ie){ie=ie||!1;var ae;if(Z&&(Z.log("sectionShown"),Z.disposed||(Z.dispose(),Z.disposed=!0,I(Z,K)),T&&Z.log("closedByUser")),K&&!Te[K]&&(Te[K]=K!=="midroll",ae=T?R.callbacks.onClosed:R.callbacks.onCompleted),ze[K]&&Ae&&(ze[K]=ze[K].concat(Ae.splice(0,Ae.length))),Z=Ae=K=null,a(),typeof ie=="object"&&ie.force===!0)return void((ae=R.callbacks.onError)&&ae(ie.message));ae&&ae()}function n(T){var ie=pe.getSettings(K).maxBannersShow||0,ae=Re[K]||0,He=!ie||ae<ie;if(Z&&!Z.disposed&&(Z.complete&&Z.log("playbackCompleted"),Z.dispose(),Z.disposed=!0,I(Z,K)),Ae&&Ae.length&&He)Z=Ae.shift(),Re[K]=ae+(Z.isEmpty()?0:1),Z.reset(),Z.started=!0,Z.start();else{var Ve=pe.getNextAfterService(K);K!=="midroll"&&Ve&&He?Ve.start(function(){Ae=pe.getSection(K),n()}):pe.getSettings(K).loop&&ze[K]&&ze[K].length?(Ae=ze[K],ze[K]=[],n()):i(!1,T)}}function r(T){Ae||(K=T||"preroll",pe.resetServices(K),Te[K]=!1,Ae=pe.getSection(K),T==="midroll"&&(Ae=u(Ae)),n(),K&&(ze[K]=ze[K]||[]),Z&&(Z.log("sectionStarted"),R.debugMode&&console.log(K,Z.getAd(),Z.getSettings(),Ae)),o(K),R.stats.metrics("started"))}function o(T){(Qe=pe.getDebug(T))&&Qe.start()}function a(){Qe&&Qe.dispose(),Qe=null}function c(T,ie){function ae(Ge,We){for(var dt=0;dt<Ge.length&&!(Math.abs(Ge[dt])>We);dt++);return dt>0?[Ge[dt-1]]:[]}function He(Ge){var We=Ge.getAd();return!(We.point&&D.indexOf(We.point)===-1||We.pointP&&V.indexOf(We.pointP)===-1)&&(We.point&&We.point<=Ei||We.pointP&&We.pointP<=ki)}function Ve(){Y=V.reduce(function(Ge,We){var dt=Math.ceil(ie*We/100);Ge.indexOf(dt)===-1&&Ge.push(dt)},D).sort(AdmanHTML.Utils.numSorter)}function lt(Ge){return Y.reduce(function(We,dt){return We===0&&dt>0&&dt-Ge>=0?dt-Ge:We},0)}if(!isNaN(T)&&!isNaN(ie)){var it=parseInt(T),ft=Math.floor(100*T/ie);he=ie,oe=V&&isFinite(ft)?ae(V,ft):[],fe=D?ae(D,it):[],oe[0]&&fe[0]&&(Math.abs(oe[0]*he/100)>Math.abs(fe[0])?fe=[]:oe=[]);var at=typeof pe=="object"&&typeof pe.getSettings=="function"?pe.getSettings("midroll").midpointAllowableDelta:void 0;B=at??B;var Ai=100*B/ie,ri=B!==0&&B<5?B:5,Ei=it+ri,ki=ft+ri/ie*100;if(pe.getServices("midroll",function(Ge){return!(!Ge.isAfter()||Ge.started()||!He(Ge))}).forEach(function(Ge){var We=it-Ge.getAd().point,dt=ft-Ge.getAd().pointP;We<B||dt<Ai||B===0?Ge.start():R.debugMode&&console.log("skip midroll fetch")}),oe.length&&oe[0]>0||fe.length&&fe[0]>0){var Bi=!1,Ri=pe.getSection("midroll");Ri&&Ri.forEach(function(Ge){var We=Ge.getAd();(We.pointP&&~oe.indexOf(We.pointP)||We.point&&~fe.indexOf(We.point))&&(Bi=!0)}),Bi&&R.cb("adMidrollPoint",[T])}return R.forcePreloadAdditionalData?(Ve(),lt(T)):void 0}}function u(T){function ie(He,Ve){var lt=He.getAd(),it=Ve.getAd();return(lt.point||lt.pointP*he/100)-(it.point||it.pointP*he/100)}var ae=[];return T&&T.forEach(function(He){var Ve=He.getAd();(Ve.pointP&&~oe.indexOf(Ve.pointP)||Ve.point&&~fe.indexOf(Ve.point))&&ae.push(He)}),D.forEach(function(He,Ve){~fe.indexOf(He)&&(D[Ve]=-D[Ve])}),V.forEach(function(He,Ve){~oe.indexOf(He)&&(V[Ve]=-V[Ve])}),ae.sort(ie),ae}function g(){R.cb("onSkipped"),Z&&(Z.log("closedByUser"),Z.skip(n))}function p(){Z&&(Z.log("playbackPaused"),Z.pause())}function s(T){Z&&(T||Z.log("playbackResumed"),Z.resume())}function l(T){T=T<0?0:T>1?1:T,Z&&Z.setVolume(T)}function m(){Z&&Z.log("fullscreenOn")}function v(){Z&&Z.log("fullscreenOff")}function y(){i()}function _(T,ie){R.callbacks[T]=ie}function C(T){var ie=[],ae=pe.getSection(T||"preroll");return ae&&ae.forEach(function(He){He.isEmpty()||ie.push(He.getExtendedAdForApp())}),ie}function k(T){return pe.getAfterServices(T||"preroll")}function I(T,ie){T.isEmpty()||T.isStat()||ze[ie]&&ze[ie].push(T)}function h(T){return(T.right-T.left)*(T.bottom-T.top)}function b(T,ie){return{left:T.left+ie.left,right:T.right+ie.left,top:T.top+ie.top,bottom:T.bottom+ie.top}}function x(T){return T&&!isNaN(T)?T:null}function E(T,ie){var ae=T.document,He=ie==="width"?"clientWidth":"clientHeight",Ve=ie==="width"?"innerWidth":"innerHeight",lt=T[Ve],it=ae.body[He],ft=ae.documentElement[He],at=1/0;return at=x(it)||at,at=x(ft)||at,lt&&!isNaN(lt)&&(at=Math.min(at,lt)),at}function $(T){return{width:E(T,"width"),height:E(T,"height")}}function L(T,ie){var ae=$(ie);return{left:Math.max(0,T.left),right:Math.min(ae.width,T.right),top:Math.max(0,T.top),bottom:Math.min(ae.height,T.bottom)}}function A(T,ie){try{for(var ae=T.getBoundingClientRect(),He=h(ae),Ve=ie,lt=Ve.parent;Ve!==lt;){var it=Ve.frameElement.getBoundingClientRect();ae=b(ae,it);var ft=Math.max(it.left,ae.left),at=Math.min(it.right,ae.right),Ai=Math.max(it.top,ae.top),ri=Math.min(it.bottom,ae.bottom);ae.left=ft,ae.right=at<ft?ft:at,ae.top=Ai,ae.bottom=ri<Ai?Ai:ri,Ve=Ve.parent}ae=L(ae,lt);var Ei=h(ae);return{left:ae.left,right:ae.right,top:ae.top,bottom:ae.bottom,percent:Ei/He*100}}catch{return{left:0,right:0,top:0,bottom:0,percent:0}}}function M(){return window.hasOwnProperty("IntersectionObserver")}function f(T){try{if(T===T.top)return"ON_PAGE";for(var ie=T;ie!==ie.parent;){if(ie.document.domain!==ie.parent.document.domain)return"XD_FRAME";ie=ie.parent}return"S_FRAME"}catch{}return"XD_FRAME"}function j(T){return!M(T)&&f(T)!=="XD_FRAME"}function F(T,ie,ae){J(ae,A(T,window).percent>=100*ie)}function P(T){return T.mozVisibilityState?"mozvisibilitychange":T.webkitVisibilityState?"webkitvisibilitychange":T.visibilityState?"visibilitychange":""}function O(T){J(T,!0)}function Q(T){J(T,!1)}function J(T,ie){var ae=T.getPlayStatus();T.prevVisibility!==ie&&(T.prevVisibility=ie,ae.curStatus!==void 0&&ae.curStatus!==ae.prevStatus&&(ie?T.resume():T.pause()))}function de(T){var ie=T,ae=R.viewabilityValue,He=R.viewabilityEl;if(He){if(M()){var Ve=new IntersectionObserver(function(ft){ft.forEach(function(at){J(ie,at.intersectionRatio>=ae)})},{threshold:[.1,.2,.3,.4,.5,.6,.7,.8,.9,1]});Ve.observe(He)}else if(j){var lt=function(){F(He,ae,ie)};window.addEventListener("resize",lt,!1),window.addEventListener("scroll",lt,!1)}}var it=(P(document),le.hasFocus());setInterval(function(){var ft=le.hasFocus();it!==ft&&(it=ft,it?O(ie):Q(ie))},500)}function ee(){return R.playStatus===void 0?{prevStatus:void 0,curStatus:void 0}:R.playStatus}var pe,K,Ae,Z,Qe,re,he,R={version:"2.2.57",debugMode:!0,callbacks:{},cb:function(T,ie){switch(T){case"onCompleted":Z&&(Z.complete=!0),n();break;case"onError":Z&&(Z.error=!0),n(ie);break;case"onClosed":i(!0);break;default:var ae=R.callbacks[T];ae&&ae.apply(this,ie)}}},Ee=window.location.protocol==="http:"?"http:":"https:",ge=Ee+"//ad.mail.ru/static/admanhtml/vpaid-js-interface.swf",xe=Ee+"//ad.mail.ru/static/rbadman-vpaid.html",Ye=new AdmanHTML.Stats(R),je=new AdmanHTML.Viewability,Pe=[],w=[],D=[],V=[],Y=[],oe=[],fe=[],Re={},ze={},B=3,te=function(){for(var T=window,ie=frameElement;ie;){try{ie=T.parent.frameElement}catch{break}T=T.parent}return T}(),le=te.document;R.stats=Ye,R.viewability=je,R.protocol=Ee,R.stats.metrics();var Te={};return{init:t,start:r,stop:y,pause:p,resume:s,setVolume:l,fullscreenOn:m,fullscreenOff:v,setFullscreen:function(T){T?m():v()},skip:g,destroy:y,getPlayStatus:ee,getSlot:function(){return R.slotId},setSlot:function(T){R.slotId=T},getVersion:function(){return R.version},getBannersForSection:C,getServicesForSection:k,hasSection:function(T){return T=T||"preroll",!(!C(T).length&&!k(T).length)},setDebug:function(T){R.debugMode=T},setPosition:c,getUserIdQuery:AdmanHTML.Utils.getUserIdQuery,onReady:_.bind(this,"onReady"),onError:_.bind(this,"onError"),onStarted:_.bind(this,"onStarted"),onPaused:_.bind(this,"onPaused"),onPlayed:_.bind(this,"onPlayed"),onCompleted:_.bind(this,"onCompleted"),onClosed:_.bind(this,"onClosed"),onSkipped:_.bind(this,"onSkipped"),onClicked:_.bind(this,"onClicked"),onTimeRemained:_.bind(this,"onTimeRemained"),onDurationChanged:_.bind(this,"onDurationChanged"),adMidrollPoint:_.bind(this,"adMidrollPoint"),_onVPAIDStarted:_.bind(this,"onVPAIDStarted"),research:{pause:function(){re&&re.pause()},resume:function(){re&&re.resume()},complete:function(){re&&re.setComplete()},setVolume:function(T){re&&re.setVolume(T)},setFullscreen:function(T){re&&re.setFullscreen(T)},setPosition:function(T,ie){re&&re.setPosition(T,ie)}}}},AdmanHTML.Ad=function(e,t){"use strict";function i(h){h&&h.forEach(function(b){n(b.url,b.type,b)})}function n(h,b,x){var E,$,L,A;if(h){try{h=decodeURIComponent(h)}catch{}if(b==="playheadReachedValue")x.thresholdValue!==void 0||x.value!==void 0?(E=parseInt(x.thresholdValue||x.value,10),t.stats.push({name:"thresholdValue",value:E,type:"thresholdValue."+E,url:h})):x.thresholdPValue===void 0&&x.pvalue===void 0||(E=parseInt(x.thresholdPValue||x.pvalue,10),t.stats.push({name:"thresholdPValue",value:E,type:"thresholdPValue."+E,url:h}));else if(b==="playheadViewabilityValue"){var M=parseInt(x.viewablePercent,10),f=x.ovv===void 0&&x.mrc===void 0||!!x.ovv||!!x.mrc,j="";L=x.startTimer!==void 0?parseInt(x.startTimer,10):0,A=x.endTimer!==void 0?parseInt(x.endTimer,10):0,M=isNaN(M)?50:M,x.value!==void 0?(E=parseInt(x.value,10),$="ovvValue"):x.pvalue!==void 0?(E=parseInt(x.pvalue,10),$="ovvPValue"):x.duration!==void 0&&(E=parseInt(x.duration,10),$="mrcValue",f||(j=x.unload?"unload":"complete"));var F={name:$,value:E,url:h,percent:M,viewable:f,start:L,end:A,onevent:j};"target"in x&&(F.target=x.target),t.stats.push(F)}else if(b==="playheadTimerValue"){L=x.startTimer!==void 0?parseInt(x.startTimer,10):0,A=x.endTimer!==void 0?parseInt(x.endTimer,10):0;var P=x.rate!==void 0?parseInt(x.rate,10):1;t.stats.push({name:"timerValue",rate:P,url:h,start:L,end:A})}else t.stats.push({name:b,type:b,url:h})}}function r(h){t.click=h,t.ad&&(t.ad.urlToNavigateOnClick=h)}function o(h,b){t.extensions[h]=b}function a(h,b,x){!x&&h in t.immutables||(t.immutables[h]=b)}function c(h){t.settings=t.settings||{},AdmanHTML.Utils.deepExtend(t.settings,h)}function u(h){function b(A){var M=A.type||"";return!(~M.indexOf("video")&&M!=="video/mp4"||~M.indexOf("audio")&&M!=="audio/mp3"&&M!=="audio/mpeg")}function x(){e.stats.rb(e.stats.code.UNKNOWN_ADV_TYPE),e.stats.logError("UNKNOWN_ADV_TYPE")}if(t.ad=h,t.click&&(t.ad.urlToNavigateOnClick=t.click),AdmanHTML.Utils.mixin(t.ad,t.extensions),AdmanHTML.Utils.mixin(t.ad,t.immutables),t.ad.mediafiles&&t.ad.mediafiles.length){var E;t.ad.mediafiles.forEach(function(A){b(A)&&(!E||Math.abs(parseInt(A.height)-e.quality)<Math.abs(parseInt(E.height)-e.quality))&&(E=A)}),E&&AdmanHTML.Utils.mixin(t.ad,E)}delete t.ad.statistics,delete t.ad.mediafiles;var $,L;switch(t.ad.type){case"swf":case"application/x-shockwave-flash":if(L=t.ad.apiFramework||t.ad.api,e.browser.mobile||L&&L!=="VPAID")return x(),!1;$=L?new AdmanHTML.VpaidSwfAdRenderer(e,this):new AdmanHTML.SwfAdRenderer(e,this);break;case"javascript":case"application/javascript":if((L=t.ad.apiFramework||t.ad.api)&&L!=="VPAID")return x(),!1;$=new AdmanHTML.VpaidJsAdRenderer(e,this);break;case"video":case"video/mp4":$=new AdmanHTML.VideoAdRenderer(e,this);break;case"audio":case"audio/mp3":case"audio/mpeg":$=new AdmanHTML.AudioAdRenderer(e,this);break;case"image":case"image/bmp":case"image/gif":case"image/jpeg":case"image/png":$=new AdmanHTML.ImgAdRenderer(e,this);break;case"text":$=new AdmanHTML.TextAdRenderer(e,this);break;case"html":$=new AdmanHTML.HtmlAdRenderer(e,this);break;case"empty":$=new AdmanHTML.EmptyAdRenderer(e,this);break;case"statistics":$=new AdmanHTML.StatisticsAdRenderer(e,this);break;case"debugData":$=new AdmanHTML.DebugAdRenderer(e,this);break;case"research":$=new AdmanHTML.ResearchAdRenderer(e,this);break;case"video/x-flv":default:return x(),!1}return t.renderer=$,!0}function g(){return new AdmanHTML.Ad(e,JSON.parse(JSON.stringify(t)))}function p(){this.started&&(t.ad&&u.call(this,t.ad),this.disposed=!1,this.completed=!1,this.error=!1,this.started=!1),t.statsBackup?t.stats=t.statsBackup.slice():t.statsBackup=t.stats.slice()}function s(h,b,x){var E=h.url;E=E.replace("{requesthostname}",e.location.hostnameEncoded||""),AdmanHTML.Utils.loadImg(E);var $=b.indexOf(h);~$&&x&&b.splice($,1)}function l(h,b){var x=b.indexOf(h);~x&&b.splice(x,1)}function m(h,b){function x(f){f=25*Math.floor(f/25);var j=I["thresholdPValue."+f];j&&(A=A.concat(j))}var E=t.stats.slice(0);if(Array.isArray(h)){var $;for($=0;$<h.length&&!~E.findIndex(function(f){return f.name===h[$]});$++);h=h[$]||h.slice(-1)}if(!e.isPopupOpen||h!=="playbackPaused"&&h!=="playbackResumed"){var L=h+(b===void 0?"":"."+b),A=I[L]?I[L].slice(0):[];A.push(L),h==="thresholdPValue"&&x(b);var M=h==="thresholdPValue"||h==="thresholdValue"||h==="closedByUser";t.stats.forEach(function(f){(h==="thresholdPValue"&&f.name==="thresholdPValue"&&f.value<b||h==="thresholdValue"&&f.name==="thresholdValue"&&f.value<b)&&s(f,E,M),~A.indexOf(f.type)&&s(f,E,M)}),t.stats=E}}function v(h,b){function x(M,f){f[Math.ceil(M.percent/10)].duration>=1e3*M.value?M.viewable?s(M,$,!0):l(M,$):L++}function E(M){M.viewable||M.onevent===b&&s(M,$,!0)}var $=t.stats.slice(0),L=0,A=h&&h.length?x:E;return t.stats.forEach(function(M){M.name==="mrcValue"&&A(M,h)}),t.stats=$,L}function y(h,b){var x,E,$=t.stats.slice(0);t.stats.forEach(function(L){(L.name==="ovvValue"&&L.value<=h||L.name==="ovvPValue"&&L.value<=b)&&(x=x||e.viewability.getViewabilityState(),E=x.percent>L.percent&&x.focus,x.state!=="UNDETERMINED"&&(E&&L.viewable||!E&&!L.viewable)&&AdmanHTML.Utils.loadImg(L.url),l(L,$))}),t.stats=$}function _(h,b){t.renderer&&t.renderer[h]&&t.renderer[h](b)}function C(){var h={};return h=t.ad.type==="audio"||t.ad.type==="audio/mp3"||t.ad.type==="audio/mpeg"?{allowSeek:!1,allowSkip:!1,allowTrackChange:!1,allowVolumeChange:!1}:t.settings?{allowClose:!t.settings.hasOwnProperty("allowClose")||t.settings.allowClose,allowCloseDelay:t.settings.hasOwnProperty("allowCloseDelay")?t.settings.allowCloseDelay:0}:{allowClose:!0,allowCloseDelay:0},AdmanHTML.Utils.mixin(h,t.ad),h}function k(){var h=C();return h.statistics=t.stats.slice(0),h}t=t||{stats:[],extensions:{},immutables:{}};var I={closedByUser:["close","skipAd"],click:["addClick"],"thresholdPValue.25":["firstQuartile"],"thresholdPValue.50":["secondQuartile","midpoint"],"thresholdPValue.75":["thirdQuartile"],"thresholdPValue.100":["fourthQuartile"],playbackStarted:["start"],playbackCompleted:["complete"],volumeOff:["mute"],volumeOn:["unmute"],playbackPaused:["pause"],playbackResumed:["resume"],fullscreenOn:["fullscreen"],error:["Error"]};return{addStatCollection:i,addStat:n,addClick:r,addExtension:o,addImmutableProperty:a,addSettings:c,getSettings:function(){return t.settings},addAd:u,getAd:function(){return t.ad},getAdForApp:C,getExtendedAdForApp:k,isEmpty:function(){return t.ad.type==="empty"},isStat:function(){return t.ad.type==="statistics"},clone:g,reset:p,log:m,logMRC:v,logOVV:y,start:_.bind(this,"start"),dispose:_.bind(this,"dispose"),pause:_.bind(this,"pause"),resume:_.bind(this,"resume"),setVolume:_.bind(this,"setVolume"),setFullscreen:_.bind(this,"setFullscreen"),setComplete:_.bind(this,"setComplete"),skip:_.bind(this,"skip"),setPosition:function(h,b){t.renderer&&t.renderer.setPosition&&t.renderer.setPosition(h,b)},complete:!1,error:!1}},AdmanHTML.AdSlot=function(e,t,i){"use strict";function n(A){k||(k={});for(var M in A)A.hasOwnProperty(M)&&(k[M]=A[M])}function r(A,M,f,j,F,P){function O(J){e.stats.metrics("inited");var de={};--h,J&&(b++,J=typeof J=="string"?J.trim():J,typeof J=="object"||J.charAt(0)==="{"?(de=c(J,A,M,f||0,j,F,P),x++):J.charAt(0)==="<"?(de=u(J,A,M,f||0,j,F,P),x++):(e.stats.rb(e.stats.code.UNKNOWN_DATA_FORMAT),e.stats.logError("UNKNOWN_DATA_FORMAT"))),A.id&&(de.banners||de.services?de.banners&&L.markNonEmptyService(A.id):L.markEmptyService(A.id)),o(P)}if(f&&f>4)return void o(P);var Q=L.getService(A.id);Q&&Q.log("serviceRequested"),++h,A.url?(A.url.indexOf("ad.mail.ru/")!==-1&&A.url.indexOf("version="+e.version)===-1&&(A.url+=A.url.indexOf("?")===-1?"?":"&",A.url+="version="+e.version),AdmanHTML.Utils.xhr(A.url,O)):A.data&&setTimeout(O,0,A.data)}function o(A){if(!h){if(b&&x){var M=L.getNextOnEmptyService();if(M)return void M.start(o.bind(null,A));v();var f=A||i;return f.called||(f.called=!0,f()),void(e.debugMode&&console.log(_))}a()}}function a(){var A=e.callbacks.onError;A&&A()}function c(A,M,f,j,F,P,O){function Q(he){return he?he.filter(function(R){return R.type&&(R.type==="sectionShown"||R.type==="sectionStarted"||R.type==="sectionEmpty")}):[]}function J(he,R,Ee,ge){var xe=f?f.clone():new AdmanHTML.Ad(e);if(xe.addStatCollection(he.statistics),xe.addStatCollection(he.serviceStatistics),he.type==="additionalData"){var Ye;he.id=he.id||AdmanHTML.Utils.createIntUID(),pe.services++;var je=!_[Ee]||_[Ee].length===0;if(R>0&&je&&($[Ee]=!0),he.extensions)for(var Pe in he.extensions)he.extensions.hasOwnProperty(Pe)&&g(xe,he.extensions[Pe],Pe);if(["point","pointP","hasVolume","hasPause","allowClose","allowCloseDelay","allowSeek","allowSkip","allowTrackChange","allowVolumeChange"].forEach(function(V){V in he&&xe.addImmutableProperty(V,he[V])}),e.forcePreloadAdditionalData||he.doAfter!=="true"&&he.doAfter!==!0&&!he.doOnEmptyResponseFromId)Ye=new AdmanHTML.ServiceAd(e),s(Ee,M.id,Ye,he),R===0&&je?r(he,xe,j+1,Ee,E.PRE,O):r(he,xe,j+1,Ee,null,O);else{var w=he.doAfter==="true"||he.doAfter===!0?E.POST:null,D=function(V,Y){r(he,V||xe,he.allowRepeat?0:j+1,Ee,w,function(){Y&&Y()})};Ye=new AdmanHTML.ServiceAd(e,null,D),s(Ee,M.id,Ye,he,xe)}}else p(Ee,ge,xe,he),pe.banners++;return xe}var de,ee=A,pe={banners:0,services:0};if(typeof A=="string")try{ee=JSON.parse(A)}catch{return e.stats.rb(e.stats.code.ERROR_CONVERTING_STRING_TO_JSON),void e.stats.logError("ERROR_CONVERTING_STRING_TO_JSON")}if(ee.settings&&ee.settings.requestHostname&&!k.requestHostname&&(k.requestHostname=ee.settings.requestHostname),ee&&ee.settings&&(k=e.slot&&e.slot.getRootSettings()||k||{},n&&typeof n=="function")){var K=ee.sections&&ee.sections.preroll&&ee.sections.preroll.length&&ee.sections.preroll[0]||null;n({impressionID:ee.settings.impressionID||"",padID:ee.settings.padID||"",bannerIDs:K&&K.bannerID||""})}for(var Ae in ee.sections)if(ee.sections.hasOwnProperty(Ae)){var Z=ee.sections[Ae],Qe=0;if(ee.settings&&(de=ee.settings[Ae])&&(de.controlsStyle=ee.settings.controlsStyle||0,m(Ae,de)),Z.forEach(function(he){if(he.type==="debugData"){var R=new AdmanHTML.Ad(e);return R.addClick(he.url),void l(Ae,R,he)}var Ee=F===Ae?P:"",ge=J(he,Qe,Ae,Ee);de&&(ge.addStatCollection(Q(de.statistics)),ge.addSettings(de)),Qe++}),Z.length===0){var re=new AdmanHTML.Ad(e);de&&re.addStatCollection(Q(de.statistics)),p(Ae,"",re,{type:"empty"})}}return ee.type&&J(ee,0,F,P),pe}function u(A,M,f,j,F,P,O){function Q(Z,Qe,re){de(Z.getElementsByTagName(Qe),re)}function J(Z,Qe,re,he){Q(Z,Qe,function(R){he(pe(R),re?ee(R,re):null,R)})}function de(Z,Qe){Array.prototype.forEach.call(Z,Qe.bind(this))}function ee(Z,Qe){var re=Z.attributes.getNamedItem(Qe);return re?re.value:null}function pe(Z){return Z&&Z.childNodes&&Z.childNodes[0]&&Z.childNodes[0].wholeText?Z.childNodes[0].wholeText.trim():null}var K,Ae={banners:0,services:0};try{K=AdmanHTML.Utils.parseXml(A)}catch{return e.stats.rb(e.stats.code.ERROR_CONVERTING_STRING_TO_XML),void e.stats.logError("ERROR_CONVERTING_STRING_TO_XML")}return Q(K,"Ad",function(Z){function Qe(R){var Ee=f?f.clone():new AdmanHTML.Ad(e);J(Z,"Impression","id",function(xe){try{Ee.addStat(xe,"playbackStarted")}catch{}}),J(Z,"Extension","type",function(xe,Ye){g(Ee,xe,Ye)}),J(Z,"Error",null,function(xe){Ee.addStat(xe,"error")}),J(R,"Tracking","event",Ee.addStat);var ge=R.getElementsByTagName("VideoClicks")[0];return ge&&de(ge.childNodes,function(xe){xe.tagName==="ClickThrough"?Ee.addClick(pe(xe)):xe.tagName==="ClickTracking"&&Ee.addStat(pe(xe),"click")}),Ee}function re(R){var Ee={width:ee(R,"width"),height:ee(R,"height"),id:ee(R,"id"),assetWidth:ee(R,"assetWidth"),assetHeight:ee(R,"assetHeight"),expandedWidth:ee(R,"expandedWidth"),expandedHeight:ee(R,"expandedHeight"),apiFramework:ee(R,"apiFramework"),adSlotID:ee(R,"adSlotID"),statistics:[]};return J(R,"StaticResource",null,function(ge){Ee.staticResource=ge}),J(R,"HTMLResource",null,function(ge){Ee.htmlResource=ge}),J(R,"IFrameResource",null,function(ge){Ee.iframeResource=ge}),J(R,"CompanionClickTracking",null,function(ge){Ee.statistics.push({type:"click",url:ge})}),J(R,"Tracking","event",function(ge,xe){Ee.statistics.push({type:xe,url:ge})}),J(R,"CompanionClickThrough",null,function(ge){Ee.urlToNavigateOnClick=ge}),Ee}var he=ee(Z,"id");Q(Z,"InLine",function(R){var Ee=[];Q(R,"CompanionAds",function(ge){var xe=ee(ge,"required")||"none";Q(R,"Companion",function(Ye){var je=re(Ye);je.required=xe,Ee.push(je)})}),Q(R,"Linear",function(ge){var xe,Ye=Qe(ge),je=ge.parentNode;je&&(xe=ee(je,"adId")||ee(je,"adID")||ee(je,"AdId")||ee(je,"AdID")||ee(je,"id")),xe=xe||he;var Pe={bannerID:xe,mediafiles:[],duration:AdmanHTML.Utils.convertDuration(pe(ge.getElementsByTagName("Duration")[0]))};M.urlToNavigateOnClick&&(Pe.urlToNavigateOnClick=M.urlToNavigateOnClick),Q(ge,"MediaFile",function(w){Pe.mediafiles.push({apiFramework:ee(w,"apiFramework"),type:ee(w,"type"),width:ee(w,"width"),height:ee(w,"height"),src:pe(w)})}),Q(ge,"AdParameters",function(w){Pe.params=pe(w);try{var D=JSON.parse(Pe.params);if(D&&D.settings&&(k=e.slot&&e.slot.getRootSettings()||k||{},n&&typeof n=="function")){var V=D.sections&&D.sections.preroll&&D.sections.preroll.length&&D.sections.preroll[0]||null;D.settings&&D.settings.preroll,n({impressionID:D.settings.impressionID||"",padID:D.settings.padID||"",bannerIDs:V&&V.bannerID||""})}}catch(Y){console.log(Y)}}),Ee.length&&(Pe.companionAds=Ee),p(F||"preroll",P,Ye,Pe),Ae.banners++}),Q(R,"NonLinear",function(ge){var xe=Qe(ge),Ye={width:ee(ge,"width"),height:ee(ge,"height"),duration:AdmanHTML.Utils.convertDuration(ee(ge,"minSuggestedDuration")),mediafiles:[]};J(ge,"NonLinearClickThrough",null,function(je){xe.addStat(je,"click")}),J(ge,"StaticResource","creativeType",function(je,Pe){Ye.mediafiles.push({type:Pe,src:je})}),p(F||"overlay",P,xe,Ye),Ae.banners++})}),Q(Z,"VASTAdTagURI",function(R){Ae.services++,r({url:pe(R),id:M.id},Qe(Z),j+1,F,P,O)})}),Ae}function g(A,M,f){f==="controls"?A.addExtension("showControls",!!parseInt(M,10)):f==="skipTime2"?(M=isNaN(M)?AdmanHTML.Utils.convertDuration("00:"+M):parseInt(M,10),A.addExtension("allowCloseDelay",M)):f==="linkTxt"&&(A.addExtension("linkText",M),A.addExtension("adText",M))}function p(A,M,f,j){f.addAd(j)&&(f.sectionType=A,M===E.PRE&&$[A]&&(M=""),A=(M||"")+A,_[A]=_[A]||[],_[A].push(f))}function s(A,M,f,j,F){f.addAd(j),f.addInheritedAd(F),f.addStatCollection(j.statistics),f.addStatCollection(j.serviceStatistics),f.sectionType=A,L.addService(f,M)}function l(A,M,f){M.addAd(f)&&(M.section=A,I[A]=M)}function m(A,M){C[A]=C[A]||{},AdmanHTML.Utils.mixin(C[A],M),delete C[A].statistics,delete C[A].view,delete C[A].advertisment}function v(){"preroll midroll pauseroll overlay postroll claimroll".split(" ").forEach(function(A){var M=$[A]?_[A]:_[E.PRE+A],f=$[A]?_[E.PRE+A]:_[A],j=_[E.POST+A];_[A]=[].concat(M||[],f||[],j||[]),y(E.PRE+A),y(E.POST+A)})}function y(A){_[A]=[]}var _={},C={},k={},I={},h=0,b=0,x=0,E={PRE:"pre-",POST:"post-"},$={},L=new AdmanHTML.ServiceStorage(e);return r({url:t.url,data:t.data}),{getSection:function(A){return _[A]},getAfterServices:L.getAfterServices,getNextAfterService:L.getNextAfterService,resetServices:L.resetAll,getServices:L.getServices,removeService:L.removeService,getSettings:function(A){return C[A]||{}},getRootSettings:function(){return k},getDebug:function(A){return I[A]}}},AdmanHTML.ServiceAd=function(e,t,i){"use strict";function n(m){return t.ad=m,!0}function r(m){t.inheritedAd=m}function o(m,v){t.inheritedAd.addImmutableProperty(m,v,!0)}function a(m){var v=m?m.filter(function(y){return y.type==="serviceRequested"||y.type==="serviceAnswerEmpty"}):[];v&&v.forEach(function(y){c(y.url,y.type,y)})}function c(m,v){m=decodeURIComponent(m),t.stats.push({name:v,type:v,url:m})}function u(m){l=!0,i&&i(t.inheritedAd,m)}function g(){l=!1}function p(){return!(e.forcePreloadAdditionalData||!t.ad||!t.ad.doAfter)&&(t.ad.doAfter===!0||t.ad.doAfter==="true")}function s(m){function v(_){AdmanHTML.Utils.loadImg(_.url);var C=y.indexOf(_);~C&&y.splice(C,1)}var y=t.stats.slice(0);t.stats.forEach(function(_){_.type===m&&v(_)}),t.stats=y}t=t||{stats:[]};var l=!1;return{addStatCollection:a,addStat:c,addAd:n,addInheritedAd:r,addImmutableProperty:o,getAd:function(){return t.ad},start:u,reset:g,started:function(){return l},log:s,isAfter:p}},AdmanHTML.ServiceStorage=function(e){"use strict";function t(y,_){var C=y.getAd();m.push(C.id),l[C.id]={service:y},_&&l[_]&&(l[_].children=l[_].children||[],l[_].children.push(C.id)),e.forcePreloadAdditionalData||C.doAfter!=="true"&&C.doAfter!==!0&&!C.doOnEmptyResponseFromId||s.push(y)}function i(y){return l[y]?l[y].service:null}function n(y){var _=typeof y=="string"||typeof y=="number"?y:y.getAd().id;delete l[_];var C,k;for(C=0,k=s.length;C<k;C++)if(y=s[C],y.getAd().id===_){s.splice(C,1);break}}function r(y,_){if(!y)return[];var C,k,I=[];for(C in l)l.hasOwnProperty(C)&&(k=l[C].service,k.sectionType!==y||_&&!_(k)||I.push(k));return I}function o(y){m.forEach(function(_,C){y===_?(l[_].service.log("serviceAnswerEmpty"),m.splice(C,1),v.push(y),delete l[_]):l[_].children&&l[_].children.indexOf(y)!==-1&&l[_].children.splice(l[_].children.indexOf(y),1)})}function a(y){var _=l[y];_&&(_.children=null)}function c(){var y,_,C,k;for(y=0,_=s.length;y<_;y++)if(C=s[y],(k=C.getAd().doOnEmptyResponseFromId)&&v.indexOf(k)!==-1&&!C.isAfter())return s.splice(y,1),C;return null}function u(y){if(!y)return[];var _,C,k,I=[];for(_=0,C=s.length;_<C;_++)k=s[_],k.sectionType===y&&k.isAfter()&&!k.started()&&I.push(k);return I}function g(y){if(!y)return null;var _,C,k,I;for(_=0,C=s.length;_<C;_++)if(k=s[_],k.sectionType===y&&k.isAfter()&&!k.started()){if((I=k.getAd().doOnEmptyResponseFromId)&&v.indexOf(I)===-1)continue;return k.getAd().allowRepeat||s.splice(_,1),k}return null}function p(y){var _,C,k;for(_=0,C=s.length;_<C;_++)k=s[_],y&&k.sectionType!==y||k.reset()}var s=[],l={},m=[],v=[];return{addService:t,getService:i,getServices:r,removeService:n,resetAll:p,markEmptyService:o,markNonEmptyService:a,getAfterServices:u,getNextAfterService:g,getNextOnEmptyService:c}},typeof define=="function"&&define.amd&&define(function(){"use strict";return AdmanHTML}),AdmanHTML.VpaidLoader=function(){"use strict";function e(i,n){this.id=Math.round(1e6*Math.random()),this.video=i,this.videoIsElement=AdmanHTML.Utils.isElement(this.video),this._props={},this.autoMuted=!1,this.win=n||window}var t=300;return e.prototype.load=function(i,n){var r=document.createElement("iframe");return this.adframe=r,this.src=i,r.width="100%",r.height="100%",r.scrolling="no",r.marginWidth="0",r.marginHeight="0",r.frameBorder="0",r.src=n,r.id="ad-frame-"+this.id,r.setAttribute("allow","autoplay"),r.onload=function(){this.src.indexOf("yandex.ru")!==-1&&this.send({type:"vpaid",method:"log"}),this.send({type:"vpaid",method:"load",src:this.src,urlToNavigateOnClick:this.urlToNavigateOnClick})}.bind(this),this.processMessage=this.processMessage.bind(this),this.videoEventHandler=this.videoEventHandler.bind(this),this.videoEvents=["play","pause","volumechange","timeupdate","ended"],this.video.addEventListener("play",this.videoEventHandler),this.video.addEventListener("pause",this.videoEventHandler),this.video.addEventListener("volumechange",this.videoEventHandler),this.video.addEventListener("timeupdate",this.videoEventHandler),this.video.addEventListener("ended",this.videoEventHandler),this.win.addEventListener("message",this.processMessage),r.setAttribute("style","color-scheme: light;"),r},e.prototype.processMessage=function(i){if(i.source===this.adframe.contentWindow)try{var n=JSON.parse(i.data);switch(this.urlToNavigateOnClick&&(n.urlToNavigateOnClick=this.urlToNavigateOnClick),n.type){case"video":this.videoMessageHandler(n);break;case"vpaid":this.vpaidMessageHandler(n)}}catch{}},e.prototype.videoMessageHandler=function(i){switch(i.src&&i.src.replace(/https?:/,"")!==this.video.src.replace(/https?:/,"")&&(this.video.src=i.src),i.method){case"load":this.video.load();break;case"play":var n=this.video.play();n.then&&n.then(function(){this.video.muted&&!this.autoMutedTS&&(this.autoMutedTS=new Date().getTime())}.bind(this),function(){this.autoMuted=!0,this.autoMutedTS=new Date().getTime(),this.video.muted=!0,this.video.volume=0,this.videoEventHandler({type:"volumechange"}),this.callSet("adVolume",0),this.video.play()}.bind(this));break;case"pause":this.video.pause();break;case"muted":if(!i.value&&this.video.muted&&this.autoMutedTS&&new Date().getTime()-this.autoMutedTS<t)return;this.mutedByVPAID=i.value,this.video.muted=i.value;break;case"volume":i.value&&this.video.muted&&!this.mutedByVPAID?!this.autoMutedTS||new Date().getTime()-this.autoMutedTS>t?(this.video.muted=!1,this.video.volume=i.value):this.callSet("adVolume",0):(this.video.volume=i.value,i.value===0&&(this.video.muted=!0));break;case"styles":AdmanHTML.Utils.setStyle(this.video,i.styles);break;case"addEventListener":this.videoEvents=this.videoEvents||[],this.videoEvents.push(i.eventType),this.video.addEventListener(i.eventType,this.videoEventHandler)}},e.prototype.videoEventHandler=function(i){this.send({type:"video",method:"emit",eventType:i.type,currentTime:this.video.currentTime,duration:this.video.duration,volume:this.video.volume,muted:this.video.muted}),this.videoIsElement&&(i.type==="play"?this.onVpaidCallback("video:play"):i.type==="pause"&&this.video.currentTime>0&&this.video.currentTime<.99*this.video.duration&&this.onVpaidCallback("video:pause"))},e.prototype.vpaidMessageHandler=function(i){AdmanHTML.Utils.mixin(this._props,i.props),typeof this.onVpaidCallback=="function"&&this.onVpaidCallback(i.eventType,i.props)},e.prototype.call=function(i,n){var r={type:"vpaid",method:i};if(n&&(r.params=n),this.send(r),i in this._props)return this._props[i]},e.prototype.callGet=function(i){return this._props[i]},e.prototype.callSet=function(i,n){return i="set"+i.charAt(0).toUpperCase()+i.slice(1),this.call(i,[n])},e.prototype.send=function(i){this.adframe&&(i.id=this.id,this.adframe.contentWindow&&this.adframe.contentWindow.postMessage(JSON.stringify(i),"*"))},e.prototype.onVpaidEvent=function(i){this.onVpaidCallback=i},e.prototype.destroy=function(){if(this.adframe&&this.adframe.parentNode&&this.adframe.parentNode.removeChild(this.adframe),this.videoEvents&&this.videoEvents.length)for(var i=0,n=this.videoEvents.length;i<n;i++)this.video.removeEventListener(this.videoEvents[i],this.videoEventHandler);this.video.pause(),this.video.src="",this.autoMuted&&(this.video.muted=!1),this.adframe=null,this.win.removeEventListener("message",this.processMessage),this.win=null},e}(),AdmanHTML.Constants=function(){"use strict";return{AD_ACTIONS_DEFAULT_CONFIG:{members:["disclaimer","timer","adchoice"],positionX:"left",positionY:"top",offsetX:"6px",offsetY:"6px",disclaimerText:"Реклама",headerText:"Рекламное объявление",aboutText:"О рекламодателе",copyText:"Скопировать ID"}}}(),AdmanHTML.Stats=function(e){"use strict";function t(I){if(l){var h=v[I];h&&a("https://r.mail.ru/d"+h+".gif?rnd="+Math.random())}else m.push(I)}function i(I,h){if(!n()){if(I)try{Object.defineProperty(y,I,{writable:!1,enumerable:!0,value:h||Date.now()-u})}catch{}else y.sessionId=AdmanHTML.Utils._genSessionId();u=Date.now(),Object.keys(v).length&&a("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&metrics="+encodeURIComponent(JSON.stringify(y))+"&slot="+(g==="slot"?e.slotId:"json"))}}function n(){return["media_error_code","vpaid_error_message","skipped","completed"].some(function(I){return y.hasOwnProperty(I)})}function r(I,h,b){var x=[];if(b)for(var E in b)b.hasOwnProperty(E)&&x.push(E+"="+String(b[E]));var $="";x.length&&($="&"+x.join("&")),k||a("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&"+I+"="+encodeURI(h)+"&slot="+(g==="slot"?e.slotId:"json")+$),e.debugMode&&console&&console.log&&(console.log("MESSAGE: "+I+" = "+h),b&&console.log("MESSAGE EXTRA PARAMS: "+JSON.stringify(b)))}function o(I,h){var b=[];if(h)for(var x in h)h.hasOwnProperty(x)&&b.push(x+"="+String(h[x]));var E="";b.length&&(E="&"+b.join("&")),k||a("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&error="+encodeURI(I)+"&slot="+(g==="slot"?e.slotId:"json")+E),e.debugMode&&console&&console.warn&&console.warn("Error: "+I)}function a(I){AdmanHTML.Utils.loadImg(I)}function c(I){if(!s){var h="https://ad.mail.ru/vp/"+p+"?original="+(I.slot||"")+"&version="+I.version;s=!0,k?(console.log(h),l=!0):AdmanHTML.Utils.xhr(h,function(b){if(l=!0,b){if(typeof b=="string")try{v=JSON.parse(b.trim())}catch{}else typeof b=="object"&&(v=b);var x=m.slice();m=[],x.forEach(t)}})}}var u,g="slot",p=3107,s=!1,l=!1,m=[],v={},y={},_=AdmanHTML.Utils.getPageLocation(),C=AdmanHTML.Utils.getHostname(_||""),k=C.indexOf("localhost")!==-1;return{rb:t,logError:o,logMessage:r,simple:a,metrics:i,initMode:function(I,h){g=I,I==="slot"&&c(h)},code:{ADMAN_INSTANCE_CREATED:"ADMAN_INSTANCE_CREATED",ADMAN_SUCCESSFULLY_INITIALIZED:"ADMAN_SUCCESSFULLY_INITIALIZED",ERROR_CONVERTING_STRING_TO_JSON:"ERROR_CONVERTING_STRING_TO_JSON",ERROR_PARSING_JSON:"ERROR_PARSING_JSON",ERROR_CONVERTING_STRING_TO_XML:"ERROR_CONVERTING_STRING_TO_XML",ERROR_PARSING_XML:"ERROR_PARSING_XML",UNKNOWN_DATA_FORMAT:"UNKNOWN_DATA_FORMAT",UNKNOWN_ADV_TYPE:"UNKNOWN_ADV_TYPE"}}},AdmanHTML.StyleUtils=function(){"use strict";function e(u){return u.replace(/-+(.)?/g,function(g,p){return p?p.toUpperCase():""})}function t(u,g,p){var s,l=a[g];if(!l){for(s=0;s<c.length;s++)if(l=c[s]===""?g:e(c[s]+"-"+g),u[l]!==void 0){a[g]=l;break}}u[l]=p}function i(u){return parseInt(u)+"px"}function n(u,g){function p(s,l){return s=parseInt(s,16),l=l||1,"rgba("+(s>>16&255)+","+(s>>8&255)+","+(255&s)+","+l+")"}return Array.isArray(u)?"linear-gradient("+u.map(function(s){return p(s,g)}).join(", ")+")":p(u,g)}function r(u,g,p){var s=u.style;(p||Object.keys(g)).forEach(function(l){g.hasOwnProperty(l)&&o(s,l,g[l],g)})}function o(u,g,p,s){var l,m,v;switch(g){case"fontFace":l="fontFamily",m=p;break;case"hasBackground":p||(l="background",m="none",delete s.backgroundColor);break;case"backgroundColor":l="background",m=n(p,s.backgroundAlpha);break;case"cornerRounding":case"borderCornerRounding":l="borderRadius",m=i(Math.floor(p/2));break;case"headerColor":case"bodyColor":case"hyperlinkColor":case"textColor":l="color",m=n(p);break;case"headerSize":case"bodySize":case"hyperlinkSize":case"textSize":l="fontSize",m=i(p);break;case"headerUnderline":case"bodyUnderline":case"hyperlinkUnderline":case"textUnderline":l="text-decoration",m=p?"underline":"none",v="";break;case"headerUnderlineOnRollOver":l="text-decoration",m=p?"":"none",v=p?"":"important";break;case"headerBold":case"bodyBold":case"hyperlinkBold":case"textBold":l="fontWeight",m=p?"bold":"normal";break;case"headerIndent":case"bodyIndent":case"hyperlinkIndent":l="marginTop",m=i(p);break;case"bodyPaddingRight":l="marginRight",m=i(p);break;case"width":case"height":l=g,m=i(p);break;case"contentPadding":case"contentIndent":case"controlsSafeArea":l="padding",m=i(p);break;case"maxImageWidth":case"maxImageHeight":l=g==="maxImageWidth"?"maxWidth":"maxHeight",m=i(p);break;case"borderSize":l="borderWidth",m=i(p);break;case"borderColor":l="borderColor",m=n(p,s.borderAlpha);break;case"paddingLeft":case"paddingTop":l=g==="paddingLeft"?"left":"top",m=i(p);break;case"controlsPaddingTop":case"controlsPaddingRight":l=g==="controlsPaddingRight"?"right":"top",m=i(p)}l&&m&&(v!==void 0?u.setProperty(l,m,v):t(u,l,m))}var a={},c=["","webkit","Moz","O","ms"];return{applyStyle:r,getLength:i}}(),AdmanHTML.Utils=function(){"use strict";function e(){return he||(he=function(){try{if(window===window.top)return R;for(var w=window;w!==w.parent;){if(w.document.domain!==w.parent.document.domain)return ge;w=w.parent}return Ee}catch{}return ge}())}function t(){if(xe!==null)return xe;var w=window;try{for(;w.parent!==w&&w.document.domain===w.parent.document.domain;)w=w.parent}catch{}return xe=w,w}function i(){var w=window,D="",V=t();try{D=w.top.location.href}catch{if(V&&V.parent===w.top&&(D=V.document.referrer),!D){var Y=w.location.ancestorOrigins;Y&&Y.length&&(D=Y[Y.length-1])}}return D||(D=(V||window).document.referrer),D}function n(){return Pe.major?je:Ye}function r(w){w(n())}function o(w,D){D&&w.addEventListener("load",D,!1);var V=document.getElementsByTagName("head");if(V&&V.length){var Y=V[0];Y&&Y.appendChild(w)}}function a(w,D,V){var Y=document.getElementById(D);if(Y&&Y.parentNode){if(!V)return;Y.parentNode.removeChild(Y)}Y=document.createElement("style"),Y.type="text/css",Y.id=D,Y.innerHTML=w,o(Y)}function c(w){var D=document.querySelector("link[href*='"+w+"']");D||(D=document.createElement("link"),D.type="text/css",D.rel="stylesheet",D.href=w,o(D))}function u(w){var D=document.querySelector("script[src*='"+w+"']");D||(D=document.createElement("script"),D.setAttribute("type","text/javascript"),D.setAttribute("charset","utf8"),D.setAttribute("src",w),o(D))}function g(w,D){var V=AdmanHTML.Utils.getPageLocation();if(AdmanHTML.Utils.getHostname(V||"").indexOf("localhost")===-1){var Y=new Image;Y.onload=function(){D&&D(Y)},Y.src=w}else console.log(w)}function p(w,D,V,Y,oe){Y=Y||"GET";var fe=new XMLHttpRequest;return fe.open(Y,w,!0),fe.withCredentials=!oe,fe.setRequestHeader("Content-Type","text/plain"),fe.send(V||null),D&&(fe.onreadystatechange=function(){fe.readyState===4&&(fe.status===200?D(fe.response):D())},fe.onerror=function(){oe?D():p(w,D,V,Y,!0)}),fe}function s(w,D,V,Y,oe){oe===void 0&&(oe=!0);var fe=D*V<w*Y;oe&&(fe=!fe);var Re=fe?Y/D:V/w,ze=Math.floor(w*Re),B=Math.floor(D*Re);return{x:Math.floor((V-ze)/2),y:Math.floor((Y-B)/2),width:Math.floor(ze),height:Math.floor(B)}}function l(w){return typeof w=="object"&&!!w&&!Array.isArray(w)}function m(w){var D;for(D in w)return!1;return!0}function v(w,D){if(!w)return null;if(D){var V;for(V in D)Object.prototype.hasOwnProperty.call(D,V)&&(w[V]=D[V])}return w}function y(w,D){if(D){var V,Y;for(V in D)Object.prototype.hasOwnProperty.call(D,V)&&(Y=D[V],l(Y)?(w[V]=w[V]||{},w[V]=y(w[V],Y)):w[V]=Y)}return w}function _(w,D,V){return w=w||0,D=D||0,V=V||1,Math.min(V,Math.max(D,w))}function C(w,D){return w-D}function k(){return Math.floor(Math.random()*Math.pow(2,48)).toString()}function I(w){w=w.split("+").join(" ");for(var D,V={},Y=/[?&]?([^=]+)=([^&]*)/g;D=Y.exec(w);)V[decodeURIComponent(D[1])]=decodeURIComponent(D[2]);return V}function h(w,D){var V;document.createEvent?(V=document.createEvent("HTMLEvents"),V.initEvent(D,!0,!0)):(V=document.createEventObject(),V.eventType=D),V.eventName=D,document.createEvent?w.dispatchEvent(V):w.fireEvent("on"+V.eventType,V)}function b(w){return w?w.substring(w.indexOf("//")+2,w.indexOf("/?")):""}function x(w){var D=document.createElement("a");return D.href=w,D.hostname}function E(w){return w.replace(/^(www[0-9]?\.)?/,"")}function $(w,D,V){if(!w||!D)return!0;if(w=E(w),D=E(D),!(V&&V.URL&&Array.prototype.includes))return new RegExp("^"+D.replace(/^(\*\.?)/,"([^/]*.)?").replace(/\./g,"\\.")+"$").test(w);try{w=new URL(w);try{return D=new URL(D),w.host.includes(D.host)}catch{return w.host.includes(D)}}catch{return w.includes(D)}}function L(w){var D=w.button,V=w.which;return V||D===void 0?V:1&D?1:2&D?3:4&D?2:0}function A(w){return L(w)===1}function M(w,D){return D=D||document.body,w!==D&&D.contains(w)}function f(w){return w&&w.nodeType===1}function j(w){var D=w.ownerDocument;return D.defaultView||D.parentWindow}function F(w){w.preventDefault()}function P(w){var D;if(window.DOMParser)D=new DOMParser().parseFromString(w,"text/xml");else{if(!window.ActiveXObject)return;D=new window.ActiveXObject("Microsoft.XMLDOM"),D.async=!1,D.loadXML(w)}return D.documentElement}function O(w){if(w){var D=w.split(":");if(D.length===3){var V=parseInt(D[0],10),Y=parseInt(D[1],10),oe=D[2].split("."),fe=parseInt(oe[0],10),Re=0;if(oe.length===2&&(Re=parseInt(oe[1],10)),!(isNaN(V)||isNaN(Y)||isNaN(fe)||isNaN(Re)))return 3600*V+60*Y+fe+Re/1e3}}return NaN}function Q(w,D){var V,Y=w;for(V in D)D.hasOwnProperty(V)&&(Y=Y.replace("{{"+V+"}}",D[V]));return Y}function J(w,D){if(D=D||0,window.Worker&&window.Blob){var V,Y=new Blob(['var timeout; onmessage = function(e) {clearTimeout(timeout); if (e.data === "start") {timeout = setTimeout(function() { postMessage({}); }, '+D+");}}"]);try{V=new Worker(window.URL.createObjectURL(Y)),V.onmessage=function(){V.terminate(),w()},V.postMessage("start")}catch{return setTimeout(w,D)}return V}return setTimeout(w,D)}function de(){function w(Re){var ze={};try{var B=window[Re].getItem("rb_sync_id");B&&typeof(ze=JSON.parse(B))!="object"&&(ze={})}catch{}return ze}var D=[],V=w("localStorage"),Y=w("sessionStorage"),oe=v(V,Y);for(var fe in oe)oe.hasOwnProperty(fe)&&D.push(fe+"="+encodeURIComponent(oe[fe]));return D.join("&")}function ee(w){return/nr-vpaid(\.min)?\.js/.test(w)}function pe(w,D){w&&w.style&&K(w,D,!0)}function K(w,D,V){V=V||!1;var Y=V?function(oe,fe){w.style.setProperty(oe,fe,"important")}:function(oe,fe){w.style.setProperty(oe,fe)};Object.getOwnPropertyNames(D).forEach(function(oe){Y(oe,D[oe])})}function Ae(){function w(ze,B){return function(){return ze.apply(B,arguments)}}function D(ze){var B=ze.toString(16);return B.length===1?"0"+B:B}function V(ze,B,te){for(var le="",Te=B;Te<=te;Te++)le+=D(ze[Te]);return le}var Y="undefined",oe=typeof crypto!==Y&&crypto.getRandomValues&&w(crypto.getRandomValues,crypto)||typeof msCrypto!==Y&&window.msCrypto.getRandomValues&&w(window.msCrypto.getRandomValues,window.msCrypto),fe=function(){if(oe){var ze=new Uint8Array(16);return function(){return oe(ze),ze}}var B=new Array(16);return function(){for(var te,le=0;le<16;le++)(3&le)==0&&(te=4294967296*Math.random()),B[le]=te>>>((3&le)<<3)&255;return B}}(),Re=fe();return Re[6]=15&Re[6]|64,Re[8]=63&Re[8]|128,V(Re,0,3)+"-"+V(Re,4,5)+"-"+V(Re,6,7)+"-"+V(Re,8,9)+"-"+V(Re,10,15)}function Z(w,D){var V=AdmanHTML.Constants.AD_ACTIONS_DEFAULT_CONFIG,Y=[D,w].reduce(function(oe,fe){return fe&&Object.keys(V).forEach(function(Re){oe[Re]!==fe[Re]&&(oe[Re]=fe[Re]?fe[Re]:oe[Re]),typeof fe.members=="object"&&(oe.members=fe.members)}),oe},Object.assign({},V));return Qe(Y)?Y:V}function Qe(w){return!!Array.isArray(w.members)&&(w.members.forEach(function(D){if(["adchoice","disclaimer","timer"].indexOf(D)===-1)return!1}),typeof w.positionX=="string"&&["left","right"].indexOf(w.positionX)!==-1&&typeof w.positionY=="string"&&["top","bottom"].indexOf(w.positionY)!==-1&&typeof w.offsetX=="string"&&typeof w.offsetY=="string"&&!(typeof w.disclaimerText!="string"||!w.disclaimerText.length)&&!(typeof w.headerText!="string"||!w.headerText.length)&&!(typeof w.aboutText!="string"||!w.aboutText.length)&&!(typeof w.copyText!="string"||!w.copyText.length))}function re(w){w=w||navigator.userAgent;var D=!1;return function(V){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(V)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(V.substr(0,4)))&&(D=!0)}(w),D}var he,R=1,Ee=2,ge=3,xe=null,Ye=0,je=1,Pe=function(){var w="undefined",D="Shockwave Flash",V="application/x-shockwave-flash",Y={major:0,minor:0,release:0},oe=null;if(typeof navigator.plugins!==w&&typeof navigator.plugins[D]=="object")(oe=navigator.plugins[D].description)&&typeof navigator.mimeTypes!==w&&navigator.mimeTypes[V]&&navigator.mimeTypes[V].enabledPlugin&&(oe=oe.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),Y.major=parseInt(oe.replace(/^(.*)\..*$/,"$1"),10),Y.minor=parseInt(oe.replace(/^.*\.(.*)\s.*$/,"$1"),10),Y.release=/[a-zA-Z]/.test(oe)?parseInt(oe.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof window.ActiveXObject!==w)try{var fe=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash");fe&&(oe=fe.GetVariable("$version"))&&(oe=oe.split(" ")[1].split(","),Y.major=parseInt(oe[0],10),Y.minor=parseInt(oe[1],10),Y.release=parseInt(oe[2],10))}catch{}return Y}();return{setStyle:pe,isNRVpaid:ee,addCss:a,loadCss:c,loadJs:u,loadImg:g,xhr:p,scaleBySide:s,isEmptyObject:m,mixin:v,deepExtend:y,validateMinMax:_,numSorter:C,createIntUID:k,getQueryParams:I,triggerEvent:h,getUserIdQuery:de,getPageLocation:i,getDomain:b,getHostname:x,_genSessionId:Ae,matchHostname:$,isLeftButtonPressed:A,isElementInDocument:M,isElement:f,getElementViewport:j,preventDefault:F,parseXml:P,convertDuration:O,renderTemplate:Q,setTimeout:J,checkFlash:n,checkFlashAsync:r,FLASH_READY:je,FLASH_MISSING:Ye,getServingType:e,servingTypes:{ON_PAGE:R,S_FRAME:Ee,XD_FRAME:ge},adActionsConfigPrepare:Z,isMobile:re}}(),AdmanHTML.Viewability=function(){"use strict";function e(P,O,Q){return P.forEach(function(J){J.duration=O.focus&&O.percent>=J.threshold?J.duration+Q:0}),P}function t(P){P.forEach(function(O){O.duration=0})}function i(P){return new window.IntersectionObserver(function(O){O&&O.length&&O[0].intersectionRatio!==void 0&&(P(O[0].intersectionRatio),!M&&(O[0].intersectionRatio>0||O[0].isIntersecting)&&(M=!0,_.log("viewin")))},{threshold:j})}function n(){return $?!document[$]:x===E.XD_FRAME||!window.top.document.hasFocus||window.top.document.hasFocus()}function r(){var P=o();if(P.state!=="UNDETERMINED")return e(F,P,h),_&&(_.logMRC(F)||y()),P}function o(){var P,O,Q=n();return b?(P=f,O="DETERMINED"):x!==E.XD_FRAME?(P=a(C).percent,O="DETERMINED"):(P=0,O="UNDETERMINED"),{percent:P,focus:Q,state:O,viewinOccured:M}}function a(P,O){try{var Q=P.getBoundingClientRect(),J=c(Q),de=AdmanHTML.Utils.getElementViewport(P)||window;for(O=O||window.top;de!==O;){var ee=de.frameElement.getBoundingClientRect();Q=u(Q,ee),Q.left=Math.max(ee.left,Q.left),Q.right=Math.min(ee.right,Q.right),Q.top=Math.max(ee.top,Q.top),Q.bottom=Math.min(ee.bottom,Q.bottom),Q.right<Q.left&&(Q.right=Q.left),Q.bottom<Q.top&&(Q.bottom=Q.top),de=de.parent}Q=g(Q,O);var pe=c(Q);return Q.percent=pe/J*100,Q}catch{return{left:0,right:0,top:0,bottom:0,percent:0}}}function c(P){return(P.right-P.left)*(P.bottom-P.top)}function u(P,O){return{left:P.left+O.left,right:P.right+O.left,top:P.top+O.top,bottom:P.bottom+O.top}}function g(P,O){var Q={},J=p(O);return Q.left=Math.max(0,P.left),Q.right=Math.min(J.width,P.right),Q.top=Math.max(0,P.top),Q.bottom=Math.min(J.height,P.bottom),Q}function p(P){var O={width:1/0,height:1/0};return!isNaN(P.document.body.clientWidth)&&P.document.body.clientWidth>0&&(O.width=P.document.body.clientWidth),!isNaN(P.document.body.clientHeight)&&P.document.body.clientHeight>0&&(O.height=P.document.body.clientHeight),P.document.documentElement&&P.document.documentElement.clientWidth&&!isNaN(P.document.documentElement.clientWidth)&&(O.width=P.document.documentElement.clientWidth),P.document.documentElement&&P.document.documentElement.clientHeight&&!isNaN(P.document.documentElement.clientHeight)&&(O.height=P.document.documentElement.clientHeight),P.innerWidth&&!isNaN(P.innerWidth)&&(O.width=Math.min(O.width,P.innerWidth)),P.innerHeight&&!isNaN(P.innerHeight)&&(O.height=Math.min(O.height,P.innerHeight)),O}function s(P,O,Q){if(_=O,A=!Q,C=P,b)I=I||i(function(J){f=100*J}),I.observe(P);else if(x===E.XD_FRAME)return L=!1,void _.log("viewabilityUnmeasurable");Q||(k=setInterval(r,h)),L=!0,_.log("viewabilityMeasurable"),window.addEventListener("unload",l)}function l(){v("unload")}function m(){k||(k=setInterval(r,h))}function v(P){L&&_&&A&&_.logMRC([],P||"complete"),_=null,L=!1,A=!1,C=null,clearInterval(k),k=void 0,t(F),I&&I.disconnect(),window.removeEventListener("unload",l)}function y(){k&&(clearInterval(k),k=void 0,t(F))}var _,C,k,I,h=255,b=!!window.IntersectionObserver,x=AdmanHTML.Utils.getServingType(),E=AdmanHTML.Utils.servingTypes,$=function(){for(var P=["h","webkitH","mozH","msH","oH"],O=0;O<P.length;O++)if(document[P[O]+"idden"]!==void 0)return P[O]+"idden";return""}(),L=!1,A=!1,M=!1,f=0,j=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],F=[];return j.forEach(function(P){F.push({threshold:Math.round(100*P),duration:0})}),{start:s,pause:y,resume:m,stop:v,getViewabilityState:o}},AdmanHTML.AdRenderer=function(e,t){"use strict";function i(){I.wrapperEl=I.wrapperEl||e.wrapper,I.mainEl=I.mainEl||document.createElement("div"),I.clickEl=I.clickEl||I.mainEl,AdmanHTML.Utils.isElement(I.mainEl)&&!I.mainEl.parentNode&&(I.wrapperEl.childNodes.length?I.wrapperEl.insertBefore(I.mainEl,I.wrapperEl.childNodes[0]):I.wrapperEl.appendChild(I.mainEl),k=!0),I.clickEl.addEventListener("click",I.onClick),window.addEventListener("resize",m)}function n(x){x()}function r(){e.viewability.stop(),window.removeEventListener("resize",m),I.clickEl&&I.clickEl.removeEventListener("click",I.onClick),clearTimeout(y),AdmanHTML.Utils.isElement(I.mainEl)&&k&&I.mainEl.parentNode&&I.mainEl.parentNode.removeChild(I.mainEl)}function o(){if(!h&&(h=!0,clearTimeout(y),_)){var x=Date.now()-_;C=1e3*b.duration-x}}function a(){h&&(h=!1,c())}function c(){_=Date.now();var x=C||1e3*b.duration;y=setTimeout(function(){r(),e.cb("onCompleted")},x)}function u(){b.urlToNavigateOnClick&&(b.openLinkInPopup?e.openPopup(b.urlToNavigateOnClick||b.trackingLink):window.open(b.urlToNavigateOnClick,"_blank"),t.log("click"),e.cb("onClicked"))}function g(x){e.cb("onStarted",[t.sectionType,AdmanHTML.Utils.mixin(t.getAdForApp()||{},x||{})]),t.log("playbackStarted")}function p(x,E){var $=parseInt(x/E*100);e.cb("onTimeRemained",[{remained:E-x,percent:$,duration:E,currentTime:x}]),x=parseInt(x),t.log("thresholdPValue",$),t.log("thresholdValue",x),t.logOVV(x,$)}function s(x,E){typeof x!="string"&&x?I.mainEl.appendChild(x):I.mainEl.innerHTML=x,AdmanHTML.Utils.mixin(I.mainEl.style,E)}function l(x){I.wrapperEl=x}function m(){I.onResize(I.mainEl.offsetWidth,I.mainEl.offsetHeight)}function v(){}var y,_,C,k,I={},h=!1,b=t.getAd();return I={start:i,pause:o,resume:a,skip:n,dispose:r,onClick:u,onStart:g,registerTimer:c,setView:s,setWrapper:l,onTimeRemained:p,onResize:v}},AdmanHTML.AudioAdRenderer=function(e,t){"use strict";function i(){a.mainEl=e.audioEl||document.createElement("audio"),c.forEach(function(u){a.mainEl.addEventListener(u,r)}),e.audioEl||a.setView(null,{position:"absolute",width:"1px",height:"1px",top:"-10000px",left:"-10000px"}),o=t.getAd().duration,a.mainEl.src=t.getAd().src,a.mainEl.load(),t.log("render"),a.mainEl.play(),e.audioEl||a.start()}function n(){a.dispose(),c.forEach(function(u){a.mainEl.removeEventListener(u,r)})}function r(u){var g,p;switch(u.type){case"loadedmetadata":a.onStart();break;case"play":e.cb("onPlayed");break;case"pause":e.cb("onPaused");break;case"timeupdate":g=a.mainEl.duration,p=a.mainEl.currentTime,!isNaN(g)&&o&&Math.abs(o-g)>1&&(g=o,p=Math.min(p,g)),a.onTimeRemained(p,g);break;case"ended":e.cb("onCompleted");break;case"error":e.cb("onError")}}var o,a=new AdmanHTML.AdRenderer(e,t),c=["loadedmetadata","error","pause","play","timeupdate","ended"];return{start:i,skip:a.skip,dispose:n,pause:function(){a.mainEl.pause()},resume:function(){a.mainEl.play()},setVolume:function(u){var g=a.mainEl.muted?0:a.mainEl.volume;a.mainEl.muted=u===0,a.mainEl.volume=u,(g===0&&u>0||g>0&&u===0)&&t.log(u?"volumeOn":"volumeOff")}}},AdmanHTML.CallToActionBtnRenderer=function(e,t){"use strict";function i(){this.isRendered=!1,this.background="#1a79ff",this.boxShadow="0px 0px 4px 0px #0000000F",this.ctaButtonEl=document.createElement("div"),this.ctaButtonEl.className="rb-adman-cta-btn",this.ctaButtonTextEl=document.createElement("span"),this.ctaButtonTextEl.className="rb-adman-cta-btn-text",this.ctaButtonEl.appendChild(this.ctaButtonTextEl)}function n(v){v.propertyName==="transform"&&v.target===s&&m.moveWithControls()}function r(){l.start(),p=t.getAd(),g=t.getSettings(),s=document.querySelector("div.videoplayer_controls");var v=AdmanHTML.Utils.adActionsConfigPrepare(p?p.adActionsConfig:null,g?g.adActionsConfig:null);if(!p.ctaWebEnabled||v.positionY==="bottom"&&v.positionX==="left")return void(c=Function.prototype);m.setText(p.ctaText),m.setStyles(),u=o(),m.setCustomStyles(u),m.addListeners(),m.appendTo(e.wrapper),c=function(){m.destroy()},s&&s.addEventListener("transitionstart",n)}function o(){return[e,p,g].reduce(function(v,y){return Object.keys(v).length||typeof y.ctaStyles!="object"?v:y.ctaStyles},{})}function a(){s&&s.removeEventListener("transitionstart",n),c&&c(),l.dispose()}if(!e.callToActionButton)return{render:Function.prototype,dispose:Function.prototype};var c,u,g,p,s,l=new AdmanHTML.AdRenderer(e,t);i.prototype._setStyles=function(v,y){AdmanHTML.Utils.setStyle(v,y)},i.prototype.setStyles=function(){this._setStyles(this.ctaButtonEl,{position:"absolute","font-family":"Roboto","font-style":"normal","font-weight":"500","font-size":"14px","line-height":"18px",transition:"background-color .15s ease-out,opacity .15s ease-out, transform 250ms cubic-bezier(0.455, 0.03, 0.515, 0.955)",border:"0.5px solid "+this.background,"box-shadow":this.boxShadow,height:"36px",cursor:"pointer",display:"flex","flex-direction":"row","align-items":"center",padding:"0px 20px",gap:"8px",background:this.background,"border-radius":"8px",color:"#FFF",bottom:s?"20px":"16%",left:"20px"})},i.prototype.setCustomStyles=function(v){v.background&&(this.background=v.background),this._setStyles(this.ctaButtonEl,v)},i.prototype.setText=function(v){this.ctaButtonTextEl.innerText=v&&typeof v=="string"?v:"Перейти"},i.prototype.removeFromDOM=function(){this.ctaButtonEl.remove()},i.prototype.addListeners=function(){this.ctaButtonEl.addEventListener("mouseover",this._hoverCTABtnListener.bind(this,!0)),this.ctaButtonEl.addEventListener("mouseout",this._hoverCTABtnListener.bind(this,!1)),this.ctaButtonEl.addEventListener("click",this._clickCTABtnListener.bind(this))},i.prototype.removeListeners=function(){this.ctaButtonEl.removeEventListener("mouseover",this._hoverCTABtnListener.bind(this,!0)),this.ctaButtonEl.removeEventListener("mouseout",this._hoverCTABtnListener.bind(this,!1)),this.ctaButtonEl.removeEventListener("click",this._clickCTABtnListener.bind(this))},i.prototype.destroy=function(){this.removeListeners(),this.removeFromDOM()},i.prototype._clickCTABtnListener=function(){var v=p.ctaLink||p.urlToNavigateOnClick;p.openLinkInPopup?e.openPopup(v||p.trackingLink):window.open(v,"_blank"),t.log(["ctaClick","click"]),e.cb("onClicked")},i.prototype._hoverCTABtnListener=function(v){this._setStyles(this.ctaButtonEl,{background:v?"#1460C9":this.background,"box-shadow":v?"0px 4px 8px 0px #0000000A":this.boxShadow})},i.prototype.appendTo=function(v){v&&(v.appendChild(this.ctaButtonEl),this.isRendered=!0)},i.prototype.moveWithControls=function(){var v=s.classList.contains("hidden");this.ctaButtonEl.style.setProperty("transform","translateY("+(v?"0":"-"+Math.round(s.offsetHeight))+"px)")};var m=new i;return{render:r,dispose:a}},AdmanHTML.CloseBtnRenderer=function(e,t){"use strict";function i(){o.start();var p=t.getSettings(),s=p.controlsStyle||0,l=a[s],m=c[s];m.bg=m.bg||m.width;var v={};for(var y in g)g.hasOwnProperty(y)&&(v[y]=p[y]!==void 0?p[y]:g[y]);if(v.controlsPaddingTop=v.controlsPaddingTop-v.controlsSafeArea,v.controlsPaddingRight=v.controlsPaddingRight-v.controlsSafeArea,o.setView(AdmanHTML.Utils.renderTemplate(u,{img:l,width:m.width,height:m.height,bg:m.bg}),{position:"absolute",cursor:"pointer"}),AdmanHTML.StyleUtils.applyStyle(o.mainEl,v),m.bg!==m.width){var _=m.bg-m.width,C=function(I){I.target.className==="rb-adman_close"&&(I.target.style.backgroundPosition="-"+_+"px 0")},k=function(I){I.target.className==="rb-adman_close"&&(I.target.style.backgroundPosition="0 0")};o.mainEl.addEventListener("mouseover",C),o.mainEl.addEventListener("mouseout",k),r=function(){o.mainEl.removeEventListener("mouseover",C),o.mainEl.removeEventListener("mouseout",k)}}}function n(){r&&r(),o.dispose()}var r,o=new AdmanHTML.AdRenderer(e,t),a=["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAASCAMAAAAE/YwaAAABTVBMVEUAAAD4+PiLi4sAAAD////////q6uokJCT4+PiDg4MVFRUAAAD////9/f2AgICwsLC8vLyWlpaTk5MAAADq6urGxsYmJiZra2v29vZ2dnba2trQ0NCmpqbb29unp6c0NDTs7OzPz8+xsbH+/v7///9jY2P///+fn5+ysrLe3t5LS0uzs7PBwcEuLi66urpYWFi3t7cAAAD39/fW1tb8/PzGxsba2tpKSkpUVFR/f39sbGyRkZF2dnaqqqqioqLKyspERET6+vr////l5eX////w8PD////////a2tr////Y2Nj///+Pj4////+Dg4N6enq3t7dkZGSGhoaMjIz///+amppeXl7///9MTExxcXE9PT3///////9CQkL////////////n5+fKysrq6uq9vb2jo6Pk5OScnJyoqKjk5OS9vb2IiIhAQEBeXl7///8RDLJoAAAAbnRSTlNegIEhrIlmZmWAZkky/GeCgYFnBoCAdGbzq4GAgGZmZvHfzaefnJiXkpGKcG5uZmZDQ/fq466sqqeZmJeSd2xnZvnw7Onj2dHMyMfAvLe2tLCwpJGQjH92b25ubFpYUUhA4NrQzsrHvqqolnl5b4/gN4MAAAGhSURBVCjPZdFXbxpBEMDxORYSks1VDrgOpphqwKF34t7j3lt6n+//mOFtkX/Srlaj/8NKAzG2CoJVFns5AVZuhwXtMmP5JgqaeQa8I0UF0i/O01lJkE1zgNyrBTmANWnBGgAs+351PK761cq4UvX9ZYAN0yzYdsEsntqnRdPcoOh8WukgdipeCy11Oj0HaJnFDOLXgp1G68gxWxRFarXJd5R/f0G5OKnVIgBbjjNcQvlHE+WDguNsUSQFweTPJsqIbSMIAglg23U1e30+yQxd192m6MowDCVkIe4pBrkC2I3H4xcf3yN+7sfJLkV3iqLchGi0c6OQO4B9TdPO5tFSXyP7FEWTyeTlJn5APP5HzyjAoapenKTnk0xfVdVDiu7r9esdlM/2UB5e1+v3AGHPG9DHj+gcjDwvTNHj7PYY8eft309oXc5mjwBZfZRB/DboraN1outZip5SqZVEYoWu+Z16oh3oer7bzeujXrc30PUcRc+vFzzTDkILaAe88fBW8NDgvKS+EaglDizReCdoJBgrlyKCUplBjHEQcBZ7OfkPWYpTXkAiSDwAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANBAMAAACAxflPAAAAGFBMVEX///8AAAD///////////////////////8GrCwdAAAACHRSTlPMAKZNgI0NmlQIVC0AAABMSURBVAjXYxAUVmBQFhRgEFNgYGBQE2AQYgACJgEGA6YAhiAGAwYFVhEWcQaQpKOhAwMIMAsDCRgfLC8KlDdgKmAoYjCA6oebBzMfAF6oBtnQTZWMAAAAAElFTkSuQmCC","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAA0CAMAAABRjo0fAAAARVBMVEUAAAAAAAAAAAD///+3t7e3t7cAAAAtLS3FxcUAAAAtLS3z8/Px8fHIyMjCwsJKSkpKSkoAAAAAAAD29vbi4uLi4uL////qCBnnAAAAFnRSTlMAgE2Zx3c4jHxiVJLy0s2VWR8K9eSJJoi7pQAAAS1JREFUWMPs0DkSwzAIQNFoV+R90/2PGg0DTQI2RQoX/hUN84ReT09Pf22JViwu/E58G7F3ZFdWZERqZXaQEamVgdCRY95Hjiwx/2YvW37eZi6L/EEld46pywVOYg9KQ1+Z+iHxJ4EDDEuB9L0DzlaFNpBYKDuxLEFDFRtEqJOhToJ6GepFyJ0kQfWku0DHXLLDcpkPDbRPaazYmKZdBc1tCg4KbZw10NQmXyHfxkkFFQsSOrZooGRAQsckFZQtSgGGrIFGg5KHYdRABISAoAIiwHsEVRBJ6KggktDRQCSRo4FIIkcDkUSOBiKJnDtCn1EadIMtMVAheQ+uDEuNImhwFarUqCYGV8VHPYsGvnFCi+YW3RqQdGsS062RT69uC906YvTqWo6CUTAKqAkAIPxHpRLLbKUAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAAAiCAMAAADRYI/HAAAAOVBMVEUAAAD///+7u7uxsbF9fX2Pj4/W1taJiYn39/eTk5PNzc2tra2CgoLx8fHIyMioqKiioqJ3d3fh4eHCLdXsAAAAAXRSTlMAQObYZgAAAPhJREFUSMfszksOgzAMRdFiYoKdL+x/sTWRDJXyppU66BtF6HLk13+/vbTCpac4AtzxFNYTmH32IoQceVrMIXzcQbpNU7pvOcxoNK2Z4reYcS5gJ/kpZigq1BRHyArYkCOx4aLFB9lwst0IEy6Iv4Jo3ZexvSpGUveiJ4woEe2jsIciJLFIuR5FhBNEKq2mDGOlipAuOcpVSMzSITJ+tpgGhpDCMZhiRohcEOKKGxPiCrMbAHHFDYAs44j3wM7BE8VAI4Bm4ItioClAMyBsyg2hsncoD1jKo5jyxEZBsueAJ3sqZsDBWJ5QXjxSXlBTXmVQo/KiZjUKAAVsE9yzWNzOAAAAAElFTkSuQmCC"],c=[{width:18,height:18,bg:36},{width:13,height:13},{width:26,height:26,bg:52},{width:17,height:17,bg:34}],u='<div class="rb-adman_close" style="background:url({{img}});background-size:{{bg}}px 100%;width:{{width}}px;height:{{height}}px""></div>',g={controlsPaddingTop:3,controlsPaddingRight:0,controlsSafeArea:0};return o.onClick=function(p){p.stopPropagation(),p.target.className==="rb-adman_close"&&e.cb("onClosed")},{start:i,dispose:n,setWrapper:o.setWrapper}},AdmanHTML.DebugAdRenderer=function(e,t){"use strict";function i(){n.mainEl=document.createElement("span"),n.start(),n.setView("⚒ "+t.section,{position:"absolute",cursor:"pointer",top:"5px",left:"5px",background:"rgba(204,204,204,0.8)",padding:"5px",color:"#333","border-radius":"6px",font:"12px/19px Tahoma",display:"inline-block","z-index":100})}var n=new AdmanHTML.AdRenderer(e,t),r=t.getAd();return n.onClick=function(){window.open(r.urlToNavigateOnClick,"_blank")},{start:i,dispose:n.dispose}},AdmanHTML.DisclaimerRenderer=function(e,t){"use strict";function i(s,l,m,v){var y=document.createElement("style");y.appendChild(document.createTextNode(" @font-face { font-family: "+s+"; font-style: normal; font-weight: 300; unicode-range: "+v+"; src: url('"+l+"') format('"+m+"'); } ")),document.head.appendChild(y)}function n(){this.isOpened=!1,this.isSmall=!1,this.appendedTo=null,this._advPageUrlPart="https://ads.vk.com/adv_info?",this.actionsWrapperWidth=175,this.infoOrdIdDescription="",this.closeIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS43MzY0MSAwLjI2MzYwNEMxMC4wODc5IDAuNjE1MDc2IDEwLjA4NzkgMS4xODQ5MiA5LjczNjQxIDEuNTM2NEw2LjI3MyA1TDkuNzM2NDEgOC40NjM2MkMxMC4wNTg2IDguNzg1OCAxMC4wODU0IDkuMjkxNDggOS44MTY5NSA5LjY0NDI0TDkuNzM2NDEgOS43MzY0MUM5LjM4NDk0IDEwLjA4NzkgOC44MTUwOSAxMC4wODc5IDguNDYzNjIgOS43MzY0MUw1IDYuMjczTDEuNTM2NCA5LjczNjQxQzEuMTg0OTIgMTAuMDg3OSAwLjYxNTA3NiAxMC4wODc5IDAuMjYzNjA0IDkuNzM2NDFDLTAuMDg3ODY3OSA5LjM4NDk0IC0wLjA4Nzg2NzkgOC44MTUwOSAwLjI2MzYwNCA4LjQ2MzYyTDMuNzI3IDVMMC4yNjM2MDQgMS41MzY0Qy0wLjA1ODU3ODYgMS4yMTQyMSAtMC4wODU0MjcyIDAuNzA4NTM0IDAuMTgzMDU4IDAuMzU1NzY5TDAuMjYzNjA0IDAuMjYzNjA0QzAuNjE1MDc2IC0wLjA4Nzg2OCAxLjE4NDkyIC0wLjA4Nzg2OCAxLjUzNjQgMC4yNjM2MDRMNSAzLjcyN0w4LjQ2MzYyIDAuMjYzNjA0QzguODE1MDkgLTAuMDg3ODY4IDkuMzg0OTQgLTAuMDg3ODY4IDkuNzM2NDEgMC4yNjM2MDRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjY0Ii8+PC9zdmc+",this.closeIconActiveSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS43MzY0MSAwLjI2MzYwNEMxMC4wODc5IDAuNjE1MDc2IDEwLjA4NzkgMS4xODQ5MiA5LjczNjQxIDEuNTM2NEw2LjI3MyA1TDkuNzM2NDEgOC40NjM2MkMxMC4wNTg2IDguNzg1OCAxMC4wODU0IDkuMjkxNDggOS44MTY5NSA5LjY0NDI0TDkuNzM2NDEgOS43MzY0MUM5LjM4NDk0IDEwLjA4NzkgOC44MTUwOSAxMC4wODc5IDguNDYzNjIgOS43MzY0MUw1IDYuMjczTDEuNTM2NCA5LjczNjQxQzEuMTg0OTIgMTAuMDg3OSAwLjYxNTA3NiAxMC4wODc5IDAuMjYzNjA0IDkuNzM2NDFDLTAuMDg3ODY3OSA5LjM4NDk0IC0wLjA4Nzg2NzkgOC44MTUwOSAwLjI2MzYwNCA4LjQ2MzYyTDMuNzI3IDVMMC4yNjM2MDQgMS41MzY0Qy0wLjA1ODU3ODYgMS4yMTQyMSAtMC4wODU0MjcyIDAuNzA4NTM0IDAuMTgzMDU4IDAuMzU1NzY5TDAuMjYzNjA0IDAuMjYzNjA0QzAuNjE1MDc2IC0wLjA4Nzg2OCAxLjE4NDkyIC0wLjA4Nzg2OCAxLjUzNjQgMC4yNjM2MDRMNSAzLjcyN0w4LjQ2MzYyIDAuMjYzNjA0QzguODE1MDkgLTAuMDg3ODY4IDkuMzg0OTQgLTAuMDg3ODY4IDkuNzM2NDEgMC4yNjM2MDRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIxLjAwIi8+PC9zdmc+",this.aboutIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNiA2Ljc1QzYgNy4xNjQyMSA2LjMzNTc5IDcuNSA2Ljc1IDcuNUg5LjQzOTM0TDYuMjE5NjcgMTAuNzE5N0M1LjkyNjc4IDExLjAxMjYgNS45MjY3OCAxMS40ODc0IDYuMjE5NjcgMTEuNzgwM0M2LjUxMjU2IDEyLjA3MzIgNi45ODc0NCAxMi4wNzMyIDcuMjgwMzMgMTEuNzgwM0wxMC41IDguNTYwNjZWMTEuMjVDMTAuNSAxMS42NjQyIDEwLjgzNTggMTIgMTEuMjUgMTJDMTEuNjY0MiAxMiAxMiAxMS42NjQyIDEyIDExLjI1VjYuNzVDMTIgNi4zMzU3OSAxMS42NjQyIDYgMTEuMjUgNkg2Ljc1QzYuMzM1NzkgNiA2IDYuMzM1NzkgNiA2Ljc1WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42NCIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTkgMTcuNUMxMy42OTQ0IDE3LjUgMTcuNSAxMy42OTQ0IDE3LjUgOUMxNy41IDQuMzA1NTggMTMuNjk0NCAwLjUgOSAwLjVDNC4zMDU1OCAwLjUgMC41IDQuMzA1NTggMC41IDlDMC41IDEzLjY5NDQgNC4zMDU1OCAxNy41IDkgMTcuNVpNMTYgOUMxNiAxMi44NjYgMTIuODY2IDE2IDkgMTZDNS4xMzQwMSAxNiAyIDEyLjg2NiAyIDlDMiA1LjEzNDAxIDUuMTM0MDEgMiA5IDJDMTIuODY2IDIgMTYgNS4xMzQwMSAxNiA5WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42NCIvPjwvc3ZnPgo=",this.aboutIconActiveSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNiA2Ljc1QzYgNy4xNjQyMSA2LjMzNTc5IDcuNSA2Ljc1IDcuNUg5LjQzOTM0TDYuMjE5NjcgMTAuNzE5N0M1LjkyNjc4IDExLjAxMjYgNS45MjY3OCAxMS40ODc0IDYuMjE5NjcgMTEuNzgwM0M2LjUxMjU2IDEyLjA3MzIgNi45ODc0NCAxMi4wNzMyIDcuMjgwMzMgMTEuNzgwM0wxMC41IDguNTYwNjZWMTEuMjVDMTAuNSAxMS42NjQyIDEwLjgzNTggMTIgMTEuMjUgMTJDMTEuNjY0MiAxMiAxMiAxMS42NjQyIDEyIDExLjI1VjYuNzVDMTIgNi4zMzU3OSAxMS42NjQyIDYgMTEuMjUgNkg2Ljc1QzYuMzM1NzkgNiA2IDYuMzM1NzkgNiA2Ljc1WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMS4wMCIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTkgMTcuNUMxMy42OTQ0IDE3LjUgMTcuNSAxMy42OTQ0IDE3LjUgOUMxNy41IDQuMzA1NTggMTMuNjk0NCAwLjUgOSAwLjVDNC4zMDU1OCAwLjUgMC41IDQuMzA1NTggMC41IDlDMC41IDEzLjY5NDQgNC4zMDU1OCAxNy41IDkgMTcuNVpNMTYgOUMxNiAxMi44NjYgMTIuODY2IDE2IDkgMTZDNS4xMzQwMSAxNiAyIDEyLjg2NiAyIDlDMiA1LjEzNDAxIDUuMTM0MDEgMiA5IDJDMTIuODY2IDIgMTYgNS4xMzQwMSAxNiA5WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMS4wMCIvPjwvc3ZnPgo=",this.copyIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNiAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy4yIDJDNS45MTUxMyAyIDUuMDQxNjkgMi4wMDExNyA0LjM2NjU2IDIuMDU2MzNDMy43MDg5MyAyLjExMDA2IDMuMzcyNjMgMi4yMDc0NSAzLjEzODAzIDIuMzI2OThDMi41NzM1NCAyLjYxNDYgMi4xMTQ2IDMuMDczNTQgMS44MjY5OCAzLjYzODAzQzEuNzA3NDUgMy44NzI2MyAxLjYxMDA2IDQuMjA4OTMgMS41NTYzMyA0Ljg2NjU2QzEuNTAxMTcgNS41NDE2OSAxLjUgNi40MTUxMyAxLjUgNy43VjEwLjNDMS41IDEwLjg4NDggMS41MDExNyAxMS4yMzMyIDEuNTIyMjcgMTEuNDkxNEMxLjUzMTI4IDExLjYwMTcgMS41NDIzIDExLjY2NzMgMS41NSAxMS43MDI4VjExLjhDMS41NSAxMi41NjExIDEuNTUgMTMuMDYzNiAxLjYxODM4IDEzLjQ0MThDMS40MTMzMiAxMy40MDk2IDEuMjQ0MjkgMTMuMzU5NiAxLjA5MjAyIDEzLjI4MkMwLjcxNTY5NSAxMy4wOTAzIDAuNDA5NzM0IDEyLjc4NDMgMC4yMTc5ODcgMTIuNDA4QzAgMTEuOTgwMiAwIDExLjQyMDEgMCAxMC4zVjcuN0MwIDUuMTc5NzYgMCAzLjkxOTY1IDAuNDkwNDcxIDIuOTU3MDRDMC45MjE5MDEgMi4xMTAzMSAxLjYxMDMxIDEuNDIxOSAyLjQ1NzA0IDAuOTkwNDcxQzMuNDE5NjUgMC41IDQuNjc5NzYgMC41IDcuMiAwLjVIOS4yQzEwLjMyMDEgMC41IDEwLjg4MDIgMC41IDExLjMwOCAwLjcxNzk4N0MxMS42ODQzIDAuOTA5NzM0IDExLjk5MDMgMS4yMTU2OSAxMi4xODIgMS41OTIwMkMxMi4yNTE5IDEuNzI5MTUgMTIuMjk5NCAxLjg3OTg2IDEyLjMzMTYgMi4wNTgyNEMxMS45NjA1IDIgMTEuNDcxNCAyIDEwLjc1IDJINy4yWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42NCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMy4xIDYuN0MzLjEgNS41Nzk5IDMuMSA1LjAxOTg0IDMuMzE3OTkgNC41OTIwMkMzLjUwOTczIDQuMjE1NjkgMy44MTU2OSAzLjkwOTczIDQuMTkyMDIgMy43MTc5OUM0LjYxOTg0IDMuNSA1LjE3OTg5IDMuNSA2LjMgMy41SDEyLjNDMTMuNDIwMSAzLjUgMTMuOTgwMiAzLjUgMTQuNDA4IDMuNzE3OTlDMTQuNzg0MyAzLjkwOTczIDE1LjA5MDMgNC4yMTU2OSAxNS4yODIgNC41OTIwMkMxNS41IDUuMDE5ODQgMTUuNSA1LjU3OTkgMTUuNSA2LjdWMTQuM0MxNS41IDE1LjQyMDEgMTUuNSAxNS45ODAyIDE1LjI4MiAxNi40MDhDMTUuMDkwMyAxNi43ODQzIDE0Ljc4NDMgMTcuMDkwMyAxNC40MDggMTcuMjgyQzEzLjk4MDIgMTcuNSAxMy40MjAxIDE3LjUgMTIuMyAxNy41SDYuM0M1LjE3OTkgMTcuNSA0LjYxOTg0IDE3LjUgNC4xOTIwMiAxNy4yODJDMy44MTU2OSAxNy4wOTAzIDMuNTA5NzMgMTYuNzg0MyAzLjMxNzk5IDE2LjQwOEMzLjEgMTUuOTgwMiAzLjEgMTUuNDIwMSAzLjEgMTQuM1Y2LjdaTTYuMyA1SDEyLjNDMTIuODg0OCA1IDEzLjIzMzIgNS4wMDExNyAxMy40OTE0IDUuMDIyMjdDMTMuNjQ5MSA1LjAzNTE0IDEzLjcxNTMgNS4wNTIxNCAxMy43MzMxIDUuMDU3NjVDMTMuODIyNCA1LjEwNDY5IDEzLjg5NTMgNS4xNzc2NSAxMy45NDI0IDUuMjY2OTNDMTMuOTQ3OSA1LjI4NDY4IDEzLjk2NDkgNS4zNTA5NCAxMy45Nzc3IDUuNTA4NTVDMTMuOTk4OCA1Ljc2NjgxIDE0IDYuMTE1MiAxNCA2LjdWMTQuM0MxNCAxNC44ODQ4IDEzLjk5ODggMTUuMjMzMiAxMy45Nzc3IDE1LjQ5MTRDMTMuOTY0OSAxNS42NDkxIDEzLjk0NzkgMTUuNzE1MyAxMy45NDI0IDE1LjczMzFDMTMuODk1MyAxNS44MjI0IDEzLjgyMjQgMTUuODk1MyAxMy43MzMxIDE1Ljk0MjRDMTMuNzE1MyAxNS45NDc5IDEzLjY0OTEgMTUuOTY0OSAxMy40OTE0IDE1Ljk3NzdDMTMuMjMzMiAxNS45OTg4IDEyLjg4NDggMTYgMTIuMyAxNkg2LjNDNS43MTUyIDE2IDUuMzY2ODEgMTUuOTk4OCA1LjEwODU1IDE1Ljk3NzdDNC45NTA5NCAxNS45NjQ5IDQuODg0NjkgMTUuOTQ3OSA0Ljg2NjkzIDE1Ljk0MjRDNC43Nzc2NSAxNS44OTUzIDQuNzA0NjkgMTUuODIyNCA0LjY1NzY1IDE1LjczMzFDNC42NTIxNCAxNS43MTUzIDQuNjM1MTQgMTUuNjQ5MSA0LjYyMjI3IDE1LjQ5MTRDNC42MDExNyAxNS4yMzMyIDQuNiAxNC44ODQ4IDQuNiAxNC4zVjYuN0M0LjYgNi4xMTUyIDQuNjAxMTcgNS43NjY4MSA0LjYyMjI3IDUuNTA4NTVDNC42MzUxNCA1LjM1MDkzIDQuNjUyMTQgNS4yODQ2OCA0LjY1NzY1IDUuMjY2OTNDNC43MDQ2OSA1LjE3NzY1IDQuNzc3NjUgNS4xMDQ2OSA0Ljg2NjkzIDUuMDU3NjVDNC44ODQ2OCA1LjA1MjE0IDQuOTUwOTQgNS4wMzUxNCA1LjEwODU1IDUuMDIyMjdDNS4zNjY4MSA1LjAwMTE3IDUuNzE1MiA1IDYuMyA1Wk0xMy43MzgzIDUuMDU5NDVMMTMuNzM1MiA1LjA1ODMzQzEzLjczNzQgNS4wNTkwNCAxMy43MzgzIDUuMDU5NDMgMTMuNzM4MyA1LjA1OTQ1Wk0xMy45NDA1IDUuMjYxNzVDMTMuOTQwNiA1LjI2MTY5IDEzLjk0MSA1LjI2MjY0IDEzLjk0MTcgNS4yNjQ3OEwxMy45NDA1IDUuMjYxNzVaTTEzLjk0MDUgMTUuNzM4M0wxMy45NDE3IDE1LjczNTJDMTMuOTQxIDE1LjczNzMgMTMuOTQwNiAxNS43MzgzIDEzLjk0MDUgMTUuNzM4M1pNMTMuNzM4MiAxNS45NDA1QzEzLjczODMgMTUuOTQwNiAxMy43Mzc0IDE1Ljk0MDkgMTMuNzM1MyAxNS45NDE3TDEzLjczODIgMTUuOTQwNVpNNC44NjE3NSAxNS45NDA1TDQuODY0NzggMTUuOTQxN0M0Ljg2MjY1IDE1Ljk0MSA0Ljg2MTY5IDE1Ljk0MDYgNC44NjE3NSAxNS45NDA1Wk00LjY1OTQ1IDE1LjczODNDNC42NTk0MyAxNS43MzgzIDQuNjU5MDQgMTUuNzM3NCA0LjY1ODMzIDE1LjczNTJMNC42NTk0NSAxNS43MzgzWk00LjY1OTQ1IDUuMjYxNzVMNC42NTgzMyA1LjI2NDc4QzQuNjU5MDQgNS4yNjI2NCA0LjY1OTQzIDUuMjYxNjkgNC42NTk0NSA1LjI2MTc1Wk00Ljg2MjE0IDUuMDU5MjdDNC44NjIxMiA1LjA1OTI2IDQuODYxODUgNS4wNTkzOCA0Ljg2MjE0IDUuMDU5MjdMNC44NjQ3OCA1LjA1ODMzQzQuODYzNDcgNS4wNTg3NyA0Ljg2MjYgNS4wNTkwOCA0Ljg2MjE0IDUuMDU5MjdaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjY0Ii8+PC9zdmc+",this.copyIconActiveSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNiAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy4yIDJDNS45MTUxMyAyIDUuMDQxNjkgMi4wMDExNyA0LjM2NjU2IDIuMDU2MzNDMy43MDg5MyAyLjExMDA2IDMuMzcyNjMgMi4yMDc0NSAzLjEzODAzIDIuMzI2OThDMi41NzM1NCAyLjYxNDYgMi4xMTQ2IDMuMDczNTQgMS44MjY5OCAzLjYzODAzQzEuNzA3NDUgMy44NzI2MyAxLjYxMDA2IDQuMjA4OTMgMS41NTYzMyA0Ljg2NjU2QzEuNTAxMTcgNS41NDE2OSAxLjUgNi40MTUxMyAxLjUgNy43VjEwLjNDMS41IDEwLjg4NDggMS41MDExNyAxMS4yMzMyIDEuNTIyMjcgMTEuNDkxNEMxLjUzMTI4IDExLjYwMTcgMS41NDIzIDExLjY2NzMgMS41NSAxMS43MDI4VjExLjhDMS41NSAxMi41NjExIDEuNTUgMTMuMDYzNiAxLjYxODM4IDEzLjQ0MThDMS40MTMzMiAxMy40MDk2IDEuMjQ0MjkgMTMuMzU5NiAxLjA5MjAyIDEzLjI4MkMwLjcxNTY5NSAxMy4wOTAzIDAuNDA5NzM0IDEyLjc4NDMgMC4yMTc5ODcgMTIuNDA4QzAgMTEuOTgwMiAwIDExLjQyMDEgMCAxMC4zVjcuN0MwIDUuMTc5NzYgMCAzLjkxOTY1IDAuNDkwNDcxIDIuOTU3MDRDMC45MjE5MDEgMi4xMTAzMSAxLjYxMDMxIDEuNDIxOSAyLjQ1NzA0IDAuOTkwNDcxQzMuNDE5NjUgMC41IDQuNjc5NzYgMC41IDcuMiAwLjVIOS4yQzEwLjMyMDEgMC41IDEwLjg4MDIgMC41IDExLjMwOCAwLjcxNzk4N0MxMS42ODQzIDAuOTA5NzM0IDExLjk5MDMgMS4yMTU2OSAxMi4xODIgMS41OTIwMkMxMi4yNTE5IDEuNzI5MTUgMTIuMjk5NCAxLjg3OTg2IDEyLjMzMTYgMi4wNTgyNEMxMS45NjA1IDIgMTEuNDcxNCAyIDEwLjc1IDJINy4yWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMS4wMCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMy4xIDYuN0MzLjEgNS41Nzk5IDMuMSA1LjAxOTg0IDMuMzE3OTkgNC41OTIwMkMzLjUwOTczIDQuMjE1NjkgMy44MTU2OSAzLjkwOTczIDQuMTkyMDIgMy43MTc5OUM0LjYxOTg0IDMuNSA1LjE3OTg5IDMuNSA2LjMgMy41SDEyLjNDMTMuNDIwMSAzLjUgMTMuOTgwMiAzLjUgMTQuNDA4IDMuNzE3OTlDMTQuNzg0MyAzLjkwOTczIDE1LjA5MDMgNC4yMTU2OSAxNS4yODIgNC41OTIwMkMxNS41IDUuMDE5ODQgMTUuNSA1LjU3OTkgMTUuNSA2LjdWMTQuM0MxNS41IDE1LjQyMDEgMTUuNSAxNS45ODAyIDE1LjI4MiAxNi40MDhDMTUuMDkwMyAxNi43ODQzIDE0Ljc4NDMgMTcuMDkwMyAxNC40MDggMTcuMjgyQzEzLjk4MDIgMTcuNSAxMy40MjAxIDE3LjUgMTIuMyAxNy41SDYuM0M1LjE3OTkgMTcuNSA0LjYxOTg0IDE3LjUgNC4xOTIwMiAxNy4yODJDMy44MTU2OSAxNy4wOTAzIDMuNTA5NzMgMTYuNzg0MyAzLjMxNzk5IDE2LjQwOEMzLjEgMTUuOTgwMiAzLjEgMTUuNDIwMSAzLjEgMTQuM1Y2LjdaTTYuMyA1SDEyLjNDMTIuODg0OCA1IDEzLjIzMzIgNS4wMDExNyAxMy40OTE0IDUuMDIyMjdDMTMuNjQ5MSA1LjAzNTE0IDEzLjcxNTMgNS4wNTIxNCAxMy43MzMxIDUuMDU3NjVDMTMuODIyNCA1LjEwNDY5IDEzLjg5NTMgNS4xNzc2NSAxMy45NDI0IDUuMjY2OTNDMTMuOTQ3OSA1LjI4NDY4IDEzLjk2NDkgNS4zNTA5NCAxMy45Nzc3IDUuNTA4NTVDMTMuOTk4OCA1Ljc2NjgxIDE0IDYuMTE1MiAxNCA2LjdWMTQuM0MxNCAxNC44ODQ4IDEzLjk5ODggMTUuMjMzMiAxMy45Nzc3IDE1LjQ5MTRDMTMuOTY0OSAxNS42NDkxIDEzLjk0NzkgMTUuNzE1MyAxMy45NDI0IDE1LjczMzFDMTMuODk1MyAxNS44MjI0IDEzLjgyMjQgMTUuODk1MyAxMy43MzMxIDE1Ljk0MjRDMTMuNzE1MyAxNS45NDc5IDEzLjY0OTEgMTUuOTY0OSAxMy40OTE0IDE1Ljk3NzdDMTMuMjMzMiAxNS45OTg4IDEyLjg4NDggMTYgMTIuMyAxNkg2LjNDNS43MTUyIDE2IDUuMzY2ODEgMTUuOTk4OCA1LjEwODU1IDE1Ljk3NzdDNC45NTA5NCAxNS45NjQ5IDQuODg0NjkgMTUuOTQ3OSA0Ljg2NjkzIDE1Ljk0MjRDNC43Nzc2NSAxNS44OTUzIDQuNzA0NjkgMTUuODIyNCA0LjY1NzY1IDE1LjczMzFDNC42NTIxNCAxNS43MTUzIDQuNjM1MTQgMTUuNjQ5MSA0LjYyMjI3IDE1LjQ5MTRDNC42MDExNyAxNS4yMzMyIDQuNiAxNC44ODQ4IDQuNiAxNC4zVjYuN0M0LjYgNi4xMTUyIDQuNjAxMTcgNS43NjY4MSA0LjYyMjI3IDUuNTA4NTVDNC42MzUxNCA1LjM1MDkzIDQuNjUyMTQgNS4yODQ2OCA0LjY1NzY1IDUuMjY2OTNDNC43MDQ2OSA1LjE3NzY1IDQuNzc3NjUgNS4xMDQ2OSA0Ljg2NjkzIDUuMDU3NjVDNC44ODQ2OCA1LjA1MjE0IDQuOTUwOTQgNS4wMzUxNCA1LjEwODU1IDUuMDIyMjdDNS4zNjY4MSA1LjAwMTE3IDUuNzE1MiA1IDYuMyA1Wk0xMy43MzgzIDUuMDU5NDVMMTMuNzM1MiA1LjA1ODMzQzEzLjczNzQgNS4wNTkwNCAxMy43MzgzIDUuMDU5NDMgMTMuNzM4MyA1LjA1OTQ1Wk0xMy45NDA1IDUuMjYxNzVDMTMuOTQwNiA1LjI2MTY5IDEzLjk0MSA1LjI2MjY0IDEzLjk0MTcgNS4yNjQ3OEwxMy45NDA1IDUuMjYxNzVaTTEzLjk0MDUgMTUuNzM4M0wxMy45NDE3IDE1LjczNTJDMTMuOTQxIDE1LjczNzMgMTMuOTQwNiAxNS43MzgzIDEzLjk0MDUgMTUuNzM4M1pNMTMuNzM4MiAxNS45NDA1QzEzLjczODMgMTUuOTQwNiAxMy43Mzc0IDE1Ljk0MDkgMTMuNzM1MyAxNS45NDE3TDEzLjczODIgMTUuOTQwNVpNNC44NjE3NSAxNS45NDA1TDQuODY0NzggMTUuOTQxN0M0Ljg2MjY1IDE1Ljk0MSA0Ljg2MTY5IDE1Ljk0MDYgNC44NjE3NSAxNS45NDA1Wk00LjY1OTQ1IDE1LjczODNDNC42NTk0MyAxNS43MzgzIDQuNjU5MDQgMTUuNzM3NCA0LjY1ODMzIDE1LjczNTJMNC42NTk0NSAxNS43MzgzWk00LjY1OTQ1IDUuMjYxNzVMNC42NTgzMyA1LjI2NDc4QzQuNjU5MDQgNS4yNjI2NCA0LjY1OTQzIDUuMjYxNjkgNC42NTk0NSA1LjI2MTc1Wk00Ljg2MjE0IDUuMDU5MjdDNC44NjIxMiA1LjA1OTI2IDQuODYxODUgNS4wNTkzOCA0Ljg2MjE0IDUuMDU5MjdMNC44NjQ3OCA1LjA1ODMzQzQuODYzNDcgNS4wNTg3NyA0Ljg2MjYgNS4wNTkwOCA0Ljg2MjE0IDUuMDU5MjdaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIxLjAwIi8+PC9zdmc+",this.adchoiceIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMTIuNUMxMC4wMzc2IDEyLjUgMTIuNSAxMC4wMzc2IDEyLjUgN0MxMi41IDMuOTYyNDMgMTAuMDM3NiAxLjUgNyAxLjVDMy45NjI0MyAxLjUgMS41IDMuOTYyNDMgMS41IDdDMS41IDEwLjAzNzYgMy45NjI0MyAxMi41IDcgMTIuNVpNMTQgN0MxNCAxMC44NjYgMTAuODY2IDE0IDcgMTRDMy4xMzQwMSAxNCAwIDEwLjg2NiAwIDdDMCAzLjEzNDAxIDMuMTM0MDEgMCA3IDBDMTAuODY2IDAgMTQgMy4xMzQwMSAxNCA3WiIgZmlsbD0id2hpdGUiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMTFDNi41ODU3OSAxMSA2LjI1IDEwLjY2NDIgNi4yNSAxMC4yNVY2Ljc1QzYuMjUgNi4zMzU3OSA2LjU4NTc5IDYgNyA2QzcuNDE0MjEgNiA3Ljc1IDYuMzM1NzkgNy43NSA2Ljc1VjEwLjI1QzcuNzUgMTAuNjY0MiA3LjQxNDIxIDExIDcgMTFaIiBmaWxsPSJ3aGl0ZSIvPjxwYXRoIGQ9Ik02LjEwMDAyIDMuOUM2LjEwMDAyIDMuNDAyOTUgNi41MDI5NyAzIDcuMDAwMDIgM0M3LjQ5NzA4IDMgNy45MDAwMiAzLjQwMjk1IDcuOTAwMDIgMy45QzcuOTAwMDIgNC4zOTcwNiA3LjQ5NzA4IDQuOCA3LjAwMDAyIDQuOEM2LjUwMjk3IDQuOCA2LjEwMDAyIDQuMzk3MDYgNi4xMDAwMiAzLjlaIiBmaWxsPSJ3aGl0ZSIvPjwvc3ZnPgo=",this.adActionsEl=document.createElement("div"),this.adActionsEl.className="rb-adman-ad-actions",this.disclaimerWrapperEl=document.createElement("div"),this.disclaimerWrapperEl.className="disclaimer-wrapper",this.disclaimerEl=document.createElement("span"),this.disclaimerEl.className="disclaimer-text",this.remainTimeEl=document.createElement("span"),this.remainTimeEl.className="remain-time",this.adChoiceEl=document.createElement("span"),this.adChoiceEl.className="ad-choice",this.actionsWrapperEl=document.createElement("div"),this.actionsWrapperEl.className="actions-wrapper",this.actionsHeaderEl=document.createElement("div"),this.actionsHeaderEl.className="actions-header",this.actionsHeaderText=document.createElement("span"),this.actionsHeaderText.className="actions-header-text",this.actionsHeaderButton=document.createElement("span"),this.actionsHeaderButton.className="actions-header-close",this.actionsAboutEl=document.createElement("div"),this.actionsAboutEl.className="actions-about",this.actionsAboutPictureEl=document.createElement("span"),this.actionsAboutPictureEl.className="actions-about-picture",this.actionsAboutTextEl=document.createElement("span"),this.actionsAboutTextEl.className="actions-about-text",this.actionsCopyEl=document.createElement("div"),this.actionsCopyEl.className="actions-copy",this.actionsCopyPictureEl=document.createElement("div"),this.actionsCopyPictureEl.className="actions-copy-picture",this.actionsCopyTextEl=document.createElement("div"),this.actionsCopyTextEl.className="actions-copy-text",this.infoWrapperEl=document.createElement("div"),this.infoWrapperEl.className="info-wrapper",this.infoOrdIdEl=document.createElement("div"),this.infoOrdIdEl.className="info-ord-id",this.infoOrdIdDescriptionEl=document.createElement("span"),this.infoOrdIdDescriptionEl.className="info-ord-id-description",this.infoOrdIdValueEl=document.createElement("span"),this.infoOrdIdValueEl.className="info-ord-id-value"}function r(){g.start();var s=t.getSettings(),l=t.getAd();if(typeof l=="object"&&typeof l.adActionsConfig=="object"&&l.adActionsConfig.members===null||typeof s=="object"&&typeof s.adActionsConfig=="object"&&s.adActionsConfig.members===null)return void a();var m={originalBannerId:l.bannerID,cipherBannerID:l.cipherBannerID?l.cipherBannerID:null,bannerOrdId:l.ordID||null,advData:l.advData||null},v=AdmanHTML.Utils.adActionsConfigPrepare(l?l.adActionsConfig:null,s?s.adActionsConfig:null);p.build(v,m),p.init(),p.addListeners(),p.appendTo(e.wrapper),c=function(){p.destroy()}}function o(s,l){var m=Math.floor(l-s);m||(m="00"),p.updateRemainTime(m)}function a(){c&&c(),u&&typeof u=="object"&&typeof u.remove=="function"&&u.remove(),g.dispose()}if(!e.disclaimer)return{render:Function.prototype,onTimeRemained:Function.prototype,dispose:Function.prototype};var c,u,g=new AdmanHTML.AdRenderer(e,t);[{name:"Roboto",description:"cyrillic-ext",url:"https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2",format:"woff2",unicodeRange:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F"},{name:"Roboto",description:"cyrillic",url:"https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2",format:"woff2",unicodeRange:"U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116"},{name:"Roboto",description:"latin-ext",url:"https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2",format:"woff2",unicodeRange:"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF"},{name:"Roboto",description:"latin",url:"https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2",format:"woff2",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"}].forEach(function(s){i(s.name,s.url,s.format,s.unicodeRange)}),n.prototype.preBuild=function(){this.actionsHeaderEl.appendChild(this.actionsHeaderText),this.actionsHeaderEl.appendChild(this.actionsHeaderButton),this.actionsAboutEl.appendChild(this.actionsAboutPictureEl),this.actionsAboutEl.appendChild(this.actionsAboutTextEl),this.actionsCopyEl.appendChild(this.actionsCopyPictureEl),this.actionsCopyEl.appendChild(this.actionsCopyTextEl),this.infoOrdIdEl.appendChild(this.infoOrdIdDescriptionEl),this.infoOrdIdEl.appendChild(this.infoOrdIdValueEl),this.infoWrapperEl.appendChild(this.infoOrdIdEl),this.actionsWrapperEl.appendChild(this.actionsHeaderEl),this.actionsWrapperEl.appendChild(this.actionsAboutEl),this.actionsWrapperEl.appendChild(this.actionsCopyEl),this.actionsWrapperEl.appendChild(this.infoWrapperEl),this.adActionsEl.appendChild(this.disclaimerWrapperEl),this.adActionsEl.appendChild(this.actionsWrapperEl)},n.prototype.build=function(s,l){this.config=s,this.data=l,this.config.members.forEach(function(m){switch(m){case"disclaimer":this.disclaimerWrapperEl.appendChild(this.disclaimerEl);break;case"timer":this.disclaimerWrapperEl.appendChild(this.remainTimeEl);break;case"adchoice":this.disclaimerWrapperEl.appendChild(this.adChoiceEl)}}.bind(this))},n.prototype.init=function(){this._fillData(),this._setInitialStyles(),this._setSpecificStyles()},n.prototype._setSpecificStyles=function(){var s={};this.config.positionX==="left"&&(s.left=this.config.offsetX),this.config.positionX==="right"&&(s.right=this.config.offsetX),this.config.positionY==="top"&&(s.top=this.config.offsetY),this.config.positionY==="bottom"&&(s.bottom=this.config.offsetY),this._setStyles(this.adActionsEl,s),this.data.bannerOrdId||(this._setStyles(this.infoWrapperEl,{display:"none"}),this._setStyles(this.actionsCopyEl,{display:"none"}))},n.prototype._fillData=function(){this.disclaimerEl.innerText=this.config.disclaimerText,this.actionsHeaderText.innerText=this.config.headerText,this.actionsAboutTextEl.innerText=this.config.aboutText,this.actionsCopyTextEl.innerText=this.data.bannerOrdId?"Скопировать ERID":this.config.copyText,this.infoOrdIdDescriptionEl.innerText=this.infoOrdIdDescription,this.infoOrdIdValueEl.innerText=this.data.bannerOrdId||this.data.originalBannerId||this.data.cipherBannerID},n.prototype._setInitialStyles=function(){this._setStyles(this.disclaimerWrapperEl,{display:"flex","flex-direction":"row","align-items":"center",gap:"8px"}),this._setStyles(this.adChoiceEl,{"background-image":'url("'+this.adchoiceIconSrc+'")',"background-repeat":"no-repeat",width:"14px",height:"14px","background-position":"center"}),this._setStyles(this.actionsHeaderButton,{"background-image":'url("'+this.closeIconSrc+'")',"background-repeat":"no-repeat",width:"10px","background-position":"center"}),this._setStyles(this.actionsAboutPictureEl,{"background-image":'url("'+this.aboutIconSrc+'")',"background-repeat":"no-repeat",width:"17px",height:"17px","background-position":"center"}),this._setStyles(this.actionsCopyPictureEl,{"background-image":'url("'+this.copyIconSrc+'")',"background-repeat":"no-repeat",width:"17px",height:"17px","background-position":"center"}),this._setStyles(this.actionsCopyTextEl,{"margin-left":"8px"}),this._setStyles(this.actionsAboutTextEl,{"margin-left":"8px"}),this._setStyles(this.actionsHeaderEl,{width:"100%",display:"flex"}),this._setStyles(this.infoWrapperEl,{width:"100%",display:"flex",cursor:"initial"}),this._setStyles(this.infoOrdIdValueEl,{"margin-left":"9px",color:"rgba(255, 255, 255, 0.8)"}),this._setStyles(this.infoOrdIdDescriptionEl,{width:"17px","text-align":"center"}),this._setStyles(this.actionsAboutEl,{width:"100%",display:"flex",color:"rgba(255, 255, 255, 0.72)","border-radius":"8px","margin-top":"8px"}),this._setStyles(this.actionsCopyEl,{width:"100%",display:"flex",color:"rgba(255, 255, 255, 0.72)","border-radius":"8px","margin-top":"8px"}),this._setStyles(this.infoOrdIdEl,{width:"100%",display:"flex",color:"rgba(255, 255, 255, 0.72)","border-radius":"8px"}),this._setStyles(this.actionsHeaderEl,{width:"100%",display:"flex","flex-direction":"row","justify-content":"space-between"}),this._setStyles(this.actionsWrapperEl,{"flex-direction":"column","align-items":"flex-start",display:"none",width:this.actionsWrapperWidth+"px"}),this._setStyles(this.adActionsEl,{"border-radius":"5px",color:"white",cursor:"pointer",display:"flex","flex-direction":"row","align-items":"center",padding:"3px 6px",gap:"2px",position:"absolute","font-family":"Roboto","font-style":"normal","font-weight":"300","font-size":"12px","line-height":"15px"});var s=".rb-adman-ad-actions { background-color: rgba(17,17,17,0.4)!important} .rb-adman-ad-actions:hover{ background-color: rgba(17,17,17,0.8)!important} div.videoplayer_ads_skip {border-radius: 5px !important; background: rgba(17, 17, 17, 0.4) !important; color: white !important; cursor: pointer !important; padding: 5px 8px 5px 8px !important; font-weight: 300 !important; font-size: 12px !important; line-height: 15px !important; right: 6px !important; top: 6px !important;}";u=document.createElement("style"),u.styleSheet?u.styleSheet.cssText=s:u.appendChild(document.createTextNode(s)),this.adActionsEl.appendChild(u),this._setStyles(this.adChoiceEl,{width:"14px",height:"14px"})},n.prototype._setStyles=function(s,l){AdmanHTML.Utils.setStyle(s,l)},n.prototype.updateRemainTime=function(s){var l=Math.trunc(s/60),m=s-60*l;l=l.toString(),m=m.toString(),m.length===1&&(m="0"+m),this.remainTimeEl.innerText=l+":"+m},n.prototype.addListeners=function(){this.actionsAboutEl.addEventListener("mouseover",this._setHoverActionsAboutListener.bind(this,!0)),this.actionsAboutEl.addEventListener("mouseout",this._setHoverActionsAboutListener.bind(this,!1)),this.actionsAboutEl.addEventListener("click",this._redirToAboutAdvPageListener.bind(this)),this.actionsCopyEl.addEventListener("mouseover",this._setHoverActionsCopyListener.bind(this,!0)),this.actionsCopyEl.addEventListener("mouseout",this._setHoverActionsCopyListener.bind(this,!1)),this.actionsCopyEl.addEventListener("click",this._copyBannerOrdIdToClipboardListener.bind(this)),this.actionsHeaderButton.addEventListener("mouseover",this._setHoverActionsHeaderButton.bind(this,!0)),this.actionsHeaderButton.addEventListener("mouseout",this._setHoverActionsHeaderButton.bind(this,!1)),this.adActionsEl.addEventListener("click",this._clickListener.bind(this)),this.actionsHeaderButton.addEventListener("click",this._actionsHeaderButtonListener.bind(this))},n.prototype._redirToAboutAdvPageListener=function(s){s.stopPropagation();var l=this.data.advData?"data":"id",m=this.data.advData?this.data.advData:this.data.cipherBannerID;window.open(this._advPageUrlPart+l+"="+m,"_blank")},n.prototype._copyToClipboard=function(s){var l=document.createElement("textarea");document.body.appendChild(l),l.value=s,l.select(),document.execCommand("copy"),document.body.removeChild(l)},n.prototype._copyBannerOrdIdToClipboardListener=function(s){s.stopPropagation(),this._copyToClipboard(this.data.bannerOrdId)},n.prototype._setAdActionsHoverListener=function(s){s?AdmanHTML.Utils.setStyle(this.adActionsEl,{background:"rgba(17,17,17,.72)"}):AdmanHTML.Utils.setStyle(this.adActionsEl,{background:"rgba(17,17,17,.8)"})},n.prototype._actionsHeaderButtonListener=function(s){s.stopPropagation(),this._setStyles(this.actionsWrapperEl,{display:"none"}),this._setStyles(this.disclaimerWrapperEl,{display:"flex"}),this.isSmall&&this._setStyles(this.adActionsEl,{left:this.config.positionX==="left"?this.config.offsetX:"unset",right:this.config.positionX==="right"?this.config.offsetX:"unset",bottom:this.config.positionY==="bottom"?this.config.offsetY:"unset",top:this.config.positionY==="top"?this.config.offsetY:"unset","font-size":"12px",padding:"5px 6px 5px 8px"}),this.isOpened=!1},n.prototype._clickListener=function(s){s.stopPropagation(),!this.isOpened&&(this.data.advData||this.data.cipherBannerID||this.data.bannerOrdId)&&(this._setStyles(this.actionsWrapperEl,{display:"flex"}),this._setStyles(this.disclaimerWrapperEl,{display:"none"}),this.isSmall&&(this._setStyles(this.adActionsEl,{left:"2px",right:"2px"}),this.config.positionY==="top"?this._setStyles(this.adActionsEl,{top:this.config.offsetY}):this._setStyles(this.adActionsEl,{bottom:this.config.offsetY}),this._setStyles(this.adActionsEl,{"font-size":"12px",padding:"4px 6px 4px 9px"})),this.isOpened=!0)},n.prototype._setHoverActionsCopyListener=function(s){s?(this._setStyles(this.actionsCopyPictureEl,{"background-image":'url("'+this.copyIconActiveSrc+'")'}),this._setStyles(this.actionsCopyEl,{color:"rgba(255, 255, 255, 0.8)"})):(this._setStyles(this.actionsCopyPictureEl,{"background-image":'url("'+this.copyIconSrc+'")'}),this._setStyles(this.actionsCopyEl,{color:"rgba(255, 255, 255, 0.72)"}))},n.prototype._setHoverActionsAboutListener=function(s){s?(this._setStyles(this.actionsAboutPictureEl,{"background-image":'url("'+this.aboutIconActiveSrc+'")'}),this._setStyles(this.actionsAboutEl,{color:"rgba(255, 255, 255, 0.8)"})):(this._setStyles(this.actionsAboutPictureEl,{"background-image":'url("'+this.aboutIconSrc+'")'}),this._setStyles(this.actionsAboutEl,{color:"rgba(255, 255, 255, 0.72)"}))},n.prototype._setHoverActionsHeaderButton=function(s){s?this._setStyles(this.actionsHeaderButton,{"background-image":'url("'+this.closeIconActiveSrc+'")'}):this._setStyles(this.actionsHeaderButton,{"background-image":'url("'+this.closeIconSrc+'")'})},n.prototype.appendTo=function(s){if(s){try{var l=window.getComputedStyle(s).width,m=this.actionsWrapperWidth+parseInt(this.adActionsEl.style.paddingLeft)+parseInt(this.adActionsEl.style.paddingRight);(l?parseInt(l):m+1)<=m&&(this.isSmall=!0,this._setStyles(this.adActionsEl,{"border-radius":"6px","font-size":"12px",padding:"5px 6px 5px 8px"}))}catch(v){console.warn("Failed detect small wrapper size",v)}this.appendedTo=s,s.appendChild(this.adActionsEl)}},n.prototype.getEl=function(){return this.adActionsEl},n.prototype.destroy=function(){this.removeListeners(),this.removeFromDOM()},n.prototype.removeFromDOM=function(){this.adActionsEl.remove()},n.prototype.removeListeners=function(){this.actionsAboutEl.removeEventListener("mouseover",this._setHoverActionsAboutListener.bind(this,!0)),this.actionsAboutEl.removeEventListener("mouseout",this._setHoverActionsAboutListener.bind(this,!1)),this.actionsCopyEl.removeEventListener("mouseover",this._setHoverActionsCopyListener.bind(this,!0)),this.actionsCopyEl.removeEventListener("mouseout",this._setHoverActionsCopyListener.bind(this,!1)),this.actionsHeaderButton.removeEventListener("mouseover",this._setHoverActionsHeaderButton.bind(this,!0)),this.actionsHeaderButton.removeEventListener("mouseout",this._setHoverActionsHeaderButton.bind(this,!1)),this.adActionsEl.removeEventListener("mouseover",this._setAdActionsHoverListener.bind(this,!0)),this.adActionsEl.removeEventListener("mouseout",this._setAdActionsHoverListener.bind(this,!1)),this.adActionsEl.removeEventListener("click",this._clickListener.bind(this)),this.actionsHeaderButton.removeEventListener("click",this._actionsHeaderButtonListener.bind(this))};var p=new n;return p.preBuild(),{render:r,onTimeRemained:o,dispose:a}},AdmanHTML.EmptyAdRenderer=function(e,t){"use strict";function i(){t.log("sectionEmpty"),setTimeout(function(){e.cb("onCompleted")})}return{start:i}},AdmanHTML.HtmlAdRenderer=function(e,t){"use strict";function i(){x.start(),M=t.getAd(),I=M.duration,k=C(),k.width="100%",k.height="100%",k.setAttribute("style","display:block;width:100%;height:100%"),x.setView(k,{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"transparent"}),AdmanHTML.Utils.isElement(e.videoEl)&&e.videoEl.parentNode===x.mainEl.parentNode&&x.mainEl.parentNode.insertBefore(x.mainEl,e.videoEl.nextSibling),k.contentWindow||k.contentDocument?r():k.onload=function(K){r()},$&&$.render(),E&&E.render()}function n(K){K.preventDefault(),K.stopPropagation(),t.log("click"),e.cb("onClicked"),e.openPopup(M.urlToNavigateOnClick||M.trackingLink)}function r(){function K(){var Ae=k.contentWindow.document.body||k.contentDocument.body;Ae&&Ae.addEventListener("click",n,!0)}A=k.contentWindow?k.contentWindow.document:k.contentDocument,A.open(),P?(A.write('<!DOCTYPE html><html style="width: 100%; height: 100%"><head></head><body>'),A.write(M.src),A.write("</body></html>"),Q=document.querySelector("div.videoplayer_controls"),Q&&(J=Q.style.display,Q.style.display="none"),(de=document.querySelector("div.videoplayer_ads_skip"))&&(ee=de.style.display,de.style.display="none")):(A.write(M.src),t.log("render")),A.close(),L=AdmanHTML.Utils.getElementViewport(e.wrapper),L.addEventListener("message",s),M.openLinkInPopup&&(M.urlToNavigateOnClick||M.trackingLink)&&(k.contentWindow.document.body||k.contentDocument.body?K():k.onload=K),e.viewability.start(x.mainEl,t),u(),x.onStart()}function o(){f||(f=!0,j+=Date.now()-F,clearInterval(h),h=null,Q?Q.style.display=J:P&&l("pauseAd",[]),e.cb("onPaused"))}function a(){return M.creativeType==="video-motion"}function c(){f&&(f=!1,u(),e.cb("onPlayed"))}function u(){if(!h){if(P){if(!O)return;Q?Q.style.display="none":l("startAd",[])}h=setInterval(p,251),F=Date.now(),f=!1}}function g(){pe||e.cb("onCompleted")}function p(){j+=Date.now()-F,F=Date.now(),x.onTimeRemained(j/1e3,I),P?l("timeUpdateAd",[j/1e3,I]):$.onTimeRemained(j/1e3,I),j>=1e3*I&&(clearInterval(h),h=null,g())}function s(K){if(K.source===k.contentWindow){if(P&&typeof K.data=="object")return void m(K.data);try{switch(JSON.parse(K.data).type){case"trg:click":t.log("click"),e.cb("onClicked")}}catch{}}}function l(K,Ae){if(typeof k=="object"&&typeof k.contentWindow=="object")try{var Z=k.contentWindow.origin;k.contentWindow.postMessage({initiator:"render-runner",id:b,method:K,args:Ae},Z)}catch{}}function m(K){if(P&&typeof K=="object"&&K.initiator==="render-runner"&&Array.isArray(K.args)&&K.args[0]===b)switch(K.event){case"AdStarted":O=!0,u();break;case"AdCanPlay":t.log("render");break;case"HeaderClick":t.log("click"),e.cb("onClicked",{type:"header"});break;case"ItemClick":t.log("card_"+K.args[1]+"_click"),e.cb("onClicked",{type:"card",cardId:K.args[1]});break;case"ItemShow":t.log("card_"+K.args[1]+"_show");break;case"AdClickThru":t.log("click"),e.cb("onClicked",{type:"common"});break;case"AdError":e.cb("onError",K.args[1]);break;case"ClosedByUser":t.log("closedByUser"),e.cb("onClosed"),e.cb("onSkipped"),pe=null,_();break;case"UserAction":pe=Date.now()}}function v(){Q&&(Q.style.display=J),de&&(de.style.display=ee)}function y(){h&&clearInterval(h),h=null,v(),L.removeEventListener("message",s)}function _(){y(),x.dispose(),$&&$.dispose(),E&&E.dispose()}function C(){var K=document.createElement("iframe");return K.scrolling="no",K.marginWidth="0",K.marginHeight="0",K.frameBorder="0",K.id="ad-frame-"+Math.round(1e5*Math.random()),K.onclose=v,K}var k,I,h,b,x=new AdmanHTML.AdRenderer(e,t),E=new AdmanHTML.CallToActionBtnRenderer(e,t),$=null,L=null,A=null,M=t.getAd(),f=!1,j=0,F=0,P=a(),O=!1,Q=null,J="flex",de=null,ee="block",pe=null;return P?b="b"+M.bannerID:$=new AdmanHTML.DisclaimerRenderer(e,t),x.onClick=function(){},{start:i,pause:o,resume:c,skip:x.skip,dispose:_}},AdmanHTML.ImgAdRenderer=function(e,t){"use strict";function i(){r.start(),r.registerTimer(),AdmanHTML.Utils.addCss(u,c);var p=t.getAd();r.setView(AdmanHTML.Utils.renderTemplate(g,p),{position:"absolute",display:"inline-block",width:"100%","max-width":p.width+"px",left:"50%",bottom:0,transform:"translate(-50%,0)","box-sizing":"border-box",overflow:"hidden","z-index":"999999","text-align":"center"});var s=t.getSettings(),l=r.mainEl.querySelector(".rb-adman_age_wrapper");if(s&&s.advertisment&&s.advertisment.image){var m=s.advertisment.image;AdmanHTML.StyleUtils.applyStyle(r.mainEl,m,"fontFace contentIndent hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_image_wrapper"),m,"borderSize borderColor borderAlpha borderCornerRounding".split(" "));var v=s.advertisment.image.ageRestrictions;p.ageRestrictions&&v&&(AdmanHTML.StyleUtils.applyStyle(l,v),AdmanHTML.StyleUtils.applyStyle(l.querySelector(".rb-adman_age_content"),v,["textUnderline"]))}p.ageRestrictions||l.parentNode.removeChild(l),o.setWrapper(r.mainEl),o.start(),r.onStart(),a.render(),t.log("render")}function n(){r.dispose(),o.dispose(),a.dispose()}var r=new AdmanHTML.AdRenderer(e,t),o=new AdmanHTML.CloseBtnRenderer(e,t),a=new AdmanHTML.DisclaimerRenderer(e,t),c="rb-adman-img-style",u=".rb-adman_image_overlay {display:inline-block; overflow:hidden;vertical-align:middle;cursor:pointer;color:#fff}.rb-adman_image_overlay .rb-adman_image_wrapper {display:block;border:0px solid transparent;overflow:hidden;}.rb-adman_image_overlay .rb-adman_image_wrapper img {vertical-align:top;}.rb-adman_image_overlay .rb-adman_age_wrapper {display:block;position:absolute;top:0px;left:3px;border:0px solid transparent;margin-right:1px;text-decoration:none!important}",g='<div class="rb-adman_image_overlay"><div class="rb-adman_image_wrapper"><img src="{{src}}" width="100%" height="auto"></div><span class="rb-adman_age_wrapper"><span class="rb-adman_age_content">{{ageRestrictions}}</span></span></div>';return{start:i,pause:r.pause,resume:r.resume,skip:r.skip,dispose:n}},AdmanHTML.OpenLinkPopupRender=function(e){"use strict";function t(){for(var u=window;u.parent&&u.parent.frameElement;)u=u.parent;return u}function i(u){e.isPopupOpen=!0,e.pause(),a=n(u)}function n(u){a=c.createElement("div"),r(),a.classList.add("rb-adman-popup");var g=c.createElement("div");g.classList.add("rb-adman-popup-body"),a.appendChild(g);var p=c.createElement("div");p.classList.add("rb-adman-popup-closeButton");var s=a;o=function(){s.remove(),s=null,e.resume(!0),e.isPopupOpen=!1},p.onclick=o,g.appendChild(p);var l=c.createElement("iframe");l.classList.add("rb-adman-popup-frame"),l.setAttribute("src",u),g.appendChild(l),c.body.append(a)}function r(){var u=c.createElement("style");u.innerHTML=".rb-adman-popup{position:fixed;top:0;left:0;width:100vw;height:100vh;display:flex;flex-direction:row;align-items:center;justify-content:center;overflow:auto;padding: 7vh 0;box-sizing:border-box;background:rgba(0,0,0,.4);z-index: 1000000;}.rb-adman-popup-body{position:relative;max-width:630px;min-width:500px;width:50%;height:100%;z-index:20;border-radius:12px;background-color:#FFF;-webkit-box-shadow: 12px 12px 8px 0px rgba(34, 60, 80, 0.2);-moz-box-shadow: 12px 12px 8px 0px rgba(34, 60, 80, 0.2);box-shadow: 12px 12px 8px 0px rgba(34, 60, 80, 0.2);color: #FEFEFE}.rb-adman-popup-frame{width:100%;height:100%;overflow:hidden;border-radius: 12px;border:none;}.rb-adman-popup-closeButton{background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSJ3aGl0ZSIgdmlld0JveD0iMCAwIDE3IDE3IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im05LjIgOC41IDYuNjUgNi42NS0uNy43TDguNSA5LjIxbC02LjY1IDYuNjQtLjctLjdMNy43OSA4LjUgMS4xNSAxLjg1bC43LS43TDguNSA3Ljc5bDYuNjUtNi42NC43LjdMOS4yMSA4LjV6IiBzdHJva2U9Im5vbmUiLz48L3N2Zz4K);background-repeat:no-repeat;background-position:center;background-size:50%;position:absolute;top:0;right:-38px;width:28px;height:28px;border-radius:14px;padding: 4px;background-color:rgba(0,0,0,.35);background-color:#000;cursor:pointer;filter:opacity(35%);color:white;box-sizing:border-box;transition: transform .15s ease-in;}.rb-adman-popup-closeButton:hover{filter:opacity(55%);transform:scale(1.1) rotate(90deg);}",a.appendChild(u)}var o,a=null,c=t().document;return{open:i,close:o}},AdmanHTML.ResearchAdRenderer=function(e,t){"use strict";function i(b,x){var E=[];return b.forEach(function($){$.name===x&&E.push($)}),E}function n(b,x,E){return x<=b&&(!E||E>=b)}function r(){!y&&v&&(y=!0,t.log("playbackPaused"))}function o(){y&&v&&(y=!1,t.log("playbackResumed"))}function a(){v=!1,y=!1,m.stop()}function c(b){var x=!b;x!==_&&(_=x,t.log(x?"volumeOff":"volumeOn"))}function u(){v&&(k&&p(k,k),s&&I.forEach(function(b){b.completed||(b.completed=!0,!b.viewable&&AdmanHTML.Utils.loadImg(b.url))}),a())}function g(b){t.log(b?"fullscreenOn":"fullscreenOff")}function p(b,x){if(!isNaN(b)){v||(v=!0,m.start(e.playerEl,t,!0),t.log("playbackStarted")),b=Math.round(b);var E=C!==null?b-C:null;if(C=b,t.log("thresholdValue",b),!isNaN(x)&&isFinite(x)&&x>0&&(x=Math.round(x),k=x,t.log("thresholdPValue",Math.floor(b/x*100))),E<0&&t.log("rewind"),h.forEach(function(A){if(n(b,A.start,A.end)){var M=Math.floor((b-A.start)/A.rate);M>0&&A.last!==M&&(A.last=M,AdmanHTML.Utils.loadImg(A.url.replace("[CONTENTPLAYHEAD]",b)))}else A.last=null}),s!==!1&&E!==0){var $,L=E<0||E>1;I.forEach(function(A){if(n(b,A.start,A.end)&&!A.completed){$=$||m.getViewabilityState(),s=$.state==="DETERMINED";var M=$.percent>A.percent&&$.focus;A.duration=A.duration||0,A.lastViewable&&M&&!L?A.duration+=E:A.duration=0,A.lastViewable=M,A.duration>=A.value&&(A.completed=!0,A.viewable&&AdmanHTML.Utils.loadImg(A.url))}else A.duration=0,A.lastViewable=!1})}}}var s,l=t.getExtendedAdForApp().statistics,m=new AdmanHTML.Viewability,v=!1,y=!1,_=!1,C=null,k=null,I=i(l,"mrcValue"),h=i(l,"timerValue");return{pause:r,resume:o,setVolume:c,setPosition:p,setComplete:u,setFullscreen:g}},AdmanHTML.StatisticsAdRenderer=function(e,t){"use strict";function i(){t.log("playbackStarted"),AdmanHTML.Utils.setTimeout(function(){e.cb("onCompleted")})}return{start:i}},AdmanHTML.SwfAdRenderer=function(e,t){"use strict";function i(){r.start(),AdmanHTML.Utils.checkFlashAsync(function(o){o===AdmanHTML.Utils.FLASH_READY?(r.registerTimer(),r.setView(n(t.getAd().src,{width:"100%",height:"100%"},{}),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"black"}),t.log("render"),r.onStart()):e.cb("onError")})}function n(o,a,c){var u,g,p=a||{},s=c||{};p.type="application/x-shockwave-flash",window.ActiveXObject?(p.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",s.movie=o):p.data=o,g="<object";for(u in p)p.hasOwnProperty(u)&&(g+=" "+u+'="'+p[u]+'"');g+=">";for(u in s)s.hasOwnProperty(u)&&(g+='<param name="'+u+'" value="'+s[u]+'" />');return g+="</object>"}var r=new AdmanHTML.AdRenderer(e,t);return{start:i,skip:r.skip,dispose:r.dispose,createSwfObject:n,super:r}},AdmanHTML.TextAdRenderer=function(e,t){"use strict";function i(){r.start(),r.registerTimer(),AdmanHTML.Utils.addCss(u,c);var p=AdmanHTML.Utils.mixin({header:"",body:"",hyperlinkText:""},t.getAd());r.setView(AdmanHTML.Utils.renderTemplate(g,p),{position:"absolute",margin:"0 auto",left:0,right:0,bottom:0,"box-sizing":"border-box",overflow:"hidden"});var s=t.getSettings();if(s&&s.advertisment&&s.advertisment.text){var l=s.advertisment.text;AdmanHTML.StyleUtils.applyStyle(r.mainEl,l,"fontFace width height contentPadding hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_header"),l,"headerColor headerSize headerUnderline headerBold headerIndent".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_header_text"),l,["headerUnderlineOnRollOver"]),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_body"),l,"bodyColor bodySize bodyUnderline bodyLeading bodyIndent bodyPaddingRight".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_link"),l,"hyperlinkColor hyperlinkSize hyperlinkUnderline hyperlinkIndent".split(" "));var m=s.advertisment.text.ageRestrictions,v=r.mainEl.querySelector(".rb-adman_age_wrapper");p.ageRestrictions?m&&(AdmanHTML.StyleUtils.applyStyle(v,m),AdmanHTML.StyleUtils.applyStyle(v.querySelector(".rb-adman_age_content"),m,["textUnderline"])):v.parentNode.removeChild(v);var y=r.mainEl.querySelector(".rb-adman_image_wrapper span");if(l.noImage)y.parentNode.removeChild(y);else if(l.contentPadding&&(y.style.marginRight=AdmanHTML.StyleUtils.getLength(l.contentPadding)),l.maxImageHeight||l.maxImageWidth){var _=p.width/p.height;y.style.width=AdmanHTML.StyleUtils.getLength(Math.round(l.maxImageWidth||l.maxImageHeight*_)),y.style.height=AdmanHTML.StyleUtils.getLength(Math.round(l.maxImageHeight||l.maxImageWidth/_))}}o.setWrapper(r.mainEl),o.start(),a.render(),t.log("render"),r.onStart()}function n(){r.dispose(),o.dispose(),a.dispose()}var r=new AdmanHTML.AdRenderer(e,t),o=new AdmanHTML.CloseBtnRenderer(e,t),a=new AdmanHTML.DisclaimerRenderer(e,t),c="rb-adman-text-style",u=".rb-adman_text_overlay {display:block; overflow:hidden;height:100%;cursor:pointer;color:#fff}.rb-adman_text_overlay .rb-adman_image_wrapper {display:block;float:left;position:relative;height:100%;vertical-align:middle}.rb-adman_text_overlay .rb-adman_image_wrapper span {display:inline-block;vertical-align:middle;background-size:contain;background-position:center}.rb-adman_text_overlay .rb-adman_text_wrapper {display:block;overflow:hidden;height:100%;vertical-align:top;line-height:1.2}.rb-adman_text_overlay .rb-adman_header {display:block;white-space:nowrap;margin-right:20px;overflow:hidden;text-overflow:ellipsis}.rb-adman_text_overlay .rb-adman_age_wrapper {display:inline-block; vertical-align:middle;border:0px solid transparent;margin-right:1px;text-decoration:none!important}.rb-adman_text_overlay .rb-adman_header_text {color:inherit;text-decoration:none;letter-spacing:normal;line-height:1.5;vertical-align:middle}.rb-adman_text_overlay .rb-adman_header_text:hover {color:inherit;text-decoration:underline}.rb-adman_text_overlay .rb-adman_body {padding:2px 0}.rb-adman_text_overlay .rb-adman_body, .rb-adman_link {display:block;text-decoration:none;padding-top:2px}",g='<div class="rb-adman_text_overlay"><div class="rb-adman_image_wrapper"><div style="display:table;height:100%;"><div style="display:table-cell;height:100%;vertical-align:middle"><span style="background-image: url({{src}});width:{{width}}px;height:{{height}}px"></span></div></div></div><div class="rb-adman_text_wrapper"><span class="rb-adman_header"><span class="rb-adman_age_wrapper"><span class="rb-adman_age_content">{{ageRestrictions}}</span></span><span class="rb-adman_header_text">{{header}}</span></span><span class="rb-adman_body">{{body}}</span><span class="rb-adman_link">{{hyperlinkText}}</span></div></div>';return{start:i,pause:r.pause,resume:r.resume,skip:r.skip,dispose:n}},AdmanHTML.VideoAdRenderer=function(e,t){"use strict";function i(){s.mainEl=e.videoEl,s.clickEl=e.clickEl||s.mainEl,v.forEach(function(h){s.mainEl.addEventListener(h,a)}),s.mainEl.parentNode?C={src:s.mainEl.src,time:s.mainEl.currentTime,muted:s.mainEl.muted}:s.setView(null,{position:"absolute",width:"100%",height:"100%",top:0}),s.mainEl.controls=e.browser.mobile,s.mainEl.src=t.getAd().src,s.mainEl.load(),t.log("render"),u(0),g=s.mainEl.play(),g&&g.then&&g.then(c,function(){s.mainEl.muted=!0,g=s.mainEl.play(),g.then(c,function(){})}),s.start(),l.render(),m.render()}function n(h){return h.indexOf("videolink.mycdn.me")!==-1}function r(){l.dispose(),m.dispose(),s.dispose(),v.forEach(function(h){s.mainEl.removeEventListener(h,a)}),C.src?(s.mainEl.src=C.src,s.mainEl.load(),s.mainEl.play(),u(C.time)):(s.mainEl.src="",s.mainEl.removeAttribute&&s.mainEl.removeAttribute("src"))}function o(h){if(h.indexOf("mradx")!==-1)return"rb";if(h.indexOf("videolink.mycdn.me")!==-1)return"ev";var b=new URL(h);return"evcdn:"+("hostname"in b?b.hostname:"")}function a(h){switch(h.type){case"loadstart":p=Date.now();break;case"loadeddata":k||(k=!0,I=Date.now()-p,e.stats.logMessage("firstLoadedData",I,{banner_id:_.bannerID,duration:Math.round(s.mainEl.duration),geo:_.geo!=="undefined"?_.geo:void 0,one_video_src:n(s.mainEl.src),slot:"slotId"in _?_.slotId:"no_slot_id",video_source:o(s.mainEl.src),resolution:("width"in _?_.width:"no_ad_width")+"x"+("height"in _?_.height:"no_ad_height"),label:"experimentLabel"in _?_.experimentLabel:""}));break;case"loadedmetadata":e.stats.metrics("ready"),e.stats.metrics("creative_type","video"),l.onTimeRemained(s.mainEl.currentTime,s.mainEl.duration);break;case"playing":g||c();break;case"play":e.cb("onPlayed");break;case"pause":e.cb("onPaused");break;case"timeupdate":s.onTimeRemained(s.mainEl.currentTime,s.mainEl.duration),l.onTimeRemained(s.mainEl.currentTime,s.mainEl.duration);break;case"ended":e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",e.cb("onCompleted"),e.stats.metrics("completed");break;case"error":var b=h.target&&typeof h.target=="object"&&h.target.error&&typeof h.target.error=="object"&&h.target.error.code?h.target.error.code:"unknown_code",x="video_el_err_code:"+b;e.stats.logError(x),e.stats.metrics("media_error_code",b),e.cb("onError")}}function c(){if(!y){y=!0;var h=AdmanHTML.Utils.isElement(s.mainEl)?s.mainEl:s.wrapperEl;e.viewability.start(h,t),s.onStart({muted:s.mainEl.muted})}}function u(h){if(s.mainEl)try{s.mainEl.currentTime=h}catch{}}var g,p,s=new AdmanHTML.AdRenderer(e,t),l=new AdmanHTML.DisclaimerRenderer(e,t),m=new AdmanHTML.CallToActionBtnRenderer(e,t),v=["loadstart","loadeddata","loadedmetadata","error","pause","play","playing","timeupdate","ended"],y=!1,_=t.getAd(),C={},k=!1,I=null;return{start:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",i(),e.stats.metrics("playing")},skip:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",e.stats.metrics("skipped"),s.skip.apply(e,arguments)},dispose:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",r()},pause:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",s.mainEl.pause()},resume:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",s.mainEl.play()},setVolume:function(h){var b=s.mainEl.muted?0:s.mainEl.volume;h>0&&s.mainEl.muted&&(s.mainEl.muted=!1),h===0&&(s.mainEl.muted=!0),s.mainEl.volume=h,(b===0&&h>0||b>0&&h===0)&&t.log(h?"volumeOn":"volumeOff")}}},AdmanHTML.VpaidJsAdRenderer=function(e,t){"use strict";function i(){var f;if(!u)return x.duration;try{f=u.callGet("adDuration"),f===void 0&&(f=x.duration)}catch{f=x.duration}return f}function n(){if(h.start(),b.render(),AdmanHTML.Utils.isElement(e.videoEl)){var f=AdmanHTML.Utils.getElementViewport;f(e.videoEl)===f(h.wrapperEl)&&(e.videoEl.parentNode?(p=e.videoEl.parentNode,s=e.videoEl.nextSibling):g=!0,h.wrapperEl.insertBefore(e.videoEl,h.wrapperEl.childNodes[0]),AdmanHTML.Utils.mixin(e.videoEl.style,{position:"absolute",width:"100%",height:"100%",top:0,display:"block"}))}var j=t.getSettings();j&&(j.loadTimeout&&(E=j.loadTimeout),j.startTimeout&&($=j.startTimeout)),AdmanHTML.Utils.isNRVpaid(x.src)&&typeof x.timeoutsFactor=="number"&&x.timeoutsFactor>1&&(E*=x.timeoutsFactor,$*=x.timeoutsFactor),e.cb("onStarted",[t.sectionType,t.getAdForApp()||{}]),o(E,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadInterface"),u.urlToNavigateOnClick=t.getAd().urlToNavigateOnClick,h.setView(u.load(x.src,e.config.vpaidHtmlInterface),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"transparent"}),t.log("render")}function r(){g&&e.videoEl.parentNode?e.videoEl.parentNode.removeChild(e.videoEl):p&&p.insertBefore(e.videoEl,s&&s.parentNode?s:null),a(),u.destroy(),b.dispose(),h.dispose()}function o(f,j){a(),C=j,m=setTimeout(c,f)}function a(){clearTimeout(m)}function c(){_=!0,a(),t.log("error"),C&&e.stats.logError(C,{bannerID:x.bannerID,isNRVpaid:AdmanHTML.Utils.isNRVpaid(x.src)}),e.cb("onError",{force:!0,message:C})}var u,g,p,s,l,m,v,y,_,C,k,I,h=new AdmanHTML.AdRenderer(e,t),b=new AdmanHTML.DisclaimerRenderer(e,t),x=t.getAd(),E=500,$=1e3;h.onResize=function(f,j){u&&u.call("resizeAd",[f,j,"normal"])},h.onClick=function(){};var L=function(f,j){if(!_){var F,P;switch(f){case"loaded":o(E,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadJs");break;case"vpaidloaded":a();break;case"inited":u.call("handshakeVersion",["2.0"])?(o($,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:InitAd"),u.call("initAd",[h.mainEl.offsetWidth,h.mainEl.offsetHeight,"normal",x.bitrate,{AdParameters:x.params}])):e.cb("onError");break;case"AdStarted":a(),y=u.callGet("adVolume"),v===void 0||u.autoMuted||u.callSet("adVolume",v),t.log("playbackStarted"),e.viewability.start(h.mainEl,t),e.cb("onVPAIDStarted"),e.stats.metrics("playing");break;case"AdLoaded":o($,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:StartAd"),u.call("startAd"),e.stats.metrics("ready"),e.stats.metrics("creative_type","vpaid");break;case"AdRemainingTimeChange":F=i(),P=u.callGet("adRemainingTime"),F>0&&P>=0?(h.onTimeRemained(F-P,F),b.onTimeRemained(F-P,F)):e.cb("onDurationChanged",[{remained:P,duration:F}]);break;case"AdVolumeChange":var O=u.callGet("adVolume");(y===0&&O>0||y>0&&O===0)&&t.log(O?"volumeOn":"volumeOff"),y=O;break;case"AdVideoComplete":e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",F=i(),h.onTimeRemained(F,F);break;case"AdStopped":case"AdSkipped":k||(k=!0,setTimeout(function(){l?l():e.cb("onCompleted")})),e.stats.metrics(f==="AdStopped"?"completed":"skipped");break;case"AdClickThru":j.url&&j.playerHandles&&window.open(j.url,"_blank"),t.log("click"),e.cb("onClicked");break;case"AdError":e.stats.logError("EXTERNAL_JS_ADVERTISMENT_ERROR:"+(j&&j.message||"")),e.stats.metrics("vpaid_error_message",j&&j.message||"vpaid script err"),e.cb("onError");break;case"AdPaused":I||(I=!0,e.cb("onPaused"));break;case"AdPlaying":I&&(I=!1,e.cb("onPlayed"));break;case"AdUserClose":t.log("closedByUser");break;case"video:pause":I||u&&u.call("pauseAd");break;case"video:play":I&&u&&u.call("resumeAd")}}},A=e.wrapper.ownerDocument,M=A.defaultView||A.parentWindow;return u=new AdmanHTML.VpaidLoader(e.videoEl,M),u.onVpaidEvent(L),{start:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",n()},dispose:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",r()},pause:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",u&&u.call("pauseAd")},resume:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",u&&u.call("resumeAd")},setVolume:function(f){u&&u.callSet("adVolume",f),v=f},skip:function(f){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",l=f;try{u&&u.call("skipAd")}catch{}e.stats.metrics("skipped")}}},AdmanHTML.VpaidSwfAdRenderer=function(e,t){"use strict";function i(){var b;if(!u)return C.duration;try{b=u.callGet("adDuration")||C.duration}catch{b=C.duration}return b}function n(){_.start();var b=t.getSettings();b&&(b.loadTimeout&&(I=b.loadTimeout),b.startTimeout&&(h=b.startTimeout)),AdmanHTML.Utils.checkFlashAsync(function(x){if(x===AdmanHTML.Utils.FLASH_READY){e.cb("onStarted",[t.sectionType,t.getAdForApp()||{}]),o(I);var E="vpaidSwfUrl="+encodeURIComponent(C.src)+"&proxyMethodName="+k;_.setView(v.createSwfObject(e.config.vpaidJsInterface,{width:"100%",height:"100%"},{flashvars:E,allowScriptAccess:"always",wmode:"opaque"}),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"black"})}else e.cb("onError")}),y.render(),t.log("render")}function r(){a(),_.dispose(),y.dispose(),window[k]=null}function o(b){a(),p=setTimeout(c,b)}function a(){clearTimeout(p)}function c(){m=!0,a(),t.log("error"),e.cb("onError")}var u,g,p,s,l,m,v=new AdmanHTML.SwfAdRenderer(e,t),y=new AdmanHTML.DisclaimerRenderer(e,t),_=v.super,C=t.getAd(),k="vpaidProxyMethod"+Date.now(),I=500,h=1e3;return _.onResize=function(b,x){u&&u.call("resizeAd",[b,x,"normal"])},_.onClick=function(){},window[k]=function(b,x){if(!m){var E;switch(b){case"loaded":o(I);break;case"vpaidloaded":a();break;case"inited":u=_.mainEl.getElementsByTagName("object")[0],u.call("handshakeVersion",["2.0"])?(o(h),u.call("initAd",[_.mainEl.offsetWidth,_.mainEl.offsetHeight,"normal",C.bitrate,C.params,""])):e.cb("onError");break;case"AdStarted":a(),l=u.callGet("adVolume"),s!==void 0&&u.callSet("adVolume",s),t.log("playbackStarted"),e.viewability.start(_.mainEl,t),e.cb("onVPAIDStarted");break;case"AdLoaded":o(h),u.call("startAd");break;case"AdRemainingTimeChange":E=i(),_.onTimeRemained(E-u.callGet("adRemainingTime"),E),y.onTimeRemained(E-u.callGet("adRemainingTime"),E);break;case"AdVolumeChange":var $=u.callGet("adVolume");(l===0&&$>0||l>0&&$===0)&&t.log($?"volumeOn":"volumeOff"),l=$;break;case"AdVideoComplete":E=i(),_.onTimeRemained(E,E);break;case"AdStopped":case"AdSkipped":setTimeout(function(){g?g():e.cb("onCompleted")});break;case"AdClickThru":t.log("click"),e.cb("onClicked");break;case"AdError":e.stats.logError("EXTERNAL_SWF_ADVERTISMENT_ERROR:"+(x&&x.message||"")),e.cb("onError");break;case"AdPaused":e.cb("onPaused");break;case"AdPlaying":e.cb("onPlayed");break;case"AdUserClose":t.log("closedByUser")}}},{start:n,dispose:r,pause:function(){u&&u.call("pauseAd")},resume:function(){u&&u.call("resumeAd")},setVolume:function(b){u&&u.callSet("adVolume",b),s=b},skip:function(b){g=b;try{u&&u.call("skipAd")}catch{}}}};window.admanAsyncLoader?setTimeout(admanAsyncLoader):window.admanAsyncInit&&setTimeout(admanAsyncInit)});var ws="prod",sr="1.0.4-dev.0da85b58.0";import{InterfaceLanguage as Kc,fillWithDefault as Zc,VideoQuality as Fl}from"@vkontakte/videoplayer-shared";var Ss=globalThis.process?.env?.NODE_ENV,G=Ss&&!Ss.toLowerCase().startsWith("prod");var oi=Array.isArray,Ms=Array.prototype.indexOf,Mn=Array.from,go=Object.keys,vt=Object.defineProperty,Rt=Object.getOwnPropertyDescriptor,ho=Object.getOwnPropertyDescriptors,_o=Object.prototype,Ts=Array.prototype,sn=Object.getPrototypeOf,yo=Object.isExtensible;var ht=()=>{};function ln(e){for(var t=0;t<e.length;t++)e[t]()}var Vt=Symbol("$state"),Tn=Symbol("legacy props"),Is=Symbol(""),lr=Symbol("proxy path");var In=3,ai=8;function dr(e){return e===this.v}function dn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ks(e,t){return e!==t}function un(e){return!dn(e,this.v)}function Ns(){if(G){let e=new Error(`derived_references_self
|
|
7
|
-
A derived value cannot reference itself recursively
|
|
8
|
-
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function Ds(e){if(G){let t=new Error(`effect_in_teardown
|
|
9
|
-
\`${e}\` cannot be used inside an effect cleanup function
|
|
10
|
-
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function Cs(){if(G){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function $s(e){if(G){let t=new Error(`effect_orphan
|
|
11
|
-
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
|
|
12
|
-
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function Ls(){if(G){let e=new Error(`effect_update_depth_exceeded
|
|
13
|
-
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
|
|
14
|
-
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Os(){if(G){let e=new Error(`hydration_failed
|
|
15
|
-
Failed to hydrate the application
|
|
16
|
-
https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function Ps(){if(G){let e=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invalid_snippet")}function Rs(e){if(G){let t=new Error(`props_invalid_value
|
|
17
|
-
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
|
|
18
|
-
https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/props_invalid_value")}function Vs(e){if(G){let t=new Error(`rune_outside_svelte
|
|
19
|
-
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
20
|
-
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function js(){if(G){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function zs(){if(G){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Us(){if(G){let e=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var wi=!1,Si=!1;function Fs(){wi=!0}var ji="[",zi="[!",Yi="]",Ni={};var ut=Symbol(),mi=Symbol("filename"),Hs=Symbol("hmr"),Bs="http://www.w3.org/1999/xhtml";var kn=null;function Di(e){let t=Error(),i=t.stack;if(i){let n=i.split(`
|
|
21
|
-
`),r=[`
|
|
22
|
-
`];for(let o=0;o<n.length;o++){let a=n[o];if(a!=="Error"){if(a.includes("validate_each_keys"))return null;a.includes("svelte/src/internal")||r.push(a)}}if(r.length===1)return null;vt(t,"stack",{value:r.join(`
|
|
23
|
-
`)}),vt(t,"name",{value:`${e}Error`})}return t}function vi(e,t){return e.label=t,ur(e.v,t),e}function ur(e,t){return e?.[lr]?.(t),e}function cr(){if(G){let e=new Error("invalid_default_snippet\nCannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead\nhttps://svelte.dev/e/invalid_default_snippet");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invalid_default_snippet")}function cn(e){if(G){let t=new Error(`lifecycle_outside_component
|
|
6
|
+
let e,t,i,n,r,o;var a,s,l,u,d,c,f,p,h,v,m=Object.create,g=Object.getPrototypeOf,_=Object.defineProperty,b=Object.getOwnPropertyNames,y=Object.prototype.hasOwnProperty;function w(e){return this[e]}var k=(e,t,i)=>{var n=null!=e&&"object"==typeof e;if(n){var r=t?s??=new WeakMap:l??=new WeakMap,o=r.get(e);if(o)return o}i=null!=e?m(g(e)):{};let a=!t&&e&&e.__esModule?i:_(i,"default",{value:e,enumerable:!0});for(let t of b(e))y.call(a,t)||_(a,t,{get:w.bind(e,t),enumerable:!0});return n&&r.set(e,a),a},x=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),S=x((e,t)=>{var i=function(e){return e&&e.Math===Math&&e};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof global&&global)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")()}),$=x((e,t)=>{t.exports=function(e){try{return!!e()}catch(e){return!0}}}),C=x((e,t)=>{t.exports=!$()(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}),A=x((e,t)=>{var i=C(),n=Function.prototype,r=n.apply,o=n.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?o.bind(r):function(){return o.apply(r,arguments)})}),T=x((e,t)=>{var i=C(),n=Function.prototype,r=n.call,o=i&&n.bind.bind(r,r);t.exports=i?o:function(e){return function(){return r.apply(e,arguments)}}}),E=x((e,t)=>{var i=T(),n=i({}.toString),r=i("".slice);t.exports=function(e){return r(n(e),8,-1)}}),P=x((e,t)=>{var i=E(),n=T();t.exports=function(e){if("Function"===i(e))return n(e)}}),L=x((e,t)=>{var i="object"==typeof document&&document.all;t.exports=void 0===i&&void 0!==i?function(e){return"function"==typeof e||e===i}:function(e){return"function"==typeof e}}),R=x((e,t)=>{t.exports=!$()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}),V=x((e,t)=>{var i=C(),n=Function.prototype.call;t.exports=i?n.bind(n):function(){return n.apply(n,arguments)}}),O=x(e=>{var t={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor;e.f=i&&!t.call({1:2},1)?function(e){var t=i(this,e);return!!t&&t.enumerable}:t}),I=x((e,t)=>{t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}}),M=x((e,t)=>{var i=T(),n=$(),r=E(),o=Object,a=i("".split);t.exports=n(function(){return!o("z").propertyIsEnumerable(0)})?function(e){return"String"===r(e)?a(e,""):o(e)}:o}),N=x((e,t)=>{t.exports=function(e){return null==e}}),j=x((e,t)=>{var i=N(),n=TypeError;t.exports=function(e){if(i(e))throw new n("Can't call method on "+e);return e}}),D=x((e,t)=>{var i=M(),n=j();t.exports=function(e){return i(n(e))}}),F=x((e,t)=>{var i=L();t.exports=function(e){return"object"==typeof e?null!==e:i(e)}}),z=x((e,t)=>{t.exports={}}),q=x((e,t)=>{var i=z(),n=S(),r=L(),o=function(e){return r(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?o(i[e])||o(n[e]):i[e]&&i[e][t]||n[e]&&n[e][t]}}),B=x((e,t)=>{t.exports=T()({}.isPrototypeOf)}),W=x((e,t)=>{var i=S().navigator,n=i&&i.userAgent;t.exports=n?String(n):""}),Q=x((e,t)=>{var i,n,r=S(),o=W(),a=r.process,s=r.Deno,l=a&&a.versions||s&&s.version,u=l&&l.v8;u&&(n=(i=u.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!n&&o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(n=+i[1]),t.exports=n}),U=x((e,t)=>{var i=Q(),n=$(),r=S().String;t.exports=!!Object.getOwnPropertySymbols&&!n(function(){var e=Symbol("symbol detection");return!r(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41})}),H=x((e,t)=>{t.exports=U()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}),G=x((e,t)=>{var i=q(),n=L(),r=B(),o=H(),a=Object;t.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return n(t)&&r(t.prototype,a(e))}}),K=x((e,t)=>{var i=String;t.exports=function(e){try{return i(e)}catch(e){return"Object"}}}),J=x((e,t)=>{var i=L(),n=K(),r=TypeError;t.exports=function(e){if(i(e))return e;throw new r(n(e)+" is not a function")}}),Y=x((e,t)=>{var i=J(),n=N();t.exports=function(e,t){var r=e[t];return n(r)?void 0:i(r)}}),Z=x((e,t)=>{var i=V(),n=L(),r=F(),o=TypeError;t.exports=function(e,t){var a,s;if("string"===t&&n(a=e.toString)&&!r(s=i(a,e))||n(a=e.valueOf)&&!r(s=i(a,e))||"string"!==t&&n(a=e.toString)&&!r(s=i(a,e)))return s;throw new o("Can't convert object to primitive value")}}),X=x((e,t)=>{t.exports=!0}),ee=x((e,t)=>{var i=S(),n=Object.defineProperty;t.exports=function(e,t){try{n(i,e,{value:t,configurable:!0,writable:!0})}catch(n){i[e]=t}return t}}),et=x((e,t)=>{var i=X(),n=S(),r=ee(),o="__core-js_shared__",a=t.exports=n[o]||r(o,{});(a.versions||(a.versions=[])).push({version:"3.43.0",mode:i?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),ei=x((e,t)=>{var i=et();t.exports=function(e,t){return i[e]||(i[e]=t||{})}}),en=x((e,t)=>{var i=j(),n=Object;t.exports=function(e){return n(i(e))}}),er=x((e,t)=>{var i=T(),n=en(),r=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return r(n(e),t)}}),eo=x((e,t)=>{var i=T(),n=0,r=Math.random(),o=i(1.1.toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++n+r,36)}}),ea=x((e,t)=>{var i=S(),n=ei(),r=er(),o=eo(),a=U(),s=H(),l=i.Symbol,u=n("wks"),d=s?l.for||l:l&&l.withoutSetter||o;t.exports=function(e){return r(u,e)||(u[e]=a&&r(l,e)?l[e]:d("Symbol."+e)),u[e]}}),es=x((e,t)=>{var i=V(),n=F(),r=G(),o=Y(),a=Z(),s=ea(),l=TypeError,u=s("toPrimitive");t.exports=function(e,t){if(!n(e)||r(e))return e;var s,d=o(e,u);if(d){if(void 0===t&&(t="default"),!n(s=i(d,e,t))||r(s))return s;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}}),el=x((e,t)=>{var i=es(),n=G();t.exports=function(e){var t=i(e,"string");return n(t)?t:t+""}}),eu=x((e,t)=>{var i=S(),n=F(),r=i.document,o=n(r)&&n(r.createElement);t.exports=function(e){return o?r.createElement(e):{}}}),ed=x((e,t)=>{var i=R(),n=$(),r=eu();t.exports=!i&&!n(function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})}),ec=x(e=>{var t=R(),i=V(),n=O(),r=I(),o=D(),a=el(),s=er(),l=ed(),u=Object.getOwnPropertyDescriptor;e.f=t?u:function(e,t){if(e=o(e),t=a(t),l)try{return u(e,t)}catch(e){}if(s(e,t))return r(!i(n.f,e,t),e[t])}}),ef=x((e,t)=>{var i=$(),n=L(),r=/#|\.prototype\./,o=function(e,t){var r=s[a(e)];return r===u||r!==l&&(n(t)?i(t):!!t)},a=o.normalize=function(e){return String(e).replace(r,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o}),ep=x((e,t)=>{var i=P(),n=J(),r=C(),o=i(i.bind);t.exports=function(e,t){return n(e),void 0===t?e:r?o(e,t):function(){return e.apply(t,arguments)}}}),eh=x((e,t)=>{var i=R(),n=$();t.exports=i&&n(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}),ev=x((e,t)=>{var i=F(),n=String,r=TypeError;t.exports=function(e){if(i(e))return e;throw new r(n(e)+" is not an object")}}),em=x(e=>{var t=R(),i=ed(),n=eh(),r=ev(),o=el(),a=TypeError,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",c="writable";e.f=t?n?function(e,t,i){if(r(e),t=o(t),r(i),"function"==typeof e&&"prototype"===t&&"value"in i&&c in i&&!i[c]){var n=l(e,t);n&&n[c]&&(e[t]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:u in i?i[u]:n[u],writable:!1})}return s(e,t,i)}:s:function(e,t,n){if(r(e),t=o(t),r(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new a("Accessors not supported");return"value"in n&&(e[t]=n.value),e}}),eg=x((e,t)=>{var i=R(),n=em(),r=I();t.exports=i?function(e,t,i){return n.f(e,t,r(1,i))}:function(e,t,i){return e[t]=i,e}}),e_=x((e,t)=>{var i=S(),n=A(),r=P(),o=L(),a=ec().f,s=ef(),l=z(),u=ep(),d=eg(),c=er();et();var f=function(e){var t=function(i,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(i);case 2:return new e(i,r)}return new e(i,r,o)}return n(e,this,arguments)};return t.prototype=e.prototype,t};t.exports=function(e,t){var n,p,h,v,m,g,_,b,y,w=e.target,k=e.global,x=e.stat,S=e.proto,$=k?i:x?i[w]:i[w]&&i[w].prototype,C=k?l:l[w]||d(l,w,{})[w],A=C.prototype;for(v in t)p=!(n=s(k?v:w+(x?".":"#")+v,e.forced))&&$&&c($,v),g=C[v],p&&(_=e.dontCallGetSet?(y=a($,v))&&y.value:$[v]),m=p&&_?_:t[v],(n||S||typeof g!=typeof m)&&(b=e.bind&&p?u(m,i):e.wrap&&p?f(m):S&&o(m)?r(m):m,(e.sham||m&&m.sham||g&&g.sham)&&d(b,"sham",!0),d(C,v,b),S&&(c(l,h=w+"Prototype")||d(l,h,{}),d(l[h],v,m),e.real&&A&&(n||!A[v])&&d(A,v,m)))}}),eb=x((e,t)=>{var i=ei(),n=eo(),r=i("keys");t.exports=function(e){return r[e]||(r[e]=n(e))}}),ey=x((e,t)=>{t.exports=!$()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})}),ew=x((e,t)=>{var i=er(),n=L(),r=en(),o=eb(),a=ey(),s=o("IE_PROTO"),l=Object,u=l.prototype;t.exports=a?l.getPrototypeOf:function(e){var t=r(e);if(i(t,s))return t[s];var o=t.constructor;return n(o)&&t instanceof o?o.prototype:t instanceof l?u:null}}),ek=x((e,t)=>{var i=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?n:i)(t)}}),ex=x((e,t)=>{var i=ek();t.exports=function(e){var t=+e;return t!=t||0===t?0:i(t)}}),eS=x((e,t)=>{var i=ex(),n=Math.max,r=Math.min;t.exports=function(e,t){var o=i(e);return o<0?n(o+t,0):r(o,t)}}),e$=x((e,t)=>{var i=ex(),n=Math.min;t.exports=function(e){var t=i(e);return t>0?n(t,0x1fffffffffffff):0}}),eC=x((e,t)=>{var i=e$();t.exports=function(e){return i(e.length)}}),eA=x((e,t)=>{var i=D(),n=eS(),r=eC(),o=function(e){return function(t,o,a){var s,l=i(t),u=r(l);if(0===u)return!e&&-1;var d=n(a,u);if(e&&o!=o){for(;u>d;)if((s=l[d++])!=s)return!0}else for(;u>d;d++)if((e||d in l)&&l[d]===o)return e||d||0;return!e&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}}),eT=x((e,t)=>{t.exports={}}),eE=x((e,t)=>{var i=T(),n=er(),r=D(),o=eA().indexOf,a=eT(),s=i([].push);t.exports=function(e,t){var i,l=r(e),u=0,d=[];for(i in l)!n(a,i)&&n(l,i)&&s(d,i);for(;t.length>u;)n(l,i=t[u++])&&(~o(d,i)||s(d,i));return d}}),eP=x((e,t)=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),eL=x((e,t)=>{var i=eE(),n=eP();t.exports=Object.keys||function(e){return i(e,n)}}),eR=x((e,t)=>{var i=R(),n=$(),r=T(),o=ew(),a=eL(),s=D(),l=r(O().f),u=r([].push),d=i&&n(function(){var e=Object.create(null);return e[2]=2,!l(e,2)}),c=function(e){return function(t){for(var n,r=s(t),c=a(r),f=d&&null===o(r),p=c.length,h=0,v=[];p>h;)n=c[h++],(!i||(f?n in r:l(r,n)))&&u(v,e?[n,r[n]]:r[n]);return v}};t.exports={entries:c(!0),values:c(!1)}}),eV=x(()=>{var e=e_(),t=eR().entries;e({target:"Object",stat:!0},{entries:function(e){return t(e)}})}),eO=x((e,t)=>{eV(),t.exports=z().Object.entries}),eI=x((e,t)=>{t.exports=eO()}),eM=x((e,t)=>{t.exports=eI()}),eN=x(()=>{var e=e_(),t=eR().values;e({target:"Object",stat:!0},{values:function(e){return t(e)}})}),ej=x((e,t)=>{eN(),t.exports=z().Object.values}),eD=x((e,t)=>{t.exports=ej()}),eF=x((e,t)=>{t.exports=eD()}),ez=x((e,t)=>{t.exports=function(){}}),eq=x((e,t)=>{t.exports={}}),eB=x((e,t)=>{var i=S(),n=L(),r=i.WeakMap;t.exports=n(r)&&/native code/.test(String(r))}),eW=x((e,t)=>{var i,n,r,o,a,s=eB(),l=S(),u=F(),d=eg(),c=er(),f=et(),p=eb(),h=eT(),v="Object already initialized",m=l.TypeError,g=l.WeakMap;s||f.state?((o=f.state||(f.state=new g)).get=o.get,o.has=o.has,o.set=o.set,i=function(e,t){if(o.has(e))throw new m(v);return t.facade=e,o.set(e,t),t},n=function(e){return o.get(e)||{}},r=function(e){return o.has(e)}):(h[a=p("state")]=!0,i=function(e,t){if(c(e,a))throw new m(v);return t.facade=e,d(e,a,t),t},n=function(e){return c(e,a)?e[a]:{}},r=function(e){return c(e,a)}),t.exports={set:i,get:n,has:r,enforce:function(e){return r(e)?n(e):i(e,{})},getterFor:function(e){return function(t){var i;if(!u(t)||(i=n(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return i}}}}),eQ=x((e,t)=>{var i=R(),n=er(),r=Function.prototype,o=i&&Object.getOwnPropertyDescriptor,a=n(r,"name"),s=a&&(!i||i&&o(r,"name").configurable);t.exports={EXISTS:a,PROPER:a&&"something"===(function(){}).name,CONFIGURABLE:s}}),eU=x(e=>{var t=R(),i=eh(),n=em(),r=ev(),o=D(),a=eL();e.f=t&&!i?Object.defineProperties:function(e,t){r(e);for(var i,s=o(t),l=a(t),u=l.length,d=0;u>d;)n.f(e,i=l[d++],s[i]);return e}}),eH=x((e,t)=>{t.exports=q()("document","documentElement")}),eG=x((e,t)=>{var i,n=ev(),r=eU(),o=eP(),a=eT(),s=eH(),l=eu(),u=eb(),d="prototype",c="script",f=u("IE_PROTO"),p=function(){},h=function(e){return"<"+c+">"+e+"</"+c+">"},v=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){var e,t=l("iframe");return t.style.display="none",s.appendChild(t),t.src=String("java"+c+":"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F},g=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}g="u">typeof document?document.domain&&i?v(i):m():v(i);for(var e=o.length;e--;)delete g[d][o[e]];return g()};a[f]=!0,t.exports=Object.create||function(e,t){var i;return null!==e?(p[d]=n(e),i=new p,p[d]=null,i[f]=e):i=g(),void 0===t?i:r.f(i,t)}}),eK=x((e,t)=>{var i=eg();t.exports=function(e,t,n,r){return r&&r.enumerable?e[t]=n:i(e,t,n),e}}),eJ=x((e,t)=>{var i,n,r,o=$(),a=L(),s=F(),l=eG(),u=ew(),d=eK(),c=ea(),f=X(),p=c("iterator"),h=!1;[].keys&&("next"in(r=[].keys())?(n=u(u(r)))!==Object.prototype&&(i=n):h=!0),!s(i)||o(function(){var e={};return i[p].call(e)!==e})?i={}:f&&(i=l(i)),a(i[p])||d(i,p,function(){return this}),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:h}}),eY=x((e,t)=>{var i=ea()("toStringTag"),n={};n[i]="z",t.exports="[object z]"===String(n)}),eZ=x((e,t)=>{var i=eY(),n=L(),r=E(),o=ea()("toStringTag"),a=Object,s="Arguments"===r(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(e){}};t.exports=i?r:function(e){var t,i,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=l(t=a(e),o))?i:s?r(t):"Object"===(u=r(t))&&n(t.callee)?"Arguments":u}}),eX=x((e,t)=>{var i=eY(),n=eZ();t.exports=i?({}).toString:function(){return"[object "+n(this)+"]"}}),e0=x((e,t)=>{var i=eY(),n=em().f,r=eg(),o=er(),a=eX(),s=ea()("toStringTag");t.exports=function(e,t,l,u){var d=l?e:e&&e.prototype;d&&(o(d,s)||n(d,s,{configurable:!0,value:t}),u&&!i&&r(d,"toString",a))}}),e1=x((e,t)=>{var i=eJ().IteratorPrototype,n=eG(),r=I(),o=e0(),a=eq(),s=function(){return this};t.exports=function(e,t,l,u){var d=t+" Iterator";return e.prototype=n(i,{next:r(+!u,l)}),o(e,d,!1,!0),a[d]=s,e}}),e2=x((e,t)=>{var i=T(),n=J();t.exports=function(e,t,r){try{return i(n(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}}),e4=x((e,t)=>{var i=F();t.exports=function(e){return i(e)||null===e}}),e5=x((e,t)=>{var i=e4(),n=String,r=TypeError;t.exports=function(e){if(i(e))return e;throw new r("Can't set "+n(e)+" as a prototype")}}),e3=x((e,t)=>{var i=e2(),n=F(),r=j(),o=e5();t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,a={};try{(e=i(Object.prototype,"__proto__","set"))(a,[]),t=a instanceof Array}catch(e){}return function(i,a){return r(i),o(a),n(i)&&(t?e(i,a):i.__proto__=a),i}}():void 0)}),e9=x((e,t)=>{var i=e_(),n=V(),r=X(),o=eQ(),a=L(),s=e1(),l=ew(),u=e3(),d=e0(),c=eg(),f=eK(),p=ea(),h=eq(),v=eJ(),m=o.PROPER,g=o.CONFIGURABLE,_=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,y=p("iterator"),w="keys",k="values",x="entries",S=function(){return this};t.exports=function(e,t,o,p,v,$,C){s(o,t,p);var A,T,E,P=function(e){if(e===v&&I)return I;if(!b&&e&&e in V)return V[e];switch(e){case w:case k:case x:return function(){return new o(this,e)}}return function(){return new o(this)}},L=t+" Iterator",R=!1,V=e.prototype,O=V[y]||V["@@iterator"]||v&&V[v],I=!b&&O||P(v),M="Array"===t&&V.entries||O;if(M&&(A=l(M.call(new e)))!==Object.prototype&&A.next&&(!r&&l(A)!==_&&(u?u(A,_):a(A[y])||f(A,y,S)),d(A,L,!0,!0),r&&(h[L]=S)),m&&v===k&&O&&O.name!==k&&(!r&&g?c(V,"name",k):(R=!0,I=function(){return n(O,this)})),v)if(T={values:P(k),keys:$?I:P(w),entries:P(x)},C)for(E in T)!b&&!R&&E in V||f(V,E,T[E]);else i({target:t,proto:!0,forced:b||R},T);return(!r||C)&&V[y]!==I&&f(V,y,I,{name:v}),h[t]=I,T}}),e6=x((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}}),e7=x((e,t)=>{var i=D(),n=ez(),r=eq(),o=eW(),a=em().f,s=e9(),l=e6(),u=X(),d=R(),c="Array Iterator",f=o.set,p=o.getterFor(c);t.exports=s(Array,"Array",function(e,t){f(this,{type:c,target:i(e),index:0,kind:t})},function(){var e=p(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,l(void 0,!0);switch(e.kind){case"keys":return l(i,!1);case"values":return l(t[i],!1)}return l([i,t[i]],!1)},"values");var h=r.Arguments=r.Array;if(n("keys"),n("values"),n("entries"),!u&&d&&"values"!==h.name)try{a(h,"name",{value:"values"})}catch(e){}}),e8=x((e,t)=>{var i=ea(),n=eq(),r=i("iterator"),o=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||o[r]===e)}}),te=x((e,t)=>{var i=eZ(),n=Y(),r=N(),o=eq(),a=ea()("iterator");t.exports=function(e){if(!r(e))return n(e,a)||n(e,"@@iterator")||o[i(e)]}}),tt=x((e,t)=>{var i=V(),n=J(),r=ev(),o=K(),a=te(),s=TypeError;t.exports=function(e,t){var l=arguments.length<2?a(e):t;if(n(l))return r(i(l,e));throw new s(o(e)+" is not iterable")}}),ti=x((e,t)=>{var i=V(),n=ev(),r=Y();t.exports=function(e,t,o){var a,s;n(e);try{if(!(a=r(e,"return"))){if("throw"===t)throw o;return o}a=i(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw o;if(s)throw a;return n(a),o}}),tn=x((e,t)=>{var i=ep(),n=V(),r=ev(),o=K(),a=e8(),s=eC(),l=B(),u=tt(),d=te(),c=ti(),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},h=p.prototype;t.exports=function(e,t,v){var m,g,_,b,y,w,k,x=v&&v.that,S=!!(v&&v.AS_ENTRIES),$=!!(v&&v.IS_RECORD),C=!!(v&&v.IS_ITERATOR),A=!!(v&&v.INTERRUPTED),T=i(t,x),E=function(e){return m&&c(m,"normal"),new p(!0,e)},P=function(e){return S?(r(e),A?T(e[0],e[1],E):T(e[0],e[1])):A?T(e,E):T(e)};if($)m=e.iterator;else if(C)m=e;else{if(!(g=d(e)))throw new f(o(e)+" is not iterable");if(a(g)){for(_=0,b=s(e);b>_;_++)if((y=P(e[_]))&&l(h,y))return y;return new p(!1)}m=u(e,g)}for(w=$?e.next:m.next;!(k=n(w,m)).done;){try{y=P(k.value)}catch(e){c(m,"throw",e)}if("object"==typeof y&&y&&l(h,y))return y}return new p(!1)}}),tr=x((e,t)=>{var i=R(),n=em(),r=I();t.exports=function(e,t,o){i?n.f(e,t,r(0,o)):e[t]=o}}),to=x(()=>{var e=e_(),t=tn(),i=tr();e({target:"Object",stat:!0},{fromEntries:function(e){var n={};return t(e,function(e,t){i(n,e,t)},{AS_ENTRIES:!0}),n}})}),ta=x((e,t)=>{e7(),to(),t.exports=z().Object.fromEntries}),ts=x((e,t)=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),tl=x(()=>{e7();var e,t=ts(),i=S(),n=e0(),r=eq();for(e in t)n(i[e],e),r[e]=r.Array}),tu=x((e,t)=>{var i=ta();tl(),t.exports=i}),td=x((e,t)=>{t.exports=tu()}),tc=x((e,t)=>{var i=F(),n=E(),r=ea()("match");t.exports=function(e){var t;return i(e)&&(void 0!==(t=e[r])?!!t:"RegExp"===n(e))}}),tf=x((e,t)=>{var i=eZ(),n=String;t.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return n(e)}}),tp=x((e,t)=>{var i=S(),n=$(),r=i.RegExp;t.exports={correct:!n(function(){var e=!0;try{r(".","d")}catch(t){e=!1}var t={},i="",n=e?"dgimsy":"gimsy",o=function(e,n){Object.defineProperty(t,e,{get:function(){return i+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(a.hasIndices="d"),a)o(s,a[s]);return Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(t)!==n||i!==n})}}),th=x((e,t)=>{var i=ev();t.exports=function(){var e=i(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}}),tv=x((e,t)=>{var i=V(),n=er(),r=B(),o=tp(),a=th(),s=RegExp.prototype;t.exports=o.correct?function(e){return e.flags}:function(e){return!o.correct&&r(s,e)&&!n(e,"flags")?i(a,e):e.flags}}),tm=x((e,t)=>{var i=T(),n=en(),r=Math.floor,o=i("".charAt),a=i("".replace),s=i("".slice),l=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(e,t,i,d,c,f){var p=i+e.length,h=d.length,v=u;return void 0!==c&&(c=n(c),v=l),a(f,v,function(n,a){var l;switch(o(a,0)){case"$":return"$";case"&":return e;case"`":return s(t,0,i);case"'":return s(t,p);case"<":l=c[s(a,1,-1)];break;default:var u=+a;if(0===u)return n;if(u>h){var f=r(u/10);if(0===f)return n;if(f<=h)return void 0===d[f-1]?o(a,1):d[f-1]+o(a,1);return n}l=d[u-1]}return void 0===l?"":l})}}),tg=x(()=>{var e=e_(),t=V(),i=T(),n=j(),r=L(),o=F(),a=tc(),s=tf(),l=Y(),u=tv(),d=tm(),c=ea(),f=X(),p=c("replace"),h=TypeError,v=i("".indexOf),m=i("".replace),g=i("".slice),_=Math.max;e({target:"String",proto:!0},{replaceAll:function(e,i){var c,b,y,w,k,x,S,$,C,A=n(this),T=0,E="";if(o(e)){if((c=a(e))&&!~v(s(n(u(e))),"g"))throw new h("`.replaceAll` does not allow non-global regexes");if(b=l(e,p))return t(b,e,A,i);if(f&&c)return m(s(A),e,i)}for(y=s(A),w=s(e),(k=r(i))||(i=s(i)),S=_(1,x=w.length),$=v(y,w);-1!==$;)C=k?s(i(w,$,y)):d(w,y,$,[],void 0,i),E+=g(y,T,$)+C,T=$+x,$=$+S>y.length?-1:v(y,w,$+S);return T<y.length&&(E+=g(y,T)),E}})}),t_=x((e,t)=>{t.exports=q()}),tb=x((e,t)=>{tg(),t.exports=t_()("String","replaceAll")}),ty=x((e,t)=>{t.exports=tb()}),tw=x((e,t)=>{t.exports=ty()}),tk=x(()=>{var e=e_(),t=eA().includes,i=$(),n=ez();e({target:"Array",proto:!0,forced:i(function(){return![,].includes()})},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n("includes")}),tx=x((e,t)=>{tk(),t.exports=t_()("Array","includes")}),tS=x((e,t)=>{t.exports=tx()}),t$=x((e,t)=>{t.exports=tS()}),tC=x(()=>{var e=e_(),t=en(),i=eC(),n=ex(),r=ez();e({target:"Array",proto:!0},{at:function(e){var r=t(this),o=i(r),a=n(e),s=a>=0?a:o+a;return s<0||s>=o?void 0:r[s]}}),r("at")}),tA=x((e,t)=>{tC(),t.exports=t_()("Array","at")}),tT=x((e,t)=>{t.exports=tA()}),tE=x((e,t)=>{t.exports=tT()}),tP=x((e,t)=>{var i=S(),n=W(),r=E(),o=function(e){return n.slice(0,e.length)===e};t.exports=o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":i.Bun&&"string"==typeof Bun.version?"BUN":i.Deno&&"object"==typeof Deno.version?"DENO":"process"===r(i.process)?"NODE":i.window&&i.document?"BROWSER":"REST"}),tL=x((e,t)=>{t.exports="NODE"===tP()}),tR=x((e,t)=>{var i=em();t.exports=function(e,t,n){return i.f(e,t,n)}}),tV=x((e,t)=>{var i=q(),n=tR(),r=ea(),o=R(),a=r("species");t.exports=function(e){var t=i(e);o&&t&&!t[a]&&n(t,a,{configurable:!0,get:function(){return this}})}}),tO=x((e,t)=>{var i=B(),n=TypeError;t.exports=function(e,t){if(i(t,e))return e;throw new n("Incorrect invocation")}}),tI=x((e,t)=>{var i=T(),n=L(),r=et(),o=i(Function.toString);n(r.inspectSource)||(r.inspectSource=function(e){return o(e)}),t.exports=r.inspectSource}),tM=x((e,t)=>{var i=T(),n=$(),r=L(),o=eZ(),a=q(),s=tI(),l=function(){},u=a("Reflect","construct"),d=/^\s*(?:class|function)\b/,c=i(d.exec),f=!d.test(l),p=function(e){if(!r(e))return!1;try{return u(l,[],e),!0}catch(e){return!1}},h=function(e){if(!r(e))return!1;switch(o(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!c(d,s(e))}catch(e){return!0}};h.sham=!0,t.exports=!u||n(function(){var e;return p(p.call)||!p(Object)||!p(function(){e=!0})||e})?h:p}),tN=x((e,t)=>{var i=tM(),n=K(),r=TypeError;t.exports=function(e){if(i(e))return e;throw new r(n(e)+" is not a constructor")}}),tj=x((e,t)=>{var i=ev(),n=tN(),r=N(),o=ea()("species");t.exports=function(e,t){var a,s=i(e).constructor;return void 0===s||r(a=i(s)[o])?t:n(a)}}),tD=x((e,t)=>{t.exports=T()([].slice)}),tF=x((e,t)=>{var i=TypeError;t.exports=function(e,t){if(e<t)throw new i("Not enough arguments");return e}}),tz=x((e,t)=>{var i=W();t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)}),tq=x((e,t)=>{var i,n,r,o,a=S(),s=A(),l=ep(),u=L(),d=er(),c=$(),f=eH(),p=tD(),h=eu(),v=tF(),m=tz(),g=tL(),_=a.setImmediate,b=a.clearImmediate,y=a.process,w=a.Dispatch,k=a.Function,x=a.MessageChannel,C=a.String,T=0,E={},P="onreadystatechange";c(function(){i=a.location});var R=function(e){if(d(E,e)){var t=E[e];delete E[e],t()}},V=function(e){return function(){R(e)}},O=function(e){R(e.data)},I=function(e){a.postMessage(C(e),i.protocol+"//"+i.host)};_&&b||(_=function(e){v(arguments.length,1);var t=u(e)?e:k(e),i=p(arguments,1);return E[++T]=function(){s(t,void 0,i)},n(T),T},b=function(e){delete E[e]},g?n=function(e){y.nextTick(V(e))}:w&&w.now?n=function(e){w.now(V(e))}:x&&!m?(o=(r=new x).port2,r.port1.onmessage=O,n=l(o.postMessage,o)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&i&&"file:"!==i.protocol&&!c(I)?(n=I,a.addEventListener("message",O,!1)):n=P in h("script")?function(e){f.appendChild(h("script"))[P]=function(){f.removeChild(this),R(e)}}:function(e){setTimeout(V(e),0)}),t.exports={set:_,clear:b}}),tB=x((e,t)=>{var i=S(),n=R(),r=Object.getOwnPropertyDescriptor;t.exports=function(e){if(!n)return i[e];var t=r(i,e);return t&&t.value}}),tW=x((e,t)=>{var i=function(){this.head=null,this.tail=null};i.prototype={add:function(e){var t={item:e,next:null},i=this.tail;i?i.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},t.exports=i}),tQ=x((e,t)=>{var i=W();t.exports=/ipad|iphone|ipod/i.test(i)&&"u">typeof Pebble}),tU=x((e,t)=>{var i=W();t.exports=/web0s(?!.*chrome)/i.test(i)}),tH=x((e,t)=>{var i,n,r,o,a,s,l,u=S(),d=tB(),c=ep(),f=tq().set,p=tW(),h=tz(),v=tQ(),m=tU(),g=tL(),_=u.MutationObserver||u.WebKitMutationObserver,b=u.document,y=u.process,w=u.Promise,k=d("queueMicrotask");k||(s=new p,l=function(){var e,t;for(g&&(e=y.domain)&&e.exit();t=s.get();)try{t()}catch(e){throw s.head&&i(),e}e&&e.enter()},h||g||m||!_||!b?!v&&w&&w.resolve?((o=w.resolve(void 0)).constructor=w,a=c(o.then,o),i=function(){a(l)}):g?i=function(){y.nextTick(l)}:(f=c(f,u),i=function(){f(l)}):(n=!0,r=b.createTextNode(""),new _(l).observe(r,{characterData:!0}),i=function(){r.data=n=!n}),k=function(e){s.head||i(),s.add(e)}),t.exports=k}),tG=x((e,t)=>{t.exports=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}}),tK=x((e,t)=>{t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}}),tJ=x((e,t)=>{t.exports=S().Promise}),tY=x((e,t)=>{var i=S(),n=tJ(),r=L(),o=ef(),a=tI(),s=ea(),l=tP(),u=X(),d=Q(),c=n&&n.prototype,f=s("species"),p=!1,h=r(i.PromiseRejectionEvent);t.exports={CONSTRUCTOR:o("Promise",function(){var e=a(n),t=e!==String(n);if(!t&&66===d||u&&!(c.catch&&c.finally))return!0;if(!d||d<51||!/native code/.test(e)){var i=new n(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((i.constructor={})[f]=r,!(p=i.then(function(){})instanceof r))return!0}return!t&&("BROWSER"===l||"DENO"===l)&&!h}),REJECTION_EVENT:h,SUBCLASSING:p}}),tZ=x((e,t)=>{var i=J(),n=TypeError,r=function(e){var t,r;this.promise=new e(function(e,i){if(void 0!==t||void 0!==r)throw new n("Bad Promise constructor");t=e,r=i}),this.resolve=i(t),this.reject=i(r)};e.f=function(e){return new r(e)}}),tX=x(()=>{var e,t,i,n,r=e_(),o=X(),a=tL(),s=S(),l=z(),u=V(),d=eK(),c=e3(),f=e0(),p=tV(),h=J(),v=L(),m=F(),g=tO(),_=tj(),b=tq().set,y=tH(),w=tG(),k=tK(),x=tW(),$=eW(),C=tJ(),A=tY(),T=tZ(),E="Promise",P=A.CONSTRUCTOR,R=A.REJECTION_EVENT,O=A.SUBCLASSING,I=$.getterFor(E),M=$.set,N=C&&C.prototype,j=C,D=N,q=s.TypeError,B=s.document,W=s.process,Q=T.f,U=Q,H=!!(B&&B.createEvent&&s.dispatchEvent),G="unhandledrejection",K=function(e){var t;return!!(m(e)&&v(t=e.then))&&t},Y=function(e,t){var i,n,r,o=t.value,a=1===t.state,s=a?e.ok:e.fail,l=e.resolve,d=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&en(t),t.rejection=1),!0===s?i=o:(c&&c.enter(),i=s(o),c&&(c.exit(),r=!0)),i===e.promise?d(new q("Promise-chain cycle")):(n=K(i))?u(n,i,l,d):l(i)):d(o)}catch(e){c&&!r&&c.exit(),d(e)}},Z=function(e,t){e.notified||(e.notified=!0,y(function(){for(var i,n=e.reactions;i=n.get();)Y(i,e);e.notified=!1,t&&!e.rejection&&et(e)}))},ee=function(e,t,i){var n,r;H?((n=B.createEvent("Event")).promise=t,n.reason=i,n.initEvent(e,!1,!0),s.dispatchEvent(n)):n={promise:t,reason:i},!R&&(r=s["on"+e])?r(n):e===G&&w("Unhandled promise rejection",i)},et=function(e){u(b,s,function(){var t,i=e.facade,n=e.value;if(ei(e)&&(t=k(function(){a?W.emit("unhandledRejection",n,i):ee(G,i,n)}),e.rejection=a||ei(e)?2:1,t.error))throw t.value})},ei=function(e){return 1!==e.rejection&&!e.parent},en=function(e){u(b,s,function(){var t=e.facade;a?W.emit("rejectionHandled",t):ee("rejectionhandled",t,e.value)})},er=function(e,t,i){return function(n){e(t,n,i)}},eo=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=2,Z(e,!0))},ea=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw new q("Promise can't be resolved itself");var n=K(t);n?y(function(){var i={done:!1};try{u(n,t,er(ea,i,e),er(eo,i,e))}catch(t){eo(i,t,e)}}):(e.value=t,e.state=1,Z(e,!1))}catch(t){eo({done:!1},t,e)}}};if(P&&(D=(j=function(t){g(this,D),h(t),u(e,this);var i=I(this);try{t(er(ea,i),er(eo,i))}catch(e){eo(i,e)}}).prototype,(e=function(e){M(this,{type:E,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:null})}).prototype=d(D,"then",function(e,t){var i=I(this),n=Q(_(this,j));return i.parent=!0,n.ok=!v(e)||e,n.fail=v(t)&&t,n.domain=a?W.domain:void 0,0===i.state?i.reactions.add(n):y(function(){Y(n,i)}),n.promise}),t=function(){var t=new e,i=I(t);this.promise=t,this.resolve=er(ea,i),this.reject=er(eo,i)},T.f=Q=function(e){return e===j||e===i?new t(e):U(e)},!o&&v(C)&&N!==Object.prototype)){n=N.then,O||d(N,"then",function(e,t){var i=this;return new j(function(e,t){u(n,i,e,t)}).then(e,t)},{unsafe:!0});try{delete N.constructor}catch(e){}c&&c(N,D)}r({global:!0,constructor:!0,wrap:!0,forced:P},{Promise:j}),i=l.Promise,f(j,E,!1,!0),p(E)}),t0=x((e,t)=>{var i,n,r=ea()("iterator"),o=!1;try{i=0,(n={next:function(){return{done:!!i++}},return:function(){o=!0}})[r]=function(){return this},Array.from(n,function(){throw 2})}catch(e){}t.exports=function(e,t){try{if(!t&&!o)return!1}catch(e){return!1}var i=!1;try{var n={};n[r]=function(){return{next:function(){return{done:i=!0}}}},e(n)}catch(e){}return i}}),t1=x((e,t)=>{var i=tJ(),n=t0();t.exports=tY().CONSTRUCTOR||!n(function(e){i.all(e).then(void 0,function(){})})}),t2=x(()=>{var e=e_(),t=V(),i=J(),n=tZ(),r=tK(),o=tn();e({target:"Promise",stat:!0,forced:t1()},{all:function(e){var a=this,s=n.f(a),l=s.resolve,u=s.reject,d=r(function(){var n=i(a.resolve),r=[],s=0,d=1;o(e,function(e){var i=s++,o=!1;d++,t(n,a,e).then(function(e){!o&&(o=!0,r[i]=e,--d||l(r))},u)}),--d||l(r)});return d.error&&u(d.value),s.promise}})}),t4=x(()=>{var e,t=e_(),i=X(),n=tY().CONSTRUCTOR,r=tJ(),o=q(),a=L(),s=eK(),l=r&&r.prototype;t({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&a(r)&&(e=o("Promise").prototype.catch,l.catch!==e&&s(l,"catch",e,{unsafe:!0}))}),t5=x(()=>{var e=e_(),t=V(),i=J(),n=tZ(),r=tK(),o=tn();e({target:"Promise",stat:!0,forced:t1()},{race:function(e){var a=this,s=n.f(a),l=s.reject,u=r(function(){var n=i(a.resolve);o(e,function(e){t(n,a,e).then(s.resolve,l)})});return u.error&&l(u.value),s.promise}})}),t3=x(()=>{var e=e_(),t=tZ();e({target:"Promise",stat:!0,forced:tY().CONSTRUCTOR},{reject:function(e){var i=t.f(this);return(0,i.reject)(e),i.promise}})}),t9=x((e,t)=>{var i=ev(),n=F(),r=tZ();t.exports=function(e,t){if(i(e),n(t)&&t.constructor===e)return t;var o=r.f(e);return(0,o.resolve)(t),o.promise}}),t6=x(()=>{var e=e_(),t=q(),i=X(),n=tJ(),r=tY().CONSTRUCTOR,o=t9(),a=t("Promise"),s=i&&!r;e({target:"Promise",stat:!0,forced:i||r},{resolve:function(e){return o(s&&this===a?n:this,e)}})}),t7=x(()=>{tX(),t2(),t4(),t5(),t3(),t6()}),t8=x(()=>{var e,t=e_(),i=X(),n=tJ(),r=$(),o=q(),a=L(),s=tj(),l=t9(),u=eK(),d=n&&n.prototype;t({target:"Promise",proto:!0,real:!0,forced:!!n&&r(function(){d.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=s(this,o("Promise")),i=a(e);return this.then(i?function(i){return l(t,e()).then(function(){return i})}:e,i?function(i){return l(t,e()).then(function(){throw i})}:e)}}),!i&&a(n)&&(e=o("Promise").prototype.finally,d.finally!==e&&u(d,"finally",e,{unsafe:!0}))}),ie=x((e,t)=>{t7(),t8(),t.exports=t_()("Promise","finally")}),it=x((e,t)=>{t.exports=ie()}),ii=x((e,t)=>{t.exports=it()}),ir={},io=Symbol(),ia=Symbol("filename");Symbol("hmr");var is="http://www.w3.org/1999/xhtml",il=Array.isArray,iu=Array.prototype.indexOf,id=Array.prototype.includes,ic=Array.from,ip=Object.defineProperty,ih=Object.getOwnPropertyDescriptor,iv=Object.getOwnPropertyDescriptors,im=Object.prototype,ig=Array.prototype,i_=Object.getPrototypeOf,ib=Object.isExtensible,iy=()=>{};function iw(e){for(var t=0;t<e.length;t++)e[t]()}function ik(){var e,t;return{promise:new Promise((i,n)=>{e=i,t=n}),resolve:e,reject:t}}var ix=Symbol("$state"),iS=Symbol("legacy props"),i$=Symbol(""),iC=Symbol("proxy path"),iA=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},iT=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function iE(e){{let t=Error(`lifecycle_outside_component
|
|
24
7
|
\`${e}(...)\` can only be used during component initialisation
|
|
25
|
-
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}
|
|
26
|
-
%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${i}\`, will be ignored in favour of the server value
|
|
27
|
-
https://svelte.dev/e/hydration_attribute_changed`,gr,hr):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Ki(e){G?console.warn(`%c[svelte] hydration_mismatch
|
|
8
|
+
https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}}var iP="font-weight: bold",iL="font-weight: normal";function iR(e){console.warn(`%c[svelte] hydration_mismatch
|
|
28
9
|
%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
|
|
29
|
-
https://svelte.dev/e/hydration_mismatch`,
|
|
30
|
-
%cTried to unmount a component that was not mounted
|
|
31
|
-
https://svelte.dev/e/lifecycle_double_unmount`,gr,hr):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function _r(e){G?console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
10
|
+
https://svelte.dev/e/hydration_mismatch`,iP,iL)}function iV(e){console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
32
11
|
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
|
|
33
|
-
https://svelte.dev/e/state_proxy_equality_mismatch`,
|
|
34
|
-
${n}in ${t.fn?.name||"<unknown>"}`,o=t.ctx;o
|
|
35
|
-
${n}in ${o.function?.[
|
|
12
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,iP,iL)}var iO=!1;function iI(e){if(null===e)throw iR(),ir;return u=e}function iM(){return iI(nF(u))}function iN(e){if(iO){if(null!==nF(u))throw iR(),ir;u=e}}function ij(e=1){if(iO){for(var t=e,i=u;t--;)i=nF(i);u=i}}function iD(e=!0){for(var t=0,i=u;;){if(8===i.nodeType){var n=i.data;if("]"===n){if(0===t)return i;t-=1}else"["!==n&&"[!"!==n&&("["!==n[0]||isNaN(Number(n.slice(1))))||(t+=1)}var r=nF(i);e&&i.remove(),i=r}}function iF(e){return e===this.v}function iz(e,t){return e!=e?t==t:e!==t||null!==e&&"object"==typeof e||"function"==typeof e}function iq(e){return!iz(e,this.v)}var iB=!1;function iW(e,t){var i,n;return e.label=t,i=e.v,n=t,i?.[iC]?.(n),e}var iQ=null,iU=null,iH=null;function iG(e){return iX("getContext").get(e)}function iK(e,t){let i=iX("setContext");return i.set(e,t),t}function iJ(e,t=!1,i){(iQ={p:iQ,i:!1,c:null,e:null,s:e,x:null,l:iB&&!t?{s:null,u:null,$:[]}:null}).function=i,iH=i}function iY(e){var t=iQ,i=t.e;if(null!==i)for(var n of(t.e=null,i))nY(n);return void 0!==e&&(t.x=e),t.i=!0,iQ=t.p,iH=iQ?.function??null,e??{}}function iZ(){return!iB||null!==iQ&&null===iQ.l}function iX(e){return null===iQ&&iE(e),iQ.c??=new Map(function(e){let t=e.p;for(;null!==t;){let e=t.c;if(null!==e)return e;t=t.p}return null}(iQ)||void 0)}var i0=[];function i1(){var e=i0;i0=[],iw(e)}function i2(e){if(0===i0.length&&!na){var t=i0;queueMicrotask(()=>{t===i0&&i1()})}i0.push(e)}var i4=new WeakMap;function i5(e){var t=ri;if(null===t)return re.f|=8388608,e;if(e instanceof Error&&!i4.has(e)&&i4.set(e,function(e,t){let i=ih(e,"message");if(!i||i.configurable){for(var n=c?" ":" ",r=`
|
|
13
|
+
${n}in ${t.fn?.name||"<unknown>"}`,o=t.ctx;null!==o;)r+=`
|
|
14
|
+
${n}in ${o.function?.[ia].split("/").pop()}`,o=o.p;return{message:e.message+`
|
|
36
15
|
${r}
|
|
37
|
-
|
|
38
|
-
`).filter(
|
|
39
|
-
`)})}}var Xi=!1,gn=null,en=!1,$i=!1;function ko(e){$i=e}var Bn=[],Qn=[],be=null,Wt=!1;function mt(e){be=e}var ve=null;function _t(e){ve=e}var Qt=null;function vr(e){be!==null&&be.f&2097152&&(Qt===null?Qt=[be,[e]]:Qt[1].push(e))}var Pt=null,Zt=0,Yt=null;function Gs(e){Yt=e}var fl=1,Ir=0,Li=!1,kr=null;function On(){return++fl}function qi(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){var i=e.deps,n=(t&256)!==0;if(i!==null){var r,o,a=(t&512)!==0,c=n&&ve!==null&&!Li,u=i.length;if(a||c){var g=e,p=g.parent;for(r=0;r<u;r++)o=i[r],(a||!o?.reactions?.includes(g))&&(o.reactions??=[]).push(g);a&&(g.f^=512),c&&p!==null&&(p.f&256)===0&&(g.f^=256)}for(r=0;r<u;r++)if(o=i[r],qi(o)&&To(o),o.wv>e.wv)return!0}(!n||ve!==null&&!Li)&&Ot(e,1024)}return!1}function ml(e,t,i=!0){var n=e.reactions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];Qt?.[1].includes(e)&&Qt[0]===be||((o.f&2)!==0?ml(o,t,!1):t===o&&(i?Ot(o,2048):(o.f&1024)!==0&&Ot(o,4096),Rn(o)))}}function mr(e){var t=Pt,i=Zt,n=Yt,r=be,o=Li,a=Qt,c=Ne,u=Wt,g=e.f;Pt=null,Zt=0,Yt=null,Li=(g&256)!==0&&(Wt||!en||be===null),be=(g&96)===0?e:null,Qt=null,Nn(e.ctx),Wt=!1,Ir++,e.f|=2097152;try{var p=(0,e.fn)(),s=e.deps;if(Pt!==null){var l;if(Un(e,Zt),s!==null&&Zt>0)for(s.length=Zt+Pt.length,l=0;l<Pt.length;l++)s[Zt+l]=Pt[l];else e.deps=s=Pt;if(!Li||(g&2)!==0&&e.reactions!==null)for(l=Zt;l<s.length;l++)(s[l].reactions??=[]).push(e)}else s!==null&&Zt<s.length&&(Un(e,Zt),s.length=Zt);if(Mi()&&Yt!==null&&!Wt&&s!==null&&(e.f&6146)===0)for(l=0;l<Yt.length;l++)ml(Yt[l],e);return r!==null&&r!==e&&(Ir++,Yt!==null&&(n===null?n=Yt:n.push(...Yt))),p}catch(m){ul(m)}finally{Pt=t,Zt=i,Yt=n,be=r,Li=o,Qt=a,Nn(c),Wt=u,e.f^=2097152}}function Zu(e,t){let i=t.reactions;if(i!==null){var n=Ms.call(i,e);if(n!==-1){var r=i.length-1;r===0?i=t.reactions=null:(i[n]=i[r],i.pop())}}i===null&&(t.f&2)!==0&&(Pt===null||!Pt.includes(t))&&(Ot(t,4096),(t.f&768)===0&&(t.f^=512),fr(t),Un(t,0))}function Un(e,t){var i=e.deps;if(i!==null)for(var n=t;n<i.length;n++)Zu(e,i[n])}function vn(e){var t=e.f;if((t&16384)===0){Ot(e,1024);var i=ve,n=en;if(ve=e,en=!0,G){var r=gi;Dn(e.component_function)}try{(t&16)!==0?rl(e):Co(e),Do(e);var o=mr(e);if(e.teardown=typeof o=="function"?o:null,e.wv=fl,G&&Si&&(e.f&2048)!==0&&e.deps!==null)for(var a of e.deps)a.set_during_effect&&(a.wv=On(),a.set_during_effect=!1);G&&Qn.push(e)}finally{en=n,ve=i,G&&Dn(r)}}}function cl(){console.error("Last ten effects were: ",Qn.slice(-10).map(e=>e.fn)),Qn=[]}function Ju(){try{Ls()}catch(e){if(G&&vt(e,"stack",{value:""}),gn!==null)if(G)try{Hn(e,gn)}catch(t){throw cl(),t}else Hn(e,gn);else throw G&&cl(),e}}function Ro(){var e=en;try{var t=0;for(en=!0;Bn.length>0;){t++>1e3&&Ju();var i=Bn,n=i.length;Bn=[];for(var r=0;r<n;r++){var o=ec(i[r]);Xu(o)}pn.clear()}}finally{Xi=!1,en=e,gn=null,G&&(Qn=[])}}function Xu(e){var t=e.length;if(t!==0)for(var i=0;i<t;i++){var n=e[i];(n.f&24576)===0&&qi(n)&&(vn(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?$o(n):n.fn=null))}}function Rn(e){Xi||(Xi=!0,queueMicrotask(Ro));for(var t=gn=e;t.parent!==null;){t=t.parent;var i=t.f;if((i&96)!==0){if((i&1024)===0)return;t.f^=1024}}Bn.push(t)}function ec(e){for(var t=[],i=e;i!==null;){var n=i.f,r=(n&96)!==0,o=r&&(n&1024)!==0;if(!o&&(n&8192)===0){(n&4)!==0?t.push(i):r?i.f^=1024:qi(i)&&vn(i);var a=i.first;if(a!==null){i=a;continue}}var c=i.parent;for(i=i.next;i===null&&c!==null;)i=c.next,c=c.parent}return t}function Yn(e){var t;for(e&&(Xi=!0,Ro(),Xi=!0,t=e());;){if(ll(),Bn.length===0)return Xi=!1,gn=null,G&&(Qn=[]),t;Xi=!0,Ro()}}function N(e){var t=e.f,i=(t&2)!==0;if(kr!==null&&kr.add(e),be!==null&&!Wt){if(!Qt?.[1].includes(e)||Qt[0]!==be){var n=be.deps;e.rv<Ir&&(e.rv=Ir,Pt===null&&n!==null&&n[Zt]===e?Zt++:Pt===null?Pt=[e]:(!Li||!Pt.includes(e))&&Pt.push(e))}}else if(i&&e.deps===null&&e.effects===null){var r=e,o=r.parent;o!==null&&(o.f&256)===0&&(r.f^=256)}if(i&&(r=e,qi(r)&&To(r)),G&&Si&&!Wt&&kn!==null&&be!==null&&kn.reaction===be)if(e.trace)e.trace();else{var a=Di("TracedAt");if(a){var c=kn.entries.get(e);c===void 0&&(c={traces:[]},kn.entries.set(e,c));var u=c.traces[c.traces.length-1];a.stack!==u?.stack&&c.traces.push(a)}}return $i&&pn.has(e)?pn.get(e):e.v}function Ze(e){var t=Wt;try{return Wt=!0,e()}finally{Wt=t}}var tc=-7169;function Ot(e,t){e.f=e.f&tc|t}var nc=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var $g=[...nc,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var rc=["touchstart","touchmove"];function vl(e){return rc.includes(e)}var oc=["$state","$state.raw","$derived","$derived.by"],Lg=[...oc,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var hl=new Map;function _l(e,t){var i=hl.get(e);i||(i=new Set,hl.set(e,i)),i.add(t)}function Nr(e){var t=be,i=ve;mt(null),_t(null);try{return e()}finally{mt(t),_t(i)}}var Vo=new Set,Dr=new Set;function bl(e,t,i,n={}){function r(o){if(n.capture||hn.call(t,o),!o.cancelBubble)return Nr(()=>i?.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Kt(()=>{t.addEventListener(e,r,n)}):t.addEventListener(e,r,n),r}function jo(e,t,i,n,r){var o={capture:n,passive:r},a=bl(e,t,i,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&St(()=>{t.removeEventListener(e,a,o)})}function Ft(e){for(var t=0;t<e.length;t++)Vo.add(e[t]);for(var i of Dr)i(e)}function hn(e){var t=this,i=t.ownerDocument,n=e.type,r=e.composedPath?.()||[],o=r[0]||e.target,a=0,c=e.__root;if(c){var u=r.indexOf(c);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var g=r.indexOf(t);if(g===-1)return;u<=g&&(a=u)}if(o=r[a]||e.target,o!==t){vt(e,"currentTarget",{configurable:!0,get(){return o||i}});var p=be,s=ve;mt(null),_t(null);try{for(var l,m=[];o!==null;){var v=o.assignedSlot||o.parentNode||o.host||null;try{var y=o["__"+n];if(y!=null&&(!o.disabled||e.target===o))if(oi(y)){var[_,...C]=y;_.apply(o,[e,...C])}else y.call(o,e)}catch(k){l?m.push(k):l=k}if(e.cancelBubble||v===t||v===null)break;o=v}if(l){for(let k of m)queueMicrotask(()=>{throw k});throw l}}finally{e.__root=t,delete e.currentTarget,mt(p),_t(s)}}}var lc;function xl(){lc=void 0}function Wn(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Jt(e,t){var i=ve;i.nodes_start===null&&(i.nodes_start=e,i.nodes_end=t)}function se(e,t){var i=(t&1)!==0,n=(t&2)!==0,r,o=!e.startsWith("<!>");return()=>{if(ce)return Jt(_e,null),_e;r===void 0&&(r=Wn(o?e:"<!>"+e),i||(r=ct(r)));var a=n||Vn?document.importNode(r,!0):r.cloneNode(!0);if(i){var c=ct(a),u=a.lastChild;Jt(c,u)}else Jt(a,a);return a}}function uc(e,t,i="svg"){var n=!e.startsWith("<!>"),r=(t&1)!==0,o=`<${i}>${n?e:"<!>"+e}</${i}>`,a;return()=>{if(ce)return Jt(_e,null),_e;if(!a){var c=Wn(o),u=ct(c);if(r)for(a=document.createDocumentFragment();ct(u);)a.appendChild(ct(u));else a=ct(u)}var g=a.cloneNode(!0);if(r){var p=ct(g),s=g.lastChild;Jt(p,s)}else Jt(g,g);return g}}function Dt(e,t){return uc(e,t,"svg")}function tn(){if(ce)return Jt(_e,null),_e;var e=document.createDocumentFragment(),t=document.createComment(""),i=di();return e.append(t,i),Jt(t,i),e}function q(e,t){if(ce){ve.nodes_end=_e,bt();return}e!==null&&e.before(t)}var zo=!0;function Me(e,t){var i=t==null?"":typeof t=="object"?t+"":t;i!==(e.__t??=e.nodeValue)&&(e.__t=i,e.nodeValue=i+"")}function nn(e,t){return wl(e,t)}function Fo(e,t){xr(),t.intro=t.intro??!1;let i=t.target,n=ce,r=_e;try{for(var o=ct(i);o&&(o.nodeType!==ai||o.data!==ji);)o=kt(o);if(!o)throw Ni;It(!0),ot(o),bt();let a=wl(e,{...t,anchor:o});if(_e===null||_e.nodeType!==ai||_e.data!==Yi)throw Ki(),Ni;return It(!1),a}catch(a){if(a===Ni)return t.recover===!1&&Os(),xr(),jn(i),It(!1),nn(e,t);throw a}finally{It(n),ot(r),xl()}}var _n=new Map;function wl(e,{target:t,anchor:i,props:n={},events:r,context:o,intro:a=!0}){xr();var c=new Set,u=s=>{for(var l=0;l<s.length;l++){var m=s[l];if(!c.has(m)){c.add(m);var v=vl(m);t.addEventListener(m,hn,{passive:v});var y=_n.get(m);y===void 0?(document.addEventListener(m,hn,{passive:v}),_n.set(m,1)):_n.set(m,y+1)}}};u(Mn(Vo)),Dr.add(u);var g=void 0,p=nl(()=>{var s=i??t.appendChild(di());return gt(()=>{if(o){we({});var l=Ne;l.c=o}r&&(n.$$events=r),ce&&Jt(s,null),zo=a,g=e(s,n)||{},zo=!0,ce&&(ve.nodes_end=_e),o&&Se()}),()=>{for(var l of c){t.removeEventListener(l,hn);var m=_n.get(l);--m===0?(document.removeEventListener(l,hn),_n.delete(l)):_n.set(l,m)}Dr.delete(u),s!==i&&s.parentNode?.removeChild(s)}});return Uo.set(g,p),g}var Uo=new WeakMap;function Gn(e,t){let i=Uo.get(e);return i?(Uo.delete(e),i(t)):(G&&Ks(),Promise.resolve())}function ke(e,t,[i,n]=[0,0]){ce&&i===0&&bt();var r=e,o=null,a=null,c=ut,u=i>0?65536:0,g=!1;let p=(l,m=!0)=>{g=!0,s(m,l)},s=(l,m)=>{if(c===(c=l))return;let v=!1;if(ce&&n!==-1){if(i===0){let _=br(r);_===ji?n=0:_===zi?n=1/0:(n=parseInt(_.substring(1)),n!==n&&(n=c?1/0:-1))}let y=n>i;!!c===y&&(r=Zi(),ot(r),It(!1),v=!0,n=-1)}c?(o?Ui(o):m&&(o=gt(()=>m(r))),a&&ui(a,()=>{a=null})):(a?Ui(a):m&&(a=gt(()=>m(r,[i+1,n]))),o&&ui(o,()=>{o=null})),v&&It(!0)};xt(()=>{g=!1,t(p),g||s(null,null)},u),ce&&(r=_e)}function Ho(e,t,i){ce&&bt();var n=e,r=ut,o,a=Mi()?ks:dn;xt(()=>{a(r,r=t())&&(o&&ui(o),o=gt(()=>i(n)))}),ce&&(n=_e)}var qn=null;function mc(e,t,i,n){for(var r=[],o=t.length,a=0;a<o;a++)Mr(t[a].e,r,!0);var c=o>0&&r.length===0&&i!==null;if(c){var u=i.parentNode;jn(u),u.append(i),n.clear(),Fi(e,t[0].prev,t[o-1].next)}Lo(r,()=>{for(var g=0;g<o;g++){var p=t[g];c||(n.delete(p.k),Fi(e,p.prev,p.next)),yt(p.e,!c)}})}function Yo(e,t,i,n,r,o=null){var a=e,c={flags:t,items:new Map,first:null},u=(t&4)!==0;if(u){var g=e;a=ce?ot(ct(g)):g.appendChild(di())}ce&&bt();var p=null,s=!1,l=Ln(()=>{var m=i();return oi(m)?m:m==null?[]:Mn(m)});xt(()=>{var m=N(l),v=m.length;if(s&&v===0)return;s=v===0;let y=!1;if(ce){var _=br(a)===zi;_!==(v===0)&&(a=Zi(),ot(a),It(!1),y=!0)}if(ce){for(var C=null,k,I=0;I<v;I++){if(_e.nodeType===ai&&_e.data===Yi){a=_e,y=!0,It(!1);break}var h=m[I],b=n(h,I);k=Tl(_e,c,C,null,h,b,I,r,t,i),c.items.set(b,k),C=k}v>0&&ot(Zi())}ce||vc(m,c,a,r,t,n,i),o!==null&&(v===0?p?Ui(p):p=gt(()=>o(a)):p!==null&&ui(p,()=>{p=null})),y&&It(!0),N(l)}),ce&&(a=_e)}function vc(e,t,i,n,r,o,a){var c=(r&8)!==0,u=(r&3)!==0,g=e.length,p=t.items,s=t.first,l=s,m,v=null,y,_=[],C=[],k,I,h,b;if(c)for(b=0;b<g;b+=1)k=e[b],I=o(k,b),h=p.get(I),h!==void 0&&(h.a?.measure(),(y??=new Set).add(h));for(b=0;b<g;b+=1){if(k=e[b],I=o(k,b),h=p.get(I),h===void 0){var x=l?l.e.nodes_start:i;v=Tl(x,t,v,v===null?t.first:v.next,k,I,b,n,r,a),p.set(I,v),_=[],C=[],l=v.next;continue}if(u&&gc(h,k,b,r),(h.e.f&8192)!==0&&(Ui(h.e),c&&(h.a?.unfix(),(y??=new Set).delete(h))),h!==l){if(m!==void 0&&m.has(h)){if(_.length<C.length){var E=C[0],$;v=E.prev;var L=_[0],A=_[_.length-1];for($=0;$<_.length;$+=1)Sl(_[$],E,i);for($=0;$<C.length;$+=1)m.delete(C[$]);Fi(t,L.prev,A.next),Fi(t,v,L),Fi(t,A,E),l=E,v=A,b-=1,_=[],C=[]}else m.delete(h),Sl(h,l,i),Fi(t,h.prev,h.next),Fi(t,h,v===null?t.first:v.next),Fi(t,v,h),v=h;continue}for(_=[],C=[];l!==null&&l.k!==I;)(l.e.f&8192)===0&&(m??=new Set).add(l),C.push(l),l=l.next;if(l===null)continue;h=l}_.push(h),v=h,l=h.next}if(l!==null||m!==void 0){for(var M=m===void 0?[]:Mn(m);l!==null;)(l.e.f&8192)===0&&M.push(l),l=l.next;var f=M.length;if(f>0){var j=(r&4)!==0&&g===0?i:null;if(c){for(b=0;b<f;b+=1)M[b].a?.measure();for(b=0;b<f;b+=1)M[b].a?.fix()}mc(t,M,j,p)}}c&&Kt(()=>{if(y!==void 0)for(h of y)h.a?.apply()}),ve.first=t.first&&t.first.e,ve.last=v&&v.e}function gc(e,t,i,n){(n&1)!==0&&mn(e.v,t),(n&2)!==0?mn(e.i,i):e.i=i}function Tl(e,t,i,n,r,o,a,c,u,g){var p=qn,s=(u&1)!==0,l=(u&16)===0,m=s?l?Ti(r,!1,!1):li(r):r,v=(u&2)===0?a:li(a);G&&s&&(m.trace=()=>{var _=typeof v=="number"?a:v.v;g()[_]});var y={i:v,v:m,k:o,a:null,e:null,prev:i,next:n};qn=y;try{return y.e=gt(()=>c(e,m,v,g),ce),y.e.prev=i&&i.e,y.e.next=n&&n.e,i===null?t.first=y:(i.next=y,i.e.next=y.e),n!==null&&(n.prev=y,n.e.prev=y.e),y}finally{qn=p}}function Sl(e,t,i){for(var n=e.next?e.next.e.nodes_start:i,r=t?t.e.nodes_start:i,o=e.e.nodes_start;o!==n;){var a=kt(o);r.before(o),o=a}}function Fi(e,t,i){t===null?e.first=i:(t.next=i,t.e.next=i&&i.e),i!==null&&(i.prev=t,i.e.prev=t&&t.e)}function Wo(e,t,i,n,r){ce&&bt();var o=t.$$slots?.[i],a=!1;o===!0&&(o=t[i==="default"?"children":i],a=!0),o===void 0?r!==null&&r(e):o(e,a?()=>n:n)}function yn(e,t,...i){var n=e,r=ht,o;xt(()=>{r!==(r=t())&&(o&&(yt(o),o=null),G&&r==null&&Ps(),o=gt(()=>r(n,...i)))},65536),ce&&(n=_e)}var Ko;function Il(e){return Ko=e.target,new qo(e)}var qo=class{#t;#e;constructor(t){var i=new Map,n=(o,a)=>{var c=Ti(a,!1,!1);return i.set(o,c),c};let r=new Proxy({...t.props||{},$$events:{}},{get(o,a){return N(i.get(a)??n(a,Reflect.get(o,a)))},has(o,a){return a===Tn?!0:(N(i.get(a)??n(a,Reflect.get(o,a))),Reflect.has(o,a))},set(o,a,c){return ue(i.get(a)??n(a,c),c),Reflect.set(o,a,c)}});this.#e=(t.hydrate?Fo:nn)(t.component,{target:t.target,anchor:t.anchor,props:r,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&Yn(),this.#t=r.$$events;for(let o of Object.keys(this.#e))o==="$set"||o==="$destroy"||o==="$on"||vt(this,o,{get(){return this.#e[o]},set(a){this.#e[o]=a},enumerable:!0});this.#e.$set=o=>{Object.assign(r,o)},this.#e.$destroy=()=>{Gn(this.#e)}}$set(t){this.#e.$set(t)}$on(t,i){this.#t[t]=this.#t[t]||[];let n=(...r)=>i.call(this,...r);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(r=>r!==n)}}$destroy(){this.#e.$destroy()}};function De(e,t){Kt(()=>{var i=e.getRootNode(),n=i.host?i:i.head??i.ownerDocument.head??Ko?.parentNode;if(!n?.querySelector("#"+t.hash)){let r=document.createElement("style");r.id=t.hash,r.textContent=t.code,n.appendChild(r),G&&_l(t.hash,r)}})}function Nl(e){var t,i,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(i=Nl(e[t]))&&(n&&(n+=" "),n+=i)}else for(i in e)e[i]&&(n&&(n+=" "),n+=i);return n}function Dl(){for(var e,t,i=0,n="",r=arguments.length;i<r;i++)(e=arguments[i])&&(t=Nl(e))&&(n&&(n+=" "),n+=t);return n}function Ii(e){return typeof e=="object"?Dl(e):e??""}var Cl=[...`
|
|
40
|
-
\r\f \v\uFEFF`];function Ll(e,t,i){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),i){for(var r in i)if(i[r])n=n?n+" "+r:r;else if(n.length)for(var o=r.length,a=0;(a=n.indexOf(r,a))>=0;){var c=a+o;(a===0||Cl.includes(n[a-1]))&&(c===n.length||Cl.includes(n[c]))?n=(a===0?"":n.substring(0,a))+n.substring(c+1):a=c}}return n===""?null:n}function $l(e,t=!1){var i=t?" !important;":";",n="";for(var r in e){var o=e[r];o!=null&&o!==""&&(n+=" "+r+": "+o+i)}return n}function Zo(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Ol(e,t){if(t){var i="",n,r;if(Array.isArray(t)?(n=t[0],r=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,a=0,c=!1,u=[];n&&u.push(...Object.keys(n).map(Zo)),r&&u.push(...Object.keys(r).map(Zo));var g=0,p=-1;let y=e.length;for(var s=0;s<y;s++){var l=e[s];if(c?l==="/"&&e[s-1]==="*"&&(c=!1):o?o===l&&(o=!1):l==="/"&&e[s+1]==="*"?c=!0:l==='"'||l==="'"?o=l:l==="("?a++:l===")"&&a--,!c&&o===!1&&a===0){if(l===":"&&p===-1)p=s;else if(l===";"||s===y-1){if(p!==-1){var m=Zo(e.substring(g,p).trim());if(!u.includes(m)){l!==";"&&s++;var v=e.substring(g,s).trim();i+=" "+v+";"}}g=s+1,p=-1}}}}return n&&(i+=$l(n)),r&&(i+=$l(r,!0)),i=i.trim(),i===""?null:i}return e==null?null:String(e)}function ci(e,t,i,n,r,o){var a=e.__className;if(ce||a!==i||a===void 0){var c=Ll(i,n,o);(!ce||c!==e.getAttribute("class"))&&(c==null?e.removeAttribute("class"):t?e.className=c:e.setAttribute("class",c)),e.__className=i}else if(o&&r!==o)for(var u in o){var g=!!o[u];(r==null||g!==!!r[u])&&e.classList.toggle(u,g)}return o}function Jo(e,t={},i,n){for(var r in i){var o=i[r];t[r]!==o&&(i[r]==null?e.style.removeProperty(r):e.style.setProperty(r,o,n))}}function rt(e,t,i,n){var r=e.__style;if(ce||r!==t){var o=Ol(t,n);(!ce||o!==e.getAttribute("style"))&&(o==null?e.removeAttribute("style"):e.style.cssText=o),e.__style=t}else n&&(Array.isArray(n)?(Jo(e,i?.[0],n[0]),Jo(e,i?.[1],n[1],"important")):Jo(e,i,n));return n}var Nc=Symbol("class"),Dc=Symbol("style"),Cc=Symbol("is custom element"),$c=Symbol("is html");function Je(e,t,i,n){var r=Lc(e);if(ce&&(r[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||Pc(e,t,i??"");return}r[t]!==(r[t]=i)&&(t==="loading"&&(e[Is]=i),i==null?e.removeAttribute(t):typeof i!="string"&&Oc(e).includes(t)?e[t]=i:e.setAttribute(t,i))}function Lc(e){return e.__attributes??={[Cc]:e.nodeName.includes("-"),[$c]:e.namespaceURI===Bs}}var Pl=new Map;function Oc(e){var t=Pl.get(e.nodeName);if(t)return t;Pl.set(e.nodeName,t=[]);for(var i,n=e,r=Element.prototype;r!==n;){i=ho(n);for(var o in i)i[o].set&&t.push(o);n=sn(n)}return t}function Pc(e,t,i){G&&(t==="srcset"&&Rc(e,i)||Xo(e.getAttribute(t)??"",i)||qs(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(i)))}function Xo(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Rl(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function Rc(e,t){var i=Rl(e.srcset),n=Rl(t);return n.length===i.length&&n.every(([r,o],a)=>o===i[a][1]&&(Xo(i[a][0],r)||Xo(r,i[a][0])))}function Vl(e,t){return e===t||e?.[Vt]===t}function Xt(e={},t,i,n){return jt(()=>{var r,o;return Nt(()=>{r=o,o=n?.()||[],Ze(()=>{e!==i(...o)&&(t(e,...o),r&&Vl(i(...r),e)&&t(null,...r))})}),()=>{Kt(()=>{o&&Vl(i(...o),e)&&t(null,...o)})}}),e}function Kn(e,t,i){if(e==null)return t(void 0),i&&i(void 0),ht;let n=Ze(()=>e.subscribe(t,i));return n.unsubscribe?()=>n.unsubscribe():n}var bn=[];function ei(e,t){return{subscribe:H(e,t).subscribe}}function H(e,t=ht){let i=null,n=new Set;function r(c){if(dn(e,c)&&(e=c,i)){let u=!bn.length;for(let g of n)g[1](),bn.push(g,e);if(u){for(let g=0;g<bn.length;g+=2)bn[g][0](bn[g+1]);bn.length=0}}}function o(c){r(c(e))}function a(c,u=ht){let g=[c,u];return n.add(g),n.size===1&&(i=t(r,o)||ht),c(e),()=>{n.delete(g),n.size===0&&i&&(i(),i=null)}}return{set:r,update:o,subscribe:a}}function Xe(e,t,i){let n=!Array.isArray(e),r=n?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let o=t.length<2;return ei(i,(a,c)=>{let u=!1,g=[],p=0,s=ht,l=()=>{if(p)return;s();let v=t(n?g[0]:g,a,c);o?a(v):s=typeof v=="function"?v:ht},m=r.map((v,y)=>Kn(v,_=>{g[y]=_,p&=~(1<<y),u&&l()},()=>{p|=1<<y}));return u=!0,l(),function(){ln(m),s(),u=!1}})}function ye(e){let t;return Kn(e,i=>t=i)(),t}var $r=!1,ea=Symbol();function et(e,t,i){let n=i[t]??={store:null,source:Ti(void 0),unsubscribe:ht};if(n.store!==e&&!(ea in i))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=ht;else{var r=!0;n.unsubscribe=Kn(e,o=>{r?n.source.v=o:ue(n.source,o)}),r=!1}return e&&ea in i?ye(e):N(n.source)}function ti(){let e={};function t(){St(()=>{for(var i in e)e[i].unsubscribe();vt(e,ea,{enumerable:!1,value:!0})})}return[e,t]}function ta(e){var t=$r;try{return $r=!1,[e(),$r]}finally{$r=t}}function jl(e){return e.ctx?.d??!1}function tt(e,t,i,n){var r=(i&1)!==0,o=!wi||(i&2)!==0,a=(i&8)!==0,c=(i&16)!==0,u=!1,g;a?[g,u]=ta(()=>e[t]):g=e[t];var p=Vt in e||Tn in e,s=a&&(Rt(e,t)?.set??(p&&t in e&&(E=>e[t]=E)))||void 0,l=n,m=!0,v=!1,y=()=>(v=!0,m&&(m=!1,c?l=Ze(n):l=n),l);g===void 0&&n!==void 0&&(s&&o&&Rs(t),g=y(),s&&s(g));var _;if(o)_=()=>{var E=e[t];return E===void 0?y():(m=!0,v=!1,E)};else{var C=(r?Ci:Ln)(()=>e[t]);C.f|=131072,_=()=>{var E=N(C);return E!==void 0&&(l=void 0),E===void 0?l:E}}if((i&4)===0&&o)return _;if(s){var k=e.$$legacy;return function(E,$){return arguments.length>0?((!o||!$||k||u)&&s($?_():E),E):_()}}var I=!1,h=!1,b=Ti(g),x=Ci(()=>{var E=_(),$=N(b);return I?(I=!1,h=!0,$):(h=!1,b.v=E)});return a&&N(x),r||(x.equals=un),function(E,$){if(kr!==null&&(I=h,_(),N(b)),arguments.length>0){let L=$?N(x):o&&a?Mt(E):E;if(!x.equals(L)){if(I=!0,ue(b,L),v&&l!==void 0&&(l=L),jl(x))return E;Ze(()=>N(x))}return E}return jl(x)?x.v:N(x)}}var Yc;typeof HTMLElement=="function"&&(Yc=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,i){super(),this.$$ctor=e,this.$$s=t,i&&this.attachShadow({mode:"open"})}addEventListener(e,t,i){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,i)}removeEventListener(e,t,i){if(super.removeEventListener(e,t,i),this.$$c){let n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(r){return o=>{let a=document.createElement("slot");r!=="default"&&(a.name=r),q(o,a)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let i={},n=Wc(this);for(let r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=t(r),i.default=!0):i[r]=t(r));for(let r of this.attributes){let o=this.$$g_p(r.name);o in this.$$d||(this.$$d[o]=ia(o,r.value,this.$$p_d,"toProp"))}for(let r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Il({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:i,$$host:this}}),this.$$me=Sr(()=>{Nt(()=>{this.$$r=!0;for(let r of go(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];let o=ia(r,this.$$d[r],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,o)}this.$$r=!1})});for(let r in this.$$l)for(let o of this.$$l[r]){let a=this.$$c.$on(r,o);this.$$l_u.set(o,a)}this.$$l={}}}attributeChangedCallback(e,t,i){this.$$r||(e=this.$$g_p(e),this.$$d[e]=ia(e,i,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return go(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function ia(e,t,i,n){let r=i[e]?.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!i[e])return t;if(n==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Wc(e){let t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}if(G){let e=function(t){if(!(t in globalThis)){let i;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(i!==void 0)return i;Vs(t)},set:n=>{i=n}})}};qc=e,e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}var qc;function bi(e){Ne===null&&cn("onMount"),wi&&Ne.l!==null?Gc(Ne).m.push(e):Ut(()=>{let t=Ze(e);if(typeof t=="function")return t})}function Ul(e){Ne===null&&cn("onDestroy"),bi(()=>()=>Ze(e))}function Gc(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var Jc={debugLog:!1,devNullLog:!1,defaultLanguage:Kc.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,showSupport:!0,supportLink:"https://vk.com/support?act=new&from=v",showLogo:void 0,logoLink:"https://vk.com/video",logoType:"vk_video",volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,trafficSavingLimit:Fl.Q_480P,highQualityLimit:Fl.Q_720P,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,fullscreen:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,copyVideoLink:!0,videoRotate:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,userVideoPrefs:!1,initSubtitles:!0},controls:{playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},userSalt:"0"},na=e=>Zc(e,Jc),Hl=e=>$n("ui-config",e),Lr=()=>Cn("ui-config");import{cloneDeepWith as fm,devNull as ro,getPlayerId as mm,getWindow as Ba,InterfaceLanguage as vm,Logger as gm,now as hm,Subscription as _m,ValueSubject as ym}from"@vkontakte/videoplayer-shared";var Bl="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Bl);Fs();var Ql="var(--btn-color, #fff)";var Xc=Dt('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),ep=Dt('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function ii(e,t){we(t,!0);let i=tt(t,"width",19,()=>"14"),n=tt(t,"height",19,()=>"14"),r=tt(t,"fill",3,Ql),o=t.viewBox??`0 0 ${i()} ${n()}`;var a=ep(),c=U(a);{var u=p=>{var s=Xc(),l=qt(s),m=U(l);yn(m,()=>t.children),z(l),yr(),q(p,s)},g=p=>{var s=tn(),l=qt(s);yn(l,()=>t.children),q(p,s)};ke(c,p=>{t.shadow?p(u):p(g,!1)})}z(a),me(()=>{Je(a,"aria-label",t.ariaLabel),Je(a,"aria-hidden",!t.ariaLabel),Je(a,"width",i()),Je(a,"height",n()),Je(a,"viewBox",o),Je(a,"fill",r()),rt(a,t.style),Je(a,"data-testid",t.testId)}),q(e,a),Se()}var tp=Dt('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function ra(e){ii(e,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(t,i)=>{var n=tp();q(t,n)},$$slots:{default:!0}})}var ip=se('<div class="container s-2"><!></div>'),np={hash:"s-2",code:".container.s-2{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Zn(e){De(e,np);var t=ip(),i=U(t);ra(i,{}),z(t),q(e,t)}var rp=se('<div class="playerError s-0"><!></div>'),op={hash:"s-0",code:".playerError.s-0{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function oa(e){De(e,op);var t=rp(),i=U(t);Zn(i,{}),z(t),q(e,t)}function Yl(e,t){let i=new Set([...Object.keys(e),...Object.keys(t)]),n={};for(let r of i)n[r]=t[r]??e[r]??void 0;return n}var Jn="ui-tv";import{MediascopePixel as bm,OneStat as xm,ThinOneStat as Am}from"@vkontakte/videoplayer-statistics";import{Subscription as ap}from"@vkontakte/videoplayer-shared";import"@vkontakte/videoplayer-statistics";var Pr=class{constructor(t,i,n,r=new ap){this.oneStat=t;this.thinOneStat=i;this.mediascopePixel=n;this.statSubscription=r}destroy(){this.oneStat?.destroy(),this.thinOneStat?.destroy(),this.mediascopePixel?.destroy(),this.statSubscription.unsubscribe()}};import{clientChecker as kd,PlaybackState as tr,Player as Cp,PredefinedQualityLimits as Hi,VideoFormat as Wr}from"@vkontakte/videoplayer-core";import{assertNonNullable as ni,cloneDeep as $p,devNull as Lp,getHighestQuality as Op,InterfaceLanguage as Pp,isInvariantQuality as Rp,isNonNullable as Vp,loadVKLangPack as jp,Logger as zp,map as Nd,merge as Up,now as Fp,Observable as Gr,Subject as qr,Subscription as Hp,TracerFactory as Bp,ValueSubject as Qp,VideoQuality as Yp}from"@vkontakte/videoplayer-shared";import{SeekAction as xn}from"@vkontakte/videoplayer-statistics";import"@vkontakte/videoplayer-core";import{detectEmbed as sp,devNull as Le,isNonNullable as lp,now as Oe}from"@vkontakte/videoplayer-shared";import{addScript as dp,Subject as Ct,clearVideoElement as up}from"@vkontakte/videoplayer-shared";var cp="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Rr=class{constructor(t,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new Ct,loadStarted$:new Ct,loadEnded$:new Ct,loadError$:new Ct,ready$:new Ct,slotRequested$:new Ct,started$:new Ct,timeRemained$:new Ct,paused$:new Ct,resumed$:new Ct,ended$:new Ct,empty$:new Ct,skipped$:new Ct,clicked$:new Ct,closed$:new Ct,error$:new Ct};this.loadAdman=t=>(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[Oe()]}),this.useAdmanFromNPM?this.loadAdmanNPM(t):this.loadAdmanMailRu(t));this.loadAdmanMailRu=t=>new Promise((i,n)=>{let r;this.events.loadStarted$.next();let o=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[Oe()]}),n())};dp(cp,t,this.loadTimeout).then(()=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[Oe()]}),window.AdmanHTML?(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[Oe()]}),window.admanAsyncInit=o,r=window.setTimeout(o,this.initTimeout))}).catch(a=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(a)],numbers:[Oe()]}),n(),clearTimeout(r)})});this.loadAdmanNPM=t=>new Promise((i,n)=>{let r;this.events.loadStarted$.next();let o=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[Oe()]}),n())},a=()=>{c=!0,n()},c=!1,u=window.setTimeout(()=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[Oe()]}),a()},this.loadTimeout);t.addEventListener("abort",a),t.aborted&&(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[Oe()]}),a()),window.AdmanHTML=window.AdmanHTML||null,Promise.resolve().then(()=>Fu(Wl(),1)).then(()=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(c)],numbers:[Oe()]}),!c&&(window.AdmanHTML?(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[Oe()]}),window.admanAsyncInit=o,r=window.setTimeout(o,this.initTimeout)))},a).finally(()=>{clearTimeout(r),clearTimeout(u),t.removeEventListener("abort",a)})});this.onAdsReady=()=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[Oe()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(t,i)=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",t,"muted: "+i.muted],numbers:[Oe(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${t}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(t),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("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),this.externalApi?.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,t,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=t=>{(this.adsState?.playbackState?ye(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(t.currentTime),this.events.timeRemained$.next(t),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",this.currentAdSection??""],numbers:[Oe()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",this.currentAdSection??""],numbers:[Oe()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[Oe()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch{this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",this.currentAdSection??""],numbers:[Oe()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",this.currentAdSection??""],numbers:[Oe()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",this.currentAdSection??""],numbers:[Oe()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",this.currentAdSection??""],numbers:[Oe()]}),this.log({message:"ad clicked"}),this.videoElement?.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(t="ad error")=>{Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",t],numbers:[Oe()]}),this.log({message:t}),this.events.error$.next(t),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=t.createComponentLog("AdmanWrapper"),Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[Oe()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(t,i,n){this.actions=t,this.adsState=i,this.playerState=n}onAdmanLoadingError(){this.onAdError("adman loading error")}async initAdman(t){if(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[Oe(),t.slotId]}),this.adman)return;this.events.init$.next(t.slotId),this.startWatchDog();let{width:i,height:n,isAutoplay:r,adsContainer:o,adsVideoElement:a,slotId:c,params:u={},paramsOverride:g={},duration:p,externalApi:s}=t;this.externalApi=s;let l,m=this.playerState&&ye(this.playerState.vsid);m&&(this.isVsidOriginal?l=m:l=parseInt(m,36));let{isEmbed:v,immediateOrigin:y}=sp(),_=(v?y:window.location.href)??window.location.href,C={...u,dl:encodeURIComponent(_),autoplay:r?1:0,player_width:i,player_height:n,...l?{request_id:l}:{},duration:p,...g};C=Object.fromEntries(Object.entries(C).filter(([I,h])=>lp(h)));let k={slot:c,wrapper:o,videoEl:a,videoQuality:n,params:C,browser:{mobile:!1}};try{let I=new window.AdmanHTML;if(I.onReady(this.onAdsReady),I.onStarted(this.onAdStarted),I.onPlayed(this.onAdPlayed),I.onPaused(this.onAdPaused),I.adMidrollPoint(this.onAdMidrollPoint),I.onClosed(this.onAdClosed),I.onSkipped(this.onAdSkipped),I.onClicked(this.onAdClicked),I.onTimeRemained(this.onAdTimeRemained),I.onCompleted(this.onAdCompleted),I.onError(this.onAdError),I.setDebug(!1),this.externalApi?.videoGetAds){let h=await this.safeExternalCall(this.externalApi.videoGetAds,C);h&&(delete k.slot,delete k.params,Object.assign(k,{json:h}))}I.init(k),this.adman=I,this.videoElement=a,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(k)}`})}catch(I){Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(I)],numbers:[Oe()]}),this.onAdError("could not init adman")}}switchToVideo(t=!1){if(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",this.currentAdSection??"","force: "+t],numbers:[Oe()]}),this.currentAdSection===null&&!t){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let n="Switch to video: Adman state was not updated correctly";this.log({message:n}),this.events.error$.next(n)}this.actions.switchFromAdsToVideo?.(!i)}}setPostrollPassed(t){this.adsState?.postrollPassed.set(t),this.log({message:"postroll passed"})}togglePlay(){if(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",this.currentAdSection??""],numbers:[Oe()]}),this.adsState){this.log({message:"toggle play"});let t=ye(this.adsState.playbackState);t==="playing"?this.pause():t==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(t){this.log({message:`set initial volume ${t}`}),this.initialVolume=t}setVolume(t){let i=t*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch{this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(t){if(this.log({message:`set fullscreen ${t}`}),this.adman)try{this.adman.setFullscreen(t)}catch{this.onAdError("could not set ad fullscreen")}}startPreroll(){if(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[Oe()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch{this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){if(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",this.currentAdSection??""],numbers:[Oe()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch{this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){if(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",this.currentAdSection??""],numbers:[Oe()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch{this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){if(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",this.currentAdSection??""],numbers:[Oe()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch{this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){if(Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",this.currentAdSection??""],numbers:[Oe()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch{this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(t,i){this.adman?.setPosition(Math.floor(t),Math.floor(i))}destroy(){Le.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[Oe()]}),this.log({message:"destroy"}),this.stopWatchDog(),this.adman?.onReady(void 0),this.adman?.onStarted(void 0),this.adman?.onPlayed(void 0),this.adman?.onPaused(void 0),this.adman?.adMidrollPoint(void 0),this.adman?.onClosed(void 0),this.adman?.onSkipped(void 0),this.adman?.onClicked(void 0),this.adman?.onTimeRemained(void 0),this.adman?.onCompleted(void 0),this.adman?.onError(void 0),this.adman?.destroy(),this.videoElement&&up(this.videoElement),this.isDestroyed=!0}async safeExternalCall(t,...i){try{return await t(...i)}catch(n){return this.onAdError(n?.message??"External call failed"),null}}};import{isNullable as rd,InterfaceLanguage as od}from"@vkontakte/videoplayer-shared";import{assertNonNullable as pp,VERSION as fp}from"@vkontakte/videoplayer-shared";import{VERSION as mp}from"@vkontakte/videoplayer-core";import{VERSION as vp}from"@vkontakte/videoplayer-statistics";var ql=(e,t,i)=>{let n=document.createElement("a");n.href=e,n.download=`${t}.${i}`,n.style.display="none",n.click()};var Kl=Symbol("storeContext"),Zl=e=>{$n(Kl,e),ws==="dev"&&(window.app={store:e})},$t=()=>{let e=Cn(Kl);return pp(e,"Store context is empty!"),e},Fe=(e,t)=>jr(e,e.getValue(),t),jr=(e,t,i)=>ei(t,n=>{let r=e.subscribe(o=>{n(o),i?.(o)});return()=>r.unsubscribe()}),Jl=(e,t,i,n,r=["meta config not provided"])=>{let o=e.info,{width:a,height:c}=ye(i.ui.playerSize),u=o.throughputEstimation$.getValue()?.toFixed(0)??0,g=o.rttEstimation$.getValue()?.toFixed(0)??0,p=o.isAutoQualityEnabled$.getValue()?"auto":"manual",s=`${sr} (core: ${mp}, stat: ${vp}, shared: ${fp})`,l=ye(i.state.errorLog$),m=l.length?`
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
`)
|
|
46
|
-
`)},Xl=(e,t,i)=>{let n=e.info,{width:r,height:o}=ye(i.ui.playerSize),a={version:sr,viewport:`${r}x${o}`,volume:Math.round(ye(i.state.volume$)*100)};a.id=i.videoId,n.currentFormat$.getValue()&&(a.provider=n.currentFormat$.getValue()),n.hostname$.getValue()&&(a.cdn=n.hostname$.getValue());let g=n.intrinsicVideoSize$.getValue();g&&(a.videoSize=`${g.width}x${g.height}`);let p=n.currentBuffer$.getValue(),s=n.currentNativeBuffer$.getValue(),l=n.isLive$.getValue(),m=n.liveBufferTime$.getValue();p&&s&&(l&&m?(a.buffer=p.end-m,a.nativeBuffer=s.end-m):(a.buffer=Math.max(p.end-ye(i.state.positionExact$),0),a.nativeBuffer=Math.max(s.end-ye(i.state.positionExact$),0))),a.position=ye(i.state.positionExact$);let v=n.throughputEstimation$.getValue();v&&(a.speed=v);let y=n.videoBitrate$.getValue();y&&(a.bitrate=y);let _=n.liveLatency$.getValue();_&&(a.liveLatency=_);let C=n.currentVideoSegmentLength$.getValue();C&&(a.currentVideoSegmentLength=C);let k=n.currentAudioSegmentLength$.getValue();k&&(a.currentAudioSegmentLength=k);let I=ye(i.vsid);typeof I=="string"&&(a.vsid=I);let h=e.info.currentVideoStream$.getValue()?.codec;h&&(a.videoCodec=h);let b=e.info.currentAudioStream$.getValue()?.codec;b&&(a.audioCodec=b),e.info.currentVideoStream$.getValue()?.hdr&&(a.hdr=!0);let E=e.info.currentAudioStream$.getValue()?.language;return E&&(a.audioLanguage=E),a},ed=(e,t)=>ql(e,t,"mp4"),td=()=>{let t=[],i=0;return{add:(n,r)=>{t[i]=[n,r],i=(i+1)%10},find:n=>t.find(([r])=>r===n)}},Vr=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(t){if(this.pendingDownloads.has(t))return null;this.pendingDownloads.add(t);try{let i=await fetch(t,{signal:this.destroyController.signal});if(i.ok)return await i.text();throw i}finally{this.pendingDownloads.delete(t)}}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};function zr(e,t=i=>i){let i=H(e);return[ei(e,o=>{i.subscribe(o)}),o=>{i.set(t(o))}]}var gp={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},nd=hp;var Pi=new Map;Pi.set(od.EN,nd);Pi.set(od.RU,id);var ad=new Map,aa=({language:e,pack:t,fallback:i})=>{if(Pi.has(e)){let n=Pi.get(e);Pi.set(e,{...n,...t})}else Pi.set(e,t);ad.set(e,i)},sa=e=>Pi.has(e),la=(e,t,i,n)=>{let o=Pi.get(e)?.[t];if(rd(o)){let a=ad.get(e)??n;o=(a?Pi.get(a):void 0)?.[t]}return rd(o)?t+Object.values(i??{}).join(" "):i?o.replaceAll(/{(\w+?)}/g,(a,c)=>i[c]??""):o},Lt=(e,t)=>{let{interfaceLanguage$:i}=$t(),n=ye(i),r=Lr();return la(n,e,t,r.defaultLanguage)};var sd=(e,t)=>t?!0:e.fullscreenEnabled||!!e.webkitFullscreenEnabled||!!e.mozFullscreenEnabled||!!e.msFullscreenEnabled,ld=e=>{let t=e;t?.webkitExitFullscreen&&t?.webkitExitFullscreen()},_p=()=>{let e=document;return e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement},dd=()=>!!_p();var ud=e=>{let t=Math.round(e);return isNaN(t)||t<40?"":t>=40&&t<55?50:t>=55&&t<90?60:t>=90&&t<180?120:t>=180?240:""};import{isNullable as pa,safeStorage as pt}from"@vkontakte/videoplayer-shared";import"@vkontakte/videoplayer-core";var yp="vk_player_",pd="vk_player_prefer_traffic_saving_enabled",bp="vk_player_preferred_volume",xp="vk_player_prefer_volume_mute",fa="vk_player_preferred_quality",da="vk_player_preferred_default_quality_settings",ua="vk_player_preferred_quality_settings_by_video",fd="vk_player_preferred_stream_language",md="vk_player_preferred_rate";var ca="vk_player_preferred_subtitles_language",Ap="vk_player_user_video_prefs",OM=`${yp}preview_track_close_tooltip`,Ep=e=>e>1?1:e<0?0:e;var Ur=()=>{let e=pt.get(bp);return pa(e)?void 0:Ep(parseFloat(e))},ma=(e,t)=>pt.set(fa,JSON.stringify({videoId:e,value:t})),Fr=()=>pt.remove(fa),va=e=>{let t=pt.get(fa);if(pa(t))return;let{videoId:i,value:n}=JSON.parse(t);if(e!==i){Fr();return}return n},wp=(e,t)=>{t?pt.set(e,"true"):pt.remove(e)},vd=e=>pt.get(e)==="true";var gd=()=>vd(xp),cd=e=>wp(pd,e),ga=()=>vd(pd),hd=()=>pt.get(fd),_d=e=>pt.set(fd,e),ha=()=>pt.get(ca),Sp=e=>{e?pt.set(ca,e):pt.remove(ca)},yd=e=>pt.set(md,JSON.stringify({rate:e})),bd=()=>{let e=pt.get(md);if(pa(e))return;let{rate:t}=JSON.parse(e);return t};var Mp=()=>{let e=p=>{pt.set(da,JSON.stringify(p))},t=()=>{try{let p=pt.get(da);return p?JSON.parse(p):null}catch{return null}},i=()=>{try{let p=pt.get(ua);return p?JSON.parse(p):null}catch{return null}},n=p=>{pt.set(ua,JSON.stringify(p))},r=p=>{g(p);let s=p?i():null;if(s&&s?.videoId===p)return{...s,appliesTo:"to-video"};s&&o();let l=t();return l?{...l,appliesTo:"as-default"}:(e({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},o=()=>{pt.remove(ua)},a=()=>{pt.remove(da)},c=(p,s="as-default")=>{p.type==="exact_quality"||s==="to-video"?n(p):e(p)},u=p=>{let s=r(p);if(s){switch(s.type){case"traffic_saving":cd(!0);break;case"exact_quality":ma(p,s.quality)}o(),a()}},g=p=>{let s=va(p);if(s){n({type:"exact_quality",videoId:p,quality:s});return}ga()&&e({type:"traffic_saving",videoId:p}),cd(!1),Fr()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:u,savePreferredQualitySettings:c,savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:o,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:ha,savePreferredSubtitlesLanguage:Sp}},{getPreferredQualitySettings:PM,migrateSettingsToLegacyWay:xd,savePreferredQualitySettings:RM,savePreferredDefaultQualitySettings:VM,removePreferredQualitySettingsByVideo:jM,getPreferredDefaultQualitySettings:zM}=Mp();var Tp=()=>{let e=pt.get(Ap);if(e)try{return JSON.parse(e)}catch{return null}return null},Hr=(e,t)=>Tp()?.[e]?.[t]??null;var _a=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(t,i){let n=[],r=t.split(this.twoLinesRegExp);for(let o of r){let a={startTime:0,endTime:0,texts:[],lang:i},c=o.split(this.oneLineRegExp);for(let u of c)if(!a.startTime&&!a.endTime){let g=new Br,{startTime:p,endTime:s}=g.parse(u);a.startTime=p,a.endTime=s}else if(u.trim()!==""){let g=new ya,{texts:p}=g.parse(u);a.texts=[...a.texts,...p]}(a.startTime||a.endTime)&&a.texts.length>0&&n.push(a)}return n}},Br=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(t){let i={startTime:0,endTime:0},n=this.timingRegExp.exec(t);return n&&(i.startTime=this.calcTime(n[1],n[2],n[3],n[4]),i.endTime=this.calcTime(n[6],n[7],n[8],n[9])),i}parseTime(t){let i=this.timeRegExp.exec(t);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(t){return this.timeRegExp.test(t)}calcTime(t="0",i="0",n="0",r="0"){let o=Number(t)*60*60,a=Number(i)*60,c=Number(n),u=+`0.${r}`;return o+a+c+u}},ya=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(t){let i={texts:[]},r=t.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](a){let c=0,u=[];for(;c<a.length;){let g=["<",">"].reduce((p,s)=>{let l=a.indexOf(s,c);return p===-1||p>l?l:p},-1);if(g===-1){u.push(a.substring(c));break}u.push(a.substring(c,g)),c=g+1}return u}}),o=new Br;for(let a of r)o.isTime(a)?i.texts.push({type:"timestamp",value:o.parseTime(a)}):i.texts.push({type:"text",value:a});return i}},Ad=_a;import{isNonNullable as ba}from"@vkontakte/videoplayer-shared";var rn,pi,xa=0,Aa=!1,Ed="",wd=(e,t=0,i=0)=>e<t&&e<i,Qr=(e,t=0,i=0)=>e>=t&&e<=i,Ip=(e,t=0,i=0)=>e>t&&e>i,Sd=(e,t,i,n=!1)=>{let r=i.find(({id:c})=>c===t.value)?.subtitles;if(n)return r?.find(({startTime:u,endTime:g})=>Qr(e,u,g));let o=e>=xa,a=e<xa;if(xa=e,a&&(Aa=!1),ba(rn)&&Qr(e,rn.startTime,rn.endTime)&&Ed===t.value)return rn;if(!ba(pi)&&r?.length&&!Aa){pi=r.find(({startTime:u,endTime:g})=>Qr(e,u,g)||o&&wd(e,u,g)),rn=void 0,!ba(pi)&&r[r.length-1].endTime<e&&(Aa=!0);return}else{if(Qr(e,pi?.startTime,pi?.endTime))return rn=pi,pi=void 0,Ed=t.value,rn;(o&&Ip(e,pi?.startTime,pi?.endTime)||a&&wd(e,pi?.startTime,pi?.endTime))&&(pi=void 0)}};var Yr={ru:"Русский",en:"English",uk:"Українська",be:"Беларуская (тарашкевiца)",es:"Español",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"Български",hr:"Hrvatski",hu:"Magyar",sr:"Српски",pt:"Português",el:"Ελληνικά",pl:"Polski",fr:"Français",ko:"한국어","zh-CN":"汉语",lt:"Lietuvių",ja:"日本語",cs:"Čeština",et:"Eesti",tt:"Татарча",ba:"Башҡортса",cv:"Чăвашла",sk:"Slovenčina",ro:"Română",no:"Norsk",lv:"Latviešu",az:"Azərbaycan dili",hy:"Հայերեն",sv:"Svenska",nl:"Nederlands",tk:"Türkmen",ka:"ქართული",da:"Dansk",uz:"O‘zbek",th:"ภาษาไทย",id:"Bahasa Indonesia",tg:"Тоҷикӣ",sl:"Slovenščina",bs:"Bosanski","pt-BR":"Português brasileiro",fa:"فارسی",vi:"Tiếng Việt",hi:"हिन्दी",si:"සිංහල",bn:"বাংলা",tl:"Tagalog",mn:"Монгол",my:"ဗမာစာ",tr:"Türkçe",ne:"नेपाली",ur:"اردو",ky:"Кыргыз тили",pa:"پنجابی",os:"Ирон",kn:"ಕನ್ನಡ",sw:"Kiswahili",kk:"Қазақша",ar:"العربية",he:"עברית",ab:"Аҧсшәа",eu:"Euskara",eo:"Esperanto"},kp={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},Ea=e=>Yr[e]??Yr[kp[e]]??void 0;var Xn="vk_player_debug_panel_opened";var Md="videoplayer",Td="videoplayer";var xi="off";import{getWindow as er}from"@vkontakte/videoplayer-shared";var Np=5e3;function Id(){let e=H(!1),t=H(!0),i=()=>{e.set(!0)},n=()=>{e.set(!1)},r=k=>{t.set(k)},[o,a]=zr(!1),[c,u]=zr(!0),[g,p]=zr(!1),s=H(!1),l=er().setTimeout(()=>{},0),m=()=>{s.set(!0),er().clearTimeout(l),l=er().setTimeout(()=>{s.set(!1)},Np)},v=()=>{er().clearTimeout(l),s.set(!1)},y=()=>{er().clearTimeout(l),s.set(!1)},_=()=>{if(ye(g))return p(!1),!0;let k=ye(s);return y(),k};function C(k){let{state:{isPlaying$:I,isEnded$:h,isLoaderVisible:b,crashed$:x},ui:{settingsVisible:E},ads:{playbackState:$},playerPhase:L}=k;Xe([I,h,s,E],([A,M,f,j])=>!j&&(!A||M||f)).subscribe(A=>{a(A),A||v()}),Xe([L,b,$,x],([A,M,f,j])=>(A==="video"&&M||A==="ads"&&f==="inactive")&&!j).subscribe(u)}return{state:{touched:H(!1),controls:{prevButton:H(void 0),playButton:H(void 0),replayButton:H(void 0),nextButton:H(void 0),playPrevChapterButton:H(void 0),seekToInteractiveButton:H(void 0),interactiveGraphButton:H(void 0),liveButton:H(void 0),time:H(void 0),episodes:H(void 0),volume:H(void 0),subtitles:H(void 0),settings:H(void 0),context:H(void 0),chromecast:H(void 0),pip:H(void 0),fullscreen:H(void 0),vkLogo:H(void 0),interactiveTimeIndicator:H(void 0),timeline:H(void 0),autoplayNextToggle:H(void 0),"theater-mode-button":H(void 0),additionalButtons:[]},modals:{hotKeyMap:{show:H(!1),data:H({title:"",closeBtnText:"",groups:[]})}},isFullscreen:H(dd()),isFullscreenOpenedByKeyboard:H(!1),isAutoplay:H(!1),debugPanelVisible:H(!1),episodes:{panelOpened$:H(!1),openedByKeyboard$:H(!1)},contextMenu:{visible$:H(!1),btnRef$:H(void 0),openedByBtnKeyboard$:H(!1),openedByHotKey$:H(!1),lastActiveElem$:H(void 0),showContextMenuBtn$:H(!1),position$:H({top:0,left:0})},playerSize:H({width:0,height:0}),isMobile:H(!1),icon3DVideoVisible:H(!1),scrubbingInProgress:H(!1),volumeChangingInProgress:e,interactiveHideMobileControls:H(!1),overlayContainer$:H(void 0),startedByKeyboard$:H(!1),autoplayNextEnabled$:H(!1),timerNextVideoRunning$:H(!0),settingsMenu:{visible$:H(!1),ref$:H(void 0),openedByBtnKeyboard$:H(!1)},settingsSubMenu:{visible$:H(!1),ref$:H(void 0),name$:H(void 0)},userActionsDisabled:H(!1),hiddenControls:{volume:H(!1),vkLogo:H(!1),pip:H(!1),chromecast:H(!1),settings:H(!1)},isControlsAvailable:t,controlBlocks:{topLeft:H(void 0),topRight:H(void 0),middle:H(void 0),bottom:H(void 0),bottomLeft:H(void 0),bottomRight:H(void 0)},videoTitleInfo:H(void 0),doubleForwardOn$:H(!1),doubleForwardAvailable$:H(!1),previewTrackActive:H(!1),previewTrackDragInProgress:H(!1),previewTrackAvailable:H(!1),isPreviewTrackHorizontallyAligned:H(!1),isShowLoader:c,controlsVisible:o,settingsVisible:g},action:{stopVolumeChanging:n,startVolumeChanging:i,setControlsAvailibility:r,onUserInput:m,clearShowByInput:y,onBackButton:_,setSettingsVisibility:p},resolveDependency:C}}var Dd=({interfaceLanguage:e,isCyrillicRelatedInterface:t,videoId:i,isLiveCatchUpMode:n,statAuthToken:r,isAudioDisabled:o,canDownload:a,callbacks:c,webApi:u,previewThumbsData:g,uiConfig:p,coreConfig:s,player:l,stopPlayer:m,looped:v=!1,statistics:y,saveRate:_,internalsExposure:C,playerId:k,metaConfig:I,app:h,video:b,deviceCapabilities:x})=>{let E=Id(),$={...s,isAudioDisabled:o,live:{...s.live??{},isLiveCatchUpMode:!!n}},L=p,A=Bp.createRootTracer(!1),M=A.createComponentTracer("Store"),f=l||new Cp($,A,{playerId:k,onDevNullLog:c?.onDevNullLog});C?.expose({corePlayer:f});let j=new zp,F=new Rr(j,{loadTimeout:L.ads.loadTimeout,initTimeout:L.ads.initTimeout,runtimeTimeout:L.ads.runtimeTimeout,useAdmanFromNPM:L.ads.useAdmanFromNPM,volumeMultiplier:L.ads.volumeMultiplier,isVsidOriginal:L.ads.isVsidOriginal}),P=u?.focusManager,O=j.createComponentLog("Store"),Q,J,de={},ee=new Vr,pe=new Hp,K="",Ae=y&&y.oneStat?Fe(y.oneStat.vsid$):ei(void 0),Z=()=>sd(document,kd.device.isIOS),Qe=H(!1),re=H([]),he=Up(f.events.fatalError$,f.events.managedError$).subscribe(d=>re.update(S=>[...S,d])),R=ei(!1,d=>{let S=f.events.fatalError$.subscribe(()=>d(!0));return()=>S.unsubscribe()}),Ee=async d=>{let S=Object.values(Pp).includes(d);if(L.downloadVKLanguages&&(S&&L.updateBuiltinLanguages||!sa(d))){let ne;try{ne=await jp(d,Md,Td)}catch{y?.oneStat?.logError({errorType:"VKLangPack",fatal:!1})}ne&&(aa({language:d,pack:ne,fallback:L.defaultLanguage}),ge.set(d),xe.update(Ie=>Ie+1))}sa(d)&&ge.set(d)},ge=H(e),xe=H(0),Ye=H(t);Ee(e);let je=(d,S)=>{let W=ye(ge);return la(W,d,S,L.defaultLanguage)},Pe=H("thumb");Pe.subscribe(d=>{d==="ads"&&f.info.playbackState$.getValue()&&V()});let w=(()=>{let d=Xe([R,Pe],([S,W])=>S?"crashed":W);return{...d,is:S=>ye(d)===S}})(),D=H(),V=()=>{D.set({muted:f.info.muted$.getValue()})},Y=null,oe=f.info.isBuffering$,fe=ei(oe.getValue(),d=>{let S=oe.subscribe(W=>{W&&Y===null?Y=window.setTimeout(()=>{d(oe.getValue()),Y=null},L.loaderDelay):d(W)});return()=>{S.unsubscribe(),Y&&clearTimeout(Y)}});M.log("create store"),O({message:"create store"});let Re=d=>{O({message:`init video, config: ${JSON.stringify(d)}`}),Lp.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Fp()]}),f.initVideo(d),M.log("init video"),d.subtitles&&f.setExternalTextTracks(d.subtitles),Q=d,K=d.subtitlesForcedLanguage||""},ze=new qr,B=new Qp(xn.UNKNOWN),te=new qr,le={actionRewind$:ze,actionSeek$:B,inFullscreen$:new Gr(d=>E.state.isFullscreen.subscribe(S=>d.next(S))),actionSetSubtitle$:te},Te=new qr,T=new qr,ie={actionSeek$:B,actionSubtitlesSwitched$:Te,actionQuality$:T,playerSize$:new Gr(d=>E.state.playerSize.subscribe(S=>d.next(S))),inFullscreen$:new Gr(d=>E.state.isFullscreen.subscribe(S=>d.next(S))),isLoaderVisible$:new Gr(d=>fe.subscribe(S=>d.next(S)))};if(y){let{oneStat:d,thinOneStat:S,mediascopePixel:W,statSubscription:ne}=y;d&&(ne.add(d.attachToUi(le)),ne.add(d.attachToAds(F.events)),d.authorize(r).catch(Ie=>{O({message:`onestat auth error ${String(Ie)}`})}),W&&W.attachTo(f)),S&&(ne.add(S.attachTo(f,F.events)),ne.add(S.attachToUi(ie)),ne.add(S.attachToAds(F.events)),S.updateContext({isMobile:ye(E.state.isMobile)}),S.authorize(r))}let ae=()=>{if(kd.device.isIOS&&J)try{ld(J)}catch(d){O({message:`exitIosSafariFullscreen failed: ${d}`})}};pe.add(f.experimental.element$.subscribe(d=>{d&&(J=d,d.classList.add("player-media"))})).add(f.events.ended$.subscribe(()=>{ae(),c?.onEnded?.()})).add(f.events.looped$.subscribe(()=>{c?.onLooped?.()})).add(f.events.started$.subscribe(async()=>{let d=f.info.muted$.getValue();c?.onStarted?.(),de.onStarted?.(d)})).add(f.events.willSeek$.subscribe(({from:d,to:S})=>{c?.onSeek?.(d,S,B.getValue())})).add(f.events.autoplaySoundProhibited$.subscribe(()=>{c?.onAutoplaySoundProhibited?.()})).add(f.info.position$.subscribe(d=>{let S=f.info.duration$.getValue();isFinite(S)&&S>0&&(c?.onTimeupdate?.(S,d),F.setPosition(d,S))})).add(f.events.fatalError$.subscribe(d=>{c?.onCrashed?.(d?`${d.id}: ${d.message}`:void 0)})).add(f.events.fetcherRecoverableError$.subscribe(d=>{c?.onRecoverableError?.(d?`${d.id}: ${d.message}`:void 0)})).add(f.events.loadedMetadata$.subscribe(()=>{Qe.set(!0)})).add(f.info.liveTime$.subscribe(d=>{c?.onLiveTime?.(d)})).add(f.info.isStalled$.subscribe(d=>{c?.onStalledChanged?.(d)})).add(f.info.isLiveEnded$.subscribe(d=>d&&c?.onLiveEnded?.())).add(F.events.loadStarted$.subscribe(()=>c?.adsInfo?.onLoadStarted?.())).add(F.events.loadEnded$.subscribe(()=>c?.adsInfo?.onLoadEnded?.())).add(F.events.loadError$.subscribe(()=>c?.adsInfo?.onLoadError?.())).add(F.events.init$.subscribe(()=>c?.adsInfo?.onInit?.())).add(F.events.ready$.subscribe(()=>c?.adsInfo?.onReady?.())).add(F.events.started$.subscribe(d=>c?.adsInfo?.onStarted?.(d))).add(F.events.timeRemained$.subscribe(d=>c?.adsInfo?.onTimeRemained?.(d))).add(F.events.ended$.subscribe(d=>c?.adsInfo?.onCompleted?.(d))).add(F.events.empty$.subscribe(()=>c?.adsInfo?.onEmpty?.())).add(F.events.clicked$.subscribe(d=>c?.adsInfo?.onClicked?.(d))).add(F.events.closed$.subscribe(d=>c?.adsInfo?.onClosed?.(d))).add(F.events.error$.subscribe(d=>c?.adsInfo?.onError?.(d))).add(F.events.paused$.subscribe(()=>c?.adsInfo?.onPaused?.())).add(F.events.resumed$.subscribe(()=>c?.adsInfo?.onResumed?.()));let He=ei(f.info.position$.getValue(),d=>{let S,W,ne=()=>{let Ie=f.info.playbackState$.getValue(),Be=f.info.isLive$.getValue(),Ue=f.info.duration$.getValue(),nt=f.info.position$.getValue();if(Ie&&[tr.PLAYING,tr.PAUSED].includes(Ie)){let Ht=Be?nt-Ue:f.getExactTime();Ht!==W&&d(Ht),W=Ht}S=requestAnimationFrame(ne)};return ne(),()=>cancelAnimationFrame(S)}),Ve=Fe(f.info.playbackState$),lt=Fe(f.info.isBuffering$),it=Xe([Ve,lt],([d,S])=>S?"buffering":d),ft=Fe(f.info.currentBuffer$),at=Fe(f.info.isEnded$),Ai=Fe(f.info.isLive$),ri=L.features.playbackRate?Fe(f.info.canChangePlaybackSpeed$):ei(!1),Ei=Fe(f.info.liveBufferTime$),ki=Fe(f.info.volume$),Bi=Fe(f.info.muted$),Ri=jr(f.info.predefinedQualityLimitType$.pipe(Nd(d=>d===Hi.TRAFFIC_SAVING)),f.info.predefinedQualityLimitType$.getValue()===Hi.TRAFFIC_SAVING),Ge=jr(f.info.predefinedQualityLimitType$.pipe(Nd(d=>d===Hi.HIGH_QUALITY)),f.info.predefinedQualityLimitType$.getValue()===Hi.HIGH_QUALITY),We=Fe(f.info.autoQualityLimitingAvailable$),dt=Fe(f.info.availableQualities$),oo=Fe(f.info.availableQualitiesFps$),on=Fe(f.info.currentFormat$),Et=Fe(f.info.throughputEstimation$),st=Fe(f.info.videoBitrate$),an=Fe(f.info.intrinsicVideoSize$),Qi=Fe(f.info.duration$),Vd=Fe(f.info.isAudioAvailable$),jd=()=>{Y&&clearTimeout(Y),Y=null},rr=Xe([Qi,Ai],([d,S])=>S?-d:d),Ya=Xe([Ve],([d])=>d===tr.PLAYING),Wa=Fe(f.info.atLiveEdge$),Ga=Fe(f.info.atLiveDurationEdge$),qa=Fe(f.info.position$),zd=Xe([qa,Qi],([d,S])=>isFinite(d)&&isFinite(S)&&!!S),Ud=Fe(f.info.availableVideoStreams$),Ka=L.features.audioLanguages?Fe(f.info.availableAudioStreams$):ei([]),Fd=Fe(f.info.currentVideoStream$),Za=Fe(f.info.currentAudioStream$),Hd=d=>{d.language&&_d(d.language),f.setVideoStream(d)},Ja=d=>{f.setAudioStream(d)},Xa=d=>{let S;if(d.length===1&&(S=d.at(0)),S??=d.find(ne=>"isDefault"in ne&&ne.isDefault),L.features.userVideoPrefs&&i){let ne=Hr(L.userSalt,String(i));ne?.audioTrackId&&(S=d.find(Be=>Be.id===ne.audioTrackId)??S)}let W=hd();return W&&(S??=d.find(({language:ne})=>W===ne)),S??=d.at(0),S},Bd=d=>{M.log("change audio stream",{id:d});let S=f.info.availableAudioStreams$.getValue().find(W=>W.id===d);S&&Ja(S)},es=!1;pe.add(f.info.availableAudioStreams$.subscribe(d=>{if(!es&&d.length){let S=Xa(d);S&&(f.setAudioStream(S),es=!0)}})),Ka.subscribe(d=>{c?.onAvailableAudioStreamsChanged?.(d.map(({label:S="",id:W="",language:ne=""})=>({label:S,language:ne,id:W})))}),Za.subscribe(d=>d&&c?.onAudioStreamChanged?.(d.id));let ts=!1;pe.add(f.info.availableVideoStreams$.subscribe(d=>{if(!ts&&d.length){let S=Xa(d);S&&(f.setVideoStream(S),ts=!0)}}));let or=H(void 0),is=Fe(f.info.isAutoQualityEnabled$,d=>d&&or.set(void 0)),Qd=Fe(f.info.currentQuality$,()=>or.set(void 0)),ns=Xe([or,Qd],([d,S])=>d??S),rs=Xe(on,d=>d!==Wr.MPEG),Yd=Xe([dt,oo,is,ns,rs],([d,S,W,ne,Ie])=>{let Be=[];Ie&&Be.push({value:"auto",displayValue:je("auto_quality_option"),selected:W});let Ue=d.filter(nt=>!Rp(nt));for(let nt of Ue){let Ht=S[nt];Be.push({value:nt,displayValue:`${nt}${Ht?ud(Ht):""}`,selected:W?!1:nt===ne})}return Be}),ao=Fe(f.info.currentPlaybackRate$),so=Xe([ao,Wa,Ga],([d,S,W])=>{let ne=W?1:L.controls.playbackRateMin,Ie=S?1:L.controls.playbackRateMax,Be=L.controls.playbackRateStep,Ue=[];for(let nt=ne;nt<=Ie;nt+=Be)Ue.push({value:nt,displayValue:nt===1?je("playback_rate_1"):je("playback_rate",{multiplier:nt.toString(10)}),selected:d===nt});return Ue}),ar=()=>({displayValue:je("subtitles_off"),value:xi,language:""}),os=H(ar()),Vi=Xe([os,xe],([d],S)=>{d.value===xi?S(ar()):S(d)}),lo=L.features.subtitles?Fe(f.info.availableTextTracks$):ei([]),as=td(),Wd=Xe([lo,Vi],([d,S],W)=>{let ne=[],Ie=d.find(({id:Be})=>Be===S.value);if(Ie?.url){let[,Be]=as.find(Ie.url)??[];if(Be){W(Be);return}ee.download(Ie.url).then(Ue=>{if(!Ue||ee.isDestroyed())return;let nt=new Ad,Ht=Ie.language;if(Ht){let vo=!!Ie.isAuto,Lu=nt.parse(Ue,Ht);ne.push({lang:Ht,subtitles:Lu,isAuto:vo,id:Ie.id})}as.add(Ie.url,ne),ye(Vi).value===S.value&&W(ne)}).catch(()=>{y?.oneStat?.logError({errorType:"Subtitles download",fatal:!1})})}W(ne)}),Gd=Xe([ao,Ya,Vi],([d,S,W],ne)=>{let Ue;if(f.info.isLive$.getValue()&&S&&W.value!==xi){let Ht=()=>{let vo=1e3/(3*d);Ue=setTimeout(Ht,vo),ne(Date.now())};return Ht(),()=>clearTimeout(Ue)}}),ss=Xe([lo,Vi],([d,S])=>{if(!d.length)return[];let W=[];for(let{language:ne,isAuto:Ie,id:Be}of d){let Ue=ne&&Ea(ne);ne&&Ue&&W.push({displayValue:Ie?je("subtitles_auto",{language:Ue}):Ue,value:Be,selected:S?.value===Be,isAuto:Ie,language:ne})}return W.length?(W.unshift({...ar(),selected:S?.value===xi}),W):[]}),wn={available:[],prev:[]},qd=()=>f.experimental.getCurrentTime$.getValue()?.()??J?.currentTime??0,Kd=Xe([He,Vi,Wd,Gd],([d,S,W,ne])=>{let Ie=f.info.isLive$.getValue();if(Ie&&wn.prev!==W){let Be=W.find(({id:nt})=>nt===S.value),Ue=wn.prev.find(({id:nt})=>nt===S.value);if(Be){let nt={...Be,subtitles:[...Ue?.subtitles??[],...Be.subtitles]};wn.available=[nt],wn.prev=W}}if(S&&S.value!==xi){let Be=Ie?qd():d,Ue=Ie?wn.available:W;return Sd(Be,S,Ue,Ie)}}),Zd=Xe([Kd],([d])=>d?.texts?d.texts:[]);pe.add(Vi.subscribe(d=>{if(d.value===xi)c?.onSubtitleOff?.();else{let S=Object.entries(Yr).find(([W,ne])=>ne===d.displayValue);c?.onSubtitleOn?.(S?S[0]:"",d.value)}}));let Jd=H(!0),Xd=Xe([ft,rr,qa,Ei],([d,S,W,ne])=>{let Ie=d?.end??0;if(!ne)return Ie/S;let Ue=-W+ne-S;return(Ie-Ue)/S}),ls=Fe(f.info.availableSources$),eu=Xe([ls],([d])=>Object.keys(d?.[Wr.MPEG]||{}).length>0),tu=()=>{let d=Object.keys(f.info.availableSources$?.getValue()?.[Wr.MPEG]||{}),S=Op(d)||Yp.Q_144P;return Q.sources[Wr.MPEG]?.[S]},iu=()=>{let d=tu();if(d)M.log("download video",{url:d}),ed(d,Q?.meta?.title||"video");else{let S="There is no URL for download video";M.log("download video",{message:S}),O({message:S})}},nu=()=>{O({message:"toggle muted"});let d=f.info.muted$.getValue();f.info.volume$.getValue()===0&&!d?co(uo()):Sn(!d)},ru=()=>{qe.ui.settingsMenu.visible$.set(!1),M.log("close settings menu")},ou=async(d,S=()=>Promise.resolve())=>{qe.ui.settingsMenu.visible$.set(!0),await S(),M.log("open settings menu",{wasOpenedByKeyboard:d})},uo=()=>{let d=Math.max(L.volumeMinRestore,Ur()??0);return d===0?L.volumeDefault:d},co=d=>{let S=d===0?uo():d,W=f.info.muted$.getValue();O({message:`set volume, volume: ${d}, preferredVolume: ${S}`});let ne=!o||w.is("ads");W&&d>0&&ne&&(W=!1),f.setVolume(d,W),F.setVolume(d)},Sn=d=>{let S=f.info.volume$.getValue();O({message:`set muted, currentVolume: ${S}, mute: ${d}`});let W=w.is("ads");if(f.setMuted(d,W),F.setVolume(d?0:S),!d&&S===0){let ne=uo();f.setVolume(ne),F.setVolume(ne)}},ds=H(!1),us=d=>{M.log("set looped",{isLooped:d}),ds.set(d),f.setLooped(d)};us(v);let au=()=>{f.prepare()},su=()=>{ni(qe);let d=ye(qe.playerPhase),S={playerPhase:d,isVideoEnded:!1,action:"none"};if(O({message:"toggle play"}),d==="ads"){S.action="play",M.log("toggle adman play",S),F.togglePlay();return}let W=()=>{O({message:"toggle play, call player.play"}),S.action="play",f.play(),c?.onPlay?.()},ne=()=>{O({message:"toggle play, call player.pause"}),S.action="pause",f.pause(),c?.onPause?.()};f.info.isEnded$.getValue()?(O({message:"toggle play, video ended, seek to 0"}),ze.next(),B.next(xn.REWIND),f.seekTime(0),W()):f.info.playbackState$.getValue()!==tr.PLAYING?W():ne(),M.log("toggle play",S)},cs=(d,{byUser:S=!1}={})=>{O({message:`set quality, quality: ${d}`}),M.log("set quality",{quality:d}),S&&T.next(d),f.setAutoQuality(d==="auto"),Fr(),d!=="auto"&&(ma(i,d),or.set(d),f.setQuality(d))},ps=d=>{O({message:`set trafficSavingEnabled, value: ${d}`}),M.log("set traffic saving enabled",{trafficSavingEnabled:d});let S=d?Hi.TRAFFIC_SAVING:Hi.UNKNOWN;f.setPredefinedQualityLimits(S)},fs=d=>{O({message:`set highQualityEnabled, value: ${d}`}),M.log("set high quality enabled",{highQualityEnabled:d}),lu(d?Hi.HIGH_QUALITY:Hi.UNKNOWN)},lu=d=>{f.setPredefinedQualityLimits(d)},po=(d,S=!0)=>{M.log("set playback rate",{playbackRate:d}),f.setPlaybackRate(d),L.features.saveRate&&_&&!f.info.isLive$.getValue()&&S&&yd(d)},du=()=>{let d=ye(ri),S=ye(so),W=S.findIndex(({selected:Ie})=>Ie);if(W===S.length-1||!d)return S[W];let ne=S[W+1];return po(ne.value),ne},uu=()=>{let d=ye(ri),S=ye(so),W=S.findIndex(({selected:Ie})=>Ie);if(W===0||!d)return S[W];let ne=S[W-1];return po(ne.value),ne},fo=(d={...ar(),selected:!1})=>{M.log("set subtitles",{...d}),d.value!==xi&&te.next(d.isAuto?d.value+"_auto":d.value),Te.next({enabled:d.value!==xi,lang:d.language,auto:!!d.isAuto}),os.set(d)},ms=d=>{M.log("toggle subtitles"),ye(Vi)?.value===xi?vs(d):gs()},cu=(d,S)=>{M.log("change subtitle",{enabled:d}),d?vs(!0,S):gs()},vs=(d,S)=>{M.log("subtitle on");let W=ye(ss),ne=ye(ge),Ie=K??ne,Be;S&&(Be=W.find(Ue=>Ue.value===S)),Be??=W.filter(Ue=>Ue.value!==xi).find(Ue=>Ue.language===Ie),fo(Be??W[1])},gs=()=>{M.log("subtitle off"),fo(void 0)};pe.add(f.info.availableTextTracks$.subscribe(d=>{function S(){let W=[];for(let{language:ne,isAuto:Ie,id:Be}of d){let Ue=ne&&Ea(ne);ne&&Ue&&W.push({id:Be,language:ne,title:Ie?je("subtitles_auto",{language:Ue}):Ue})}return W}c?.onAvailableSubtitlesChanged?.(S())}));let hs=(d,S,W=!0)=>{if(O({message:`seek to time, time: ${d}`}),M.log("seek to time",{time:d,action:S,forcePrecise:W}),B.next(S),f.info.isLive$.getValue()){let ne=f.info.duration$.getValue(),Ie=Math.min(0,ne+d);f.seekTime(Ie,W)}else f.info.isEnded$.getValue()&&(O({message:"seek after ended, call callbacks.onPlay"}),c?.onPlay?.()),f.seekTime(d,W)},_s=(d,S,W=!1)=>{O({message:`seek to percent, percent: ${d}`}),M.log("seek to percent",{percent:d,action:S});let ne=ye(rr)*d;hs(ne,S,W)},pu=d=>{O({message:`seek external, time: ${d}`}),M.log("seek external",{time:d}),B.next(xn.UNKNOWN),f.seekTime(f.info.isLive$.getValue()?-d:d)},fu=d=>{let S=d.max??"none",W=d.min??"none";O({message:`set auto quality limitation. Max: ${S}. Min: ${W}`}),M.log("set auto quality limits",{max:S,min:W}),f.setAutoQualityLimits(d)},mu=d=>{O({message:`set playback rate to: ${d}`}),M.log("set playback rate external",{playbackRate:d}),f.setPlaybackRate(d)},mo=H(void 0),vu=d=>{O({message:`start scrubbing, progress: ${d}`}),M.log("start scrubbing",{progress:d}),E.state.scrubbingInProgress.set(!0),ys(d)},ys=d=>{mo.set(d)},gu=()=>{mo.set(void 0),E.state.scrubbingInProgress.set(!1)},hu=(d,S=!1)=>{O({message:`complete scrubbing, progress: ${d}`}),M.log("complete scrubbing",{progress:d}),_s(d,xn.SLIDER,S),gu()},_u=Xe([He,rr,mo],([d,S,W],ne)=>{ne(Vp(W)?W*S:d)}),yu=d=>{B.next(xn.LIVE),O({message:"live switch to low latency "+d}),M.log("live switch to low latency "+d),f.setLiveLowLatency(d)},bu=()=>{B.next(xn.LIVE),O({message:"switch to active live"}),M.log("switch to active live"),f.seekTime(0),f.info.playbackState$.getValue()!==tr.PLAYING&&qe.actions.internal.togglePlay()},xu=()=>{M.log("skip adman"),F.skip()},Au=(d=!0)=>{ni(qe),O({message:`switch from ads to video, callPlay: ${d}`}),M.log("switch from ads to video",{callPlay:d}),Pe.set("video"),d&&f.play(),o&&Sn(!0);let S=ye(D)?.muted,W=!f.info.muted$.getValue();S!==void 0&&!W&&Sn(S),D.set(void 0)},Eu=()=>{ni(qe),O({message:"switch from video to ads"}),M.log("switch from video to ads"),qe.actions.internal.pause(),ae(),Pe.set("ads")},wu=d=>{ni(qe);let S=d?"LiveWaitingStart":"thumb";M.log("set live waiting start",{state:d,playerPhase:S}),Pe.set(S)},Su=d=>{ni(qe);let S=d?"LiveWaitingRecover":"thumb";M.log("set live waiting recover",{state:d,playerPhase:S}),Pe.set(S)},Mu=d=>{ni(qe);let S=d?"LiveWaitingRecord":"thumb";M.log("set live waiting record",{state:d,playerPhase:S}),Pe.set(S)},Tu=()=>(ni(qe),M.log("get debug text data"),Jl(f,Q,qe,A.getTraceId(),I)),Iu=()=>(ni(qe),JSON.stringify(A.getFinishedSpans())),ku=()=>(ni(qe),Xl(f,Q,qe)),Nu=()=>J,bs=d=>{if(ni(qe),f.info.isEnded$.getValue())return;let S=!d;if(ye(qe.playerPhase)==="ads"){O({message:`pause ads, internalCall: ${S}`}),M.log("pause ads",{internalCall:S}),F.pause();return}O({message:`pause video, internalCall: ${S}`}),M.log("pause video",{internalCall:S}),S&&c?.onPause?.(),f.pause()},xs=d=>{ni(qe);let S=!d;if(ye(qe.playerPhase)==="ads"){O({message:`play ads, internalCall: ${S}`}),M.log("play ads",{internalCall:S}),F.play();return}O({message:`play video, internalCall: ${S}`}),M.log("play video",{internalCall:S}),S&&c?.onPlay?.(),f.play()},Du=d=>{ni(qe);let S=!d;if(ye(qe.playerPhase)==="ads"){O({message:"player cannot be stopped during ads via external method"});return}O({message:`player will be stopped, internalCall: ${S}`}),m?.()},As=(d,S)=>{ni(qe),O({message:`first start, show ads: ${d}, internalCall: ${!S}`}),M.log("first start",{showAds:d,external:S}),d?Pe.set("ads"):(Pe.set("video"),S?f.play():qe.actions.internal.togglePlay())},Cu=()=>(O({message:"getting preview thumbs data"}),M.log("get preview thumbs data",{...g}),g),$u=()=>{M.log("destroy store"),pe.unsubscribe(),f.destroy(),F.destroy(),y?.destroy(),he.unsubscribe(),ee.destroy()},qe={interfaceLanguage$:ge,isCyrillicRelatedInterface$:Ye,initVideo:Re,videoId:i,playerPhase:w,vsid:Ae,i18n:je,app:h,video:$p(b),state:{positionExact$:He,positionWithScrubbing$:_u,duration$:rr,playbackState$:Ve,playbackStateRealistic$:it,isPlaying$:Ya,isLoaderVisible:fe,bufferedProgress$:Xd,isLive$:Ai,canChangePlaybackSpeed$:ri,isActiveLive$:Wa,isOldestAvailableLive$:Ga,isRewindableLive$:zd,isEnded$:at,muted$:Bi,volume$:ki,trafficSavingEnabled$:Ri,highQualityEnabled$:Ge,autoQualityLimitingAvailable$:We,availableVideoStreams$:Ud,availableAudioStreams$:Ka,videoStream$:Fd,audioStream$:Za,currentQuality$:ns,isAutoQualityEnabled$:is,availableQualities$:Yd,currentPlaybackRate$:ao,availablePlaybackRates$:so,currentSubtitle$:Vi,availableTextTracks$:lo,availableSubtitlesList$:ss,currentSubtitleCaptions$:Zd,isAutoSubtitleCaptionVisible$:Jd,currentFormat$:on,throughputEstimation$:Et,videoBitrate$:st,videoSize$:an,errorLog$:re,crashed$:R,isAudioAvailable$:Vd,isAudioDisabled:!!o,canDownload:L.features.download&&!!a,availableSources$:ls,hasMpegSources$:eu,looped$:ds,loadedMetadata$:Qe,isAutoQualityAvailable$:rs},ui:E.state,ads:{position:H(0),duration:H(0),playbackState:H("inactive"),canSkip:H(!1),secondsToWatchBeforeSkip:H(0),postrollPassed:H(!1)},webApi:{focusManager:P},actions:{internal:{preload:au,firstStart:d=>As(d,!1),play:()=>xs(!1),pause:()=>bs(!1),togglePlay:su,toggleMuted:nu,openSettingsMenu:ou,closeSettingsMenu:ru,setVolume:d=>co(d),setMuted:d=>Sn(d),startVolumeChanging:E.action.startVolumeChanging,stopVolumeChanging:E.action.stopVolumeChanging,onUserInput:E.action.onUserInput,setSettingsVisibility:E.action.setSettingsVisibility,clearShowByInput:E.action.clearShowByInput,onBackButton:E.action.onBackButton,setVideoStream:Hd,setAudioStream:d=>Ja(d),setQuality:(d,S)=>cs(d,S),setTrafficSavingEnabled:d=>ps(d),setHighQualityEnabled:d=>fs(d),setPlaybackRate:po,incrementPlaybackRate:du,decrementPlaybackRate:uu,setSubtitle:d=>fo(d),toggleSubtitle:()=>ms(!1),startScrubbing:vu,progressScrubbing:ys,completeScrubbing:hu,switchToActiveLive:bu,switchFromAdsToVideo:Au,switchFromVideoToAds:Eu,skipAd:xu,setLiveWaitingStart:wu,setLiveWaitingRecover:Su,setLiveWaitingRecord:Mu,getDebugTextData:Tu,getTraceTextData:Iu,getDebugPanelData:ku,getVideoElement:Nu,seekTime:(d,S,W)=>hs(d,S,W),clearDelayedBufferingCheckTimeout:jd,seekToPercent:_s,getPreviewThumbsData:Cu,downloadVideo:iu,addLanguage:aa,setLanguage:Ee,setLooped:us,checkFullscreenSupport:Z},external:{firstStart:d=>As(d,!0),play:()=>xs(!0),pause:()=>bs(!0),stop:()=>Du(!0),seekTime:d=>pu(d),setPlaybackRate:d=>mu(d),setAutoQualityLimits:d=>fu(d),setMuted:d=>Sn(d),toggleSubtitle:()=>ms(!0),changeSubtitle:cu,setVolume:d=>co(d),setLiveLowLatency:yu,hideControls:()=>E.action.setControlsAvailibility(!1),showControls:()=>E.action.setControlsAvailibility(!0),setQuality:d=>cs(d),setTrafficSavingEnabled:d=>ps(d),setHighQualityEnabled:d=>fs(d),changeAudioStream:Bd}},callbacks:c,setUiCallbacks:d=>{de={...d}},getAdmanWrapper:()=>F,getLogger:()=>j,getPlayer:()=>f,deviceCapabilities:x,destroy:$u};return E.resolveDependency(qe),qe};import{areValidLiveRecordSources as om}from"@vkontakte/videoplayer-core";import{VideoQuality as Ld}from"@vkontakte/videoplayer-core";import{safeStorage as am,getWindow as Od}from"@vkontakte/videoplayer-shared";var Kr=class{constructor(t){this.value=t,this.next=null}};var An=class{constructor(t){this.top=null,this.bottom=null,this.size=0,this.maxSize=t}push(t){let i=new Kr(t);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let t=[],i=this.bottom;for(;i;)t.push(i.value),i=i.next;return t}};var Wp=se('<div class="container s-d"><canvas class="s-d"></canvas></div>'),Gp={hash:"s-d",code:".container.s-d{display:inline-block;height:16px;width:120px}canvas.s-d{margin-top:2px;transform:scaleY(-1)}"};function ir(e,t){we(t,!0),De(e,Gp);let i=tt(t,"values",19,()=>[]),n=Ce(void 0),r=Ce(null),o=16,a=120,c=60,u=a/c;bi(()=>{N(n).width=a,N(n).height=o,ue(r,N(n).getContext("2d"),!0)});function g(l,m,v,y,_){_===0&&(_=1),l.fillStyle="#fff",l.fillRect(m,v,y,_)}Ut(()=>{let l="";if(N(r)){let m=i()[0];for(let y=1;y<i().length;y++)i()[y]>m&&(m=i()[y]);N(r).clearRect(0,0,a,o);let v=c-1;for(let y=i().length-1;y>=0;y--){let _=v*u,C=m>0?o*(i()[y]/m):0;g(N(r),_,0,u,C),l=C+" "+l,v--}}});var p=Wp(),s=U(p);Xt(s,l=>ue(n,l),()=>N(n)),z(p),q(e,p),Se()}import{safeStorage as Cd}from"@vkontakte/videoplayer-shared";var qp=(e,t)=>{e.stopPropagation(),Cd.remove(Xn),t.set(!1)},Kp=se('<div class="s-3"><div class="s-3">Video id</div> <span> </span></div>'),Zp=se('<div class="s-3"><div class="s-3">VSID</div> <span> </span></div>'),Jp=se('<div class="s-3"><div class="s-3">Provider</div> <span> </span></div>'),Xp=se('<div class="s-3"><div class="s-3">Streams</div> <span> </span></div>'),ef=se('<div class="s-3"><div class="s-3">Viewport</div> <span> </span></div>'),tf=se('<div class="s-3"><div class="s-3">Video size</div> <span> </span></div>'),nf=se('<div class="s-3"><div class="s-3">CDN host</div> <span> </span></div>'),rf=se('<div class="s-3"><div class="s-3">Volume</div> <span> </span></div>'),of=se('<div class="s-3"><div class="s-3">Position</div> <span> </span></div>'),af=se('<div class="s-3"><div class="s-3">Buffer</div> <span> </span></div>'),sf=se('<div class="s-3"><div class="s-3">Nbuffer</div> <span> </span></div>'),lf=se('<div class="s-3"><div class="s-3">Live latency</div> <span> </span></div>'),df=se('<div class="s-3"><div class="s-3">Segment</div> <span> </span></div>'),uf=se('<div class="s-3"><div class="s-3">Network</div> <!> <span> </span></div>'),cf=se('<div class="s-3"><div class="s-3">V bitrate</div> <!> <span> </span></div>'),pf=se('<div class="container s-3" role="region"><button class="close s-3" title="закрыть">[x]</button> <div class="content s-3"><div class="s-3"><div class="s-3">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-3"><div class="s-3">Dropped</div> <span> </span></div> <!> <!> <div class="s-3"><div class="s-3">FPS</div> <!> <span> </span></div></div></div>'),ff={hash:"s-3",code:".container.s-3{background:rgba(28,28,28,.8);border-radius:4px;font-size:10px;left:20px;min-width:160px;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container.s-3,button.close.s-3{color:#fff;position:absolute}button.close.s-3{background-color:transparent;border:none;cursor:pointer;outline:0;padding:0;right:5px;top:3px}.content.s-3{padding:5px}.content.s-3>div:where(.s-3)>div:where(.s-3){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Sa(e,t){we(t,!0),De(e,ff);let i=$t(),n=i.ui.debugPanelVisible,r=Ce(Mt(i.actions.internal.getDebugPanelData())),o=i.actions.internal.getVideoElement(),a=Ce(0),c=Ce(0),u=Ce(0),g=new An(60),p=new An(60),s=new An(60),l=Ce(Mt([])),m=Ce(Mt([])),v=Ce(Mt([])),y=Lt("aria_label_debug_panel");bi(()=>{Cd.set(Xn,"true"),o&&(ue(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0),ue(a,o.getVideoPlaybackQuality().totalVideoFrames,!0));let B=window.setInterval(()=>{ue(r,i.actions.internal.getDebugPanelData(),!0)},500),te;return o&&(te=window.setInterval(()=>{if(o){ue(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0);let le=o.getVideoPlaybackQuality().totalVideoFrames;ue(u,le-N(a)),ue(a,le,!0),g.push(N(u)),N(r).speed&&p.push(N(r).speed),N(r).bitrate&&s.push(N(r).bitrate),ue(l,g.getValuesFromBottom(),!0),ue(m,p.getValuesFromBottom(),!0),ue(v,s.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(B),te&&clearInterval(te)}});var _=pf(),C=U(_);C.__click=[qp,n];var k=X(C,2),I=U(k),h=X(U(I),2),b=U(h,!0);z(h),z(I);var x=X(I,2);{var E=B=>{var te=Kp(),le=X(U(te),2),Te=U(le,!0);z(le),z(te),me(()=>Me(Te,N(r).id)),q(B,te)};ke(x,B=>{N(r).id&&B(E)})}var $=X(x,2);{var L=B=>{var te=Zp(),le=X(U(te),2),Te=U(le,!0);z(le),z(te),me(()=>Me(Te,N(r).vsid)),q(B,te)};ke($,B=>{N(r).vsid&&B(L)})}var A=X($,2);{var M=B=>{var te=Jp(),le=X(U(te),2),Te=U(le,!0);z(le),z(te),me(()=>Me(Te,N(r).provider)),q(B,te)};ke(A,B=>{N(r).provider&&B(M)})}var f=X(A,2);{var j=B=>{var te=Xp(),le=X(U(te),2),Te=U(le);z(le),z(te),me(()=>Me(Te,`Video: ${(N(r).videoCodec||"")??""} ${N(r).hdr?"(HDR)":""}
|
|
16
|
+
`,stack:e.stack?.split(`
|
|
17
|
+
`).filter(e=>!e.includes("svelte/src/internal")).join(`
|
|
18
|
+
`)}}}(e,t)),(32768&t.f)==0&&(4&t.f)==0)throw!t.parent&&e instanceof Error&&i9(e),e;i3(e,t)}function i3(e,t){for(;null!==t;){if((128&t.f)!=0){if((32768&t.f)==0)throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e instanceof Error&&i9(e),e}function i9(e){let t=i4.get(e);t&&(ip(e,"message",{value:t.message}),ip(e,"stack",{value:t.stack}))}function i6(e,t){e.f=-7169&e.f|t}function i7(e){(512&e.f)!=0||null===e.deps?i6(e,1024):i6(e,4096)}function i8(e,t,i){(2048&e.f)!=0?t.add(e):(4096&e.f)!=0&&i.add(e),function e(t){if(null!==t)for(let i of t)(2&i.f)!=0&&(65536&i.f)!=0&&(i.f^=65536,e(i.deps))}(e.deps),i6(e,1024)}var ne=new Set,nt=null,ni=null,nn=[],nr=null,no=!1,na=!1;class ns{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#i=0;#n=0;#r=null;#o=new Set;#a=new Set;#s=new Map;is_fork=!1;#l=!1;is_deferred(){return this.is_fork||this.#n>0}skip_effect(e){this.#s.has(e)||this.#s.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#s.get(e);if(t){for(var i of(this.#s.delete(e),t.d))i6(i,2048),nc(i);for(i of t.m)i6(i,4096),nc(i)}}process(e){nn=[],this.apply();var t=[],i=[];for(let n of e)this.#u(n,t,i);if(this.is_deferred())for(let[e,n]of(this.#d(i),this.#d(t),this.#s))!function e(t,i){if((32&t.f)==0||(1024&t.f)==0){(2048&t.f)!=0?i.d.push(t):(4096&t.f)!=0&&i.m.push(t),i6(t,1024);for(var n=t.first;null!==n;)e(n,i),n=n.next}}(e,n);else{for(let e of this.#e)e();this.#e.clear(),0===this.#i&&this.#c(),nt=null,nd(i),nd(t),this.#r?.resolve()}ni=null}#u(e,t,i){e.f^=1024;for(var n=e.first,r=null;null!==n;){var o=n.f,a=(96&o)!=0;if(!(a&&(1024&o)!=0||(8192&o)!=0||this.#s.has(n))&&null!==n.fn){a?n.f^=1024:null!==r&&(0x100000c&o)!=0?r.b.defer_effect(n):(4&o)!=0?t.push(n):rc(n)&&((16&o)!=0&&this.#a.add(n),rh(n));var s=n.first;if(null!==s){n=s;continue}}for(;null!==n;){n===r&&(r=null);var l=n.next;if(null!==l){n=l;break}n=n.parent}}}#d(e){for(var t=0;t<e.length;t+=1)i8(e[t],this.#o,this.#a)}capture(e,t){t===io||this.previous.has(e)||this.previous.set(e,t),(8388608&e.f)==0&&(this.current.set(e,e.v),ni?.set(e,e.v))}activate(){nt=this,this.apply()}deactivate(){nt===this&&(nt=null,ni=null)}flush(){if(this.activate(),nn.length>0){if(nl(),null!==nt&&nt!==this)return}else 0===this.#i&&this.process([]);this.deactivate()}discard(){for(let e of this.#t)e(this);this.#t.clear()}#c(){if(ne.size>1){this.previous.clear();var e=ni,t=!0;for(let e of ne){if(e===this){t=!1;continue}let n=[];for(let[i,r]of this.current){if(e.current.has(i))if(!t||r===e.current.get(i))continue;else e.current.set(i,r);n.push(i)}if(0===n.length)continue;let r=[...e.current.keys()].filter(e=>!this.current.has(e));if(r.length>0){var i=nn;nn=[];let t=new Set,o=new Map;for(let e of n)!function e(t,i,n,r){if(!n.has(t)&&(n.add(t),null!==t.reactions))for(let o of t.reactions){let t=o.f;(2&t)!=0?e(o,i,n,r):(4194320&t)!=0&&(2048&t)==0&&function e(t,i,n){let r=n.get(t);if(void 0!==r)return r;if(null!==t.deps)for(let r of t.deps){if(id.call(i,r))return!0;if((2&r.f)!=0&&e(r,i,n))return n.set(r,!0),!0}return n.set(t,!1),!1}(o,i,r)&&(i6(o,2048),nc(o))}}(e,r,t,o);if(nn.length>0){for(let t of(nt=e,e.apply(),nn))e.#u(t,[],[]);e.deactivate()}nn=i}}nt=null,ni=e}this.committed=!0,ne.delete(this)}increment(e){this.#i+=1,e&&(this.#n+=1)}decrement(e){this.#i-=1,e&&(this.#n-=1),this.#l||(this.#l=!0,i2(()=>{this.#l=!1,this.is_deferred()?nn.length>0&&this.flush():this.revive()}))}revive(){for(let e of this.#o)this.#a.delete(e),i6(e,2048),nc(e);for(let e of this.#a)i6(e,4096),nc(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#r??=ik()).promise}static ensure(){if(null===nt){let e=nt=new ns;ne.add(nt),na||i2(()=>{nt===e&&e.flush()})}return nt}apply(){}}function nl(){no=!0;var e=new Set;try{for(var t=0;nn.length>0;){var i=ns.ensure();if(t++>1e3){var n=new Map;for(let e of i.current.keys())for(let[t,i]of e.updated??[]){var r=n.get(t);r||(r={error:i.error,count:0},n.set(t,r)),r.count+=i.count}for(let e of n.values())e.error&&console.error(e.error);try{{let e=Error(`effect_update_depth_exceeded
|
|
19
|
+
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
|
|
20
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}}catch(e){ip(e,"stack",{value:""}),i3(e,nr)}}for(let t of(i.process(nn),nx.clear(),i.current.keys()))e.add(t)}}finally{for(let t of(nn=[],no=!1,nr=null,e))t.updated=null}}var nu=null;function nd(e){var t=e.length;if(0!==t){for(var i=0;i<t;){var n=e[i++];if((24576&n.f)==0&&rc(n)&&(nu=new Set,rh(n),null===n.deps&&null===n.first&&null===n.nodes&&null===n.teardown&&null===n.ac&&n3(n),nu?.size>0)){for(let e of(nx.clear(),nu)){if((24576&e.f)!=0)continue;let t=[e],i=e.parent;for(;null!==i;)nu.has(i)&&(nu.delete(i),t.push(i)),i=i.parent;for(let e=t.length-1;e>=0;e--){let i=t[e];(24576&i.f)==0&&rh(i)}}nu.clear()}}nu=null}}function nc(e){for(var t=nr=e;null!==t.parent;){var i=(t=t.parent).f;if(no&&t===ri&&(16&i)!=0&&(262144&i)==0)return;if((96&i)!=0){if((1024&i)==0)return;t.f^=1024}}nn.push(t)}class nf{parent;is_pending=!1;#f;#p=iO?u:null;#h;#v;#m;#g=null;#_=null;#b=null;#y=null;#w=0;#k=0;#x=!1;#o=new Set;#a=new Set;#S=null;#$=(function(e){let t,i=0,n=n$(0);return iW(n,"createSubscriber version"),()=>{nG()&&(rv(n),nZ(()=>(0===i&&(t=rm(()=>e(()=>nL(n)))),i+=1,()=>{i2(()=>{0==(i-=1)&&(t?.(),t=void 0,nL(n))})})))}})(()=>(this.#S=n$(this.#w),iW(this.#S,"$effect.pending()"),()=>{this.#S=null}));constructor(e,t,i){this.#f=e,this.#h=t,this.#v=e=>{var t=ri;t.b=this,t.f|=128,i(e)},this.parent=ri.b,this.#m=n0(()=>{if(iO){let e=this.#p;iM(),"[!"===e.data?this.#C():this.#A()}else this.#T()},589824),iO&&(this.#f=u)}#A(){try{this.#g=n1(()=>this.#v(this.#f))}catch(e){this.error(e)}}#C(){let e=this.#h.pending;e&&(this.is_pending=!0,this.#_=n1(()=>e(this.#f)),i2(()=>{var e=this.#y=document.createDocumentFragment(),t=nj();e.append(t),this.#g=this.#E(()=>(ns.ensure(),n1(()=>this.#v(t)))),0===this.#k&&(this.#f.before(e),this.#y=null,n9(this.#_,()=>{this.#_=null}),this.is_pending=!1)}))}#T(){try{if(this.is_pending=this.has_pending_snippet(),this.#k=0,this.#w=0,this.#g=n1(()=>{this.#v(this.#f)}),this.#k>0){var e=this.#y=document.createDocumentFragment();n6(this.#g,e);let t=this.#h.pending;this.#_=n1(()=>t(this.#f))}else this.is_pending=!1}catch(e){this.error(e)}}defer_effect(e){i8(e,this.#o,this.#a)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#h.pending}#E(e){var t=ri,i=re,n=iQ;ri=this.#m,re=this.#m,iQ=this.#m.ctx;try{return e()}catch(e){return i5(e),null}finally{ri=t,re=i,iQ=n}}#P(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#P(e);return}if(this.#k+=e,0===this.#k){for(let e of(this.is_pending=!1,this.#o))i6(e,2048),nc(e);for(let e of this.#a)i6(e,4096),nc(e);this.#o.clear(),this.#a.clear(),this.#_&&n9(this.#_,()=>{this.#_=null}),this.#y&&(this.#f.before(this.#y),this.#y=null)}}update_pending_count(e){this.#P(e),this.#w+=e,this.#S&&!this.#x&&(this.#x=!0,i2(()=>{this.#x=!1,this.#S&&nE(this.#S,this.#w)}))}get_effect_pending(){return this.#$(),rv(this.#S)}error(e){var t=this.#h.onerror;let i=this.#h.failed;if(!t&&!i)throw e;this.#g&&(n5(this.#g),this.#g=null),this.#_&&(n5(this.#_),this.#_=null),this.#b&&(n5(this.#b),this.#b=null),iO&&(iI(this.#p),ij(),iI(iD()));var n=!1,r=!1;let o=()=>{n?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",iP,iL):(n=!0,r&&function(){{let e=Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name="Svelte error",e}}(),null!==this.#b&&n9(this.#b,()=>{this.#b=null}),this.#E(()=>{ns.ensure(),this.#T()}))};i2(()=>{try{r=!0,t?.(e,o),r=!1}catch(e){i3(e,this.#m&&this.#m.parent)}i&&(this.#b=this.#E(()=>{ns.ensure();try{return n1(()=>{var t=ri;t.b=this,t.f|=128,i(this.#f,()=>e,()=>o)})}catch(e){return i3(e,this.#m.parent),null}}))})}}function np(){ri=null,re=null,iQ=null,iU=null}var nh=new Set;function nv(e){var t=null!==re&&(2&re.f)!=0?re:null;return null!==ri&&(ri.f|=524288),{ctx:iQ,deps:null,effects:null,equals:iF,f:2050,fn:e,reactions:null,rv:0,v:io,wv:0,parent:t??ri,ac:null}}function nm(e){let t=nv(e);return rr(t),t}function ng(e){let t=nv(e);return t.equals=iq,t}var n_=[];function nb(e){var t,i=ri;ri=function(e){for(var t=e.parent;null!==t;){if((2&t.f)==0)return(16384&t.f)==0?t:null;t=t.parent}return null}(e);{let n=nk;nk=new Set;try{id.call(n_,e)&&function(){{let e=Error(`derived_references_self
|
|
21
|
+
A derived value cannot reference itself recursively
|
|
22
|
+
https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}}(),n_.push(e),e.f&=-65537,function(e){var t=e.effects;if(null!==t){e.effects=null;for(var i=0;i<t.length;i+=1)n5(t[i])}}(e),t=rf(e)}finally{ri=i,nk=n,n_.pop()}}return t}function ny(e){var t=nb(e);e.equals(t)||(e.wv=++rl,nt?.is_fork&&null!==e.deps)||(e.v=t,null!==e.deps)?!n8&&(null!==ni?(nG()||nt?.is_fork)&&ni.set(e,t):i7(e)):i6(e,1024)}function nw(e){if(null!==e.effects)for(let t of e.effects)t.teardown&&rh(t)}var nk=new Set,nx=new Map,nS=!1;function n$(e,t){return{f:0,v:e,reactions:null,equals:iF,rv:0,wv:0}}function nC(e,t){let i=n$(e,t);return rr(i),i}function nA(e,t=!1,i=!0){let n=n$(e);return t||(n.equals=iq),iB&&i&&null!==iQ&&null!==iQ.l&&(iQ.l.s??=[]).push(n),n}function nT(e,t,i=!1){var n;null!==re&&(!rt||(131072&re.f)!=0)&&iZ()&&(4325394&re.f)!=0&&(null===rn||!id.call(rn,e))&&function(){{let e=Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}}();let r=i?nV(t):t;return n=e.label,r?.[iC]?.(n),nE(e,r)}function nE(e,t){if(!e.equals(t)){var i,n=e.v;n8?nx.set(e,t):nx.set(e,n),e.v=t;var r=ns.ensure();if(r.capture(e,n),null!==ri){e.updated??=new Map;let t=(e.updated.get("")?.count??0)+1;if(e.updated.set("",{error:null,count:t}),t>5){let t,n,r=(i="updated at",t=Error(),0===(n=function(){let e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let t=Error().stack;if(Error.stackTraceLimit=e,!t)return[];let i=t.split(`
|
|
23
|
+
`),n=[];for(let e=0;e<i.length;e++){let t=i[e],r=t.replaceAll("\\","/");if("Error"!==t.trim()){if(t.includes("validate_each_keys"))return[];r.includes("svelte/src/internal")||r.includes("node_modules/.vite")||n.push(t)}}return n}()).length?null:(n.unshift(`
|
|
24
|
+
`),ip(t,"stack",{value:n.join(`
|
|
25
|
+
`)}),ip(t,"name",{value:i}),t));if(null!==r){let t=e.updated.get(r.stack);t||(t={error:r,count:0},e.updated.set(r.stack,t)),t.count++}}}null!==ri&&(e.set_during_effect=!0),(2&e.f)!=0&&((2048&e.f)!=0&&nb(e),i7(e)),e.wv=++rl,function e(t,i){var n=t.reactions;if(null!==n)for(var r=iZ(),o=n.length,a=0;a<o;a++){var s=n[a],l=s.f;if(r||s!==ri){if((131072&l)!=0){nk.add(s);continue}var u=(2048&l)==0;u&&i6(s,i),(2&l)!=0?(ni?.delete(s),(65536&l)==0&&(512&l&&(s.f|=65536),e(s,4096))):u&&((16&l)!=0&&null!==nu&&nu.add(s),nc(s))}}}(e,2048),iZ()&&null!==ri&&(1024&ri.f)!=0&&(96&ri.f)==0&&(null===rs?rs=[e]:rs.push(e)),r.is_fork||!(nk.size>0)||nS||nP()}return t}function nP(){for(let e of(nS=!1,nk))(1024&e.f)!=0&&i6(e,4096),rc(e)&&rh(e);nk.clear()}function nL(e){nT(e,e.v+1)}var nR=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function nV(e){if("object"!=typeof e||null===e||ix in e)return e;let t=i_(e);if(t!==im&&t!==ig)return e;var i=new Map,n=il(e),r=nC(0),o=rd,a=e=>{if(rd===o)return e();var t=re,i=rd;re=null,rd=o;var n=e();return re=t,rd=i,n};n&&(i.set("length",nC(e.length,null)),e=new Proxy(e,{get(e,t,i){var n=Reflect.get(e,t,i);return nM.has(t)?function(...e){nS=!0;var t=n.apply(this,e);return nP(),t}:n}}));var s="";let l=!1;function u(e){if(!l){for(let[t,n]of(l=!0,s=e,iW(r,`${s} version`),i))iW(n,nO(s,t));l=!1}}return new Proxy(e,{defineProperty(e,t,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){{let e=Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}}();var r=i.get(t);return void 0===r?a(()=>{var e=nC(n.value,null);return i.set(t,e),"string"==typeof t&&iW(e,nO(s,t)),e}):nT(r,n.value,!0),!0},deleteProperty(e,t){var n=i.get(t);if(void 0===n){if(t in e){let e=a(()=>nC(io,null));i.set(t,e),nL(r),iW(e,nO(s,t))}}else nT(n,io),nL(r);return!0},get(t,n,r){if(n===ix)return e;if(n===iC)return u;var o=i.get(n),l=n in t;if(void 0===o&&(!l||ih(t,n)?.writable)&&(o=a(()=>{var e=nC(nV(l?t[n]:io),null);return iW(e,nO(s,n)),e}),i.set(n,o)),void 0!==o){var d=rv(o);return d===io?void 0:d}return Reflect.get(t,n,r)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&"value"in n){var r=i.get(t);r&&(n.value=rv(r))}else if(void 0===n){var o=i.get(t),a=o?.v;if(void 0!==o&&a!==io)return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===ix)return!0;var n=i.get(t),r=void 0!==n&&n.v!==io||Reflect.has(e,t);return(!(void 0!==n||null!==ri&&(!r||ih(e,t)?.writable))||(void 0===n&&(n=a(()=>{var i=nC(r?nV(e[t]):io,null);return iW(i,nO(s,t)),i}),i.set(t,n)),rv(n)!==io))&&r},set(e,t,o,l){var u=i.get(t),d=t in e;if(n&&"length"===t)for(var c=o;c<u.v;c+=1){var f=i.get(c+"");void 0!==f?nT(f,io):c in e&&(f=a(()=>nC(io,null)),i.set(c+"",f),iW(f,nO(s,c)))}void 0===u?(!d||ih(e,t)?.writable)&&(iW(u=a(()=>nC(void 0,null)),nO(s,t)),nT(u,nV(o)),i.set(t,u)):(d=u.v!==io,nT(u,a(()=>nV(o))));var p=Reflect.getOwnPropertyDescriptor(e,t);if(p?.set&&p.set.call(l,o),!d){if(n&&"string"==typeof t){var h=i.get("length"),v=Number(t);Number.isInteger(v)&&v>=h.v&&nT(h,v+1)}nL(r)}return!0},ownKeys(e){rv(r);var t=Reflect.ownKeys(e).filter(e=>{var t=i.get(e);return void 0===t||t.v!==io});for(var[n,o]of i)o.v===io||n in e||t.push(n);return t},setPrototypeOf(){{let e=Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}}})}function nO(e,t){return"symbol"==typeof t?`${e}[Symbol(${t.description??""})]`:nR.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function nI(e){try{if(null!==e&&"object"==typeof e&&ix in e)return e[ix]}catch{}return e}var nM=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function nN(){if(void 0===d){d=window,document,c=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,i=Text.prototype;f=ih(t,"firstChild").get,p=ih(t,"nextSibling").get,ib(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),ib(i)&&(i.__t=void 0),e.__svelte_meta=null,function(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:i,lastIndexOf:n,includes:r}=e;e.indexOf=function(e,t){let n=i.call(this,e,t);if(-1===n){for(let i=t??0;i<this.length;i+=1)if(nI(this[i])===e){iV("array.indexOf(...)");break}}return n},e.lastIndexOf=function(e,t){let i=n.call(this,e,t??this.length-1);if(-1===i){for(let i=0;i<=(t??this.length-1);i+=1)if(nI(this[i])===e){iV("array.lastIndexOf(...)");break}}return i},e.includes=function(e,t){let i=r.call(this,e,t);if(!i){for(let t=0;t<this.length;t+=1)if(nI(this[t])===e){iV("array.includes(...)");break}}return i},Array.__svelte_cleanup=()=>{e.indexOf=i,e.lastIndexOf=n,e.includes=r}}()}}function nj(e=""){return document.createTextNode(e)}function nD(e){return f.call(e)}function nF(e){return p.call(e)}function nz(e,t){if(!iO)return nD(e);var i=nD(u);if(null===i)i=u.appendChild(nj());else if(t&&3!==i.nodeType){var n=nj();return i?.before(n),iI(n),n}return t&&nQ(i),iI(i),i}function nq(e,t=!1){if(!iO){var i=nD(e);return i instanceof Comment&&""===i.data?nF(i):i}if(t){if(u?.nodeType!==3){var n=nj();return u?.before(n),iI(n),n}nQ(u)}return u}function nB(e,t=1,i=!1){let n=iO?u:e;for(;t--;)r=n,n=nF(n);if(!iO)return n;if(i){if(n?.nodeType!==3){var r,o=nj();return null===n?r?.after(o):n.before(o),iI(o),o}nQ(n)}return iI(n),n}function nW(e,t,i){return document.createElementNS(t??is,e,i?{is:i}:void 0)}function nQ(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;null!==t&&3===t.nodeType;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function nU(e){var t=re,i=ri;re=null,ri=null;try{return e()}finally{re=t,ri=i}}function nH(e,t,i){for(var n=ri;null!==n&&(131072&n.f)!=0;)n=n.parent;null!==n&&(8192&n.f)!=0&&(e|=8192);var r={ctx:iQ,deps:null,nodes:null,f:2048|e|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r.component_function=iH,i)try{rh(r)}catch(e){throw n5(r),e}else null!==t&&nc(r);var o=r;if(i&&null===o.deps&&null===o.teardown&&null===o.nodes&&o.first===o.last&&(524288&o.f)==0&&(o=o.first,(16&e)!=0&&(65536&e)!=0&&null!==o&&(o.f|=65536)),null!==o&&(o.parent=n,null!==n&&(a=o,null===(l=(s=n).last)?s.last=s.first=a:(l.next=a,a.prev=l,s.last=a)),null!==re&&(2&re.f)!=0&&(64&e)==0)){var a,s,l,u=re;(u.effects??=[]).push(o)}return r}function nG(){return null!==re&&!rt}function nK(e){let t=nH(8,null,!1);return i6(t,1024),t.teardown=e,t}function nJ(e){var t="$effect";if(null===ri){null===re&&function(e){{let t=Error(`effect_orphan
|
|
26
|
+
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
|
|
27
|
+
https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}}(t);{let e=Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}}n8&&function(e){{let t=Error(`effect_in_teardown
|
|
28
|
+
\`${e}\` cannot be used inside an effect cleanup function
|
|
29
|
+
https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}}(t),ip(e,"name",{value:"$effect"});var i=ri.f;if(!(!re&&(32&i)!=0&&(32768&i)==0))return nY(e);var n=iQ;(n.e??=[]).push(e)}function nY(e){return nH(1048580,e,!1)}function nZ(e,t=0){return nH(8|t,e,!0)}function nX(e,t=[],i=[],n=[]){!function(e,t,i,n){let r=iZ()?nv:ng;var o,a,s,l,u,d=e.filter(e=>!e.settled);if(0===i.length&&0===d.length)return n(t.map(r));var c=nt,f=ri,p=(o=ri,a=re,s=iQ,l=nt,u=iU,function(e=!0){ri=o,re=a,iQ=s,e&&l?.activate(),iU=u}),h=1===d.length?d[0].promise:d.length>1?Promise.all(d.map(e=>e.promise)):null;function v(e){p();try{n(e)}catch(e){(16384&f.f)==0&&i3(e,f)}c?.deactivate(),np()}if(0===i.length)return h.then(()=>v(t.map(r)));function m(){p(),Promise.all(i.map(e=>{var t,i,n,r,o,a;let s;return t=e,null===(s=ri)&&function(){{let e=Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name="Svelte error",e}}(),i=s.b,n=void 0,(r=n$(io)).label=void 0,o=!re,a=new Map,nH(4718592,()=>{var e=ik();n=e.promise;try{Promise.resolve(t()).then(e.resolve,e.reject).then(()=>{s===nt&&s.committed&&s.deactivate(),np()})}catch(t){e.reject(t),np()}var s=nt;if(o){var l=i.is_rendered();i.update_pending_count(1),s.increment(l),a.get(s)?.reject(iA),a.delete(s),a.set(s,e)}let u=(e,t)=>{if(s.activate(),t)t!==iA&&(r.f|=8388608,nE(r,t));else{for(let[t,i]of((8388608&r.f)!=0&&(r.f^=8388608),nE(r,e),a)){if(a.delete(t),t===s)break;i.reject(iA)}}o&&(i.update_pending_count(-1),s.decrement(l))};e.promise.then(u,e=>u(null,e||"unknown"))},!0),nK(()=>{for(let e of a.values())e.reject(iA)}),r.f|=4194304,new Promise(e=>{!function t(i){function o(){i===n?e(r):t(n)}i.then(o,o)}(n)})})).then(e=>v([...t.map(r),...e])).catch(e=>i3(e,f))}h?h.then(m):m()}(n,t,i,t=>{nH(8,()=>e(...t.map(rv)),!0)})}function n0(e,t=0){var i=nH(16|t,e,!0);return i.dev_stack=iU,i}function n1(e){return nH(524320,e,!0)}function n2(e){var t=e.teardown;if(null!==t){let e=n8,i=re;n8=!0,re=null;try{t.call(null)}finally{n8=e,re=i}}}function n4(e,t=!1){var i=e.first;for(e.first=e.last=null;null!==i;){let e=i.ac;null!==e&&nU(()=>{e.abort(iA)});var n=i.next;(64&i.f)!=0?i.parent=null:n5(i,t),i=n}}function n5(e,t=!0){var i=!1;(t||(262144&e.f)!=0)&&null!==e.nodes&&null!==e.nodes.end&&(function(e,t){for(;null!==e;){var i=e===t?null:nF(e);e.remove(),e=i}}(e.nodes.start,e.nodes.end),i=!0),n4(e,t&&!i),rp(e,0),i6(e,16384);var n=e.nodes&&e.nodes.t;if(null!==n)for(let e of n)e.stop();n2(e);var r=e.parent;null!==r&&null!==r.first&&n3(e),e.component_function=null,e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function n3(e){var t=e.parent,i=e.prev,n=e.next;null!==i&&(i.next=n),null!==n&&(n.prev=i),null!==t&&(t.first===e&&(t.first=n),t.last===e&&(t.last=i))}function n9(e,t,i=!0){var n=[];!function e(t,i,n){if((8192&t.f)==0){t.f^=8192;var r=t.nodes&&t.nodes.t;if(null!==r)for(let e of r)(e.is_global||n)&&i.push(e);for(var o=t.first;null!==o;){var a=o.next,s=(65536&o.f)!=0||(32&o.f)!=0&&(16&t.f)!=0;e(o,i,!!s&&n),o=a}}}(e,n,!0);var r=()=>{i&&n5(e),t&&t()},o=n.length;if(o>0){var a=()=>--o||r();for(var s of n)s.out(a)}else r()}function n6(e,t){if(e.nodes)for(var i=e.nodes.start,n=e.nodes.end;null!==i;){var r=i===n?null:nF(i);t.append(i),i=r}}var n7=!1,n8=!1,re=null,rt=!1,ri=null,rn=null;function rr(e){null!==re&&(null===rn?rn=[e]:rn.push(e))}var ro=null,ra=0,rs=null,rl=1,ru=0,rd=0;function rc(e){var t=e.f;if((2048&t)!=0)return!0;if(2&t&&(e.f&=-65537),(4096&t)!=0){for(var i=e.deps,n=i.length,r=0;r<n;r++){var o=i[r];if(rc(o)&&ny(o),o.wv>e.wv)return!0}(512&t)!=0&&null===ni&&i6(e,1024)}return!1}function rf(e){var t=ro,i=ra,n=rs,r=re,o=rn,a=iQ,s=rt,l=rd,u=e.f;ro=null,ra=0,rs=null,re=(96&u)==0?e:null,rn=null,iQ=e.ctx,rt=!1,rd=++ru,null!==e.ac&&(nU(()=>{e.ac.abort(iA)}),e.ac=null);try{e.f|=2097152;var d,c=(0,e.fn)();e.f|=32768;var f=e.deps,p=nt?.is_fork;if(null!==ro){if(p||rp(e,ra),null!==f&&ra>0)for(d=0,f.length=ra+ro.length;d<ro.length;d++)f[ra+d]=ro[d];else e.deps=f=ro;if(nG()&&(512&e.f)!=0)for(d=ra;d<f.length;d++)(f[d].reactions??=[]).push(e)}else!p&&null!==f&&ra<f.length&&(rp(e,ra),f.length=ra);if(iZ()&&null!==rs&&!rt&&null!==f&&(6146&e.f)==0)for(d=0;d<rs.length;d++)!function e(t,i,n=!0){var r=t.reactions;if(null!==r&&!(null!==rn&&id.call(rn,t)))for(var o=0;o<r.length;o++){var a=r[o];(2&a.f)!=0?e(a,i,!1):i===a&&(n?i6(a,2048):(1024&a.f)!=0&&i6(a,4096),nc(a))}}(rs[d],e);if(null!==r&&r!==e){if(ru++,null!==r.deps)for(let e=0;e<i;e+=1)r.deps[e].rv=ru;if(null!==t)for(let e of t)e.rv=ru;null!==rs&&(null===n?n=rs:n.push(...rs))}return(8388608&e.f)!=0&&(e.f^=8388608),c}catch(e){return i5(e)}finally{e.f^=2097152,ro=t,ra=i,rs=n,re=r,rn=o,iQ=a,rt=s,rd=l}}function rp(e,t){var i=e.deps;if(null!==i)for(var n=t;n<i.length;n++)!function(e,t){let i=t.reactions;if(null!==i){var n=iu.call(i,e);if(-1!==n){var r=i.length-1;0===r?i=t.reactions=null:(i[n]=i[r],i.pop())}}if(null===i&&(2&t.f)!=0&&(null===ro||!id.call(ro,t))){(512&t.f)!=0&&(t.f^=512,t.f&=-65537),i7(t);if(null!==t.effects)for(let e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac?.abort(iA),e.teardown=iy,e.ac=null,rp(e,0),n4(e));rp(t,0)}}(e,i[n])}function rh(e){var t=e.f;if((16384&t)==0){i6(e,1024);var i=ri,n=n7;ri=e,n7=!0;var r=iH;iH=e.component_function;var o=iU;iU=e.dev_stack??iU;try{if((0x1000010&t)!=0)for(var a=e.first;null!==a;){var s=a.next;(32&a.f)==0&&n5(a),a=s}else n4(e);n2(e);var l=rf(e);e.teardown="function"==typeof l?l:null,e.wv=rl}finally{n7=n,ri=i,iH=r,iU=o}}}function rv(e){var t=e.f;if(null!==re&&!rt&&(null===ri||(16384&ri.f)==0)&&(null===rn||!id.call(rn,e))){var i=re.deps;if((2097152&re.f)!=0)e.rv<ru&&(e.rv=ru,null===ro&&null!==i&&i[ra]===e?ra++:null===ro?ro=[e]:ro.push(e));else{(re.deps??=[]).push(e);var n=e.reactions;null===n?e.reactions=[re]:id.call(n,re)||n.push(re)}}if(nh.delete(e),n8&&nx.has(e))return nx.get(e);if((2&t)!=0){if(n8){var r=e.v;return((1024&e.f)==0&&null!==e.reactions||function e(t){if(t.v===io)return!0;if(null===t.deps)return!1;for(let i of t.deps)if(nx.has(i)||(2&i.f)!=0&&e(i))return!0;return!1}(e))&&(r=nb(e)),nx.set(e,r),r}var o=(512&e.f)==0&&!rt&&null!==re&&(n7||(512&re.f)!=0),a=(32768&e.f)==0;rc(e)&&(o&&(e.f|=512),ny(e)),o&&!a&&(nw(e),function e(t){if(t.f|=512,null!==t.deps)for(let i of t.deps)(i.reactions??=[]).push(t),(2&i.f)!=0&&(512&i.f)==0&&(nw(i),e(i))}(e))}if(ni?.has(e))return ni.get(e);if((8388608&e.f)!=0)throw e.v;return e.v}function rm(e){var t=rt;try{return rt=!0,e()}finally{rt=t}}var rg=Symbol("events"),r_=new Set,rb=new Set;function ry(e,t,i){(t[rg]??={})[e]=i}function rw(e){for(var t=0;t<e.length;t++)r_.add(e[t]);for(var i of rb)i(e)}function rk(e){var t=this.ownerDocument,i=e.type,n=e.composedPath?.()||[],r=n[0]||e.target,o=0,a=e==e&&e[rg];if(a){var s=n.indexOf(a);if(-1!==s&&(this===document||this===window)){e[rg]=this;return}var l=n.indexOf(this);if(-1===l)return;s<=l&&(o=s)}if((r=n[o]||e.target)!==this){ip(e,"currentTarget",{configurable:!0,get:()=>r||t});var u=re,d=ri;re=null,ri=null;try{for(var c,f=[];null!==r;){var p=r.assignedSlot||r.parentNode||r.host||null;try{var h=r[rg]?.[i];null==h||r.disabled&&e.target!==r||h.call(r,e)}catch(e){c?f.push(e):c=e}if(e.cancelBubble||p===this||null===p)break;r=p}if(c){for(let e of f)queueMicrotask(()=>{throw e});throw c}}finally{e[rg]=this,delete e.currentTarget,re=u,ri=d}}}var rx=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function rS(e,t=!1){var i,n=nW("template");return e=e.replaceAll("<!>","\x3c!----\x3e"),n.innerHTML=t?(i=e,rx?.createHTML(i)??i):e,n.content}function r$(e,t){var i=ri;null===i.nodes&&(i.nodes={start:e,end:t,a:null,t:null})}function rC(e,t){var i,n=(1&t)!=0,r=(2&t)!=0,o=!e.startsWith("<!>");return()=>{if(iO)return r$(u,null),u;void 0===i&&(i=rS(o?e:"<!>"+e,!0),n||(i=nD(i)));var t=r||c?document.importNode(i,!0):i.cloneNode(!0);return n?r$(nD(t),t.lastChild):r$(t,t),t}}function rA(e,t){return function(e,t,i="svg"){var n,r=!e.startsWith("<!>"),o=(1&t)!=0,a=`<${i}>${r?e:"<!>"+e}</${i}>`;return()=>{if(iO)return r$(u,null),u;if(!n){var e=nD(rS(a,!0));if(o)for(n=document.createDocumentFragment();nD(e);)n.appendChild(nD(e));else n=nD(e)}var t=n.cloneNode(!0);return o?r$(nD(t),t.lastChild):r$(t,t),t}}(e,t,"svg")}function rT(e,t){if(iO){var i=ri;((32768&i.f)==0||null===i.nodes.end)&&(i.nodes.end=u),iM();return}null!==e&&e.before(t)}var rE=["touchstart","touchmove"];function rP(e,t){var i=null==t?"":"object"==typeof t?t+"":t;i!==(e.__t??=e.nodeValue)&&(e.__t=i,e.nodeValue=i+"")}var rL=new Map;function rR(e,{target:t,anchor:i,props:n={},events:r,context:o,intro:a=!0}){let s;nN();var l,d=void 0,c=(l=()=>{var a=i??t.appendChild(nj());new nf(a,{pending:()=>{}},t=>{iJ({});var i=iQ;if(o&&(i.c=o),r&&(n.$$events=r),iO&&r$(t,null),d=e(t,n)||{},iO&&(ri.nodes.end=u,null===u||8!==u.nodeType||"]"!==u.data))throw iR(),ir;iY()});var s=new Set,l=e=>{for(var i=0;i<e.length;i++){var n=e[i];if(!s.has(n)){s.add(n);var r=rE.includes(n);for(let e of[t,document]){var o=rL.get(e);void 0===o&&(o=new Map,rL.set(e,o));var a=o.get(n);void 0===a?(e.addEventListener(n,rk,{passive:r}),o.set(n,1)):o.set(n,a+1)}}}};return l(ic(r_)),rb.add(l),()=>{for(var e of s)for(let i of[t,document]){var n=rL.get(i),r=n.get(e);0==--r?(i.removeEventListener(e,rk),n.delete(e),0===n.size&&rL.delete(i)):n.set(e,r)}rb.delete(l),a!==i&&a.parentNode?.removeChild(a)}},ns.ensure(),s=nH(524352,l,!0),(e={})=>new Promise(t=>{e.outro?n9(s,()=>{n5(s),t(void 0)}):(n5(s),t(void 0))}));return rV.set(d,c),d}var rV=new WeakMap;function rO(e,t){let i=rV.get(e);return i?(rV.delete(e),i(t)):(ix in e?console.warn(`%c[svelte] state_proxy_unmount
|
|
30
|
+
%cTried to unmount a state proxy, rather than a component
|
|
31
|
+
https://svelte.dev/e/state_proxy_unmount`,iP,iL):console.warn(`%c[svelte] lifecycle_double_unmount
|
|
32
|
+
%cTried to unmount a component that was not mounted
|
|
33
|
+
https://svelte.dev/e/lifecycle_double_unmount`,iP,iL),Promise.resolve())}class rI{anchor;#L=new Map;#R=new Map;#V=new Map;#O=new Set;#I=!0;constructor(e,t=!0){this.anchor=e,this.#I=t}#c=()=>{var e=nt;if(this.#L.has(e)){var t=this.#L.get(e),i=this.#R.get(t);if(i)(function e(t,i){if((8192&t.f)!=0){t.f^=8192,(1024&t.f)==0&&(i6(t,2048),nc(t));for(var n=t.first;null!==n;){var r=n.next,o=(65536&n.f)!=0||(32&n.f)!=0;e(n,!!o&&i),n=r}var a=t.nodes&&t.nodes.t;if(null!==a)for(let e of a)(e.is_global||i)&&e.in()}})(i,!0),this.#O.delete(t);else{var n=this.#V.get(t);n&&(this.#R.set(t,n.effect),this.#V.delete(t),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),i=n.effect)}for(let[t,i]of this.#L){if(this.#L.delete(t),t===e)break;let n=this.#V.get(i);n&&(n5(n.effect),this.#V.delete(i))}for(let[e,n]of this.#R){if(e===t||this.#O.has(e))continue;let r=()=>{if(Array.from(this.#L.values()).includes(e)){var t=document.createDocumentFragment();n6(n,t),t.append(nj()),this.#V.set(e,{effect:n,fragment:t})}else n5(n);this.#O.delete(e),this.#R.delete(e)};this.#I||!i?(this.#O.add(e),n9(n,r,!1)):r()}}};#M=e=>{this.#L.delete(e);let t=Array.from(this.#L.values());for(let[e,i]of this.#V)t.includes(e)||(n5(i.effect),this.#V.delete(e))};ensure(e,t){var i=nt;if(t&&!this.#R.has(e)&&!this.#V.has(e))if(1)this.#R.set(e,n1(()=>t(this.anchor)));else{var n=document.createDocumentFragment(),r=nj();n.append(r),this.#V.set(e,{effect:n1(()=>t(r)),fragment:n})}this.#L.set(i,e),1;iO&&(this.anchor=u),this.#c()}}function rM(e,t,...i){var n=new rI(e);n0(()=>{let e=t()??null;null==e&&function(){{let e=Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name="Svelte error",e}}(),n.ensure(e,e&&(t=>e(t,...i)))},65536)}{let e=function(e){if(!(e in globalThis)){let t;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(void 0!==t)return t;{let t=Error(`rune_outside_svelte
|
|
34
|
+
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
35
|
+
https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}},set:e=>{t=e}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}function rN(e){var t;null===iQ&&iE("onMount"),iB&&null!==iQ.l?(t=iQ.l,t.u??={a:[],b:[],m:[]}).m.push(e):nJ(()=>{let t=rm(e);if("function"==typeof t)return t})}var rj=new Map;function rD(e,t,i=!1){iO&&iM();var n=new rI(e);function r(t,i){if(iO){let o=function(e){if(!e||8!==e.nodeType)throw iR(),ir;return e.data}(e);if(t!==("["===o?0:"[!"!==o&&parseInt(o.substring(1)))){var r=iD();iI(r),n.anchor=r,iO=!1,n.ensure(t,i),iO=!0;return}}n.ensure(t,i)}n0(()=>{var e=!1;t((t,i=0)=>{e=!0,r(i,t)}),e||r(!1,null)},65536*!!i)}var rF=Symbol("NaN");function rz(e,t){nH(4,()=>{var i,n,r=e.getRootNode(),o=r.host?r:r.head??r.ownerDocument.head;if(!o.querySelector("#"+t.hash)){let e=nW("style");e.id=t.hash,e.textContent=t.code,o.appendChild(e),i=t.hash,(n=rj.get(i))||(n=new Set,rj.set(i,n)),n.add(e)}},!1)}var rq=[...`
|
|
36
|
+
\r\f\xa0\v\uFEFF`];function rB(e,t=!1){var i=t?" !important;":";",n="";for(var r in e){var o=e[r];null!=o&&""!==o&&(n+=" "+r+": "+o+i)}return n}function rW(e){return"-"!==e[0]||"-"!==e[1]?e.toLowerCase():e}function rQ(e,t,i,n,r,o){var a=e.__className;if(iO||a!==i||void 0===a){var s=function(e,t,i){var n=null==e?"":""+e;if(t&&(n=n?n+" "+t:t),i){for(var r in i)if(i[r])n=n?n+" "+r:r;else if(n.length)for(var o=r.length,a=0;(a=n.indexOf(r,a))>=0;){var s=a+o;(0===a||rq.includes(n[a-1]))&&(s===n.length||rq.includes(n[s]))?n=(0===a?"":n.substring(0,a))+n.substring(s+1):a=s}}return""===n?null:n}(i,n,o);iO&&s===e.getAttribute("class")||(null==s?e.removeAttribute("class"):t?e.className=s:e.setAttribute("class",s)),e.__className=i}else if(o&&r!==o)for(var l in o){var u=!!o[l];(null==r||!!r[l]!==u)&&e.classList.toggle(l,u)}return o}function rU(e,t={},i,n){for(var r in i){var o=i[r];t[r]!==o&&(null==i[r]?e.style.removeProperty(r):e.style.setProperty(r,o,n))}}function rH(e,t,i,n){var r=e.__style;if(iO||r!==t){var o=function(e,t){if(t){var i,n,r="";if(Array.isArray(t)?(i=t[0],n=t[1]):i=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,a=0,s=!1,l=[];i&&l.push(...Object.keys(i).map(rW)),n&&l.push(...Object.keys(n).map(rW));var u=0,d=-1;let t=e.length;for(var c=0;c<t;c++){var f=e[c];if(s?"/"===f&&"*"===e[c-1]&&(s=!1):o?o===f&&(o=!1):"/"===f&&"*"===e[c+1]?s=!0:'"'===f||"'"===f?o=f:"("===f?a++:")"===f&&a--,!s&&!1===o&&0===a){if(":"===f&&-1===d)d=c;else if(";"===f||c===t-1){if(-1!==d){var p=rW(e.substring(u,d).trim());l.includes(p)||(";"!==f&&c++,r+=" "+e.substring(u,c).trim()+";")}u=c+1,d=-1}}}}return i&&(r+=rB(i)),n&&(r+=rB(n,!0)),""===(r=r.trim())?null:r}return null==e?null:String(e)}(t,n);iO&&o===e.getAttribute("style")||(null==o?e.removeAttribute("style"):e.style.cssText=o),e.__style=t}else n&&(Array.isArray(n)?(rU(e,i?.[0],n[0]),rU(e,i?.[1],n[1],"important")):rU(e,i,n));return n}Symbol("class"),Symbol("style");var rG=Symbol("is custom element"),rK=Symbol("is html"),rJ=iT?"link":"LINK";function rY(e,t,i,n){var r,o=(r=e,r.__attributes??={[rG]:r.nodeName.includes("-"),[rK]:r.namespaceURI===is});if(iO&&(o[t]=e.getAttribute(t),"src"===t||"srcset"===t||"href"===t&&e.nodeName===rJ)){n||function(e,t,i){var n,r,o,a,s,l;if(!("srcset"===t&&(n=e,r=i,o=r0(n.srcset),(a=r0(r)).length===o.length&&a.every(([e,t],i)=>t===o[i][1]&&(rX(o[i][0],e)||rX(e,o[i][0])))))&&!rX(e.getAttribute(t)??"",i)){s=e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),l=String(i),console.warn(`%c[svelte] hydration_attribute_changed
|
|
37
|
+
%cThe \`${t}\` attribute on \`${s}\` changed its value between server and client renders. The client value, \`${l}\`, will be ignored in favour of the server value
|
|
38
|
+
https://svelte.dev/e/hydration_attribute_changed`,iP,iL)}}(e,t,i??"");return}o[t]!==(o[t]=i)&&("loading"===t&&(e[i$]=i),null==i?e.removeAttribute(t):"string"!=typeof i&&(function(e){var t,i=e.getAttribute("is")||e.nodeName,n=rZ.get(i);if(n)return n;rZ.set(i,n=[]);for(var r=e,o=Element.prototype;o!==r;){for(var a in t=iv(r))t[a].set&&n.push(a);r=i_(r)}return n})(e).includes(t)?e[t]=i:e.setAttribute(t,i))}var rZ=new Map;function rX(e,t){return e===t||new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function r0(e){return e.split(",").map(e=>e.trim().split(" ").filter(Boolean))}class r1{#N=new WeakMap;#j;#D;static entries=new WeakMap;constructor(e){this.#D=e}observe(e,t){var i=this.#N.get(e)||new Set;return i.add(t),this.#N.set(e,i),this.#F().observe(e,this.#D),()=>{var i=this.#N.get(e);i.delete(t),0===i.size&&(this.#N.delete(e),this.#j.unobserve(e))}}#F(){return this.#j??(this.#j=new ResizeObserver(e=>{for(var t of e)for(var i of(r1.entries.set(t.target,t),this.#N.get(t.target)||[]))i(t)}))}}function r2(e,t){return e===t||e?.[ix]===t}function r4(e={},t,i,n){return nH(4,()=>{var r,o;return nZ(()=>{r=o,o=n?.()||[],rm(()=>{e!==i(...o)&&(t(e,...o),r&&r2(i(...r),e)&&t(null,...r))})}),()=>{i2(()=>{o&&r2(i(...o),e)&&t(null,...o)})}},!1),e}function r5(e,t,i){if(null==e)return t(void 0),i&&i(void 0),iy;let n=rm(()=>e.subscribe(t,i));return n.unsubscribe?()=>n.unsubscribe():n}var r3=[];function r9(e,t){return{subscribe:r6(e,t).subscribe}}function r6(e,t=iy){let i=null,n=new Set;function r(t){if(iz(e,t)&&(e=t,i)){let t=!r3.length;for(let t of n)t[1](),r3.push(t,e);if(t){for(let e=0;e<r3.length;e+=2)r3[e][0](r3[e+1]);r3.length=0}}}function o(t){r(t(e))}return{set:r,update:o,subscribe:function(a,s=iy){let l=[a,s];return n.add(l),1===n.size&&(i=t(r,o)||iy),a(e),()=>{n.delete(l),0===n.size&&i&&(i(),i=null)}}}}function r7(e,t,i){let n=!Array.isArray(e),r=n?[e]:e;if(!r.every(Boolean))throw Error("derived() expects stores as input, got a falsy value");let o=t.length<2;return r9(i,(e,i)=>{let a=!1,s=[],l=0,u=iy,d=()=>{if(l)return;u();let r=t(n?s[0]:s,e,i);o?e(r):u="function"==typeof r?r:iy},c=r.map((e,t)=>r5(e,e=>{s[t]=e,l&=~(1<<t),a&&d()},()=>{l|=1<<t}));return a=!0,d(),function(){iw(c),u(),a=!1}})}function r8(e){let t;return r5(e,e=>t=e)(),t}var oe=!1,ot=Symbol();function oi(e,t,i){let n=i[t]??={store:null,source:nA(void 0),unsubscribe:iy};if(n.source.label=t,n.store!==e&&!(ot in i))if(n.unsubscribe(),n.store=e??null,null==e)n.source.v=void 0,n.unsubscribe=iy;else{var r=!0;n.unsubscribe=r5(e,e=>{r?n.source.v=e:nT(n.source,e)}),r=!1}return e&&ot in i?r8(e):rv(n.source)}function on(){let e={};return[e,function(){nK(()=>{for(var t in e)e[t].unsubscribe();ip(e,ot,{enumerable:!1,value:!0})})}]}function or(e,t,i,n){var r,o,a,s=!iB||(2&i)!=0,l=(8&i)!=0,u=(16&i)!=0,d=n,c=!0,f=()=>(c&&(c=!1,d=u?rm(n):n),d);if(l){var p=ix in e||iS in e;r=ih(e,t)?.set??(p&&t in e?i=>e[t]=i:void 0)}var h=!1;if(l?[o,h]=function(e){var t=oe;try{return oe=!1,[e(),oe]}finally{oe=t}}(()=>e[t]):o=e[t],void 0===o&&void 0!==n&&(o=f(),r&&(s&&function(e){{let t=Error(`props_invalid_value
|
|
39
|
+
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
|
|
40
|
+
https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}}(t),r(o))),a=s?()=>{var i=e[t];return void 0===i?f():(c=!0,i)}:()=>{var i=e[t];return void 0!==i&&(d=void 0),void 0===i?d:i},s&&(4&i)==0)return a;if(r){var v=e.$$legacy;return function(e,t){return arguments.length>0?((!s||!t||v||h)&&r(t?a():e),e):a()}}var m=!1,g=((1&i)!=0?nv:ng)(()=>(m=!1,a()));g.label=t,l&&rv(g);var _=ri;return function(e,t){if(arguments.length>0){let i=t?rv(g):s&&l?nV(e):e;return nT(g,i),m=!0,void 0!==d&&(d=i),e}return n8&&m||(16384&_.f)!=0?g.v:rv(g)}}"function"==typeof HTMLElement&&HTMLElement,"u">typeof window&&((window.__svelte??={}).v??=new Set).add("5");import{areValidLiveRecordSources as oo,VERSION as oa,ChromecastState as os,PlaybackState as ol,Player as ou,PredefinedQualityLimits as od,VideoFormat as oc,clientChecker as of,clientChecker as op,VideoQuality as oh,VideoFormat as ov}from"@vkontakte/videoplayer-core";import{safeStorage as om,InterfaceLanguage as og,fillWithDefault as o_,VideoQuality as ob,assertNonNullable as oy,VERSION as ow,isNullable as ok,safeStorage as ox,safeStorage as oS,isNullable as o$,InterfaceLanguage as oC,assertNonNullable as oA,getHighestQuality as oT,InterfaceLanguage as oE,isInvariantQuality as oP,isNonNullable as oL,loadVKLangPack as oR,Logger as oV,map as oO,merge as oI,Observable as oM,Subject as oN,Subscription as oj,TracerFactory as oD,VideoQuality as oF,devNull as oz,now as oq,detectEmbed as oB,devNull as oW,isNonNullable as oQ,now as oU,addScript as oH,Subject as oG,clearVideoElement as oK,isNonNullable as oJ,now as oY,ValueSubject as oZ,cloneDeepWith as oX,InterfaceLanguage as o0,Observable as o1,Subscription as o2,InternalsExposure as o4,skip as o5,getPlayerId as o3,Subscription as o9,devNull as o6,getWindow as o7,InterfaceLanguage as o8,VKNumericLanguage as ae,loadVKLangPack as at}from"@vkontakte/videoplayer-shared";import{SeekAction as ai,VERSION as an,SeekAction as ar,OneStat as ao,ThinOneStat as aa,MediascopePixel as as}from"@vkontakte/videoplayer-statistics";var al={debugLog:!1,devNullLog:!1,defaultLanguage:og.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,showSupport:!0,supportLink:"https://vk.com/support?act=new&from=v",showLogo:void 0,logoLink:"https://vk.com/video",logoType:"vk_video",volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,trafficSavingLimit:ob.Q_480P,highQualityLimit:ob.Q_720P,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,fullscreen:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,copyVideoLink:!0,videoRotate:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,userVideoPrefs:!1,initSubtitles:!0},controls:{playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},userSalt:"0"},au="vk_player_debug_panel_opened",ad=k(eM(),1),{NativeAbortSignal:ac,NativeAbortController:af}={NativeAbortSignal:(a="u">typeof self?self:global).AbortSignal,NativeAbortController:a.AbortController};class ap{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:i})}removeEventListener(e,t){if(!(e in this.listeners))return;let i=this.listeners[e];for(let e=0,n=i.length;e<n;e++)if(i[e].callback===t)return void i.splice(e,1)}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let i=0,n=t.length;i<n;i++){let n=t[i];try{n.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}n.options&&n.options.once&&this.removeEventListener(e.type,n.callback)}return!e.defaultPrevented}}class ah extends ap{constructor(){super(),this.listeners||ap.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return"[object AbortSignal]"}dispatchEvent(e){"abort"===e.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t="Aborted"}=this;if(e)throw t}static timeout(e){let t=new av;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,"TimeoutError")),e),t.signal}static any(e){let t=new av;function i(){t.abort(this.reason),function(){for(let t of e)t.removeEventListener("abort",i)}()}for(let n of e)if(n.aborted){t.abort(n.reason);break}else n.addEventListener("abort",i);return t.signal}}class av{constructor(){Object.defineProperty(this,"signal",{value:new ah,writable:!0,configurable:!0})}abort(e){let t=function(e){if(void 0===e)if("u"<typeof document)(e=Error("This operation was aborted")).name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch(t){(e=Error("This operation was aborted")).name="AbortError"}return e}(e),i=function(e){let t;try{t=new Event("abort")}catch(e){"u">typeof document?document.createEvent?(t=document.createEvent("Event")).initEvent("abort",!1,!1):(t=document.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}(t);this.signal.reason=t,this.signal.dispatchEvent(i)}toString(){return"[object AbortController]"}}function am(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof e.Request&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}"u">typeof Symbol&&Symbol.toStringTag&&(av.prototype[Symbol.toStringTag]="AbortController",ah.prototype[Symbol.toStringTag]="AbortSignal");var ag="object"==typeof globalThis&&globalThis||"object"==typeof window&&window,a_="fetch"in ag&&am({fetch:ag.fetch,Request:ag.Request,AbortController:ag.AbortController}),ab=a_?function(e){"function"==typeof e&&(e={fetch:e});let{fetch:t,Request:i=t.Request,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:r=!1}=e;if(!am({fetch:t,Request:i,AbortController:n,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:r}))return{fetch:t,Request:o};let o=i;return(o&&!o.prototype.hasOwnProperty("signal")||r)&&((o=function(e,t){let n;t&&t.signal&&(n=t.signal,delete t.signal);let r=new i(e,t);return n&&Object.defineProperty(r,"signal",{writable:!1,enumerable:!1,configurable:!0,value:n}),r}).prototype=i.prototype),{fetch:(e,i)=>{let n=o&&o.prototype.isPrototypeOf(e)?e.signal:i?i.signal:void 0;if(n){let r;try{r=new DOMException("Aborted","AbortError")}catch(e){(r=Error("Aborted")).name="AbortError"}if(n.aborted)return Promise.reject(r);let o=new Promise((e,t)=>{n.addEventListener("abort",()=>t(r),{once:!0})});return i&&i.signal&&delete i.signal,Promise.race([o,t(e,i)])}return t(e,i)},Request:o}}({fetch:ag.fetch,Request:ag.Request,AbortController:ag.AbortController}):void 0,ay=a_?ab.fetch:ag.fetch;a_?ab.Request:ag.Request;var aw=a_?av:ag.AbortController;a_||ag.AbortSignal;var ak="1.0.4-dev.bdbbdd48.0",ax=Symbol("storeContext"),aS=()=>{let e=iG(ax);return oy(e,"Store context is empty!"),e},a$=(e,t)=>aC(e,e.getValue(),t),aC=(e,t,i)=>r9(t,t=>{let n=e.subscribe(e=>{t(e),i?.(e)});return()=>n.unsubscribe()});class aA{destroyController=new aw;pendingDownloads=new Set;async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let t=await ay(e,{signal:this.destroyController.signal});if(t.ok)return await t.text();throw t}finally{this.pendingDownloads.delete(e)}}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}}k(eM(),1),k(eF(),1),k(td(),1);var aT="vk_player_prefer_traffic_saving_enabled",aE="vk_player_preferred_quality",aP="vk_player_preferred_default_quality_settings",aL="vk_player_preferred_quality_settings_by_video",aR="vk_player_preferred_stream_language",aV="vk_player_preferred_rate",aO="vk_player_preferred_subtitles_language",aI=()=>{let e,t=ox.get("vk_player_preferred_volume");return ok(t)?void 0:(e=parseFloat(t))>1?1:e<0?0:e},aM=(e,t)=>ox.set(aE,JSON.stringify({videoId:e,value:t})),aN=e=>{let t=ox.get(aE);if(ok(t))return;let{videoId:i,value:n}=JSON.parse(t);return e!==i?void ox.remove(aE):n},aj=e=>"true"===ox.get(e),aD=e=>{e?ox.set(aT,"true"):ox.remove(aT)},aF=()=>ox.get(aO),az=(e=e=>{ox.set(aP,JSON.stringify(e))},t=()=>{try{let e=ox.get(aP);return e?JSON.parse(e):null}catch(e){return null}},i=e=>{ox.set(aL,JSON.stringify(e))},n=i=>{o(i);let n=i?(()=>{try{let e=ox.get(aL);return e?JSON.parse(e):null}catch(e){return null}})():null;if(n&&n?.videoId===i)return{...n,appliesTo:"to-video"};n&&r();let a=t();return a?{...a,appliesTo:"as-default"}:(e({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},r=()=>{ox.remove(aL)},o=t=>{let n=aN(t);n?i({type:"exact_quality",videoId:t,quality:n}):(aj(aT)&&e({type:"traffic_saving",videoId:t}),aD(!1),ox.remove(aE))},{getPreferredQualitySettings:n,migrateSettingsToLegacyWay:e=>{let t=n(e);if(t){switch(t.type){case"traffic_saving":aD(!0);break;case"exact_quality":aM(e,t.quality)}r(),ox.remove(aP)}},savePreferredQualitySettings:(t,n="as-default")=>{"exact_quality"===t.type||"to-video"===n?i(t):e(t)},savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:r,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:aF,savePreferredSubtitlesLanguage:e=>{e?ox.set(aO,e):ox.remove(aO)}});az.getPreferredQualitySettings;var aq=az.migrateSettingsToLegacyWay;az.savePreferredQualitySettings,az.savePreferredDefaultQualitySettings,az.removePreferredQualitySettingsByVideo,az.getPreferredDefaultQualitySettings;var aB=(e,t)=>{let i=(()=>{let e=ox.get("vk_player_user_video_prefs");if(e)try{return JSON.parse(e)}catch{}return null})();return i?.[e]?.[t]??null};class aW{value;next;constructor(e){this.value=e,this.next=null}}class aQ{top;bottom;size;maxSize;constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let t=new aW(e);this.top?(this.top.next=t,this.top=t):(this.top=t,this.bottom=t),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],t=this.bottom;for(;t;)e.push(t.value),t=t.next;return e}}var aU=rC('<div class="container s-8"><canvas class="s-8"></canvas></div>'),aH={hash:"s-8",code:".container.s-8 {display:inline-block;width:120px;height:16px;}canvas.s-8 {transform:scale(1, -1);margin-top:2px;}"};function aG(e,t){iJ(t,!0),rz(e,aH);let i=or(t,"values",19,()=>[]),n=nC(void 0),r=nC(null);rN(()=>{rv(n).width=120,rv(n).height=16,nT(r,rv(n).getContext("2d"),!0)}),nJ(()=>{let e="";if(rv(r)){let o=i()[0];for(let e=1;e<i().length;e++)i()[e]>o&&(o=i()[e]);rv(r).clearRect(0,0,120,16);let a=59;for(let s=i().length-1;s>=0;s--){var t,n;let l=2*a,u=o>0?16*(i()[s]/o):0;t=rv(r),0===(n=u)&&(n=1),t.fillStyle="#fff",t.fillRect(l,0,2,n),e=u+" "+e,a--}}});var o=aU();r4(nz(o),e=>nT(n,e),()=>rv(n)),iN(o),rT(e,o),iY()}var aK=k(eF(),1),aJ=k(tw(),1),aY={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно\xa0{action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру \xab7\xbb ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество \xabАвто\xbb",slow_video_notification_force_description:`Видео грузится слишком медленно,
|
|
41
|
+
качество изменено на\xa0\xabАвто\xbb`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
|
|
42
|
+
попробуйте изменить качество на \xabАвто\xbb`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},aZ={auto_quality_invariant:"Auto",auto_quality:"Auto ({actual})",auto_quality_option:"Auto",other_quality:"Other",high_quality:"High quality",high_quality_description:"Uses more data",auto_quality_limit:"Auto",traffic_saving_quality:"Data saving",traffic_saving_quality_description:"Videos load faster but\xa0at\xa0lower quality",quality_applience:"You can\xa0{action} the\xa0default quality",quality_applience_action:"change",default_quality_for_any_video:"Quality for\xa0all videos",menu_quality:"Quality",menu_playback_rate:"Playback rate",menu_traffic_saving:"Data saving",menu_report:"Report a problem",menu_pip:"Picture in picture",menu_pip_close:"Expand video",menu_copy_video_link:"Copy video link",menu_copy_video_link_with_timestamp:"Copy link with timestamp",menu_video_rotate:"Rotate",menu_video_loop_on:"Enable loop",menu_video_loop_off:"Disable loop",menu_chromecast:"Chromecast stream",menu_copy_debug:"Copy debug info",menu_save_debug:"Save debug info",menu_debug_overlay:"Tech stats",menu_copy_embed_code:"Copy embed code",menu_audio_languages:"Audio track",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Audio track {index}",pip_dummy_title:"Video plays in picture-in-picture mode",submenu_quality:"Quality",submenu_playback_rate:"Playback rate",submenu_traffic_saving:"Data saving",submenu_settings:"Settings",submenu_audio_languages:"Audio track",playing_ads:"Ads {timeleft}",skip_ads_after:"Skip ads",skip_ads_now:"Skip {time}s",visit_advertiser:"Visit site",aria_timeline:"Time scale slider",aria_timeline_value:"{position} out of {duration}",doubletap_seek_step:"{seconds} seconds",playback_rate_1:"Normal",playback_rate:"{multiplier}x",video360:"spherical video",subtitles_caption:"Subtitles",subtitles_auto:"{language} (Auto-generated)",subtitles_off:"Off",subtitles_auto_caption:"Auto subtitles",subtitles_turn_on:"Turn on subtitles",subtitles_turn_off:"Turn off subtitles",traffic_saving_off:"Off",traffic_saving_on:"On",traffic_saving_helper_text:"When turned on the video quality will be reduced to save data",tooltip_button_disabled:"Button disabled",tooltip_previous:"Previous video",tooltip_restart:"Watch again",tooltip_play:"Play",tooltip_pause:"Pause",tooltip_next:"Next video",tooltip_interactive_go_back:"Back to previous chapter",tooltip_interactive_go_back_disabled:"Interactive history unavailable",tooltip_interactive_go_back_disabled_first:"You're watching the first chapter",tooltip_interactive_go_back_disabled_limit:"Go-back limit exceeded",tooltip_chapter_without_interactive:"This chapter has no interactive segment",tooltip_interactive_of_chapter_completed:"Chapter's interactive segments already watched",tooltip_interactive_seek:"Go to interactive",tooltip_interactive_graph_off:"Show interactive graph",tooltip_interactive_graph_on:"Hide interactive graph",tooltip_live:"Go to the live edge",tooltip_episodes:"Episodes",tooltip_volume:"Volume off",tooltip_volume_muted:"Turn volume on",tooltip_sound_unavailable:"Sound unavailable",tooltip_subtitles_off:"Turn subtitles on",tooltip_subtitles_on:"Turn subtitles off",tooltip_settings_off:"Open settings",tooltip_settings_on:"Close settings",tooltip_fullscreen_off:"Enter fullscreen mode",tooltip_fullscreen_on:"Exit fullscreen mode",tooltip_chromecast_off:"Turn Chromecast on",tooltip_chromecast_on:"Turn Chromecast off",tooltip_episode_finished:"You have already viewed interactive episode",tooltip_episode_unfinished:"Interactive episode not finished",tooltip_disabled_when_interactive:"Interactive video in progress",tooltip_disabled_when_graph_on:"Button is disabled when graph is opened",tooltip_interactive_interaction_time_indicator:"Press the interactive element",tooltip_vk_logo:"Open in VK Video",tooltip_vk_video_logo:"Go to VK Video",tooltip_autoplay_off:"Turn autoplay on",tooltip_autoplay_on:"Turn autoplay off",tooltip_context_menu_open:"Open context menu",tooltip_context_menu_close:"Close context menu",download_video_caption:"Download video",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Keyboard shortcuts",hotkey_map_modal_close_btn_text:"Close",hotkey_map_group_title_common:"Common",hotkey_map_group_title_playback:"Playback",hotkey_map_group_title_subtitles:"Subtitles",hotkey_map_group_title_episodes:"Episodes",hotkey_map_item_mute_description:"Toggle mute",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Increase volume",hotkey_map_item_volume_up_value:"Arrow up",hotkey_map_item_volume_down_description:"Decrease volume",hotkey_map_item_volume_down_value:"Arrow down",hotkey_map_item_pip_description:"Toggle miniplayer",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Toggle full screen",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Hide or show context menu",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Hide or show list of hotkeys",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Toggle play/pause",hotkey_map_item_play_toggle_value:"Space (or k)",hotkey_map_item_seek_backward_description:"Rewind 10 seconds",hotkey_map_item_seek_backward_value:"Arrow left (or j)",hotkey_map_item_seek_forward_description:"Forward 10 seconds",hotkey_map_item_seek_forward_value:"Arrow right (or l)",hotkey_map_item_fast_seek_backward_description:"Fast rewind",hotkey_map_item_fast_seek_backward_value:"Shift + Arrow left",hotkey_map_item_fast_seek_forward_description:"Fast forward",hotkey_map_item_fast_seek_forward_value:"Shift + Arrow right",hotkey_map_item_rate_down_description:"Decrease playback rate",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Increase playback rate",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Previous frame (while paused)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Next frame (while paused)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Seek to specific point in the video (7 advances to 70% of duration)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Toggle captions ON/OFF",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Seek to previous episode",hotkey_map_item_prev_episode_pc_value:"Ctrl + Arrow left",hotkey_map_item_prev_episode_mac_value:"Option + Arrow left",hotkey_map_item_next_episode_description:"Seek to next episode",hotkey_map_item_next_episode_pc_value:"Ctrl + Arrow right",hotkey_map_item_next_episode_mac_value:"Option + Arrow right",hotkey_map_item_next_video_description:"Next video",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Previous video",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"d",waiting_live_hour_value:"h",waiting_live_minute_value:"min",waiting_live_second_value:"sec",waiting_live_colon:":",waiting_live_upcoming_title:"The broadcast hasn't started yet",waiting_live_timer_title:"Before the start of the broadcast left",waiting_live_recover_title:"The broadcast has been paused - it will resume when the author returns",waiting_record_title:"The broadcast completed - recording will appear later",aria_label_video_player:"Video player",aria_label_spherical_control:"Spherical video control. Use the arrow keys to pan the video.",aria_label_debug_panel:"Technical information area, take a screenshot for technical support",aria_label_new_tab_alert:"Opens in a new tab.",aria_label_menu_quality:"Quality: {actual}",aria_label_menu_audio_languages:"Audio language: {actual}",aria_label_menu_rate:"Rate: {actual}",aria_label_menu_subtitle:"Subtitles: {actual}",aria_label_menu_download:"Download video",aria_label_menu_debug_overlay:"Display of technical information",aria_label_menu_rotate:"Rotate video 90 degrees",aria_label_menu_loop:"Toggle loop",aria_label_submenu_back:"Return to settings menu",aria_label_submenu_traffic_saving:"Data saving mode",aria_label_settings:"Settings",aria_label_context_menu:"Context menu",aria_label_autoplay:"Autoplay",end_screen_next_video:"Next video",end_screen_recommended_video:"Recommended video",slow_video_notification_button:"Select Auto quality",slow_video_notification_force_description:`The video is loading too slowly,
|
|
43
|
+
so\xa0the\xa0quality was changed to\xa0Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
|
|
44
|
+
Try switching the\xa0quality to\xa0Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},aX=new Map;aX.set(oC.EN,aZ),aX.set(oC.RU,aY);var a0=new Map,a1=({language:e,pack:t,fallback:i})=>{if(aX.has(e)){let i=aX.get(e);aX.set(e,{...i,...t})}else aX.set(e,t);a0.set(e,i)},a2=(e,t,i,n)=>{let r=aX.get(e),o=r?.[t];if(o$(o)){let i=a0.get(e)??n,r=i?aX.get(i):void 0;o=r?.[t]}return o$(o)?t+aK.default(i??{}).join(" "):i?aJ.default(o,/{(\w+?)}/g,(e,t)=>i[t]??""):o},a4=(e,t)=>{let{interfaceLanguage$:i}=aS();return a2(r8(i),e,t,iG("ui-config").defaultLanguage)},a5=rC('<div class="s-5"><div class="s-5">Video id</div> <span> </span></div>'),a3=rC('<div class="s-5"><div class="s-5">VSID</div> <span> </span></div>'),a9=rC('<div class="s-5"><div class="s-5">Provider</div> <span> </span></div>'),a6=rC('<div class="s-5"><div class="s-5">Streams</div> <span> </span></div>'),a7=rC('<div class="s-5"><div class="s-5">Viewport</div> <span> </span></div>'),a8=rC('<div class="s-5"><div class="s-5">Video size</div> <span> </span></div>'),se=rC('<div class="s-5"><div class="s-5">CDN host</div> <span> </span></div>'),st=rC('<div class="s-5"><div class="s-5">Volume</div> <span> </span></div>'),si=rC('<div class="s-5"><div class="s-5">Position</div> <span> </span></div>'),sn=rC('<div class="s-5"><div class="s-5">Buffer</div> <span> </span></div>'),sr=rC('<div class="s-5"><div class="s-5">Nbuffer</div> <span> </span></div>'),so=rC('<div class="s-5"><div class="s-5">Live latency</div> <span> </span></div>'),sa=rC('<div class="s-5"><div class="s-5">Segment</div> <span> </span></div>'),ss=rC('<div class="s-5"><div class="s-5">Network</div> <!> <span> </span></div>'),sl=rC('<div class="s-5"><div class="s-5">V bitrate</div> <!> <span> </span></div>'),su=rC('<div class="container s-5" role="region"><button class="close s-5" title="закрыть">[x]</button> <div class="content s-5"><div class="s-5"><div class="s-5">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-5"><div class="s-5">Dropped</div> <span> </span></div> <!> <!> <div class="s-5"><div class="s-5">FPS</div> <!> <span> </span></div></div></div>'),sd={hash:"s-5",code:".container.s-5 {background:rgba(28, 28, 28, 0.8);border-radius:4px;color:#fff;left:20px;position:absolute;z-index:var(--debug-panel-z-index);top:45px;min-width:160px;font-size:10px;text-align:left;user-select:text;}button.close.s-5 {position:absolute;right:5px;top:3px;cursor:pointer;outline:0;border:none;background-color:transparent;padding:0;color:#fff;}.content.s-5 {padding:5px;}.content.s-5 > div:where(.s-5) > div:where(.s-5) {display:inline-block;text-align:right;width:60px;padding:0 5px;}"};rw(["click"]),iB=!0;var sc=rA('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),sf=rA('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function sp(e,t){iJ(t,!0);let i=or(t,"width",19,()=>"24"),n=or(t,"height",19,()=>"24"),r=or(t,"fill",3,"var(--btn-color, #fff)"),o=t.viewBox??`0 0 ${i()} ${n()}`;var a=sf(),s=nz(a),l=e=>{var i=sc(),n=nq(i);rM(nz(n),()=>t.children),iN(n),ij(),rT(e,i)},d=e=>{var i=function(){if(iO)return r$(u,null),u;var e=document.createDocumentFragment(),t=document.createComment(""),i=nj();return e.append(t,i),r$(t,i),e}();rM(nq(i),()=>t.children),rT(e,i)};rD(s,e=>{t.shadow?e(l):e(d,!1)}),iN(a),nX(()=>{rY(a,"aria-label",t.ariaLabel),rY(a,"aria-hidden",!t.ariaLabel),rY(a,"width",i()),rY(a,"height",n()),rY(a,"viewBox",o),rY(a,"fill",r()),rH(a,t.style),rY(a,"data-testid",t.testId)}),rT(e,a),iY()}var sh=rA('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>'),sv=rC('<div class="container s-4"><!></div>'),sm={hash:"s-4",code:".container.s-4 {position:absolute;top:0;bottom:0;left:0;right:0;background:#000;display:flex;align-items:center;justify-content:center;}"};function sg(e){rz(e,sm);var t=sv();sp(nz(t),{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,t)=>{rT(e,sh())},$$slots:{default:!0}}),iN(t),rT(e,t)}var s_=rA('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>'),sb=rC('<div class="playButton s-6" tabindex="0" role="button"><div class="playButtonBackground s-6"></div> <!></div>'),sy=rC('<div data-testid="unstarted-thumb"><!></div>'),sw={hash:"s-6",code:`.container.s-6 {position:absolute;top:0;bottom:0;left:0;right:0;background-position:center;background-size:contain;background-repeat:no-repeat;cursor:pointer;transition:opacity 0.2s,
|
|
45
|
+
visibility 0.2s;will-change:opacity;}.container.hidden.s-6 {opacity:0;visibility:hidden;}.container.bgCover.s-6 {background-size:cover;}.playButton.s-6 {position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;width:var(--big-play-size);height:var(--big-play-size);display:flex;align-items:center;justify-content:center;}.playButtonBackground.s-6 {position:absolute;top:0;bottom:0;left:0;right:0;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);transition:background 0.2s,
|
|
46
|
+
transform 0.2s;transition-timing-function:ease-out;will-change:background, transform;}.container.s-6:hover .playButtonBackground:where(.s-6) {background-color:var(--big-play-hover-bg-color);transform:scale(1.15);}.playButton.s-6 svg {position:relative;}`};rw(["click","contextmenu"]);var sk=rC('<div><div class="video-container s-7"></div></div>'),sx={hash:"s-7",code:`.video-wrapper.s-7,
|
|
47
|
+
.video-container.s-7 {position:absolute;width:100%;height:100%;left:0;top:0;}.video-wrapper.s-7 {z-index:var(--video-container-z-index);background:var(--black);}.video-container.s-7 {z-index:var(--video-container-z-index);transition:var(--rotate-transition-duration) ease all;}`},sS=rC("<!> <!> <!> <!>",1),s$=rC('<div class="player-wrapper s-3"><!></div>'),sC={hash:"s-3",code:".player-wrapper.s-3 {position:absolute;width:100%;height:100%;}.player-wrapper.s-3 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}"},sA=rC('<div class="vk-vp-tv-root s-0"><!></div>'),sT={hash:"s-0",code:".vk-vp-tv-root.s-0 {--white: #fff;--black: #000;--red: #ff3347;--blue-light: #70c1ff;--black-alpha-40: rgba(0, 0, 0, 0.4);--white-alpha-24: rgba(255, 255, 255, 0.24);--white-alpha-72: rgba(255, 255, 255, 0.72);--devider-gray: #dce1e6;--text-gray: #626d7a;--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;--controls-height: 40px;--controls-gradient-height: 100px;--controls-transition-duration: 0.25s;--controls-transition-fn: cubic-bezier(0.455, 0.03, 0.515, 0.955);--controls-desktop-item-margin-left: 4px;--controls-desktop-padding-horizontal: 4px;--focused: var(--white);--focused-outline-width: 2px;--focused-outline-radius: 0;--focused-element-shadow: inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow: 0 0 0 2px var(--focused);--big-play-size: 96px;--big-play-radius: 50%;--big-play-bg-color: rgba(0, 0, 0, 0.5);--big-play-hover-bg-color: rgba(0, 0, 0, 0.6);--big-play-icon-width: 38px;--big-play-icon-height: 33px;}"};function sE(e,t){iJ(t,!0),rz(e,sT);let[i,n]=on(),r=or(t,"sources",7),o=or(t,"store",7),a=or(t,"videoConfig",7),s=or(t,"uiConfig",7),l=or(t,"title",7),u=or(t,"thumbUrl",7),d=or(t,"subtitles",7),c=or(t,"subtitlesForcedLanguage",7),f=or(t,"live",7),p=or(t,"preload",7),h=or(t,"autoplay",7),v=or(t,"volume",7,void 0),m=or(t,"muted",7,void 0),g=or(t,"fromTime",7),_=or(t,"canRewindLive",7),b=or(t,"showAds",7),y=or(t,"adsSlotId",7,void 0),w=or(t,"adsParams",7,void 0),k=or(t,"adsAutoplayParam",7,void 0),x=or(t,"duration",7,void 0),S=or(t,"supportLink",7),$=or(t,"shadowRootContainer",7),C=or(t,"outerContainerRef",7),A=or(t,"fullScreenTarget",7,void 0),T=or(t,"failoverHosts",7,void 0),E=or(t,"saveRate",7),P=or(t,"volumeMultiplier",7),L=or(t,"showEndScreen",7,!0);iK("ui-config",s());let R=iG("ui-config"),V=o().ui.debugPanelVisible,O=o().state.isLive$,I=nC(void 0),M=nC(!1);o().getAdmanWrapper().init({switchFromAdsToVideo:o().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:o().actions.internal.switchFromVideoToAds,setMuted:o().actions.external.setMuted},o().ads,{vsid:o().vsid}),iK(ax,o()),nJ(()=>{a().callbacks?.onDomReady?.()});let N=(e=!1)=>{nT(M,!0),e?o().actions.external.firstStart(b()):o().actions.internal.firstStart(b())};function j(e){let t,n=r()||e;n&&o().initVideo({container:rv(I),sources:n,failoverHosts:T(),subtitles:d(),subtitlesForcedLanguage:c(),volumeMultiplier:P()});let a="true"===om.get(au);V.set(a),g()>0&&o().actions.external.seekTime(g());let s=v()??aI()??R.volumeDefault,l=m()??aj("vk_player_prefer_volume_mute");if(o().actions.external.setVolume(s),o().actions.external.setMuted(l),o().getAdmanWrapper().setInitialVolume(l?0:s),aq(o().videoId),aj(aT)&&o().actions.internal.setTrafficSavingEnabled(!0),(t=aN(o().videoId))&&o().actions.internal.setQuality(t),R.features.saveRate&&E()){let e=(()=>{let e=ox.get(aV);if(ok(e))return;let{rate:t}=JSON.parse(e);return t})();e&&!oi(O,"$isLive$",i)&&o().actions.internal.setPlaybackRate(e)}o().ui.isAutoplay.set(h()),h()&&N(),p()&&R.features.preload&&o().actions.internal.preload()}rN(()=>{let e=()=>o().destroy();return f()?.status==="upcoming"?(o().actions.internal.setLiveWaitingStart(!0),e):f()?.status==="waiting"?(o().actions.internal.setLiveWaitingRecover(!0),e):f()?.status!=="finished"&&f()?.status!=="postlive"||r()&&oo(r())?(j(),e):(o().actions.internal.setLiveWaitingRecord(!0),e)});let D=o().state.availableSubtitlesList$;if(R.features.initSubtitles){let e=!1;nJ(()=>{if(!e&&oi(D,"$availableSubtitlesList$",i).length){let t;if(e=!0,R.features.userVideoPrefs&&o().videoId){let e=aB(R.userSalt,String(o().videoId));e?.subtitleTrackId&&(t=oi(D,"$availableSubtitlesList$",i).find(t=>t.value===e.subtitleTrackId))}let n=c()??aF();n&&(t=oi(D,"$availableSubtitlesList$",i).find(e=>e.language===n)),o().actions.internal.setSubtitle(t)}})}var F=sA();!function(e,t){iJ(t,!0),rz(e,sC);let[i,n]=on(),r=or(t,"videoContainer",15),o=aS(),a=o.interfaceLanguage$,s=o.playerPhase,l=o.state.crashed$,u=o.ui.debugPanelVisible,d=nC(void 0);var c,f,p,h,v=s$();c=nz(v),f=e=>{var n,o,a,d,c=sS(),f=nq(c);!function(e,t){let i;iJ(t,!0),rz(e,sx);let[n,r]=on(),o=or(t,"videoContainer",15),{playerPhase:a}=aS();var s=sk();r4(nz(s),e=>o(e),()=>o()),iN(s),nX(()=>i=rQ(s,1,"video-wrapper s-7",null,i,{hidden:"video"!==oi(a,"$playerPhase",n)})),rT(e,s),iY(),r()}(f,{get videoContainer(){return r()},set videoContainer($$value){r($$value)}});var p=nB(f,2);{let e,r,u,c,f,h=nm(()=>"thumb"!==oi(s,"$playerPhase",i)||oi(l,"$crashed",i)&&t.autoplay);iJ(n={get hidden(){return rv(h)},get thumbUrl(){return t.thumbUrl},get startVideo(){return t.firstStart}},!0),rz(p,sw),r=or(n,"iconVisible",3,!0),u=iG("ui-config"),c=a4("tooltip_play"),f=e=>{e.stopPropagation(),n.startVideo?.(),n.onClick?.(e)},a=nz(o=sy()),d=e=>{let t;var i,n,r=sb();i=nB(nz(r),2),iJ(n={get size(){return"48"}},!0),t=nm(()=>{let e;return e=n.size,`width:${e}px;height:${e}px;`}),sp(i,{get width(){return"48"},get height(){return"48"},get fill(){return n.fill},get style(){return rv(t)},testId:"play-icon",get shadow(){return n.shadow},children:(e,t)=>{rT(e,s_())},$$slots:{default:!0}}),iY(),iN(r),nX(()=>rY(r,"aria-label",c)),rT(e,r)},rD(a,e=>{r()&&e(d)}),iN(o),nX(()=>{e=rQ(o,1,"container s-6",null,e,{hidden:n.hidden,bgCover:u.features.previewNoEmptySpace}),rH(o,`background-color: #222; background-image: url('${n.thumbUrl||""}')`)}),ry("click",o,f),ry("contextmenu",o,function(...e){n.onContextMenu?.apply(this,e)}),rT(p,o),iY({handleClick:f})}var h=nB(p,2),v=e=>{sg(e,{})};rD(h,e=>{oi(l,"$crashed",i)&&e(v)});var m=nB(h,2),g=e=>{var t,i,n,r,o,a,s,l,u,d,c,f,p,h,v,m,g,_,b,y,w,k,x,S,$,C,A,T,E,P,L,R,V,O,I,M,N,j,D,F,z,q,B;let W,Q,U,H,G,K,J,Y,Z,X,ee,et,ei,en;iJ({},!0),rz(e,sd),Q=(W=aS()).ui.debugPanelVisible,U=nC(nV(W.actions.internal.getDebugPanelData())),H=W.actions.internal.getVideoElement(),G=nC(0),K=nC(0),J=nC(0),Y=new aQ(60),Z=new aQ(60),X=new aQ(60),ee=nC(nV([])),et=nC(nV([])),ei=nC(nV([])),en=a4("aria_label_debug_panel"),rN(()=>{let e;oS.set(au,"true"),H&&(nT(K,H.getVideoPlaybackQuality().droppedVideoFrames,!0),nT(G,H.getVideoPlaybackQuality().totalVideoFrames,!0));let t=window.setInterval(()=>{nT(U,W.actions.internal.getDebugPanelData(),!0)},500);return H&&(e=window.setInterval(()=>{if(H){nT(K,H.getVideoPlaybackQuality().droppedVideoFrames,!0);let e=H.getVideoPlaybackQuality().totalVideoFrames;nT(J,e-rv(G)),nT(G,e,!0),Y.push(rv(J)),rv(U).speed&&Z.push(rv(U).speed),rv(U).bitrate&&X.push(rv(U).bitrate),nT(ee,Y.getValuesFromBottom(),!0),nT(et,Z.getValuesFromBottom(),!0),nT(ei,X.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(t),e&&clearInterval(e)}}),n=nB(i=nz(t=su()),2),r=nz(n),o=nB(nz(r),2),a=nz(o,!0),iN(o),iN(r),s=nB(r,2),l=e=>{var t=a5(),i=nB(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(U).id)),rT(e,t)},rD(s,e=>{rv(U).id&&e(l)}),u=nB(s,2),d=e=>{var t=a3(),i=nB(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(U).vsid)),rT(e,t)},rD(u,e=>{rv(U).vsid&&e(d)}),c=nB(u,2),f=e=>{var t=a9(),i=nB(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(U).provider)),rT(e,t)},rD(c,e=>{rv(U).provider&&e(f)}),p=nB(c,2),h=e=>{var t=a6(),i=nB(nz(t),2),n=nz(i);iN(i),iN(t),nX(()=>rP(n,`Video: ${(rv(U).videoCodec||"")??""} ${rv(U).hdr?"(HDR)":""}
|
|
51
48
|
&
|
|
52
|
-
Audio: ${(N(r).audioCodec||"")??""} ${N(r).audioLanguage?`(${N(r).audioLanguage})`:""}`)),q(B,te)};ke(f,B=>{(N(r).videoCodec||N(r).audioCodec)&&B(j)})}var F=X(f,2);{var P=B=>{var te=ef(),le=X(U(te),2),Te=U(le,!0);z(le),z(te),me(()=>Me(Te,N(r).viewport)),q(B,te)};ke(F,B=>{N(r).viewport&&B(P)})}var O=X(F,2);{var Q=B=>{var te=tf(),le=X(U(te),2),Te=U(le,!0);z(le),z(te),me(()=>Me(Te,N(r).videoSize)),q(B,te)};ke(O,B=>{N(r).videoSize&&B(Q)})}var J=X(O,2);{var de=B=>{var te=nf(),le=X(U(te),2),Te=U(le,!0);z(le),z(te),me(()=>Me(Te,N(r).cdn)),q(B,te)};ke(J,B=>{N(r).cdn&&B(de)})}var ee=X(J,2);{var pe=B=>{var te=rf(),le=X(U(te),2),Te=U(le);z(le),z(te),me(()=>Me(Te,`${N(r).volume??""} %`)),q(B,te)};ke(ee,B=>{N(r).volume&&B(pe)})}var K=X(ee,2);{var Ae=B=>{var te=of(),le=X(U(te),2),Te=U(le);z(le),z(te),me(T=>Me(Te,`${T??""} s`),[()=>N(r).position.toFixed(2)]),q(B,te)};ke(K,B=>{N(r).position&&B(Ae)})}var Z=X(K,2);{var Qe=B=>{var te=af(),le=X(U(te),2),Te=U(le);z(le),z(te),me(T=>Me(Te,`${T??""} s`),[()=>N(r).buffer.toFixed(2)]),q(B,te)};ke(Z,B=>{N(r).buffer&&B(Qe)})}var re=X(Z,2);{var he=B=>{var te=sf(),le=X(U(te),2),Te=U(le);z(le),z(te),me(T=>Me(Te,`${T??""} s`),[()=>N(r).nativeBuffer.toFixed(2)]),q(B,te)};ke(re,B=>{N(r).nativeBuffer&&B(he)})}var R=X(re,2);{var Ee=B=>{var te=lf(),le=X(U(te),2),Te=U(le);z(le),z(te),me(T=>Me(Te,`${T??""} s`),[()=>N(r).liveLatency.toFixed(2)]),q(B,te)};ke(R,B=>{N(r).liveLatency&&B(Ee)})}var ge=X(R,2);{var xe=B=>{var te=df(),le=X(U(te),2),Te=U(le,!0);z(le),z(te),me(T=>Me(Te,T),[()=>[{value:N(r).currentVideoSegmentLength,title:"Video:"},{value:N(r).currentAudioSegmentLength,title:"Audio:"}].filter(({value:T})=>T).map(({value:T,title:ie})=>`${ie} ${((T??0)/1e3).toFixed(2)} s`).join(" & ")]),q(B,te)};ke(ge,B=>{(N(r).currentVideoSegmentLength||N(r).currentAudioSegmentLength)&&B(xe)})}var Ye=X(ge,2),je=X(U(Ye),2),Pe=U(je);z(je),z(Ye);var w=X(Ye,2);{var D=B=>{var te=uf(),le=X(U(te),2);ir(le,{get values(){return N(m)}});var Te=X(le,2),T=U(Te);z(Te),z(te),me(ie=>Me(T,`${ie??""} Kbps`),[()=>N(r).speed.toFixed(2)]),q(B,te)};ke(w,B=>{N(r).speed&&B(D)})}var V=X(w,2);{var Y=B=>{var te=cf(),le=X(U(te),2);ir(le,{get values(){return N(v)}});var Te=X(le,2),T=U(Te);z(Te),z(te),me(ie=>Me(T,`${ie??""} Kbps`),[()=>N(r).bitrate.toFixed(2)]),q(B,te)};ke(V,B=>{N(r).bitrate&&B(Y)})}var oe=X(V,2),fe=X(U(oe),2);ir(fe,{get values(){return N(l)}});var Re=X(fe,2),ze=U(Re,!0);z(Re),z(oe),z(k),z(_),me(()=>{Je(_,"aria-label",y),Me(b,N(r).version),Me(Pe,`${N(c)??""} / ${N(a)??""} frames`),Me(ze,N(u))}),q(e,_),Se()}Ft(["click"]);var mf=se('<div><div class="video-container s-5"></div></div>'),vf={hash:"s-5",code:".video-container.s-5,.video-wrapper.s-5{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-5{background:var(--black)}.video-container.s-5,.video-wrapper.s-5{z-index:var(--video-container-z-index)}.video-container.s-5{transition:var(--rotate-transition-duration) ease all}"};function Ma(e,t){we(t,!0),De(e,vf);let[i,n]=ti(),r=()=>et(a,"$playerPhase",i),o=tt(t,"videoContainer",15),{playerPhase:a}=$t();var c=mf();let u;var g=U(c);Xt(g,p=>o(p),()=>o()),z(c),me(p=>u=ci(c,1,"video-wrapper s-5",null,u,p),[()=>({hidden:r()!=="video"})]),q(e,c),Se(),n()}var fi=e=>`width:${e}rem;height:${e}rem;`;var gf=(e,t)=>{e.preventDefault(),e.stopPropagation(),t.onclick?.()},hf=se("<button><!></button>"),_f={hash:"s-c",code:".button.s-c{align-items:center;background:hsla(0,0%,100%,.15);border:0;border-radius:50%;color:#fff;display:inline-block;font-size:inherit;justify-content:center;padding:0}.button.s-c:focus{background:#fff;color:#000;outline:0}.button.s-c:hover:not(:focus){background-color:#76787a}"};function En(e,t){we(t,!0),De(e,_f);let i=tt(t,"ref",15),n=$e(()=>fi(Number(t.size||"14")*2));var r=hf();r.__click=[gf,t];var o=U(r);yn(o,()=>t.children),z(r),Xt(r,a=>i(a),()=>i()),me(()=>{ci(r,1,Ii(["button",t.class]),"s-c"),rt(r,N(n)),Je(r,"data-row",t.row),Je(r,"data-col",t.col),Je(r,"data-layer",t.layer)}),q(e,r),Se()}Ft(["click"]);import{SeekAction as $d}from"@vkontakte/videoplayer-statistics";var yf=se("<div> </div>"),bf={hash:"s-h",code:".video-time.s-h{color:#fff;line-height:125%}"};function Zr(e,t){De(e,bf);let i=10,n=$e(()=>t.current+(t.duration?` / ${t.duration}`:"")),r=$e(()=>`font-size: ${t.size||i}rem`);var o=yf(),a=U(o,!0);z(o),me(()=>{rt(o,N(r)),ci(o,1,Ii(["video-time",t.class]),"s-h"),Me(a,N(n))}),q(e,o)}var Jr=e=>{if(e<0)return"";let t=Math.round(e),i=Math.floor(t/3600),n=t%3600,r=Math.floor(n/60),o=n%60;return String(i).padStart(2,"0")+":"+String(r).padStart(2,"0")+":"+String(o).padStart(2,"0")};var xf=(e,t,i,n,r)=>{e.preventDefault(),e.stopPropagation(),t(i()*e.offsetX/r().offsetWidth,$d.SLIDER)},Af=se('<div class="pointer-time-wrapper s-e"><!></div>'),Ef=se('<div><div class="time-wrapper s-e"><!></div> <div class="current-progress s-e"></div> <div class="pointer s-e"><!></div></div>'),wf={hash:"s-e",code:".progress-bar.s-e{background:hsla(0,0%,100%,.15);border-radius:2rem;font-size:inherit;height:4rem;position:relative;width:100%}.current-progress.s-e{background-color:#fff;border-radius:inherit;height:100%;left:0;position:absolute;top:0}.pointer.s-e{background:#fff;border-radius:50%;display:none;height:7rem;position:absolute;top:50%;transform:translate(-50%,-50%);width:7rem}.time-wrapper.s-e{position:absolute;right:0;top:0;transform:translateY(calc(-100% - 20rem))}.pointer-time-wrapper.s-e{bottom:0;left:50%;position:absolute;transform:translate(-50%,calc(100% + 5rem))}.progress-bar.s-e:focus{outline:0}.progress-bar.s-e:focus .pointer:where(.s-e){display:block}.button.s-e:hover:not(:focus){background-color:#76787a}"};function Ta(e,t){we(t,!0),De(e,wf);let[i,n]=ti(),r=()=>et(v,"$duration$",i),o=()=>et(I,"$positionPercent$",i),a=()=>et(m,"$positionExact$",i),c=0,u=1,g=10,{actions:{internal:{seekTime:p,pause:s,play:l}},state:{positionExact$:m,duration$:v}}=$t(),y=g/r(),_=tt(t,"ref",15),C=Ce(Mt(NaN)),k=$e(()=>isFinite(N(C))),I=Xe([m,v],([de,ee])=>ee>0?de/ee:0),h=()=>{N(k)||(ue(C,o(),!0),s())},b=de=>{switch(de.key){case"ArrowLeft":de.stopPropagation(),h(),ue(C,Math.max(c,N(C)-y),!0);break;case"ArrowRight":de.stopPropagation(),h(),ue(C,Math.min(u,N(C)+y),!0);break;case"Enter":de.preventDefault(),p(ye(v)*N(C),$d.SLIDER),l(),ue(C,NaN,!0);break;case"Escape":N(k)&&(de.stopPropagation(),l(),ue(C,NaN,!0));break}},x=$e(()=>Number(N(k)?N(C):o())),E=$e(()=>`width: ${N(x)*100}%`),$=$e(()=>`left: ${N(x)*100}%`),L=$e(()=>Jr(a())),A=$e(()=>Jr(r())),M=$e(()=>N(k)?Jr(N(C)*r()):0);var f=Ef();Je(f,"tabindex",0),f.__keydown=b,f.__click=[xf,p,r,v,_];var j=U(f),F=U(j);Zr(F,{get size(){return"10"},get current(){return N(L)},get duration(){return N(A)}}),z(j);var P=X(j,2),O=X(P,2),Q=U(O);{var J=de=>{var ee=Af(),pe=U(ee);Zr(pe,{get size(){return"8"},get current(){return N(M)}}),z(ee),q(de,ee)};ke(Q,de=>{N(M)&&de(J)})}z(O),z(f),Xt(f,de=>_(de),()=>_()),me(()=>{ci(f,1,Ii(["progress-bar",t.class]),"s-e"),Je(f,"data-row",t.row),Je(f,"data-col",t.col),Je(f,"data-layer",t.layer),rt(P,N(E)),rt(O,N($))}),q(e,f),Se(),n()}Ft(["keydown","click"]);var Sf=Dt('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function Ia(e,t){we(t,!0);let i=$e(()=>fi(t.size));ii(e,{width:"48",height:"48",fill:"currentColor",get style(){return N(i)},testId:"play-icon",get shadow(){return t.shadow},children:(n,r)=>{var o=Sf();q(n,o)},$$slots:{default:!0}}),Se()}import{PlaybackState as If}from"@vkontakte/videoplayer-core";var Mf=Dt('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function ka(e,t){we(t,!0);let i=$e(()=>fi(t.size));ii(e,{width:"48",height:"48",fill:"currentColor",get style(){return N(i)},testId:"pause-icon",get shadow(){return t.shadow},children:(n,r)=>{var o=Mf();q(n,o)},$$slots:{default:!0}}),Se()}var Tf=Dt('<path d="M19.605 0.0611157C20.2463 0.163726 20.8529 0.409114 21.3976 0.844894C22.29 1.55876 22.7149 2.45864 23.0434 3.77239C23.1274 4.10872 23.2729 4.50079 23.4548 4.88131C23.8719 5.05864 24.28 5.25575 24.6777 5.47185C25.0704 5.37484 25.4474 5.24601 25.7485 5.10584C27.8669 4.11966 29.644 4.17147 31.0993 5.74115C31.2224 5.87392 31.2959 5.96187 31.4558 6.15934L32.3998 7.32506C32.6537 7.63857 32.7621 7.78141 32.9223 8.04795C33.96 9.7751 33.5554 11.3836 32.2437 13.1266C32.026 13.4159 31.8038 13.7945 31.6179 14.1928C31.7352 14.6166 31.8328 15.0463 31.9105 15.4809C32.2446 15.7486 32.5997 15.9831 32.9134 16.1432C34.1196 16.7587 34.9009 17.3752 35.3957 18.4053C35.6978 19.0341 35.8004 19.6804 35.7561 20.3283C35.7327 20.6708 35.6957 20.8617 35.597 21.2892L35.2596 22.7507C35.1609 23.1782 35.1105 23.366 34.9814 23.6841C34.7371 24.2859 34.3616 24.8218 33.8144 25.2545C32.9181 25.9634 31.9457 26.175 30.5917 26.1995C30.2492 26.2057 29.84 26.2581 29.4328 26.3478C29.1681 26.7135 28.8862 27.0665 28.5882 27.4055C28.5933 27.8168 28.6342 28.221 28.7042 28.5516C28.9849 29.8764 28.9975 30.8715 28.5084 31.9043C28.2098 32.5347 27.7721 33.0212 27.2407 33.3946C26.9598 33.5919 26.7882 33.6833 26.3939 33.8756L25.0457 34.5332C24.6514 34.7255 24.4737 34.8045 24.1452 34.9043C23.5238 35.0933 22.871 35.1386 22.1904 34.9858C21.0754 34.7353 20.299 34.1128 19.4279 33.076C19.1976 32.8019 18.883 32.5036 18.5409 32.235C18.3222 32.245 18.1028 32.25 17.8829 32.25C17.6631 32.25 17.4437 32.245 17.225 32.235C16.8829 32.5036 16.5682 32.8019 16.338 33.076C15.4669 34.1128 14.6905 34.7353 13.5755 34.9858C12.8949 35.1386 12.242 35.0933 11.6206 34.9043C11.2922 34.8045 11.1145 34.7255 10.7202 34.5332L9.37201 33.8756C9.25348 33.8179 9.17995 33.7815 9.09407 33.7368C7.12674 32.7123 6.55001 30.9662 7.06165 28.5516C7.1317 28.221 7.17258 27.8168 7.17769 27.4055C6.87964 27.0665 6.59775 26.7135 6.33304 26.3478C5.92591 26.2581 5.51663 26.2057 5.17413 26.1995C3.82017 26.175 2.84776 25.9634 1.95146 25.2545C1.40431 24.8218 1.02875 24.2859 0.784502 23.6841C0.655401 23.366 0.604985 23.1782 0.506296 22.7507L0.168869 21.2892C0.0643852 20.8366 0.0258935 20.6348 0.00607361 20.2681C-0.031082 19.5806 0.100474 18.8976 0.449422 18.2496C0.957844 17.3055 1.71039 16.726 2.85245 16.1432C3.16613 15.9831 3.52129 15.7486 3.85542 15.4809C3.93305 15.0463 4.03072 14.6166 4.14799 14.1928C3.96209 13.7945 3.73987 13.4159 3.52222 13.1266C2.21049 11.3836 1.80583 9.7751 2.84361 8.04795C3.00377 7.78141 3.11222 7.63857 3.36609 7.32506L4.31007 6.15934C4.46998 5.96187 4.54348 5.87392 4.66657 5.74115C6.12187 4.17147 7.89898 4.11966 10.0173 5.10584C10.3184 5.24601 10.6955 5.37484 11.0881 5.47185C11.4859 5.25575 11.894 5.05864 12.3111 4.88131C12.4929 4.50079 12.6384 4.10872 12.7225 3.77239C13.0509 2.45864 13.4759 1.55876 14.3682 0.844894C14.913 0.409114 15.5196 0.163726 16.1609 0.0611157C16.4321 0.0177263 16.6107 0.00464598 16.8959 0.00114942L18.6329 0C19.0716 0 19.266 0.00687897 19.605 0.0611157ZM18.7615 3.00031L17.1329 3C16.3829 3 16.0079 3 15.6329 4.5C15.4248 5.33261 14.9856 6.39629 14.3794 7.30626C13.4155 7.62186 12.509 8.06414 11.6795 8.61343C10.6044 8.50749 9.51939 8.18318 8.75121 7.82556C7.3495 7.17301 7.1135 7.46444 6.64151 8.0473L5.69753 9.21302C5.22554 9.79588 4.98955 10.0873 5.91927 11.3227C6.44256 12.0181 7.00097 13.0476 7.3248 14.1068C6.9932 15.0058 6.77314 15.9587 6.68139 16.9489C5.92897 17.7503 4.98495 18.423 4.21611 18.8153C2.83891 19.5182 2.92327 19.8835 3.09198 20.6143L3.42941 22.0759C3.59812 22.8067 3.68248 23.172 5.22839 23.2C6.08312 23.2155 7.21283 23.4028 8.23271 23.7856C8.75071 24.6478 9.38097 25.4348 10.1033 26.1265C10.2448 27.2028 10.173 28.3403 9.99649 29.1735C9.67598 30.6861 10.013 30.8505 10.6871 31.1792L12.0353 31.8368C12.7094 32.1656 13.0465 32.33 14.0411 31.1462C14.5988 30.4824 15.4718 29.71 16.4268 29.1566C16.9035 29.2182 17.3895 29.25 17.8829 29.25C18.3764 29.25 18.8624 29.2182 19.3391 29.1566C20.2941 29.71 21.1671 30.4824 21.7248 31.1462C22.7194 32.33 23.0565 32.1656 23.7306 31.8368L25.0788 31.1792C25.7528 30.8505 26.0899 30.6861 25.7694 29.1735C25.5928 28.3403 25.5211 27.2028 25.6626 26.1265C26.3849 25.4348 27.0152 24.6478 27.5332 23.7856C28.553 23.4028 29.6828 23.2155 30.5375 23.2C32.0834 23.172 32.1678 22.8067 32.3365 22.0759L32.6739 20.6143C32.8426 19.8835 32.927 19.5182 31.5498 18.8153C30.7809 18.423 29.8369 17.7503 29.0845 16.9489C28.9927 15.9587 28.7727 15.0058 28.4411 14.1068C28.7649 13.0476 29.3233 12.0181 29.8466 11.3227C30.7763 10.0873 30.5403 9.79588 30.0683 9.21302L29.1244 8.0473C28.6524 7.46444 28.4164 7.17301 27.0147 7.82556C26.2465 8.18318 25.1615 8.50749 24.0864 8.61343C23.2569 8.06414 22.3504 7.62186 21.3865 7.30626C20.7803 6.39629 20.3411 5.33261 20.1329 4.5C19.78 3.08824 19.4271 3.00519 18.7615 3.00031ZM17.8829 11.25C21.6109 11.25 24.6329 14.2721 24.6329 18C24.6329 21.7279 21.6109 24.75 17.8829 24.75C14.155 24.75 11.1329 21.7279 11.1329 18C11.1329 14.2721 14.155 11.25 17.8829 11.25ZM17.8829 14.25C15.8119 14.25 14.1329 15.9289 14.1329 18C14.1329 20.0711 15.8119 21.75 17.8829 21.75C19.954 21.75 21.6329 20.0711 21.6329 18C21.6329 15.9289 19.954 14.25 17.8829 14.25Z"></path>');function Na(e,t){we(t,!0);let i=$e(()=>fi(t.size));ii(e,{width:"36",height:"36",viewBox:"0 0 36 36",fill:"currentColor",get style(){return N(i)},testId:"settings-icon",get shadow(){return t.shadow},children:(n,r)=>{var o=Tf();q(n,o)},$$slots:{default:!0}}),Se()}var kf=se('<div class="wrapper s-4"><div class="container s-4"><div class="top-buttons"></div> <div class="filler s-4"></div> <div class="video-title s-4"> </div> <!> <div class="bottom-buttons s-4"><div class="play-pause-button-container"><!></div> <div class="settings-button-container s-4"><!></div></div></div></div>'),Nf={hash:"s-4",code:".wrapper.s-4{background-image:linear-gradient(1turn,transparent,rgba(0,0,0,.016) 9.22%,rgba(0,0,0,.055) 18.76%,rgba(0,0,0,.118) 28.48%,rgba(0,0,0,.2) 38.19%,rgba(0,0,0,.29) 47.75%,rgba(0,0,0,.392) 56.99%,rgba(0,0,0,.502) 65.75%,rgba(0,0,0,.608) 73.87%,rgba(0,0,0,.71) 81.18%,rgba(0,0,0,.8) 87.52%,rgba(0,0,0,.882) 92.74%,rgba(0,0,0,.945) 96.66%,rgba(0,0,0,.984) 99.14%,#000),linear-gradient(180deg,transparent 0,rgba(0,0,0,.016) 9.22%,rgba(0,0,0,.055) 18.76%,rgba(0,0,0,.118) 28.48%,rgba(0,0,0,.2) 38.19%,rgba(0,0,0,.29) 47.75%,rgba(0,0,0,.392) 56.99%,rgba(0,0,0,.502) 65.75%,rgba(0,0,0,.608) 73.87%,rgba(0,0,0,.71) 81.18%,rgba(0,0,0,.8) 87.52%,rgba(0,0,0,.882) 92.74%,rgba(0,0,0,.945) 96.66%,rgba(0,0,0,.984) 99.14%,#000);bottom:0;left:0;position:absolute;right:0;top:0}.container.s-4{box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:10rem 48rem 0}.filler.s-4{flex-grow:1}.video-title.s-4{color:#fff;font-size:14rem;line-height:18rem;margin-bottom:20rem;max-width:320rem}.bottom-buttons.s-4{align-items:center;display:flex;justify-content:center;margin:20rem 0;position:relative;width:100%}.settings-button-container.s-4{position:absolute;right:0;top:50%;transform:translateY(-50%)}"};function Da(e,t){we(t,!0),De(e,Nf);let[i,n]=ti(),r=()=>et(c,"$playbackState$",i),{actions:{internal:{togglePlay:o,setSettingsVisibility:a}},state:{playbackState$:c},video:{title:u}}=$t(),g=$e(()=>r()===If.PLAYING),p=Ce(void 0);Ut(()=>{N(p)?.focus()});let s=()=>{a(!0)};var l=kf(),m=U(l),v=X(U(m),4),y=U(v,!0);z(v);var _=X(v,2);Ta(_,{row:2,col:1,layer:"controls"});var C=X(_,2),k=U(C),I=U(k);En(I,{get size(){return"20"},get onclick(){return o},row:3,col:1,layer:"controls",get ref(){return N(p)},set ref(x){ue(p,x,!0)},children:(x,E)=>{var $=tn(),L=qt($);{var A=f=>{ka(f,{get size(){return"20"}})},M=f=>{Ia(f,{get size(){return"20"}})};ke(L,f=>{N(g)?f(A):f(M,!1)})}q(x,$)},$$slots:{default:!0}}),z(k);var h=X(k,2),b=U(h);En(b,{get size(){return"14"},onclick:s,row:3,col:2,layer:"controls",children:(x,E)=>{Na(x,{get size(){return"14"}})},$$slots:{default:!0}}),z(h),z(C),z(m),z(l),me(()=>Me(y,u)),q(e,l),Se(),n()}var Df=(e,t,i)=>{switch(e.key){case"ArrowUp":ue(t,Math.max(N(t)-1,0),!0),e.stopPropagation();break;case"ArrowDown":ue(t,Math.min(N(t)+1,i.items.length-1),!0),e.stopPropagation();break;case"Enter":if(e.stopPropagation(),i.items[N(t)].disabled)return;i.onAction(N(t));break}},Cf=se('<button class="s-f"><!></button>'),$f=se('<div class="list s-f"></div>'),Lf={hash:"s-f",code:".list.s-f{display:flex;flex-direction:column;gap:4rem}.list.s-f:focus{outline:0}.list.s-f button:where(.s-f){background:none;border:none;color:inherit}"};function Ca(e,t){we(t,!0),De(e,Lf);let i=tt(t,"ref",15),n=Ce(0);bi(()=>{ue(n,t.items.findIndex(a=>a.isSelected),!0)});let r=a=>{ue(n,a,!0),!t.items[a].disabled&&t.onAction(a)};var o=$f();Je(o,"tabindex",0),o.__keydown=[Df,n,t],Yo(o,23,()=>t.items,a=>a.id,(a,c,u)=>{var g=Cf();g.__click=()=>r(N(u));var p=U(g);Wo(p,t,"default",{get item(){return N(c)},get focused(){return N(u)===N(n)}},null),z(g),me(()=>g.disabled=N(c).disabled),q(a,g)}),z(o),Xt(o,a=>i(a),()=>i()),me(()=>{Je(o,"data-row",t.row),Je(o,"data-col",t.col),Je(o,"data-layer",t.layer)}),q(e,o),Se()}Ft(["keydown","click"]);var Of=Dt('<path d="M16.5 24.8787L8.56066 16.9393C7.97487 16.3536 7.02513 16.3536 6.43934 16.9393C5.85355 17.5251 5.85355 18.4749 6.43934 19.0607L15.4393 28.0607C16.0251 28.6464 16.9749 28.6464 17.5607 28.0607L35.5607 10.0607C36.1464 9.47487 36.1464 8.52513 35.5607 7.93934C34.9749 7.35355 34.0251 7.35355 33.4393 7.93934L16.5 24.8787Z"></path>');function $a(e,t){we(t,!0);let i=$e(()=>fi(t.size));ii(e,{width:"39",height:"36",viewBox:"0 0 39 36",fill:"currentColor",get style(){return N(i)},testId:"back-icon",get shadow(){return t.shadow},children:(n,r)=>{var o=Of();q(n,o)},$$slots:{default:!0}}),Se()}var Pf=se("<div> <!></div>"),Rf={hash:"s-g",code:".quality-list-item.s-g{align-items:center;border-radius:6rem;box-sizing:border-box;color:var(--vkui--color_text_subhead);display:flex;font-size:10rem;font-weight:500;justify-content:space-between;line-height:12rem;padding:6rem;width:100%}.quality-list-item.s-g:hover{background-color:#76787a;color:#e1e3e6}.quality-list-item.selected.s-g{background:var(--vkui--color_background_contrast_secondary_alpha);color:var(--vkui--color_text_subhead)}:focus .quality-list-item.focused.s-g{background-color:#fff;color:#000}.quality-list-item.disabled.s-g{opacity:.5}"};function La(e,t){we(t,!0),De(e,Rf);var i=Pf(),n=U(i),r=X(n);{var o=a=>{$a(a,{get size(){return"7"}})};ke(r,a=>{t.data.isSelected&&a(o)})}z(i),me(()=>{ci(i,1,Ii(["quality-list-item",t.data.isSelected?"selected":"",t.data.isFocused?"focused":"",t.data.disabled&&"disabled"]),"s-g"),Me(n,`${t.data.text??""} `)}),q(e,i),Se()}var Vf=Dt('<path d="M9.43934 9.43934C10.0251 8.85355 10.9749 8.85355 11.5607 9.43934L21 18.8775L30.4393 9.43934C30.9801 8.89861 31.8309 8.85702 32.4193 9.31456L32.5607 9.43934C33.1464 10.0251 33.1464 10.9749 32.5607 11.5607L23.1225 21L32.5607 30.4393C33.1014 30.9801 33.143 31.8309 32.6854 32.4193L32.5607 32.5607C31.9749 33.1464 31.0251 33.1464 30.4393 32.5607L21 23.1225L11.5607 32.5607C11.0199 33.1014 10.1691 33.143 9.58065 32.6854L9.43934 32.5607C8.85355 31.9749 8.85355 31.0251 9.43934 30.4393L18.8775 21L9.43934 11.5607C8.89861 11.0199 8.85702 10.1691 9.31456 9.58065L9.43934 9.43934Z"></path>');function Oa(e,t){we(t,!0);let i=$e(()=>fi(t.size));ii(e,{width:"42",height:"42",viewBox:"0 0 42 42",fill:"currentColor",get style(){return N(i)},testId:"back-icon",get shadow(){return t.shadow},children:(n,r)=>{var o=Vf();q(n,o)},$$slots:{default:!0}}),Se()}import{VideoQuality as jf}from"@vkontakte/videoplayer-shared";var zf=se('<div class="settings-layer s-9"><div class="settings-menu s-9"><div class="settings-title s-9">Качество</div> <div class="menu-list"><div class="close-button-container s-9"><!></div> <!></div></div></div>'),Uf={hash:"s-9",code:".settings-layer.s-9{bottom:0;left:0}.settings-layer.s-9,.settings-menu.s-9{position:absolute;right:0;top:0}.settings-menu.s-9{background:#000;box-sizing:border-box;height:100%;padding:10rem;width:163rem}.settings-title.s-9{color:#fff;font-size:12rem;line-height:116%;margin-bottom:12rem;margin-left:8rem;margin-top:5rem}.close-button-container.s-9{left:0;position:absolute;top:15rem;transform:translateX(calc(-100% - 7rem))}"};function Pa(e,t){we(t,!0),De(e,Uf);let[i,n]=ti(),r=()=>et(u,"$availableQualities$",i),o=()=>et(g,"$currentQuality$",i),{actions:{internal:{setSettingsVisibility:a,setQuality:c}},state:{availableQualities$:u,currentQuality$:g},deviceCapabilities:p}=$t(),s=Ce(void 0),l=$e(()=>r().map(b=>{let{value:x,displayValue:E,selected:$}=b,L={id:x,text:E,isSelected:$,disabled:x!=="auto"&&x!==jf.INVARIANT&&!p.isCodecSupported(x)};return $&&x==="auto"&&(L.text=`${E} (${o()})`),L}));Ut(()=>{N(s)?.focus()});let m=()=>{a(!1)},v=b=>{let x=N(l)[b];c(x.id)};var y=zf(),_=U(y),C=X(U(_),2),k=U(C),I=U(k);En(I,{get size(){return"14"},onclick:m,row:1,col:1,layer:"settings",children:(b,x)=>{Oa(b,{get size(){return"14"}})},$$slots:{default:!0}}),z(k);var h=X(k,2);Ca(h,{row:1,col:2,layer:"settings",get items(){return N(l)},onAction:v,get ref(){return N(s)},set ref(b){ue(s,b,!0)},children:cr,$$slots:{default:(b,x)=>{let E=$e(()=>x.item),$=$e(()=>x.focused),L=$e(()=>({...N(E),isFocused:N($)}));La(b,{get data(){return N(L)}})}}}),z(C),z(_),z(y),q(e,y),Se(),n()}var Ff=se('<div class="container s-a"><div class="dot s-a"></div> <div class="dot s-a"></div> <div class="dot s-a"></div></div>'),Hf={hash:"s-a",code:".container.s-a{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-a:first-child{animation-delay:0s}.dot.s-a:nth-child(2){animation-delay:.18s}.dot.s-a:nth-child(3){animation-delay:.36s}@keyframes s-a-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-a{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-a-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-a+.dot:where(.s-a){margin-left:4px}"};function nr(e,t){De(e,Hf);let i=tt(t,"style",3,"");var n=Ff();me(()=>rt(n,i())),q(e,n)}var Bf=se('<div class="container s-6"><!></div>'),Qf={hash:"s-6",code:".container.s-6{bottom:0;color:green;font-size:33px;left:0;position:absolute;right:0;top:0}"};function Ra(e){De(e,Qf);var t=Bf(),i=U(t);nr(i,{}),z(t),q(e,t)}import{getWindow as Va}from"@vkontakte/videoplayer-shared";var Yf=se('<div class="timer__cell cell s-b"><span class="cell__value s-b"> </span> <span class="cell__unit s-b"> </span></div> <span class="timer__points s-b"> </span>',1),Wf=se('<div class="timer__cell cell s-b"><span class="cell__value s-b"> </span> <span class="cell__unit s-b"> </span></div> <span class="timer__points s-b"> </span>',1),Gf=se('<div class="timer__cell cell s-b"><span class="cell__value s-b"> </span> <span class="cell__unit s-b"> </span></div> <span class="timer__points s-b"> </span>',1),qf=se('<div class="timer__cell cell s-b"><span class="cell__value s-b"> </span> <span class="cell__unit s-b"> </span></div>'),Kf=se('<div class="timer__container s-b"><!> <!> <!> <!></div>'),Zf={hash:"s-b",code:".timer__container.s-b{align-items:flex-start;display:flex;justify-content:center}.cell.s-b{align-items:center;display:flex;flex-direction:column}.cell__value.s-b{font-size:16em;font-weight:600;line-height:1.2}.cell__unit.s-b{font-size:4.7em;font-weight:400;line-height:1.2}.timer__points.s-b{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}"};function ja(e,t){we(t,!0),De(e,Zf);let i=Ce(""),n=Ce(""),r=Ce(""),o=Ce(""),a,c=32,u=c/2,g=E=>String(E).padStart(2,"0"),p=E=>Math.max(E.length,1),s=E=>`${(t.isSmallSize?u:c)*p(E)}px`,l=E=>{let $=Math.floor(E/86400);$&&(E-=$*86400,ue(i,g($),!0));let L=Math.floor(E/3600);ue(n,g(L),!0);let A=Math.floor(E/60)%60;ue(r,g(A),!0);let M=E%60;ue(o,g(M),!0)},m=()=>{let E=Math.floor(Date.now()/1e3),$=t.startTime-E;l($),$>=1?a=Va().requestAnimationFrame(m):t.onTimerOver()};bi(()=>{a=Va().requestAnimationFrame(m)}),Ul(()=>{Va().cancelAnimationFrame(a)});var v=Kf(),y=U(v);{var _=E=>{var $=Yf(),L=qt($);let A;var M=U(L),f=U(M,!0);z(M);var j=X(M,2),F=U(j,!0);z(j),z(L);var P=X(L,2),O=U(P,!0);z(P),me((Q,J,de)=>{A=rt(L,"",A,{width:Q}),Me(f,N(i)),Me(F,J),Me(O,de)},[()=>s(N(i)),()=>Lt("waiting_live_day_value"),()=>Lt("waiting_live_colon")]),q(E,$)};ke(y,E=>{N(i)&&E(_)})}var C=X(y,2);{var k=E=>{var $=Wf(),L=qt($);let A;var M=U(L),f=U(M,!0);z(M);var j=X(M,2),F=U(j,!0);z(j),z(L);var P=X(L,2),O=U(P,!0);z(P),me((Q,J,de)=>{A=rt(L,"",A,{width:Q}),Me(f,N(n)),Me(F,J),Me(O,de)},[()=>s(N(n)),()=>Lt("waiting_live_hour_value"),()=>Lt("waiting_live_colon")]),q(E,$)};ke(C,E=>{N(n)&&E(k)})}var I=X(C,2);{var h=E=>{var $=Gf(),L=qt($);let A;var M=U(L),f=U(M,!0);z(M);var j=X(M,2),F=U(j,!0);z(j),z(L);var P=X(L,2),O=U(P,!0);z(P),me((Q,J,de)=>{A=rt(L,"",A,{width:Q}),Me(f,N(r)),Me(F,J),Me(O,de)},[()=>s(N(r)),()=>Lt("waiting_live_minute_value"),()=>Lt("waiting_live_colon")]),q(E,$)};ke(I,E=>{N(r)&&E(h)})}var b=X(I,2);{var x=E=>{var $=qf();let L;var A=U($),M=U(A,!0);z(A);var f=X(A,2),j=U(f,!0);z(f),z($),me((F,P)=>{L=rt($,"",L,{width:F}),Me(M,N(o)),Me(j,P)},[()=>s(N(o)),()=>Lt("waiting_live_second_value")]),q(E,$)};ke(b,E=>{N(o)&&E(x)})}z(v),q(e,v),Se()}var Jf=se('<div class="waiting s-8"><span class="waiting__title medium s-8"> </span></div>'),Xf=se('<div class="upcoming-timer timer s-8"><span class="timer__title medium s-8"> </span> <!></div>'),em=se('<div class="waiting-container s-8"><!></div>'),tm={hash:"s-8",code:'.waiting-container.s-8{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;color:#fff;white-space:nowrap}.waiting-container.s-8,.waiting-container.s-8:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-8:before{backdrop-filter:blur(5em);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-8{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:2}.waiting__title.s-8{font-size:7em;font-weight:600;line-height:1.2}.upcoming-timer.s-8{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-8{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-8{display:inline-block;font-size:6.6666em;font-weight:600;line-height:1.2;margin-bottom:.7em;vertical-align:middle}.medium.s-8{font-size:6em}'};function za(e,t){we(t,!0),De(e,tm);let{video:{thumbUrl:i,live:n}}=$t(),r=n?.startTime||0,o=$e(()=>r<Math.floor(Date.now()/1e3));var a=em(),c=U(a);{var u=p=>{var s=Jf(),l=U(s),m=U(l,!0);z(l),z(s),me(v=>Me(m,v),[()=>Lt("waiting_live_upcoming_title")]),q(p,s)},g=p=>{var s=Xf(),l=U(s),m=U(l,!0);z(l);var v=X(l,2);let y=$e(()=>r||0);ja(v,{get startTime(){return N(y)},onTimerOver:()=>ue(o,!0)}),z(s),me(_=>Me(m,_),[()=>Lt("waiting_live_timer_title")]),q(p,s)};ke(c,p=>{N(o)?p(u):p(g,!1)})}z(a),me(()=>rt(a,`background-image: url(${i})`)),q(e,a),Se()}var im=se('<div class="waiting-container s-7"><div class="waiting-caption s-7"><!> <p class="waiting-title s-7"> </p></div></div>'),nm={hash:"s-7",code:'.waiting-container.s-7{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-7,.waiting-container.s-7:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-7:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-7{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-7{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Xr(e,t){we(t,!0),De(e,nm);let i=tt(t,"thumbUrl",3,""),n={recover:Lt("waiting_live_recover_title"),record:Lt("waiting_record_title")},r=$e(()=>n[t.kind]||"");var o=im();o.__contextmenu=function(...p){t.onContextMenu?.apply(this,p)},o.__click=function(...p){t.onClick?.apply(this,p)};var a=U(o),c=U(a);nr(c,{style:"position: static; transform: translate(0, 0)"});var u=X(c,2),g=U(u,!0);z(u),z(a),z(o),me(()=>{rt(o,`background-image: url('${i()}')`),Me(g,N(r))}),q(e,o),Se()}Ft(["contextmenu","click"]);var rm=se("<!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function Ua(e,t){we(t,!0);let[i,n]=ti(),r=()=>et(m,"$language$",i),o=()=>et(C,"$isShowLoader",i),a=()=>et(_,"$controlsVisible",i),c=()=>et(k,"$settingsVisible",i),u=()=>et(I,"$playerPhase",i),g=()=>et(v,"$crashed",i),p=()=>et(y,"$debugPanelVisible",i),s=tt(t,"videoContainer",15),l=$t(),m=l.interfaceLanguage$,v=l.state.crashed$,y=l.ui.debugPanelVisible,{ui:{controlsVisible:_,isShowLoader:C,settingsVisible:k},playerPhase:I,video:{thumbUrl:h}}=l;var b=tn(),x=qt(b);Ho(x,r,E=>{var $=rm(),L=qt($);Ma(L,{get videoContainer(){return s()},set videoContainer(re){s(re)}});var A=X(L,2);{var M=re=>{Ra(re,{})};ke(A,re=>{o()&&re(M)})}var f=X(A,2);{var j=re=>{Da(re,{})};ke(f,re=>{a()&&re(j)})}var F=X(f,2);{var P=re=>{Pa(re,{})};ke(F,re=>{c()&&re(P)})}var O=X(F,2);{var Q=re=>{za(re,{})};ke(O,re=>{u()==="LiveWaitingStart"&&re(Q)})}var J=X(O,2);{var de=re=>{Xr(re,{kind:"recover",get thumbUrl(){return h}})};ke(J,re=>{u()==="LiveWaitingRecover"&&re(de)})}var ee=X(J,2);{var pe=re=>{Xr(re,{kind:"record",get thumbUrl(){return h}})};ke(ee,re=>{u()==="LiveWaitingRecord"&&re(pe)})}var K=X(ee,2);{var Ae=re=>{Zn(re,{})};ke(K,re=>{g()&&re(Ae)})}var Z=X(K,2);{var Qe=re=>{Sa(re,{})};ke(Z,re=>{p()&&re(Qe)})}q(E,$)}),q(e,b),Se(),n()}import{getWindow as Fa}from"@vkontakte/videoplayer-shared";var eo=class{constructor(t){this.onKeyDown=t=>{let i=Fa().document.activeElement;if(!i)return console.warn("no active element"),!1;let{row:n,col:r,layer:o}=i.dataset;if(!n||!r||!o)return console.warn("no col or row or layer"),!1;let a=!1;switch(t.key){case"ArrowDown":a=this.moveFocusVertical(Number(n)+1,r,o);break;case"ArrowUp":a=this.moveFocusVertical(Number(n)-1,r,o);break;case"ArrowLeft":a=this.moveFocusHorizontal(Number(r)-1,n,o);break;case"ArrowRight":a=this.moveFocusHorizontal(Number(r)+1,n,o);break}return a&&(t.preventDefault(),t.stopPropagation()),a};this.root=t}destroy(){this.root.removeEventListener("keydown",this.onKeyDown)}moveFocusVertical(t,i,n){let r=Fa().document.querySelectorAll(`[data-row="${t}"][data-layer="${n}"]`);if(r.length===0)return!1;let o;for(let a=0;a<r.length;a++){let c=r[a];if(c.dataset.col===i)return c.focus(),!0;c.dataset.col==="1"&&(o=c)}return o?o.focus():r[0].focus(),!0}moveFocusHorizontal(t,i,n){let r=Fa().document.querySelectorAll(`[data-col="${t}"][data-layer="${n}"]`);if(r.length===0)return!1;let o;for(let a=0;a<r.length;a++){let c=r[a];if(c.dataset.row===i)return c.focus(),!0;c.dataset.row==="1"&&(o=c)}return o?o.focus():r[0].focus(),!0}};var sm=(e,t,i,n,r,o)=>{t()||(n()?(o.store.actions.internal.clearShowByInput(),o.store.actions.internal.play()):(o.store.actions.internal.onUserInput(),o.store.actions.internal.pause()))},lm=(e,t)=>{t.store.actions.internal.onUserInput()},dm=se('<div class="player-wrapper s-1" tabindex="0"><!></div>'),um={hash:"s-1",code:'.player-wrapper.s-1{aspect-ratio:16/9;color:var(--white);height:100%;left:0;position:relative;top:0;width:100%;--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);--vkui--color_background_contrast_secondary_alpha:hsla(0,0%,100%,.2);--vkui--color_text_subhead:#969a9f;font-family:var(--font)}.player-wrapper.s-1 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}'};function Ha(e,t){we(t,!0),De(e,um);let[i,n]=ti(),r=()=>et(m,"$isLive$",i),o=()=>et(k,"$availableSubtitlesList$",i),a=()=>et(b,"$settingsVisible",i),c=()=>et(h,"$controlsVisible",i),u=tt(t,"volume",3,void 0),g=tt(t,"muted",3,void 0),p=tt(t,"failoverHosts",3,void 0);Hl(t.uiConfig);let s=Lr(),l=t.store.ui.debugPanelVisible,m=t.store.state.isLive$,v=Ce(void 0);t.store.getAdmanWrapper().init({switchFromAdsToVideo:t.store.actions.internal.switchFromAdsToVideo,switchFromVideoToAds:t.store.actions.internal.switchFromVideoToAds,setMuted:t.store.actions.external.setMuted},t.store.ads,{vsid:t.store.vsid}),Zl(t.store),Ut(()=>{t.videoConfig.callbacks?.onDomReady?.()});let y=(j=!1)=>{j?t.store.actions.external.firstStart(t.showAds):t.store.actions.internal.firstStart(t.showAds)},_=()=>{xd(t.store.videoId),ga()&&t.store.actions.internal.setTrafficSavingEnabled(!0),t.store.deviceCapabilities.maxQuality!==Ld.INVARIANT&&t.store.getPlayer().setAutoQualityLimits({max:t.store.deviceCapabilities.maxQuality});let F=va(t.store.videoId);if(F&&F!==Ld.INVARIANT&&t.store.deviceCapabilities.isCodecSupported(F)){t.store.actions.internal.setQuality(F);return}};function C(j){let F=t.sources||j;F&&t.store.initVideo({container:N(v),sources:F,failoverHosts:p(),subtitles:t.subtitles,subtitlesForcedLanguage:t.subtitlesForcedLanguage,volumeMultiplier:t.volumeMultiplier});let P=am.get(Xn)==="true";l.set(P),t.fromTime>0&&t.store.actions.external.seekTime(t.fromTime);let O=u()??Ur()??s.volumeDefault,Q=g()??gd();if(t.store.actions.external.setVolume(O),t.store.actions.external.setMuted(Q),t.store.getAdmanWrapper().setInitialVolume(Q?0:O),_(),s.features.saveRate&&t.saveRate){let J=bd();J&&!r()&&t.store.actions.internal.setPlaybackRate(J)}t.store.ui.isAutoplay.set(t.autoplay),t.autoplay&&y(),t.preload&&s.features.preload&&t.store.actions.internal.preload()}bi(()=>{let j=()=>t.store.destroy();return t.live?.status==="upcoming"?(t.store.actions.internal.setLiveWaitingStart(!0),j):t.live?.status==="waiting"?(t.store.actions.internal.setLiveWaitingRecover(!0),j):(t.live?.status==="finished"||t.live?.status==="postlive")&&!(t.sources&&om(t.sources))?(t.store.actions.internal.setLiveWaitingRecord(!0),j):(C(),j)});let k=t.store.state.availableSubtitlesList$;if(s.features.initSubtitles){let j=!1;Ut(()=>{if(!j&&o().length){j=!0;let F;if(s.features.userVideoPrefs&&t.store.videoId){let O=Hr(s.userSalt,String(t.store.videoId));O?.subtitleTrackId&&(F=o().find(Q=>Q.value===O.subtitleTrackId))}let P=t.subtitlesForcedLanguage??ha();P&&(F=o().find(O=>O.language===P)),t.store.actions.internal.setSubtitle(F)}})}let I=Od().innerWidth/640;Od().document.documentElement.style.fontSize=`${I}px`;let{controlsVisible:h,settingsVisible:b}=t.store.ui,x=j=>{switch(j.key){case"Escape":t.store.actions.internal.onBackButton()||t.store.app.destroy();return;case"ArrowUp":case"ArrowDown":L.onKeyDown(j)||(c()?t.store.actions.internal.clearShowByInput():t.store.actions.internal.onUserInput());break;default:L.onKeyDown(j)}},E=j=>{["ArrowUp","ArrowDown"].includes(j.key)||t.store.actions.internal.onUserInput()},$,L;Ut(()=>(L=new eo($),()=>{L.destroy()})),t.store.ui.controlsVisible.subscribe(j=>{j||$.focus()});var A=dm();A.__click=[sm,a,b,c,h,t],A.__keydown=x,A.__mousemove=[lm,t];var M=U(A);Ua(M,{get videoContainer(){return N(v)},set videoContainer(j){ue(v,j,!0)}}),z(A),Xt(A,j=>$=j,()=>$),me(()=>rt(A,`font-size: ${I}px;`)),jo("keydown",A,E,!0),q(e,A);var f=Se({initVideo:C});return n(),f}Ft(["click","keydown","mousemove"]);import{getWindow as to}from"@vkontakte/videoplayer-shared";var io=class{constructor(t){this.hasFakeState=!1;this.onPopState=({state:t})=>{let i=this.store.actions.internal.onBackButton(),n=to();n.removeEventListener("popstate",this.onPopState),i?(n.history.pushState(t,""),n.addEventListener("popstate",this.onPopState)):this.hasFakeState&&(this.hasFakeState=!1,n.history.back())};this.store=t;let i=to();i.history.pushState(i.history.state,""),this.hasFakeState=!0,i.addEventListener("popstate",this.onPopState)}destroy(){to().removeEventListener("popstate",this.onPopState),this.hasFakeState&&to().history.back()}};import{getWindow as Pd,isLowerOrEqual as cm,videoHeightToQuality as pm,VideoQuality as Rd}from"@vkontakte/videoplayer-shared";var no=class{constructor(){this.maxQuality=pm(Pd().document.body.offsetHeight*Pd().devicePixelRatio)||Rd.INVARIANT}isCodecSupported(t){return this.maxQuality===Rd.INVARIANT?!0:cm(t,this.maxQuality)}};var Em={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:vm.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},Qa=class{constructor(t,i={},n=Ba().document.body){this.fatalError$=new ym(null);this.subscription=new _m;this.videoConfig=void 0;this.internalsExposure=null;this.status="Not initialized";this.createOneStat=t=>{if(!this.videoConfig)return;let{albumId:i,statPlace:n,statUserSalt:r,statTrackCode:o,statVKAppId:a,refreshStatAuthToken:c,autoplay:u,isTouch:g,refDomain:p,deviceId:s}=this.videoConfig,{unitedVideoId:l,isClip:m=!1}=t;if(this.uiConfig.features.statistics&&l)try{return new xm({movieId:l,albumId:i,place:n,trackCode:o,vkAppId:a,autoplay:u??!1,mobile:g,clip:m,refDomain:p,deviceId:s,isPreviewPlayerView:!1},{refreshAuthToken:c,userSalt:r,config:this.statisticsConfig})}catch(y){console.error(y)}};if(Ba()!==top)throw new Error("Must run in top frame");if(this.logger=new gm,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.parentNode=n,this.parentNode.className="vk-vp-tv-parentNode",this.fatalError$.subscribe(J=>{this.unmountComponent(this.svelteErrorComponent),J&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=nn(oa,{target:this.parentNode}))}),!Array.isArray(t.videos)||t.videos.length===0){let J=new Error("empty videos");this.fatalError$.next(J),t.callbacks?.onCrashed?.(J.message);return}else this.fatalError$.next(null);this.uiConfig=na(i.ui??{}),this.videoConfig=Yl(Em,fm(t)),this.videoConfig.autoplay&&=this.uiConfig.features.autoplay,this.videoConfig.showAds=this.uiConfig.ads.enable??this.videoConfig.showAds,this.videoConfig.adsSlotId=this.uiConfig.ads.slot??this.videoConfig.adsSlotId,this.videoConfig.canRewindLive&&=this.uiConfig.features.liveRewind,this.videoConfig.supportLink=this.videoConfig.supportLink??this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,ro.push(Jn,{key:"videoplayer_embed",strings:["new","player_init_player"],numbers:[hm()]}),this.statisticsConfig=i.statistics??{},this.playerId=mm(t.playerId),this.uiConfig=na(i.ui??{}),this.coreConfig=i.core??{},this.metaConfig=i.meta;let r=this.videoConfig.videos[0],{statAuthToken:o,preload:a,autoplay:c,volume:u,muted:g,fromTime:p,supportLink:s,interfaceLanguage:l,isCyrillicRelatedInterface:m,isAudioDisabled:v,isLiveCatchUpMode:y,failoverHosts:_,canDownload:C,callbacks:k,saveRate:I,volumeMultiplier:h,mediascopePixels:b}=this.videoConfig,{sources:x,unitedVideoId:E,previewThumbsData:$,subtitles:L,subtitlesForcedLanguage:A,live:M,adsExternalApi:f}=r;if(!x&&!M){let J=new Error("empty sources and live");this.fatalError$.next(J),k?.onCrashed?.(J.message);return}let j=this.createOneStat(r),F=this.createThinOneStat(r),P;b&&(P=new bm({pixels:b})),(j||F)&&(this.statistics=new Pr(j,F,P)),this.store=Dd({interfaceLanguage:l,isCyrillicRelatedInterface:m,videoId:E,isLiveCatchUpMode:y,isAudioDisabled:v,statAuthToken:o,callbacks:k,previewThumbsData:$,canDownload:C,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:I,internalsExposure:this.internalsExposure,statistics:this.statistics,playerId:this.playerId,app:this,video:r,deviceCapabilities:new no});let O={sources:x,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,subtitles:L,subtitlesForcedLanguage:A,live:M,preload:a,autoplay:c,muted:g,volume:u,fromTime:p,supportLink:s,showAds:!1,failoverHosts:_,saveRate:I,volumeMultiplier:h,adsExternalApi:f,getVideoDeeplink:this.videoConfig.getVideoDeeplink},Q={target:this.parentNode,props:O};this.svelteRootComponent=nn(Ha,Q),this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&this.videoConfig?.callbacks?.onDevNullLog?ro.subscribe(Jn,this.videoConfig.callbacks.onDevNullLog):ro.destroy(Jn),this.backButtonService=new io(this.store),this.status="Normal"}destroy(){this.status!=="Destroyed"&&(this.backButtonService.destroy(),this.status="Destroyed",this.subscription.unsubscribe(),this.internalsExposure?.destroy(),ro.destroy(Jn),this.store?.getPlayer()?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.svelteStubComponent),Ba().history.back())}createThinOneStat(t){if(!this.videoConfig)return;let{deviceId:i,preload:n,refreshStatAuthToken:r}=this.videoConfig,{unitedVideoId:o}=t;if(this.uiConfig.features.thinStatistics&&o)return new Am.ThinOneStat({deviceId:i,movieId:o,preload:n,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:r})}unmountComponent(t){t&&Gn(t)}updateStatContext(t){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(t),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(t))}setLiveStart(t){let i=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${i}`}),i||(this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(t,{autoplay:!0}))}setLiveWaitingStart(){this.log({message:"live waiting"}),this.store?.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){let t=this.store?.getPlayer();if(!t)return!1;let{info:i}=t;return i.canPlayLiveTailBuffer$.getValue()&&!i.isStalled$.getValue()&&!i.atLiveEdge$.getValue()}createPlayer(t,i={},n){}setLiveWaitingRecover(t=!1){let i=this.isLiveTailPlaying(),n=t||!i;this.log({message:`live waiting recover: forceImmediate = ${t}, liveTailPlaying = ${i}`});let r=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0)};n&&r(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{n||r(),this.store?.destroy()})}setLiveWaitingRecord(){let t=this.isLiveTailPlaying(),i=!t;this.log({message:`live waiting record: liveTailPlaying = ${t}`});let n=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0)};i&&n(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{i||n(),this.store?.destroy()})}setLiveEnd(t){let i=this.isLiveTailPlaying(),n=!i;this.log({message:`live ended: liveTailPlaying = ${i}`});let r=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(t,{autoplay:!1})};if(n){r();return}this.store?.callbacks&&(this.store.callbacks.onLiveEnded=r)}};import{InterfaceLanguage as IN,VKNumericLanguage as kN,loadVKLangPack as NN}from"@vkontakte/videoplayer-shared";import{VideoQuality as CN,VideoFormat as $N}from"@vkontakte/videoplayer-core";export{Qa as AndroidTvPlayer,IN as InterfaceLanguage,sr as VERSION,kN as VKNumericLanguage,$N as VideoFormat,CN as VideoQuality,NN as loadVKLangPack};
|
|
49
|
+
Audio: ${(rv(U).audioCodec||"")??""} ${rv(U).audioLanguage?`(${rv(U).audioLanguage})`:""}`)),rT(e,t)},rD(p,e=>{(rv(U).videoCodec||rv(U).audioCodec)&&e(h)}),v=nB(p,2),m=e=>{var t=a7(),i=nB(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(U).viewport)),rT(e,t)},rD(v,e=>{rv(U).viewport&&e(m)}),g=nB(v,2),_=e=>{var t=a8(),i=nB(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(U).videoSize)),rT(e,t)},rD(g,e=>{rv(U).videoSize&&e(_)}),b=nB(g,2),y=e=>{var t=se(),i=nB(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(U).cdn)),rT(e,t)},rD(b,e=>{rv(U).cdn&&e(y)}),w=nB(b,2),k=e=>{var t=st(),i=nB(nz(t),2),n=nz(i);iN(i),iN(t),nX(()=>rP(n,`${rv(U).volume??""} %`)),rT(e,t)},rD(w,e=>{rv(U).volume&&e(k)}),x=nB(w,2),S=e=>{var t=si(),i=nB(nz(t),2),n=nz(i);iN(i),iN(t),nX(e=>rP(n,`${e??""} s`),[()=>rv(U).position.toFixed(2)]),rT(e,t)},rD(x,e=>{rv(U).position&&e(S)}),$=nB(x,2),C=e=>{var t=sn(),i=nB(nz(t),2),n=nz(i);iN(i),iN(t),nX(e=>rP(n,`${e??""} s`),[()=>rv(U).buffer.toFixed(2)]),rT(e,t)},rD($,e=>{rv(U).buffer&&e(C)}),A=nB($,2),T=e=>{var t=sr(),i=nB(nz(t),2),n=nz(i);iN(i),iN(t),nX(e=>rP(n,`${e??""} s`),[()=>rv(U).nativeBuffer.toFixed(2)]),rT(e,t)},rD(A,e=>{rv(U).nativeBuffer&&e(T)}),E=nB(A,2),P=e=>{var t=so(),i=nB(nz(t),2),n=nz(i);iN(i),iN(t),nX(e=>rP(n,`${e??""} s`),[()=>rv(U).liveLatency.toFixed(2)]),rT(e,t)},rD(E,e=>{rv(U).liveLatency&&e(P)}),L=nB(E,2),R=e=>{var t=sa(),i=nB(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(e=>rP(n,e),[()=>[{value:rv(U).currentVideoSegmentLength,title:"Video:"},{value:rv(U).currentAudioSegmentLength,title:"Audio:"}].filter(({value:e})=>e).map(({value:e,title:t})=>`${t} ${((e??0)/1e3).toFixed(2)} s`).join(" & ")]),rT(e,t)},rD(L,e=>{(rv(U).currentVideoSegmentLength||rv(U).currentAudioSegmentLength)&&e(R)}),V=nB(L,2),O=nB(nz(V),2),I=nz(O),iN(O),iN(V),M=nB(V,2),N=e=>{var t=ss(),i=nB(nz(t),2);aG(i,{get values(){return rv(et)}});var n=nB(i,2),r=nz(n);iN(n),iN(t),nX(e=>rP(r,`${e??""} Kbps`),[()=>rv(U).speed.toFixed(2)]),rT(e,t)},rD(M,e=>{rv(U).speed&&e(N)}),j=nB(M,2),D=e=>{var t=sl(),i=nB(nz(t),2);aG(i,{get values(){return rv(ei)}});var n=nB(i,2),r=nz(n);iN(n),iN(t),nX(e=>rP(r,`${e??""} Kbps`),[()=>rv(U).bitrate.toFixed(2)]),rT(e,t)},rD(j,e=>{rv(U).bitrate&&e(D)}),F=nB(j,2),aG(z=nB(nz(F),2),{get values(){return rv(ee)}}),B=nz(q=nB(z,2),!0),iN(q),iN(F),iN(n),iN(t),nX(()=>{rY(t,"aria-label",en),rP(a,rv(U).version),rP(I,`${rv(K)??""} / ${rv(G)??""} frames`),rP(B,rv(J))}),ry("click",i,e=>{e.stopPropagation(),oS.remove(au),Q.set(!1)}),rT(e,t),iY()};rD(m,e=>{oi(u,"$debugPanelVisible",i)&&e(g)}),rT(e,c)},iO&&iM(),p=new rI(c),h=!iZ(),n0(()=>{var e=(()=>oi(a,"$language$",i))();e!=e&&(e=rF),h&&null!==e&&"object"==typeof e&&(e={}),p.ensure(e,f)}),iN(v),r4(v,e=>nT(d,e),()=>rv(d)),rT(e,v),iY(),n()}(nz(F),{get thumbUrl(){return u()},firstStart:N,get autoplay(){return h()},get videoContainer(){return rv(I)},set videoContainer($$value){nT(I,$$value,!0)}}),iN(F),rT(e,F);var z=iY({initVideo:j,play:function(){rv(M)?o().actions.external.play():N(!0)},pause:function(){o().actions.external.pause()},setMuted:function(e){o().actions.external.setMuted(e)},toggleSubtitle:function(){o().actions.external.toggleSubtitle()},changeSubtitle:function(e,t){o().actions.external.changeSubtitle(e,t)},changeAudioStream:function(e){o().actions.external.changeAudioStream(e)},setVolume:function(e){e>=0&&e<=1&&o().actions.external.setVolume(e)},seekTime:function(e){o().actions.internal.seekTime(e,ai.UNKNOWN)},setPlaybackRate:function(e){o().actions.external.setPlaybackRate(e)},setAutoQualityLimits:function(e){o().actions.external.setAutoQualityLimits(e)},setAutoQuality:function(){o().actions.external.setQuality("auto")},toggleTrafficSaving:function(e){o().actions.external.setTrafficSavingEnabled(e)},toggleHighQuality:function(e){o().actions.external.setHighQualityEnabled(e)},get sources(){return r()},set sources($$value){r($$value)},get store(){return o()},set store($$value){o($$value)},get videoConfig(){return a()},set videoConfig($$value){a($$value)},get uiConfig(){return s()},set uiConfig($$value){s($$value)},get title(){return l()},set title($$value){l($$value)},get thumbUrl(){return u()},set thumbUrl($$value){u($$value)},get subtitles(){return d()},set subtitles($$value){d($$value)},get subtitlesForcedLanguage(){return c()},set subtitlesForcedLanguage($$value){c($$value)},get live(){return f()},set live($$value){f($$value)},get preload(){return p()},set preload($$value){p($$value)},get autoplay(){return h()},set autoplay($$value){h($$value)},get volume(){return v()},set volume($$value){v($$value)},get muted(){return m()},set muted($$value){m($$value)},get fromTime(){return g()},set fromTime($$value){g($$value)},get canRewindLive(){return _()},set canRewindLive($$value){_($$value)},get showAds(){return b()},set showAds($$value){b($$value)},get adsSlotId(){return y()},set adsSlotId($$value){y($$value)},get adsParams(){return w()},set adsParams($$value){w($$value)},get adsAutoplayParam(){return k()},set adsAutoplayParam($$value){k($$value)},get duration(){return x()},set duration($$value){x($$value)},get supportLink(){return S()},set supportLink($$value){S($$value)},get shadowRootContainer(){return $()},set shadowRootContainer($$value){$($$value)},get outerContainerRef(){return C()},set outerContainerRef($$value){C($$value)},get fullScreenTarget(){return A()},set fullScreenTarget($$value){A($$value)},get failoverHosts(){return T()},set failoverHosts($$value){T($$value)},get saveRate(){return E()},set saveRate($$value){E($$value)},get volumeMultiplier(){return P()},set volumeMultiplier($$value){P($$value)},get showEndScreen(){return L()},set showEndScreen($$value){L($$value)}});return n(),z}var sP=rA('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1),sL=rC('<div class="title s-2"> </div>'),sR=rC('<div class="playerStub s-2"><!> <!></div>'),sV={hash:"s-2",code:".playerStub.s-2 {width:100%;height:100%;background-color:#222;display:flex;justify-content:center;align-items:center;position:relative;background-position:center;background-size:cover;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}.title.s-2 {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 sO(e,t){rz(e,sV);var i=sR(),n=nz(i),r=e=>{var i=sL(),n=nz(i,!0);iN(i),nX(()=>rP(n,t.title)),rT(e,i)};rD(n,e=>{t.title&&e(r)});var o=nB(n,2),a=e=>{{let i,n,r=nm(()=>!!t.thumbUrl);i=or({get isWhite(){return rv(r)}},"isWhite",3,!1),n=nm(()=>i()?"#fff":"#909499"),sp(e,{width:"57",height:"60",get fill(){return rv(n)},testId:"stub-icon",children:(e,t)=>{var i=sP();ij(9),rT(e,i)},$$slots:{default:!0}})}};rD(o,e=>{t.title&&t.thumbUrl||e(a)}),iN(i),nX(()=>rH(i,t.thumbUrl?`background-image: url('${t.thumbUrl}')`:"")),rT(e,i)}var sI=rC('<div class="playerError s-1"><!></div>'),sM={hash:"s-1",code:".playerError.s-1 {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;}"};function sN(e){rz(e,sM);var t=sI();sg(nz(t),{}),iN(t),rT(e,t)}var sj=k(eF(),1),sD=k(t$(),1),sF=k(tE(),1),sz=k(eM(),1),sq=k(ii(),1),sB=k(eM(),1),sW=k(td(),1);class sQ{adman=null;initialVolume=1;volumeMultiplier;videoElement=null;currentAdSection=null;actions=null;adsState=null;playerState=null;isDestroyed;log;loadTimeout;initTimeout;runtimeTimeout;useAdmanFromNPM;isVsidOriginal;watchDogTimeout;externalApi;events={init$:new oG,loadStarted$:new oG,loadEnded$:new oG,loadError$:new oG,ready$:new oG,slotRequested$:new oG,started$:new oG,timeRemained$:new oG,paused$:new oG,resumed$:new oG,ended$:new oG,empty$:new oG,skipped$:new oG,clicked$:new oG,closed$:new oG,error$:new oG};constructor(e,t){this.log=e.createComponentLog("AdmanWrapper"),oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[oU()]}),this.loadTimeout=t.loadTimeout,this.initTimeout=t.initTimeout,this.runtimeTimeout=t.runtimeTimeout,this.useAdmanFromNPM=t.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(t.volumeMultiplier,1)),this.isVsidOriginal=t.isVsidOriginal}init(e,t,i){this.actions=e,this.adsState=t,this.playerState=i}loadAdman=e=>(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[oU()]}),this.useAdmanFromNPM)?this.loadAdmanNPM(e):this.loadAdmanMailRu(e);loadAdmanMailRu=e=>new Promise((t,i)=>{let n;this.events.loadStarted$.next();let r=()=>{clearTimeout(n),delete window.admanAsyncInit,window.AdmanHTML?(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[oU()]}),t(),this.events.loadEnded$.next()):(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[oU()]}),i())};oH("//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",e,this.loadTimeout).then(()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[oU()]}),window.AdmanHTML?(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[oU()]}),t(),this.events.loadEnded$.next()):(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[oU()]}),window.admanAsyncInit=r,n=window.setTimeout(r,this.initTimeout))}).catch(e=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(e)],numbers:[oU()]}),i(),clearTimeout(n)})});loadAdmanNPM=e=>new Promise((t,i)=>{let n;this.events.loadStarted$.next();let r=()=>{clearTimeout(n),delete window.admanAsyncInit,window.AdmanHTML?(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[oU()]}),t(),this.events.loadEnded$.next()):(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[oU()]}),i())},o=()=>{a=!0,i()},a=!1,s=window.setTimeout(()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[oU()]}),o()},this.loadTimeout);e.addEventListener("abort",o),e.aborted&&(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[oU()]}),o()),window.AdmanHTML=window.AdmanHTML||null,sq.default(import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(a)],numbers:[oU()]}),a||(window.AdmanHTML?(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[oU()]}),t(),this.events.loadEnded$.next()):(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[oU()]}),window.admanAsyncInit=r,n=window.setTimeout(r,this.initTimeout)))},o),()=>{clearTimeout(n),clearTimeout(s),e.removeEventListener("abort",o)})});onAdmanLoadingError(){this.onAdError("adman loading error")}async initAdman(e){let t;if(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[oU(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:n,isAutoplay:r,adsContainer:o,adsVideoElement:a,slotId:s,params:l={},paramsOverride:u={},duration:d,externalApi:c}=e;this.externalApi=c;let f=this.playerState&&r8(this.playerState.vsid);f&&(t=this.isVsidOriginal?f:parseInt(f,36));let{isEmbed:p,immediateOrigin:h}=oB(),v=(p?h:window.location.href)??window.location.href,m={...l,dl:encodeURIComponent(v),autoplay:+!!r,player_width:i,player_height:n,...t?{request_id:t}:{},duration:d,...u},g={slot:s,wrapper:o,videoEl:a,videoQuality:n,params:m=sW.default(sB.default(m).filter(([e,t])=>oQ(t))),browser:{mobile:!1}};try{let e=new window.AdmanHTML;if(e.onReady(this.onAdsReady),e.onStarted(this.onAdStarted),e.onPlayed(this.onAdPlayed),e.onPaused(this.onAdPaused),e.adMidrollPoint(this.onAdMidrollPoint),e.onClosed(this.onAdClosed),e.onSkipped(this.onAdSkipped),e.onClicked(this.onAdClicked),e.onTimeRemained(this.onAdTimeRemained),e.onCompleted(this.onAdCompleted),e.onError(this.onAdError),e.setDebug(!1),this.externalApi?.videoGetAds){let e=await this.safeExternalCall(this.externalApi.videoGetAds,m);e&&(delete g.slot,delete g.params,Object.assign(g,{json:e}))}e.init(g),this.adman=e,this.videoElement=a,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(g)}`})}catch(e){oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(e)],numbers:[oU()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){if(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",this.currentAdSection??"","force: "+e],numbers:[oU()]}),null===this.currentAdSection&&!e)return void this.log({message:"switch to video, no currentAdSection. can't switch"});let t="postroll"===this.currentAdSection;if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${t}`});else{let e="Switch to video: Adman state was not updated correctly";this.log({message:e}),this.events.error$.next(e)}this.actions.switchFromAdsToVideo?.(!t)}}setPostrollPassed(e){this.adsState?.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){if(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",this.currentAdSection??""],numbers:[oU()]}),this.adsState){this.log({message:"toggle play"});let e=r8(this.adsState.playbackState);"playing"===e?this.pause():"paused"===e&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let t=e*this.volumeMultiplier;if(this.log({message:`set volume ${t}`}),this.adman)try{this.adman.setVolume(t)}catch(e){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=t)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(e){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[oU()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){if(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",this.currentAdSection??""],numbers:[oU()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(e){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}onAdsReady=()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[oU()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};onAdStarted=(e,t)=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+t.muted],numbers:[oU(),t.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(t)}`}),this.events.started$.next(e),t.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(t.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(t.allowClose),this.adsState.secondsToWatchBeforeSkip.set(t.allowCloseDelay),this.startWatchDog(),this.externalApi?.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(t.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};onAdTimeRemained=e=>{"inactive"!==(this.adsState?.playbackState?r8(this.adsState.playbackState):void 0)&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};onAdPaused=()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",this.currentAdSection??""],numbers:[oU()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};onAdPlayed=()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",this.currentAdSection??""],numbers:[oU()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};onAdMidrollPoint=()=>{if(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[oU()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};onAdSkipped=()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",this.currentAdSection??""],numbers:[oU()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};onAdClosed=()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",this.currentAdSection??""],numbers:[oU()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};onAdCompleted=()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",this.currentAdSection??""],numbers:[oU()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),"postroll"===this.currentAdSection&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};onAdClicked=()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",this.currentAdSection??""],numbers:[oU()]}),this.log({message:"ad clicked"}),this.videoElement?.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};onAdError=(e="ad error")=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[oU()]}),this.log({message:e}),this.events.error$.next(e),"postroll"===this.currentAdSection&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){if(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",this.currentAdSection??""],numbers:[oU()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(e){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){if(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",this.currentAdSection??""],numbers:[oU()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(e){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){if(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",this.currentAdSection??""],numbers:[oU()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(e){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,t){this.adman?.setPosition(Math.floor(e),Math.floor(t))}destroy(){oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[oU()]}),this.log({message:"destroy"}),this.stopWatchDog(),this.adman?.onReady(void 0),this.adman?.onStarted(void 0),this.adman?.onPlayed(void 0),this.adman?.onPaused(void 0),this.adman?.adMidrollPoint(void 0),this.adman?.onClosed(void 0),this.adman?.onSkipped(void 0),this.adman?.onClicked(void 0),this.adman?.onTimeRemained(void 0),this.adman?.onCompleted(void 0),this.adman?.onError(void 0),this.adman?.destroy(),this.videoElement&&oK(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...t){try{return await e(...t)}catch(e){return this.onAdError(e?.message??"External call failed"),null}}}var sU=e=>{let t=Math.round(e);if(isNaN(t)||t<40);else if(t>=40&&t<55)return 50;else if(t>=55&&t<90)return 60;else if(t>=90&&t<180)return 120;else if(t>=180)return 240;return""};class sH{timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;timingRegExp=RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`);parse(e){let t={startTime:0,endTime:0},i=this.timingRegExp.exec(e);return i&&(t.startTime=this.calcTime(i[1],i[2],i[3],i[4]),t.endTime=this.calcTime(i[6],i[7],i[8],i[9])),t}parseTime(e){let t=this.timeRegExp.exec(e);return t?this.calcTime(t[1],t[2],t[3],t[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",t="0",i="0",n="0"){return 60*Number(e)*60+60*Number(t)+Number(i)+Number(`0.${n}`)}}class sG{letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/;parse(e){let t={texts:[]},i=e.replace(RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](e){let t=0,i=[];for(;t<e.length;){let n=["<",">"].reduce((i,n)=>{let r=e.indexOf(n,t);return -1===i||i>r?r:i},-1);if(-1===n){i.push(e.substring(t));break}i.push(e.substring(t,n)),t=n+1}return i}}),n=new sH;for(let e of i)n.isTime(e)?t.texts.push({type:"timestamp",value:n.parseTime(e)}):t.texts.push({type:"text",value:e});return t}}var sK=class{oneLineRegExp=/\r\n|\n|\r/;twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/;parse(e,t){let i=[];for(let n of e.split(this.twoLinesRegExp)){let e={startTime:0,endTime:0,texts:[],lang:t};for(let t of n.split(this.oneLineRegExp))if(e.startTime||e.endTime){if(""!==t.trim()){let{texts:i}=(new sG).parse(t);e.texts=[...e.texts,...i]}}else{let{startTime:i,endTime:n}=(new sH).parse(t);e.startTime=i,e.endTime=n}(e.startTime||e.endTime)&&e.texts.length>0&&i.push(e)}return i}},sJ=0,sY=!1,sZ="",sX=(e,t=0,i=0)=>e<t&&e<i,s0=(e,t=0,i=0)=>e>=t&&e<=i,s1={ru:"Русский",en:"English",uk:"Українська",be:"Беларуская (тарашкевiца)",es:"Espa\xf1ol",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"Български",hr:"Hrvatski",hu:"Magyar",sr:"Српски",pt:"Portugu\xeas",el:"Ελληνικά",pl:"Polski",fr:"Fran\xe7ais",ko:"한국어","zh-CN":"汉语",lt:"Lietuvių",ja:"日本語",cs:"Čeština",et:"Eesti",tt:"Татарча",ba:"Башҡортса",cv:"Чăвашла",sk:"Slovenčina",ro:"Rom\xe2nă",no:"Norsk",lv:"Latviešu",az:"Azərbaycan dili",hy:"Հայերեն",sv:"Svenska",nl:"Nederlands",tk:"T\xfcrkmen",ka:"ქართული",da:"Dansk",uz:"O‘zbek",th:"ภาษาไทย",id:"Bahasa Indonesia",tg:"Тоҷикӣ",sl:"Slovenščina",bs:"Bosanski","pt-BR":"Portugu\xeas brasileiro",fa:"فارسی",vi:"Tiếng Việt",hi:"हिन्दी",si:"සිංහල",bn:"বাংলা",tl:"Tagalog",mn:"Монгол",my:"ဗမာစာ",tr:"T\xfcrk\xe7e",ne:"नेपाली",ur:"اردو",ky:"Кыргыз тили",pa:"پنجابی",os:"Ирон",kn:"ಕನ್ನಡ",sw:"Kiswahili",kk:"Қазақша",ar:"العربية",he:"עברית",ab:"Аҧсшәа",eu:"Euskara",eo:"Esperanto"},s2={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},s4=e=>s1[e]??s1[s2[e]]??void 0;function s5(e,t){let i=new Set([...Object.keys(e),...Object.keys(t)]),n={};for(let r of i)n[r]=t[r]??e[r]??void 0;return n}class s3{oneStat;thinOneStat;mediascopePixel;statSubscription;constructor(e,t,i,n=new o9){this.oneStat=e,this.thinOneStat=t,this.mediascopePixel=i,this.statSubscription=n}destroy(){this.oneStat?.destroy(),this.thinOneStat?.destroy(),this.mediascopePixel?.destroy(),this.statSubscription.unsubscribe()}}class s9{getActiveElement;focusableElements=[];isActive=!1;container;constructor(e){this.getActiveElement=e}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){return Array.from(this.container.querySelectorAll('button:not([disabled]), [href]:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled])')).filter(e=>!e.disabled&&null!==e.offsetParent)}handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let t=this.focusableElements[0],i=this.focusableElements[this.focusableElements.length-1],n=this.getActiveElement();e.shiftKey&&n===t?(e.preventDefault(),i.focus()):e.shiftKey||n!==i||(e.preventDefault(),t.focus())};destroy(){this.deactivate()}setContainer(e){this.container=e}}class s6{shadowRoot;lastFocusedNode=null;focusLock;constructor(e){this.shadowRoot=e,this.focusLock=new s9(()=>this.lastFocusedNode),this.init()}init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};restoreFocus=()=>{this.lastFocusedNode?.focus()};destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}}var s7=o7().HTMLElement||class{isConnected=!1},s8={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:o0.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},le=nC(void 0);class lt extends s7{svelteStubComponent;svelteRootComponent;svelteErrorComponent;store;statistics;_shadowRoot;playerContainer;rootContainer;stateContainer;shadowRootContainer;playerId;uiConfig;coreConfig;statisticsConfig;metaConfig;currentPlayingVideoIndex=0;videoConfig=void 0;subscription;focusManager;prevIsid=void 0;isInited=!1;postponedInitParams=null;internalsExposure=null;fatalError$=new oZ(null);constructor(){super(),this.subscription=new o2,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=rR(sN,{target:this.playerContainer}))})}connectedCallback(){if(this.rootContainer)return;this.initPlayerRootContainers();let e=nV({title:this.getAttribute("stub-title")??void 0,thumbUrl:this.getAttribute("stub-thumb-url")??void 0}),t={target:this.playerContainer,props:e};this.svelteStubComponent=rR(sO,t),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}disconnectedCallback(){this.focusManager?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.subscription.unsubscribe(),this.internalsExposure?.destroy()}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}createOneStat=(e,t={})=>{if(!this.videoConfig)return;let{albumId:i,statPlace:n,statUserSalt:r,statTrackCode:o,statVKAppId:a,refreshStatAuthToken:s,autoplay:l,isTouch:u,refDomain:d,deviceId:c}=s5(this.videoConfig,t),{unitedVideoId:f,isClip:p=!1}=e;if(this.uiConfig.features.statistics&&f)try{return new ao({movieId:f,albumId:i,place:n,trackCode:o,vkAppId:a,autoplay:l??!1,mobile:u,clip:p,refDomain:d,deviceId:c,isPreviewPlayerView:!1},{refreshAuthToken:s,userSalt:r,config:this.statisticsConfig})}catch(e){console.error(e)}};createThinOneStat(e,t={}){if(!this.videoConfig)return;let{deviceId:i,preload:n,refreshStatAuthToken:r}=s5(this.videoConfig,t),{unitedVideoId:o}=e;if(this.uiConfig.features.thinStatistics&&o)return new aa.ThinOneStat({deviceId:i,movieId:o,preload:n,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:r})}createPlayer(e,t={},i){let n;if(!this.videoConfig)return;let{statAuthToken:r,preload:o,autoplay:a,volume:s,muted:l,fromTime:u,canRewindLive:d,supportLink:c,showAds:f,adsSlotId:p,adsParams:m={},adsAutoplayParam:g,interfaceLanguage:_,isCyrillicRelatedInterface:b,isAudioDisabled:y,isLiveCatchUpMode:w,fullScreenTarget:k,failoverHosts:x,canDownload:S,callbacks:$,saveRate:C,volumeMultiplier:A,showEndScreen:T,mediascopePixels:E}=s5(this.videoConfig,t),{sources:P,title:L,thumbUrl:R,unitedVideoId:V,duration:O,adsParams:I={},previewThumbsData:M,subtitles:N,subtitlesForcedLanguage:j,live:D,adsExternalApi:F}=e;if(!P&&!D){let e=Error("empty sources and live");this.fatalError$.next(e),$?.onCrashed?.(e.message);return}let z={...m,...I},q={focusManager:this.focusManager},B=this.createOneStat(e,t),W=this.createThinOneStat(e,t);E&&(n=new as({pixels:E})),(B||W)&&(this.statistics=new s3(B,W,n)),this.store=(({interfaceLanguage:e,isCyrillicRelatedInterface:t,videoId:i,isLiveCatchUpMode:n,statAuthToken:r,isAudioDisabled:o,canDownload:a,callbacks:s,webApi:l,previewThumbsData:u,uiConfig:d,coreConfig:c,player:f,stopPlayer:p,looped:m=!1,statistics:g,saveRate:_,internalsExposure:b,playerId:y,metaConfig:w})=>{let k,x,S,$,C,A,T={...c,isAudioDisabled:o,live:{...c.live??{},isLiveCatchUpMode:!!n}},E=oD.createRootTracer(!1),P=E.createComponentTracer("Store"),L=f||new ou(T,E,{playerId:y,onDevNullLog:s?.onDevNullLog});b?.expose({corePlayer:L});let R=new oV,V=new sQ(R,{loadTimeout:d.ads.loadTimeout,initTimeout:d.ads.initTimeout,runtimeTimeout:d.ads.runtimeTimeout,useAdmanFromNPM:d.ads.useAdmanFromNPM,volumeMultiplier:d.ads.volumeMultiplier,isVsidOriginal:d.ads.isVsidOriginal}),O=l?.focusManager,I=R.createComponentLog("Store"),M={},N=new aA,j=new oj,D="",F=r6(!1),z=g&&g.oneStat?a$(g.oneStat.vsid$):r9(void 0),q=r6(!!(S=document).fullscreenElement||!!S.mozFullScreenElement||!!S.webkitFullscreenElement||!!S.msFullscreenElement),B=r6(!1),W=r6(!1),Q=r6([]),U=oI(L.events.fatalError$,L.events.managedError$).subscribe(e=>Q.update(t=>[...t,e])),H=r9(!1,e=>{let t=L.events.fatalError$.subscribe(()=>e(!0));return()=>t.unsubscribe()}),G=async e=>{let t=sD.default(sj.default(oE),e);if(d.downloadVKLanguages&&(t&&d.updateBuiltinLanguages||!aX.has(e))){let t;try{t=await oR(e,"videoplayer","videoplayer")}catch(e){g?.oneStat?.logError({errorType:"VKLangPack",fatal:!1})}t&&(a1({language:e,pack:t,fallback:d.defaultLanguage}),K.set(e),J.update(e=>e+1))}aX.has(e)&&K.set(e)},K=r6(e),J=r6(0),Y=r6(t);G(e);let Z=(e,t)=>a2(r8(K),e,t,d.defaultLanguage),X=r6("thumb");X.subscribe(e=>{"ads"===e&&L.info.playbackState$.getValue()&&ei()});let ee={...$=r7([H,X],([e,t])=>e?"crashed":t),is:e=>r8($)===e},et=r6(),ei=()=>{et.set({muted:L.info.muted$.getValue()})},en=r6({width:0,height:0}),er=null,eo=L.info.isBuffering$,ea=r9(eo.getValue(),e=>{let t=eo.subscribe(t=>{t&&null===er?er=window.setTimeout(()=>{e(eo.getValue()),er=null},d.loaderDelay):e(t)});return()=>{t.unsubscribe(),er&&clearTimeout(er)}});P.log("create store"),I({message:"create store"});let es=new oN,el=new oN,eu=new oN,ed={actionRewind$:es,actionSeek$:el,inFullscreen$:new oM(e=>q.subscribe(t=>e.next(t))),actionSetSubtitle$:eu},ec=new oN,ef=new oN,ep={actionSeek$:el,actionSubtitlesSwitched$:ec,actionQuality$:ef,playerSize$:new oM(e=>en.subscribe(t=>e.next(t))),inFullscreen$:new oM(e=>q.subscribe(t=>e.next(t))),isLoaderVisible$:new oM(e=>ea.subscribe(t=>e.next(t)))};if(g){let{oneStat:e,thinOneStat:t,mediascopePixel:i,statSubscription:n}=g;e&&(n.add(e.attachToUi(ed)),n.add(e.attachToAds(V.events)),e.authorize(r).catch(e=>{I({message:`onestat auth error ${String(e)}`})}),i&&i.attachTo(L)),t&&(n.add(t.attachTo(L,V.events)),n.add(t.attachToUi(ep)),n.add(t.attachToAds(V.events)),t.updateContext({isMobile:r8(F)}),t.authorize(r))}let eh=()=>{if(of.device.isIOS&&x)try{var e;e=x,e?.webkitExitFullscreen&&e?.webkitExitFullscreen()}catch(e){I({message:`exitIosSafariFullscreen failed: ${e}`})}};j.add(L.experimental.element$.subscribe(e=>{e&&(x=e,e.classList.add("player-media"))})).add(L.events.ended$.subscribe(()=>{eh(),s?.onEnded?.()})).add(L.events.looped$.subscribe(()=>{s?.onLooped?.()})).add(L.events.started$.subscribe(async()=>{let e=L.info.muted$.getValue();s?.onStarted?.(),M.onStarted?.(e)})).add(L.events.willSeek$.subscribe(({from:e,to:t})=>{s?.onSeek?.(e,t)})).add(L.events.autoplaySoundProhibited$.subscribe(()=>{s?.onAutoplaySoundProhibited?.()})).add(L.info.position$.subscribe(e=>{let t=L.info.duration$.getValue();isFinite(t)&&t>0&&(s?.onTimeupdate?.(t,e),V.setPosition(e,t))})).add(L.events.fatalError$.subscribe(e=>{s?.onCrashed?.(e?`${e.id}: ${e.message}`:void 0)})).add(L.events.fetcherRecoverableError$.subscribe(e=>{s?.onRecoverableError?.(e?`${e.id}: ${e.message}`:void 0)})).add(L.events.loadedMetadata$.subscribe(()=>{W.set(!0)})).add(L.info.liveTime$.subscribe(e=>{s?.onLiveTime?.(e)})).add(L.info.isStalled$.subscribe(e=>{s?.onStalledChanged?.(e)})).add(L.info.isLiveEnded$.subscribe(e=>e&&s?.onLiveEnded?.())).add(V.events.loadStarted$.subscribe(()=>s?.adsInfo?.onLoadStarted?.())).add(V.events.loadEnded$.subscribe(()=>s?.adsInfo?.onLoadEnded?.())).add(V.events.loadError$.subscribe(()=>s?.adsInfo?.onLoadError?.())).add(V.events.init$.subscribe(()=>s?.adsInfo?.onInit?.())).add(V.events.ready$.subscribe(()=>s?.adsInfo?.onReady?.())).add(V.events.started$.subscribe(e=>s?.adsInfo?.onStarted?.(e))).add(V.events.timeRemained$.subscribe(e=>s?.adsInfo?.onTimeRemained?.(e))).add(V.events.ended$.subscribe(e=>s?.adsInfo?.onCompleted?.(e))).add(V.events.empty$.subscribe(()=>s?.adsInfo?.onEmpty?.())).add(V.events.clicked$.subscribe(e=>s?.adsInfo?.onClicked?.(e))).add(V.events.closed$.subscribe(e=>s?.adsInfo?.onClosed?.(e))).add(V.events.error$.subscribe(e=>s?.adsInfo?.onError?.(e))).add(V.events.paused$.subscribe(()=>s?.adsInfo?.onPaused?.())).add(V.events.resumed$.subscribe(()=>s?.adsInfo?.onResumed?.()));let ev=r9(L.info.position$.getValue(),e=>{let t,i,n=()=>{let r=L.info.playbackState$.getValue(),o=L.info.isLive$.getValue(),a=L.info.duration$.getValue(),s=L.info.position$.getValue();if(r&&sD.default([ol.PLAYING,ol.PAUSED],r)){let t=o?s-a:L.getExactTime();t!==i&&e(t),i=t}t=requestAnimationFrame(n)};return n(),()=>cancelAnimationFrame(t)}),em=a$(L.info.playbackState$),eg=r7([em,a$(L.info.isBuffering$)],([e,t])=>t?"buffering":e),e_=a$(L.info.currentBuffer$),eb=a$(L.info.isEnded$),ey=a$(L.info.isLive$),ew=d.features.playbackRate?a$(L.info.canChangePlaybackSpeed$):r9(!1),ek=a$(L.info.liveBufferTime$),ex=a$(L.info.volume$),eS=a$(L.info.muted$),e$=aC(L.info.predefinedQualityLimitType$.pipe(oO(e=>e===od.TRAFFIC_SAVING)),L.info.predefinedQualityLimitType$.getValue()===od.TRAFFIC_SAVING),eC=aC(L.info.predefinedQualityLimitType$.pipe(oO(e=>e===od.HIGH_QUALITY)),L.info.predefinedQualityLimitType$.getValue()===od.HIGH_QUALITY),eA=a$(L.info.autoQualityLimitingAvailable$),eT=a$(L.info.availableQualities$),eE=a$(L.info.availableQualitiesFps$),eP=a$(L.info.chromecastState$),eL=a$(L.info.chromecastDeviceName$),eR=a$(L.info.currentFormat$),eV=a$(L.info.throughputEstimation$),eO=a$(L.info.videoBitrate$),eI=a$(L.info.intrinsicVideoSize$),eM=a$(L.info.duration$),eN=a$(L.info.isAudioAvailable$),ej=r7([eM,ey],([e,t])=>t?-e:e),eD=r7([em],([e])=>e===ol.PLAYING),eF=a$(L.info.atLiveEdge$),ez=a$(L.info.atLiveDurationEdge$),eq=a$(L.info.position$),eB=r7([eq,eM],([e,t])=>isFinite(e)&&isFinite(t)&&!!t),eW=r7([eP],([e])=>e===os.CONNECTED),eQ=a$(L.info.availableVideoStreams$),eU=d.features.audioLanguages?a$(L.info.availableAudioStreams$):r9([]),eH=a$(L.info.currentVideoStream$),eG=a$(L.info.currentAudioStream$),eK=e=>{L.setAudioStream(e)},eJ=e=>{let t;if(1===e.length&&(t=sF.default(e,0)),t??=e.find(e=>"isDefault"in e&&e.isDefault),d.features.userVideoPrefs&&i){let n=aB(d.userSalt,String(i));n?.audioTrackId&&(t=e.find(e=>e.id===n.audioTrackId)??t)}let n=ox.get(aR);return n&&(t??=e.find(({language:e})=>n===e)),t??=sF.default(e,0)},eY=!1;j.add(L.info.availableAudioStreams$.subscribe(e=>{if(!eY&&e.length){let t=eJ(e);t&&(L.setAudioStream(t),eY=!0)}})),eU.subscribe(e=>{s?.onAvailableAudioStreamsChanged?.(e.map(({label:e="",id:t="",language:i=""})=>({label:e,language:i,id:t})))}),eG.subscribe(e=>e&&s?.onAudioStreamChanged?.(e.id));let eZ=!1;j.add(L.info.availableVideoStreams$.subscribe(e=>{if(!eZ&&e.length){let t=eJ(e);t&&(L.setVideoStream(t),eZ=!0)}}));let eX=r6(void 0),e0=a$(L.info.isAutoQualityEnabled$,e=>e&&eX.set(void 0)),e1=a$(L.info.currentQuality$,()=>eX.set(void 0)),e2=r7([eX,e1],([e,t])=>e??t),e4=r7(eR,e=>e!==oc.MPEG),e5=r7([eT,eE,e0,e2,e4],([e,t,i,n,r])=>{let o=[];for(let a of(r&&o.push({value:"auto",displayValue:Z("auto_quality_option"),selected:i}),e.filter(e=>!oP(e)))){let e=t[a];o.push({value:a,displayValue:`${a}${e?sU(e):""}`,selected:!i&&a===n})}return o}),e3=a$(L.info.currentPlaybackRate$),e9=r7([e3,eF,ez],([e,t,i])=>{let n=i?1:d.controls.playbackRateMin,r=t?1:d.controls.playbackRateMax,o=d.controls.playbackRateStep,a=[];for(let t=n;t<=r;t+=o)a.push({value:t,displayValue:1===t?Z("playback_rate_1"):Z("playback_rate",{multiplier:t.toString(10)}),selected:e===t});return a}),e6=()=>({displayValue:Z("subtitles_off"),value:"off",language:""}),e7=r6(e6()),e8=r7([e7,J],([e],t)=>{t("off"===e.value?e6():e)}),te=d.features.subtitles?a$(L.info.availableTextTracks$):r9([]),tt=(C=[],A=0,{add:(e,t)=>{C[A]=[e,t],A=(A+1)%10},find:e=>C.find(([t])=>t===e)}),ti=r7([te,e8],([e,t],i)=>{let n=[],r=e.find(({id:e})=>e===t.value);if(r?.url){let[,e]=tt.find(r.url)??[];if(e)return void i(e);N.download(r.url).then(e=>{if(!e||N.isDestroyed())return;let o=new sK,a=r.language;if(a){let t=!!r.isAuto,i=o.parse(e,a);n.push({lang:a,subtitles:i,isAuto:t,id:r.id})}tt.add(r.url,n),r8(e8).value===t.value&&i(n)}).catch(()=>{g?.oneStat?.logError({errorType:"Subtitles download",fatal:!1})})}i(n)}),tn=r7([e3,eD,e8],([e,t,i],n)=>{let r;if(L.info.isLive$.getValue()&&t&&"off"!==i.value){let t=()=>{r=setTimeout(t,1e3/(3*e)),n(Date.now())};return t(),()=>clearTimeout(r)}}),tr=r7([te,e8],([e,t])=>{if(!e.length)return[];let i=[];for(let{language:n,isAuto:r,id:o}of e){let e=n&&s4(n);n&&e&&i.push({displayValue:r?Z("subtitles_auto",{language:e}):e,value:o,selected:t?.value===o,isAuto:r,language:n})}return i.length?(i.unshift({...e6(),selected:t?.value==="off"}),i):[]}),to={available:[],prev:[]},ta=r7([ev,e8,ti,tn],([e,t,i,n])=>{let r=L.info.isLive$.getValue();if(r&&to.prev!==i){let e=i.find(({id:e})=>e===t.value),n=to.prev.find(({id:e})=>e===t.value);e&&(to.available=[{...e,subtitles:[...n?.subtitles??[],...e.subtitles]}],to.prev=i)}if(t&&"off"!==t.value){let n;return((e,t,i,n=!1)=>{let r=i.find(({id:e})=>e===t.value)?.subtitles;if(n)return r?.find(({startTime:t,endTime:i})=>s0(e,t,i));let o=e>=sJ,a=e<sJ;if(sJ=e,a&&(sY=!1),oJ(h)&&s0(e,h.startTime,h.endTime)&&sZ===t.value)return h;if(!oJ(v)&&r?.length&&!sY){v=r.find(({startTime:t,endTime:i})=>s0(e,t,i)||o&&sX(e,t,i)),h=void 0,!oJ(v)&&r[r.length-1].endTime<e&&(sY=!0);return}if(s0(e,v?.startTime,v?.endTime))return h=v,v=void 0,sZ=t.value,h;(o&&((e,t=0,i=0)=>e>t&&e>i)(e,v?.startTime,v?.endTime)||a&&sX(e,v?.startTime,v?.endTime))&&(v=void 0)})(r?(n=L.experimental.getCurrentTime$.getValue(),n?.()??x?.currentTime??0):e,t,r?to.available:i,r)}}),ts=r7([ta],([e])=>e?.texts?e.texts:[]);j.add(e8.subscribe(e=>{if("off"===e.value)s?.onSubtitleOff?.();else{let t=sz.default(s1).find(([t,i])=>i===e.displayValue);s?.onSubtitleOn?.(t?t[0]:"",e.value)}}));let tl=r6(!0),tu=r7([e_,ej,eq,ek],([e,t,i,n])=>{let r=e?.end??0;return n?(r-(-i+n-t))/t:r/t}),td=a$(L.info.availableSources$),tc=r7([td],([e])=>Object.keys(e?.[oc.MPEG]||{}).length>0),tf=async(e,t=()=>Promise.resolve())=>{tD.ui.settingsMenu.visible$.set(!0),await t(),P.log("open settings menu",{wasOpenedByKeyboard:e})},tp=()=>{let e=Math.max(d.volumeMinRestore,aI()??0);return 0===e?d.volumeDefault:e},th=e=>{let t=0===e?tp():e,i=L.info.muted$.getValue();I({message:`set volume, volume: ${e}, preferredVolume: ${t}`});let n=!o||ee.is("ads");i&&e>0&&n&&(i=!1),L.setVolume(e,i),V.setVolume(e)},tv=e=>{let t=L.info.volume$.getValue();I({message:`set muted, currentVolume: ${t}, mute: ${e}`});let i=ee.is("ads");if(L.setMuted(e,i),V.setVolume(e?0:t),!e&&0===t){let e=tp();L.setVolume(e),V.setVolume(e)}},tm=r6(!1),tg=e=>{P.log("set looped",{isLooped:e}),tm.set(e),L.setLooped(e)};tg(m);let t_=(e,{byUser:t=!1}={})=>{I({message:`set quality, quality: ${e}`}),P.log("set quality",{quality:e}),t&&ef.next(e),L.setAutoQuality("auto"===e),ox.remove(aE),"auto"!==e&&(aM(i,e),eX.set(e),L.setQuality(e))},tb=e=>{I({message:`set trafficSavingEnabled, value: ${e}`}),P.log("set traffic saving enabled",{trafficSavingEnabled:e});let t=e?od.TRAFFIC_SAVING:od.UNKNOWN;L.setPredefinedQualityLimits(t)},ty=e=>{I({message:`set highQualityEnabled, value: ${e}`}),P.log("set high quality enabled",{highQualityEnabled:e}),tw(e?od.HIGH_QUALITY:od.UNKNOWN)},tw=e=>{L.setPredefinedQualityLimits(e)},tk=(e,t=!0)=>{P.log("set playback rate",{playbackRate:e}),L.setPlaybackRate(e),d.features.saveRate&&_&&!L.info.isLive$.getValue()&&t&&ox.set(aV,JSON.stringify({rate:e}))},tx=(e={...e6(),selected:!1})=>{P.log("set subtitles",{...e}),"off"!==e.value&&eu.next(e.isAuto?e.value+"_auto":e.value),ec.next({enabled:"off"!==e.value,lang:e.language,auto:!!e.isAuto}),e7.set(e)},tS=e=>{P.log("toggle subtitles");let t=r8(e8);t?.value==="off"?t$(e):tC()},t$=(e,t)=>{let i;P.log("subtitle on");let n=r8(tr),r=r8(K),o=D??r;t&&(i=n.find(e=>e.value===t)),tx((i??=n.filter(e=>"off"!==e.value).find(e=>e.language===o))??n[1])},tC=()=>{P.log("subtitle off"),tx(void 0)};j.add(L.info.availableTextTracks$.subscribe(e=>{s?.onAvailableSubtitlesChanged?.(function(){let t=[];for(let{language:i,isAuto:n,id:r}of e){let e=i&&s4(i);i&&e&&t.push({id:r,language:i,title:n?Z("subtitles_auto",{language:e}):e})}return t}())}));let tA=r6(!0),tT=e=>{tA.set(e)},tE=(e,t,i=!0)=>{if(I({message:`seek to time, time: ${e}`}),P.log("seek to time",{time:e,action:t,forcePrecise:i}),el.next(t),L.info.isLive$.getValue()){let t=Math.min(0,L.info.duration$.getValue()+e);L.seekTime(t,i)}else L.info.isEnded$.getValue()&&(I({message:"seek after ended, call callbacks.onPlay"}),s?.onPlay?.()),L.seekTime(e,i)},tP=(e,t,i=!1)=>{I({message:`seek to percent, percent: ${e}`}),P.log("seek to percent",{percent:e,action:t}),tE(r8(ej)*e,t,i)},tL=r6(void 0),tR=r6(!1),tV=e=>{tL.set(e)},tO=r7([ev,ej,tL],([e,t,i],n)=>{n(oL(i)?i*t:e)}),tI=r6(!1),tM=e=>{if(oA(tD),L.info.isEnded$.getValue())return;let t=!e;if("ads"===r8(tD.playerPhase)){I({message:`pause ads, internalCall: ${t}`}),P.log("pause ads",{internalCall:t}),V.pause();return}I({message:`pause video, internalCall: ${t}`}),P.log("pause video",{internalCall:t}),t&&s?.onPause?.(),L.pause()},tN=e=>{oA(tD);let t=!e;if("ads"===r8(tD.playerPhase)){I({message:`play ads, internalCall: ${t}`}),P.log("play ads",{internalCall:t}),V.play();return}I({message:`play video, internalCall: ${t}`}),P.log("play video",{internalCall:t}),t&&s?.onPlay?.(),L.play()},tj=(e,t)=>{oA(tD),I({message:`first start, show ads: ${e}, internalCall: ${!t}`}),P.log("first start",{showAds:e,external:t}),e?X.set("ads"):(X.set("video"),t?L.play():tD.actions.internal.togglePlay())},tD={interfaceLanguage$:K,isCyrillicRelatedInterface$:Y,initVideo:e=>{I({message:`init video, config: ${JSON.stringify(e)}`}),oz.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[oq()]}),L.initVideo(e),P.log("init video"),e.subtitles&&L.setExternalTextTracks(e.subtitles),k=e,D=e.subtitlesForcedLanguage||""},videoId:i,playerPhase:ee,vsid:z,state:{positionExact$:ev,positionWithScrubbing$:tO,duration$:ej,playbackState$:em,playbackStateRealistic$:eg,isPlaying$:eD,isLoaderVisible:ea,bufferedProgress$:tu,isLive$:ey,canChangePlaybackSpeed$:ew,isActiveLive$:eF,isOldestAvailableLive$:ez,isRewindableLive$:eB,isEnded$:eb,muted$:eS,volume$:ex,trafficSavingEnabled$:e$,highQualityEnabled$:eC,autoQualityLimitingAvailable$:eA,availableVideoStreams$:eQ,availableAudioStreams$:eU,videoStream$:eH,audioStream$:eG,currentQuality$:e2,isAutoQualityEnabled$:e0,availableQualities$:e5,currentPlaybackRate$:e3,availablePlaybackRates$:e9,currentSubtitle$:e8,availableTextTracks$:te,availableSubtitlesList$:tr,currentSubtitleCaptions$:ts,isAutoSubtitleCaptionVisible$:tl,chromecastState$:eP,chromecastDeviceName$:eL,chromecastConnected$:eW,currentFormat$:eR,throughputEstimation$:eV,videoBitrate$:eO,videoSize$:eI,errorLog$:Q,crashed$:H,isAudioAvailable$:eN,isAudioDisabled:!!o,canDownload:d.features.download&&!!a,availableSources$:td,hasMpegSources$:tc,looped$:tm,loadedMetadata$:W,isAutoQualityAvailable$:e4},ui:{t:Z,controlsVisible:r6(!1),touched:r6(!1),controls:{prevButton:r6(void 0),playButton:r6(void 0),replayButton:r6(void 0),nextButton:r6(void 0),playPrevChapterButton:r6(void 0),seekToInteractiveButton:r6(void 0),interactiveGraphButton:r6(void 0),liveButton:r6(void 0),time:r6(void 0),episodes:r6(void 0),volume:r6(void 0),subtitles:r6(void 0),settings:r6(void 0),context:r6(void 0),chromecast:r6(void 0),pip:r6(void 0),fullscreen:r6(void 0),vkLogo:r6(void 0),interactiveTimeIndicator:r6(void 0),timeline:r6(void 0),autoplayNextToggle:r6(void 0)},modals:{hotKeyMap:{show:r6(!1),data:r6({title:"",closeBtnText:"",groups:[]})}},isFullscreen:q,isFullscreenOpenedByKeyboard:B,isAutoplay:r6(!1),debugPanelVisible:r6(!1),episodes:{panelOpened$:r6(!1),openedByKeyboard$:r6(!1)},contextMenu:{visible$:r6(!1),btnRef$:r6(void 0),openedByBtnKeyboard$:r6(!1),openedByHotKey$:r6(!1),lastActiveElem$:r6(void 0),showContextMenuBtn$:r6(!1),position$:r6({top:0,left:0})},playerSize:en,isMobile:F,icon3DVideoVisible:r6(!1),scrubbingInProgress:tR,volumeChangingInProgress:tI,interactiveHideMobileControls:r6(!1),overlayContainer$:r6(void 0),startedByKeyboard$:r6(!1),autoplayNextEnabled$:r6(!1),timerNextVideoRunning$:r6(!0),settingsMenu:{visible$:r6(!1),ref$:r6(void 0),openedByBtnKeyboard$:r6(!1)},settingsSubMenu:{visible$:r6(!1),ref$:r6(void 0),name$:r6(void 0)},userActionsDisabled:r6(!1),hiddenControls:{volume:r6(!1),vkLogo:r6(!1),pip:r6(!1),chromecast:r6(!1),settings:r6(!1)},isControlsAvailable:tA,controlBlocks:{topLeft:r6(void 0),topRight:r6(void 0),middle:r6(void 0),bottom:r6(void 0),bottomLeft:r6(void 0),bottomRight:r6(void 0)},videoTitleInfo:r6(void 0),previewTrackNotificationVisible:r6(!1)},ads:{position:r6(0),duration:r6(0),playbackState:r6("inactive"),canSkip:r6(!1),secondsToWatchBeforeSkip:r6(0),postrollPassed:r6(!1)},webApi:{focusManager:O},actions:{internal:{preload:()=>{L.prepare()},firstStart:e=>tj(e,!1),play:()=>tN(!1),pause:()=>tM(!1),togglePlay:()=>{oA(tD);let e=r8(tD.playerPhase),t={playerPhase:e,isVideoEnded:!1,action:"none"};if(I({message:"toggle play"}),"ads"===e){t.action="play",P.log("toggle adman play",t),V.togglePlay();return}let i=()=>{I({message:"toggle play, call player.play"}),t.action="play",L.play(),s?.onPlay?.()};L.info.isEnded$.getValue()?(I({message:"toggle play, video ended, seek to 0"}),es.next(),el.next(ar.REWIND),L.seekTime(0),i()):L.info.playbackState$.getValue()!==ol.PLAYING?i():(I({message:"toggle play, call player.pause"}),t.action="pause",L.pause(),s?.onPause?.()),P.log("toggle play",t)},toggleMuted:()=>{I({message:"toggle muted"});let e=L.info.muted$.getValue();0!==L.info.volume$.getValue()||e?tv(!e):th(tp())},openSettingsMenu:tf,closeSettingsMenu:()=>{tD.ui.settingsMenu.visible$.set(!1),P.log("close settings menu")},setVolume:e=>th(e),setMuted:e=>tv(e),startVolumeChanging:()=>{tI.set(!0)},stopVolumeChanging:()=>{tI.set(!1)},setVideoStream:e=>{let t;e.language&&(t=e.language,ox.set(aR,t)),L.setVideoStream(e)},setAudioStream:e=>eK(e),setQuality:(e,t)=>t_(e,t),setTrafficSavingEnabled:e=>tb(e),setHighQualityEnabled:e=>ty(e),setPlaybackRate:tk,incrementPlaybackRate:()=>{let e=r8(ew),t=r8(e9),i=t.findIndex(({selected:e})=>e);if(i===t.length-1||!e)return t[i];let n=t[i+1];return tk(n.value),n},decrementPlaybackRate:()=>{let e=r8(ew),t=r8(e9),i=t.findIndex(({selected:e})=>e);if(0===i||!e)return t[i];let n=t[i-1];return tk(n.value),n},setSubtitle:e=>tx(e),toggleSubtitle:()=>tS(!1),startScrubbing:e=>{I({message:`start scrubbing, progress: ${e}`}),P.log("start scrubbing",{progress:e}),tR.set(!0),tV(e)},progressScrubbing:tV,completeScrubbing:(e,t=!1)=>{I({message:`complete scrubbing, progress: ${e}`}),P.log("complete scrubbing",{progress:e}),tP(e,ar.SLIDER,t),tL.set(void 0),tR.set(!1)},switchToActiveLive:()=>{el.next(ar.LIVE),I({message:"switch to active live"}),P.log("switch to active live"),L.seekTime(0),L.info.playbackState$.getValue()!==ol.PLAYING&&tD.actions.internal.togglePlay()},switchFromAdsToVideo:(e=!0)=>{oA(tD),I({message:`switch from ads to video, callPlay: ${e}`}),P.log("switch from ads to video",{callPlay:e}),X.set("video"),e&&L.play(),o&&tv(!0);let t=r8(et)?.muted,i=!L.info.muted$.getValue();void 0===t||i||tv(t),et.set(void 0)},switchFromVideoToAds:()=>{oA(tD),I({message:"switch from video to ads"}),P.log("switch from video to ads"),tD.actions.internal.pause(),eh(),X.set("ads")},skipAd:()=>{P.log("skip adman"),V.skip()},setLiveWaitingStart:e=>{oA(tD);let t=e?"LiveWaitingStart":"thumb";P.log("set live waiting start",{state:e,playerPhase:t}),X.set(t)},setLiveWaitingRecover:e=>{oA(tD);let t=e?"LiveWaitingRecover":"thumb";P.log("set live waiting recover",{state:e,playerPhase:t}),X.set(t)},setLiveWaitingRecord:e=>{oA(tD);let t=e?"LiveWaitingRecord":"thumb";P.log("set live waiting record",{state:e,playerPhase:t}),X.set(t)},getDebugTextData:()=>(oA(tD),P.log("get debug text data"),((e,t,i,n,r=["meta config not provided"])=>{let o=e.info,{width:a,height:s}=r8(i.ui.playerSize),l=o.throughputEstimation$.getValue()?.toFixed(0)??0,u=o.rttEstimation$.getValue()?.toFixed(0)??0,d=o.isAutoQualityEnabled$.getValue()?"auto":"manual",c=`${ak} (core: ${oa}, stat: ${an}, shared: ${ow})`,f=r8(i.state.errorLog$),p=f.length?`
|
|
50
|
+
`+f.map((e,t)=>`${t}) Type: ${e.id}
|
|
51
|
+
Message: ${e.message} (${e.thrown})
|
|
52
|
+
Trace: ${e.thrown?.stack}
|
|
53
|
+
`).join(`
|
|
54
|
+
`):void 0,h=i.state.isAudioDisabled?"disabled":r8(i.state.isAudioAvailable$)?void 0:"unavailable",v=e.info.currentVideoStream$.getValue(),m=e.info.currentAudioStream$.getValue(),g=[];v&&g.push(`Video: ${v?.codec??""}`+(v?.hdr?" (HDR)":"")),m&&g.push(`Audio: ${m?.codec??""}`+(m?.language?` (${m.language})`:""));let _=o.currentQuality$.getValue(),b="";if(_){let e=o.availableQualitiesFps$.getValue()[_];b=e?`${e}fps`:""}let y=o.httpConnectionType$.getValue(),w=Math.max((o.currentBuffer$.getValue()?.end??0)-r8(i.state.positionExact$),0),k={Version:c,Browser:navigator.userAgent,Config:r.join(", "),"United video id":String(i.videoId),TraceId:n,VSID:r8(i.vsid),"Content host":o.hostname$.getValue(),"Connection type":y?y+(o.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${l}Kbps @ ${u}ms RTT`,Format:o.currentFormat$.getValue(),"Available Formats":t?.sources?Object.keys(t.sources).join(", "):"",Streams:g.join(", "),Quality:`${d} ${_??""} ${b}`,"Available qualities":o.availableQualities$.getValue().join(", "),Audio:h,Position:`${r8(i.state.positionExact$)}s`,Buffer:`${w}s`,State:`${r8(i.playerPhase)} ${o.playbackState$.getValue()??""}`,"Player size":`${a}x${s}`,URL:window.location.href,Errors:p};return ad.default(k).filter(([e,t])=>void 0!==t).map(([e,t])=>`${e}: ${t}`).join(`
|
|
55
|
+
`)})(L,k,tD,E.getTraceId(),w)),getTraceTextData:()=>(oA(tD),JSON.stringify(E.getFinishedSpans())),getDebugPanelData:()=>(oA(tD),((e,t,i)=>{let n=e.info,{width:r,height:o}=r8(i.ui.playerSize),a={version:ak,viewport:`${r}x${o}`,volume:Math.round(100*r8(i.state.volume$))};a.id=i.videoId,n.currentFormat$.getValue()&&(a.provider=n.currentFormat$.getValue()),n.hostname$.getValue()&&(a.cdn=n.hostname$.getValue());let s=n.intrinsicVideoSize$.getValue();s&&(a.videoSize=`${s.width}x${s.height}`);let l=n.currentBuffer$.getValue(),u=n.currentNativeBuffer$.getValue(),d=n.isLive$.getValue(),c=n.liveBufferTime$.getValue();l&&u&&(d&&c?(a.buffer=l.end-c,a.nativeBuffer=u.end-c):(a.buffer=Math.max(l.end-r8(i.state.positionExact$),0),a.nativeBuffer=Math.max(u.end-r8(i.state.positionExact$),0))),a.position=r8(i.state.positionExact$);let f=n.throughputEstimation$.getValue();f&&(a.speed=f);let p=n.videoBitrate$.getValue();p&&(a.bitrate=p);let h=n.liveLatency$.getValue();h&&(a.liveLatency=h);let v=n.currentVideoSegmentLength$.getValue();v&&(a.currentVideoSegmentLength=v);let m=n.currentAudioSegmentLength$.getValue();m&&(a.currentAudioSegmentLength=m);let g=r8(i.vsid);"string"==typeof g&&(a.vsid=g);let _=e.info.currentVideoStream$.getValue()?.codec;_&&(a.videoCodec=_);let b=e.info.currentAudioStream$.getValue()?.codec;b&&(a.audioCodec=b),e.info.currentVideoStream$.getValue()?.hdr&&(a.hdr=!0);let y=e.info.currentAudioStream$.getValue()?.language;return y&&(a.audioLanguage=y),a})(L,0,tD)),getVideoElement:()=>x,seekTime:(e,t,i)=>tE(e,t,i),clearDelayedBufferingCheckTimeout:()=>{er&&clearTimeout(er),er=null},seekToPercent:tP,getPreviewThumbsData:()=>(I({message:"getting preview thumbs data"}),P.log("get preview thumbs data",{...u}),u),downloadVideo:()=>{let e,t=(e=oT(Object.keys(L.info.availableSources$?.getValue()?.[oc.MPEG]||{}))||oF.Q_144P,k.sources[oc.MPEG]?.[e]);if(t){var i;let e;P.log("download video",{url:t}),i=k?.meta?.title||"video",(e=document.createElement("a")).href=t,e.download=`${i}.mp4`,e.style.display="none",e.click()}else{let e="There is no URL for download video";P.log("download video",{message:e}),I({message:e})}},addLanguage:a1,setLanguage:G,setLooped:tg,checkFullscreenSupport:()=>{var e;return e=document,!!of.device.isIOS||e.fullscreenEnabled||!!e.webkitFullscreenEnabled||!!e.mozFullscreenEnabled||!!e.msFullscreenEnabled}},external:{firstStart:e=>tj(e,!0),play:()=>tN(!0),pause:()=>tM(!0),stop:()=>{(oA(tD),"ads"===r8(tD.playerPhase))?I({message:"player cannot be stopped during ads via external method"}):(I({message:"player will be stopped, internalCall: false"}),p?.())},seekTime:e=>{I({message:`seek external, time: ${e}`}),P.log("seek external",{time:e}),el.next(ar.UNKNOWN),L.seekTime(L.info.isLive$.getValue()?-e:e)},setPlaybackRate:e=>{I({message:`set playback rate to: ${e}`}),P.log("set playback rate external",{playbackRate:e}),L.setPlaybackRate(e)},setAutoQualityLimits:e=>{let t,i;return t=e.max??"none",i=e.min??"none",void(I({message:`set auto quality limitation. Max: ${t}. Min: ${i}`}),P.log("set auto quality limits",{max:t,min:i}),L.setAutoQualityLimits(e))},setMuted:e=>tv(e),toggleSubtitle:()=>tS(!0),changeSubtitle:(e,t)=>{P.log("change subtitle",{enabled:e}),e?t$(!0,t):tC()},setVolume:e=>th(e),setLiveLowLatency:e=>{el.next(ar.LIVE),I({message:"live switch to low latency "+e}),P.log("live switch to low latency "+e),L.setLiveLowLatency(e)},hideControls:()=>tT(!1),showControls:()=>tT(!0),setQuality:e=>t_(e),setTrafficSavingEnabled:e=>tb(e),setHighQualityEnabled:e=>ty(e),changeAudioStream:e=>{P.log("change audio stream",{id:e});let t=L.info.availableAudioStreams$.getValue().find(t=>t.id===e);t&&eK(t)}}},callbacks:s,setUiCallbacks:e=>{M={...e}},getAdmanWrapper:()=>V,getLogger:()=>R,getPlayer:()=>L,destroy:()=>{P.log("destroy store"),j.unsubscribe(),L.destroy(),V.destroy(),g?.destroy(),U.unsubscribe(),N.destroy()}};return tD})({player:i,interfaceLanguage:_,isCyrillicRelatedInterface:b,videoId:V,isLiveCatchUpMode:w,isAudioDisabled:y,statAuthToken:r,callbacks:$,webApi:q,previewThumbsData:M,canDownload:S,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:C,stopPlayer:()=>this.stop(),statistics:this.statistics,internalsExposure:this.internalsExposure,playerId:this.playerId});let Q=()=>{if(!this.store||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(e=>$?.onCurrentFormatChanged?.(e))),this.subscription.add(this.store.state.throughputEstimation$.subscribe(e=>$?.onThroughputEstimationChanged?.(e))),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(e=>$?.onTrafficSavingEnabledChanged?.(e))),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(e=>$?.onHighQualityEnabledChanged?.(e))),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(e=>$?.onAutoQualityEnabledChanged?.(!!e))),this.subscription.add(new o1(e=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(t=>e.next(t)))}).pipe(o5(1)).subscribe(e=>$?.onCurrentPlaybackRateChanged?.(e))),this.subscription.add(this.store.state.volume$.subscribe(e=>$?.onVolumeChange?.(e))),this.subscription.add(this.store.state.muted$.subscribe(e=>{if(e)$?.onMute?.();else{let e=(this.store?.state.volume$&&r8(this.store.state.volume$))??0;$?.onUnmute?.(e)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(e=>$?.onVideoBitrateChanged?.(e))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(e=>$?.onVSIDChanged?.(e))),nT(le,{sources:P,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:L,thumbUrl:R,subtitles:N,subtitlesForcedLanguage:j,live:D,preload:o,autoplay:a,muted:l,volume:s,fromTime:u,canRewindLive:d,supportLink:c,showAds:f,adsSlotId:p,adsParams:z,adsAutoplayParam:g,duration:O,failoverHosts:x,fullScreenTarget:k,saveRate:C,shadowRootContainer:this.shadowRootContainer,outerContainerRef:this.rootContainer,volumeMultiplier:A,showEndScreen:T,adsExternalApi:F,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let e={target:this.playerContainer,props:rv(le)};this.svelteRootComponent=rR(sE,e),this.isInited||(this.isInited=!0,this.videoConfig?.callbacks?.onInited?.()),this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig}),this.uiConfig.devNullLog&&this.videoConfig?.callbacks?.onDevNullLog?o6.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):o6.destroy("ui")};this.coreConfig.asyncResolveClientChecker?op.isInited$.subscribe(e=>{e&&(console.log("UI TV SDK async start"),Q())}):Q()}initPlayer(e,t={}){if(!this.isConnected){this.postponedInitParams=[e,t];return}if(Array.isArray(e.videos)&&0!==e.videos.length)this.fatalError$.next(null);else{let t=Error("empty videos");this.fatalError$.next(t),e.callbacks?.onCrashed?.(t.message);return}this.videoConfig=s5(s8,oX(e,e=>e instanceof s7?e:void 0)),this.playerId=o3(e.playerId),this.uiConfig=o_(t.ui??{},al),this.coreConfig=t.core??{},this.statisticsConfig=t.statistics??{},this.metaConfig=t.meta,this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new o4("ui",this.playerId)),o6.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+this.videoConfig?.showAds],numbers:[oY()]}),this.videoConfig.autoplay&&=this.uiConfig.features.autoplay,this.videoConfig.showAds=this.uiConfig.ads.enable??this.videoConfig.showAds,this.videoConfig.adsSlotId=this.uiConfig.ads.slot??this.videoConfig.adsSlotId,this.videoConfig.canRewindLive&&=this.uiConfig.features.liveRewind,this.videoConfig.supportLink=this.videoConfig.supportLink??this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&this.videoConfig.videos?.[this.videoConfig.videoIndex]?this.videoConfig.videoIndex:0,this.focusManager=this._shadowRoot?new s6(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex])}play(){this.store?.playerPhase.is("LiveWaitingStart")||this.store?.playerPhase.is("LiveWaitingRecover")||this.store?.playerPhase.is("LiveWaitingRecord")||this.svelteRootComponent?.play()}pause(){this.svelteRootComponent?.pause()}stop(){if(!this.videoConfig)return;this.unmountComponent(this.svelteStubComponent);let e=this.videoConfig.videos[0];e&&(this.unmountComponent(this.svelteRootComponent),this.createPlayer(e))}setMuted(e){this.svelteRootComponent?.setMuted(e)}toggleSubtitle(){this.svelteRootComponent?.toggleSubtitle()}changeSubtitle(e,t){this.svelteRootComponent?.changeSubtitle(e,t)}setVolume(e){this.svelteRootComponent?.setVolume(e)}seekTime(e){this.svelteRootComponent?.seekTime(e)}setPlaybackRate(e){this.svelteRootComponent?.setPlaybackRate(e)}setAutoQualityLimits(e){this.svelteRootComponent?.setAutoQualityLimits(e)}setAutoQuality(){this.svelteRootComponent?.setAutoQuality()}toggleTrafficSaving(e){this.svelteRootComponent?.toggleTrafficSaving(e)}toggleHighQuality(e){this.svelteRootComponent?.toggleHighQuality(e)}changeAudioStream(e){this.svelteRootComponent?.changeAudioStream(e)}addLanguage(e){this.store?.actions.internal.addLanguage(e)}async setLanguage(e){await this.store?.actions.internal.setLanguage(e)}setLiveStart(e){this.isLiveTailPlaying()||(this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){this.store?.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){let e=this.store?.getPlayer();if(!e)return!1;let{info:t}=e;return t.canPlayLiveTailBuffer$.getValue()&&!t.isStalled$.getValue()&&!t.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){let t=this.isLiveTailPlaying(),i=e||!t,n=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0)};i&&n(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{i||n(),this.store?.destroy()})}setLiveWaitingRecord(){let e=!this.isLiveTailPlaying(),t=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0)};e&&t(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{e||t(),this.store?.destroy()})}setLiveEnd(e){let t=this.isLiveTailPlaying(),i=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};t?this.store?.callbacks&&(this.store.callbacks.onLiveEnded=i):i()}setLiveLowLatency(e){this.store?.actions.external.setLiveLowLatency(e)}setLooped(e){this.store?.actions.internal.setLooped(e)}getDebugData(){return this.store?.actions.internal.getDebugTextData()??""}getDeviceId(){return this.statistics?.oneStat?.getDeviceId()??void 0}switchToActiveLive(){this.store?.actions.internal.switchToActiveLive()}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}restoreFocus(){this.focusManager?.restoreFocus()}getTotalViewTime(){return this.statistics?.thinOneStat?.getTotalViewTime()}unmountComponent(e){e&&rO(e)}}var li=()=>{window.customElements.define("vk-video-player-tv",lt)};export{li as registerPlayerWebComponent,at as loadVKLangPack,oh as VideoQuality,ov as VideoFormat,ae as VKNumericLanguage,ak as VERSION,o8 as InterfaceLanguage};
|