@vkontakte/videoplayer-tv 1.0.4-dev.a9123e27.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.
Files changed (50) hide show
  1. package/esnext.esm.js +48 -45
  2. package/package.json +5 -4
  3. package/types/VKVideoPlayerTv/HTMLElement.d.ts +1 -1
  4. package/types/VKVideoPlayerTv/index.svelte.d.ts +94 -94
  5. package/types/components/Ads/admanWrapper.d.ts +75 -75
  6. package/types/components/Ads/types.d.ts +26 -26
  7. package/types/components/Controls/types.d.ts +3 -3
  8. package/types/components/Icons/constants.d.ts +5 -5
  9. package/types/components/Icons/utils.d.ts +1 -1
  10. package/types/components/Root/types.d.ts +49 -49
  11. package/types/config.d.ts +95 -95
  12. package/types/constans/index.d.ts +2 -2
  13. package/types/index.d.ts +10 -10
  14. package/types/services/statistics.d.ts +13 -13
  15. package/types/store/index.d.ts +207 -207
  16. package/types/store/utils.d.ts +34 -34
  17. package/types/translation/index.d.ts +2 -2
  18. package/types/translation/labels.d.ts +1 -1
  19. package/types/translation/packs/en.d.ts +1 -1
  20. package/types/translation/packs/ru.d.ts +1 -1
  21. package/types/translation/types.d.ts +5 -5
  22. package/types/types/index.d.ts +199 -199
  23. package/types/types/svg.d.d.ts +5 -0
  24. package/types/utils/WebVttParser.d.ts +11 -11
  25. package/types/utils/attachments/defferedDisableByCondition.d.ts +3 -3
  26. package/types/utils/changeVolume.d.ts +6 -6
  27. package/types/utils/elementHelpers.d.ts +2 -2
  28. package/types/utils/findCurrentSubtltlePhrase.d.ts +1 -1
  29. package/types/utils/fullscreen.d.ts +14 -14
  30. package/types/utils/roundFps.d.ts +1 -1
  31. package/types/utils/sanitizeHtml.d.ts +3 -3
  32. package/types/utils/sorts.d.ts +2 -2
  33. package/types/utils/stack/index.d.ts +7 -7
  34. package/types/utils/stack/node.d.ts +3 -3
  35. package/types/utils/subtitles.d.ts +8 -8
  36. package/types/utils/timeout.d.ts +2 -2
  37. package/types/utils/userSettings.d.ts +23 -18
  38. package/types/utils/videoConfig.d.ts +6 -2
  39. package/types/utils/volumeChange.d.ts +1 -1
  40. package/types/utils/webAPI/focusLock.d.ts +30 -30
  41. package/types/utils/webAPI/focusManager.d.ts +15 -15
  42. package/types/utils/webAPI/language.d.ts +1 -1
  43. package/es2015.cjs +0 -52
  44. package/es2015.esm.js +0 -52
  45. package/es2018.cjs +0 -52
  46. package/es2018.esm.js +0 -52
  47. package/es2024.cjs +0 -52
  48. package/es2024.esm.js +0 -52
  49. package/esnext.cjs +0 -52
  50. package/evergreen.esm.js +0 -52
package/esnext.esm.js CHANGED
@@ -1,52 +1,55 @@
1
1
  /**
2
- * @vkontakte/videoplayer-tv v1.0.4-dev.a9123e27.0
3
- * Wed, 25 Feb 2026 09:08:22 GMT
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 tu=Object.create;var Ga=Object.defineProperty;var iu=Object.getOwnPropertyDescriptor;var nu=Object.getOwnPropertyNames;var ou=Object.getPrototypeOf,ru=Object.prototype.hasOwnProperty;var au=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var su=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of nu(t))!ru.call(e,o)&&o!==i&&Ga(e,o,{get:()=>t[o],enumerable:!(n=iu(t,o))||n.enumerable});return e};var lu=(e,t,i)=>(i=e!=null?tu(ou(e)):{},su(t||!e||!e.__esModule?Ga(i,"default",{value:e,enumerable:!0}):i,e));var zl=au(()=>{"use strict";AdmanHTML=function(){"use strict";function e(x){x&&typeof x=="string"&&new AdmanHTML.OpenLinkPopupRender(C).open(x)}function t(x){Me.initMode(x.slot?"slot":"json",{slot:x.slot,version:C.version}),C.slotId=x.slot,C.playerEl=x.playerEl,C.wrapper=x.wrapper,C.videoEl=x.videoEl,C.audioEl=x.audioEl,C.clickEl=x.clickEl,C.quality=parseInt(x.videoQuality||x.params&&x.params.videoQuality||360,10),C.browser=x.browser||{},C.config=x.config||{},C.pauseOnHide=x.pauseOnHide||!1,C.viewabilityValue=x.viewabilityValue||.5,C.viewabilityEl=x.viewabilityEl||C.videoEl,C.disclaimer=x.disclaimer!==!1,C.callToActionButton=x.callToActionButton!==!1,C.forcePreloadAdditionalData=!!x.forcePreloadAdditionalData,C.ctaStyles=x.ctaStyles,C.pause=p,C.resume=a,C.openPopup=e;var G=AdmanHTML.Utils.getPageLocation(),ie=AdmanHTML.Utils.getHostname(G||""),Re=AdmanHTML.Utils.isMobile(navigator.userAgent||navigator.vendor||window.opera);AdmanHTML.Utils.isElement(C.videoEl)&&Re&&C.videoEl.setAttribute("playsinline",""),C.location={top:G,topEncoded:encodeURIComponent(G||""),hostname:ie,hostnameEncoded:encodeURIComponent(ie||"")},Me.rb(Me.code.ADMAN_SUCCESSFULLY_INITIALIZED),C.stats.metrics("initing"),b=x.midrollPointsP||null,je=!b&&x.midrollPoints?x.midrollPoints:null,C.config.vpaidJsInterface||(C.config.vpaidJsInterface=q),C.config.vpaidHtmlInterface||(C.config.vpaidHtmlInterface=ce);var $e="https://ad.mail.ru/vp/"+C.slotId+"?app_name=admanhtml&version="+this.getVersion();if(x.params&&x.params.constructor&&x.params.constructor===Object){var Je=[];"flash"in x.params||(x.params.flash=AdmanHTML.Utils.checkFlash()?1:0);for(var Be in x.params)x.params.hasOwnProperty(Be)&&Je.push(Be+"="+x.params[Be]);var nt=AdmanHTML.Utils.getUserIdQuery();nt&&Je.push(nt),Je.length&&($e+="&"+Je.join("&"))}if((C.slotId||x.json||x.adUrl)&&!C.browser.adBlock){var Ke={},ai=this;C.slotId?Ke.url=$e:x.adUrl?(x.adUrl.indexOf("ad.mail.ru/")!==-1&&(x.adUrl+=x.adUrl.indexOf("?")===-1?"?":"&",x.adUrl+="version="+this.getVersion()),Ke.url=x.adUrl):Ke.data=x.json,de=new AdmanHTML.AdSlot(C,Ke,function(){var si=de.getRootSettings()||{},fi=si.requestHostname;if(fi&&!AdmanHTML.Utils.matchHostname(C.location.hostname,fi,j))return C.stats.logError("HOSTNAME_MISMATCH:"+fi+":"+C.location.topEncoded,{impressionID:si.impressionID,padID:si.padID,bannerIDs:si.bannerIDs}),void(C.callbacks.onError&&C.callbacks.onError());C.location.hostname||C.stats.logError("HOSTNAME_EMPTY:"+fi+":"+C.location.topEncoded),C.cb("onReady",[{settings:de.settings}]);var Li=1e6,Si=[],He=[],Ue=x.params&&x.params.duration?parseInt(x.params.duration,10):Li;Ue===0&&(Ue=Li),je&&je.sort(AdmanHTML.Utils.numSorter),b&&b.sort(AdmanHTML.Utils.numSorter);var Xe=de.getSection("midroll")||[],Uo=de.getServices("midroll",function(vt){return!vt.started()&&vt.isAfter()})||[];Xe=Xe.concat(Uo),Xe.forEach(function(vt){var qe=vt.getAd();qe.point||qe.pointP||(qe.pointP=50)}),Xe.sort(function(vt,qe){var Bi=vt.getAd(),Wi=qe.getAd();return Bi.pointP&&Wi.pointP?Bi.pointP-Wi.pointP:(Bi.point||Bi.pointP/100*Ue)-(Wi.point||Wi.pointP/100*Ue)}).forEach(function(vt){if(!vt.isEmpty||!vt.isEmpty()){var qe=vt.getAd();je&&je.length?(qe.point=je.shift(),qe.pointP=null,He.push(qe.point),vt.addImmutableProperty("point",qe.point)):b&&b.length?(qe.pointP=b.shift(),qe.point=null,Si.push(qe.pointP),vt.addImmutableProperty("pointP",qe.pointP)):je||b||(qe.point?(vt.addImmutableProperty("point",qe.point),He.push(qe.point)):qe.pointP&&(vt.addImmutableProperty("pointP",qe.pointP),Si.push(qe.pointP)))}}),$=Si.sort(AdmanHTML.Utils.numSorter),I=He.sort(AdmanHTML.Utils.numSorter);var Yi=de.getSection("research");Yi&&Yi.length>0&&(Se=Yi[0]),C.pauseOnHide&&xe(ai)})}else{Me.logError("Adman init failed");var Qt=C.callbacks.onError;Qt&&Qt(),F=he=Y=null}}function i(x,G){G=G||!1;var ie;if(F&&(F.log("sectionShown"),F.disposed||(F.dispose(),F.disposed=!0,k(F,Y)),x&&F.log("closedByUser")),Y&&!ue[Y]&&(ue[Y]=Y!=="midroll",ie=x?C.callbacks.onClosed:C.callbacks.onCompleted),Ce[Y]&&he&&(Ce[Y]=Ce[Y].concat(he.splice(0,he.length))),F=he=Y=null,s(),typeof G=="object"&&G.force===!0)return void((ie=C.callbacks.onError)&&ie(G.message));ie&&ie()}function n(x){var G=de.getSettings(Y).maxBannersShow||0,ie=ke[Y]||0,Re=!G||ie<G;if(F&&!F.disposed&&(F.complete&&F.log("playbackCompleted"),F.dispose(),F.disposed=!0,k(F,Y)),he&&he.length&&Re)F=he.shift(),ke[Y]=ie+(F.isEmpty()?0:1),F.reset(),F.started=!0,F.start();else{var $e=de.getNextAfterService(Y);Y!=="midroll"&&$e&&Re?$e.start(function(){he=de.getSection(Y),n()}):de.getSettings(Y).loop&&Ce[Y]&&Ce[Y].length?(he=Ce[Y],Ce[Y]=[],n()):i(!1,x)}}function o(x){he||(Y=x||"preroll",de.resetServices(Y),ue[Y]=!1,he=de.getSection(Y),x==="midroll"&&(he=c(he)),n(),Y&&(Ce[Y]=Ce[Y]||[]),F&&(F.log("sectionStarted"),C.debugMode&&console.log(Y,F.getAd(),F.getSettings(),he)),r(Y),C.stats.metrics("started"))}function r(x){(Le=de.getDebug(x))&&Le.start()}function s(){Le&&Le.dispose(),Le=null}function u(x,G){function ie(He,Ue){for(var Xe=0;Xe<He.length&&!(Math.abs(He[Xe])>Ue);Xe++);return Xe>0?[He[Xe-1]]:[]}function Re(He){var Ue=He.getAd();return!(Ue.point&&I.indexOf(Ue.point)===-1||Ue.pointP&&$.indexOf(Ue.pointP)===-1)&&(Ue.point&&Ue.point<=si||Ue.pointP&&Ue.pointP<=fi)}function $e(){U=$.reduce(function(He,Ue){var Xe=Math.ceil(G*Ue/100);He.indexOf(Xe)===-1&&He.push(Xe)},I).sort(AdmanHTML.Utils.numSorter)}function Je(He){return U.reduce(function(Ue,Xe){return Ue===0&&Xe>0&&Xe-He>=0?Xe-He:Ue},0)}if(!isNaN(x)&&!isNaN(G)){var Be=parseInt(x),nt=Math.floor(100*x/G);le=G,ee=$&&isFinite(nt)?ie($,nt):[],re=I?ie(I,Be):[],ee[0]&&re[0]&&(Math.abs(ee[0]*le/100)>Math.abs(re[0])?re=[]:ee=[]);var Ke=typeof de=="object"&&typeof de.getSettings=="function"?de.getSettings("midroll").midpointAllowableDelta:void 0;S=Ke??S;var ai=100*S/G,Qt=S!==0&&S<5?S:5,si=Be+Qt,fi=nt+Qt/G*100;if(de.getServices("midroll",function(He){return!(!He.isAfter()||He.started()||!Re(He))}).forEach(function(He){var Ue=Be-He.getAd().point,Xe=nt-He.getAd().pointP;Ue<S||Xe<ai||S===0?He.start():C.debugMode&&console.log("skip midroll fetch")}),ee.length&&ee[0]>0||re.length&&re[0]>0){var Li=!1,Si=de.getSection("midroll");Si&&Si.forEach(function(He){var Ue=He.getAd();(Ue.pointP&&~ee.indexOf(Ue.pointP)||Ue.point&&~re.indexOf(Ue.point))&&(Li=!0)}),Li&&C.cb("adMidrollPoint",[x])}return C.forcePreloadAdditionalData?($e(),Je(x)):void 0}}function c(x){function G(Re,$e){var Je=Re.getAd(),Be=$e.getAd();return(Je.point||Je.pointP*le/100)-(Be.point||Be.pointP*le/100)}var ie=[];return x&&x.forEach(function(Re){var $e=Re.getAd();($e.pointP&&~ee.indexOf($e.pointP)||$e.point&&~re.indexOf($e.point))&&ie.push(Re)}),I.forEach(function(Re,$e){~re.indexOf(Re)&&(I[$e]=-I[$e])}),$.forEach(function(Re,$e){~ee.indexOf(Re)&&($[$e]=-$[$e])}),ie.sort(G),ie}function h(){C.cb("onSkipped"),F&&(F.log("closedByUser"),F.skip(n))}function p(){F&&(F.log("playbackPaused"),F.pause())}function a(x){F&&(x||F.log("playbackResumed"),F.resume())}function d(x){x=x<0?0:x>1?1:x,F&&F.setVolume(x)}function m(){F&&F.log("fullscreenOn")}function g(){F&&F.log("fullscreenOff")}function _(){i()}function v(x,G){C.callbacks[x]=G}function L(x){var G=[],ie=de.getSection(x||"preroll");return ie&&ie.forEach(function(Re){Re.isEmpty()||G.push(Re.getExtendedAdForApp())}),G}function N(x){return de.getAfterServices(x||"preroll")}function k(x,G){x.isEmpty()||x.isStat()||Ce[G]&&Ce[G].push(x)}function y(x){return(x.right-x.left)*(x.bottom-x.top)}function T(x,G){return{left:x.left+G.left,right:x.right+G.left,top:x.top+G.top,bottom:x.bottom+G.top}}function w(x){return x&&!isNaN(x)?x:null}function E(x,G){var ie=x.document,Re=G==="width"?"clientWidth":"clientHeight",$e=G==="width"?"innerWidth":"innerHeight",Je=x[$e],Be=ie.body[Re],nt=ie.documentElement[Re],Ke=1/0;return Ke=w(Be)||Ke,Ke=w(nt)||Ke,Je&&!isNaN(Je)&&(Ke=Math.min(Ke,Je)),Ke}function f(x){return{width:E(x,"width"),height:E(x,"height")}}function B(x,G){var ie=f(G);return{left:Math.max(0,x.left),right:Math.min(ie.width,x.right),top:Math.max(0,x.top),bottom:Math.min(ie.height,x.bottom)}}function A(x,G){try{for(var ie=x.getBoundingClientRect(),Re=y(ie),$e=G,Je=$e.parent;$e!==Je;){var Be=$e.frameElement.getBoundingClientRect();ie=T(ie,Be);var nt=Math.max(Be.left,ie.left),Ke=Math.min(Be.right,ie.right),ai=Math.max(Be.top,ie.top),Qt=Math.min(Be.bottom,ie.bottom);ie.left=nt,ie.right=Ke<nt?nt:Ke,ie.top=ai,ie.bottom=Qt<ai?ai:Qt,$e=$e.parent}ie=B(ie,Je);var si=y(ie);return{left:ie.left,right:ie.right,top:ie.top,bottom:ie.bottom,percent:si/Re*100}}catch{return{left:0,right:0,top:0,bottom:0,percent:0}}}function O(){return window.hasOwnProperty("IntersectionObserver")}function D(x){try{if(x===x.top)return"ON_PAGE";for(var G=x;G!==G.parent;){if(G.document.domain!==G.parent.document.domain)return"XD_FRAME";G=G.parent}return"S_FRAME"}catch{}return"XD_FRAME"}function Z(x){return!O(x)&&D(x)!=="XD_FRAME"}function ae(x,G,ie){te(ie,A(x,window).percent>=100*G)}function P(x){return x.mozVisibilityState?"mozvisibilitychange":x.webkitVisibilityState?"webkitvisibilitychange":x.visibilityState?"visibilitychange":""}function W(x){te(x,!0)}function H(x){te(x,!1)}function te(x,G){var ie=x.getPlayStatus();x.prevVisibility!==G&&(x.prevVisibility=G,ie.curStatus!==void 0&&ie.curStatus!==ie.prevStatus&&(G?x.resume():x.pause()))}function xe(x){var G=x,ie=C.viewabilityValue,Re=C.viewabilityEl;if(Re){if(O()){var $e=new IntersectionObserver(function(nt){nt.forEach(function(Ke){te(G,Ke.intersectionRatio>=ie)})},{threshold:[.1,.2,.3,.4,.5,.6,.7,.8,.9,1]});$e.observe(Re)}else if(Z){var Je=function(){ae(Re,ie,G)};window.addEventListener("resize",Je,!1),window.addEventListener("scroll",Je,!1)}}var Be=(P(document),X.hasFocus());setInterval(function(){var nt=X.hasFocus();Be!==nt&&(Be=nt,Be?W(G):H(G))},500)}function J(){return C.playStatus===void 0?{prevStatus:void 0,curStatus:void 0}:C.playStatus}var de,Y,he,F,Le,Se,le,C={version:"2.2.57",debugMode:!0,callbacks:{},cb:function(x,G){switch(x){case"onCompleted":F&&(F.complete=!0),n();break;case"onError":F&&(F.error=!0),n(G);break;case"onClosed":i(!0);break;default:var ie=C.callbacks[x];ie&&ie.apply(this,G)}}},se=window.location.protocol==="http:"?"http:":"https:",q=se+"//ad.mail.ru/static/admanhtml/vpaid-js-interface.swf",ce=se+"//ad.mail.ru/static/rbadman-vpaid.html",Me=new AdmanHTML.Stats(C),Ie=new AdmanHTML.Viewability,je=[],b=[],I=[],$=[],U=[],ee=[],re=[],ke={},Ce={},S=3,j=function(){for(var x=window,G=frameElement;G;){try{G=x.parent.frameElement}catch{break}x=x.parent}return x}(),X=j.document;C.stats=Me,C.viewability=Ie,C.protocol=se,C.stats.metrics();var ue={};return{init:t,start:o,stop:_,pause:p,resume:a,setVolume:d,fullscreenOn:m,fullscreenOff:g,setFullscreen:function(x){x?m():g()},skip:h,destroy:_,getPlayStatus:J,getSlot:function(){return C.slotId},setSlot:function(x){C.slotId=x},getVersion:function(){return C.version},getBannersForSection:L,getServicesForSection:N,hasSection:function(x){return x=x||"preroll",!(!L(x).length&&!N(x).length)},setDebug:function(x){C.debugMode=x},setPosition:u,getUserIdQuery:AdmanHTML.Utils.getUserIdQuery,onReady:v.bind(this,"onReady"),onError:v.bind(this,"onError"),onStarted:v.bind(this,"onStarted"),onPaused:v.bind(this,"onPaused"),onPlayed:v.bind(this,"onPlayed"),onCompleted:v.bind(this,"onCompleted"),onClosed:v.bind(this,"onClosed"),onSkipped:v.bind(this,"onSkipped"),onClicked:v.bind(this,"onClicked"),onTimeRemained:v.bind(this,"onTimeRemained"),onDurationChanged:v.bind(this,"onDurationChanged"),adMidrollPoint:v.bind(this,"adMidrollPoint"),_onVPAIDStarted:v.bind(this,"onVPAIDStarted"),research:{pause:function(){Se&&Se.pause()},resume:function(){Se&&Se.resume()},complete:function(){Se&&Se.setComplete()},setVolume:function(x){Se&&Se.setVolume(x)},setFullscreen:function(x){Se&&Se.setFullscreen(x)},setPosition:function(x,G){Se&&Se.setPosition(x,G)}}}},AdmanHTML.Ad=function(e,t){"use strict";function i(y){y&&y.forEach(function(T){n(T.url,T.type,T)})}function n(y,T,w){var E,f,B,A;if(y){try{y=decodeURIComponent(y)}catch{}if(T==="playheadReachedValue")w.thresholdValue!==void 0||w.value!==void 0?(E=parseInt(w.thresholdValue||w.value,10),t.stats.push({name:"thresholdValue",value:E,type:"thresholdValue."+E,url:y})):w.thresholdPValue===void 0&&w.pvalue===void 0||(E=parseInt(w.thresholdPValue||w.pvalue,10),t.stats.push({name:"thresholdPValue",value:E,type:"thresholdPValue."+E,url:y}));else if(T==="playheadViewabilityValue"){var O=parseInt(w.viewablePercent,10),D=w.ovv===void 0&&w.mrc===void 0||!!w.ovv||!!w.mrc,Z="";B=w.startTimer!==void 0?parseInt(w.startTimer,10):0,A=w.endTimer!==void 0?parseInt(w.endTimer,10):0,O=isNaN(O)?50:O,w.value!==void 0?(E=parseInt(w.value,10),f="ovvValue"):w.pvalue!==void 0?(E=parseInt(w.pvalue,10),f="ovvPValue"):w.duration!==void 0&&(E=parseInt(w.duration,10),f="mrcValue",D||(Z=w.unload?"unload":"complete"));var ae={name:f,value:E,url:y,percent:O,viewable:D,start:B,end:A,onevent:Z};"target"in w&&(ae.target=w.target),t.stats.push(ae)}else if(T==="playheadTimerValue"){B=w.startTimer!==void 0?parseInt(w.startTimer,10):0,A=w.endTimer!==void 0?parseInt(w.endTimer,10):0;var P=w.rate!==void 0?parseInt(w.rate,10):1;t.stats.push({name:"timerValue",rate:P,url:y,start:B,end:A})}else t.stats.push({name:T,type:T,url:y})}}function o(y){t.click=y,t.ad&&(t.ad.urlToNavigateOnClick=y)}function r(y,T){t.extensions[y]=T}function s(y,T,w){!w&&y in t.immutables||(t.immutables[y]=T)}function u(y){t.settings=t.settings||{},AdmanHTML.Utils.deepExtend(t.settings,y)}function c(y){function T(A){var O=A.type||"";return!(~O.indexOf("video")&&O!=="video/mp4"||~O.indexOf("audio")&&O!=="audio/mp3"&&O!=="audio/mpeg")}function w(){e.stats.rb(e.stats.code.UNKNOWN_ADV_TYPE),e.stats.logError("UNKNOWN_ADV_TYPE")}if(t.ad=y,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){T(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 f,B;switch(t.ad.type){case"swf":case"application/x-shockwave-flash":if(B=t.ad.apiFramework||t.ad.api,e.browser.mobile||B&&B!=="VPAID")return w(),!1;f=B?new AdmanHTML.VpaidSwfAdRenderer(e,this):new AdmanHTML.SwfAdRenderer(e,this);break;case"javascript":case"application/javascript":if((B=t.ad.apiFramework||t.ad.api)&&B!=="VPAID")return w(),!1;f=new AdmanHTML.VpaidJsAdRenderer(e,this);break;case"video":case"video/mp4":f=new AdmanHTML.VideoAdRenderer(e,this);break;case"audio":case"audio/mp3":case"audio/mpeg":f=new AdmanHTML.AudioAdRenderer(e,this);break;case"image":case"image/bmp":case"image/gif":case"image/jpeg":case"image/png":f=new AdmanHTML.ImgAdRenderer(e,this);break;case"text":f=new AdmanHTML.TextAdRenderer(e,this);break;case"html":f=new AdmanHTML.HtmlAdRenderer(e,this);break;case"empty":f=new AdmanHTML.EmptyAdRenderer(e,this);break;case"statistics":f=new AdmanHTML.StatisticsAdRenderer(e,this);break;case"debugData":f=new AdmanHTML.DebugAdRenderer(e,this);break;case"research":f=new AdmanHTML.ResearchAdRenderer(e,this);break;case"video/x-flv":default:return w(),!1}return t.renderer=f,!0}function h(){return new AdmanHTML.Ad(e,JSON.parse(JSON.stringify(t)))}function p(){this.started&&(t.ad&&c.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 a(y,T,w){var E=y.url;E=E.replace("{requesthostname}",e.location.hostnameEncoded||""),AdmanHTML.Utils.loadImg(E);var f=T.indexOf(y);~f&&w&&T.splice(f,1)}function d(y,T){var w=T.indexOf(y);~w&&T.splice(w,1)}function m(y,T){function w(D){D=25*Math.floor(D/25);var Z=k["thresholdPValue."+D];Z&&(A=A.concat(Z))}var E=t.stats.slice(0);if(Array.isArray(y)){var f;for(f=0;f<y.length&&!~E.findIndex(function(D){return D.name===y[f]});f++);y=y[f]||y.slice(-1)}if(!e.isPopupOpen||y!=="playbackPaused"&&y!=="playbackResumed"){var B=y+(T===void 0?"":"."+T),A=k[B]?k[B].slice(0):[];A.push(B),y==="thresholdPValue"&&w(T);var O=y==="thresholdPValue"||y==="thresholdValue"||y==="closedByUser";t.stats.forEach(function(D){(y==="thresholdPValue"&&D.name==="thresholdPValue"&&D.value<T||y==="thresholdValue"&&D.name==="thresholdValue"&&D.value<T)&&a(D,E,O),~A.indexOf(D.type)&&a(D,E,O)}),t.stats=E}}function g(y,T){function w(O,D){D[Math.ceil(O.percent/10)].duration>=1e3*O.value?O.viewable?a(O,f,!0):d(O,f):B++}function E(O){O.viewable||O.onevent===T&&a(O,f,!0)}var f=t.stats.slice(0),B=0,A=y&&y.length?w:E;return t.stats.forEach(function(O){O.name==="mrcValue"&&A(O,y)}),t.stats=f,B}function _(y,T){var w,E,f=t.stats.slice(0);t.stats.forEach(function(B){(B.name==="ovvValue"&&B.value<=y||B.name==="ovvPValue"&&B.value<=T)&&(w=w||e.viewability.getViewabilityState(),E=w.percent>B.percent&&w.focus,w.state!=="UNDETERMINED"&&(E&&B.viewable||!E&&!B.viewable)&&AdmanHTML.Utils.loadImg(B.url),d(B,f))}),t.stats=f}function v(y,T){t.renderer&&t.renderer[y]&&t.renderer[y](T)}function L(){var y={};return y=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(y,t.ad),y}function N(){var y=L();return y.statistics=t.stats.slice(0),y}t=t||{stats:[],extensions:{},immutables:{}};var k={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:o,addExtension:r,addImmutableProperty:s,addSettings:u,getSettings:function(){return t.settings},addAd:c,getAd:function(){return t.ad},getAdForApp:L,getExtendedAdForApp:N,isEmpty:function(){return t.ad.type==="empty"},isStat:function(){return t.ad.type==="statistics"},clone:h,reset:p,log:m,logMRC:g,logOVV:_,start:v.bind(this,"start"),dispose:v.bind(this,"dispose"),pause:v.bind(this,"pause"),resume:v.bind(this,"resume"),setVolume:v.bind(this,"setVolume"),setFullscreen:v.bind(this,"setFullscreen"),setComplete:v.bind(this,"setComplete"),skip:v.bind(this,"skip"),setPosition:function(y,T){t.renderer&&t.renderer.setPosition&&t.renderer.setPosition(y,T)},complete:!1,error:!1}},AdmanHTML.AdSlot=function(e,t,i){"use strict";function n(A){N||(N={});for(var O in A)A.hasOwnProperty(O)&&(N[O]=A[O])}function o(A,O,D,Z,ae,P){function W(te){e.stats.metrics("inited");var xe={};--y,te&&(T++,te=typeof te=="string"?te.trim():te,typeof te=="object"||te.charAt(0)==="{"?(xe=u(te,A,O,D||0,Z,ae,P),w++):te.charAt(0)==="<"?(xe=c(te,A,O,D||0,Z,ae,P),w++):(e.stats.rb(e.stats.code.UNKNOWN_DATA_FORMAT),e.stats.logError("UNKNOWN_DATA_FORMAT"))),A.id&&(xe.banners||xe.services?xe.banners&&B.markNonEmptyService(A.id):B.markEmptyService(A.id)),r(P)}if(D&&D>4)return void r(P);var H=B.getService(A.id);H&&H.log("serviceRequested"),++y,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,W)):A.data&&setTimeout(W,0,A.data)}function r(A){if(!y){if(T&&w){var O=B.getNextOnEmptyService();if(O)return void O.start(r.bind(null,A));g();var D=A||i;return D.called||(D.called=!0,D()),void(e.debugMode&&console.log(v))}s()}}function s(){var A=e.callbacks.onError;A&&A()}function u(A,O,D,Z,ae,P,W){function H(le){return le?le.filter(function(C){return C.type&&(C.type==="sectionShown"||C.type==="sectionStarted"||C.type==="sectionEmpty")}):[]}function te(le,C,se,q){var ce=D?D.clone():new AdmanHTML.Ad(e);if(ce.addStatCollection(le.statistics),ce.addStatCollection(le.serviceStatistics),le.type==="additionalData"){var Me;le.id=le.id||AdmanHTML.Utils.createIntUID(),de.services++;var Ie=!v[se]||v[se].length===0;if(C>0&&Ie&&(f[se]=!0),le.extensions)for(var je in le.extensions)le.extensions.hasOwnProperty(je)&&h(ce,le.extensions[je],je);if(["point","pointP","hasVolume","hasPause","allowClose","allowCloseDelay","allowSeek","allowSkip","allowTrackChange","allowVolumeChange"].forEach(function($){$ in le&&ce.addImmutableProperty($,le[$])}),e.forcePreloadAdditionalData||le.doAfter!=="true"&&le.doAfter!==!0&&!le.doOnEmptyResponseFromId)Me=new AdmanHTML.ServiceAd(e),a(se,O.id,Me,le),C===0&&Ie?o(le,ce,Z+1,se,E.PRE,W):o(le,ce,Z+1,se,null,W);else{var b=le.doAfter==="true"||le.doAfter===!0?E.POST:null,I=function($,U){o(le,$||ce,le.allowRepeat?0:Z+1,se,b,function(){U&&U()})};Me=new AdmanHTML.ServiceAd(e,null,I),a(se,O.id,Me,le,ce)}}else p(se,q,ce,le),de.banners++;return ce}var xe,J=A,de={banners:0,services:0};if(typeof A=="string")try{J=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(J.settings&&J.settings.requestHostname&&!N.requestHostname&&(N.requestHostname=J.settings.requestHostname),J&&J.settings&&(N=e.slot&&e.slot.getRootSettings()||N||{},n&&typeof n=="function")){var Y=J.sections&&J.sections.preroll&&J.sections.preroll.length&&J.sections.preroll[0]||null;n({impressionID:J.settings.impressionID||"",padID:J.settings.padID||"",bannerIDs:Y&&Y.bannerID||""})}for(var he in J.sections)if(J.sections.hasOwnProperty(he)){var F=J.sections[he],Le=0;if(J.settings&&(xe=J.settings[he])&&(xe.controlsStyle=J.settings.controlsStyle||0,m(he,xe)),F.forEach(function(le){if(le.type==="debugData"){var C=new AdmanHTML.Ad(e);return C.addClick(le.url),void d(he,C,le)}var se=ae===he?P:"",q=te(le,Le,he,se);xe&&(q.addStatCollection(H(xe.statistics)),q.addSettings(xe)),Le++}),F.length===0){var Se=new AdmanHTML.Ad(e);xe&&Se.addStatCollection(H(xe.statistics)),p(he,"",Se,{type:"empty"})}}return J.type&&te(J,0,ae,P),de}function c(A,O,D,Z,ae,P,W){function H(F,Le,Se){xe(F.getElementsByTagName(Le),Se)}function te(F,Le,Se,le){H(F,Le,function(C){le(de(C),Se?J(C,Se):null,C)})}function xe(F,Le){Array.prototype.forEach.call(F,Le.bind(this))}function J(F,Le){var Se=F.attributes.getNamedItem(Le);return Se?Se.value:null}function de(F){return F&&F.childNodes&&F.childNodes[0]&&F.childNodes[0].wholeText?F.childNodes[0].wholeText.trim():null}var Y,he={banners:0,services:0};try{Y=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 H(Y,"Ad",function(F){function Le(C){var se=D?D.clone():new AdmanHTML.Ad(e);te(F,"Impression","id",function(ce){try{se.addStat(ce,"playbackStarted")}catch{}}),te(F,"Extension","type",function(ce,Me){h(se,ce,Me)}),te(F,"Error",null,function(ce){se.addStat(ce,"error")}),te(C,"Tracking","event",se.addStat);var q=C.getElementsByTagName("VideoClicks")[0];return q&&xe(q.childNodes,function(ce){ce.tagName==="ClickThrough"?se.addClick(de(ce)):ce.tagName==="ClickTracking"&&se.addStat(de(ce),"click")}),se}function Se(C){var se={width:J(C,"width"),height:J(C,"height"),id:J(C,"id"),assetWidth:J(C,"assetWidth"),assetHeight:J(C,"assetHeight"),expandedWidth:J(C,"expandedWidth"),expandedHeight:J(C,"expandedHeight"),apiFramework:J(C,"apiFramework"),adSlotID:J(C,"adSlotID"),statistics:[]};return te(C,"StaticResource",null,function(q){se.staticResource=q}),te(C,"HTMLResource",null,function(q){se.htmlResource=q}),te(C,"IFrameResource",null,function(q){se.iframeResource=q}),te(C,"CompanionClickTracking",null,function(q){se.statistics.push({type:"click",url:q})}),te(C,"Tracking","event",function(q,ce){se.statistics.push({type:ce,url:q})}),te(C,"CompanionClickThrough",null,function(q){se.urlToNavigateOnClick=q}),se}var le=J(F,"id");H(F,"InLine",function(C){var se=[];H(C,"CompanionAds",function(q){var ce=J(q,"required")||"none";H(C,"Companion",function(Me){var Ie=Se(Me);Ie.required=ce,se.push(Ie)})}),H(C,"Linear",function(q){var ce,Me=Le(q),Ie=q.parentNode;Ie&&(ce=J(Ie,"adId")||J(Ie,"adID")||J(Ie,"AdId")||J(Ie,"AdID")||J(Ie,"id")),ce=ce||le;var je={bannerID:ce,mediafiles:[],duration:AdmanHTML.Utils.convertDuration(de(q.getElementsByTagName("Duration")[0]))};O.urlToNavigateOnClick&&(je.urlToNavigateOnClick=O.urlToNavigateOnClick),H(q,"MediaFile",function(b){je.mediafiles.push({apiFramework:J(b,"apiFramework"),type:J(b,"type"),width:J(b,"width"),height:J(b,"height"),src:de(b)})}),H(q,"AdParameters",function(b){je.params=de(b);try{var I=JSON.parse(je.params);if(I&&I.settings&&(N=e.slot&&e.slot.getRootSettings()||N||{},n&&typeof n=="function")){var $=I.sections&&I.sections.preroll&&I.sections.preroll.length&&I.sections.preroll[0]||null;I.settings&&I.settings.preroll,n({impressionID:I.settings.impressionID||"",padID:I.settings.padID||"",bannerIDs:$&&$.bannerID||""})}}catch(U){console.log(U)}}),se.length&&(je.companionAds=se),p(ae||"preroll",P,Me,je),he.banners++}),H(C,"NonLinear",function(q){var ce=Le(q),Me={width:J(q,"width"),height:J(q,"height"),duration:AdmanHTML.Utils.convertDuration(J(q,"minSuggestedDuration")),mediafiles:[]};te(q,"NonLinearClickThrough",null,function(Ie){ce.addStat(Ie,"click")}),te(q,"StaticResource","creativeType",function(Ie,je){Me.mediafiles.push({type:je,src:Ie})}),p(ae||"overlay",P,ce,Me),he.banners++})}),H(F,"VASTAdTagURI",function(C){he.services++,o({url:de(C),id:O.id},Le(F),Z+1,ae,P,W)})}),he}function h(A,O,D){D==="controls"?A.addExtension("showControls",!!parseInt(O,10)):D==="skipTime2"?(O=isNaN(O)?AdmanHTML.Utils.convertDuration("00:"+O):parseInt(O,10),A.addExtension("allowCloseDelay",O)):D==="linkTxt"&&(A.addExtension("linkText",O),A.addExtension("adText",O))}function p(A,O,D,Z){D.addAd(Z)&&(D.sectionType=A,O===E.PRE&&f[A]&&(O=""),A=(O||"")+A,v[A]=v[A]||[],v[A].push(D))}function a(A,O,D,Z,ae){D.addAd(Z),D.addInheritedAd(ae),D.addStatCollection(Z.statistics),D.addStatCollection(Z.serviceStatistics),D.sectionType=A,B.addService(D,O)}function d(A,O,D){O.addAd(D)&&(O.section=A,k[A]=O)}function m(A,O){L[A]=L[A]||{},AdmanHTML.Utils.mixin(L[A],O),delete L[A].statistics,delete L[A].view,delete L[A].advertisment}function g(){"preroll midroll pauseroll overlay postroll claimroll".split(" ").forEach(function(A){var O=f[A]?v[A]:v[E.PRE+A],D=f[A]?v[E.PRE+A]:v[A],Z=v[E.POST+A];v[A]=[].concat(O||[],D||[],Z||[]),_(E.PRE+A),_(E.POST+A)})}function _(A){v[A]=[]}var v={},L={},N={},k={},y=0,T=0,w=0,E={PRE:"pre-",POST:"post-"},f={},B=new AdmanHTML.ServiceStorage(e);return o({url:t.url,data:t.data}),{getSection:function(A){return v[A]},getAfterServices:B.getAfterServices,getNextAfterService:B.getNextAfterService,resetServices:B.resetAll,getServices:B.getServices,removeService:B.removeService,getSettings:function(A){return L[A]||{}},getRootSettings:function(){return N},getDebug:function(A){return k[A]}}},AdmanHTML.ServiceAd=function(e,t,i){"use strict";function n(m){return t.ad=m,!0}function o(m){t.inheritedAd=m}function r(m,g){t.inheritedAd.addImmutableProperty(m,g,!0)}function s(m){var g=m?m.filter(function(_){return _.type==="serviceRequested"||_.type==="serviceAnswerEmpty"}):[];g&&g.forEach(function(_){u(_.url,_.type,_)})}function u(m,g){m=decodeURIComponent(m),t.stats.push({name:g,type:g,url:m})}function c(m){d=!0,i&&i(t.inheritedAd,m)}function h(){d=!1}function p(){return!(e.forcePreloadAdditionalData||!t.ad||!t.ad.doAfter)&&(t.ad.doAfter===!0||t.ad.doAfter==="true")}function a(m){function g(v){AdmanHTML.Utils.loadImg(v.url);var L=_.indexOf(v);~L&&_.splice(L,1)}var _=t.stats.slice(0);t.stats.forEach(function(v){v.type===m&&g(v)}),t.stats=_}t=t||{stats:[]};var d=!1;return{addStatCollection:s,addStat:u,addAd:n,addInheritedAd:o,addImmutableProperty:r,getAd:function(){return t.ad},start:c,reset:h,started:function(){return d},log:a,isAfter:p}},AdmanHTML.ServiceStorage=function(e){"use strict";function t(_,v){var L=_.getAd();m.push(L.id),d[L.id]={service:_},v&&d[v]&&(d[v].children=d[v].children||[],d[v].children.push(L.id)),e.forcePreloadAdditionalData||L.doAfter!=="true"&&L.doAfter!==!0&&!L.doOnEmptyResponseFromId||a.push(_)}function i(_){return d[_]?d[_].service:null}function n(_){var v=typeof _=="string"||typeof _=="number"?_:_.getAd().id;delete d[v];var L,N;for(L=0,N=a.length;L<N;L++)if(_=a[L],_.getAd().id===v){a.splice(L,1);break}}function o(_,v){if(!_)return[];var L,N,k=[];for(L in d)d.hasOwnProperty(L)&&(N=d[L].service,N.sectionType!==_||v&&!v(N)||k.push(N));return k}function r(_){m.forEach(function(v,L){_===v?(d[v].service.log("serviceAnswerEmpty"),m.splice(L,1),g.push(_),delete d[v]):d[v].children&&d[v].children.indexOf(_)!==-1&&d[v].children.splice(d[v].children.indexOf(_),1)})}function s(_){var v=d[_];v&&(v.children=null)}function u(){var _,v,L,N;for(_=0,v=a.length;_<v;_++)if(L=a[_],(N=L.getAd().doOnEmptyResponseFromId)&&g.indexOf(N)!==-1&&!L.isAfter())return a.splice(_,1),L;return null}function c(_){if(!_)return[];var v,L,N,k=[];for(v=0,L=a.length;v<L;v++)N=a[v],N.sectionType===_&&N.isAfter()&&!N.started()&&k.push(N);return k}function h(_){if(!_)return null;var v,L,N,k;for(v=0,L=a.length;v<L;v++)if(N=a[v],N.sectionType===_&&N.isAfter()&&!N.started()){if((k=N.getAd().doOnEmptyResponseFromId)&&g.indexOf(k)===-1)continue;return N.getAd().allowRepeat||a.splice(v,1),N}return null}function p(_){var v,L,N;for(v=0,L=a.length;v<L;v++)N=a[v],_&&N.sectionType!==_||N.reset()}var a=[],d={},m=[],g=[];return{addService:t,getService:i,getServices:o,removeService:n,resetAll:p,markEmptyService:r,markNonEmptyService:s,getAfterServices:c,getNextAfterService:h,getNextOnEmptyService:u}},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 o=document.createElement("iframe");return this.adframe=o,this.src=i,o.width="100%",o.height="100%",o.scrolling="no",o.marginWidth="0",o.marginHeight="0",o.frameBorder="0",o.src=n,o.id="ad-frame-"+this.id,o.setAttribute("allow","autoplay"),o.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),o.setAttribute("style","color-scheme: light;"),o},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 o={type:"vpaid",method:i};if(n&&(o.params=n),this.send(o),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(k){if(d){var y=g[k];y&&s("https://r.mail.ru/d"+y+".gif?rnd="+Math.random())}else m.push(k)}function i(k,y){if(!n()){if(k)try{Object.defineProperty(_,k,{writable:!1,enumerable:!0,value:y||Date.now()-c})}catch{}else _.sessionId=AdmanHTML.Utils._genSessionId();c=Date.now(),Object.keys(g).length&&s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&metrics="+encodeURIComponent(JSON.stringify(_))+"&slot="+(h==="slot"?e.slotId:"json"))}}function n(){return["media_error_code","vpaid_error_message","skipped","completed"].some(function(k){return _.hasOwnProperty(k)})}function o(k,y,T){var w=[];if(T)for(var E in T)T.hasOwnProperty(E)&&w.push(E+"="+String(T[E]));var f="";w.length&&(f="&"+w.join("&")),N||s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&"+k+"="+encodeURI(y)+"&slot="+(h==="slot"?e.slotId:"json")+f),e.debugMode&&console&&console.log&&(console.log("MESSAGE: "+k+" = "+y),T&&console.log("MESSAGE EXTRA PARAMS: "+JSON.stringify(T)))}function r(k,y){var T=[];if(y)for(var w in y)y.hasOwnProperty(w)&&T.push(w+"="+String(y[w]));var E="";T.length&&(E="&"+T.join("&")),N||s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&error="+encodeURI(k)+"&slot="+(h==="slot"?e.slotId:"json")+E),e.debugMode&&console&&console.warn&&console.warn("Error: "+k)}function s(k){AdmanHTML.Utils.loadImg(k)}function u(k){if(!a){var y="https://ad.mail.ru/vp/"+p+"?original="+(k.slot||"")+"&version="+k.version;a=!0,N?(console.log(y),d=!0):AdmanHTML.Utils.xhr(y,function(T){if(d=!0,T){if(typeof T=="string")try{g=JSON.parse(T.trim())}catch{}else typeof T=="object"&&(g=T);var w=m.slice();m=[],w.forEach(t)}})}}var c,h="slot",p=3107,a=!1,d=!1,m=[],g={},_={},v=AdmanHTML.Utils.getPageLocation(),L=AdmanHTML.Utils.getHostname(v||""),N=L.indexOf("localhost")!==-1;return{rb:t,logError:r,logMessage:o,simple:s,metrics:i,initMode:function(k,y){h=k,k==="slot"&&u(y)},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(c){return c.replace(/-+(.)?/g,function(h,p){return p?p.toUpperCase():""})}function t(c,h,p){var a,d=s[h];if(!d){for(a=0;a<u.length;a++)if(d=u[a]===""?h:e(u[a]+"-"+h),c[d]!==void 0){s[h]=d;break}}c[d]=p}function i(c){return parseInt(c)+"px"}function n(c,h){function p(a,d){return a=parseInt(a,16),d=d||1,"rgba("+(a>>16&255)+","+(a>>8&255)+","+(255&a)+","+d+")"}return Array.isArray(c)?"linear-gradient("+c.map(function(a){return p(a,h)}).join(", ")+")":p(c,h)}function o(c,h,p){var a=c.style;(p||Object.keys(h)).forEach(function(d){h.hasOwnProperty(d)&&r(a,d,h[d],h)})}function r(c,h,p,a){var d,m,g;switch(h){case"fontFace":d="fontFamily",m=p;break;case"hasBackground":p||(d="background",m="none",delete a.backgroundColor);break;case"backgroundColor":d="background",m=n(p,a.backgroundAlpha);break;case"cornerRounding":case"borderCornerRounding":d="borderRadius",m=i(Math.floor(p/2));break;case"headerColor":case"bodyColor":case"hyperlinkColor":case"textColor":d="color",m=n(p);break;case"headerSize":case"bodySize":case"hyperlinkSize":case"textSize":d="fontSize",m=i(p);break;case"headerUnderline":case"bodyUnderline":case"hyperlinkUnderline":case"textUnderline":d="text-decoration",m=p?"underline":"none",g="";break;case"headerUnderlineOnRollOver":d="text-decoration",m=p?"":"none",g=p?"":"important";break;case"headerBold":case"bodyBold":case"hyperlinkBold":case"textBold":d="fontWeight",m=p?"bold":"normal";break;case"headerIndent":case"bodyIndent":case"hyperlinkIndent":d="marginTop",m=i(p);break;case"bodyPaddingRight":d="marginRight",m=i(p);break;case"width":case"height":d=h,m=i(p);break;case"contentPadding":case"contentIndent":case"controlsSafeArea":d="padding",m=i(p);break;case"maxImageWidth":case"maxImageHeight":d=h==="maxImageWidth"?"maxWidth":"maxHeight",m=i(p);break;case"borderSize":d="borderWidth",m=i(p);break;case"borderColor":d="borderColor",m=n(p,a.borderAlpha);break;case"paddingLeft":case"paddingTop":d=h==="paddingLeft"?"left":"top",m=i(p);break;case"controlsPaddingTop":case"controlsPaddingRight":d=h==="controlsPaddingRight"?"right":"top",m=i(p)}d&&m&&(g!==void 0?c.setProperty(d,m,g):t(c,d,m))}var s={},u=["","webkit","Moz","O","ms"];return{applyStyle:o,getLength:i}}(),AdmanHTML.Utils=function(){"use strict";function e(){return le||(le=function(){try{if(window===window.top)return C;for(var b=window;b!==b.parent;){if(b.document.domain!==b.parent.document.domain)return q;b=b.parent}return se}catch{}return q}())}function t(){if(ce!==null)return ce;var b=window;try{for(;b.parent!==b&&b.document.domain===b.parent.document.domain;)b=b.parent}catch{}return ce=b,b}function i(){var b=window,I="",$=t();try{I=b.top.location.href}catch{if($&&$.parent===b.top&&(I=$.document.referrer),!I){var U=b.location.ancestorOrigins;U&&U.length&&(I=U[U.length-1])}}return I||(I=($||window).document.referrer),I}function n(){return je.major?Ie:Me}function o(b){b(n())}function r(b,I){I&&b.addEventListener("load",I,!1);var $=document.getElementsByTagName("head");if($&&$.length){var U=$[0];U&&U.appendChild(b)}}function s(b,I,$){var U=document.getElementById(I);if(U&&U.parentNode){if(!$)return;U.parentNode.removeChild(U)}U=document.createElement("style"),U.type="text/css",U.id=I,U.innerHTML=b,r(U)}function u(b){var I=document.querySelector("link[href*='"+b+"']");I||(I=document.createElement("link"),I.type="text/css",I.rel="stylesheet",I.href=b,r(I))}function c(b){var I=document.querySelector("script[src*='"+b+"']");I||(I=document.createElement("script"),I.setAttribute("type","text/javascript"),I.setAttribute("charset","utf8"),I.setAttribute("src",b),r(I))}function h(b,I){var $=AdmanHTML.Utils.getPageLocation();if(AdmanHTML.Utils.getHostname($||"").indexOf("localhost")===-1){var U=new Image;U.onload=function(){I&&I(U)},U.src=b}else console.log(b)}function p(b,I,$,U,ee){U=U||"GET";var re=new XMLHttpRequest;return re.open(U,b,!0),re.withCredentials=!ee,re.setRequestHeader("Content-Type","text/plain"),re.send($||null),I&&(re.onreadystatechange=function(){re.readyState===4&&(re.status===200?I(re.response):I())},re.onerror=function(){ee?I():p(b,I,$,U,!0)}),re}function a(b,I,$,U,ee){ee===void 0&&(ee=!0);var re=I*$<b*U;ee&&(re=!re);var ke=re?U/I:$/b,Ce=Math.floor(b*ke),S=Math.floor(I*ke);return{x:Math.floor(($-Ce)/2),y:Math.floor((U-S)/2),width:Math.floor(Ce),height:Math.floor(S)}}function d(b){return typeof b=="object"&&!!b&&!Array.isArray(b)}function m(b){var I;for(I in b)return!1;return!0}function g(b,I){if(!b)return null;if(I){var $;for($ in I)Object.prototype.hasOwnProperty.call(I,$)&&(b[$]=I[$])}return b}function _(b,I){if(I){var $,U;for($ in I)Object.prototype.hasOwnProperty.call(I,$)&&(U=I[$],d(U)?(b[$]=b[$]||{},b[$]=_(b[$],U)):b[$]=U)}return b}function v(b,I,$){return b=b||0,I=I||0,$=$||1,Math.min($,Math.max(I,b))}function L(b,I){return b-I}function N(){return Math.floor(Math.random()*Math.pow(2,48)).toString()}function k(b){b=b.split("+").join(" ");for(var I,$={},U=/[?&]?([^=]+)=([^&]*)/g;I=U.exec(b);)$[decodeURIComponent(I[1])]=decodeURIComponent(I[2]);return $}function y(b,I){var $;document.createEvent?($=document.createEvent("HTMLEvents"),$.initEvent(I,!0,!0)):($=document.createEventObject(),$.eventType=I),$.eventName=I,document.createEvent?b.dispatchEvent($):b.fireEvent("on"+$.eventType,$)}function T(b){return b?b.substring(b.indexOf("//")+2,b.indexOf("/?")):""}function w(b){var I=document.createElement("a");return I.href=b,I.hostname}function E(b){return b.replace(/^(www[0-9]?\.)?/,"")}function f(b,I,$){if(!b||!I)return!0;if(b=E(b),I=E(I),!($&&$.URL&&Array.prototype.includes))return new RegExp("^"+I.replace(/^(\*\.?)/,"([^/]*.)?").replace(/\./g,"\\.")+"$").test(b);try{b=new URL(b);try{return I=new URL(I),b.host.includes(I.host)}catch{return b.host.includes(I)}}catch{return b.includes(I)}}function B(b){var I=b.button,$=b.which;return $||I===void 0?$:1&I?1:2&I?3:4&I?2:0}function A(b){return B(b)===1}function O(b,I){return I=I||document.body,b!==I&&I.contains(b)}function D(b){return b&&b.nodeType===1}function Z(b){var I=b.ownerDocument;return I.defaultView||I.parentWindow}function ae(b){b.preventDefault()}function P(b){var I;if(window.DOMParser)I=new DOMParser().parseFromString(b,"text/xml");else{if(!window.ActiveXObject)return;I=new window.ActiveXObject("Microsoft.XMLDOM"),I.async=!1,I.loadXML(b)}return I.documentElement}function W(b){if(b){var I=b.split(":");if(I.length===3){var $=parseInt(I[0],10),U=parseInt(I[1],10),ee=I[2].split("."),re=parseInt(ee[0],10),ke=0;if(ee.length===2&&(ke=parseInt(ee[1],10)),!(isNaN($)||isNaN(U)||isNaN(re)||isNaN(ke)))return 3600*$+60*U+re+ke/1e3}}return NaN}function H(b,I){var $,U=b;for($ in I)I.hasOwnProperty($)&&(U=U.replace("{{"+$+"}}",I[$]));return U}function te(b,I){if(I=I||0,window.Worker&&window.Blob){var $,U=new Blob(['var timeout; onmessage = function(e) {clearTimeout(timeout); if (e.data === "start") {timeout = setTimeout(function() { postMessage({}); }, '+I+");}}"]);try{$=new Worker(window.URL.createObjectURL(U)),$.onmessage=function(){$.terminate(),b()},$.postMessage("start")}catch{return setTimeout(b,I)}return $}return setTimeout(b,I)}function xe(){function b(ke){var Ce={};try{var S=window[ke].getItem("rb_sync_id");S&&typeof(Ce=JSON.parse(S))!="object"&&(Ce={})}catch{}return Ce}var I=[],$=b("localStorage"),U=b("sessionStorage"),ee=g($,U);for(var re in ee)ee.hasOwnProperty(re)&&I.push(re+"="+encodeURIComponent(ee[re]));return I.join("&")}function J(b){return/nr-vpaid(\.min)?\.js/.test(b)}function de(b,I){b&&b.style&&Y(b,I,!0)}function Y(b,I,$){$=$||!1;var U=$?function(ee,re){b.style.setProperty(ee,re,"important")}:function(ee,re){b.style.setProperty(ee,re)};Object.getOwnPropertyNames(I).forEach(function(ee){U(ee,I[ee])})}function he(){function b(Ce,S){return function(){return Ce.apply(S,arguments)}}function I(Ce){var S=Ce.toString(16);return S.length===1?"0"+S:S}function $(Ce,S,j){for(var X="",ue=S;ue<=j;ue++)X+=I(Ce[ue]);return X}var U="undefined",ee=typeof crypto!==U&&crypto.getRandomValues&&b(crypto.getRandomValues,crypto)||typeof msCrypto!==U&&window.msCrypto.getRandomValues&&b(window.msCrypto.getRandomValues,window.msCrypto),re=function(){if(ee){var Ce=new Uint8Array(16);return function(){return ee(Ce),Ce}}var S=new Array(16);return function(){for(var j,X=0;X<16;X++)(3&X)==0&&(j=4294967296*Math.random()),S[X]=j>>>((3&X)<<3)&255;return S}}(),ke=re();return ke[6]=15&ke[6]|64,ke[8]=63&ke[8]|128,$(ke,0,3)+"-"+$(ke,4,5)+"-"+$(ke,6,7)+"-"+$(ke,8,9)+"-"+$(ke,10,15)}function F(b,I){var $=AdmanHTML.Constants.AD_ACTIONS_DEFAULT_CONFIG,U=[I,b].reduce(function(ee,re){return re&&Object.keys($).forEach(function(ke){ee[ke]!==re[ke]&&(ee[ke]=re[ke]?re[ke]:ee[ke]),typeof re.members=="object"&&(ee.members=re.members)}),ee},Object.assign({},$));return Le(U)?U:$}function Le(b){return!!Array.isArray(b.members)&&(b.members.forEach(function(I){if(["adchoice","disclaimer","timer"].indexOf(I)===-1)return!1}),typeof b.positionX=="string"&&["left","right"].indexOf(b.positionX)!==-1&&typeof b.positionY=="string"&&["top","bottom"].indexOf(b.positionY)!==-1&&typeof b.offsetX=="string"&&typeof b.offsetY=="string"&&!(typeof b.disclaimerText!="string"||!b.disclaimerText.length)&&!(typeof b.headerText!="string"||!b.headerText.length)&&!(typeof b.aboutText!="string"||!b.aboutText.length)&&!(typeof b.copyText!="string"||!b.copyText.length))}function Se(b){b=b||navigator.userAgent;var I=!1;return function($){(/(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($)||/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($.substr(0,4)))&&(I=!0)}(b),I}var le,C=1,se=2,q=3,ce=null,Me=0,Ie=1,je=function(){var b="undefined",I="Shockwave Flash",$="application/x-shockwave-flash",U={major:0,minor:0,release:0},ee=null;if(typeof navigator.plugins!==b&&typeof navigator.plugins[I]=="object")(ee=navigator.plugins[I].description)&&typeof navigator.mimeTypes!==b&&navigator.mimeTypes[$]&&navigator.mimeTypes[$].enabledPlugin&&(ee=ee.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),U.major=parseInt(ee.replace(/^(.*)\..*$/,"$1"),10),U.minor=parseInt(ee.replace(/^.*\.(.*)\s.*$/,"$1"),10),U.release=/[a-zA-Z]/.test(ee)?parseInt(ee.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof window.ActiveXObject!==b)try{var re=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash");re&&(ee=re.GetVariable("$version"))&&(ee=ee.split(" ")[1].split(","),U.major=parseInt(ee[0],10),U.minor=parseInt(ee[1],10),U.release=parseInt(ee[2],10))}catch{}return U}();return{setStyle:de,isNRVpaid:J,addCss:s,loadCss:u,loadJs:c,loadImg:h,xhr:p,scaleBySide:a,isEmptyObject:m,mixin:g,deepExtend:_,validateMinMax:v,numSorter:L,createIntUID:N,getQueryParams:k,triggerEvent:y,getUserIdQuery:xe,getPageLocation:i,getDomain:T,getHostname:w,_genSessionId:he,matchHostname:f,isLeftButtonPressed:A,isElementInDocument:O,isElement:D,getElementViewport:Z,preventDefault:ae,parseXml:P,convertDuration:W,renderTemplate:H,setTimeout:te,checkFlash:n,checkFlashAsync:o,FLASH_READY:Ie,FLASH_MISSING:Me,getServingType:e,servingTypes:{ON_PAGE:C,S_FRAME:se,XD_FRAME:q},adActionsConfigPrepare:F,isMobile:Se}}(),AdmanHTML.Viewability=function(){"use strict";function e(P,W,H){return P.forEach(function(te){te.duration=W.focus&&W.percent>=te.threshold?te.duration+H:0}),P}function t(P){P.forEach(function(W){W.duration=0})}function i(P){return new window.IntersectionObserver(function(W){W&&W.length&&W[0].intersectionRatio!==void 0&&(P(W[0].intersectionRatio),!O&&(W[0].intersectionRatio>0||W[0].isIntersecting)&&(O=!0,v.log("viewin")))},{threshold:Z})}function n(){return f?!document[f]:w===E.XD_FRAME||!window.top.document.hasFocus||window.top.document.hasFocus()}function o(){var P=r();if(P.state!=="UNDETERMINED")return e(ae,P,y),v&&(v.logMRC(ae)||_()),P}function r(){var P,W,H=n();return T?(P=D,W="DETERMINED"):w!==E.XD_FRAME?(P=s(L).percent,W="DETERMINED"):(P=0,W="UNDETERMINED"),{percent:P,focus:H,state:W,viewinOccured:O}}function s(P,W){try{var H=P.getBoundingClientRect(),te=u(H),xe=AdmanHTML.Utils.getElementViewport(P)||window;for(W=W||window.top;xe!==W;){var J=xe.frameElement.getBoundingClientRect();H=c(H,J),H.left=Math.max(J.left,H.left),H.right=Math.min(J.right,H.right),H.top=Math.max(J.top,H.top),H.bottom=Math.min(J.bottom,H.bottom),H.right<H.left&&(H.right=H.left),H.bottom<H.top&&(H.bottom=H.top),xe=xe.parent}H=h(H,W);var de=u(H);return H.percent=de/te*100,H}catch{return{left:0,right:0,top:0,bottom:0,percent:0}}}function u(P){return(P.right-P.left)*(P.bottom-P.top)}function c(P,W){return{left:P.left+W.left,right:P.right+W.left,top:P.top+W.top,bottom:P.bottom+W.top}}function h(P,W){var H={},te=p(W);return H.left=Math.max(0,P.left),H.right=Math.min(te.width,P.right),H.top=Math.max(0,P.top),H.bottom=Math.min(te.height,P.bottom),H}function p(P){var W={width:1/0,height:1/0};return!isNaN(P.document.body.clientWidth)&&P.document.body.clientWidth>0&&(W.width=P.document.body.clientWidth),!isNaN(P.document.body.clientHeight)&&P.document.body.clientHeight>0&&(W.height=P.document.body.clientHeight),P.document.documentElement&&P.document.documentElement.clientWidth&&!isNaN(P.document.documentElement.clientWidth)&&(W.width=P.document.documentElement.clientWidth),P.document.documentElement&&P.document.documentElement.clientHeight&&!isNaN(P.document.documentElement.clientHeight)&&(W.height=P.document.documentElement.clientHeight),P.innerWidth&&!isNaN(P.innerWidth)&&(W.width=Math.min(W.width,P.innerWidth)),P.innerHeight&&!isNaN(P.innerHeight)&&(W.height=Math.min(W.height,P.innerHeight)),W}function a(P,W,H){if(v=W,A=!H,L=P,T)k=k||i(function(te){D=100*te}),k.observe(P);else if(w===E.XD_FRAME)return B=!1,void v.log("viewabilityUnmeasurable");H||(N=setInterval(o,y)),B=!0,v.log("viewabilityMeasurable"),window.addEventListener("unload",d)}function d(){g("unload")}function m(){N||(N=setInterval(o,y))}function g(P){B&&v&&A&&v.logMRC([],P||"complete"),v=null,B=!1,A=!1,L=null,clearInterval(N),N=void 0,t(ae),k&&k.disconnect(),window.removeEventListener("unload",d)}function _(){N&&(clearInterval(N),N=void 0,t(ae))}var v,L,N,k,y=255,T=!!window.IntersectionObserver,w=AdmanHTML.Utils.getServingType(),E=AdmanHTML.Utils.servingTypes,f=function(){for(var P=["h","webkitH","mozH","msH","oH"],W=0;W<P.length;W++)if(document[P[W]+"idden"]!==void 0)return P[W]+"idden";return""}(),B=!1,A=!1,O=!1,D=0,Z=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],ae=[];return Z.forEach(function(P){ae.push({threshold:Math.round(100*P),duration:0})}),{start:a,pause:_,resume:m,stop:g,getViewabilityState:r}},AdmanHTML.AdRenderer=function(e,t){"use strict";function i(){k.wrapperEl=k.wrapperEl||e.wrapper,k.mainEl=k.mainEl||document.createElement("div"),k.clickEl=k.clickEl||k.mainEl,AdmanHTML.Utils.isElement(k.mainEl)&&!k.mainEl.parentNode&&(k.wrapperEl.childNodes.length?k.wrapperEl.insertBefore(k.mainEl,k.wrapperEl.childNodes[0]):k.wrapperEl.appendChild(k.mainEl),N=!0),k.clickEl.addEventListener("click",k.onClick),window.addEventListener("resize",m)}function n(w){w()}function o(){e.viewability.stop(),window.removeEventListener("resize",m),k.clickEl&&k.clickEl.removeEventListener("click",k.onClick),clearTimeout(_),AdmanHTML.Utils.isElement(k.mainEl)&&N&&k.mainEl.parentNode&&k.mainEl.parentNode.removeChild(k.mainEl)}function r(){if(!y&&(y=!0,clearTimeout(_),v)){var w=Date.now()-v;L=1e3*T.duration-w}}function s(){y&&(y=!1,u())}function u(){v=Date.now();var w=L||1e3*T.duration;_=setTimeout(function(){o(),e.cb("onCompleted")},w)}function c(){T.urlToNavigateOnClick&&(T.openLinkInPopup?e.openPopup(T.urlToNavigateOnClick||T.trackingLink):window.open(T.urlToNavigateOnClick,"_blank"),t.log("click"),e.cb("onClicked"))}function h(w){e.cb("onStarted",[t.sectionType,AdmanHTML.Utils.mixin(t.getAdForApp()||{},w||{})]),t.log("playbackStarted")}function p(w,E){var f=parseInt(w/E*100);e.cb("onTimeRemained",[{remained:E-w,percent:f,duration:E,currentTime:w}]),w=parseInt(w),t.log("thresholdPValue",f),t.log("thresholdValue",w),t.logOVV(w,f)}function a(w,E){typeof w!="string"&&w?k.mainEl.appendChild(w):k.mainEl.innerHTML=w,AdmanHTML.Utils.mixin(k.mainEl.style,E)}function d(w){k.wrapperEl=w}function m(){k.onResize(k.mainEl.offsetWidth,k.mainEl.offsetHeight)}function g(){}var _,v,L,N,k={},y=!1,T=t.getAd();return k={start:i,pause:r,resume:s,skip:n,dispose:o,onClick:c,onStart:h,registerTimer:u,setView:a,setWrapper:d,onTimeRemained:p,onResize:g}},AdmanHTML.AudioAdRenderer=function(e,t){"use strict";function i(){s.mainEl=e.audioEl||document.createElement("audio"),u.forEach(function(c){s.mainEl.addEventListener(c,o)}),e.audioEl||s.setView(null,{position:"absolute",width:"1px",height:"1px",top:"-10000px",left:"-10000px"}),r=t.getAd().duration,s.mainEl.src=t.getAd().src,s.mainEl.load(),t.log("render"),s.mainEl.play(),e.audioEl||s.start()}function n(){s.dispose(),u.forEach(function(c){s.mainEl.removeEventListener(c,o)})}function o(c){var h,p;switch(c.type){case"loadedmetadata":s.onStart();break;case"play":e.cb("onPlayed");break;case"pause":e.cb("onPaused");break;case"timeupdate":h=s.mainEl.duration,p=s.mainEl.currentTime,!isNaN(h)&&r&&Math.abs(r-h)>1&&(h=r,p=Math.min(p,h)),s.onTimeRemained(p,h);break;case"ended":e.cb("onCompleted");break;case"error":e.cb("onError")}}var r,s=new AdmanHTML.AdRenderer(e,t),u=["loadedmetadata","error","pause","play","timeupdate","ended"];return{start:i,skip:s.skip,dispose:n,pause:function(){s.mainEl.pause()},resume:function(){s.mainEl.play()},setVolume:function(c){var h=s.mainEl.muted?0:s.mainEl.volume;s.mainEl.muted=c===0,s.mainEl.volume=c,(h===0&&c>0||h>0&&c===0)&&t.log(c?"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(g){g.propertyName==="transform"&&g.target===a&&m.moveWithControls()}function o(){d.start(),p=t.getAd(),h=t.getSettings(),a=document.querySelector("div.videoplayer_controls");var g=AdmanHTML.Utils.adActionsConfigPrepare(p?p.adActionsConfig:null,h?h.adActionsConfig:null);if(!p.ctaWebEnabled||g.positionY==="bottom"&&g.positionX==="left")return void(u=Function.prototype);m.setText(p.ctaText),m.setStyles(),c=r(),m.setCustomStyles(c),m.addListeners(),m.appendTo(e.wrapper),u=function(){m.destroy()},a&&a.addEventListener("transitionstart",n)}function r(){return[e,p,h].reduce(function(g,_){return Object.keys(g).length||typeof _.ctaStyles!="object"?g:_.ctaStyles},{})}function s(){a&&a.removeEventListener("transitionstart",n),u&&u(),d.dispose()}if(!e.callToActionButton)return{render:Function.prototype,dispose:Function.prototype};var u,c,h,p,a,d=new AdmanHTML.AdRenderer(e,t);i.prototype._setStyles=function(g,_){AdmanHTML.Utils.setStyle(g,_)},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:a?"20px":"16%",left:"20px"})},i.prototype.setCustomStyles=function(g){g.background&&(this.background=g.background),this._setStyles(this.ctaButtonEl,g)},i.prototype.setText=function(g){this.ctaButtonTextEl.innerText=g&&typeof g=="string"?g:"Перейти"},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 g=p.ctaLink||p.urlToNavigateOnClick;p.openLinkInPopup?e.openPopup(g||p.trackingLink):window.open(g,"_blank"),t.log(["ctaClick","click"]),e.cb("onClicked")},i.prototype._hoverCTABtnListener=function(g){this._setStyles(this.ctaButtonEl,{background:g?"#1460C9":this.background,"box-shadow":g?"0px 4px 8px 0px #0000000A":this.boxShadow})},i.prototype.appendTo=function(g){g&&(g.appendChild(this.ctaButtonEl),this.isRendered=!0)},i.prototype.moveWithControls=function(){var g=a.classList.contains("hidden");this.ctaButtonEl.style.setProperty("transform","translateY("+(g?"0":"-"+Math.round(a.offsetHeight))+"px)")};var m=new i;return{render:o,dispose:s}},AdmanHTML.CloseBtnRenderer=function(e,t){"use strict";function i(){r.start();var p=t.getSettings(),a=p.controlsStyle||0,d=s[a],m=u[a];m.bg=m.bg||m.width;var g={};for(var _ in h)h.hasOwnProperty(_)&&(g[_]=p[_]!==void 0?p[_]:h[_]);if(g.controlsPaddingTop=g.controlsPaddingTop-g.controlsSafeArea,g.controlsPaddingRight=g.controlsPaddingRight-g.controlsSafeArea,r.setView(AdmanHTML.Utils.renderTemplate(c,{img:d,width:m.width,height:m.height,bg:m.bg}),{position:"absolute",cursor:"pointer"}),AdmanHTML.StyleUtils.applyStyle(r.mainEl,g),m.bg!==m.width){var v=m.bg-m.width,L=function(k){k.target.className==="rb-adman_close"&&(k.target.style.backgroundPosition="-"+v+"px 0")},N=function(k){k.target.className==="rb-adman_close"&&(k.target.style.backgroundPosition="0 0")};r.mainEl.addEventListener("mouseover",L),r.mainEl.addEventListener("mouseout",N),o=function(){r.mainEl.removeEventListener("mouseover",L),r.mainEl.removeEventListener("mouseout",N)}}}function n(){o&&o(),r.dispose()}var o,r=new AdmanHTML.AdRenderer(e,t),s=["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"],u=[{width:18,height:18,bg:36},{width:13,height:13},{width:26,height:26,bg:52},{width:17,height:17,bg:34}],c='<div class="rb-adman_close" style="background:url({{img}});background-size:{{bg}}px 100%;width:{{width}}px;height:{{height}}px""></div>',h={controlsPaddingTop:3,controlsPaddingRight:0,controlsSafeArea:0};return r.onClick=function(p){p.stopPropagation(),p.target.className==="rb-adman_close"&&e.cb("onClosed")},{start:i,dispose:n,setWrapper:r.setWrapper}},AdmanHTML.DebugAdRenderer=function(e,t){"use strict";function i(){n.mainEl=document.createElement("span"),n.start(),n.setView("&#9874; "+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),o=t.getAd();return n.onClick=function(){window.open(o.urlToNavigateOnClick,"_blank")},{start:i,dispose:n.dispose}},AdmanHTML.DisclaimerRenderer=function(e,t){"use strict";function i(a,d,m,g){var _=document.createElement("style");_.appendChild(document.createTextNode(" @font-face { font-family: "+a+"; font-style: normal; font-weight: 300; unicode-range: "+g+"; src: url('"+d+"') format('"+m+"'); } ")),document.head.appendChild(_)}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 o(){h.start();var a=t.getSettings(),d=t.getAd();if(typeof d=="object"&&typeof d.adActionsConfig=="object"&&d.adActionsConfig.members===null||typeof a=="object"&&typeof a.adActionsConfig=="object"&&a.adActionsConfig.members===null)return void s();var m={originalBannerId:d.bannerID,cipherBannerID:d.cipherBannerID?d.cipherBannerID:null,bannerOrdId:d.ordID||null,advData:d.advData||null},g=AdmanHTML.Utils.adActionsConfigPrepare(d?d.adActionsConfig:null,a?a.adActionsConfig:null);p.build(g,m),p.init(),p.addListeners(),p.appendTo(e.wrapper),u=function(){p.destroy()}}function r(a,d){var m=Math.floor(d-a);m||(m="00"),p.updateRemainTime(m)}function s(){u&&u(),c&&typeof c=="object"&&typeof c.remove=="function"&&c.remove(),h.dispose()}if(!e.disclaimer)return{render:Function.prototype,onTimeRemained:Function.prototype,dispose:Function.prototype};var u,c,h=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(a){i(a.name,a.url,a.format,a.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(a,d){this.config=a,this.data=d,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 a={};this.config.positionX==="left"&&(a.left=this.config.offsetX),this.config.positionX==="right"&&(a.right=this.config.offsetX),this.config.positionY==="top"&&(a.top=this.config.offsetY),this.config.positionY==="bottom"&&(a.bottom=this.config.offsetY),this._setStyles(this.adActionsEl,a),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 a=".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;}";c=document.createElement("style"),c.styleSheet?c.styleSheet.cssText=a:c.appendChild(document.createTextNode(a)),this.adActionsEl.appendChild(c),this._setStyles(this.adChoiceEl,{width:"14px",height:"14px"})},n.prototype._setStyles=function(a,d){AdmanHTML.Utils.setStyle(a,d)},n.prototype.updateRemainTime=function(a){var d=Math.trunc(a/60),m=a-60*d;d=d.toString(),m=m.toString(),m.length===1&&(m="0"+m),this.remainTimeEl.innerText=d+":"+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(a){a.stopPropagation();var d=this.data.advData?"data":"id",m=this.data.advData?this.data.advData:this.data.cipherBannerID;window.open(this._advPageUrlPart+d+"="+m,"_blank")},n.prototype._copyToClipboard=function(a){var d=document.createElement("textarea");document.body.appendChild(d),d.value=a,d.select(),document.execCommand("copy"),document.body.removeChild(d)},n.prototype._copyBannerOrdIdToClipboardListener=function(a){a.stopPropagation(),this._copyToClipboard(this.data.bannerOrdId)},n.prototype._setAdActionsHoverListener=function(a){a?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(a){a.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(a){a.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(a){a?(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(a){a?(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(a){a?this._setStyles(this.actionsHeaderButton,{"background-image":'url("'+this.closeIconActiveSrc+'")'}):this._setStyles(this.actionsHeaderButton,{"background-image":'url("'+this.closeIconSrc+'")'})},n.prototype.appendTo=function(a){if(a){try{var d=window.getComputedStyle(a).width,m=this.actionsWrapperWidth+parseInt(this.adActionsEl.style.paddingLeft)+parseInt(this.adActionsEl.style.paddingRight);(d?parseInt(d):m+1)<=m&&(this.isSmall=!0,this._setStyles(this.adActionsEl,{"border-radius":"6px","font-size":"12px",padding:"5px 6px 5px 8px"}))}catch(g){console.warn("Failed detect small wrapper size",g)}this.appendedTo=a,a.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:o,onTimeRemained:r,dispose:s}},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(){w.start(),O=t.getAd(),k=O.duration,N=L(),N.width="100%",N.height="100%",N.setAttribute("style","display:block;width:100%;height:100%"),w.setView(N,{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"transparent"}),AdmanHTML.Utils.isElement(e.videoEl)&&e.videoEl.parentNode===w.mainEl.parentNode&&w.mainEl.parentNode.insertBefore(w.mainEl,e.videoEl.nextSibling),N.contentWindow||N.contentDocument?o():N.onload=function(Y){o()},f&&f.render(),E&&E.render()}function n(Y){Y.preventDefault(),Y.stopPropagation(),t.log("click"),e.cb("onClicked"),e.openPopup(O.urlToNavigateOnClick||O.trackingLink)}function o(){function Y(){var he=N.contentWindow.document.body||N.contentDocument.body;he&&he.addEventListener("click",n,!0)}A=N.contentWindow?N.contentWindow.document:N.contentDocument,A.open(),P?(A.write('<!DOCTYPE html><html style="width: 100%; height: 100%"><head></head><body>'),A.write(O.src),A.write("</body></html>"),H=document.querySelector("div.videoplayer_controls"),H&&(te=H.style.display,H.style.display="none"),(xe=document.querySelector("div.videoplayer_ads_skip"))&&(J=xe.style.display,xe.style.display="none")):(A.write(O.src),t.log("render")),A.close(),B=AdmanHTML.Utils.getElementViewport(e.wrapper),B.addEventListener("message",a),O.openLinkInPopup&&(O.urlToNavigateOnClick||O.trackingLink)&&(N.contentWindow.document.body||N.contentDocument.body?Y():N.onload=Y),e.viewability.start(w.mainEl,t),c(),w.onStart()}function r(){D||(D=!0,Z+=Date.now()-ae,clearInterval(y),y=null,H?H.style.display=te:P&&d("pauseAd",[]),e.cb("onPaused"))}function s(){return O.creativeType==="video-motion"}function u(){D&&(D=!1,c(),e.cb("onPlayed"))}function c(){if(!y){if(P){if(!W)return;H?H.style.display="none":d("startAd",[])}y=setInterval(p,251),ae=Date.now(),D=!1}}function h(){de||e.cb("onCompleted")}function p(){Z+=Date.now()-ae,ae=Date.now(),w.onTimeRemained(Z/1e3,k),P?d("timeUpdateAd",[Z/1e3,k]):f.onTimeRemained(Z/1e3,k),Z>=1e3*k&&(clearInterval(y),y=null,h())}function a(Y){if(Y.source===N.contentWindow){if(P&&typeof Y.data=="object")return void m(Y.data);try{switch(JSON.parse(Y.data).type){case"trg:click":t.log("click"),e.cb("onClicked")}}catch{}}}function d(Y,he){if(typeof N=="object"&&typeof N.contentWindow=="object")try{var F=N.contentWindow.origin;N.contentWindow.postMessage({initiator:"render-runner",id:T,method:Y,args:he},F)}catch{}}function m(Y){if(P&&typeof Y=="object"&&Y.initiator==="render-runner"&&Array.isArray(Y.args)&&Y.args[0]===T)switch(Y.event){case"AdStarted":W=!0,c();break;case"AdCanPlay":t.log("render");break;case"HeaderClick":t.log("click"),e.cb("onClicked",{type:"header"});break;case"ItemClick":t.log("card_"+Y.args[1]+"_click"),e.cb("onClicked",{type:"card",cardId:Y.args[1]});break;case"ItemShow":t.log("card_"+Y.args[1]+"_show");break;case"AdClickThru":t.log("click"),e.cb("onClicked",{type:"common"});break;case"AdError":e.cb("onError",Y.args[1]);break;case"ClosedByUser":t.log("closedByUser"),e.cb("onClosed"),e.cb("onSkipped"),de=null,v();break;case"UserAction":de=Date.now()}}function g(){H&&(H.style.display=te),xe&&(xe.style.display=J)}function _(){y&&clearInterval(y),y=null,g(),B.removeEventListener("message",a)}function v(){_(),w.dispose(),f&&f.dispose(),E&&E.dispose()}function L(){var Y=document.createElement("iframe");return Y.scrolling="no",Y.marginWidth="0",Y.marginHeight="0",Y.frameBorder="0",Y.id="ad-frame-"+Math.round(1e5*Math.random()),Y.onclose=g,Y}var N,k,y,T,w=new AdmanHTML.AdRenderer(e,t),E=new AdmanHTML.CallToActionBtnRenderer(e,t),f=null,B=null,A=null,O=t.getAd(),D=!1,Z=0,ae=0,P=s(),W=!1,H=null,te="flex",xe=null,J="block",de=null;return P?T="b"+O.bannerID:f=new AdmanHTML.DisclaimerRenderer(e,t),w.onClick=function(){},{start:i,pause:r,resume:u,skip:w.skip,dispose:v}},AdmanHTML.ImgAdRenderer=function(e,t){"use strict";function i(){o.start(),o.registerTimer(),AdmanHTML.Utils.addCss(c,u);var p=t.getAd();o.setView(AdmanHTML.Utils.renderTemplate(h,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 a=t.getSettings(),d=o.mainEl.querySelector(".rb-adman_age_wrapper");if(a&&a.advertisment&&a.advertisment.image){var m=a.advertisment.image;AdmanHTML.StyleUtils.applyStyle(o.mainEl,m,"fontFace contentIndent hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_image_wrapper"),m,"borderSize borderColor borderAlpha borderCornerRounding".split(" "));var g=a.advertisment.image.ageRestrictions;p.ageRestrictions&&g&&(AdmanHTML.StyleUtils.applyStyle(d,g),AdmanHTML.StyleUtils.applyStyle(d.querySelector(".rb-adman_age_content"),g,["textUnderline"]))}p.ageRestrictions||d.parentNode.removeChild(d),r.setWrapper(o.mainEl),r.start(),o.onStart(),s.render(),t.log("render")}function n(){o.dispose(),r.dispose(),s.dispose()}var o=new AdmanHTML.AdRenderer(e,t),r=new AdmanHTML.CloseBtnRenderer(e,t),s=new AdmanHTML.DisclaimerRenderer(e,t),u="rb-adman-img-style",c=".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}",h='<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:o.pause,resume:o.resume,skip:o.skip,dispose:n}},AdmanHTML.OpenLinkPopupRender=function(e){"use strict";function t(){for(var c=window;c.parent&&c.parent.frameElement;)c=c.parent;return c}function i(c){e.isPopupOpen=!0,e.pause(),s=n(c)}function n(c){s=u.createElement("div"),o(),s.classList.add("rb-adman-popup");var h=u.createElement("div");h.classList.add("rb-adman-popup-body"),s.appendChild(h);var p=u.createElement("div");p.classList.add("rb-adman-popup-closeButton");var a=s;r=function(){a.remove(),a=null,e.resume(!0),e.isPopupOpen=!1},p.onclick=r,h.appendChild(p);var d=u.createElement("iframe");d.classList.add("rb-adman-popup-frame"),d.setAttribute("src",c),h.appendChild(d),u.body.append(s)}function o(){var c=u.createElement("style");c.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);}",s.appendChild(c)}var r,s=null,u=t().document;return{open:i,close:r}},AdmanHTML.ResearchAdRenderer=function(e,t){"use strict";function i(T,w){var E=[];return T.forEach(function(f){f.name===w&&E.push(f)}),E}function n(T,w,E){return w<=T&&(!E||E>=T)}function o(){!_&&g&&(_=!0,t.log("playbackPaused"))}function r(){_&&g&&(_=!1,t.log("playbackResumed"))}function s(){g=!1,_=!1,m.stop()}function u(T){var w=!T;w!==v&&(v=w,t.log(w?"volumeOff":"volumeOn"))}function c(){g&&(N&&p(N,N),a&&k.forEach(function(T){T.completed||(T.completed=!0,!T.viewable&&AdmanHTML.Utils.loadImg(T.url))}),s())}function h(T){t.log(T?"fullscreenOn":"fullscreenOff")}function p(T,w){if(!isNaN(T)){g||(g=!0,m.start(e.playerEl,t,!0),t.log("playbackStarted")),T=Math.round(T);var E=L!==null?T-L:null;if(L=T,t.log("thresholdValue",T),!isNaN(w)&&isFinite(w)&&w>0&&(w=Math.round(w),N=w,t.log("thresholdPValue",Math.floor(T/w*100))),E<0&&t.log("rewind"),y.forEach(function(A){if(n(T,A.start,A.end)){var O=Math.floor((T-A.start)/A.rate);O>0&&A.last!==O&&(A.last=O,AdmanHTML.Utils.loadImg(A.url.replace("[CONTENTPLAYHEAD]",T)))}else A.last=null}),a!==!1&&E!==0){var f,B=E<0||E>1;k.forEach(function(A){if(n(T,A.start,A.end)&&!A.completed){f=f||m.getViewabilityState(),a=f.state==="DETERMINED";var O=f.percent>A.percent&&f.focus;A.duration=A.duration||0,A.lastViewable&&O&&!B?A.duration+=E:A.duration=0,A.lastViewable=O,A.duration>=A.value&&(A.completed=!0,A.viewable&&AdmanHTML.Utils.loadImg(A.url))}else A.duration=0,A.lastViewable=!1})}}}var a,d=t.getExtendedAdForApp().statistics,m=new AdmanHTML.Viewability,g=!1,_=!1,v=!1,L=null,N=null,k=i(d,"mrcValue"),y=i(d,"timerValue");return{pause:o,resume:r,setVolume:u,setPosition:p,setComplete:c,setFullscreen:h}},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(){o.start(),AdmanHTML.Utils.checkFlashAsync(function(r){r===AdmanHTML.Utils.FLASH_READY?(o.registerTimer(),o.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"),o.onStart()):e.cb("onError")})}function n(r,s,u){var c,h,p=s||{},a=u||{};p.type="application/x-shockwave-flash",window.ActiveXObject?(p.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",a.movie=r):p.data=r,h="<object";for(c in p)p.hasOwnProperty(c)&&(h+=" "+c+'="'+p[c]+'"');h+=">";for(c in a)a.hasOwnProperty(c)&&(h+='<param name="'+c+'" value="'+a[c]+'" />');return h+="</object>"}var o=new AdmanHTML.AdRenderer(e,t);return{start:i,skip:o.skip,dispose:o.dispose,createSwfObject:n,super:o}},AdmanHTML.TextAdRenderer=function(e,t){"use strict";function i(){o.start(),o.registerTimer(),AdmanHTML.Utils.addCss(c,u);var p=AdmanHTML.Utils.mixin({header:"",body:"",hyperlinkText:""},t.getAd());o.setView(AdmanHTML.Utils.renderTemplate(h,p),{position:"absolute",margin:"0 auto",left:0,right:0,bottom:0,"box-sizing":"border-box",overflow:"hidden"});var a=t.getSettings();if(a&&a.advertisment&&a.advertisment.text){var d=a.advertisment.text;AdmanHTML.StyleUtils.applyStyle(o.mainEl,d,"fontFace width height contentPadding hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_header"),d,"headerColor headerSize headerUnderline headerBold headerIndent".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_header_text"),d,["headerUnderlineOnRollOver"]),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_body"),d,"bodyColor bodySize bodyUnderline bodyLeading bodyIndent bodyPaddingRight".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_link"),d,"hyperlinkColor hyperlinkSize hyperlinkUnderline hyperlinkIndent".split(" "));var m=a.advertisment.text.ageRestrictions,g=o.mainEl.querySelector(".rb-adman_age_wrapper");p.ageRestrictions?m&&(AdmanHTML.StyleUtils.applyStyle(g,m),AdmanHTML.StyleUtils.applyStyle(g.querySelector(".rb-adman_age_content"),m,["textUnderline"])):g.parentNode.removeChild(g);var _=o.mainEl.querySelector(".rb-adman_image_wrapper span");if(d.noImage)_.parentNode.removeChild(_);else if(d.contentPadding&&(_.style.marginRight=AdmanHTML.StyleUtils.getLength(d.contentPadding)),d.maxImageHeight||d.maxImageWidth){var v=p.width/p.height;_.style.width=AdmanHTML.StyleUtils.getLength(Math.round(d.maxImageWidth||d.maxImageHeight*v)),_.style.height=AdmanHTML.StyleUtils.getLength(Math.round(d.maxImageHeight||d.maxImageWidth/v))}}r.setWrapper(o.mainEl),r.start(),s.render(),t.log("render"),o.onStart()}function n(){o.dispose(),r.dispose(),s.dispose()}var o=new AdmanHTML.AdRenderer(e,t),r=new AdmanHTML.CloseBtnRenderer(e,t),s=new AdmanHTML.DisclaimerRenderer(e,t),u="rb-adman-text-style",c=".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}",h='<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:o.pause,resume:o.resume,skip:o.skip,dispose:n}},AdmanHTML.VideoAdRenderer=function(e,t){"use strict";function i(){a.mainEl=e.videoEl,a.clickEl=e.clickEl||a.mainEl,g.forEach(function(y){a.mainEl.addEventListener(y,s)}),a.mainEl.parentNode?L={src:a.mainEl.src,time:a.mainEl.currentTime,muted:a.mainEl.muted}:a.setView(null,{position:"absolute",width:"100%",height:"100%",top:0}),a.mainEl.controls=e.browser.mobile,a.mainEl.src=t.getAd().src,a.mainEl.load(),t.log("render"),c(0),h=a.mainEl.play(),h&&h.then&&h.then(u,function(){a.mainEl.muted=!0,h=a.mainEl.play(),h.then(u,function(){})}),a.start(),d.render(),m.render()}function n(y){return y.indexOf("videolink.mycdn.me")!==-1}function o(){d.dispose(),m.dispose(),a.dispose(),g.forEach(function(y){a.mainEl.removeEventListener(y,s)}),L.src?(a.mainEl.src=L.src,a.mainEl.load(),a.mainEl.play(),c(L.time)):(a.mainEl.src="",a.mainEl.removeAttribute&&a.mainEl.removeAttribute("src"))}function r(y){if(y.indexOf("mradx")!==-1)return"rb";if(y.indexOf("videolink.mycdn.me")!==-1)return"ev";var T=new URL(y);return"evcdn:"+("hostname"in T?T.hostname:"")}function s(y){switch(y.type){case"loadstart":p=Date.now();break;case"loadeddata":N||(N=!0,k=Date.now()-p,e.stats.logMessage("firstLoadedData",k,{banner_id:v.bannerID,duration:Math.round(a.mainEl.duration),geo:v.geo!=="undefined"?v.geo:void 0,one_video_src:n(a.mainEl.src),slot:"slotId"in v?v.slotId:"no_slot_id",video_source:r(a.mainEl.src),resolution:("width"in v?v.width:"no_ad_width")+"x"+("height"in v?v.height:"no_ad_height"),label:"experimentLabel"in v?v.experimentLabel:""}));break;case"loadedmetadata":e.stats.metrics("ready"),e.stats.metrics("creative_type","video"),d.onTimeRemained(a.mainEl.currentTime,a.mainEl.duration);break;case"playing":h||u();break;case"play":e.cb("onPlayed");break;case"pause":e.cb("onPaused");break;case"timeupdate":a.onTimeRemained(a.mainEl.currentTime,a.mainEl.duration),d.onTimeRemained(a.mainEl.currentTime,a.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 T=y.target&&typeof y.target=="object"&&y.target.error&&typeof y.target.error=="object"&&y.target.error.code?y.target.error.code:"unknown_code",w="video_el_err_code:"+T;e.stats.logError(w),e.stats.metrics("media_error_code",T),e.cb("onError")}}function u(){if(!_){_=!0;var y=AdmanHTML.Utils.isElement(a.mainEl)?a.mainEl:a.wrapperEl;e.viewability.start(y,t),a.onStart({muted:a.mainEl.muted})}}function c(y){if(a.mainEl)try{a.mainEl.currentTime=y}catch{}}var h,p,a=new AdmanHTML.AdRenderer(e,t),d=new AdmanHTML.DisclaimerRenderer(e,t),m=new AdmanHTML.CallToActionBtnRenderer(e,t),g=["loadstart","loadeddata","loadedmetadata","error","pause","play","playing","timeupdate","ended"],_=!1,v=t.getAd(),L={},N=!1,k=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"),a.skip.apply(e,arguments)},dispose:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",o()},pause:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",a.mainEl.pause()},resume:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",a.mainEl.play()},setVolume:function(y){var T=a.mainEl.muted?0:a.mainEl.volume;y>0&&a.mainEl.muted&&(a.mainEl.muted=!1),y===0&&(a.mainEl.muted=!0),a.mainEl.volume=y,(T===0&&y>0||T>0&&y===0)&&t.log(y?"volumeOn":"volumeOff")}}},AdmanHTML.VpaidJsAdRenderer=function(e,t){"use strict";function i(){var D;if(!c)return w.duration;try{D=c.callGet("adDuration"),D===void 0&&(D=w.duration)}catch{D=w.duration}return D}function n(){if(y.start(),T.render(),AdmanHTML.Utils.isElement(e.videoEl)){var D=AdmanHTML.Utils.getElementViewport;D(e.videoEl)===D(y.wrapperEl)&&(e.videoEl.parentNode?(p=e.videoEl.parentNode,a=e.videoEl.nextSibling):h=!0,y.wrapperEl.insertBefore(e.videoEl,y.wrapperEl.childNodes[0]),AdmanHTML.Utils.mixin(e.videoEl.style,{position:"absolute",width:"100%",height:"100%",top:0,display:"block"}))}var Z=t.getSettings();Z&&(Z.loadTimeout&&(E=Z.loadTimeout),Z.startTimeout&&(f=Z.startTimeout)),AdmanHTML.Utils.isNRVpaid(w.src)&&typeof w.timeoutsFactor=="number"&&w.timeoutsFactor>1&&(E*=w.timeoutsFactor,f*=w.timeoutsFactor),e.cb("onStarted",[t.sectionType,t.getAdForApp()||{}]),r(E,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadInterface"),c.urlToNavigateOnClick=t.getAd().urlToNavigateOnClick,y.setView(c.load(w.src,e.config.vpaidHtmlInterface),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"transparent"}),t.log("render")}function o(){h&&e.videoEl.parentNode?e.videoEl.parentNode.removeChild(e.videoEl):p&&p.insertBefore(e.videoEl,a&&a.parentNode?a:null),s(),c.destroy(),T.dispose(),y.dispose()}function r(D,Z){s(),L=Z,m=setTimeout(u,D)}function s(){clearTimeout(m)}function u(){v=!0,s(),t.log("error"),L&&e.stats.logError(L,{bannerID:w.bannerID,isNRVpaid:AdmanHTML.Utils.isNRVpaid(w.src)}),e.cb("onError",{force:!0,message:L})}var c,h,p,a,d,m,g,_,v,L,N,k,y=new AdmanHTML.AdRenderer(e,t),T=new AdmanHTML.DisclaimerRenderer(e,t),w=t.getAd(),E=500,f=1e3;y.onResize=function(D,Z){c&&c.call("resizeAd",[D,Z,"normal"])},y.onClick=function(){};var B=function(D,Z){if(!v){var ae,P;switch(D){case"loaded":r(E,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadJs");break;case"vpaidloaded":s();break;case"inited":c.call("handshakeVersion",["2.0"])?(r(f,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:InitAd"),c.call("initAd",[y.mainEl.offsetWidth,y.mainEl.offsetHeight,"normal",w.bitrate,{AdParameters:w.params}])):e.cb("onError");break;case"AdStarted":s(),_=c.callGet("adVolume"),g===void 0||c.autoMuted||c.callSet("adVolume",g),t.log("playbackStarted"),e.viewability.start(y.mainEl,t),e.cb("onVPAIDStarted"),e.stats.metrics("playing");break;case"AdLoaded":r(f,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:StartAd"),c.call("startAd"),e.stats.metrics("ready"),e.stats.metrics("creative_type","vpaid");break;case"AdRemainingTimeChange":ae=i(),P=c.callGet("adRemainingTime"),ae>0&&P>=0?(y.onTimeRemained(ae-P,ae),T.onTimeRemained(ae-P,ae)):e.cb("onDurationChanged",[{remained:P,duration:ae}]);break;case"AdVolumeChange":var W=c.callGet("adVolume");(_===0&&W>0||_>0&&W===0)&&t.log(W?"volumeOn":"volumeOff"),_=W;break;case"AdVideoComplete":e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",ae=i(),y.onTimeRemained(ae,ae);break;case"AdStopped":case"AdSkipped":N||(N=!0,setTimeout(function(){d?d():e.cb("onCompleted")})),e.stats.metrics(D==="AdStopped"?"completed":"skipped");break;case"AdClickThru":Z.url&&Z.playerHandles&&window.open(Z.url,"_blank"),t.log("click"),e.cb("onClicked");break;case"AdError":e.stats.logError("EXTERNAL_JS_ADVERTISMENT_ERROR:"+(Z&&Z.message||"")),e.stats.metrics("vpaid_error_message",Z&&Z.message||"vpaid script err"),e.cb("onError");break;case"AdPaused":k||(k=!0,e.cb("onPaused"));break;case"AdPlaying":k&&(k=!1,e.cb("onPlayed"));break;case"AdUserClose":t.log("closedByUser");break;case"video:pause":k||c&&c.call("pauseAd");break;case"video:play":k&&c&&c.call("resumeAd")}}},A=e.wrapper.ownerDocument,O=A.defaultView||A.parentWindow;return c=new AdmanHTML.VpaidLoader(e.videoEl,O),c.onVpaidEvent(B),{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",o()},pause:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",c&&c.call("pauseAd")},resume:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",c&&c.call("resumeAd")},setVolume:function(D){c&&c.callSet("adVolume",D),g=D},skip:function(D){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",d=D;try{c&&c.call("skipAd")}catch{}e.stats.metrics("skipped")}}},AdmanHTML.VpaidSwfAdRenderer=function(e,t){"use strict";function i(){var T;if(!c)return L.duration;try{T=c.callGet("adDuration")||L.duration}catch{T=L.duration}return T}function n(){v.start();var T=t.getSettings();T&&(T.loadTimeout&&(k=T.loadTimeout),T.startTimeout&&(y=T.startTimeout)),AdmanHTML.Utils.checkFlashAsync(function(w){if(w===AdmanHTML.Utils.FLASH_READY){e.cb("onStarted",[t.sectionType,t.getAdForApp()||{}]),r(k);var E="vpaidSwfUrl="+encodeURIComponent(L.src)+"&proxyMethodName="+N;v.setView(g.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")}),_.render(),t.log("render")}function o(){s(),v.dispose(),_.dispose(),window[N]=null}function r(T){s(),p=setTimeout(u,T)}function s(){clearTimeout(p)}function u(){m=!0,s(),t.log("error"),e.cb("onError")}var c,h,p,a,d,m,g=new AdmanHTML.SwfAdRenderer(e,t),_=new AdmanHTML.DisclaimerRenderer(e,t),v=g.super,L=t.getAd(),N="vpaidProxyMethod"+Date.now(),k=500,y=1e3;return v.onResize=function(T,w){c&&c.call("resizeAd",[T,w,"normal"])},v.onClick=function(){},window[N]=function(T,w){if(!m){var E;switch(T){case"loaded":r(k);break;case"vpaidloaded":s();break;case"inited":c=v.mainEl.getElementsByTagName("object")[0],c.call("handshakeVersion",["2.0"])?(r(y),c.call("initAd",[v.mainEl.offsetWidth,v.mainEl.offsetHeight,"normal",L.bitrate,L.params,""])):e.cb("onError");break;case"AdStarted":s(),d=c.callGet("adVolume"),a!==void 0&&c.callSet("adVolume",a),t.log("playbackStarted"),e.viewability.start(v.mainEl,t),e.cb("onVPAIDStarted");break;case"AdLoaded":r(y),c.call("startAd");break;case"AdRemainingTimeChange":E=i(),v.onTimeRemained(E-c.callGet("adRemainingTime"),E),_.onTimeRemained(E-c.callGet("adRemainingTime"),E);break;case"AdVolumeChange":var f=c.callGet("adVolume");(d===0&&f>0||d>0&&f===0)&&t.log(f?"volumeOn":"volumeOff"),d=f;break;case"AdVideoComplete":E=i(),v.onTimeRemained(E,E);break;case"AdStopped":case"AdSkipped":setTimeout(function(){h?h():e.cb("onCompleted")});break;case"AdClickThru":t.log("click"),e.cb("onClicked");break;case"AdError":e.stats.logError("EXTERNAL_SWF_ADVERTISMENT_ERROR:"+(w&&w.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:o,pause:function(){c&&c.call("pauseAd")},resume:function(){c&&c.call("resumeAd")},setVolume:function(T){c&&c.callSet("adVolume",T),a=T},skip:function(T){h=T;try{c&&c.call("skipAd")}catch{}}}};window.admanAsyncLoader?setTimeout(admanAsyncLoader):window.admanAsyncInit&&setTimeout(admanAsyncInit)});var Mi="[",Ci="[!",Gi="]",mi={};var et=Symbol(),Gt=Symbol("filename"),qa=Symbol("hmr"),Ka="http://www.w3.org/1999/xhtml";var Za=globalThis.process?.env?.NODE_ENV,Q=Za&&!Za.toLowerCase().startsWith("prod");var qt=Array.isArray,Ja=Array.prototype.indexOf,Jo=Array.from,Xo=Object.keys,at=Object.defineProperty,It=Object.getOwnPropertyDescriptor,er=Object.getOwnPropertyDescriptors,tr=Object.prototype,Xa=Array.prototype,qi=Object.getPrototypeOf,ir=Object.isExtensible;var ut=()=>{};function Ki(e){for(var t=0;t<e.length;t++)e[t]()}var kt=Symbol("$state"),vn=Symbol("legacy props"),es=Symbol(""),Kn=Symbol("proxy path");var gn=3,Kt=8;function Zn(e){return e===this.v}function Zi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ts(e,t){return e!==t}function Ji(e){return!Zi(e,this.v)}function is(){if(Q){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 ns(e){if(Q){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 os(){if(Q){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 rs(e){if(Q){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 as(){if(Q){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 ss(){if(Q){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 ls(){if(Q){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 ds(e){if(Q){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 us(e){if(Q){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 cs(){if(Q){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 ps(){if(Q){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 fs(){if(Q){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 li=!1,di=!1;function ms(){li=!0}var _n=null;function hi(e){let t=Error(),i=t.stack;if(i){let n=i.split(`
21
- `),o=[`
22
- `];for(let r=0;r<n.length;r++){let s=n[r];if(s!=="Error"){if(s.includes("validate_each_keys"))return null;s.includes("svelte/src/internal")||o.push(s)}}if(o.length===1)return null;at(t,"stack",{value:o.join(`
23
- `)}),at(t,"name",{value:`${e}Error`})}return t}function Zt(e,t){return e.label=t,Jn(e.v,t),e}function Jn(e,t){return e?.[Kn]?.(t),e}function yn(e){if(Q){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}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var Te=null;function bn(e){Te=e}var Jt=null;function An(e){Jt=e}function xn(e){return vs("getContext").get(e)}function En(e,t){return vs("setContext").set(e,t),t}function st(e,t=!1,i){var n=Te={p:Te,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};li&&!t&&(Te.l={s:null,u:null,r1:[],r2:ci(!1)}),St(()=>{n.d=!0}),Q&&(Te.function=i,Jt=i)}function lt(e){let t=Te;if(t!==null){e!==void 0&&(t.x=e);let s=t.e;if(s!==null){var i=ve,n=ge;t.e=null;try{for(var o=0;o<s.length;o++){var r=s[o];_t(r.effect),ct(r.reaction),Nt(r.fn)}}finally{_t(i),ct(n)}}Te=t.p,Q&&(Jt=t.p?.function??null),t.m=!0}return e||{}}function ui(){return!li||Te!==null&&Te.l===null}function vs(e){return Te===null&&yn(e),Te.c??=new Map(cu(Te)||void 0)}function cu(e){let t=e.p;for(;t!==null;){let i=t.c;if(i!==null)return i;t=t.p}return null}var pu=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function yt(e){if(typeof e!="object"||e===null||kt in e)return e;let t=qi(e);if(t!==tr&&t!==Xa)return e;var i=new Map,n=qt(e),o=Fe(0),r=Q&&di?hi("CreatedAt"):null,s=ge,u=p=>{var a=ge;ct(s);var d=p();return ct(a),d};n&&i.set("length",Fe(e.length,r));var c="";function h(p){c=p,Zt(o,`${c} version`);for(let[a,d]of i)Zt(d,$i(c,a))}return new Proxy(e,{defineProperty(p,a,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&cs();var m=i.get(a);return m===void 0?m=u(()=>{var g=Fe(d.value,r);return i.set(a,g),Q&&typeof a=="string"&&Zt(g,$i(c,a)),g}):Ee(m,d.value,!0),!0},deleteProperty(p,a){var d=i.get(a);if(d===void 0){if(a in p){let _=u(()=>Fe(et,r));i.set(a,_),rr(o),Q&&Zt(_,$i(c,a))}}else{if(n&&typeof a=="string"){var m=i.get("length"),g=Number(a);Number.isInteger(g)&&g<m.v&&Ee(m,g)}Ee(d,et),rr(o)}return!0},get(p,a,d){if(a===kt)return e;if(Q&&a===Kn)return h;var m=i.get(a),g=a in p;if(m===void 0&&(!g||It(p,a)?.writable)&&(m=u(()=>{var v=yt(g?p[a]:et),L=Fe(v,r);return Q&&Zt(L,$i(c,a)),L}),i.set(a,m)),m!==void 0){var _=R(m);return _===et?void 0:_}return Reflect.get(p,a,d)},getOwnPropertyDescriptor(p,a){var d=Reflect.getOwnPropertyDescriptor(p,a);if(d&&"value"in d){var m=i.get(a);m&&(d.value=R(m))}else if(d===void 0){var g=i.get(a),_=g?.v;if(g!==void 0&&_!==et)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return d},has(p,a){if(a===kt)return!0;var d=i.get(a),m=d!==void 0&&d.v!==et||Reflect.has(p,a);if(d!==void 0||ve!==null&&(!m||It(p,a)?.writable)){d===void 0&&(d=u(()=>{var _=m?yt(p[a]):et,v=Fe(_,r);return Q&&Zt(v,$i(c,a)),v}),i.set(a,d));var g=R(d);if(g===et)return!1}return m},set(p,a,d,m){var g=i.get(a),_=a in p;if(n&&a==="length")for(var v=d;v<g.v;v+=1){var L=i.get(v+"");L!==void 0?Ee(L,et):v in p&&(L=u(()=>Fe(et,r)),i.set(v+"",L),Q&&Zt(L,$i(c,v)))}if(g===void 0)(!_||It(p,a)?.writable)&&(g=u(()=>Fe(void 0,r)),Ee(g,yt(d)),i.set(a,g),Q&&Zt(g,$i(c,a)));else{_=g.v!==et;var N=u(()=>yt(d));Ee(g,N)}var k=Reflect.getOwnPropertyDescriptor(p,a);if(k?.set&&k.set.call(m,d),!_){if(n&&typeof a=="string"){var y=i.get("length"),T=Number(a);Number.isInteger(T)&&T>=y.v&&Ee(y,T+1)}rr(o)}return!0},ownKeys(p){R(o);var a=Reflect.ownKeys(p).filter(g=>{var _=i.get(g);return _===void 0||_.v!==et});for(var[d,m]of i)m.v!==et&&!(d in p)&&a.push(d);return a},setPrototypeOf(){ps()}})}function $i(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:pu.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function rr(e,t=1){Ee(e,e.v+t)}function Xn(e){try{if(e!==null&&typeof e=="object"&&kt in e)return e[kt]}catch{}return e}function vi(e){var t=2050,i=ge!==null&&(ge.f&2)!==0?ge:null;ve===null||i!==null&&(i.f&256)!==0?t|=256:ve.f|=1048576;let n={ctx:Te,deps:null,effects:null,equals:Zn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:i??ve};return Q&&di&&(n.created=hi("CreatedAt")),n}function gi(e){let t=vi(e);return no(t),t}function io(e){let t=vi(e);return t.equals=Ji,t}function eo(e){var t=e.effects;if(t!==null){e.effects=null;for(var i=0;i<t.length;i+=1)ft(t[i])}}var ar=[];function fu(e){for(var t=e.parent;t!==null;){if((t.f&2)===0)return t;t=t.parent}return null}function dr(e){var t,i=ve;if(_t(fu(e)),Q){let n=Oi;sr(new Set);try{ar.includes(e)&&is(),ar.push(e),eo(e),t=to(e)}finally{_t(i),sr(n),ar.pop()}}else try{eo(e),t=to(e)}finally{_t(i)}return t}function ur(e){var t=dr(e);if(e.equals(t)||(e.v=t,e.wv=Sn()),!_i){var i=(yi||(e.f&256)!==0)&&e.deps!==null?4096:1024;Tt(e,i)}}var Oi=new Set,Xi=new Map;function sr(e){Oi=e}function ci(e,t){var i={f:0,v:e,reactions:null,equals:Zn,rv:0,wv:0};return Q&&di&&(i.created=t??hi("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function Fe(e,t){let i=ci(e,t);return no(i),i}function Ai(e,t=!1,i=!0){let n=ci(e);return t||(n.equals=Ji),li&&i&&Te!==null&&Te.l!==null&&(Te.l.s??=[]).push(n),n}function Ee(e,t,i=!1){ge!==null&&(!Rt||(ge.f&262144)!==0)&&ui()&&(ge.f&262162)!==0&&!(Ot?.[1].includes(e)&&Ot[0]===ge)&&fs();let n=i?yt(t):t;return Q&&Jn(n,e.label),oo(e,n)}function oo(e,t){if(!e.equals(t)){var i=e.v;if(_i?Xi.set(e,t):Xi.set(e,i),e.v=t,Q&&di&&(e.updated=hi("UpdatedAt"),ve!==null&&(e.set_during_effect=!0)),(e.f&2)!==0&&((e.f&2048)!==0&&dr(e),Tt(e,(e.f&256)===0?1024:4096)),e.wv=Sn(),gs(e,2048),ui()&&ve!==null&&(ve.f&1024)!==0&&(ve.f&96)===0&&(Pt===null?_s([e]):Pt.push(e)),Q&&Oi.size>0){let n=Array.from(Oi);for(let o of n)(o.f&1024)!==0&&Tt(o,4096),Pi(o)&&tn(o);Oi.clear()}}return t}function gs(e,t){var i=e.reactions;if(i!==null)for(var n=ui(),o=i.length,r=0;r<o;r++){var s=i[r],u=s.f;if((u&2048)===0&&!(!n&&s===ve)){if(Q&&(u&262144)!==0){Oi.add(s);continue}Tt(s,t),(u&1280)!==0&&((u&2)!==0?gs(s,4096):Mn(s))}}}var ro="font-weight: bold",ao="font-weight: normal";function ys(e,t,i){Q?console.warn(`%c[svelte] hydration_attribute_changed
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`,ro,ao):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Ri(e){Q?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`,ro,ao):console.warn("https://svelte.dev/e/hydration_mismatch")}function bs(){Q?console.warn(`%c[svelte] lifecycle_double_unmount
30
- %cTried to unmount a component that was not mounted
31
- https://svelte.dev/e/lifecycle_double_unmount`,ro,ao):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function so(e){Q?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`,ro,ao):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var me=!1;function jt(e){me=e}var Ae;function ot(e){if(e===null)throw Ri(),mi;return Ae=e}function At(){return ot(Mt(Ae))}function ne(e){if(me){if(Mt(Ae)!==null)throw Ri(),mi;Ae=e}}function nn(e=1){if(me){for(var t=e,i=Ae;t--;)i=Mt(i);Ae=i}}function wn(){for(var e=0,t=Ae;;){if(t.nodeType===Kt){var i=t.data;if(i===Gi){if(e===0)return t;e-=1}else(i===Mi||i===Ci)&&(e+=1)}var n=Mt(t);t.remove(),t=n}}function cr(e){if(!e||e.nodeType!==Kt)throw Ri(),mi;return e.data}function As(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:i,lastIndexOf:n,includes:o}=e;e.indexOf=function(r,s){let u=i.call(this,r,s);if(u===-1){for(let c=s??0;c<this.length;c+=1)if(Xn(this[c])===r){so("array.indexOf(...)");break}}return u},e.lastIndexOf=function(r,s){let u=n.call(this,r,s??this.length-1);if(u===-1){for(let c=0;c<=(s??this.length-1);c+=1)if(Xn(this[c])===r){so("array.lastIndexOf(...)");break}}return u},e.includes=function(r,s){let u=o.call(this,r,s);if(!u){for(let c=0;c<this.length;c+=1)if(Xn(this[c])===r){so("array.includes(...)");break}}return u},Array.__svelte_cleanup=()=>{e.indexOf=i,e.lastIndexOf=n,e.includes=o}}var pr,xs,In,Es,Ss;function lo(){if(pr===void 0){pr=window,xs=document,In=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,i=Text.prototype;Es=It(t,"firstChild").get,Ss=It(t,"nextSibling").get,ir(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),ir(i)&&(i.__t=void 0),Q&&(e.__svelte_meta=null,As())}}function ei(e=""){return document.createTextNode(e)}function rt(e){return Es.call(e)}function Mt(e){return Ss.call(e)}function oe(e,t){if(!me)return rt(e);var i=rt(Ae);if(i===null)i=Ae.appendChild(ei());else if(t&&i.nodeType!==gn){var n=ei();return i?.before(n),ot(n),n}return ot(i),i}function on(e,t){if(!me){var i=rt(e);return i.nodeType===8&&i.data===""?Mt(i):i}if(t&&Ae?.nodeType!==gn){var n=ei();return Ae?.before(n),ot(n),n}return Ae}function pe(e,t=1,i=!1){let n=me?Ae:e;for(var o;t--;)o=n,n=Mt(n);if(!me)return n;if(i&&n?.nodeType!==gn){var r=ei();return n===null?o?.after(r):n.before(r),ot(r),r}return ot(n),n}function uo(e){e.textContent=""}function Ms(e){ve===null&&ge===null&&rs(e),ge!==null&&(ge.f&256)!==0&&ve===null&&os(),_i&&ns(e)}function mu(e,t){var i=t.last;i===null?t.last=t.first=e:(i.next=e,e.prev=i,t.last=e)}function Vi(e,t,i,n=!0){var o=ve;if(Q)for(;o!==null&&(o.f&262144)!==0;)o=o.parent;var r={ctx:Te,deps:null,nodes_start:null,nodes_end:null,f:e|2048,first:null,fn:t,last:null,next:null,parent:o,prev:null,teardown:null,transitions:null,wv:0};if(Q&&(r.component_function=Jt),i)try{tn(r),r.f|=32768}catch(c){throw ft(r),c}else t!==null&&Mn(r);var s=i&&r.deps===null&&r.first===null&&r.nodes_start===null&&r.teardown===null&&(r.f&1048704)===0;if(!s&&n&&(o!==null&&mu(r,o),ge!==null&&(ge.f&2)!==0)){var u=ge;(u.effects??=[]).push(r)}return r}function St(e){let t=Vi(8,null,!1);return Tt(t,1024),t.teardown=e,t}function xi(e){Ms("$effect");var t=ve!==null&&(ve.f&32)!==0&&Te!==null&&!Te.m;if(Q&&at(e,"name",{value:"$effect"}),t){var i=Te;(i.e??=[]).push({fn:e,effect:ve,reaction:ge})}else{var n=Nt(e);return n}}function mo(e){let t=Vi(64,e,!0);return()=>{ft(t)}}function ws(e){let t=Vi(64,e,!0);return(i={})=>new Promise(n=>{i.outro?ii(t,()=>{ft(t),n(void 0)}):(ft(t),n(void 0))})}function Nt(e){return Vi(4,e,!1)}function xt(e){return Vi(8,e,!0)}function ze(e,t=[],i=vi){if(Q)return xt(()=>{var o=ve,r=()=>e(...s.map(R));at(o.fn,"name",{value:"{expression}"}),at(r,"name",{value:"{expression}"});let s=t.map(i);mt(r)});let n=t.map(i);return mt(()=>e(...n.map(R)))}function mt(e,t=0){return Vi(24|t,e,!0)}function ht(e,t=!0){return Vi(40,e,!0,t)}function hr(e){var t=e.teardown;if(t!==null){let i=_i,n=ge;fr(!0),ct(null);try{t.call(null)}finally{fr(i),ct(n)}}}function vr(e,t=!1){var i=e.first;for(e.first=e.last=null;i!==null;){var n=i.next;(i.f&64)!==0?i.parent=null:ft(i,t),i=n}}function Is(e){for(var t=e.first;t!==null;){var i=t.next;(t.f&32)===0&&ft(t),t=i}}function ft(e,t=!0){var i=!1;(t||(e.f&524288)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(ks(e.nodes_start,e.nodes_end),i=!0),vr(e,t&&!i),Nn(e,0),Tt(e,16384);var n=e.transitions;if(n!==null)for(let r of n)r.stop();hr(e);var o=e.parent;o!==null&&o.first!==null&&gr(e),Q&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function ks(e,t){for(;e!==null;){var i=e===t?null:Mt(e);e.remove(),e=i}}function gr(e){var t=e.parent,i=e.prev,n=e.next;i!==null&&(i.next=n),n!==null&&(n.prev=i),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=i))}function ii(e,t){var i=[];_r(e,i,!0),Ns(i,()=>{ft(e),t&&t()})}function Ns(e,t){var i=e.length;if(i>0){var n=()=>--i||t();for(var o of e)o.out(n)}else t()}function _r(e,t,i){if((e.f&8192)===0){if(e.f^=8192,e.transitions!==null)for(let s of e.transitions)(s.is_global||i)&&t.push(s);for(var n=e.first;n!==null;){var o=n.next,r=(n.f&65536)!==0||(n.f&32)!==0;_r(n,t,r?i:!1),n=o}}}function rn(e){Ds(e,!0)}function Ds(e,t){if((e.f&8192)!==0){e.f^=8192;for(var i=e.first;i!==null;){var n=i.next,o=(i.f&65536)!==0||(i.f&32)!==0;Ds(i,o?t:!1),i=n}if(e.transitions!==null)for(let r of e.transitions)(r.is_global||t)&&r.in()}}var Dn=[],yr=[];function Ls(){var e=Dn;Dn=[],Ki(e)}function hu(){var e=yr;yr=[],Ki(e)}function ni(e){Dn.length===0&&queueMicrotask(Ls),Dn.push(e)}function Cs(){Dn.length>0&&Ls(),yr.length>0&&hu()}function Os(e){var t=ve;if(Q&&e instanceof Error&&vu(e,t),(t.f&32768)===0){if((t.f&128)===0)throw e;t.fn(e)}else Ln(e,t)}function Ln(e,t){for(;t!==null;){if((t.f&128)!==0)try{t.fn(e);return}catch{}t=t.parent}throw e}var $s=new WeakSet;function vu(e,t){if($s.has(e))return;$s.add(e);let i=It(e,"message");if(!(i&&!i.configurable)){for(var n=In?" ":" ",o=`
34
- ${n}in ${t.fn?.name||"<unknown>"}`,r=t.ctx;r!==null;)o+=`
35
- ${n}in ${r.function?.[Gt].split("/").pop()}`,r=r.p;at(e,"message",{value:e.message+`
36
- ${o}
37
- `}),e.stack&&at(e,"stack",{value:e.stack.split(`
38
- `).filter(s=>!s.includes("svelte/src/internal")).join(`
39
- `)})}}var ji=!1,an=null,Ui=!1,_i=!1;function fr(e){_i=e}var Cn=[],$n=[],ge=null,Rt=!1;function ct(e){ge=e}var ve=null;function _t(e){ve=e}var Ot=null;function no(e){ge!==null&&ge.f&2097152&&(Ot===null?Ot=[ge,[e]]:Ot[1].push(e))}var wt=null,Ut=0,Pt=null;function _s(e){Pt=e}var Vs=1,vo=0,yi=!1,go=null;function Sn(){return++Vs}function Pi(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 o,r,s=(t&512)!==0,u=n&&ve!==null&&!yi,c=i.length;if(s||u){var h=e,p=h.parent;for(o=0;o<c;o++)r=i[o],(s||!r?.reactions?.includes(h))&&(r.reactions??=[]).push(h);s&&(h.f^=512),u&&p!==null&&(p.f&256)===0&&(h.f^=256)}for(o=0;o<c;o++)if(r=i[o],Pi(r)&&ur(r),r.wv>e.wv)return!0}(!n||ve!==null&&!yi)&&Tt(e,1024)}return!1}function js(e,t,i=!0){var n=e.reactions;if(n!==null)for(var o=0;o<n.length;o++){var r=n[o];Ot?.[1].includes(e)&&Ot[0]===ge||((r.f&2)!==0?js(r,t,!1):t===r&&(i?Tt(r,2048):(r.f&1024)!==0&&Tt(r,4096),Mn(r)))}}function to(e){var t=wt,i=Ut,n=Pt,o=ge,r=yi,s=Ot,u=Te,c=Rt,h=e.f;wt=null,Ut=0,Pt=null,yi=(h&256)!==0&&(Rt||!Ui||ge===null),ge=(h&96)===0?e:null,Ot=null,bn(e.ctx),Rt=!1,vo++,e.f|=2097152;try{var p=(0,e.fn)(),a=e.deps;if(wt!==null){var d;if(Nn(e,Ut),a!==null&&Ut>0)for(a.length=Ut+wt.length,d=0;d<wt.length;d++)a[Ut+d]=wt[d];else e.deps=a=wt;if(!yi||(h&2)!==0&&e.reactions!==null)for(d=Ut;d<a.length;d++)(a[d].reactions??=[]).push(e)}else a!==null&&Ut<a.length&&(Nn(e,Ut),a.length=Ut);if(ui()&&Pt!==null&&!Rt&&a!==null&&(e.f&6146)===0)for(d=0;d<Pt.length;d++)js(Pt[d],e);return o!==null&&o!==e&&(vo++,Pt!==null&&(n===null?n=Pt:n.push(...Pt))),p}catch(m){Os(m)}finally{wt=t,Ut=i,Pt=n,ge=o,yi=r,Ot=s,bn(u),Rt=c,e.f^=2097152}}function gu(e,t){let i=t.reactions;if(i!==null){var n=Ja.call(i,e);if(n!==-1){var o=i.length-1;o===0?i=t.reactions=null:(i[n]=i[o],i.pop())}}i===null&&(t.f&2)!==0&&(wt===null||!wt.includes(t))&&(Tt(t,4096),(t.f&768)===0&&(t.f^=512),eo(t),Nn(t,0))}function Nn(e,t){var i=e.deps;if(i!==null)for(var n=t;n<i.length;n++)gu(e,i[n])}function tn(e){var t=e.f;if((t&16384)===0){Tt(e,1024);var i=ve,n=Ui;if(ve=e,Ui=!0,Q){var o=Jt;An(e.component_function)}try{(t&16)!==0?Is(e):vr(e),hr(e);var r=to(e);if(e.teardown=typeof r=="function"?r:null,e.wv=Vs,Q&&di&&(e.f&2048)!==0&&e.deps!==null)for(var s of e.deps)s.set_during_effect&&(s.wv=Sn(),s.set_during_effect=!1);Q&&$n.push(e)}finally{Ui=n,ve=i,Q&&An(o)}}}function Ps(){console.error("Last ten effects were: ",$n.slice(-10).map(e=>e.fn)),$n=[]}function _u(){try{as()}catch(e){if(Q&&at(e,"stack",{value:""}),an!==null)if(Q)try{Ln(e,an)}catch(t){throw Ps(),t}else Ln(e,an);else throw Q&&Ps(),e}}function Ar(){var e=Ui;try{var t=0;for(Ui=!0;Cn.length>0;){t++>1e3&&_u();var i=Cn,n=i.length;Cn=[];for(var o=0;o<n;o++){var r=bu(i[o]);yu(r)}Xi.clear()}}finally{ji=!1,Ui=e,an=null,Q&&($n=[])}}function yu(e){var t=e.length;if(t!==0)for(var i=0;i<t;i++){var n=e[i];(n.f&24576)===0&&Pi(n)&&(tn(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?gr(n):n.fn=null))}}function Mn(e){ji||(ji=!0,queueMicrotask(Ar));for(var t=an=e;t.parent!==null;){t=t.parent;var i=t.f;if((i&96)!==0){if((i&1024)===0)return;t.f^=1024}}Cn.push(t)}function bu(e){for(var t=[],i=e;i!==null;){var n=i.f,o=(n&96)!==0,r=o&&(n&1024)!==0;if(!r&&(n&8192)===0){(n&4)!==0?t.push(i):o?i.f^=1024:Pi(i)&&tn(i);var s=i.first;if(s!==null){i=s;continue}}var u=i.parent;for(i=i.next;i===null&&u!==null;)i=u.next,u=u.parent}return t}function On(e){var t;for(e&&(ji=!0,Ar(),ji=!0,t=e());;){if(Cs(),Cn.length===0)return ji=!1,an=null,Q&&($n=[]),t;ji=!0,Ar()}}function R(e){var t=e.f,i=(t&2)!==0;if(go!==null&&go.add(e),ge!==null&&!Rt){if(!Ot?.[1].includes(e)||Ot[0]!==ge){var n=ge.deps;e.rv<vo&&(e.rv=vo,wt===null&&n!==null&&n[Ut]===e?Ut++:wt===null?wt=[e]:(!yi||!wt.includes(e))&&wt.push(e))}}else if(i&&e.deps===null&&e.effects===null){var o=e,r=o.parent;r!==null&&(r.f&256)===0&&(o.f^=256)}if(i&&(o=e,Pi(o)&&ur(o)),Q&&di&&!Rt&&_n!==null&&ge!==null&&_n.reaction===ge)if(e.trace)e.trace();else{var s=hi("TracedAt");if(s){var u=_n.entries.get(e);u===void 0&&(u={traces:[]},_n.entries.set(e,u));var c=u.traces[u.traces.length-1];s.stack!==c?.stack&&u.traces.push(s)}}return _i&&Xi.has(e)?Xi.get(e):e.v}function Ge(e){var t=Rt;try{return Rt=!0,e()}finally{Rt=t}}var Au=-7169;function Tt(e,t){e.f=e.f&Au|t}var xr=new Set,_o=new Set;function sn(e){for(var t=0;t<e.length;t++)xr.add(e[t]);for(var i of _o)i(e)}function Pn(e){var t=this,i=t.ownerDocument,n=e.type,o=e.composedPath?.()||[],r=o[0]||e.target,s=0,u=e.__root;if(u){var c=o.indexOf(u);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var h=o.indexOf(t);if(h===-1)return;c<=h&&(s=c)}if(r=o[s]||e.target,r!==t){at(e,"currentTarget",{configurable:!0,get(){return r||i}});var p=ge,a=ve;ct(null),_t(null);try{for(var d,m=[];r!==null;){var g=r.assignedSlot||r.parentNode||r.host||null;try{var _=r["__"+n];if(_!=null&&(!r.disabled||e.target===r))if(qt(_)){var[v,...L]=_;v.apply(r,[e,...L])}else _.call(r,e)}catch(N){d?m.push(N):d=N}if(e.cancelBubble||g===t||g===null)break;r=g}if(d){for(let N of m)queueMicrotask(()=>{throw N});throw d}}finally{e.__root=t,delete e.currentTarget,ct(p),_t(a)}}}var Eu;function zs(){Eu=void 0}function Rn(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function zt(e,t){var i=ve;i.nodes_start===null&&(i.nodes_start=e,i.nodes_end=t)}function we(e,t){var i=(t&1)!==0,n=(t&2)!==0,o,r=!e.startsWith("<!>");return()=>{if(me)return zt(Ae,null),Ae;o===void 0&&(o=Rn(r?e:"<!>"+e),i||(o=rt(o)));var s=n||In?document.importNode(o,!0):o.cloneNode(!0);if(i){var u=rt(s),c=s.lastChild;zt(u,c)}else zt(s,s);return s}}function Mu(e,t,i="svg"){var n=!e.startsWith("<!>"),o=(t&1)!==0,r=`<${i}>${n?e:"<!>"+e}</${i}>`,s;return()=>{if(me)return zt(Ae,null),Ae;if(!s){var u=Rn(r),c=rt(u);if(o)for(s=document.createDocumentFragment();rt(c);)s.appendChild(rt(c));else s=rt(c)}var h=s.cloneNode(!0);if(o){var p=rt(h),a=h.lastChild;zt(p,a)}else zt(h,h);return h}}function pi(e,t){return Mu(e,t,"svg")}function Er(){if(me)return zt(Ae,null),Ae;var e=document.createDocumentFragment(),t=document.createComment(""),i=ei();return e.append(t,i),zt(t,i),e}function fe(e,t){if(me){ve.nodes_end=Ae,At();return}e!==null&&e.before(t)}var wu=["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 Zh=[...wu,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var Iu=["touchstart","touchmove"];function Qs(e){return Iu.includes(e)}var ku=["$state","$state.raw","$derived","$derived.by"],Jh=[...ku,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var Sr=!0;function Ze(e,t){var i=t==null?"":typeof t=="object"?t+"":t;i!==(e.__t??=e.nodeValue)&&(e.__t=i,e.nodeValue=i+"")}function Ii(e,t){return Ys(e,t)}function Mr(e,t){lo(),t.intro=t.intro??!1;let i=t.target,n=me,o=Ae;try{for(var r=rt(i);r&&(r.nodeType!==Kt||r.data!==Mi);)r=Mt(r);if(!r)throw mi;jt(!0),ot(r),At();let s=Ys(e,{...t,anchor:r});if(Ae===null||Ae.nodeType!==Kt||Ae.data!==Gi)throw Ri(),mi;return jt(!1),s}catch(s){if(s===mi)return t.recover===!1&&ss(),lo(),uo(i),jt(!1),Ii(e,t);throw s}finally{jt(n),ot(o),zs()}}var ln=new Map;function Ys(e,{target:t,anchor:i,props:n={},events:o,context:r,intro:s=!0}){lo();var u=new Set,c=a=>{for(var d=0;d<a.length;d++){var m=a[d];if(!u.has(m)){u.add(m);var g=Qs(m);t.addEventListener(m,Pn,{passive:g});var _=ln.get(m);_===void 0?(document.addEventListener(m,Pn,{passive:g}),ln.set(m,1)):ln.set(m,_+1)}}};c(Jo(xr)),_o.add(c);var h=void 0,p=ws(()=>{var a=i??t.appendChild(ei());return ht(()=>{if(r){st({});var d=Te;d.c=r}o&&(n.$$events=o),me&&zt(a,null),Sr=s,h=e(a,n)||{},Sr=!0,me&&(ve.nodes_end=Ae),r&&lt()}),()=>{for(var d of u){t.removeEventListener(d,Pn);var m=ln.get(d);--m===0?(document.removeEventListener(d,Pn),ln.delete(d)):ln.set(d,m)}_o.delete(c),a!==i&&a.parentNode?.removeChild(a)}});return Tr.set(h,p),h}var Tr=new WeakMap;function Vn(e,t){let i=Tr.get(e);return i?(Tr.delete(e),i(t)):(Q&&bs(),Promise.resolve())}function yo(e,t,...i){var n=e,o=ut,r;mt(()=>{o!==(o=t())&&(r&&(ft(r),r=null),Q&&o==null&&ls(),r=ht(()=>o(n,...i)))},65536),me&&(n=Ae)}if(Q){let e=function(t){if(!(t in globalThis)){let i;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(i!==void 0)return i;us(t)},set:n=>{i=n}})}};Cu=e,e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}var Cu;function dn(e){Te===null&&yn("onMount"),li&&Te.l!==null?Lu(Te).m.push(e):xi(()=>{let t=Ge(e);if(typeof t=="function")return t})}function Lu(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var qs=new Map;function Ks(e,t){var i=qs.get(e);i||(i=new Set,qs.set(e,i)),i.add(t)}function Qe(e,t,[i,n]=[0,0]){me&&i===0&&At();var o=e,r=null,s=null,u=et,c=i>0?65536:0,h=!1;let p=(d,m=!0)=>{h=!0,a(m,d)},a=(d,m)=>{if(u===(u=d))return;let g=!1;if(me&&n!==-1){if(i===0){let v=cr(o);v===Mi?n=0:v===Ci?n=1/0:(n=parseInt(v.substring(1)),n!==n&&(n=u?1/0:-1))}let _=n>i;!!u===_&&(o=wn(),ot(o),jt(!1),g=!0,n=-1)}u?(r?rn(r):m&&(r=ht(()=>m(o))),s&&ii(s,()=>{s=null})):(s?rn(s):m&&(s=ht(()=>m(o,[i+1,n]))),r&&ii(r,()=>{r=null})),g&&jt(!0)};mt(()=>{h=!1,t(p),h||a(null,null)},c),me&&(o=Ae)}function wr(e,t,i){me&&At();var n=e,o=et,r,s=ui()?ts:Zi;mt(()=>{s(o,o=t())&&(r&&ii(r),r=ht(()=>i(n)))}),me&&(n=Ae)}var Nr;function Zs(e){return Nr=e.target,new kr(e)}var kr=class{#t;#e;constructor(t){var i=new Map,n=(r,s)=>{var u=Ai(s,!1,!1);return i.set(r,u),u};let o=new Proxy({...t.props||{},$$events:{}},{get(r,s){return R(i.get(s)??n(s,Reflect.get(r,s)))},has(r,s){return s===vn?!0:(R(i.get(s)??n(s,Reflect.get(r,s))),Reflect.has(r,s))},set(r,s,u){return Ee(i.get(s)??n(s,u),u),Reflect.set(r,s,u)}});this.#e=(t.hydrate?Mr:Ii)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&On(),this.#t=o.$$events;for(let r of Object.keys(this.#e))r==="$set"||r==="$destroy"||r==="$on"||at(this,r,{get(){return this.#e[r]},set(s){this.#e[r]=s},enumerable:!0});this.#e.$set=r=>{Object.assign(o,r)},this.#e.$destroy=()=>{Vn(this.#e)}}$set(t){this.#e.$set(t)}$on(t,i){this.#t[t]=this.#t[t]||[];let n=(...o)=>i.call(this,...o);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(o=>o!==n)}}$destroy(){this.#e.$destroy()}};function dt(e,t){ni(()=>{var i=e.getRootNode(),n=i.host?i:i.head??i.ownerDocument.head??Nr?.parentNode;if(!n?.querySelector("#"+t.hash)){let o=document.createElement("style");o.id=t.hash,o.textContent=t.code,n.appendChild(o),Q&&Ks(t.hash,o)}})}var Xs=[...`
40
- \r\f \v\uFEFF`];function tl(e,t,i){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),i){for(var o in i)if(i[o])n=n?n+" "+o:o;else if(n.length)for(var r=o.length,s=0;(s=n.indexOf(o,s))>=0;){var u=s+r;(s===0||Xs.includes(n[s-1]))&&(u===n.length||Xs.includes(n[u]))?n=(s===0?"":n.substring(0,s))+n.substring(u+1):s=u}}return n===""?null:n}function el(e,t=!1){var i=t?" !important;":";",n="";for(var o in e){var r=e[o];r!=null&&r!==""&&(n+=" "+o+": "+r+i)}return n}function Dr(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function il(e,t){if(t){var i="",n,o;if(Array.isArray(t)?(n=t[0],o=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var r=!1,s=0,u=!1,c=[];n&&c.push(...Object.keys(n).map(Dr)),o&&c.push(...Object.keys(o).map(Dr));var h=0,p=-1;let _=e.length;for(var a=0;a<_;a++){var d=e[a];if(u?d==="/"&&e[a-1]==="*"&&(u=!1):r?r===d&&(r=!1):d==="/"&&e[a+1]==="*"?u=!0:d==='"'||d==="'"?r=d:d==="("?s++:d===")"&&s--,!u&&r===!1&&s===0){if(d===":"&&p===-1)p=a;else if(d===";"||a===_-1){if(p!==-1){var m=Dr(e.substring(h,p).trim());if(!c.includes(m)){d!==";"&&a++;var g=e.substring(h,a).trim();i+=" "+g+";"}}h=a+1,p=-1}}}}return n&&(i+=el(n)),o&&(i+=el(o,!0)),i=i.trim(),i===""?null:i}return e==null?null:String(e)}function un(e,t,i,n,o,r){var s=e.__className;if(me||s!==i||s===void 0){var u=tl(i,n,r);(!me||u!==e.getAttribute("class"))&&(u==null?e.removeAttribute("class"):t?e.className=u:e.setAttribute("class",u)),e.__className=i}else if(r&&o!==r)for(var c in r){var h=!!r[c];(o==null||h!==!!o[c])&&e.classList.toggle(c,h)}return r}function Lr(e,t={},i,n){for(var o in i){var r=i[o];t[o]!==r&&(i[o]==null?e.style.removeProperty(o):e.style.setProperty(o,r,n))}}function ki(e,t,i,n){var o=e.__style;if(me||o!==t){var r=il(t,n);(!me||r!==e.getAttribute("style"))&&(r==null?e.removeAttribute("style"):e.style.cssText=r),e.__style=t}else n&&(Array.isArray(n)?(Lr(e,i?.[0],n[0]),Lr(e,i?.[1],n[1],"important")):Lr(e,i,n));return n}var Ku=Symbol("class"),Zu=Symbol("style"),Ju=Symbol("is custom element"),Xu=Symbol("is html");function Ft(e,t,i,n){var o=ec(e);if(me&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||ic(e,t,i??"");return}o[t]!==(o[t]=i)&&(t==="loading"&&(e[es]=i),i==null?e.removeAttribute(t):typeof i!="string"&&tc(e).includes(t)?e[t]=i:e.setAttribute(t,i))}function ec(e){return e.__attributes??={[Ju]:e.nodeName.includes("-"),[Xu]:e.namespaceURI===Ka}}var nl=new Map;function tc(e){var t=nl.get(e.nodeName);if(t)return t;nl.set(e.nodeName,t=[]);for(var i,n=e,o=Element.prototype;o!==n;){i=er(n);for(var r in i)i[r].set&&t.push(r);n=qi(n)}return t}function ic(e,t,i){Q&&(t==="srcset"&&nc(e,i)||Cr(e.getAttribute(t)??"",i)||ys(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(i)))}function Cr(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function ol(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function nc(e,t){var i=ol(e.srcset),n=ol(t);return n.length===i.length&&n.every(([o,r],s)=>r===i[s][1]&&(Cr(i[s][0],o)||Cr(o,i[s][0])))}function rl(e,t){return e===t||e?.[kt]===t}function zi(e={},t,i,n){return Nt(()=>{var o,r;return xt(()=>{o=r,r=n?.()||[],Ge(()=>{e!==i(...r)&&(t(e,...r),o&&rl(i(...o),e)&&t(null,...o))})}),()=>{ni(()=>{r&&rl(i(...r),e)&&t(null,...r)})}}),e}function jn(e,t,i){if(e==null)return t(void 0),i&&i(void 0),ut;let n=Ge(()=>e.subscribe(t,i));return n.unsubscribe?()=>n.unsubscribe():n}var cn=[];function Bt(e,t){return{subscribe:V(e,t).subscribe}}function V(e,t=ut){let i=null,n=new Set;function o(u){if(Zi(e,u)&&(e=u,i)){let c=!cn.length;for(let h of n)h[1](),cn.push(h,e);if(c){for(let h=0;h<cn.length;h+=2)cn[h][0](cn[h+1]);cn.length=0}}}function r(u){o(u(e))}function s(u,c=ut){let h=[u,c];return n.add(h),n.size===1&&(i=t(o,r)||ut),u(e),()=>{n.delete(h),n.size===0&&i&&(i(),i=null)}}return{set:o,update:r,subscribe:s}}function tt(e,t,i){let n=!Array.isArray(e),o=n?[e]:e;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let r=t.length<2;return Bt(i,(s,u)=>{let c=!1,h=[],p=0,a=ut,d=()=>{if(p)return;a();let g=t(n?h[0]:h,s,u);r?s(g):a=typeof g=="function"?g:ut},m=o.map((g,_)=>jn(g,v=>{h[_]=v,p&=~(1<<_),c&&d()},()=>{p|=1<<_}));return c=!0,d(),function(){Ki(m),a(),c=!1}})}function _e(e){let t;return jn(e,i=>t=i)(),t}var Ao=!1,$r=Symbol();function oi(e,t,i){let n=i[t]??={store:null,source:Ai(void 0),unsubscribe:ut};if(n.store!==e&&!($r in i))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=ut;else{var o=!0;n.unsubscribe=jn(e,r=>{o?n.source.v=r:Ee(n.source,r)}),o=!1}return e&&$r in i?_e(e):R(n.source)}function Fi(){let e={};function t(){St(()=>{for(var i in e)e[i].unsubscribe();at(e,$r,{enumerable:!1,value:!0})})}return[e,t]}function Or(e){var t=Ao;try{return Ao=!1,[e(),Ao]}finally{Ao=t}}function al(e){return e.ctx?.d??!1}function ye(e,t,i,n){var o=(i&1)!==0,r=!li||(i&2)!==0,s=(i&8)!==0,u=(i&16)!==0,c=!1,h;s?[h,c]=Or(()=>e[t]):h=e[t];var p=kt in e||vn in e,a=s&&(It(e,t)?.set??(p&&t in e&&(E=>e[t]=E)))||void 0,d=n,m=!0,g=!1,_=()=>(g=!0,m&&(m=!1,u?d=Ge(n):d=n),d);h===void 0&&n!==void 0&&(a&&r&&ds(t),h=_(),a&&a(h));var v;if(r)v=()=>{var E=e[t];return E===void 0?_():(m=!0,g=!1,E)};else{var L=(o?vi:io)(()=>e[t]);L.f|=131072,v=()=>{var E=R(L);return E!==void 0&&(d=void 0),E===void 0?d:E}}if((i&4)===0&&r)return v;if(a){var N=e.$$legacy;return function(E,f){return arguments.length>0?((!r||!f||N||c)&&a(f?v():E),E):v()}}var k=!1,y=!1,T=Ai(h),w=vi(()=>{var E=v(),f=R(T);return k?(k=!1,y=!0,f):(y=!1,T.v=E)});return s&&R(w),o||(w.equals=Ji),function(E,f){if(go!==null&&(k=y,v(),R(T)),arguments.length>0){let B=f?R(w):r&&s?yt(E):E;if(!w.equals(B)){if(k=!0,Ee(T,B),g&&d!==void 0&&(d=B),al(w))return E;Ge(()=>R(w))}return E}return al(w)?w.v:R(w)}}var pc;typeof HTMLElement=="function"&&(pc=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(o){return r=>{let s=document.createElement("slot");o!=="default"&&(s.name=o),fe(r,s)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let i={},n=fc(this);for(let o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=t(o),i.default=!0):i[o]=t(o));for(let o of this.attributes){let r=this.$$g_p(o.name);r in this.$$d||(this.$$d[r]=Pr(r,o.value,this.$$p_d,"toProp"))}for(let o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=Zs({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:i,$$host:this}}),this.$$me=mo(()=>{xt(()=>{this.$$r=!0;for(let o of Xo(this.$$c)){if(!this.$$p_d[o]?.reflect)continue;this.$$d[o]=this.$$c[o];let r=Pr(o,this.$$d[o],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,r)}this.$$r=!1})});for(let o in this.$$l)for(let r of this.$$l[o]){let s=this.$$c.$on(o,r);this.$$l_u.set(r,s)}this.$$l={}}}attributeChangedCallback(e,t,i){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Pr(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 Xo(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Pr(e,t,i,n){let o=i[e]?.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!i[e])return t;if(n==="toAttribute")switch(o){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(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function fc(e){let t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}var sl="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(sl);import{areValidLiveRecordSources as fp}from"@vkontakte/videoplayer-core";import"@vkontakte/videoplayer-core";import{safeStorage as mp}from"@vkontakte/videoplayer-shared";import{SeekAction as hp}from"@vkontakte/videoplayer-statistics";import{InterfaceLanguage as mc,fillWithDefault as hc,VideoQuality as ll}from"@vkontakte/videoplayer-shared";var vc={debugLog:!1,devNullLog:!1,defaultLanguage:mc.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:ll.Q_480P,highQualityLimit:ll.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"},dl=e=>hc(e,vc),ul=e=>En("ui-config",e),pn=()=>xn("ui-config");var Un="vk_player_debug_panel_opened";var cl="videoplayer",pl="videoplayer";import{assertNonNullable as gc,VERSION as _c}from"@vkontakte/videoplayer-shared";import{VERSION as yc}from"@vkontakte/videoplayer-core";import{VERSION as bc}from"@vkontakte/videoplayer-statistics";var fl="prod",xo="1.0.4-dev.a9123e27.0";var ml=(e,t,i)=>{let n=document.createElement("a");n.href=e,n.download=`${t}.${i}`,n.style.display="none",n.click()};var hl=Symbol("storeContext"),vl=e=>{En(hl,e),fl==="dev"&&(window.app={store:e})},Ni=()=>{let e=xn(hl);return gc(e,"Store context is empty!"),e},Oe=(e,t)=>So(e,e.getValue(),t),So=(e,t,i)=>Bt(t,n=>{let o=e.subscribe(r=>{n(r),i?.(r)});return()=>o.unsubscribe()}),gl=(e,t,i,n,o=["meta config not provided"])=>{let r=e.info,{width:s,height:u}=_e(i.ui.playerSize),c=r.throughputEstimation$.getValue()?.toFixed(0)??0,h=r.rttEstimation$.getValue()?.toFixed(0)??0,p=r.isAutoQualityEnabled$.getValue()?"auto":"manual",a=`${xo} (core: ${yc}, stat: ${bc}, shared: ${_c})`,d=_e(i.state.errorLog$),m=d.length?`
41
- `+d.map((f,B)=>{let A=`${B}) Type: ${f.id}
42
- `,O=`Message: ${f.message} (${f.thrown})
43
- `,D=`Trace: ${f.thrown?.stack}
44
- `;return A+O+D}).join(`
45
- `):void 0,g=i.state.isAudioDisabled?"disabled":_e(i.state.isAudioAvailable$)?void 0:"unavailable",_=e.info.currentVideoStream$.getValue(),v=e.info.currentAudioStream$.getValue(),L=[];_&&L.push(`Video: ${_?.codec??""}`+(_?.hdr?" (HDR)":"")),v&&L.push(`Audio: ${v?.codec??""}`+(v?.language?` (${v.language})`:""));let N=r.currentQuality$.getValue(),k="";if(N){let f=r.availableQualitiesFps$.getValue()[N];k=f?`${f}fps`:""}let y=r.httpConnectionType$.getValue(),T=r.currentBuffer$.getValue()?.end??0,w=Math.max(T-_e(i.state.positionExact$),0),E={Version:a,Browser:navigator.userAgent,Config:o.join(", "),"United video id":String(i.videoId),TraceId:n,VSID:_e(i.vsid),"Content host":r.hostname$.getValue(),"Connection type":y?y+(r.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${c}Kbps @ ${h}ms RTT`,Format:r.currentFormat$.getValue(),"Available Formats":t?.sources?Object.keys(t.sources).join(", "):"",Streams:L.join(", "),Quality:`${p} ${N??""} ${k}`,"Available qualities":r.availableQualities$.getValue().join(", "),Audio:g,Position:`${_e(i.state.positionExact$)}s`,Buffer:`${w}s`,State:`${_e(i.playerPhase)} ${r.playbackState$.getValue()??""}`,"Player size":`${s}x${u}`,URL:window.location.href,Errors:m};return Object.entries(E).filter(([f,B])=>B!==void 0).map(([f,B])=>`${f}: ${B}`).join(`
46
- `)},_l=(e,t,i)=>{let n=e.info,{width:o,height:r}=_e(i.ui.playerSize),s={version:xo,viewport:`${o}x${r}`,volume:Math.round(_e(i.state.volume$)*100)};s.id=i.videoId,n.currentFormat$.getValue()&&(s.provider=n.currentFormat$.getValue()),n.hostname$.getValue()&&(s.cdn=n.hostname$.getValue());let h=n.intrinsicVideoSize$.getValue();h&&(s.videoSize=`${h.width}x${h.height}`);let p=n.currentBuffer$.getValue(),a=n.currentNativeBuffer$.getValue(),d=n.isLive$.getValue(),m=n.liveBufferTime$.getValue();p&&a&&(d&&m?(s.buffer=p.end-m,s.nativeBuffer=a.end-m):(s.buffer=Math.max(p.end-_e(i.state.positionExact$),0),s.nativeBuffer=Math.max(a.end-_e(i.state.positionExact$),0))),s.position=_e(i.state.positionExact$);let g=n.throughputEstimation$.getValue();g&&(s.speed=g);let _=n.videoBitrate$.getValue();_&&(s.bitrate=_);let v=n.liveLatency$.getValue();v&&(s.liveLatency=v);let L=n.currentVideoSegmentLength$.getValue();L&&(s.currentVideoSegmentLength=L);let N=n.currentAudioSegmentLength$.getValue();N&&(s.currentAudioSegmentLength=N);let k=_e(i.vsid);typeof k=="string"&&(s.vsid=k);let y=e.info.currentVideoStream$.getValue()?.codec;y&&(s.videoCodec=y);let T=e.info.currentAudioStream$.getValue()?.codec;T&&(s.audioCodec=T),e.info.currentVideoStream$.getValue()?.hdr&&(s.hdr=!0);let E=e.info.currentAudioStream$.getValue()?.language;return E&&(s.audioLanguage=E),s},yl=(e,t)=>ml(e,t,"mp4"),bl=()=>{let t=[],i=0;return{add:(n,o)=>{t[i]=[n,o],i=(i+1)%10},find:n=>t.find(([o])=>o===n)}},Eo=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}};import{isNullable as Ur,safeStorage as it}from"@vkontakte/videoplayer-shared";import"@vkontakte/videoplayer-core";var Ac="vk_player_",xl="vk_player_prefer_traffic_saving_enabled",xc="vk_player_preferred_volume",Ec="vk_player_prefer_volume_mute",zr="vk_player_preferred_quality",Rr="vk_player_preferred_default_quality_settings",Vr="vk_player_preferred_quality_settings_by_video",El="vk_player_preferred_stream_language",Sl="vk_player_preferred_rate";var jr="vk_player_preferred_subtitles_language",Sc="vk_player_user_video_prefs",YM=`${Ac}preview_track_close_tooltip`,Tc=e=>e>1?1:e<0?0:e;var To=()=>{let e=it.get(xc);return Ur(e)?void 0:Tc(parseFloat(e))},Fr=(e,t)=>it.set(zr,JSON.stringify({videoId:e,value:t})),Mo=()=>it.remove(zr),Hr=e=>{let t=it.get(zr);if(Ur(t))return;let{videoId:i,value:n}=JSON.parse(t);if(e!==i){Mo();return}return n},Mc=(e,t)=>{t?it.set(e,"true"):it.remove(e)},Tl=e=>it.get(e)==="true";var Ml=()=>Tl(Ec),Al=e=>Mc(xl,e),Qr=()=>Tl(xl),wl=()=>it.get(El),Il=e=>it.set(El,e),Yr=()=>it.get(jr),wc=e=>{e?it.set(jr,e):it.remove(jr)},kl=e=>it.set(Sl,JSON.stringify({rate:e})),Nl=()=>{let e=it.get(Sl);if(Ur(e))return;let{rate:t}=JSON.parse(e);return t};var Ic=()=>{let e=p=>{it.set(Rr,JSON.stringify(p))},t=()=>{try{let p=it.get(Rr);return p?JSON.parse(p):null}catch{return null}},i=()=>{try{let p=it.get(Vr);return p?JSON.parse(p):null}catch{return null}},n=p=>{it.set(Vr,JSON.stringify(p))},o=p=>{h(p);let a=p?i():null;if(a&&a?.videoId===p)return{...a,appliesTo:"to-video"};a&&r();let d=t();return d?{...d,appliesTo:"as-default"}:(e({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},r=()=>{it.remove(Vr)},s=()=>{it.remove(Rr)},u=(p,a="as-default")=>{p.type==="exact_quality"||a==="to-video"?n(p):e(p)},c=p=>{let a=o(p);if(a){switch(a.type){case"traffic_saving":Al(!0);break;case"exact_quality":Fr(p,a.quality)}r(),s()}},h=p=>{let a=Hr(p);if(a){n({type:"exact_quality",videoId:p,quality:a});return}Qr()&&e({type:"traffic_saving",videoId:p}),Al(!1),Mo()};return{getPreferredQualitySettings:o,migrateSettingsToLegacyWay:c,savePreferredQualitySettings:u,savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:r,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:Yr,savePreferredSubtitlesLanguage:wc}},{getPreferredQualitySettings:BM,migrateSettingsToLegacyWay:Dl,savePreferredQualitySettings:WM,savePreferredDefaultQualitySettings:GM,removePreferredQualitySettingsByVideo:qM,getPreferredDefaultQualitySettings:KM}=Ic();var kc=()=>{let e=it.get(Sc);if(e)try{return JSON.parse(e)}catch{return null}return null},wo=(e,t)=>kc()?.[e]?.[t]??null;import"@vkontakte/videoplayer-core";var Io=class{constructor(t){this.value=t,this.next=null}};var fn=class{constructor(t){this.top=null,this.bottom=null,this.size=0,this.maxSize=t}push(t){let i=new Io(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 Nc=we('<div class="container s-8"><canvas class="s-8"></canvas></div>'),Dc={hash:"s-8",code:".container.s-8{display:inline-block;height:16px;width:120px}canvas.s-8{margin-top:2px;transform:scaleY(-1)}"};function zn(e,t){st(t,!0),dt(e,Dc);let i=ye(t,"values",19,()=>[]),n=Fe(void 0),o=Fe(null),r=16,s=120,u=60,c=s/u;dn(()=>{R(n).width=s,R(n).height=r,Ee(o,R(n).getContext("2d"),!0)});function h(d,m,g,_,v){v===0&&(v=1),d.fillStyle="#fff",d.fillRect(m,g,_,v)}xi(()=>{let d="";if(R(o)){let m=i()[0];for(let _=1;_<i().length;_++)i()[_]>m&&(m=i()[_]);R(o).clearRect(0,0,s,r);let g=u-1;for(let _=i().length-1;_>=0;_--){let v=g*c,L=m>0?r*(i()[_]/m):0;h(R(o),v,0,c,L),d=L+" "+d,g--}}});var p=Nc(),a=oe(p);zi(a,d=>Ee(n,d),()=>R(n)),ne(p),fe(e,p),lt()}import{safeStorage as Rl}from"@vkontakte/videoplayer-shared";import{isNullable as $l,InterfaceLanguage as Ol}from"@vkontakte/videoplayer-shared";var Lc={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
- качество изменено на «Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
48
- попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},Ll=Lc;var Cc={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 at lower quality",quality_applience:"You can {action} the default quality",quality_applience_action:"change",default_quality_for_any_video:"Quality for all 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,
49
- so the quality was changed to Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
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"},Cl=Cc;var Ei=new Map;Ei.set(Ol.EN,Cl);Ei.set(Ol.RU,Ll);var Pl=new Map,Br=({language:e,pack:t,fallback:i})=>{if(Ei.has(e)){let n=Ei.get(e);Ei.set(e,{...n,...t})}else Ei.set(e,t);Pl.set(e,i)},Wr=e=>Ei.has(e),Gr=(e,t,i,n)=>{let r=Ei.get(e)?.[t];if($l(r)){let s=Pl.get(e)??n;r=(s?Ei.get(s):void 0)?.[t]}return $l(r)?t+Object.values(i??{}).join(" "):i?r.replaceAll(/{(\w+?)}/g,(s,u)=>i[u]??""):r},ko=(e,t)=>{let{interfaceLanguage$:i}=Ni(),n=_e(i),o=pn();return Gr(n,e,t,o.defaultLanguage)};var $c=(e,t)=>{e.stopPropagation(),Rl.remove(Un),t.set(!1)},Oc=we('<div class="s-6"><div class="s-6">Video id</div> <span> </span></div>'),Pc=we('<div class="s-6"><div class="s-6">VSID</div> <span> </span></div>'),Rc=we('<div class="s-6"><div class="s-6">Provider</div> <span> </span></div>'),Vc=we('<div class="s-6"><div class="s-6">Streams</div> <span> </span></div>'),jc=we('<div class="s-6"><div class="s-6">Viewport</div> <span> </span></div>'),Uc=we('<div class="s-6"><div class="s-6">Video size</div> <span> </span></div>'),zc=we('<div class="s-6"><div class="s-6">CDN host</div> <span> </span></div>'),Fc=we('<div class="s-6"><div class="s-6">Volume</div> <span> </span></div>'),Hc=we('<div class="s-6"><div class="s-6">Position</div> <span> </span></div>'),Qc=we('<div class="s-6"><div class="s-6">Buffer</div> <span> </span></div>'),Yc=we('<div class="s-6"><div class="s-6">Nbuffer</div> <span> </span></div>'),Bc=we('<div class="s-6"><div class="s-6">Live latency</div> <span> </span></div>'),Wc=we('<div class="s-6"><div class="s-6">Segment</div> <span> </span></div>'),Gc=we('<div class="s-6"><div class="s-6">Network</div> <!> <span> </span></div>'),qc=we('<div class="s-6"><div class="s-6">V bitrate</div> <!> <span> </span></div>'),Kc=we('<div class="container s-6" role="region"><button class="close s-6" title="закрыть">[x]</button> <div class="content s-6"><div class="s-6"><div class="s-6">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-6"><div class="s-6">Dropped</div> <span> </span></div> <!> <!> <div class="s-6"><div class="s-6">FPS</div> <!> <span> </span></div></div></div>'),Zc={hash:"s-6",code:".container.s-6{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-6,button.close.s-6{color:#fff;position:absolute}button.close.s-6{background-color:transparent;border:none;cursor:pointer;outline:0;padding:0;right:5px;top:3px}.content.s-6{padding:5px}.content.s-6>div:where(.s-6)>div:where(.s-6){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function qr(e,t){st(t,!0),dt(e,Zc);let i=Ni(),n=i.ui.debugPanelVisible,o=Fe(yt(i.actions.internal.getDebugPanelData())),r=i.actions.internal.getVideoElement(),s=Fe(0),u=Fe(0),c=Fe(0),h=new fn(60),p=new fn(60),a=new fn(60),d=Fe(yt([])),m=Fe(yt([])),g=Fe(yt([])),_=ko("aria_label_debug_panel");dn(()=>{Rl.set(Un,"true"),r&&(Ee(u,r.getVideoPlaybackQuality().droppedVideoFrames,!0),Ee(s,r.getVideoPlaybackQuality().totalVideoFrames,!0));let S=window.setInterval(()=>{Ee(o,i.actions.internal.getDebugPanelData(),!0)},500),j;return r&&(j=window.setInterval(()=>{if(r){Ee(u,r.getVideoPlaybackQuality().droppedVideoFrames,!0);let X=r.getVideoPlaybackQuality().totalVideoFrames;Ee(c,X-R(s)),Ee(s,X,!0),h.push(R(c)),R(o).speed&&p.push(R(o).speed),R(o).bitrate&&a.push(R(o).bitrate),Ee(d,h.getValuesFromBottom(),!0),Ee(m,p.getValuesFromBottom(),!0),Ee(g,a.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(S),j&&clearInterval(j)}});var v=Kc(),L=oe(v);L.__click=[$c,n];var N=pe(L,2),k=oe(N),y=pe(oe(k),2),T=oe(y,!0);ne(y),ne(k);var w=pe(k,2);{var E=S=>{var j=Oc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).id)),fe(S,j)};Qe(w,S=>{R(o).id&&S(E)})}var f=pe(w,2);{var B=S=>{var j=Pc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).vsid)),fe(S,j)};Qe(f,S=>{R(o).vsid&&S(B)})}var A=pe(f,2);{var O=S=>{var j=Rc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).provider)),fe(S,j)};Qe(A,S=>{R(o).provider&&S(O)})}var D=pe(A,2);{var Z=S=>{var j=Vc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(()=>Ze(ue,`Video: ${(R(o).videoCodec||"")??""} ${R(o).hdr?"(HDR)":""}
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+`
15
+ ${r}
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: ${(R(o).audioCodec||"")??""} ${R(o).audioLanguage?`(${R(o).audioLanguage})`:""}`)),fe(S,j)};Qe(D,S=>{(R(o).videoCodec||R(o).audioCodec)&&S(Z)})}var ae=pe(D,2);{var P=S=>{var j=jc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).viewport)),fe(S,j)};Qe(ae,S=>{R(o).viewport&&S(P)})}var W=pe(ae,2);{var H=S=>{var j=Uc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).videoSize)),fe(S,j)};Qe(W,S=>{R(o).videoSize&&S(H)})}var te=pe(W,2);{var xe=S=>{var j=zc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).cdn)),fe(S,j)};Qe(te,S=>{R(o).cdn&&S(xe)})}var J=pe(te,2);{var de=S=>{var j=Fc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(()=>Ze(ue,`${R(o).volume??""} %`)),fe(S,j)};Qe(J,S=>{R(o).volume&&S(de)})}var Y=pe(J,2);{var he=S=>{var j=Hc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(x=>Ze(ue,`${x??""} s`),[()=>R(o).position.toFixed(2)]),fe(S,j)};Qe(Y,S=>{R(o).position&&S(he)})}var F=pe(Y,2);{var Le=S=>{var j=Qc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(x=>Ze(ue,`${x??""} s`),[()=>R(o).buffer.toFixed(2)]),fe(S,j)};Qe(F,S=>{R(o).buffer&&S(Le)})}var Se=pe(F,2);{var le=S=>{var j=Yc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(x=>Ze(ue,`${x??""} s`),[()=>R(o).nativeBuffer.toFixed(2)]),fe(S,j)};Qe(Se,S=>{R(o).nativeBuffer&&S(le)})}var C=pe(Se,2);{var se=S=>{var j=Bc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(x=>Ze(ue,`${x??""} s`),[()=>R(o).liveLatency.toFixed(2)]),fe(S,j)};Qe(C,S=>{R(o).liveLatency&&S(se)})}var q=pe(C,2);{var ce=S=>{var j=Wc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(x=>Ze(ue,x),[()=>[{value:R(o).currentVideoSegmentLength,title:"Video:"},{value:R(o).currentAudioSegmentLength,title:"Audio:"}].filter(({value:x})=>x).map(({value:x,title:G})=>`${G} ${((x??0)/1e3).toFixed(2)} s`).join(" & ")]),fe(S,j)};Qe(q,S=>{(R(o).currentVideoSegmentLength||R(o).currentAudioSegmentLength)&&S(ce)})}var Me=pe(q,2),Ie=pe(oe(Me),2),je=oe(Ie);ne(Ie),ne(Me);var b=pe(Me,2);{var I=S=>{var j=Gc(),X=pe(oe(j),2);zn(X,{get values(){return R(m)}});var ue=pe(X,2),x=oe(ue);ne(ue),ne(j),ze(G=>Ze(x,`${G??""} Kbps`),[()=>R(o).speed.toFixed(2)]),fe(S,j)};Qe(b,S=>{R(o).speed&&S(I)})}var $=pe(b,2);{var U=S=>{var j=qc(),X=pe(oe(j),2);zn(X,{get values(){return R(g)}});var ue=pe(X,2),x=oe(ue);ne(ue),ne(j),ze(G=>Ze(x,`${G??""} Kbps`),[()=>R(o).bitrate.toFixed(2)]),fe(S,j)};Qe($,S=>{R(o).bitrate&&S(U)})}var ee=pe($,2),re=pe(oe(ee),2);zn(re,{get values(){return R(d)}});var ke=pe(re,2),Ce=oe(ke,!0);ne(ke),ne(ee),ne(N),ne(v),ze(()=>{Ft(v,"aria-label",_),Ze(T,R(o).version),Ze(je,`${R(u)??""} / ${R(s)??""} frames`),Ze(Ce,R(c))}),fe(e,v),lt()}sn(["click"]);ms();var Vl="var(--btn-color, #fff)";var Jc=pi('<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),Xc=pi('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Hi(e,t){st(t,!0);let i=ye(t,"width",19,()=>"24"),n=ye(t,"height",19,()=>"24"),o=ye(t,"fill",3,Vl),r=t.viewBox??`0 0 ${i()} ${n()}`;var s=Xc(),u=oe(s);{var c=p=>{var a=Jc(),d=on(a),m=oe(d);yo(m,()=>t.children),ne(d),nn(),fe(p,a)},h=p=>{var a=Er(),d=on(a);yo(d,()=>t.children),fe(p,a)};Qe(u,p=>{t.shadow?p(c):p(h,!1)})}ne(s),ze(()=>{Ft(s,"aria-label",t.ariaLabel),Ft(s,"aria-hidden",!t.ariaLabel),Ft(s,"width",i()),Ft(s,"height",n()),Ft(s,"viewBox",r),Ft(s,"fill",o()),ki(s,t.style),Ft(s,"data-testid",t.testId)}),fe(e,s),lt()}var ep=pi('<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 Kr(e){Hi(e,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(t,i)=>{var n=ep();fe(t,n)},$$slots:{default:!0}})}var tp=we('<div class="container s-3"><!></div>'),ip={hash:"s-3",code:".container.s-3{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Fn(e){dt(e,ip);var t=tp(),i=oe(t);Kr(i,{}),ne(t),fe(e,t)}var Ul=e=>`width:${e}px;height:${e}px;`;var np=pi('<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 Zr(e,t){st(t,!0);let i=gi(()=>Ul(t.size));Hi(e,{get width(){return"48"},get height(){return"48"},get fill(){return t.fill},get style(){return R(i)},testId:"play-icon",get shadow(){return t.shadow},children:(n,o)=>{var r=np();fe(n,r)},$$slots:{default:!0}}),lt()}var op=we('<div class="playButton s-7" tabindex="0" role="button"><div class="playButtonBackground s-7"></div> <!></div>'),rp=we('<div data-testid="unstarted-thumb"><!></div>'),ap={hash:"s-7",code:".container.s-7{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-7{opacity:0;visibility:hidden}.container.bgCover.s-7{background-size:cover}.playButton.s-7{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-7,.playButtonBackground.s-7{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-7{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-7:hover .playButtonBackground:where(.s-7){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-7 svg{position:relative}"};function Jr(e,t){st(t,!0),dt(e,ap);let i=ye(t,"iconVisible",3,!0),n=pn(),o=ko("tooltip_play"),r=p=>{p.stopPropagation(),t.startVideo?.(),t.onClick?.(p)};var s=rp();let u;s.__click=r,s.__contextmenu=function(...p){t.onContextMenu?.apply(this,p)};var c=oe(s);{var h=p=>{var a=op(),d=pe(oe(a),2);Zr(d,{get size(){return"48"}}),ne(a),ze(()=>Ft(a,"aria-label",o)),fe(p,a)};Qe(c,p=>{i()&&p(h)})}return ne(s),ze(p=>{u=un(s,1,"container s-7",null,u,p),ki(s,`background-color: #222; background-image: url('${t.thumbUrl||""}')`)},[()=>({hidden:t.hidden,bgCover:n.features.previewNoEmptySpace})]),fe(e,s),lt({handleClick:r})}sn(["click","contextmenu"]);var sp=we('<div><div class="video-container s-5"></div></div>'),lp={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 ea(e,t){st(t,!0),dt(e,lp);let[i,n]=Fi(),o=()=>oi(s,"$playerPhase",i),r=ye(t,"videoContainer",15),{playerPhase:s}=Ni();var u=sp();let c;var h=oe(u);zi(h,p=>r(p),()=>r()),ne(u),ze(p=>c=un(u,1,"video-wrapper s-5",null,c,p),[()=>({hidden:o()!=="video"})]),fe(e,u),lt(),n()}var dp=we("<!> <!> <!> <!>",1),up=we('<div class="player-wrapper s-4"><!></div>'),cp={hash:"s-4",code:".player-wrapper.s-4{height:100%;position:absolute;width:100%}.player-wrapper.s-4 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}"};function ta(e,t){st(t,!0),dt(e,cp);let[i,n]=Fi(),o=()=>oi(p,"$language$",i),r=()=>oi(a,"$playerPhase",i),s=()=>oi(d,"$crashed",i),u=()=>oi(m,"$debugPanelVisible",i),c=ye(t,"videoContainer",15),h=Ni(),p=h.interfaceLanguage$,a=h.playerPhase,d=h.state.crashed$,m=h.ui.debugPanelVisible,g=Fe(void 0);var _=up(),v=oe(_);wr(v,o,L=>{var N=dp(),k=on(N);ea(k,{get videoContainer(){return c()},set videoContainer(A){c(A)}});var y=pe(k,2);let T=gi(()=>r()!=="thumb"||s()&&t.autoplay);Jr(y,{get hidden(){return R(T)},get thumbUrl(){return t.thumbUrl},get startVideo(){return t.firstStart}});var w=pe(y,2);{var E=A=>{Fn(A,{})};Qe(w,A=>{s()&&A(E)})}var f=pe(w,2);{var B=A=>{qr(A,{})};Qe(f,A=>{u()&&A(B)})}fe(L,N)}),ne(_),zi(_,L=>Ee(g,L),()=>R(g)),fe(e,_),lt(),n()}var vp=we('<div class="vk-vp-tv-root s-2"><!></div>'),gp={hash:"s-2",code:'.vk-vp-tv-root.s-2{--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}'};function ia(e,t){st(t,!0),dt(e,gp);let[i,n]=Fi(),o=()=>oi(J,"$isLive$",i),r=()=>oi(ee,"$availableSubtitlesList$",i),s=ye(t,"sources",7),u=ye(t,"store",7),c=ye(t,"videoConfig",7),h=ye(t,"uiConfig",7),p=ye(t,"title",7),a=ye(t,"thumbUrl",7),d=ye(t,"subtitles",7),m=ye(t,"subtitlesForcedLanguage",7),g=ye(t,"live",7),_=ye(t,"preload",7),v=ye(t,"autoplay",7),L=ye(t,"volume",7,void 0),N=ye(t,"muted",7,void 0),k=ye(t,"fromTime",7),y=ye(t,"canRewindLive",7),T=ye(t,"showAds",7),w=ye(t,"adsSlotId",7,void 0),E=ye(t,"adsParams",7,void 0),f=ye(t,"adsAutoplayParam",7,void 0),B=ye(t,"duration",7,void 0),A=ye(t,"supportLink",7),O=ye(t,"shadowRootContainer",7),D=ye(t,"outerContainerRef",7),Z=ye(t,"fullScreenTarget",7,void 0),ae=ye(t,"failoverHosts",7,void 0),P=ye(t,"saveRate",7),W=ye(t,"volumeMultiplier",7),H=ye(t,"showEndScreen",7,!0);ul(h());let te=pn(),xe=u().ui.debugPanelVisible,J=u().state.isLive$,de=Fe(void 0),Y=Fe(!1);u().getAdmanWrapper().init({switchFromAdsToVideo:u().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:u().actions.internal.switchFromVideoToAds,setMuted:u().actions.external.setMuted},u().ads,{vsid:u().vsid}),vl(u()),xi(()=>{c().callbacks?.onDomReady?.()});let he=(S=!1)=>{Ee(Y,!0),S?u().actions.external.firstStart(T()):u().actions.internal.firstStart(T())},F=()=>{Dl(u().videoId),Qr()&&u().actions.internal.setTrafficSavingEnabled(!0);let j=Hr(u().videoId);j&&u().actions.internal.setQuality(j)};function Le(S){let j=s()||S;j&&u().initVideo({container:R(de),sources:j,failoverHosts:ae(),subtitles:d(),subtitlesForcedLanguage:m(),volumeMultiplier:W()});let X=mp.get(Un)==="true";xe.set(X),k()>0&&u().actions.external.seekTime(k());let ue=L()??To()??te.volumeDefault,x=N()??Ml();if(u().actions.external.setVolume(ue),u().actions.external.setMuted(x),u().getAdmanWrapper().setInitialVolume(x?0:ue),F(),te.features.saveRate&&P()){let G=Nl();G&&!o()&&u().actions.internal.setPlaybackRate(G)}u().ui.isAutoplay.set(v()),v()&&he(),_()&&te.features.preload&&u().actions.internal.preload()}dn(()=>{let S=()=>u().destroy();return g()?.status==="upcoming"?(u().actions.internal.setLiveWaitingStart(!0),S):g()?.status==="waiting"?(u().actions.internal.setLiveWaitingRecover(!0),S):(g()?.status==="finished"||g()?.status==="postlive")&&!(s()&&fp(s()))?(u().actions.internal.setLiveWaitingRecord(!0),S):(Le(),S)});function Se(){R(Y)?u().actions.external.play():he(!0)}function le(){u().actions.external.pause()}function C(S){u().actions.external.setMuted(S)}function se(){u().actions.external.toggleSubtitle()}function q(S,j){u().actions.external.changeSubtitle(S,j)}function ce(S){u().actions.external.changeAudioStream(S)}function Me(S){S>=0&&S<=1&&u().actions.external.setVolume(S)}function Ie(S){u().actions.internal.seekTime(S,hp.UNKNOWN)}function je(S){u().actions.external.setPlaybackRate(S)}function b(S){u().actions.external.setAutoQualityLimits(S)}function I(){u().actions.external.setQuality("auto")}function $(S){u().actions.external.setTrafficSavingEnabled(S)}function U(S){u().actions.external.setHighQualityEnabled(S)}let ee=u().state.availableSubtitlesList$;if(te.features.initSubtitles){let S=!1;xi(()=>{if(!S&&r().length){S=!0;let j;if(te.features.userVideoPrefs&&u().videoId){let ue=wo(te.userSalt,String(u().videoId));ue?.subtitleTrackId&&(j=r().find(x=>x.value===ue.subtitleTrackId))}let X=m()??Yr();X&&(j=r().find(ue=>ue.language===X)),u().actions.internal.setSubtitle(j)}})}var re=vp(),ke=oe(re);ta(ke,{get thumbUrl(){return a()},firstStart:he,get autoplay(){return v()},get videoContainer(){return R(de)},set videoContainer(S){Ee(de,S,!0)}}),ne(re),fe(e,re);var Ce=lt({initVideo:Le,play:Se,pause:le,setMuted:C,toggleSubtitle:se,changeSubtitle:q,changeAudioStream:ce,setVolume:Me,seekTime:Ie,setPlaybackRate:je,setAutoQualityLimits:b,setAutoQuality:I,toggleTrafficSaving:$,toggleHighQuality:U,get sources(){return s()},set sources(S){s(S)},get store(){return u()},set store(S){u(S)},get videoConfig(){return c()},set videoConfig(S){c(S)},get uiConfig(){return h()},set uiConfig(S){h(S)},get title(){return p()},set title(S){p(S)},get thumbUrl(){return a()},set thumbUrl(S){a(S)},get subtitles(){return d()},set subtitles(S){d(S)},get subtitlesForcedLanguage(){return m()},set subtitlesForcedLanguage(S){m(S)},get live(){return g()},set live(S){g(S)},get preload(){return _()},set preload(S){_(S)},get autoplay(){return v()},set autoplay(S){v(S)},get volume(){return L()},set volume(S){L(S)},get muted(){return N()},set muted(S){N(S)},get fromTime(){return k()},set fromTime(S){k(S)},get canRewindLive(){return y()},set canRewindLive(S){y(S)},get showAds(){return T()},set showAds(S){T(S)},get adsSlotId(){return w()},set adsSlotId(S){w(S)},get adsParams(){return E()},set adsParams(S){E(S)},get adsAutoplayParam(){return f()},set adsAutoplayParam(S){f(S)},get duration(){return B()},set duration(S){B(S)},get supportLink(){return A()},set supportLink(S){A(S)},get shadowRootContainer(){return O()},set shadowRootContainer(S){O(S)},get outerContainerRef(){return D()},set outerContainerRef(S){D(S)},get fullScreenTarget(){return Z()},set fullScreenTarget(S){Z(S)},get failoverHosts(){return ae()},set failoverHosts(S){ae(S)},get saveRate(){return P()},set saveRate(S){P(S)},get volumeMultiplier(){return W()},set volumeMultiplier(S){W(S)},get showEndScreen(){return H()},set showEndScreen(S){H(S)}});return n(),Ce}var _p=pi('<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);function na(e,t){let i=ye(t,"isWhite",3,!1),n=gi(()=>i()?"#fff":"#909499");Hi(e,{width:"57",height:"60",get fill(){return R(n)},testId:"stub-icon",children:(o,r)=>{var s=_p();nn(9),fe(o,s)},$$slots:{default:!0}})}var yp=we('<div class="title s-0"> </div>'),bp=we('<div class="playerStub s-0"><!> <!></div>'),Ap={hash:"s-0",code:".playerStub.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%}.title.s-0{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function oa(e,t){dt(e,Ap);var i=bp(),n=oe(i);{var o=u=>{var c=yp(),h=oe(c,!0);ne(c),ze(()=>Ze(h,t.title)),fe(u,c)};Qe(n,u=>{t.title&&u(o)})}var r=pe(n,2);{var s=u=>{let c=gi(()=>!!t.thumbUrl);na(u,{get isWhite(){return R(c)}})};Qe(r,u=>{(!t.title||!t.thumbUrl)&&u(s)})}ne(i),ze(()=>ki(i,t.thumbUrl?`background-image: url('${t.thumbUrl}')`:"")),fe(e,i)}var xp=we('<div class="playerError s-1"><!></div>'),Ep={hash:"s-1",code:".playerError.s-1{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 ra(e){dt(e,Ep);var t=xp(),i=oe(t);Fn(i,{}),ne(t),fe(e,t)}import{ChromecastState as $p,PlaybackState as Hn,Player as Op,PredefinedQualityLimits as Di,VideoFormat as Oo,clientChecker as Kl}from"@vkontakte/videoplayer-core";import{assertNonNullable as Ht,getHighestQuality as Pp,InterfaceLanguage as Rp,isInvariantQuality as Vp,isNonNullable as jp,loadVKLangPack as Up,Logger as zp,map as Zl,merge as Fp,Observable as Po,Subject as Qn,Subscription as Hp,TracerFactory as Qp,VideoQuality as Yp,devNull as Bp,now as Wp}from"@vkontakte/videoplayer-shared";import{SeekAction as Yn}from"@vkontakte/videoplayer-statistics";import{detectEmbed as Tp,devNull as Ne,isNonNullable as Mp,now as De}from"@vkontakte/videoplayer-shared";import{addScript as wp,Subject as Et,clearVideoElement as Ip}from"@vkontakte/videoplayer-shared";var kp="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",No=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 Et,loadStarted$:new Et,loadEnded$:new Et,loadError$:new Et,ready$:new Et,slotRequested$:new Et,started$:new Et,timeRemained$:new Et,paused$:new Et,resumed$:new Et,ended$:new Et,empty$:new Et,skipped$:new Et,clicked$:new Et,closed$:new Et,error$:new Et};this.loadAdman=t=>(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[De()]}),this.useAdmanFromNPM?this.loadAdmanNPM(t):this.loadAdmanMailRu(t));this.loadAdmanMailRu=t=>new Promise((i,n)=>{let o;this.events.loadStarted$.next();let r=()=>{clearTimeout(o),delete window.admanAsyncInit,window.AdmanHTML?(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[De()]}),i(),this.events.loadEnded$.next()):(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[De()]}),n())};wp(kp,t,this.loadTimeout).then(()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[De()]}),window.AdmanHTML?(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[De()]}),i(),this.events.loadEnded$.next()):(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[De()]}),window.admanAsyncInit=r,o=window.setTimeout(r,this.initTimeout))}).catch(s=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(s)],numbers:[De()]}),n(),clearTimeout(o)})});this.loadAdmanNPM=t=>new Promise((i,n)=>{let o;this.events.loadStarted$.next();let r=()=>{clearTimeout(o),delete window.admanAsyncInit,window.AdmanHTML?(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[De()]}),i(),this.events.loadEnded$.next()):(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[De()]}),n())},s=()=>{u=!0,n()},u=!1,c=window.setTimeout(()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[De()]}),s()},this.loadTimeout);t.addEventListener("abort",s),t.aborted&&(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[De()]}),s()),window.AdmanHTML=window.AdmanHTML||null,Promise.resolve().then(()=>lu(zl(),1)).then(()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(u)],numbers:[De()]}),!u&&(window.AdmanHTML?(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[De()]}),i(),this.events.loadEnded$.next()):(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[De()]}),window.admanAsyncInit=r,o=window.setTimeout(r,this.initTimeout)))},s).finally(()=>{clearTimeout(o),clearTimeout(c),t.removeEventListener("abort",s)})});this.onAdsReady=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[De()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(t,i)=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",t,"muted: "+i.muted],numbers:[De(),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?_e(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=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",this.currentAdSection??""],numbers:[De()]}),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=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",this.currentAdSection??""],numbers:[De()]}),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(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[De()]}),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=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",this.currentAdSection??""],numbers:[De()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",this.currentAdSection??""],numbers:[De()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",this.currentAdSection??""],numbers:[De()]}),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=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",this.currentAdSection??""],numbers:[De()]}),this.log({message:"ad clicked"}),this.videoElement?.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(t="ad error")=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",t],numbers:[De()]}),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"),Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[De()]}),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(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[De(),t.slotId]}),this.adman)return;this.events.init$.next(t.slotId),this.startWatchDog();let{width:i,height:n,isAutoplay:o,adsContainer:r,adsVideoElement:s,slotId:u,params:c={},paramsOverride:h={},duration:p,externalApi:a}=t;this.externalApi=a;let d,m=this.playerState&&_e(this.playerState.vsid);m&&(this.isVsidOriginal?d=m:d=parseInt(m,36));let{isEmbed:g,immediateOrigin:_}=Tp(),v=(g?_:window.location.href)??window.location.href,L={...c,dl:encodeURIComponent(v),autoplay:o?1:0,player_width:i,player_height:n,...d?{request_id:d}:{},duration:p,...h};L=Object.fromEntries(Object.entries(L).filter(([k,y])=>Mp(y)));let N={slot:u,wrapper:r,videoEl:s,videoQuality:n,params:L,browser:{mobile:!1}};try{let k=new window.AdmanHTML;if(k.onReady(this.onAdsReady),k.onStarted(this.onAdStarted),k.onPlayed(this.onAdPlayed),k.onPaused(this.onAdPaused),k.adMidrollPoint(this.onAdMidrollPoint),k.onClosed(this.onAdClosed),k.onSkipped(this.onAdSkipped),k.onClicked(this.onAdClicked),k.onTimeRemained(this.onAdTimeRemained),k.onCompleted(this.onAdCompleted),k.onError(this.onAdError),k.setDebug(!1),this.externalApi?.videoGetAds){let y=await this.safeExternalCall(this.externalApi.videoGetAds,L);y&&(delete N.slot,delete N.params,Object.assign(N,{json:y}))}k.init(N),this.adman=k,this.videoElement=s,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(N)}`})}catch(k){Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(k)],numbers:[De()]}),this.onAdError("could not init adman")}}switchToVideo(t=!1){if(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",this.currentAdSection??"","force: "+t],numbers:[De()]}),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(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",this.currentAdSection??""],numbers:[De()]}),this.adsState){this.log({message:"toggle play"});let t=_e(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(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[De()]}),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(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",this.currentAdSection??""],numbers:[De()]}),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(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",this.currentAdSection??""],numbers:[De()]}),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(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",this.currentAdSection??""],numbers:[De()]}),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(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",this.currentAdSection??""],numbers:[De()]}),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(){Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[De()]}),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&&Ip(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}}};var Fl=(e,t)=>t?!0:e.fullscreenEnabled||!!e.webkitFullscreenEnabled||!!e.mozFullscreenEnabled||!!e.msFullscreenEnabled,Hl=e=>{let t=e;t?.webkitExitFullscreen&&t?.webkitExitFullscreen()},Np=()=>{let e=document;return e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement},Ql=()=>!!Np();var Yl=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:""};var aa=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(t,i){let n=[],o=t.split(this.twoLinesRegExp);for(let r of o){let s={startTime:0,endTime:0,texts:[],lang:i},u=r.split(this.oneLineRegExp);for(let c of u)if(!s.startTime&&!s.endTime){let h=new Do,{startTime:p,endTime:a}=h.parse(c);s.startTime=p,s.endTime=a}else if(c.trim()!==""){let h=new sa,{texts:p}=h.parse(c);s.texts=[...s.texts,...p]}(s.startTime||s.endTime)&&s.texts.length>0&&n.push(s)}return n}},Do=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",o="0"){let r=Number(t)*60*60,s=Number(i)*60,u=Number(n),c=+`0.${o}`;return r+s+u+c}},sa=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(t){let i={texts:[]},o=t.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](s){let u=0,c=[];for(;u<s.length;){let h=["<",">"].reduce((p,a)=>{let d=s.indexOf(a,u);return p===-1||p>d?d:p},-1);if(h===-1){c.push(s.substring(u));break}c.push(s.substring(u,h)),u=h+1}return c}}),r=new Do;for(let s of o)r.isTime(s)?i.texts.push({type:"timestamp",value:r.parseTime(s)}):i.texts.push({type:"text",value:s});return i}},Bl=aa;import{isNonNullable as la}from"@vkontakte/videoplayer-shared";var Qi,Wt,da=0,ua=!1,Wl="",Gl=(e,t=0,i=0)=>e<t&&e<i,Lo=(e,t=0,i=0)=>e>=t&&e<=i,Dp=(e,t=0,i=0)=>e>t&&e>i,ql=(e,t,i,n=!1)=>{let o=i.find(({id:u})=>u===t.value)?.subtitles;if(n)return o?.find(({startTime:c,endTime:h})=>Lo(e,c,h));let r=e>=da,s=e<da;if(da=e,s&&(ua=!1),la(Qi)&&Lo(e,Qi.startTime,Qi.endTime)&&Wl===t.value)return Qi;if(!la(Wt)&&o?.length&&!ua){Wt=o.find(({startTime:c,endTime:h})=>Lo(e,c,h)||r&&Gl(e,c,h)),Qi=void 0,!la(Wt)&&o[o.length-1].endTime<e&&(ua=!0);return}else{if(Lo(e,Wt?.startTime,Wt?.endTime))return Qi=Wt,Wt=void 0,Wl=t.value,Qi;(r&&Dp(e,Wt?.startTime,Wt?.endTime)||s&&Gl(e,Wt?.startTime,Wt?.endTime))&&(Wt=void 0)}};var Co={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"},Lp={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"},ca=e=>Co[e]??Co[Lp[e]]??void 0;import{Subscription as Cp}from"@vkontakte/videoplayer-shared";import"@vkontakte/videoplayer-statistics";var $o=class{constructor(t,i,n,o=new Cp){this.oneStat=t;this.thinOneStat=i;this.mediascopePixel=n;this.statSubscription=o}destroy(){this.oneStat?.destroy(),this.thinOneStat?.destroy(),this.mediascopePixel?.destroy(),this.statSubscription.unsubscribe()}};var ri="off";var Jl=({interfaceLanguage:e,isCyrillicRelatedInterface:t,videoId:i,isLiveCatchUpMode:n,statAuthToken:o,isAudioDisabled:r,canDownload:s,callbacks:u,webApi:c,previewThumbsData:h,uiConfig:p,coreConfig:a,player:d,stopPlayer:m,looped:g=!1,statistics:_,saveRate:v,internalsExposure:L,playerId:N,metaConfig:k})=>{let y={...a,isAudioDisabled:r,live:{...a.live??{},isLiveCatchUpMode:!!n}},T=p,w=Qp.createRootTracer(!1),E=w.createComponentTracer("Store"),f=d||new Op(y,w,{playerId:N,onDevNullLog:u?.onDevNullLog});L?.expose({corePlayer:f});let B=new zp,A=new No(B,{loadTimeout:T.ads.loadTimeout,initTimeout:T.ads.initTimeout,runtimeTimeout:T.ads.runtimeTimeout,useAdmanFromNPM:T.ads.useAdmanFromNPM,volumeMultiplier:T.ads.volumeMultiplier,isVsidOriginal:T.ads.isVsidOriginal}),O=c?.focusManager,D=B.createComponentLog("Store"),Z,ae,P={},W=new Eo,H=new Hp,te="",xe=V(!1),J=_&&_.oneStat?Oe(_.oneStat.vsid$):Bt(void 0),de=V(Ql()),Y=V(!1),he=()=>Fl(document,Kl.device.isIOS),F=V(!1),Le=V([]),Se=Fp(f.events.fatalError$,f.events.managedError$).subscribe(l=>Le.update(M=>[...M,l])),le=Bt(!1,l=>{let M=f.events.fatalError$.subscribe(()=>l(!0));return()=>M.unsubscribe()}),C=async l=>{let M=Object.values(Rp).includes(l);if(T.downloadVKLanguages&&(M&&T.updateBuiltinLanguages||!Wr(l))){let K;try{K=await Up(l,cl,pl)}catch{_?.oneStat?.logError({errorType:"VKLangPack",fatal:!1})}K&&(Br({language:l,pack:K,fallback:T.defaultLanguage}),se.set(l),q.update(be=>be+1))}Wr(l)&&se.set(l)},se=V(e),q=V(0),ce=V(t);C(e);let Me=(l,M)=>{let z=_e(se);return Gr(z,l,M,T.defaultLanguage)},Ie=V("thumb");Ie.subscribe(l=>{l==="ads"&&f.info.playbackState$.getValue()&&I()});let je=(()=>{let l=tt([le,Ie],([M,z])=>M?"crashed":z);return{...l,is:M=>_e(l)===M}})(),b=V(),I=()=>{b.set({muted:f.info.muted$.getValue()})},$=V({width:0,height:0}),U=null,ee=f.info.isBuffering$,re=Bt(ee.getValue(),l=>{let M=ee.subscribe(z=>{z&&U===null?U=window.setTimeout(()=>{l(ee.getValue()),U=null},T.loaderDelay):l(z)});return()=>{M.unsubscribe(),U&&clearTimeout(U)}});E.log("create store"),D({message:"create store"});let ke=l=>{D({message:`init video, config: ${JSON.stringify(l)}`}),Bp.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Wp()]}),f.initVideo(l),E.log("init video"),l.subtitles&&f.setExternalTextTracks(l.subtitles),Z=l,te=l.subtitlesForcedLanguage||""},Ce=new Qn,S=new Qn,j=new Qn,X={actionRewind$:Ce,actionSeek$:S,inFullscreen$:new Po(l=>de.subscribe(M=>l.next(M))),actionSetSubtitle$:j},ue=new Qn,x=new Qn,G={actionSeek$:S,actionSubtitlesSwitched$:ue,actionQuality$:x,playerSize$:new Po(l=>$.subscribe(M=>l.next(M))),inFullscreen$:new Po(l=>de.subscribe(M=>l.next(M))),isLoaderVisible$:new Po(l=>re.subscribe(M=>l.next(M)))};if(_){let{oneStat:l,thinOneStat:M,mediascopePixel:z,statSubscription:K}=_;l&&(K.add(l.attachToUi(X)),K.add(l.attachToAds(A.events)),l.authorize(o).catch(be=>{D({message:`onestat auth error ${String(be)}`})}),z&&z.attachTo(f)),M&&(K.add(M.attachTo(f,A.events)),K.add(M.attachToUi(G)),K.add(M.attachToAds(A.events)),M.updateContext({isMobile:_e(xe)}),M.authorize(o))}let ie=()=>{if(Kl.device.isIOS&&ae)try{Hl(ae)}catch(l){D({message:`exitIosSafariFullscreen failed: ${l}`})}};H.add(f.experimental.element$.subscribe(l=>{l&&(ae=l,l.classList.add("player-media"))})).add(f.events.ended$.subscribe(()=>{ie(),u?.onEnded?.()})).add(f.events.looped$.subscribe(()=>{u?.onLooped?.()})).add(f.events.started$.subscribe(async()=>{let l=f.info.muted$.getValue();u?.onStarted?.(),P.onStarted?.(l)})).add(f.events.willSeek$.subscribe(({from:l,to:M})=>{u?.onSeek?.(l,M)})).add(f.events.autoplaySoundProhibited$.subscribe(()=>{u?.onAutoplaySoundProhibited?.()})).add(f.info.position$.subscribe(l=>{let M=f.info.duration$.getValue();isFinite(M)&&M>0&&(u?.onTimeupdate?.(M,l),A.setPosition(l,M))})).add(f.events.fatalError$.subscribe(l=>{u?.onCrashed?.(l?`${l.id}: ${l.message}`:void 0)})).add(f.events.fetcherRecoverableError$.subscribe(l=>{u?.onRecoverableError?.(l?`${l.id}: ${l.message}`:void 0)})).add(f.events.loadedMetadata$.subscribe(()=>{F.set(!0)})).add(f.info.liveTime$.subscribe(l=>{u?.onLiveTime?.(l)})).add(f.info.isStalled$.subscribe(l=>{u?.onStalledChanged?.(l)})).add(f.info.isLiveEnded$.subscribe(l=>l&&u?.onLiveEnded?.())).add(A.events.loadStarted$.subscribe(()=>u?.adsInfo?.onLoadStarted?.())).add(A.events.loadEnded$.subscribe(()=>u?.adsInfo?.onLoadEnded?.())).add(A.events.loadError$.subscribe(()=>u?.adsInfo?.onLoadError?.())).add(A.events.init$.subscribe(()=>u?.adsInfo?.onInit?.())).add(A.events.ready$.subscribe(()=>u?.adsInfo?.onReady?.())).add(A.events.started$.subscribe(l=>u?.adsInfo?.onStarted?.(l))).add(A.events.timeRemained$.subscribe(l=>u?.adsInfo?.onTimeRemained?.(l))).add(A.events.ended$.subscribe(l=>u?.adsInfo?.onCompleted?.(l))).add(A.events.empty$.subscribe(()=>u?.adsInfo?.onEmpty?.())).add(A.events.clicked$.subscribe(l=>u?.adsInfo?.onClicked?.(l))).add(A.events.closed$.subscribe(l=>u?.adsInfo?.onClosed?.(l))).add(A.events.error$.subscribe(l=>u?.adsInfo?.onError?.(l))).add(A.events.paused$.subscribe(()=>u?.adsInfo?.onPaused?.())).add(A.events.resumed$.subscribe(()=>u?.adsInfo?.onResumed?.()));let Re=Bt(f.info.position$.getValue(),l=>{let M,z,K=()=>{let be=f.info.playbackState$.getValue(),Ve=f.info.isLive$.getValue(),Pe=f.info.duration$.getValue(),We=f.info.position$.getValue();if(be&&[Hn.PLAYING,Hn.PAUSED].includes(be)){let Ct=Ve?We-Pe:f.getExactTime();Ct!==z&&l(Ct),z=Ct}M=requestAnimationFrame(K)};return K(),()=>cancelAnimationFrame(M)}),$e=Oe(f.info.playbackState$),Je=Oe(f.info.isBuffering$),Be=tt([$e,Je],([l,M])=>M?"buffering":l),nt=Oe(f.info.currentBuffer$),Ke=Oe(f.info.isEnded$),ai=Oe(f.info.isLive$),Qt=T.features.playbackRate?Oe(f.info.canChangePlaybackSpeed$):Bt(!1),si=Oe(f.info.liveBufferTime$),fi=Oe(f.info.volume$),Li=Oe(f.info.muted$),Si=So(f.info.predefinedQualityLimitType$.pipe(Zl(l=>l===Di.TRAFFIC_SAVING)),f.info.predefinedQualityLimitType$.getValue()===Di.TRAFFIC_SAVING),He=So(f.info.predefinedQualityLimitType$.pipe(Zl(l=>l===Di.HIGH_QUALITY)),f.info.predefinedQualityLimitType$.getValue()===Di.HIGH_QUALITY),Ue=Oe(f.info.autoQualityLimitingAvailable$),Xe=Oe(f.info.availableQualities$),Uo=Oe(f.info.availableQualitiesFps$),Yi=Oe(f.info.chromecastState$),vt=Oe(f.info.chromecastDeviceName$),qe=Oe(f.info.currentFormat$),Bi=Oe(f.info.throughputEstimation$),Wi=Oe(f.info.videoBitrate$),ed=Oe(f.info.intrinsicVideoSize$),ma=Oe(f.info.duration$),td=Oe(f.info.isAudioAvailable$),id=()=>{U&&clearTimeout(U),U=null},Wn=tt([ma,ai],([l,M])=>M?-l:l),ha=tt([$e],([l])=>l===Hn.PLAYING),va=Oe(f.info.atLiveEdge$),ga=Oe(f.info.atLiveDurationEdge$),_a=Oe(f.info.position$),nd=tt([_a,ma],([l,M])=>isFinite(l)&&isFinite(M)&&!!M),od=tt([Yi],([l])=>l===$p.CONNECTED),rd=Oe(f.info.availableVideoStreams$),ya=T.features.audioLanguages?Oe(f.info.availableAudioStreams$):Bt([]),ad=Oe(f.info.currentVideoStream$),ba=Oe(f.info.currentAudioStream$),sd=l=>{l.language&&Il(l.language),f.setVideoStream(l)},Aa=l=>{f.setAudioStream(l)},xa=l=>{let M;if(l.length===1&&(M=l.at(0)),M??=l.find(K=>"isDefault"in K&&K.isDefault),T.features.userVideoPrefs&&i){let K=wo(T.userSalt,String(i));K?.audioTrackId&&(M=l.find(Ve=>Ve.id===K.audioTrackId)??M)}let z=wl();return z&&(M??=l.find(({language:K})=>z===K)),M??=l.at(0),M},ld=l=>{E.log("change audio stream",{id:l});let M=f.info.availableAudioStreams$.getValue().find(z=>z.id===l);M&&Aa(M)},Ea=!1;H.add(f.info.availableAudioStreams$.subscribe(l=>{if(!Ea&&l.length){let M=xa(l);M&&(f.setAudioStream(M),Ea=!0)}})),ya.subscribe(l=>{u?.onAvailableAudioStreamsChanged?.(l.map(({label:M="",id:z="",language:K=""})=>({label:M,language:K,id:z})))}),ba.subscribe(l=>l&&u?.onAudioStreamChanged?.(l.id));let Sa=!1;H.add(f.info.availableVideoStreams$.subscribe(l=>{if(!Sa&&l.length){let M=xa(l);M&&(f.setVideoStream(M),Sa=!0)}}));let Gn=V(void 0),Ta=Oe(f.info.isAutoQualityEnabled$,l=>l&&Gn.set(void 0)),dd=Oe(f.info.currentQuality$,()=>Gn.set(void 0)),Ma=tt([Gn,dd],([l,M])=>l??M),wa=tt(qe,l=>l!==Oo.MPEG),ud=tt([Xe,Uo,Ta,Ma,wa],([l,M,z,K,be])=>{let Ve=[];be&&Ve.push({value:"auto",displayValue:Me("auto_quality_option"),selected:z});let Pe=l.filter(We=>!Vp(We));for(let We of Pe){let Ct=M[We];Ve.push({value:We,displayValue:`${We}${Ct?Yl(Ct):""}`,selected:z?!1:We===K})}return Ve}),zo=Oe(f.info.currentPlaybackRate$),Fo=tt([zo,va,ga],([l,M,z])=>{let K=z?1:T.controls.playbackRateMin,be=M?1:T.controls.playbackRateMax,Ve=T.controls.playbackRateStep,Pe=[];for(let We=K;We<=be;We+=Ve)Pe.push({value:We,displayValue:We===1?Me("playback_rate_1"):Me("playback_rate",{multiplier:We.toString(10)}),selected:l===We});return Pe}),qn=()=>({displayValue:Me("subtitles_off"),value:ri,language:""}),Ia=V(qn()),Ti=tt([Ia,q],([l],M)=>{l.value===ri?M(qn()):M(l)}),Ho=T.features.subtitles?Oe(f.info.availableTextTracks$):Bt([]),ka=bl(),cd=tt([Ho,Ti],([l,M],z)=>{let K=[],be=l.find(({id:Ve})=>Ve===M.value);if(be?.url){let[,Ve]=ka.find(be.url)??[];if(Ve){z(Ve);return}W.download(be.url).then(Pe=>{if(!Pe||W.isDestroyed())return;let We=new Bl,Ct=be.language;if(Ct){let Zo=!!be.isAuto,eu=We.parse(Pe,Ct);K.push({lang:Ct,subtitles:eu,isAuto:Zo,id:be.id})}ka.add(be.url,K),_e(Ti).value===M.value&&z(K)}).catch(()=>{_?.oneStat?.logError({errorType:"Subtitles download",fatal:!1})})}z(K)}),pd=tt([zo,ha,Ti],([l,M,z],K)=>{let Pe;if(f.info.isLive$.getValue()&&M&&z.value!==ri){let Ct=()=>{let Zo=1e3/(3*l);Pe=setTimeout(Ct,Zo),K(Date.now())};return Ct(),()=>clearTimeout(Pe)}}),Na=tt([Ho,Ti],([l,M])=>{if(!l.length)return[];let z=[];for(let{language:K,isAuto:be,id:Ve}of l){let Pe=K&&ca(K);K&&Pe&&z.push({displayValue:be?Me("subtitles_auto",{language:Pe}):Pe,value:Ve,selected:M?.value===Ve,isAuto:be,language:K})}return z.length?(z.unshift({...qn(),selected:M?.value===ri}),z):[]}),mn={available:[],prev:[]},fd=()=>f.experimental.getCurrentTime$.getValue()?.()??ae?.currentTime??0,md=tt([Re,Ti,cd,pd],([l,M,z,K])=>{let be=f.info.isLive$.getValue();if(be&&mn.prev!==z){let Ve=z.find(({id:We})=>We===M.value),Pe=mn.prev.find(({id:We})=>We===M.value);if(Ve){let We={...Ve,subtitles:[...Pe?.subtitles??[],...Ve.subtitles]};mn.available=[We],mn.prev=z}}if(M&&M.value!==ri){let Ve=be?fd():l,Pe=be?mn.available:z;return ql(Ve,M,Pe,be)}}),hd=tt([md],([l])=>l?.texts?l.texts:[]);H.add(Ti.subscribe(l=>{if(l.value===ri)u?.onSubtitleOff?.();else{let M=Object.entries(Co).find(([z,K])=>K===l.displayValue);u?.onSubtitleOn?.(M?M[0]:"",l.value)}}));let vd=V(!0),gd=tt([nt,Wn,_a,si],([l,M,z,K])=>{let be=l?.end??0;if(!K)return be/M;let Pe=-z+K-M;return(be-Pe)/M}),Da=Oe(f.info.availableSources$),_d=tt([Da],([l])=>Object.keys(l?.[Oo.MPEG]||{}).length>0),yd=()=>{let l=Object.keys(f.info.availableSources$?.getValue()?.[Oo.MPEG]||{}),M=Pp(l)||Yp.Q_144P;return Z.sources[Oo.MPEG]?.[M]},bd=()=>{let l=yd();if(l)E.log("download video",{url:l}),yl(l,Z?.meta?.title||"video");else{let M="There is no URL for download video";E.log("download video",{message:M}),D({message:M})}},Ad=()=>{D({message:"toggle muted"});let l=f.info.muted$.getValue();f.info.volume$.getValue()===0&&!l?Yo(Qo()):hn(!l)},xd=()=>{Ye.ui.settingsMenu.visible$.set(!1),E.log("close settings menu")},Ed=async(l,M=()=>Promise.resolve())=>{Ye.ui.settingsMenu.visible$.set(!0),await M(),E.log("open settings menu",{wasOpenedByKeyboard:l})},Qo=()=>{let l=Math.max(T.volumeMinRestore,To()??0);return l===0?T.volumeDefault:l},Yo=l=>{let M=l===0?Qo():l,z=f.info.muted$.getValue();D({message:`set volume, volume: ${l}, preferredVolume: ${M}`});let K=!r||je.is("ads");z&&l>0&&K&&(z=!1),f.setVolume(l,z),A.setVolume(l)},hn=l=>{let M=f.info.volume$.getValue();D({message:`set muted, currentVolume: ${M}, mute: ${l}`});let z=je.is("ads");if(f.setMuted(l,z),A.setVolume(l?0:M),!l&&M===0){let K=Qo();f.setVolume(K),A.setVolume(K)}},La=V(!1),Ca=l=>{E.log("set looped",{isLooped:l}),La.set(l),f.setLooped(l)};Ca(g);let Sd=()=>{f.prepare()},Td=()=>{Ht(Ye);let l=_e(Ye.playerPhase),M={playerPhase:l,isVideoEnded:!1,action:"none"};if(D({message:"toggle play"}),l==="ads"){M.action="play",E.log("toggle adman play",M),A.togglePlay();return}let z=()=>{D({message:"toggle play, call player.play"}),M.action="play",f.play(),u?.onPlay?.()},K=()=>{D({message:"toggle play, call player.pause"}),M.action="pause",f.pause(),u?.onPause?.()};f.info.isEnded$.getValue()?(D({message:"toggle play, video ended, seek to 0"}),Ce.next(),S.next(Yn.REWIND),f.seekTime(0),z()):f.info.playbackState$.getValue()!==Hn.PLAYING?z():K(),E.log("toggle play",M)},$a=(l,{byUser:M=!1}={})=>{D({message:`set quality, quality: ${l}`}),E.log("set quality",{quality:l}),M&&x.next(l),f.setAutoQuality(l==="auto"),Mo(),l!=="auto"&&(Fr(i,l),Gn.set(l),f.setQuality(l))},Oa=l=>{D({message:`set trafficSavingEnabled, value: ${l}`}),E.log("set traffic saving enabled",{trafficSavingEnabled:l});let M=l?Di.TRAFFIC_SAVING:Di.UNKNOWN;f.setPredefinedQualityLimits(M)},Pa=l=>{D({message:`set highQualityEnabled, value: ${l}`}),E.log("set high quality enabled",{highQualityEnabled:l}),Md(l?Di.HIGH_QUALITY:Di.UNKNOWN)},Md=l=>{f.setPredefinedQualityLimits(l)},Bo=(l,M=!0)=>{E.log("set playback rate",{playbackRate:l}),f.setPlaybackRate(l),T.features.saveRate&&v&&!f.info.isLive$.getValue()&&M&&kl(l)},wd=()=>{let l=_e(Qt),M=_e(Fo),z=M.findIndex(({selected:be})=>be);if(z===M.length-1||!l)return M[z];let K=M[z+1];return Bo(K.value),K},Id=()=>{let l=_e(Qt),M=_e(Fo),z=M.findIndex(({selected:be})=>be);if(z===0||!l)return M[z];let K=M[z-1];return Bo(K.value),K},Wo=(l={...qn(),selected:!1})=>{E.log("set subtitles",{...l}),l.value!==ri&&j.next(l.isAuto?l.value+"_auto":l.value),ue.next({enabled:l.value!==ri,lang:l.language,auto:!!l.isAuto}),Ia.set(l)},Ra=l=>{E.log("toggle subtitles"),_e(Ti)?.value===ri?Va(l):ja()},kd=(l,M)=>{E.log("change subtitle",{enabled:l}),l?Va(!0,M):ja()},Va=(l,M)=>{E.log("subtitle on");let z=_e(Na),K=_e(se),be=te??K,Ve;M&&(Ve=z.find(Pe=>Pe.value===M)),Ve??=z.filter(Pe=>Pe.value!==ri).find(Pe=>Pe.language===be),Wo(Ve??z[1])},ja=()=>{E.log("subtitle off"),Wo(void 0)};H.add(f.info.availableTextTracks$.subscribe(l=>{function M(){let z=[];for(let{language:K,isAuto:be,id:Ve}of l){let Pe=K&&ca(K);K&&Pe&&z.push({id:Ve,language:K,title:be?Me("subtitles_auto",{language:Pe}):Pe})}return z}u?.onAvailableSubtitlesChanged?.(M())}));let Ua=V(!0),za=l=>{Ua.set(l)},Fa=(l,M,z=!0)=>{if(D({message:`seek to time, time: ${l}`}),E.log("seek to time",{time:l,action:M,forcePrecise:z}),S.next(M),f.info.isLive$.getValue()){let K=f.info.duration$.getValue(),be=Math.min(0,K+l);f.seekTime(be,z)}else f.info.isEnded$.getValue()&&(D({message:"seek after ended, call callbacks.onPlay"}),u?.onPlay?.()),f.seekTime(l,z)},Ha=(l,M,z=!1)=>{D({message:`seek to percent, percent: ${l}`}),E.log("seek to percent",{percent:l,action:M});let K=_e(Wn)*l;Fa(K,M,z)},Nd=l=>{D({message:`seek external, time: ${l}`}),E.log("seek external",{time:l}),S.next(Yn.UNKNOWN),f.seekTime(f.info.isLive$.getValue()?-l:l)},Dd=l=>{let M=l.max??"none",z=l.min??"none";D({message:`set auto quality limitation. Max: ${M}. Min: ${z}`}),E.log("set auto quality limits",{max:M,min:z}),f.setAutoQualityLimits(l)},Ld=l=>{D({message:`set playback rate to: ${l}`}),E.log("set playback rate external",{playbackRate:l}),f.setPlaybackRate(l)},Go=V(void 0),qo=V(!1),Cd=l=>{D({message:`start scrubbing, progress: ${l}`}),E.log("start scrubbing",{progress:l}),qo.set(!0),Qa(l)},Qa=l=>{Go.set(l)},$d=()=>{Go.set(void 0),qo.set(!1)},Od=(l,M=!1)=>{D({message:`complete scrubbing, progress: ${l}`}),E.log("complete scrubbing",{progress:l}),Ha(l,Yn.SLIDER,M),$d()},Pd=tt([Re,Wn,Go],([l,M,z],K)=>{K(jp(z)?z*M:l)}),Ko=V(!1),Rd=()=>{Ko.set(!0)},Vd=()=>{Ko.set(!1)},jd=l=>{S.next(Yn.LIVE),D({message:"live switch to low latency "+l}),E.log("live switch to low latency "+l),f.setLiveLowLatency(l)},Ud=()=>{S.next(Yn.LIVE),D({message:"switch to active live"}),E.log("switch to active live"),f.seekTime(0),f.info.playbackState$.getValue()!==Hn.PLAYING&&Ye.actions.internal.togglePlay()},zd=()=>{E.log("skip adman"),A.skip()},Fd=(l=!0)=>{Ht(Ye),D({message:`switch from ads to video, callPlay: ${l}`}),E.log("switch from ads to video",{callPlay:l}),Ie.set("video"),l&&f.play(),r&&hn(!0);let M=_e(b)?.muted,z=!f.info.muted$.getValue();M!==void 0&&!z&&hn(M),b.set(void 0)},Hd=()=>{Ht(Ye),D({message:"switch from video to ads"}),E.log("switch from video to ads"),Ye.actions.internal.pause(),ie(),Ie.set("ads")},Qd=l=>{Ht(Ye);let M=l?"LiveWaitingStart":"thumb";E.log("set live waiting start",{state:l,playerPhase:M}),Ie.set(M)},Yd=l=>{Ht(Ye);let M=l?"LiveWaitingRecover":"thumb";E.log("set live waiting recover",{state:l,playerPhase:M}),Ie.set(M)},Bd=l=>{Ht(Ye);let M=l?"LiveWaitingRecord":"thumb";E.log("set live waiting record",{state:l,playerPhase:M}),Ie.set(M)},Wd=()=>(Ht(Ye),E.log("get debug text data"),gl(f,Z,Ye,w.getTraceId(),k)),Gd=()=>(Ht(Ye),JSON.stringify(w.getFinishedSpans())),qd=()=>(Ht(Ye),_l(f,Z,Ye)),Kd=()=>ae,Ya=l=>{if(Ht(Ye),f.info.isEnded$.getValue())return;let M=!l;if(_e(Ye.playerPhase)==="ads"){D({message:`pause ads, internalCall: ${M}`}),E.log("pause ads",{internalCall:M}),A.pause();return}D({message:`pause video, internalCall: ${M}`}),E.log("pause video",{internalCall:M}),M&&u?.onPause?.(),f.pause()},Ba=l=>{Ht(Ye);let M=!l;if(_e(Ye.playerPhase)==="ads"){D({message:`play ads, internalCall: ${M}`}),E.log("play ads",{internalCall:M}),A.play();return}D({message:`play video, internalCall: ${M}`}),E.log("play video",{internalCall:M}),M&&u?.onPlay?.(),f.play()},Zd=l=>{Ht(Ye);let M=!l;if(_e(Ye.playerPhase)==="ads"){D({message:"player cannot be stopped during ads via external method"});return}D({message:`player will be stopped, internalCall: ${M}`}),m?.()},Wa=(l,M)=>{Ht(Ye),D({message:`first start, show ads: ${l}, internalCall: ${!M}`}),E.log("first start",{showAds:l,external:M}),l?Ie.set("ads"):(Ie.set("video"),M?f.play():Ye.actions.internal.togglePlay())},Jd=()=>(D({message:"getting preview thumbs data"}),E.log("get preview thumbs data",{...h}),h),Xd=()=>{E.log("destroy store"),H.unsubscribe(),f.destroy(),A.destroy(),_?.destroy(),Se.unsubscribe(),W.destroy()},Ye={interfaceLanguage$:se,isCyrillicRelatedInterface$:ce,initVideo:ke,videoId:i,playerPhase:je,vsid:J,state:{positionExact$:Re,positionWithScrubbing$:Pd,duration$:Wn,playbackState$:$e,playbackStateRealistic$:Be,isPlaying$:ha,isLoaderVisible:re,bufferedProgress$:gd,isLive$:ai,canChangePlaybackSpeed$:Qt,isActiveLive$:va,isOldestAvailableLive$:ga,isRewindableLive$:nd,isEnded$:Ke,muted$:Li,volume$:fi,trafficSavingEnabled$:Si,highQualityEnabled$:He,autoQualityLimitingAvailable$:Ue,availableVideoStreams$:rd,availableAudioStreams$:ya,videoStream$:ad,audioStream$:ba,currentQuality$:Ma,isAutoQualityEnabled$:Ta,availableQualities$:ud,currentPlaybackRate$:zo,availablePlaybackRates$:Fo,currentSubtitle$:Ti,availableTextTracks$:Ho,availableSubtitlesList$:Na,currentSubtitleCaptions$:hd,isAutoSubtitleCaptionVisible$:vd,chromecastState$:Yi,chromecastDeviceName$:vt,chromecastConnected$:od,currentFormat$:qe,throughputEstimation$:Bi,videoBitrate$:Wi,videoSize$:ed,errorLog$:Le,crashed$:le,isAudioAvailable$:td,isAudioDisabled:!!r,canDownload:T.features.download&&!!s,availableSources$:Da,hasMpegSources$:_d,looped$:La,loadedMetadata$:F,isAutoQualityAvailable$:wa},ui:{t:Me,controlsVisible:V(!1),touched:V(!1),controls:{prevButton:V(void 0),playButton:V(void 0),replayButton:V(void 0),nextButton:V(void 0),playPrevChapterButton:V(void 0),seekToInteractiveButton:V(void 0),interactiveGraphButton:V(void 0),liveButton:V(void 0),time:V(void 0),episodes:V(void 0),volume:V(void 0),subtitles:V(void 0),settings:V(void 0),context:V(void 0),chromecast:V(void 0),pip:V(void 0),fullscreen:V(void 0),vkLogo:V(void 0),interactiveTimeIndicator:V(void 0),timeline:V(void 0),autoplayNextToggle:V(void 0)},modals:{hotKeyMap:{show:V(!1),data:V({title:"",closeBtnText:"",groups:[]})}},isFullscreen:de,isFullscreenOpenedByKeyboard:Y,isAutoplay:V(!1),debugPanelVisible:V(!1),episodes:{panelOpened$:V(!1),openedByKeyboard$:V(!1)},contextMenu:{visible$:V(!1),btnRef$:V(void 0),openedByBtnKeyboard$:V(!1),openedByHotKey$:V(!1),lastActiveElem$:V(void 0),showContextMenuBtn$:V(!1),position$:V({top:0,left:0})},playerSize:$,isMobile:xe,icon3DVideoVisible:V(!1),scrubbingInProgress:qo,volumeChangingInProgress:Ko,interactiveHideMobileControls:V(!1),overlayContainer$:V(void 0),startedByKeyboard$:V(!1),autoplayNextEnabled$:V(!1),timerNextVideoRunning$:V(!0),settingsMenu:{visible$:V(!1),ref$:V(void 0),openedByBtnKeyboard$:V(!1)},settingsSubMenu:{visible$:V(!1),ref$:V(void 0),name$:V(void 0)},userActionsDisabled:V(!1),hiddenControls:{volume:V(!1),vkLogo:V(!1),pip:V(!1),chromecast:V(!1),settings:V(!1)},isControlsAvailable:Ua,controlBlocks:{topLeft:V(void 0),topRight:V(void 0),middle:V(void 0),bottom:V(void 0),bottomLeft:V(void 0),bottomRight:V(void 0)},videoTitleInfo:V(void 0),previewTrackNotificationVisible:V(!1)},ads:{position:V(0),duration:V(0),playbackState:V("inactive"),canSkip:V(!1),secondsToWatchBeforeSkip:V(0),postrollPassed:V(!1)},webApi:{focusManager:O},actions:{internal:{preload:Sd,firstStart:l=>Wa(l,!1),play:()=>Ba(!1),pause:()=>Ya(!1),togglePlay:Td,toggleMuted:Ad,openSettingsMenu:Ed,closeSettingsMenu:xd,setVolume:l=>Yo(l),setMuted:l=>hn(l),startVolumeChanging:Rd,stopVolumeChanging:Vd,setVideoStream:sd,setAudioStream:l=>Aa(l),setQuality:(l,M)=>$a(l,M),setTrafficSavingEnabled:l=>Oa(l),setHighQualityEnabled:l=>Pa(l),setPlaybackRate:Bo,incrementPlaybackRate:wd,decrementPlaybackRate:Id,setSubtitle:l=>Wo(l),toggleSubtitle:()=>Ra(!1),startScrubbing:Cd,progressScrubbing:Qa,completeScrubbing:Od,switchToActiveLive:Ud,switchFromAdsToVideo:Fd,switchFromVideoToAds:Hd,skipAd:zd,setLiveWaitingStart:Qd,setLiveWaitingRecover:Yd,setLiveWaitingRecord:Bd,getDebugTextData:Wd,getTraceTextData:Gd,getDebugPanelData:qd,getVideoElement:Kd,seekTime:(l,M,z)=>Fa(l,M,z),clearDelayedBufferingCheckTimeout:id,seekToPercent:Ha,getPreviewThumbsData:Jd,downloadVideo:bd,addLanguage:Br,setLanguage:C,setLooped:Ca,checkFullscreenSupport:he},external:{firstStart:l=>Wa(l,!0),play:()=>Ba(!0),pause:()=>Ya(!0),stop:()=>Zd(!0),seekTime:l=>Nd(l),setPlaybackRate:l=>Ld(l),setAutoQualityLimits:l=>Dd(l),setMuted:l=>hn(l),toggleSubtitle:()=>Ra(!0),changeSubtitle:kd,setVolume:l=>Yo(l),setLiveLowLatency:jd,hideControls:()=>za(!1),showControls:()=>za(!0),setQuality:l=>$a(l),setTrafficSavingEnabled:l=>Oa(l),setHighQualityEnabled:l=>Pa(l),changeAudioStream:ld}},callbacks:u,setUiCallbacks:l=>{P={...l}},getAdmanWrapper:()=>A,getLogger:()=>B,getPlayer:()=>f,destroy:Xd};return Ye};import{now as qp,ValueSubject as Kp}from"@vkontakte/videoplayer-shared";import{cloneDeepWith as Zp,InterfaceLanguage as Jp,Observable as Xp,Subscription as ef,InternalsExposure as tf,skip as nf,getPlayerId as of}from"@vkontakte/videoplayer-shared";import{clientChecker as rf}from"@vkontakte/videoplayer-core";import{OneStat as af,ThinOneStat as sf,MediascopePixel as lf}from"@vkontakte/videoplayer-statistics";function Bn(e,t){let i=new Set([...Object.keys(e),...Object.keys(t)]),n={};for(let o of i)n[o]=t[o]??e[o]??void 0;return n}import{devNull as fa}from"@vkontakte/videoplayer-shared";var Ro=class{constructor(t){this.getActiveElement=t;this.focusableElements=[];this.isActive=!1;this.handleTabKey=t=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],n=this.focusableElements[this.focusableElements.length-1],o=this.getActiveElement();t.shiftKey&&o===i?(t.preventDefault(),n.focus()):!t.shiftKey&&o===n&&(t.preventDefault(),i.focus())}}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(){let t=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(t)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(t){this.container=t}};var Vo=class{constructor(t){this.shadowRoot=t;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{this.lastFocusedNode?.focus()};this.focusLock=new Ro(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(t){this.focusLock.setContainer(t)}};import{getWindow as Gp}from"@vkontakte/videoplayer-shared";var pa=Gp().HTMLElement||class{constructor(){this.isConnected=!1}};var df={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Jp.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},Xl=Fe(void 0),jo=class extends pa{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 Kp(null);constructor(){super(),this.subscription=new ef,this.fatalError$.subscribe(t=>{this.unmountComponent(this.svelteErrorComponent),t&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Ii(ra,{target:this.playerContainer}))})}connectedCallback(){if(this.rootContainer)return;this.initPlayerRootContainers();let t=this.getAttribute("stub-title")??void 0,i=this.getAttribute("stub-thumb-url")??void 0,n=yt({title:t,thumbUrl:i}),o={target:this.playerContainer,props:n};this.svelteStubComponent=Ii(oa,o),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=(t,i={})=>{if(!this.videoConfig)return;let{albumId:n,statPlace:o,statUserSalt:r,statTrackCode:s,statVKAppId:u,refreshStatAuthToken:c,autoplay:h,isTouch:p,refDomain:a,deviceId:d}=Bn(this.videoConfig,i),{unitedVideoId:m,isClip:g=!1}=t;if(this.uiConfig.features.statistics&&m)try{return new af({movieId:m,albumId:n,place:o,trackCode:s,vkAppId:u,autoplay:h??!1,mobile:p,clip:g,refDomain:a,deviceId:d,isPreviewPlayerView:!1},{refreshAuthToken:c,userSalt:r,config:this.statisticsConfig})}catch(v){console.error(v)}};createThinOneStat(t,i={}){if(!this.videoConfig)return;let{deviceId:n,preload:o,refreshStatAuthToken:r}=Bn(this.videoConfig,i),{unitedVideoId:s}=t;if(this.uiConfig.features.thinStatistics&&s)return new sf.ThinOneStat({deviceId:n,movieId:s,preload:o,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:r})}createPlayer(t,i={},n){if(!this.videoConfig)return;let{statAuthToken:o,preload:r,autoplay:s,volume:u,muted:c,fromTime:h,canRewindLive:p,supportLink:a,showAds:d,adsSlotId:m,adsParams:g={},adsAutoplayParam:_,interfaceLanguage:v,isCyrillicRelatedInterface:L,isAudioDisabled:N,isLiveCatchUpMode:k,fullScreenTarget:y,failoverHosts:T,canDownload:w,callbacks:E,saveRate:f,volumeMultiplier:B,showEndScreen:A,mediascopePixels:O}=Bn(this.videoConfig,i),{sources:D,title:Z,thumbUrl:ae,unitedVideoId:P,duration:W,adsParams:H={},previewThumbsData:te,subtitles:xe,subtitlesForcedLanguage:J,live:de,adsExternalApi:Y}=t;if(!D&&!de){let se=new Error("empty sources and live");this.fatalError$.next(se),E?.onCrashed?.(se.message);return}let he={...g,...H},F={focusManager:this.focusManager},Le=this.createOneStat(t,i),Se=this.createThinOneStat(t,i),le;O&&(le=new lf({pixels:O})),(Le||Se)&&(this.statistics=new $o(Le,Se,le)),this.store=Jl({player:n,interfaceLanguage:v,isCyrillicRelatedInterface:L,videoId:P,isLiveCatchUpMode:k,isAudioDisabled:N,statAuthToken:o,callbacks:E,webApi:F,previewThumbsData:te,canDownload:w,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:f,stopPlayer:()=>this.stop(),statistics:this.statistics,internalsExposure:this.internalsExposure,playerId:this.playerId});let C=()=>{if(!this.store||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(q=>E?.onCurrentFormatChanged?.(q))),this.subscription.add(this.store.state.throughputEstimation$.subscribe(q=>E?.onThroughputEstimationChanged?.(q))),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(q=>E?.onTrafficSavingEnabledChanged?.(q))),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(q=>E?.onHighQualityEnabledChanged?.(q))),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(q=>E?.onAutoQualityEnabledChanged?.(!!q))),this.subscription.add(new Xp(q=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(ce=>q.next(ce)))}).pipe(nf(1)).subscribe(q=>E?.onCurrentPlaybackRateChanged?.(q))),this.subscription.add(this.store.state.volume$.subscribe(q=>E?.onVolumeChange?.(q))),this.subscription.add(this.store.state.muted$.subscribe(q=>{if(q)E?.onMute?.();else{let ce=(this.store?.state.volume$&&_e(this.store.state.volume$))??0;E?.onUnmute?.(ce)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(q=>E?.onVideoBitrateChanged?.(q))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(q=>E?.onVSIDChanged?.(q))),Ee(Xl,{sources:D,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Z,thumbUrl:ae,subtitles:xe,subtitlesForcedLanguage:J,live:de,preload:r,autoplay:s,muted:c,volume:u,fromTime:h,canRewindLive:p,supportLink:a,showAds:d,adsSlotId:m,adsParams:he,adsAutoplayParam:_,duration:W,failoverHosts:T,fullScreenTarget:y,saveRate:f,shadowRootContainer:this.shadowRootContainer,outerContainerRef:this.rootContainer,volumeMultiplier:B,showEndScreen:A,adsExternalApi:Y,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let se={target:this.playerContainer,props:R(Xl)};this.svelteRootComponent=Ii(ia,se),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?fa.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):fa.destroy("ui")};this.coreConfig.asyncResolveClientChecker?rf.isInited$.subscribe(se=>{se&&(console.log("UI TV SDK async start"),C())}):C()}initPlayer(t,i={}){if(!this.isConnected){this.postponedInitParams=[t,i];return}if(!Array.isArray(t.videos)||t.videos.length===0){let n=new Error("empty videos");this.fatalError$.next(n),t.callbacks?.onCrashed?.(n.message);return}else this.fatalError$.next(null);this.videoConfig=Bn(df,Zp(t,n=>n instanceof pa?n:void 0)),this.playerId=of(t.playerId),this.uiConfig=dl(i.ui??{}),this.coreConfig=i.core??{},this.statisticsConfig=i.statistics??{},this.metaConfig=i.meta,this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new tf("ui",this.playerId)),fa.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+this.videoConfig?.showAds],numbers:[qp()]}),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 Vo(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 t=this.videoConfig.videos[0];t&&(this.unmountComponent(this.svelteRootComponent),this.createPlayer(t))}setMuted(t){this.svelteRootComponent?.setMuted(t)}toggleSubtitle(){this.svelteRootComponent?.toggleSubtitle()}changeSubtitle(t,i){this.svelteRootComponent?.changeSubtitle(t,i)}setVolume(t){this.svelteRootComponent?.setVolume(t)}seekTime(t){this.svelteRootComponent?.seekTime(t)}setPlaybackRate(t){this.svelteRootComponent?.setPlaybackRate(t)}setAutoQualityLimits(t){this.svelteRootComponent?.setAutoQualityLimits(t)}setAutoQuality(){this.svelteRootComponent?.setAutoQuality()}toggleTrafficSaving(t){this.svelteRootComponent?.toggleTrafficSaving(t)}toggleHighQuality(t){this.svelteRootComponent?.toggleHighQuality(t)}changeAudioStream(t){this.svelteRootComponent?.changeAudioStream(t)}addLanguage(t){this.store?.actions.internal.addLanguage(t)}async setLanguage(t){await this.store?.actions.internal.setLanguage(t)}setLiveStart(t){this.isLiveTailPlaying()||(this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(t,{autoplay:!0}))}setLiveWaitingStart(){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()}setLiveWaitingRecover(t=!1){let i=this.isLiveTailPlaying(),n=t||!i,o=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0)};n&&o(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{n||o(),this.store?.destroy()})}setLiveWaitingRecord(){let i=!this.isLiveTailPlaying(),n=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0)};i&&n(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{i||n(),this.store?.destroy()})}setLiveEnd(t){let n=!this.isLiveTailPlaying(),o=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(t,{autoplay:!1})};if(n){o();return}this.store?.callbacks&&(this.store.callbacks.onLiveEnded=o)}setLiveLowLatency(t){this.store?.actions.external.setLiveLowLatency(t)}setLooped(t){this.store?.actions.internal.setLooped(t)}getDebugData(){return this.store?.actions.internal.getDebugTextData()??""}getDeviceId(){return this.statistics?.oneStat?.getDeviceId()??void 0}switchToActiveLive(){this.store?.actions.internal.switchToActiveLive()}updateStatContext(t){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(t),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(t))}restoreFocus(){this.focusManager?.restoreFocus()}getTotalViewTime(){return this.statistics?.thinOneStat?.getTotalViewTime()}unmountComponent(t){t&&Vn(t)}};import{InterfaceLanguage as qI,VKNumericLanguage as KI,loadVKLangPack as ZI}from"@vkontakte/videoplayer-shared";import{VideoQuality as XI,VideoFormat as ek}from"@vkontakte/videoplayer-core";var YI=()=>{window.customElements.define("vk-video-player-tv",jo)};export{qI as InterfaceLanguage,xo as VERSION,KI as VKNumericLanguage,ek as VideoFormat,XI as VideoQuality,ZI as loadVKLangPack,YI as registerPlayerWebComponent};
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};