@vkontakte/videoplayer-tv 1.0.3-beta.0 → 1.0.3-dev.416df800.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 (51) hide show
  1. package/esnext.esm.js +47 -46
  2. package/package.json +6 -4
  3. package/types/VKVideoPlayerTv/HTMLElement.d.ts +1 -1
  4. package/types/VKVideoPlayerTv/index.svelte.d.ts +95 -95
  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 +104 -104
  12. package/types/constans/index.d.ts +2 -2
  13. package/types/index.d.ts +10 -10
  14. package/types/services/sentry.d.ts +19 -20
  15. package/types/services/statistics.d.ts +13 -13
  16. package/types/store/index.d.ts +207 -207
  17. package/types/store/utils.d.ts +34 -34
  18. package/types/translation/index.d.ts +2 -2
  19. package/types/translation/labels.d.ts +1 -1
  20. package/types/translation/packs/en.d.ts +1 -1
  21. package/types/translation/packs/ru.d.ts +1 -1
  22. package/types/translation/types.d.ts +5 -5
  23. package/types/types/index.d.ts +201 -201
  24. package/types/types/svg.d.d.ts +5 -0
  25. package/types/utils/WebVttParser.d.ts +11 -11
  26. package/types/utils/attachments/defferedDisableByCondition.d.ts +3 -3
  27. package/types/utils/changeVolume.d.ts +6 -6
  28. package/types/utils/elementHelpers.d.ts +2 -2
  29. package/types/utils/findCurrentSubtltlePhrase.d.ts +1 -1
  30. package/types/utils/fullscreen.d.ts +14 -14
  31. package/types/utils/roundFps.d.ts +1 -1
  32. package/types/utils/sanitizeHtml.d.ts +3 -3
  33. package/types/utils/sorts.d.ts +2 -2
  34. package/types/utils/stack/index.d.ts +7 -7
  35. package/types/utils/stack/node.d.ts +3 -3
  36. package/types/utils/subtitles.d.ts +8 -8
  37. package/types/utils/timeout.d.ts +2 -2
  38. package/types/utils/userSettings.d.ts +23 -18
  39. package/types/utils/videoConfig.d.ts +6 -2
  40. package/types/utils/volumeChange.d.ts +1 -1
  41. package/types/utils/webAPI/focusLock.d.ts +30 -30
  42. package/types/utils/webAPI/focusManager.d.ts +15 -15
  43. package/types/utils/webAPI/language.d.ts +1 -1
  44. package/es2015.cjs +0 -54
  45. package/es2015.esm.js +0 -54
  46. package/es2018.cjs +0 -54
  47. package/es2018.esm.js +0 -54
  48. package/es2024.cjs +0 -54
  49. package/es2024.esm.js +0 -54
  50. package/esnext.cjs +0 -54
  51. package/evergreen.esm.js +0 -54
package/esnext.esm.js CHANGED
@@ -1,54 +1,55 @@
1
1
  /**
2
- * @vkontakte/videoplayer-tv v1.0.3-beta.0
3
- * Wed, 18 Feb 2026 15:10:09 GMT
2
+ * @vkontakte/videoplayer-tv v1.0.3-dev.416df800.0
3
+ * Fri, 27 Feb 2026 03:40:26 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-3/doc/
5
5
  */
6
- var pd=Object.create;var is=Object.defineProperty;var fd=Object.getOwnPropertyDescriptor;var md=Object.getOwnPropertyNames;var hd=Object.getPrototypeOf,vd=Object.prototype.hasOwnProperty;var gd=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var _d=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of md(t))!vd.call(e,r)&&r!==i&&is(e,r,{get:()=>t[r],enumerable:!(n=fd(t,r))||n.enumerable});return e};var yd=(e,t,i)=>(i=e!=null?pd(hd(e)):{},_d(t||!e||!e.__esModule?is(i,"default",{value:e,enumerable:!0}):i,e));var Kl=gd(()=>{"use strict";AdmanHTML=function(){"use strict";function e(A){A&&typeof A=="string"&&new AdmanHTML.OpenLinkPopupRender(L).open(A)}function t(A){Re.initMode(A.slot?"slot":"json",{slot:A.slot,version:L.version}),L.slotId=A.slot,L.playerEl=A.playerEl,L.wrapper=A.wrapper,L.videoEl=A.videoEl,L.audioEl=A.audioEl,L.clickEl=A.clickEl,L.quality=parseInt(A.videoQuality||A.params&&A.params.videoQuality||360,10),L.browser=A.browser||{},L.config=A.config||{},L.pauseOnHide=A.pauseOnHide||!1,L.viewabilityValue=A.viewabilityValue||.5,L.viewabilityEl=A.viewabilityEl||L.videoEl,L.disclaimer=A.disclaimer!==!1,L.callToActionButton=A.callToActionButton!==!1,L.forcePreloadAdditionalData=!!A.forcePreloadAdditionalData,L.ctaStyles=A.ctaStyles,L.pause=p,L.resume=a,L.openPopup=e;var G=AdmanHTML.Utils.getPageLocation(),te=AdmanHTML.Utils.getHostname(G||""),je=AdmanHTML.Utils.isMobile(navigator.userAgent||navigator.vendor||window.opera);AdmanHTML.Utils.isElement(L.videoEl)&&je&&L.videoEl.setAttribute("playsinline",""),L.location={top:G,topEncoded:encodeURIComponent(G||""),hostname:te,hostnameEncoded:encodeURIComponent(te||"")},Re.rb(Re.code.ADMAN_SUCCESSFULLY_INITIALIZED),L.stats.metrics("initing"),v=A.midrollPointsP||null,be=!v&&A.midrollPoints?A.midrollPoints:null,L.config.vpaidJsInterface||(L.config.vpaidJsInterface=ae),L.config.vpaidHtmlInterface||(L.config.vpaidHtmlInterface=ue);var Ce="https://ad.mail.ru/vp/"+L.slotId+"?app_name=admanhtml&version="+this.getVersion();if(A.params&&A.params.constructor&&A.params.constructor===Object){var qe=[];"flash"in A.params||(A.params.flash=AdmanHTML.Utils.checkFlash()?1:0);for(var Ye in A.params)A.params.hasOwnProperty(Ye)&&qe.push(Ye+"="+A.params[Ye]);var nt=AdmanHTML.Utils.getUserIdQuery();nt&&qe.push(nt),qe.length&&(Ce+="&"+qe.join("&"))}if((L.slotId||A.json||A.adUrl)&&!L.browser.adBlock){var Ke={},pi=this;L.slotId?Ke.url=Ce:A.adUrl?(A.adUrl.indexOf("ad.mail.ru/")!==-1&&(A.adUrl+=A.adUrl.indexOf("?")===-1?"?":"&",A.adUrl+="version="+this.getVersion()),Ke.url=A.adUrl):Ke.data=A.json,le=new AdmanHTML.AdSlot(L,Ke,function(){var Qt=le.getRootSettings()||{},fi=Qt.requestHostname;if(fi&&!AdmanHTML.Utils.matchHostname(L.location.hostname,fi,U))return L.stats.logError("HOSTNAME_MISMATCH:"+fi+":"+L.location.topEncoded,{impressionID:Qt.impressionID,padID:Qt.padID,bannerIDs:Qt.bannerIDs}),void(L.callbacks.onError&&L.callbacks.onError());L.location.hostname||L.stats.logError("HOSTNAME_EMPTY:"+fi+":"+L.location.topEncoded),L.cb("onReady",[{settings:le.settings}]);var Li=1e6,Si=[],He=[],Ue=A.params&&A.params.duration?parseInt(A.params.duration,10):Li;Ue===0&&(Ue=Li),be&&be.sort(AdmanHTML.Utils.numSorter),v&&v.sort(AdmanHTML.Utils.numSorter);var Xe=le.getSection("midroll")||[],Wr=le.getServices("midroll",function(pt){return!pt.started()&&pt.isAfter()})||[];Xe=Xe.concat(Wr),Xe.forEach(function(pt){var Ze=pt.getAd();Ze.point||Ze.pointP||(Ze.pointP=50)}),Xe.sort(function(pt,Ze){var Ci=pt.getAd(),Wi=Ze.getAd();return Ci.pointP&&Wi.pointP?Ci.pointP-Wi.pointP:(Ci.point||Ci.pointP/100*Ue)-(Wi.point||Wi.pointP/100*Ue)}).forEach(function(pt){if(!pt.isEmpty||!pt.isEmpty()){var Ze=pt.getAd();be&&be.length?(Ze.point=be.shift(),Ze.pointP=null,He.push(Ze.point),pt.addImmutableProperty("point",Ze.point)):v&&v.length?(Ze.pointP=v.shift(),Ze.point=null,Si.push(Ze.pointP),pt.addImmutableProperty("pointP",Ze.pointP)):be||v||(Ze.point?(pt.addImmutableProperty("point",Ze.point),He.push(Ze.point)):Ze.pointP&&(pt.addImmutableProperty("pointP",Ze.pointP),Si.push(Ze.pointP)))}}),$=Si.sort(AdmanHTML.Utils.numSorter),I=He.sort(AdmanHTML.Utils.numSorter);var vn=le.getSection("research");vn&&vn.length>0&&(we=vn[0]),L.pauseOnHide&&Ae(pi)})}else{Re.logError("Adman init failed");var Gt=L.callbacks.onError;Gt&&Gt(),H=he=F=null}}function i(A,G){G=G||!1;var te;if(H&&(H.log("sectionShown"),H.disposed||(H.dispose(),H.disposed=!0,k(H,F)),A&&H.log("closedByUser")),F&&!de[F]&&(de[F]=F!=="midroll",te=A?L.callbacks.onClosed:L.callbacks.onCompleted),Pe[F]&&he&&(Pe[F]=Pe[F].concat(he.splice(0,he.length))),H=he=F=null,s(),typeof G=="object"&&G.force===!0)return void((te=L.callbacks.onError)&&te(G.message));te&&te()}function n(A){var G=le.getSettings(F).maxBannersShow||0,te=Ie[F]||0,je=!G||te<G;if(H&&!H.disposed&&(H.complete&&H.log("playbackCompleted"),H.dispose(),H.disposed=!0,k(H,F)),he&&he.length&&je)H=he.shift(),Ie[F]=te+(H.isEmpty()?0:1),H.reset(),H.started=!0,H.start();else{var Ce=le.getNextAfterService(F);F!=="midroll"&&Ce&&je?Ce.start(function(){he=le.getSection(F),n()}):le.getSettings(F).loop&&Pe[F]&&Pe[F].length?(he=Pe[F],Pe[F]=[],n()):i(!1,A)}}function r(A){he||(F=A||"preroll",le.resetServices(F),de[F]=!1,he=le.getSection(F),A==="midroll"&&(he=c(he)),n(),F&&(Pe[F]=Pe[F]||[]),H&&(H.log("sectionStarted"),L.debugMode&&console.log(F,H.getAd(),H.getSettings(),he)),o(F),L.stats.metrics("started"))}function o(A){(Le=le.getDebug(A))&&Le.start()}function s(){Le&&Le.dispose(),Le=null}function d(A,G){function te(He,Ue){for(var Xe=0;Xe<He.length&&!(Math.abs(He[Xe])>Ue);Xe++);return Xe>0?[He[Xe-1]]:[]}function je(He){var Ue=He.getAd();return!(Ue.point&&I.indexOf(Ue.point)===-1||Ue.pointP&&$.indexOf(Ue.pointP)===-1)&&(Ue.point&&Ue.point<=Qt||Ue.pointP&&Ue.pointP<=fi)}function Ce(){B=$.reduce(function(He,Ue){var Xe=Math.ceil(G*Ue/100);He.indexOf(Xe)===-1&&He.push(Xe)},I).sort(AdmanHTML.Utils.numSorter)}function qe(He){return B.reduce(function(Ue,Xe){return Ue===0&&Xe>0&&Xe-He>=0?Xe-He:Ue},0)}if(!isNaN(A)&&!isNaN(G)){var Ye=parseInt(A),nt=Math.floor(100*A/G);se=G,Z=$&&isFinite(nt)?te($,nt):[],re=I?te(I,Ye):[],Z[0]&&re[0]&&(Math.abs(Z[0]*se/100)>Math.abs(re[0])?re=[]:Z=[]);var Ke=typeof le=="object"&&typeof le.getSettings=="function"?le.getSettings("midroll").midpointAllowableDelta:void 0;T=Ke??T;var pi=100*T/G,Gt=T!==0&&T<5?T:5,Qt=Ye+Gt,fi=nt+Gt/G*100;if(le.getServices("midroll",function(He){return!(!He.isAfter()||He.started()||!je(He))}).forEach(function(He){var Ue=Ye-He.getAd().point,Xe=nt-He.getAd().pointP;Ue<T||Xe<pi||T===0?He.start():L.debugMode&&console.log("skip midroll fetch")}),Z.length&&Z[0]>0||re.length&&re[0]>0){var Li=!1,Si=le.getSection("midroll");Si&&Si.forEach(function(He){var Ue=He.getAd();(Ue.pointP&&~Z.indexOf(Ue.pointP)||Ue.point&&~re.indexOf(Ue.point))&&(Li=!0)}),Li&&L.cb("adMidrollPoint",[A])}return L.forcePreloadAdditionalData?(Ce(),qe(A)):void 0}}function c(A){function G(je,Ce){var qe=je.getAd(),Ye=Ce.getAd();return(qe.point||qe.pointP*se/100)-(Ye.point||Ye.pointP*se/100)}var te=[];return A&&A.forEach(function(je){var Ce=je.getAd();(Ce.pointP&&~Z.indexOf(Ce.pointP)||Ce.point&&~re.indexOf(Ce.point))&&te.push(je)}),I.forEach(function(je,Ce){~re.indexOf(je)&&(I[Ce]=-I[Ce])}),$.forEach(function(je,Ce){~Z.indexOf(je)&&($[Ce]=-$[Ce])}),te.sort(G),te}function h(){L.cb("onSkipped"),H&&(H.log("closedByUser"),H.skip(n))}function p(){H&&(H.log("playbackPaused"),H.pause())}function a(A){H&&(A||H.log("playbackResumed"),H.resume())}function u(A){A=A<0?0:A>1?1:A,H&&H.setVolume(A)}function m(){H&&H.log("fullscreenOn")}function b(){H&&H.log("fullscreenOff")}function y(){i()}function g(A,G){L.callbacks[A]=G}function D(A){var G=[],te=le.getSection(A||"preroll");return te&&te.forEach(function(je){je.isEmpty()||G.push(je.getExtendedAdForApp())}),G}function N(A){return le.getAfterServices(A||"preroll")}function k(A,G){A.isEmpty()||A.isStat()||Pe[G]&&Pe[G].push(A)}function x(A){return(A.right-A.left)*(A.bottom-A.top)}function S(A,G){return{left:A.left+G.left,right:A.right+G.left,top:A.top+G.top,bottom:A.bottom+G.top}}function w(A){return A&&!isNaN(A)?A:null}function M(A,G){var te=A.document,je=G==="width"?"clientWidth":"clientHeight",Ce=G==="width"?"innerWidth":"innerHeight",qe=A[Ce],Ye=te.body[je],nt=te.documentElement[je],Ke=1/0;return Ke=w(Ye)||Ke,Ke=w(nt)||Ke,qe&&!isNaN(qe)&&(Ke=Math.min(Ke,qe)),Ke}function f(A){return{width:M(A,"width"),height:M(A,"height")}}function W(A,G){var te=f(G);return{left:Math.max(0,A.left),right:Math.min(te.width,A.right),top:Math.max(0,A.top),bottom:Math.min(te.height,A.bottom)}}function _(A,G){try{for(var te=A.getBoundingClientRect(),je=x(te),Ce=G,qe=Ce.parent;Ce!==qe;){var Ye=Ce.frameElement.getBoundingClientRect();te=S(te,Ye);var nt=Math.max(Ye.left,te.left),Ke=Math.min(Ye.right,te.right),pi=Math.max(Ye.top,te.top),Gt=Math.min(Ye.bottom,te.bottom);te.left=nt,te.right=Ke<nt?nt:Ke,te.top=pi,te.bottom=Gt<pi?pi:Gt,Ce=Ce.parent}te=W(te,qe);var Qt=x(te);return{left:te.left,right:te.right,top:te.top,bottom:te.bottom,percent:Qt/je*100}}catch{return{left:0,right:0,top:0,bottom:0,percent:0}}}function C(){return window.hasOwnProperty("IntersectionObserver")}function R(A){try{if(A===A.top)return"ON_PAGE";for(var G=A;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 V(A){return!C(A)&&R(A)!=="XD_FRAME"}function oe(A,G,te){J(te,_(A,window).percent>=100*G)}function O(A){return A.mozVisibilityState?"mozvisibilitychange":A.webkitVisibilityState?"webkitvisibilitychange":A.visibilityState?"visibilitychange":""}function q(A){J(A,!0)}function Y(A){J(A,!1)}function J(A,G){var te=A.getPlayStatus();A.prevVisibility!==G&&(A.prevVisibility=G,te.curStatus!==void 0&&te.curStatus!==te.prevStatus&&(G?A.resume():A.pause()))}function Ae(A){var G=A,te=L.viewabilityValue,je=L.viewabilityEl;if(je){if(C()){var Ce=new IntersectionObserver(function(nt){nt.forEach(function(Ke){J(G,Ke.intersectionRatio>=te)})},{threshold:[.1,.2,.3,.4,.5,.6,.7,.8,.9,1]});Ce.observe(je)}else if(V){var qe=function(){oe(je,te,G)};window.addEventListener("resize",qe,!1),window.addEventListener("scroll",qe,!1)}}var Ye=(O(document),ee.hasFocus());setInterval(function(){var nt=ee.hasFocus();Ye!==nt&&(Ye=nt,Ye?q(G):Y(G))},500)}function X(){return L.playStatus===void 0?{prevStatus:void 0,curStatus:void 0}:L.playStatus}var le,F,he,H,Le,we,se,L={version:"2.2.57",debugMode:!0,callbacks:{},cb:function(A,G){switch(A){case"onCompleted":H&&(H.complete=!0),n();break;case"onError":H&&(H.error=!0),n(G);break;case"onClosed":i(!0);break;default:var te=L.callbacks[A];te&&te.apply(this,G)}}},fe=window.location.protocol==="http:"?"http:":"https:",ae=fe+"//ad.mail.ru/static/admanhtml/vpaid-js-interface.swf",ue=fe+"//ad.mail.ru/static/rbadman-vpaid.html",Re=new AdmanHTML.Stats(L),Me=new AdmanHTML.Viewability,be=[],v=[],I=[],$=[],B=[],Z=[],re=[],Ie={},Pe={},T=3,U=function(){for(var A=window,G=frameElement;G;){try{G=A.parent.frameElement}catch{break}A=A.parent}return A}(),ee=U.document;L.stats=Re,L.viewability=Me,L.protocol=fe,L.stats.metrics();var de={};return{init:t,start:r,stop:y,pause:p,resume:a,setVolume:u,fullscreenOn:m,fullscreenOff:b,setFullscreen:function(A){A?m():b()},skip:h,destroy:y,getPlayStatus:X,getSlot:function(){return L.slotId},setSlot:function(A){L.slotId=A},getVersion:function(){return L.version},getBannersForSection:D,getServicesForSection:N,hasSection:function(A){return A=A||"preroll",!(!D(A).length&&!N(A).length)},setDebug:function(A){L.debugMode=A},setPosition:d,getUserIdQuery:AdmanHTML.Utils.getUserIdQuery,onReady:g.bind(this,"onReady"),onError:g.bind(this,"onError"),onStarted:g.bind(this,"onStarted"),onPaused:g.bind(this,"onPaused"),onPlayed:g.bind(this,"onPlayed"),onCompleted:g.bind(this,"onCompleted"),onClosed:g.bind(this,"onClosed"),onSkipped:g.bind(this,"onSkipped"),onClicked:g.bind(this,"onClicked"),onTimeRemained:g.bind(this,"onTimeRemained"),onDurationChanged:g.bind(this,"onDurationChanged"),adMidrollPoint:g.bind(this,"adMidrollPoint"),_onVPAIDStarted:g.bind(this,"onVPAIDStarted"),research:{pause:function(){we&&we.pause()},resume:function(){we&&we.resume()},complete:function(){we&&we.setComplete()},setVolume:function(A){we&&we.setVolume(A)},setFullscreen:function(A){we&&we.setFullscreen(A)},setPosition:function(A,G){we&&we.setPosition(A,G)}}}},AdmanHTML.Ad=function(e,t){"use strict";function i(x){x&&x.forEach(function(S){n(S.url,S.type,S)})}function n(x,S,w){var M,f,W,_;if(x){try{x=decodeURIComponent(x)}catch{}if(S==="playheadReachedValue")w.thresholdValue!==void 0||w.value!==void 0?(M=parseInt(w.thresholdValue||w.value,10),t.stats.push({name:"thresholdValue",value:M,type:"thresholdValue."+M,url:x})):w.thresholdPValue===void 0&&w.pvalue===void 0||(M=parseInt(w.thresholdPValue||w.pvalue,10),t.stats.push({name:"thresholdPValue",value:M,type:"thresholdPValue."+M,url:x}));else if(S==="playheadViewabilityValue"){var C=parseInt(w.viewablePercent,10),R=w.ovv===void 0&&w.mrc===void 0||!!w.ovv||!!w.mrc,V="";W=w.startTimer!==void 0?parseInt(w.startTimer,10):0,_=w.endTimer!==void 0?parseInt(w.endTimer,10):0,C=isNaN(C)?50:C,w.value!==void 0?(M=parseInt(w.value,10),f="ovvValue"):w.pvalue!==void 0?(M=parseInt(w.pvalue,10),f="ovvPValue"):w.duration!==void 0&&(M=parseInt(w.duration,10),f="mrcValue",R||(V=w.unload?"unload":"complete"));var oe={name:f,value:M,url:x,percent:C,viewable:R,start:W,end:_,onevent:V};"target"in w&&(oe.target=w.target),t.stats.push(oe)}else if(S==="playheadTimerValue"){W=w.startTimer!==void 0?parseInt(w.startTimer,10):0,_=w.endTimer!==void 0?parseInt(w.endTimer,10):0;var O=w.rate!==void 0?parseInt(w.rate,10):1;t.stats.push({name:"timerValue",rate:O,url:x,start:W,end:_})}else t.stats.push({name:S,type:S,url:x})}}function r(x){t.click=x,t.ad&&(t.ad.urlToNavigateOnClick=x)}function o(x,S){t.extensions[x]=S}function s(x,S,w){!w&&x in t.immutables||(t.immutables[x]=S)}function d(x){t.settings=t.settings||{},AdmanHTML.Utils.deepExtend(t.settings,x)}function c(x){function S(_){var C=_.type||"";return!(~C.indexOf("video")&&C!=="video/mp4"||~C.indexOf("audio")&&C!=="audio/mp3"&&C!=="audio/mpeg")}function w(){e.stats.rb(e.stats.code.UNKNOWN_ADV_TYPE),e.stats.logError("UNKNOWN_ADV_TYPE")}if(t.ad=x,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 M;t.ad.mediafiles.forEach(function(_){S(_)&&(!M||Math.abs(parseInt(_.height)-e.quality)<Math.abs(parseInt(M.height)-e.quality))&&(M=_)}),M&&AdmanHTML.Utils.mixin(t.ad,M)}delete t.ad.statistics,delete t.ad.mediafiles;var f,W;switch(t.ad.type){case"swf":case"application/x-shockwave-flash":if(W=t.ad.apiFramework||t.ad.api,e.browser.mobile||W&&W!=="VPAID")return w(),!1;f=W?new AdmanHTML.VpaidSwfAdRenderer(e,this):new AdmanHTML.SwfAdRenderer(e,this);break;case"javascript":case"application/javascript":if((W=t.ad.apiFramework||t.ad.api)&&W!=="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(x,S,w){var M=x.url;M=M.replace("{requesthostname}",e.location.hostnameEncoded||""),AdmanHTML.Utils.loadImg(M);var f=S.indexOf(x);~f&&w&&S.splice(f,1)}function u(x,S){var w=S.indexOf(x);~w&&S.splice(w,1)}function m(x,S){function w(R){R=25*Math.floor(R/25);var V=k["thresholdPValue."+R];V&&(_=_.concat(V))}var M=t.stats.slice(0);if(Array.isArray(x)){var f;for(f=0;f<x.length&&!~M.findIndex(function(R){return R.name===x[f]});f++);x=x[f]||x.slice(-1)}if(!e.isPopupOpen||x!=="playbackPaused"&&x!=="playbackResumed"){var W=x+(S===void 0?"":"."+S),_=k[W]?k[W].slice(0):[];_.push(W),x==="thresholdPValue"&&w(S);var C=x==="thresholdPValue"||x==="thresholdValue"||x==="closedByUser";t.stats.forEach(function(R){(x==="thresholdPValue"&&R.name==="thresholdPValue"&&R.value<S||x==="thresholdValue"&&R.name==="thresholdValue"&&R.value<S)&&a(R,M,C),~_.indexOf(R.type)&&a(R,M,C)}),t.stats=M}}function b(x,S){function w(C,R){R[Math.ceil(C.percent/10)].duration>=1e3*C.value?C.viewable?a(C,f,!0):u(C,f):W++}function M(C){C.viewable||C.onevent===S&&a(C,f,!0)}var f=t.stats.slice(0),W=0,_=x&&x.length?w:M;return t.stats.forEach(function(C){C.name==="mrcValue"&&_(C,x)}),t.stats=f,W}function y(x,S){var w,M,f=t.stats.slice(0);t.stats.forEach(function(W){(W.name==="ovvValue"&&W.value<=x||W.name==="ovvPValue"&&W.value<=S)&&(w=w||e.viewability.getViewabilityState(),M=w.percent>W.percent&&w.focus,w.state!=="UNDETERMINED"&&(M&&W.viewable||!M&&!W.viewable)&&AdmanHTML.Utils.loadImg(W.url),u(W,f))}),t.stats=f}function g(x,S){t.renderer&&t.renderer[x]&&t.renderer[x](S)}function D(){var x={};return x=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(x,t.ad),x}function N(){var x=D();return x.statistics=t.stats.slice(0),x}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:r,addExtension:o,addImmutableProperty:s,addSettings:d,getSettings:function(){return t.settings},addAd:c,getAd:function(){return t.ad},getAdForApp:D,getExtendedAdForApp:N,isEmpty:function(){return t.ad.type==="empty"},isStat:function(){return t.ad.type==="statistics"},clone:h,reset:p,log:m,logMRC:b,logOVV:y,start:g.bind(this,"start"),dispose:g.bind(this,"dispose"),pause:g.bind(this,"pause"),resume:g.bind(this,"resume"),setVolume:g.bind(this,"setVolume"),setFullscreen:g.bind(this,"setFullscreen"),setComplete:g.bind(this,"setComplete"),skip:g.bind(this,"skip"),setPosition:function(x,S){t.renderer&&t.renderer.setPosition&&t.renderer.setPosition(x,S)},complete:!1,error:!1}},AdmanHTML.AdSlot=function(e,t,i){"use strict";function n(_){N||(N={});for(var C in _)_.hasOwnProperty(C)&&(N[C]=_[C])}function r(_,C,R,V,oe,O){function q(J){e.stats.metrics("inited");var Ae={};--x,J&&(S++,J=typeof J=="string"?J.trim():J,typeof J=="object"||J.charAt(0)==="{"?(Ae=d(J,_,C,R||0,V,oe,O),w++):J.charAt(0)==="<"?(Ae=c(J,_,C,R||0,V,oe,O),w++):(e.stats.rb(e.stats.code.UNKNOWN_DATA_FORMAT),e.stats.logError("UNKNOWN_DATA_FORMAT"))),_.id&&(Ae.banners||Ae.services?Ae.banners&&W.markNonEmptyService(_.id):W.markEmptyService(_.id)),o(O)}if(R&&R>4)return void o(O);var Y=W.getService(_.id);Y&&Y.log("serviceRequested"),++x,_.url?(_.url.indexOf("ad.mail.ru/")!==-1&&_.url.indexOf("version="+e.version)===-1&&(_.url+=_.url.indexOf("?")===-1?"?":"&",_.url+="version="+e.version),AdmanHTML.Utils.xhr(_.url,q)):_.data&&setTimeout(q,0,_.data)}function o(_){if(!x){if(S&&w){var C=W.getNextOnEmptyService();if(C)return void C.start(o.bind(null,_));b();var R=_||i;return R.called||(R.called=!0,R()),void(e.debugMode&&console.log(g))}s()}}function s(){var _=e.callbacks.onError;_&&_()}function d(_,C,R,V,oe,O,q){function Y(se){return se?se.filter(function(L){return L.type&&(L.type==="sectionShown"||L.type==="sectionStarted"||L.type==="sectionEmpty")}):[]}function J(se,L,fe,ae){var ue=R?R.clone():new AdmanHTML.Ad(e);if(ue.addStatCollection(se.statistics),ue.addStatCollection(se.serviceStatistics),se.type==="additionalData"){var Re;se.id=se.id||AdmanHTML.Utils.createIntUID(),le.services++;var Me=!g[fe]||g[fe].length===0;if(L>0&&Me&&(f[fe]=!0),se.extensions)for(var be in se.extensions)se.extensions.hasOwnProperty(be)&&h(ue,se.extensions[be],be);if(["point","pointP","hasVolume","hasPause","allowClose","allowCloseDelay","allowSeek","allowSkip","allowTrackChange","allowVolumeChange"].forEach(function($){$ in se&&ue.addImmutableProperty($,se[$])}),e.forcePreloadAdditionalData||se.doAfter!=="true"&&se.doAfter!==!0&&!se.doOnEmptyResponseFromId)Re=new AdmanHTML.ServiceAd(e),a(fe,C.id,Re,se),L===0&&Me?r(se,ue,V+1,fe,M.PRE,q):r(se,ue,V+1,fe,null,q);else{var v=se.doAfter==="true"||se.doAfter===!0?M.POST:null,I=function($,B){r(se,$||ue,se.allowRepeat?0:V+1,fe,v,function(){B&&B()})};Re=new AdmanHTML.ServiceAd(e,null,I),a(fe,C.id,Re,se,ue)}}else p(fe,ae,ue,se),le.banners++;return ue}var Ae,X=_,le={banners:0,services:0};if(typeof _=="string")try{X=JSON.parse(_)}catch{return e.stats.rb(e.stats.code.ERROR_CONVERTING_STRING_TO_JSON),void e.stats.logError("ERROR_CONVERTING_STRING_TO_JSON")}if(X.settings&&X.settings.requestHostname&&!N.requestHostname&&(N.requestHostname=X.settings.requestHostname),X&&X.settings&&(N=e.slot&&e.slot.getRootSettings()||N||{},n&&typeof n=="function")){var F=X.sections&&X.sections.preroll&&X.sections.preroll.length&&X.sections.preroll[0]||null;n({impressionID:X.settings.impressionID||"",padID:X.settings.padID||"",bannerIDs:F&&F.bannerID||""})}for(var he in X.sections)if(X.sections.hasOwnProperty(he)){var H=X.sections[he],Le=0;if(X.settings&&(Ae=X.settings[he])&&(Ae.controlsStyle=X.settings.controlsStyle||0,m(he,Ae)),H.forEach(function(se){if(se.type==="debugData"){var L=new AdmanHTML.Ad(e);return L.addClick(se.url),void u(he,L,se)}var fe=oe===he?O:"",ae=J(se,Le,he,fe);Ae&&(ae.addStatCollection(Y(Ae.statistics)),ae.addSettings(Ae)),Le++}),H.length===0){var we=new AdmanHTML.Ad(e);Ae&&we.addStatCollection(Y(Ae.statistics)),p(he,"",we,{type:"empty"})}}return X.type&&J(X,0,oe,O),le}function c(_,C,R,V,oe,O,q){function Y(H,Le,we){Ae(H.getElementsByTagName(Le),we)}function J(H,Le,we,se){Y(H,Le,function(L){se(le(L),we?X(L,we):null,L)})}function Ae(H,Le){Array.prototype.forEach.call(H,Le.bind(this))}function X(H,Le){var we=H.attributes.getNamedItem(Le);return we?we.value:null}function le(H){return H&&H.childNodes&&H.childNodes[0]&&H.childNodes[0].wholeText?H.childNodes[0].wholeText.trim():null}var F,he={banners:0,services:0};try{F=AdmanHTML.Utils.parseXml(_)}catch{return e.stats.rb(e.stats.code.ERROR_CONVERTING_STRING_TO_XML),void e.stats.logError("ERROR_CONVERTING_STRING_TO_XML")}return Y(F,"Ad",function(H){function Le(L){var fe=R?R.clone():new AdmanHTML.Ad(e);J(H,"Impression","id",function(ue){try{fe.addStat(ue,"playbackStarted")}catch{}}),J(H,"Extension","type",function(ue,Re){h(fe,ue,Re)}),J(H,"Error",null,function(ue){fe.addStat(ue,"error")}),J(L,"Tracking","event",fe.addStat);var ae=L.getElementsByTagName("VideoClicks")[0];return ae&&Ae(ae.childNodes,function(ue){ue.tagName==="ClickThrough"?fe.addClick(le(ue)):ue.tagName==="ClickTracking"&&fe.addStat(le(ue),"click")}),fe}function we(L){var fe={width:X(L,"width"),height:X(L,"height"),id:X(L,"id"),assetWidth:X(L,"assetWidth"),assetHeight:X(L,"assetHeight"),expandedWidth:X(L,"expandedWidth"),expandedHeight:X(L,"expandedHeight"),apiFramework:X(L,"apiFramework"),adSlotID:X(L,"adSlotID"),statistics:[]};return J(L,"StaticResource",null,function(ae){fe.staticResource=ae}),J(L,"HTMLResource",null,function(ae){fe.htmlResource=ae}),J(L,"IFrameResource",null,function(ae){fe.iframeResource=ae}),J(L,"CompanionClickTracking",null,function(ae){fe.statistics.push({type:"click",url:ae})}),J(L,"Tracking","event",function(ae,ue){fe.statistics.push({type:ue,url:ae})}),J(L,"CompanionClickThrough",null,function(ae){fe.urlToNavigateOnClick=ae}),fe}var se=X(H,"id");Y(H,"InLine",function(L){var fe=[];Y(L,"CompanionAds",function(ae){var ue=X(ae,"required")||"none";Y(L,"Companion",function(Re){var Me=we(Re);Me.required=ue,fe.push(Me)})}),Y(L,"Linear",function(ae){var ue,Re=Le(ae),Me=ae.parentNode;Me&&(ue=X(Me,"adId")||X(Me,"adID")||X(Me,"AdId")||X(Me,"AdID")||X(Me,"id")),ue=ue||se;var be={bannerID:ue,mediafiles:[],duration:AdmanHTML.Utils.convertDuration(le(ae.getElementsByTagName("Duration")[0]))};C.urlToNavigateOnClick&&(be.urlToNavigateOnClick=C.urlToNavigateOnClick),Y(ae,"MediaFile",function(v){be.mediafiles.push({apiFramework:X(v,"apiFramework"),type:X(v,"type"),width:X(v,"width"),height:X(v,"height"),src:le(v)})}),Y(ae,"AdParameters",function(v){be.params=le(v);try{var I=JSON.parse(be.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(B){console.log(B)}}),fe.length&&(be.companionAds=fe),p(oe||"preroll",O,Re,be),he.banners++}),Y(L,"NonLinear",function(ae){var ue=Le(ae),Re={width:X(ae,"width"),height:X(ae,"height"),duration:AdmanHTML.Utils.convertDuration(X(ae,"minSuggestedDuration")),mediafiles:[]};J(ae,"NonLinearClickThrough",null,function(Me){ue.addStat(Me,"click")}),J(ae,"StaticResource","creativeType",function(Me,be){Re.mediafiles.push({type:be,src:Me})}),p(oe||"overlay",O,ue,Re),he.banners++})}),Y(H,"VASTAdTagURI",function(L){he.services++,r({url:le(L),id:C.id},Le(H),V+1,oe,O,q)})}),he}function h(_,C,R){R==="controls"?_.addExtension("showControls",!!parseInt(C,10)):R==="skipTime2"?(C=isNaN(C)?AdmanHTML.Utils.convertDuration("00:"+C):parseInt(C,10),_.addExtension("allowCloseDelay",C)):R==="linkTxt"&&(_.addExtension("linkText",C),_.addExtension("adText",C))}function p(_,C,R,V){R.addAd(V)&&(R.sectionType=_,C===M.PRE&&f[_]&&(C=""),_=(C||"")+_,g[_]=g[_]||[],g[_].push(R))}function a(_,C,R,V,oe){R.addAd(V),R.addInheritedAd(oe),R.addStatCollection(V.statistics),R.addStatCollection(V.serviceStatistics),R.sectionType=_,W.addService(R,C)}function u(_,C,R){C.addAd(R)&&(C.section=_,k[_]=C)}function m(_,C){D[_]=D[_]||{},AdmanHTML.Utils.mixin(D[_],C),delete D[_].statistics,delete D[_].view,delete D[_].advertisment}function b(){"preroll midroll pauseroll overlay postroll claimroll".split(" ").forEach(function(_){var C=f[_]?g[_]:g[M.PRE+_],R=f[_]?g[M.PRE+_]:g[_],V=g[M.POST+_];g[_]=[].concat(C||[],R||[],V||[]),y(M.PRE+_),y(M.POST+_)})}function y(_){g[_]=[]}var g={},D={},N={},k={},x=0,S=0,w=0,M={PRE:"pre-",POST:"post-"},f={},W=new AdmanHTML.ServiceStorage(e);return r({url:t.url,data:t.data}),{getSection:function(_){return g[_]},getAfterServices:W.getAfterServices,getNextAfterService:W.getNextAfterService,resetServices:W.resetAll,getServices:W.getServices,removeService:W.removeService,getSettings:function(_){return D[_]||{}},getRootSettings:function(){return N},getDebug:function(_){return k[_]}}},AdmanHTML.ServiceAd=function(e,t,i){"use strict";function n(m){return t.ad=m,!0}function r(m){t.inheritedAd=m}function o(m,b){t.inheritedAd.addImmutableProperty(m,b,!0)}function s(m){var b=m?m.filter(function(y){return y.type==="serviceRequested"||y.type==="serviceAnswerEmpty"}):[];b&&b.forEach(function(y){d(y.url,y.type,y)})}function d(m,b){m=decodeURIComponent(m),t.stats.push({name:b,type:b,url:m})}function c(m){u=!0,i&&i(t.inheritedAd,m)}function h(){u=!1}function p(){return!(e.forcePreloadAdditionalData||!t.ad||!t.ad.doAfter)&&(t.ad.doAfter===!0||t.ad.doAfter==="true")}function a(m){function b(g){AdmanHTML.Utils.loadImg(g.url);var D=y.indexOf(g);~D&&y.splice(D,1)}var y=t.stats.slice(0);t.stats.forEach(function(g){g.type===m&&b(g)}),t.stats=y}t=t||{stats:[]};var u=!1;return{addStatCollection:s,addStat:d,addAd:n,addInheritedAd:r,addImmutableProperty:o,getAd:function(){return t.ad},start:c,reset:h,started:function(){return u},log:a,isAfter:p}},AdmanHTML.ServiceStorage=function(e){"use strict";function t(y,g){var D=y.getAd();m.push(D.id),u[D.id]={service:y},g&&u[g]&&(u[g].children=u[g].children||[],u[g].children.push(D.id)),e.forcePreloadAdditionalData||D.doAfter!=="true"&&D.doAfter!==!0&&!D.doOnEmptyResponseFromId||a.push(y)}function i(y){return u[y]?u[y].service:null}function n(y){var g=typeof y=="string"||typeof y=="number"?y:y.getAd().id;delete u[g];var D,N;for(D=0,N=a.length;D<N;D++)if(y=a[D],y.getAd().id===g){a.splice(D,1);break}}function r(y,g){if(!y)return[];var D,N,k=[];for(D in u)u.hasOwnProperty(D)&&(N=u[D].service,N.sectionType!==y||g&&!g(N)||k.push(N));return k}function o(y){m.forEach(function(g,D){y===g?(u[g].service.log("serviceAnswerEmpty"),m.splice(D,1),b.push(y),delete u[g]):u[g].children&&u[g].children.indexOf(y)!==-1&&u[g].children.splice(u[g].children.indexOf(y),1)})}function s(y){var g=u[y];g&&(g.children=null)}function d(){var y,g,D,N;for(y=0,g=a.length;y<g;y++)if(D=a[y],(N=D.getAd().doOnEmptyResponseFromId)&&b.indexOf(N)!==-1&&!D.isAfter())return a.splice(y,1),D;return null}function c(y){if(!y)return[];var g,D,N,k=[];for(g=0,D=a.length;g<D;g++)N=a[g],N.sectionType===y&&N.isAfter()&&!N.started()&&k.push(N);return k}function h(y){if(!y)return null;var g,D,N,k;for(g=0,D=a.length;g<D;g++)if(N=a[g],N.sectionType===y&&N.isAfter()&&!N.started()){if((k=N.getAd().doOnEmptyResponseFromId)&&b.indexOf(k)===-1)continue;return N.getAd().allowRepeat||a.splice(g,1),N}return null}function p(y){var g,D,N;for(g=0,D=a.length;g<D;g++)N=a[g],y&&N.sectionType!==y||N.reset()}var a=[],u={},m=[],b=[];return{addService:t,getService:i,getServices:r,removeService:n,resetAll:p,markEmptyService:o,markNonEmptyService:s,getAfterServices:c,getNextAfterService:h,getNextOnEmptyService:d}},typeof define=="function"&&define.amd&&define(function(){"use strict";return AdmanHTML}),AdmanHTML.VpaidLoader=function(){"use strict";function e(i,n){this.id=Math.round(1e6*Math.random()),this.video=i,this.videoIsElement=AdmanHTML.Utils.isElement(this.video),this._props={},this.autoMuted=!1,this.win=n||window}var t=300;return e.prototype.load=function(i,n){var r=document.createElement("iframe");return this.adframe=r,this.src=i,r.width="100%",r.height="100%",r.scrolling="no",r.marginWidth="0",r.marginHeight="0",r.frameBorder="0",r.src=n,r.id="ad-frame-"+this.id,r.setAttribute("allow","autoplay"),r.onload=function(){this.src.indexOf("yandex.ru")!==-1&&this.send({type:"vpaid",method:"log"}),this.send({type:"vpaid",method:"load",src:this.src,urlToNavigateOnClick:this.urlToNavigateOnClick})}.bind(this),this.processMessage=this.processMessage.bind(this),this.videoEventHandler=this.videoEventHandler.bind(this),this.videoEvents=["play","pause","volumechange","timeupdate","ended"],this.video.addEventListener("play",this.videoEventHandler),this.video.addEventListener("pause",this.videoEventHandler),this.video.addEventListener("volumechange",this.videoEventHandler),this.video.addEventListener("timeupdate",this.videoEventHandler),this.video.addEventListener("ended",this.videoEventHandler),this.win.addEventListener("message",this.processMessage),r.setAttribute("style","color-scheme: light;"),r},e.prototype.processMessage=function(i){if(i.source===this.adframe.contentWindow)try{var n=JSON.parse(i.data);switch(this.urlToNavigateOnClick&&(n.urlToNavigateOnClick=this.urlToNavigateOnClick),n.type){case"video":this.videoMessageHandler(n);break;case"vpaid":this.vpaidMessageHandler(n)}}catch{}},e.prototype.videoMessageHandler=function(i){switch(i.src&&i.src.replace(/https?:/,"")!==this.video.src.replace(/https?:/,"")&&(this.video.src=i.src),i.method){case"load":this.video.load();break;case"play":var n=this.video.play();n.then&&n.then(function(){this.video.muted&&!this.autoMutedTS&&(this.autoMutedTS=new Date().getTime())}.bind(this),function(){this.autoMuted=!0,this.autoMutedTS=new Date().getTime(),this.video.muted=!0,this.video.volume=0,this.videoEventHandler({type:"volumechange"}),this.callSet("adVolume",0),this.video.play()}.bind(this));break;case"pause":this.video.pause();break;case"muted":if(!i.value&&this.video.muted&&this.autoMutedTS&&new Date().getTime()-this.autoMutedTS<t)return;this.mutedByVPAID=i.value,this.video.muted=i.value;break;case"volume":i.value&&this.video.muted&&!this.mutedByVPAID?!this.autoMutedTS||new Date().getTime()-this.autoMutedTS>t?(this.video.muted=!1,this.video.volume=i.value):this.callSet("adVolume",0):(this.video.volume=i.value,i.value===0&&(this.video.muted=!0));break;case"styles":AdmanHTML.Utils.setStyle(this.video,i.styles);break;case"addEventListener":this.videoEvents=this.videoEvents||[],this.videoEvents.push(i.eventType),this.video.addEventListener(i.eventType,this.videoEventHandler)}},e.prototype.videoEventHandler=function(i){this.send({type:"video",method:"emit",eventType:i.type,currentTime:this.video.currentTime,duration:this.video.duration,volume:this.video.volume,muted:this.video.muted}),this.videoIsElement&&(i.type==="play"?this.onVpaidCallback("video:play"):i.type==="pause"&&this.video.currentTime>0&&this.video.currentTime<.99*this.video.duration&&this.onVpaidCallback("video:pause"))},e.prototype.vpaidMessageHandler=function(i){AdmanHTML.Utils.mixin(this._props,i.props),typeof this.onVpaidCallback=="function"&&this.onVpaidCallback(i.eventType,i.props)},e.prototype.call=function(i,n){var r={type:"vpaid",method:i};if(n&&(r.params=n),this.send(r),i in this._props)return this._props[i]},e.prototype.callGet=function(i){return this._props[i]},e.prototype.callSet=function(i,n){return i="set"+i.charAt(0).toUpperCase()+i.slice(1),this.call(i,[n])},e.prototype.send=function(i){this.adframe&&(i.id=this.id,this.adframe.contentWindow&&this.adframe.contentWindow.postMessage(JSON.stringify(i),"*"))},e.prototype.onVpaidEvent=function(i){this.onVpaidCallback=i},e.prototype.destroy=function(){if(this.adframe&&this.adframe.parentNode&&this.adframe.parentNode.removeChild(this.adframe),this.videoEvents&&this.videoEvents.length)for(var i=0,n=this.videoEvents.length;i<n;i++)this.video.removeEventListener(this.videoEvents[i],this.videoEventHandler);this.video.pause(),this.video.src="",this.autoMuted&&(this.video.muted=!1),this.adframe=null,this.win.removeEventListener("message",this.processMessage),this.win=null},e}(),AdmanHTML.Constants=function(){"use strict";return{AD_ACTIONS_DEFAULT_CONFIG:{members:["disclaimer","timer","adchoice"],positionX:"left",positionY:"top",offsetX:"6px",offsetY:"6px",disclaimerText:"Реклама",headerText:"Рекламное объявление",aboutText:"О рекламодателе",copyText:"Скопировать ID"}}}(),AdmanHTML.Stats=function(e){"use strict";function t(k){if(u){var x=b[k];x&&s("https://r.mail.ru/d"+x+".gif?rnd="+Math.random())}else m.push(k)}function i(k,x){if(!n()){if(k)try{Object.defineProperty(y,k,{writable:!1,enumerable:!0,value:x||Date.now()-c})}catch{}else y.sessionId=AdmanHTML.Utils._genSessionId();c=Date.now(),Object.keys(b).length&&s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&metrics="+encodeURIComponent(JSON.stringify(y))+"&slot="+(h==="slot"?e.slotId:"json"))}}function n(){return["media_error_code","vpaid_error_message","skipped","completed"].some(function(k){return y.hasOwnProperty(k)})}function r(k,x,S){var w=[];if(S)for(var M in S)S.hasOwnProperty(M)&&w.push(M+"="+String(S[M]));var f="";w.length&&(f="&"+w.join("&")),N||s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&"+k+"="+encodeURI(x)+"&slot="+(h==="slot"?e.slotId:"json")+f),e.debugMode&&console&&console.log&&(console.log("MESSAGE: "+k+" = "+x),S&&console.log("MESSAGE EXTRA PARAMS: "+JSON.stringify(S)))}function o(k,x){var S=[];if(x)for(var w in x)x.hasOwnProperty(w)&&S.push(w+"="+String(x[w]));var M="";S.length&&(M="&"+S.join("&")),N||s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&error="+encodeURI(k)+"&slot="+(h==="slot"?e.slotId:"json")+M),e.debugMode&&console&&console.warn&&console.warn("Error: "+k)}function s(k){AdmanHTML.Utils.loadImg(k)}function d(k){if(!a){var x="https://ad.mail.ru/vp/"+p+"?original="+(k.slot||"")+"&version="+k.version;a=!0,N?(console.log(x),u=!0):AdmanHTML.Utils.xhr(x,function(S){if(u=!0,S){if(typeof S=="string")try{b=JSON.parse(S.trim())}catch{}else typeof S=="object"&&(b=S);var w=m.slice();m=[],w.forEach(t)}})}}var c,h="slot",p=3107,a=!1,u=!1,m=[],b={},y={},g=AdmanHTML.Utils.getPageLocation(),D=AdmanHTML.Utils.getHostname(g||""),N=D.indexOf("localhost")!==-1;return{rb:t,logError:o,logMessage:r,simple:s,metrics:i,initMode:function(k,x){h=k,k==="slot"&&d(x)},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,u=s[h];if(!u){for(a=0;a<d.length;a++)if(u=d[a]===""?h:e(d[a]+"-"+h),c[u]!==void 0){s[h]=u;break}}c[u]=p}function i(c){return parseInt(c)+"px"}function n(c,h){function p(a,u){return a=parseInt(a,16),u=u||1,"rgba("+(a>>16&255)+","+(a>>8&255)+","+(255&a)+","+u+")"}return Array.isArray(c)?"linear-gradient("+c.map(function(a){return p(a,h)}).join(", ")+")":p(c,h)}function r(c,h,p){var a=c.style;(p||Object.keys(h)).forEach(function(u){h.hasOwnProperty(u)&&o(a,u,h[u],h)})}function o(c,h,p,a){var u,m,b;switch(h){case"fontFace":u="fontFamily",m=p;break;case"hasBackground":p||(u="background",m="none",delete a.backgroundColor);break;case"backgroundColor":u="background",m=n(p,a.backgroundAlpha);break;case"cornerRounding":case"borderCornerRounding":u="borderRadius",m=i(Math.floor(p/2));break;case"headerColor":case"bodyColor":case"hyperlinkColor":case"textColor":u="color",m=n(p);break;case"headerSize":case"bodySize":case"hyperlinkSize":case"textSize":u="fontSize",m=i(p);break;case"headerUnderline":case"bodyUnderline":case"hyperlinkUnderline":case"textUnderline":u="text-decoration",m=p?"underline":"none",b="";break;case"headerUnderlineOnRollOver":u="text-decoration",m=p?"":"none",b=p?"":"important";break;case"headerBold":case"bodyBold":case"hyperlinkBold":case"textBold":u="fontWeight",m=p?"bold":"normal";break;case"headerIndent":case"bodyIndent":case"hyperlinkIndent":u="marginTop",m=i(p);break;case"bodyPaddingRight":u="marginRight",m=i(p);break;case"width":case"height":u=h,m=i(p);break;case"contentPadding":case"contentIndent":case"controlsSafeArea":u="padding",m=i(p);break;case"maxImageWidth":case"maxImageHeight":u=h==="maxImageWidth"?"maxWidth":"maxHeight",m=i(p);break;case"borderSize":u="borderWidth",m=i(p);break;case"borderColor":u="borderColor",m=n(p,a.borderAlpha);break;case"paddingLeft":case"paddingTop":u=h==="paddingLeft"?"left":"top",m=i(p);break;case"controlsPaddingTop":case"controlsPaddingRight":u=h==="controlsPaddingRight"?"right":"top",m=i(p)}u&&m&&(b!==void 0?c.setProperty(u,m,b):t(c,u,m))}var s={},d=["","webkit","Moz","O","ms"];return{applyStyle:r,getLength:i}}(),AdmanHTML.Utils=function(){"use strict";function e(){return se||(se=function(){try{if(window===window.top)return L;for(var v=window;v!==v.parent;){if(v.document.domain!==v.parent.document.domain)return ae;v=v.parent}return fe}catch{}return ae}())}function t(){if(ue!==null)return ue;var v=window;try{for(;v.parent!==v&&v.document.domain===v.parent.document.domain;)v=v.parent}catch{}return ue=v,v}function i(){var v=window,I="",$=t();try{I=v.top.location.href}catch{if($&&$.parent===v.top&&(I=$.document.referrer),!I){var B=v.location.ancestorOrigins;B&&B.length&&(I=B[B.length-1])}}return I||(I=($||window).document.referrer),I}function n(){return be.major?Me:Re}function r(v){v(n())}function o(v,I){I&&v.addEventListener("load",I,!1);var $=document.getElementsByTagName("head");if($&&$.length){var B=$[0];B&&B.appendChild(v)}}function s(v,I,$){var B=document.getElementById(I);if(B&&B.parentNode){if(!$)return;B.parentNode.removeChild(B)}B=document.createElement("style"),B.type="text/css",B.id=I,B.innerHTML=v,o(B)}function d(v){var I=document.querySelector("link[href*='"+v+"']");I||(I=document.createElement("link"),I.type="text/css",I.rel="stylesheet",I.href=v,o(I))}function c(v){var I=document.querySelector("script[src*='"+v+"']");I||(I=document.createElement("script"),I.setAttribute("type","text/javascript"),I.setAttribute("charset","utf8"),I.setAttribute("src",v),o(I))}function h(v,I){var $=AdmanHTML.Utils.getPageLocation();if(AdmanHTML.Utils.getHostname($||"").indexOf("localhost")===-1){var B=new Image;B.onload=function(){I&&I(B)},B.src=v}else console.log(v)}function p(v,I,$,B,Z){B=B||"GET";var re=new XMLHttpRequest;return re.open(B,v,!0),re.withCredentials=!Z,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(){Z?I():p(v,I,$,B,!0)}),re}function a(v,I,$,B,Z){Z===void 0&&(Z=!0);var re=I*$<v*B;Z&&(re=!re);var Ie=re?B/I:$/v,Pe=Math.floor(v*Ie),T=Math.floor(I*Ie);return{x:Math.floor(($-Pe)/2),y:Math.floor((B-T)/2),width:Math.floor(Pe),height:Math.floor(T)}}function u(v){return typeof v=="object"&&!!v&&!Array.isArray(v)}function m(v){var I;for(I in v)return!1;return!0}function b(v,I){if(!v)return null;if(I){var $;for($ in I)Object.prototype.hasOwnProperty.call(I,$)&&(v[$]=I[$])}return v}function y(v,I){if(I){var $,B;for($ in I)Object.prototype.hasOwnProperty.call(I,$)&&(B=I[$],u(B)?(v[$]=v[$]||{},v[$]=y(v[$],B)):v[$]=B)}return v}function g(v,I,$){return v=v||0,I=I||0,$=$||1,Math.min($,Math.max(I,v))}function D(v,I){return v-I}function N(){return Math.floor(Math.random()*Math.pow(2,48)).toString()}function k(v){v=v.split("+").join(" ");for(var I,$={},B=/[?&]?([^=]+)=([^&]*)/g;I=B.exec(v);)$[decodeURIComponent(I[1])]=decodeURIComponent(I[2]);return $}function x(v,I){var $;document.createEvent?($=document.createEvent("HTMLEvents"),$.initEvent(I,!0,!0)):($=document.createEventObject(),$.eventType=I),$.eventName=I,document.createEvent?v.dispatchEvent($):v.fireEvent("on"+$.eventType,$)}function S(v){return v?v.substring(v.indexOf("//")+2,v.indexOf("/?")):""}function w(v){var I=document.createElement("a");return I.href=v,I.hostname}function M(v){return v.replace(/^(www[0-9]?\.)?/,"")}function f(v,I,$){if(!v||!I)return!0;if(v=M(v),I=M(I),!($&&$.URL&&Array.prototype.includes))return new RegExp("^"+I.replace(/^(\*\.?)/,"([^/]*.)?").replace(/\./g,"\\.")+"$").test(v);try{v=new URL(v);try{return I=new URL(I),v.host.includes(I.host)}catch{return v.host.includes(I)}}catch{return v.includes(I)}}function W(v){var I=v.button,$=v.which;return $||I===void 0?$:1&I?1:2&I?3:4&I?2:0}function _(v){return W(v)===1}function C(v,I){return I=I||document.body,v!==I&&I.contains(v)}function R(v){return v&&v.nodeType===1}function V(v){var I=v.ownerDocument;return I.defaultView||I.parentWindow}function oe(v){v.preventDefault()}function O(v){var I;if(window.DOMParser)I=new DOMParser().parseFromString(v,"text/xml");else{if(!window.ActiveXObject)return;I=new window.ActiveXObject("Microsoft.XMLDOM"),I.async=!1,I.loadXML(v)}return I.documentElement}function q(v){if(v){var I=v.split(":");if(I.length===3){var $=parseInt(I[0],10),B=parseInt(I[1],10),Z=I[2].split("."),re=parseInt(Z[0],10),Ie=0;if(Z.length===2&&(Ie=parseInt(Z[1],10)),!(isNaN($)||isNaN(B)||isNaN(re)||isNaN(Ie)))return 3600*$+60*B+re+Ie/1e3}}return NaN}function Y(v,I){var $,B=v;for($ in I)I.hasOwnProperty($)&&(B=B.replace("{{"+$+"}}",I[$]));return B}function J(v,I){if(I=I||0,window.Worker&&window.Blob){var $,B=new Blob(['var timeout; onmessage = function(e) {clearTimeout(timeout); if (e.data === "start") {timeout = setTimeout(function() { postMessage({}); }, '+I+");}}"]);try{$=new Worker(window.URL.createObjectURL(B)),$.onmessage=function(){$.terminate(),v()},$.postMessage("start")}catch{return setTimeout(v,I)}return $}return setTimeout(v,I)}function Ae(){function v(Ie){var Pe={};try{var T=window[Ie].getItem("rb_sync_id");T&&typeof(Pe=JSON.parse(T))!="object"&&(Pe={})}catch{}return Pe}var I=[],$=v("localStorage"),B=v("sessionStorage"),Z=b($,B);for(var re in Z)Z.hasOwnProperty(re)&&I.push(re+"="+encodeURIComponent(Z[re]));return I.join("&")}function X(v){return/nr-vpaid(\.min)?\.js/.test(v)}function le(v,I){v&&v.style&&F(v,I,!0)}function F(v,I,$){$=$||!1;var B=$?function(Z,re){v.style.setProperty(Z,re,"important")}:function(Z,re){v.style.setProperty(Z,re)};Object.getOwnPropertyNames(I).forEach(function(Z){B(Z,I[Z])})}function he(){function v(Pe,T){return function(){return Pe.apply(T,arguments)}}function I(Pe){var T=Pe.toString(16);return T.length===1?"0"+T:T}function $(Pe,T,U){for(var ee="",de=T;de<=U;de++)ee+=I(Pe[de]);return ee}var B="undefined",Z=typeof crypto!==B&&crypto.getRandomValues&&v(crypto.getRandomValues,crypto)||typeof msCrypto!==B&&window.msCrypto.getRandomValues&&v(window.msCrypto.getRandomValues,window.msCrypto),re=function(){if(Z){var Pe=new Uint8Array(16);return function(){return Z(Pe),Pe}}var T=new Array(16);return function(){for(var U,ee=0;ee<16;ee++)(3&ee)==0&&(U=4294967296*Math.random()),T[ee]=U>>>((3&ee)<<3)&255;return T}}(),Ie=re();return Ie[6]=15&Ie[6]|64,Ie[8]=63&Ie[8]|128,$(Ie,0,3)+"-"+$(Ie,4,5)+"-"+$(Ie,6,7)+"-"+$(Ie,8,9)+"-"+$(Ie,10,15)}function H(v,I){var $=AdmanHTML.Constants.AD_ACTIONS_DEFAULT_CONFIG,B=[I,v].reduce(function(Z,re){return re&&Object.keys($).forEach(function(Ie){Z[Ie]!==re[Ie]&&(Z[Ie]=re[Ie]?re[Ie]:Z[Ie]),typeof re.members=="object"&&(Z.members=re.members)}),Z},Object.assign({},$));return Le(B)?B:$}function Le(v){return!!Array.isArray(v.members)&&(v.members.forEach(function(I){if(["adchoice","disclaimer","timer"].indexOf(I)===-1)return!1}),typeof v.positionX=="string"&&["left","right"].indexOf(v.positionX)!==-1&&typeof v.positionY=="string"&&["top","bottom"].indexOf(v.positionY)!==-1&&typeof v.offsetX=="string"&&typeof v.offsetY=="string"&&!(typeof v.disclaimerText!="string"||!v.disclaimerText.length)&&!(typeof v.headerText!="string"||!v.headerText.length)&&!(typeof v.aboutText!="string"||!v.aboutText.length)&&!(typeof v.copyText!="string"||!v.copyText.length))}function we(v){v=v||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)}(v),I}var se,L=1,fe=2,ae=3,ue=null,Re=0,Me=1,be=function(){var v="undefined",I="Shockwave Flash",$="application/x-shockwave-flash",B={major:0,minor:0,release:0},Z=null;if(typeof navigator.plugins!==v&&typeof navigator.plugins[I]=="object")(Z=navigator.plugins[I].description)&&typeof navigator.mimeTypes!==v&&navigator.mimeTypes[$]&&navigator.mimeTypes[$].enabledPlugin&&(Z=Z.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),B.major=parseInt(Z.replace(/^(.*)\..*$/,"$1"),10),B.minor=parseInt(Z.replace(/^.*\.(.*)\s.*$/,"$1"),10),B.release=/[a-zA-Z]/.test(Z)?parseInt(Z.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof window.ActiveXObject!==v)try{var re=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash");re&&(Z=re.GetVariable("$version"))&&(Z=Z.split(" ")[1].split(","),B.major=parseInt(Z[0],10),B.minor=parseInt(Z[1],10),B.release=parseInt(Z[2],10))}catch{}return B}();return{setStyle:le,isNRVpaid:X,addCss:s,loadCss:d,loadJs:c,loadImg:h,xhr:p,scaleBySide:a,isEmptyObject:m,mixin:b,deepExtend:y,validateMinMax:g,numSorter:D,createIntUID:N,getQueryParams:k,triggerEvent:x,getUserIdQuery:Ae,getPageLocation:i,getDomain:S,getHostname:w,_genSessionId:he,matchHostname:f,isLeftButtonPressed:_,isElementInDocument:C,isElement:R,getElementViewport:V,preventDefault:oe,parseXml:O,convertDuration:q,renderTemplate:Y,setTimeout:J,checkFlash:n,checkFlashAsync:r,FLASH_READY:Me,FLASH_MISSING:Re,getServingType:e,servingTypes:{ON_PAGE:L,S_FRAME:fe,XD_FRAME:ae},adActionsConfigPrepare:H,isMobile:we}}(),AdmanHTML.Viewability=function(){"use strict";function e(O,q,Y){return O.forEach(function(J){J.duration=q.focus&&q.percent>=J.threshold?J.duration+Y:0}),O}function t(O){O.forEach(function(q){q.duration=0})}function i(O){return new window.IntersectionObserver(function(q){q&&q.length&&q[0].intersectionRatio!==void 0&&(O(q[0].intersectionRatio),!C&&(q[0].intersectionRatio>0||q[0].isIntersecting)&&(C=!0,g.log("viewin")))},{threshold:V})}function n(){return f?!document[f]:w===M.XD_FRAME||!window.top.document.hasFocus||window.top.document.hasFocus()}function r(){var O=o();if(O.state!=="UNDETERMINED")return e(oe,O,x),g&&(g.logMRC(oe)||y()),O}function o(){var O,q,Y=n();return S?(O=R,q="DETERMINED"):w!==M.XD_FRAME?(O=s(D).percent,q="DETERMINED"):(O=0,q="UNDETERMINED"),{percent:O,focus:Y,state:q,viewinOccured:C}}function s(O,q){try{var Y=O.getBoundingClientRect(),J=d(Y),Ae=AdmanHTML.Utils.getElementViewport(O)||window;for(q=q||window.top;Ae!==q;){var X=Ae.frameElement.getBoundingClientRect();Y=c(Y,X),Y.left=Math.max(X.left,Y.left),Y.right=Math.min(X.right,Y.right),Y.top=Math.max(X.top,Y.top),Y.bottom=Math.min(X.bottom,Y.bottom),Y.right<Y.left&&(Y.right=Y.left),Y.bottom<Y.top&&(Y.bottom=Y.top),Ae=Ae.parent}Y=h(Y,q);var le=d(Y);return Y.percent=le/J*100,Y}catch{return{left:0,right:0,top:0,bottom:0,percent:0}}}function d(O){return(O.right-O.left)*(O.bottom-O.top)}function c(O,q){return{left:O.left+q.left,right:O.right+q.left,top:O.top+q.top,bottom:O.bottom+q.top}}function h(O,q){var Y={},J=p(q);return Y.left=Math.max(0,O.left),Y.right=Math.min(J.width,O.right),Y.top=Math.max(0,O.top),Y.bottom=Math.min(J.height,O.bottom),Y}function p(O){var q={width:1/0,height:1/0};return!isNaN(O.document.body.clientWidth)&&O.document.body.clientWidth>0&&(q.width=O.document.body.clientWidth),!isNaN(O.document.body.clientHeight)&&O.document.body.clientHeight>0&&(q.height=O.document.body.clientHeight),O.document.documentElement&&O.document.documentElement.clientWidth&&!isNaN(O.document.documentElement.clientWidth)&&(q.width=O.document.documentElement.clientWidth),O.document.documentElement&&O.document.documentElement.clientHeight&&!isNaN(O.document.documentElement.clientHeight)&&(q.height=O.document.documentElement.clientHeight),O.innerWidth&&!isNaN(O.innerWidth)&&(q.width=Math.min(q.width,O.innerWidth)),O.innerHeight&&!isNaN(O.innerHeight)&&(q.height=Math.min(q.height,O.innerHeight)),q}function a(O,q,Y){if(g=q,_=!Y,D=O,S)k=k||i(function(J){R=100*J}),k.observe(O);else if(w===M.XD_FRAME)return W=!1,void g.log("viewabilityUnmeasurable");Y||(N=setInterval(r,x)),W=!0,g.log("viewabilityMeasurable"),window.addEventListener("unload",u)}function u(){b("unload")}function m(){N||(N=setInterval(r,x))}function b(O){W&&g&&_&&g.logMRC([],O||"complete"),g=null,W=!1,_=!1,D=null,clearInterval(N),N=void 0,t(oe),k&&k.disconnect(),window.removeEventListener("unload",u)}function y(){N&&(clearInterval(N),N=void 0,t(oe))}var g,D,N,k,x=255,S=!!window.IntersectionObserver,w=AdmanHTML.Utils.getServingType(),M=AdmanHTML.Utils.servingTypes,f=function(){for(var O=["h","webkitH","mozH","msH","oH"],q=0;q<O.length;q++)if(document[O[q]+"idden"]!==void 0)return O[q]+"idden";return""}(),W=!1,_=!1,C=!1,R=0,V=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],oe=[];return V.forEach(function(O){oe.push({threshold:Math.round(100*O),duration:0})}),{start:a,pause:y,resume:m,stop:b,getViewabilityState:o}},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 r(){e.viewability.stop(),window.removeEventListener("resize",m),k.clickEl&&k.clickEl.removeEventListener("click",k.onClick),clearTimeout(y),AdmanHTML.Utils.isElement(k.mainEl)&&N&&k.mainEl.parentNode&&k.mainEl.parentNode.removeChild(k.mainEl)}function o(){if(!x&&(x=!0,clearTimeout(y),g)){var w=Date.now()-g;D=1e3*S.duration-w}}function s(){x&&(x=!1,d())}function d(){g=Date.now();var w=D||1e3*S.duration;y=setTimeout(function(){r(),e.cb("onCompleted")},w)}function c(){S.urlToNavigateOnClick&&(S.openLinkInPopup?e.openPopup(S.urlToNavigateOnClick||S.trackingLink):window.open(S.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,M){var f=parseInt(w/M*100);e.cb("onTimeRemained",[{remained:M-w,percent:f,duration:M,currentTime:w}]),w=parseInt(w),t.log("thresholdPValue",f),t.log("thresholdValue",w),t.logOVV(w,f)}function a(w,M){typeof w!="string"&&w?k.mainEl.appendChild(w):k.mainEl.innerHTML=w,AdmanHTML.Utils.mixin(k.mainEl.style,M)}function u(w){k.wrapperEl=w}function m(){k.onResize(k.mainEl.offsetWidth,k.mainEl.offsetHeight)}function b(){}var y,g,D,N,k={},x=!1,S=t.getAd();return k={start:i,pause:o,resume:s,skip:n,dispose:r,onClick:c,onStart:h,registerTimer:d,setView:a,setWrapper:u,onTimeRemained:p,onResize:b}},AdmanHTML.AudioAdRenderer=function(e,t){"use strict";function i(){s.mainEl=e.audioEl||document.createElement("audio"),d.forEach(function(c){s.mainEl.addEventListener(c,r)}),e.audioEl||s.setView(null,{position:"absolute",width:"1px",height:"1px",top:"-10000px",left:"-10000px"}),o=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(),d.forEach(function(c){s.mainEl.removeEventListener(c,r)})}function r(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)&&o&&Math.abs(o-h)>1&&(h=o,p=Math.min(p,h)),s.onTimeRemained(p,h);break;case"ended":e.cb("onCompleted");break;case"error":e.cb("onError")}}var o,s=new AdmanHTML.AdRenderer(e,t),d=["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(b){b.propertyName==="transform"&&b.target===a&&m.moveWithControls()}function r(){u.start(),p=t.getAd(),h=t.getSettings(),a=document.querySelector("div.videoplayer_controls");var b=AdmanHTML.Utils.adActionsConfigPrepare(p?p.adActionsConfig:null,h?h.adActionsConfig:null);if(!p.ctaWebEnabled||b.positionY==="bottom"&&b.positionX==="left")return void(d=Function.prototype);m.setText(p.ctaText),m.setStyles(),c=o(),m.setCustomStyles(c),m.addListeners(),m.appendTo(e.wrapper),d=function(){m.destroy()},a&&a.addEventListener("transitionstart",n)}function o(){return[e,p,h].reduce(function(b,y){return Object.keys(b).length||typeof y.ctaStyles!="object"?b:y.ctaStyles},{})}function s(){a&&a.removeEventListener("transitionstart",n),d&&d(),u.dispose()}if(!e.callToActionButton)return{render:Function.prototype,dispose:Function.prototype};var d,c,h,p,a,u=new AdmanHTML.AdRenderer(e,t);i.prototype._setStyles=function(b,y){AdmanHTML.Utils.setStyle(b,y)},i.prototype.setStyles=function(){this._setStyles(this.ctaButtonEl,{position:"absolute","font-family":"Roboto","font-style":"normal","font-weight":"500","font-size":"14px","line-height":"18px",transition:"background-color .15s ease-out,opacity .15s ease-out, transform 250ms cubic-bezier(0.455, 0.03, 0.515, 0.955)",border:"0.5px solid "+this.background,"box-shadow":this.boxShadow,height:"36px",cursor:"pointer",display:"flex","flex-direction":"row","align-items":"center",padding:"0px 20px",gap:"8px",background:this.background,"border-radius":"8px",color:"#FFF",bottom:a?"20px":"16%",left:"20px"})},i.prototype.setCustomStyles=function(b){b.background&&(this.background=b.background),this._setStyles(this.ctaButtonEl,b)},i.prototype.setText=function(b){this.ctaButtonTextEl.innerText=b&&typeof b=="string"?b:"Перейти"},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 b=p.ctaLink||p.urlToNavigateOnClick;p.openLinkInPopup?e.openPopup(b||p.trackingLink):window.open(b,"_blank"),t.log(["ctaClick","click"]),e.cb("onClicked")},i.prototype._hoverCTABtnListener=function(b){this._setStyles(this.ctaButtonEl,{background:b?"#1460C9":this.background,"box-shadow":b?"0px 4px 8px 0px #0000000A":this.boxShadow})},i.prototype.appendTo=function(b){b&&(b.appendChild(this.ctaButtonEl),this.isRendered=!0)},i.prototype.moveWithControls=function(){var b=a.classList.contains("hidden");this.ctaButtonEl.style.setProperty("transform","translateY("+(b?"0":"-"+Math.round(a.offsetHeight))+"px)")};var m=new i;return{render:r,dispose:s}},AdmanHTML.CloseBtnRenderer=function(e,t){"use strict";function i(){o.start();var p=t.getSettings(),a=p.controlsStyle||0,u=s[a],m=d[a];m.bg=m.bg||m.width;var b={};for(var y in h)h.hasOwnProperty(y)&&(b[y]=p[y]!==void 0?p[y]:h[y]);if(b.controlsPaddingTop=b.controlsPaddingTop-b.controlsSafeArea,b.controlsPaddingRight=b.controlsPaddingRight-b.controlsSafeArea,o.setView(AdmanHTML.Utils.renderTemplate(c,{img:u,width:m.width,height:m.height,bg:m.bg}),{position:"absolute",cursor:"pointer"}),AdmanHTML.StyleUtils.applyStyle(o.mainEl,b),m.bg!==m.width){var g=m.bg-m.width,D=function(k){k.target.className==="rb-adman_close"&&(k.target.style.backgroundPosition="-"+g+"px 0")},N=function(k){k.target.className==="rb-adman_close"&&(k.target.style.backgroundPosition="0 0")};o.mainEl.addEventListener("mouseover",D),o.mainEl.addEventListener("mouseout",N),r=function(){o.mainEl.removeEventListener("mouseover",D),o.mainEl.removeEventListener("mouseout",N)}}}function n(){r&&r(),o.dispose()}var r,o=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"],d=[{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 o.onClick=function(p){p.stopPropagation(),p.target.className==="rb-adman_close"&&e.cb("onClosed")},{start:i,dispose:n,setWrapper:o.setWrapper}},AdmanHTML.DebugAdRenderer=function(e,t){"use strict";function i(){n.mainEl=document.createElement("span"),n.start(),n.setView("&#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),r=t.getAd();return n.onClick=function(){window.open(r.urlToNavigateOnClick,"_blank")},{start:i,dispose:n.dispose}},AdmanHTML.DisclaimerRenderer=function(e,t){"use strict";function i(a,u,m,b){var y=document.createElement("style");y.appendChild(document.createTextNode(" @font-face { font-family: "+a+"; font-style: normal; font-weight: 300; unicode-range: "+b+"; src: url('"+u+"') format('"+m+"'); } ")),document.head.appendChild(y)}function n(){this.isOpened=!1,this.isSmall=!1,this.appendedTo=null,this._advPageUrlPart="https://ads.vk.com/adv_info?",this.actionsWrapperWidth=175,this.infoOrdIdDescription="",this.closeIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS43MzY0MSAwLjI2MzYwNEMxMC4wODc5IDAuNjE1MDc2IDEwLjA4NzkgMS4xODQ5MiA5LjczNjQxIDEuNTM2NEw2LjI3MyA1TDkuNzM2NDEgOC40NjM2MkMxMC4wNTg2IDguNzg1OCAxMC4wODU0IDkuMjkxNDggOS44MTY5NSA5LjY0NDI0TDkuNzM2NDEgOS43MzY0MUM5LjM4NDk0IDEwLjA4NzkgOC44MTUwOSAxMC4wODc5IDguNDYzNjIgOS43MzY0MUw1IDYuMjczTDEuNTM2NCA5LjczNjQxQzEuMTg0OTIgMTAuMDg3OSAwLjYxNTA3NiAxMC4wODc5IDAuMjYzNjA0IDkuNzM2NDFDLTAuMDg3ODY3OSA5LjM4NDk0IC0wLjA4Nzg2NzkgOC44MTUwOSAwLjI2MzYwNCA4LjQ2MzYyTDMuNzI3IDVMMC4yNjM2MDQgMS41MzY0Qy0wLjA1ODU3ODYgMS4yMTQyMSAtMC4wODU0MjcyIDAuNzA4NTM0IDAuMTgzMDU4IDAuMzU1NzY5TDAuMjYzNjA0IDAuMjYzNjA0QzAuNjE1MDc2IC0wLjA4Nzg2OCAxLjE4NDkyIC0wLjA4Nzg2OCAxLjUzNjQgMC4yNjM2MDRMNSAzLjcyN0w4LjQ2MzYyIDAuMjYzNjA0QzguODE1MDkgLTAuMDg3ODY4IDkuMzg0OTQgLTAuMDg3ODY4IDkuNzM2NDEgMC4yNjM2MDRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjY0Ii8+PC9zdmc+",this.closeIconActiveSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS43MzY0MSAwLjI2MzYwNEMxMC4wODc5IDAuNjE1MDc2IDEwLjA4NzkgMS4xODQ5MiA5LjczNjQxIDEuNTM2NEw2LjI3MyA1TDkuNzM2NDEgOC40NjM2MkMxMC4wNTg2IDguNzg1OCAxMC4wODU0IDkuMjkxNDggOS44MTY5NSA5LjY0NDI0TDkuNzM2NDEgOS43MzY0MUM5LjM4NDk0IDEwLjA4NzkgOC44MTUwOSAxMC4wODc5IDguNDYzNjIgOS43MzY0MUw1IDYuMjczTDEuNTM2NCA5LjczNjQxQzEuMTg0OTIgMTAuMDg3OSAwLjYxNTA3NiAxMC4wODc5IDAuMjYzNjA0IDkuNzM2NDFDLTAuMDg3ODY3OSA5LjM4NDk0IC0wLjA4Nzg2NzkgOC44MTUwOSAwLjI2MzYwNCA4LjQ2MzYyTDMuNzI3IDVMMC4yNjM2MDQgMS41MzY0Qy0wLjA1ODU3ODYgMS4yMTQyMSAtMC4wODU0MjcyIDAuNzA4NTM0IDAuMTgzMDU4IDAuMzU1NzY5TDAuMjYzNjA0IDAuMjYzNjA0QzAuNjE1MDc2IC0wLjA4Nzg2OCAxLjE4NDkyIC0wLjA4Nzg2OCAxLjUzNjQgMC4yNjM2MDRMNSAzLjcyN0w4LjQ2MzYyIDAuMjYzNjA0QzguODE1MDkgLTAuMDg3ODY4IDkuMzg0OTQgLTAuMDg3ODY4IDkuNzM2NDEgMC4yNjM2MDRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIxLjAwIi8+PC9zdmc+",this.aboutIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNiA2Ljc1QzYgNy4xNjQyMSA2LjMzNTc5IDcuNSA2Ljc1IDcuNUg5LjQzOTM0TDYuMjE5NjcgMTAuNzE5N0M1LjkyNjc4IDExLjAxMjYgNS45MjY3OCAxMS40ODc0IDYuMjE5NjcgMTEuNzgwM0M2LjUxMjU2IDEyLjA3MzIgNi45ODc0NCAxMi4wNzMyIDcuMjgwMzMgMTEuNzgwM0wxMC41IDguNTYwNjZWMTEuMjVDMTAuNSAxMS42NjQyIDEwLjgzNTggMTIgMTEuMjUgMTJDMTEuNjY0MiAxMiAxMiAxMS42NjQyIDEyIDExLjI1VjYuNzVDMTIgNi4zMzU3OSAxMS42NjQyIDYgMTEuMjUgNkg2Ljc1QzYuMzM1NzkgNiA2IDYuMzM1NzkgNiA2Ljc1WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42NCIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTkgMTcuNUMxMy42OTQ0IDE3LjUgMTcuNSAxMy42OTQ0IDE3LjUgOUMxNy41IDQuMzA1NTggMTMuNjk0NCAwLjUgOSAwLjVDNC4zMDU1OCAwLjUgMC41IDQuMzA1NTggMC41IDlDMC41IDEzLjY5NDQgNC4zMDU1OCAxNy41IDkgMTcuNVpNMTYgOUMxNiAxMi44NjYgMTIuODY2IDE2IDkgMTZDNS4xMzQwMSAxNiAyIDEyLjg2NiAyIDlDMiA1LjEzNDAxIDUuMTM0MDEgMiA5IDJDMTIuODY2IDIgMTYgNS4xMzQwMSAxNiA5WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42NCIvPjwvc3ZnPgo=",this.aboutIconActiveSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNiA2Ljc1QzYgNy4xNjQyMSA2LjMzNTc5IDcuNSA2Ljc1IDcuNUg5LjQzOTM0TDYuMjE5NjcgMTAuNzE5N0M1LjkyNjc4IDExLjAxMjYgNS45MjY3OCAxMS40ODc0IDYuMjE5NjcgMTEuNzgwM0M2LjUxMjU2IDEyLjA3MzIgNi45ODc0NCAxMi4wNzMyIDcuMjgwMzMgMTEuNzgwM0wxMC41IDguNTYwNjZWMTEuMjVDMTAuNSAxMS42NjQyIDEwLjgzNTggMTIgMTEuMjUgMTJDMTEuNjY0MiAxMiAxMiAxMS42NjQyIDEyIDExLjI1VjYuNzVDMTIgNi4zMzU3OSAxMS42NjQyIDYgMTEuMjUgNkg2Ljc1QzYuMzM1NzkgNiA2IDYuMzM1NzkgNiA2Ljc1WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMS4wMCIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTkgMTcuNUMxMy42OTQ0IDE3LjUgMTcuNSAxMy42OTQ0IDE3LjUgOUMxNy41IDQuMzA1NTggMTMuNjk0NCAwLjUgOSAwLjVDNC4zMDU1OCAwLjUgMC41IDQuMzA1NTggMC41IDlDMC41IDEzLjY5NDQgNC4zMDU1OCAxNy41IDkgMTcuNVpNMTYgOUMxNiAxMi44NjYgMTIuODY2IDE2IDkgMTZDNS4xMzQwMSAxNiAyIDEyLjg2NiAyIDlDMiA1LjEzNDAxIDUuMTM0MDEgMiA5IDJDMTIuODY2IDIgMTYgNS4xMzQwMSAxNiA5WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMS4wMCIvPjwvc3ZnPgo=",this.copyIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNiAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy4yIDJDNS45MTUxMyAyIDUuMDQxNjkgMi4wMDExNyA0LjM2NjU2IDIuMDU2MzNDMy43MDg5MyAyLjExMDA2IDMuMzcyNjMgMi4yMDc0NSAzLjEzODAzIDIuMzI2OThDMi41NzM1NCAyLjYxNDYgMi4xMTQ2IDMuMDczNTQgMS44MjY5OCAzLjYzODAzQzEuNzA3NDUgMy44NzI2MyAxLjYxMDA2IDQuMjA4OTMgMS41NTYzMyA0Ljg2NjU2QzEuNTAxMTcgNS41NDE2OSAxLjUgNi40MTUxMyAxLjUgNy43VjEwLjNDMS41IDEwLjg4NDggMS41MDExNyAxMS4yMzMyIDEuNTIyMjcgMTEuNDkxNEMxLjUzMTI4IDExLjYwMTcgMS41NDIzIDExLjY2NzMgMS41NSAxMS43MDI4VjExLjhDMS41NSAxMi41NjExIDEuNTUgMTMuMDYzNiAxLjYxODM4IDEzLjQ0MThDMS40MTMzMiAxMy40MDk2IDEuMjQ0MjkgMTMuMzU5NiAxLjA5MjAyIDEzLjI4MkMwLjcxNTY5NSAxMy4wOTAzIDAuNDA5NzM0IDEyLjc4NDMgMC4yMTc5ODcgMTIuNDA4QzAgMTEuOTgwMiAwIDExLjQyMDEgMCAxMC4zVjcuN0MwIDUuMTc5NzYgMCAzLjkxOTY1IDAuNDkwNDcxIDIuOTU3MDRDMC45MjE5MDEgMi4xMTAzMSAxLjYxMDMxIDEuNDIxOSAyLjQ1NzA0IDAuOTkwNDcxQzMuNDE5NjUgMC41IDQuNjc5NzYgMC41IDcuMiAwLjVIOS4yQzEwLjMyMDEgMC41IDEwLjg4MDIgMC41IDExLjMwOCAwLjcxNzk4N0MxMS42ODQzIDAuOTA5NzM0IDExLjk5MDMgMS4yMTU2OSAxMi4xODIgMS41OTIwMkMxMi4yNTE5IDEuNzI5MTUgMTIuMjk5NCAxLjg3OTg2IDEyLjMzMTYgMi4wNTgyNEMxMS45NjA1IDIgMTEuNDcxNCAyIDEwLjc1IDJINy4yWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42NCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMy4xIDYuN0MzLjEgNS41Nzk5IDMuMSA1LjAxOTg0IDMuMzE3OTkgNC41OTIwMkMzLjUwOTczIDQuMjE1NjkgMy44MTU2OSAzLjkwOTczIDQuMTkyMDIgMy43MTc5OUM0LjYxOTg0IDMuNSA1LjE3OTg5IDMuNSA2LjMgMy41SDEyLjNDMTMuNDIwMSAzLjUgMTMuOTgwMiAzLjUgMTQuNDA4IDMuNzE3OTlDMTQuNzg0MyAzLjkwOTczIDE1LjA5MDMgNC4yMTU2OSAxNS4yODIgNC41OTIwMkMxNS41IDUuMDE5ODQgMTUuNSA1LjU3OTkgMTUuNSA2LjdWMTQuM0MxNS41IDE1LjQyMDEgMTUuNSAxNS45ODAyIDE1LjI4MiAxNi40MDhDMTUuMDkwMyAxNi43ODQzIDE0Ljc4NDMgMTcuMDkwMyAxNC40MDggMTcuMjgyQzEzLjk4MDIgMTcuNSAxMy40MjAxIDE3LjUgMTIuMyAxNy41SDYuM0M1LjE3OTkgMTcuNSA0LjYxOTg0IDE3LjUgNC4xOTIwMiAxNy4yODJDMy44MTU2OSAxNy4wOTAzIDMuNTA5NzMgMTYuNzg0MyAzLjMxNzk5IDE2LjQwOEMzLjEgMTUuOTgwMiAzLjEgMTUuNDIwMSAzLjEgMTQuM1Y2LjdaTTYuMyA1SDEyLjNDMTIuODg0OCA1IDEzLjIzMzIgNS4wMDExNyAxMy40OTE0IDUuMDIyMjdDMTMuNjQ5MSA1LjAzNTE0IDEzLjcxNTMgNS4wNTIxNCAxMy43MzMxIDUuMDU3NjVDMTMuODIyNCA1LjEwNDY5IDEzLjg5NTMgNS4xNzc2NSAxMy45NDI0IDUuMjY2OTNDMTMuOTQ3OSA1LjI4NDY4IDEzLjk2NDkgNS4zNTA5NCAxMy45Nzc3IDUuNTA4NTVDMTMuOTk4OCA1Ljc2NjgxIDE0IDYuMTE1MiAxNCA2LjdWMTQuM0MxNCAxNC44ODQ4IDEzLjk5ODggMTUuMjMzMiAxMy45Nzc3IDE1LjQ5MTRDMTMuOTY0OSAxNS42NDkxIDEzLjk0NzkgMTUuNzE1MyAxMy45NDI0IDE1LjczMzFDMTMuODk1MyAxNS44MjI0IDEzLjgyMjQgMTUuODk1MyAxMy43MzMxIDE1Ljk0MjRDMTMuNzE1MyAxNS45NDc5IDEzLjY0OTEgMTUuOTY0OSAxMy40OTE0IDE1Ljk3NzdDMTMuMjMzMiAxNS45OTg4IDEyLjg4NDggMTYgMTIuMyAxNkg2LjNDNS43MTUyIDE2IDUuMzY2ODEgMTUuOTk4OCA1LjEwODU1IDE1Ljk3NzdDNC45NTA5NCAxNS45NjQ5IDQuODg0NjkgMTUuOTQ3OSA0Ljg2NjkzIDE1Ljk0MjRDNC43Nzc2NSAxNS44OTUzIDQuNzA0NjkgMTUuODIyNCA0LjY1NzY1IDE1LjczMzFDNC42NTIxNCAxNS43MTUzIDQuNjM1MTQgMTUuNjQ5MSA0LjYyMjI3IDE1LjQ5MTRDNC42MDExNyAxNS4yMzMyIDQuNiAxNC44ODQ4IDQuNiAxNC4zVjYuN0M0LjYgNi4xMTUyIDQuNjAxMTcgNS43NjY4MSA0LjYyMjI3IDUuNTA4NTVDNC42MzUxNCA1LjM1MDkzIDQuNjUyMTQgNS4yODQ2OCA0LjY1NzY1IDUuMjY2OTNDNC43MDQ2OSA1LjE3NzY1IDQuNzc3NjUgNS4xMDQ2OSA0Ljg2NjkzIDUuMDU3NjVDNC44ODQ2OCA1LjA1MjE0IDQuOTUwOTQgNS4wMzUxNCA1LjEwODU1IDUuMDIyMjdDNS4zNjY4MSA1LjAwMTE3IDUuNzE1MiA1IDYuMyA1Wk0xMy43MzgzIDUuMDU5NDVMMTMuNzM1MiA1LjA1ODMzQzEzLjczNzQgNS4wNTkwNCAxMy43MzgzIDUuMDU5NDMgMTMuNzM4MyA1LjA1OTQ1Wk0xMy45NDA1IDUuMjYxNzVDMTMuOTQwNiA1LjI2MTY5IDEzLjk0MSA1LjI2MjY0IDEzLjk0MTcgNS4yNjQ3OEwxMy45NDA1IDUuMjYxNzVaTTEzLjk0MDUgMTUuNzM4M0wxMy45NDE3IDE1LjczNTJDMTMuOTQxIDE1LjczNzMgMTMuOTQwNiAxNS43MzgzIDEzLjk0MDUgMTUuNzM4M1pNMTMuNzM4MiAxNS45NDA1QzEzLjczODMgMTUuOTQwNiAxMy43Mzc0IDE1Ljk0MDkgMTMuNzM1MyAxNS45NDE3TDEzLjczODIgMTUuOTQwNVpNNC44NjE3NSAxNS45NDA1TDQuODY0NzggMTUuOTQxN0M0Ljg2MjY1IDE1Ljk0MSA0Ljg2MTY5IDE1Ljk0MDYgNC44NjE3NSAxNS45NDA1Wk00LjY1OTQ1IDE1LjczODNDNC42NTk0MyAxNS43MzgzIDQuNjU5MDQgMTUuNzM3NCA0LjY1ODMzIDE1LjczNTJMNC42NTk0NSAxNS43MzgzWk00LjY1OTQ1IDUuMjYxNzVMNC42NTgzMyA1LjI2NDc4QzQuNjU5MDQgNS4yNjI2NCA0LjY1OTQzIDUuMjYxNjkgNC42NTk0NSA1LjI2MTc1Wk00Ljg2MjE0IDUuMDU5MjdDNC44NjIxMiA1LjA1OTI2IDQuODYxODUgNS4wNTkzOCA0Ljg2MjE0IDUuMDU5MjdMNC44NjQ3OCA1LjA1ODMzQzQuODYzNDcgNS4wNTg3NyA0Ljg2MjYgNS4wNTkwOCA0Ljg2MjE0IDUuMDU5MjdaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjY0Ii8+PC9zdmc+",this.copyIconActiveSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNiAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy4yIDJDNS45MTUxMyAyIDUuMDQxNjkgMi4wMDExNyA0LjM2NjU2IDIuMDU2MzNDMy43MDg5MyAyLjExMDA2IDMuMzcyNjMgMi4yMDc0NSAzLjEzODAzIDIuMzI2OThDMi41NzM1NCAyLjYxNDYgMi4xMTQ2IDMuMDczNTQgMS44MjY5OCAzLjYzODAzQzEuNzA3NDUgMy44NzI2MyAxLjYxMDA2IDQuMjA4OTMgMS41NTYzMyA0Ljg2NjU2QzEuNTAxMTcgNS41NDE2OSAxLjUgNi40MTUxMyAxLjUgNy43VjEwLjNDMS41IDEwLjg4NDggMS41MDExNyAxMS4yMzMyIDEuNTIyMjcgMTEuNDkxNEMxLjUzMTI4IDExLjYwMTcgMS41NDIzIDExLjY2NzMgMS41NSAxMS43MDI4VjExLjhDMS41NSAxMi41NjExIDEuNTUgMTMuMDYzNiAxLjYxODM4IDEzLjQ0MThDMS40MTMzMiAxMy40MDk2IDEuMjQ0MjkgMTMuMzU5NiAxLjA5MjAyIDEzLjI4MkMwLjcxNTY5NSAxMy4wOTAzIDAuNDA5NzM0IDEyLjc4NDMgMC4yMTc5ODcgMTIuNDA4QzAgMTEuOTgwMiAwIDExLjQyMDEgMCAxMC4zVjcuN0MwIDUuMTc5NzYgMCAzLjkxOTY1IDAuNDkwNDcxIDIuOTU3MDRDMC45MjE5MDEgMi4xMTAzMSAxLjYxMDMxIDEuNDIxOSAyLjQ1NzA0IDAuOTkwNDcxQzMuNDE5NjUgMC41IDQuNjc5NzYgMC41IDcuMiAwLjVIOS4yQzEwLjMyMDEgMC41IDEwLjg4MDIgMC41IDExLjMwOCAwLjcxNzk4N0MxMS42ODQzIDAuOTA5NzM0IDExLjk5MDMgMS4yMTU2OSAxMi4xODIgMS41OTIwMkMxMi4yNTE5IDEuNzI5MTUgMTIuMjk5NCAxLjg3OTg2IDEyLjMzMTYgMi4wNTgyNEMxMS45NjA1IDIgMTEuNDcxNCAyIDEwLjc1IDJINy4yWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMS4wMCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMy4xIDYuN0MzLjEgNS41Nzk5IDMuMSA1LjAxOTg0IDMuMzE3OTkgNC41OTIwMkMzLjUwOTczIDQuMjE1NjkgMy44MTU2OSAzLjkwOTczIDQuMTkyMDIgMy43MTc5OUM0LjYxOTg0IDMuNSA1LjE3OTg5IDMuNSA2LjMgMy41SDEyLjNDMTMuNDIwMSAzLjUgMTMuOTgwMiAzLjUgMTQuNDA4IDMuNzE3OTlDMTQuNzg0MyAzLjkwOTczIDE1LjA5MDMgNC4yMTU2OSAxNS4yODIgNC41OTIwMkMxNS41IDUuMDE5ODQgMTUuNSA1LjU3OTkgMTUuNSA2LjdWMTQuM0MxNS41IDE1LjQyMDEgMTUuNSAxNS45ODAyIDE1LjI4MiAxNi40MDhDMTUuMDkwMyAxNi43ODQzIDE0Ljc4NDMgMTcuMDkwMyAxNC40MDggMTcuMjgyQzEzLjk4MDIgMTcuNSAxMy40MjAxIDE3LjUgMTIuMyAxNy41SDYuM0M1LjE3OTkgMTcuNSA0LjYxOTg0IDE3LjUgNC4xOTIwMiAxNy4yODJDMy44MTU2OSAxNy4wOTAzIDMuNTA5NzMgMTYuNzg0MyAzLjMxNzk5IDE2LjQwOEMzLjEgMTUuOTgwMiAzLjEgMTUuNDIwMSAzLjEgMTQuM1Y2LjdaTTYuMyA1SDEyLjNDMTIuODg0OCA1IDEzLjIzMzIgNS4wMDExNyAxMy40OTE0IDUuMDIyMjdDMTMuNjQ5MSA1LjAzNTE0IDEzLjcxNTMgNS4wNTIxNCAxMy43MzMxIDUuMDU3NjVDMTMuODIyNCA1LjEwNDY5IDEzLjg5NTMgNS4xNzc2NSAxMy45NDI0IDUuMjY2OTNDMTMuOTQ3OSA1LjI4NDY4IDEzLjk2NDkgNS4zNTA5NCAxMy45Nzc3IDUuNTA4NTVDMTMuOTk4OCA1Ljc2NjgxIDE0IDYuMTE1MiAxNCA2LjdWMTQuM0MxNCAxNC44ODQ4IDEzLjk5ODggMTUuMjMzMiAxMy45Nzc3IDE1LjQ5MTRDMTMuOTY0OSAxNS42NDkxIDEzLjk0NzkgMTUuNzE1MyAxMy45NDI0IDE1LjczMzFDMTMuODk1MyAxNS44MjI0IDEzLjgyMjQgMTUuODk1MyAxMy43MzMxIDE1Ljk0MjRDMTMuNzE1MyAxNS45NDc5IDEzLjY0OTEgMTUuOTY0OSAxMy40OTE0IDE1Ljk3NzdDMTMuMjMzMiAxNS45OTg4IDEyLjg4NDggMTYgMTIuMyAxNkg2LjNDNS43MTUyIDE2IDUuMzY2ODEgMTUuOTk4OCA1LjEwODU1IDE1Ljk3NzdDNC45NTA5NCAxNS45NjQ5IDQuODg0NjkgMTUuOTQ3OSA0Ljg2NjkzIDE1Ljk0MjRDNC43Nzc2NSAxNS44OTUzIDQuNzA0NjkgMTUuODIyNCA0LjY1NzY1IDE1LjczMzFDNC42NTIxNCAxNS43MTUzIDQuNjM1MTQgMTUuNjQ5MSA0LjYyMjI3IDE1LjQ5MTRDNC42MDExNyAxNS4yMzMyIDQuNiAxNC44ODQ4IDQuNiAxNC4zVjYuN0M0LjYgNi4xMTUyIDQuNjAxMTcgNS43NjY4MSA0LjYyMjI3IDUuNTA4NTVDNC42MzUxNCA1LjM1MDkzIDQuNjUyMTQgNS4yODQ2OCA0LjY1NzY1IDUuMjY2OTNDNC43MDQ2OSA1LjE3NzY1IDQuNzc3NjUgNS4xMDQ2OSA0Ljg2NjkzIDUuMDU3NjVDNC44ODQ2OCA1LjA1MjE0IDQuOTUwOTQgNS4wMzUxNCA1LjEwODU1IDUuMDIyMjdDNS4zNjY4MSA1LjAwMTE3IDUuNzE1MiA1IDYuMyA1Wk0xMy43MzgzIDUuMDU5NDVMMTMuNzM1MiA1LjA1ODMzQzEzLjczNzQgNS4wNTkwNCAxMy43MzgzIDUuMDU5NDMgMTMuNzM4MyA1LjA1OTQ1Wk0xMy45NDA1IDUuMjYxNzVDMTMuOTQwNiA1LjI2MTY5IDEzLjk0MSA1LjI2MjY0IDEzLjk0MTcgNS4yNjQ3OEwxMy45NDA1IDUuMjYxNzVaTTEzLjk0MDUgMTUuNzM4M0wxMy45NDE3IDE1LjczNTJDMTMuOTQxIDE1LjczNzMgMTMuOTQwNiAxNS43MzgzIDEzLjk0MDUgMTUuNzM4M1pNMTMuNzM4MiAxNS45NDA1QzEzLjczODMgMTUuOTQwNiAxMy43Mzc0IDE1Ljk0MDkgMTMuNzM1MyAxNS45NDE3TDEzLjczODIgMTUuOTQwNVpNNC44NjE3NSAxNS45NDA1TDQuODY0NzggMTUuOTQxN0M0Ljg2MjY1IDE1Ljk0MSA0Ljg2MTY5IDE1Ljk0MDYgNC44NjE3NSAxNS45NDA1Wk00LjY1OTQ1IDE1LjczODNDNC42NTk0MyAxNS43MzgzIDQuNjU5MDQgMTUuNzM3NCA0LjY1ODMzIDE1LjczNTJMNC42NTk0NSAxNS43MzgzWk00LjY1OTQ1IDUuMjYxNzVMNC42NTgzMyA1LjI2NDc4QzQuNjU5MDQgNS4yNjI2NCA0LjY1OTQzIDUuMjYxNjkgNC42NTk0NSA1LjI2MTc1Wk00Ljg2MjE0IDUuMDU5MjdDNC44NjIxMiA1LjA1OTI2IDQuODYxODUgNS4wNTkzOCA0Ljg2MjE0IDUuMDU5MjdMNC44NjQ3OCA1LjA1ODMzQzQuODYzNDcgNS4wNTg3NyA0Ljg2MjYgNS4wNTkwOCA0Ljg2MjE0IDUuMDU5MjdaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIxLjAwIi8+PC9zdmc+",this.adchoiceIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMTIuNUMxMC4wMzc2IDEyLjUgMTIuNSAxMC4wMzc2IDEyLjUgN0MxMi41IDMuOTYyNDMgMTAuMDM3NiAxLjUgNyAxLjVDMy45NjI0MyAxLjUgMS41IDMuOTYyNDMgMS41IDdDMS41IDEwLjAzNzYgMy45NjI0MyAxMi41IDcgMTIuNVpNMTQgN0MxNCAxMC44NjYgMTAuODY2IDE0IDcgMTRDMy4xMzQwMSAxNCAwIDEwLjg2NiAwIDdDMCAzLjEzNDAxIDMuMTM0MDEgMCA3IDBDMTAuODY2IDAgMTQgMy4xMzQwMSAxNCA3WiIgZmlsbD0id2hpdGUiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMTFDNi41ODU3OSAxMSA2LjI1IDEwLjY2NDIgNi4yNSAxMC4yNVY2Ljc1QzYuMjUgNi4zMzU3OSA2LjU4NTc5IDYgNyA2QzcuNDE0MjEgNiA3Ljc1IDYuMzM1NzkgNy43NSA2Ljc1VjEwLjI1QzcuNzUgMTAuNjY0MiA3LjQxNDIxIDExIDcgMTFaIiBmaWxsPSJ3aGl0ZSIvPjxwYXRoIGQ9Ik02LjEwMDAyIDMuOUM2LjEwMDAyIDMuNDAyOTUgNi41MDI5NyAzIDcuMDAwMDIgM0M3LjQ5NzA4IDMgNy45MDAwMiAzLjQwMjk1IDcuOTAwMDIgMy45QzcuOTAwMDIgNC4zOTcwNiA3LjQ5NzA4IDQuOCA3LjAwMDAyIDQuOEM2LjUwMjk3IDQuOCA2LjEwMDAyIDQuMzk3MDYgNi4xMDAwMiAzLjlaIiBmaWxsPSJ3aGl0ZSIvPjwvc3ZnPgo=",this.adActionsEl=document.createElement("div"),this.adActionsEl.className="rb-adman-ad-actions",this.disclaimerWrapperEl=document.createElement("div"),this.disclaimerWrapperEl.className="disclaimer-wrapper",this.disclaimerEl=document.createElement("span"),this.disclaimerEl.className="disclaimer-text",this.remainTimeEl=document.createElement("span"),this.remainTimeEl.className="remain-time",this.adChoiceEl=document.createElement("span"),this.adChoiceEl.className="ad-choice",this.actionsWrapperEl=document.createElement("div"),this.actionsWrapperEl.className="actions-wrapper",this.actionsHeaderEl=document.createElement("div"),this.actionsHeaderEl.className="actions-header",this.actionsHeaderText=document.createElement("span"),this.actionsHeaderText.className="actions-header-text",this.actionsHeaderButton=document.createElement("span"),this.actionsHeaderButton.className="actions-header-close",this.actionsAboutEl=document.createElement("div"),this.actionsAboutEl.className="actions-about",this.actionsAboutPictureEl=document.createElement("span"),this.actionsAboutPictureEl.className="actions-about-picture",this.actionsAboutTextEl=document.createElement("span"),this.actionsAboutTextEl.className="actions-about-text",this.actionsCopyEl=document.createElement("div"),this.actionsCopyEl.className="actions-copy",this.actionsCopyPictureEl=document.createElement("div"),this.actionsCopyPictureEl.className="actions-copy-picture",this.actionsCopyTextEl=document.createElement("div"),this.actionsCopyTextEl.className="actions-copy-text",this.infoWrapperEl=document.createElement("div"),this.infoWrapperEl.className="info-wrapper",this.infoOrdIdEl=document.createElement("div"),this.infoOrdIdEl.className="info-ord-id",this.infoOrdIdDescriptionEl=document.createElement("span"),this.infoOrdIdDescriptionEl.className="info-ord-id-description",this.infoOrdIdValueEl=document.createElement("span"),this.infoOrdIdValueEl.className="info-ord-id-value"}function r(){h.start();var a=t.getSettings(),u=t.getAd();if(typeof u=="object"&&typeof u.adActionsConfig=="object"&&u.adActionsConfig.members===null||typeof a=="object"&&typeof a.adActionsConfig=="object"&&a.adActionsConfig.members===null)return void s();var m={originalBannerId:u.bannerID,cipherBannerID:u.cipherBannerID?u.cipherBannerID:null,bannerOrdId:u.ordID||null,advData:u.advData||null},b=AdmanHTML.Utils.adActionsConfigPrepare(u?u.adActionsConfig:null,a?a.adActionsConfig:null);p.build(b,m),p.init(),p.addListeners(),p.appendTo(e.wrapper),d=function(){p.destroy()}}function o(a,u){var m=Math.floor(u-a);m||(m="00"),p.updateRemainTime(m)}function s(){d&&d(),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 d,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,u){this.config=a,this.data=u,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,u){AdmanHTML.Utils.setStyle(a,u)},n.prototype.updateRemainTime=function(a){var u=Math.trunc(a/60),m=a-60*u;u=u.toString(),m=m.toString(),m.length===1&&(m="0"+m),this.remainTimeEl.innerText=u+":"+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 u=this.data.advData?"data":"id",m=this.data.advData?this.data.advData:this.data.cipherBannerID;window.open(this._advPageUrlPart+u+"="+m,"_blank")},n.prototype._copyToClipboard=function(a){var u=document.createElement("textarea");document.body.appendChild(u),u.value=a,u.select(),document.execCommand("copy"),document.body.removeChild(u)},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 u=window.getComputedStyle(a).width,m=this.actionsWrapperWidth+parseInt(this.adActionsEl.style.paddingLeft)+parseInt(this.adActionsEl.style.paddingRight);(u?parseInt(u):m+1)<=m&&(this.isSmall=!0,this._setStyles(this.adActionsEl,{"border-radius":"6px","font-size":"12px",padding:"5px 6px 5px 8px"}))}catch(b){console.warn("Failed detect small wrapper size",b)}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:r,onTimeRemained:o,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(),C=t.getAd(),k=C.duration,N=D(),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?r():N.onload=function(F){r()},f&&f.render(),M&&M.render()}function n(F){F.preventDefault(),F.stopPropagation(),t.log("click"),e.cb("onClicked"),e.openPopup(C.urlToNavigateOnClick||C.trackingLink)}function r(){function F(){var he=N.contentWindow.document.body||N.contentDocument.body;he&&he.addEventListener("click",n,!0)}_=N.contentWindow?N.contentWindow.document:N.contentDocument,_.open(),O?(_.write('<!DOCTYPE html><html style="width: 100%; height: 100%"><head></head><body>'),_.write(C.src),_.write("</body></html>"),Y=document.querySelector("div.videoplayer_controls"),Y&&(J=Y.style.display,Y.style.display="none"),(Ae=document.querySelector("div.videoplayer_ads_skip"))&&(X=Ae.style.display,Ae.style.display="none")):(_.write(C.src),t.log("render")),_.close(),W=AdmanHTML.Utils.getElementViewport(e.wrapper),W.addEventListener("message",a),C.openLinkInPopup&&(C.urlToNavigateOnClick||C.trackingLink)&&(N.contentWindow.document.body||N.contentDocument.body?F():N.onload=F),e.viewability.start(w.mainEl,t),c(),w.onStart()}function o(){R||(R=!0,V+=Date.now()-oe,clearInterval(x),x=null,Y?Y.style.display=J:O&&u("pauseAd",[]),e.cb("onPaused"))}function s(){return C.creativeType==="video-motion"}function d(){R&&(R=!1,c(),e.cb("onPlayed"))}function c(){if(!x){if(O){if(!q)return;Y?Y.style.display="none":u("startAd",[])}x=setInterval(p,251),oe=Date.now(),R=!1}}function h(){le||e.cb("onCompleted")}function p(){V+=Date.now()-oe,oe=Date.now(),w.onTimeRemained(V/1e3,k),O?u("timeUpdateAd",[V/1e3,k]):f.onTimeRemained(V/1e3,k),V>=1e3*k&&(clearInterval(x),x=null,h())}function a(F){if(F.source===N.contentWindow){if(O&&typeof F.data=="object")return void m(F.data);try{switch(JSON.parse(F.data).type){case"trg:click":t.log("click"),e.cb("onClicked")}}catch{}}}function u(F,he){if(typeof N=="object"&&typeof N.contentWindow=="object")try{var H=N.contentWindow.origin;N.contentWindow.postMessage({initiator:"render-runner",id:S,method:F,args:he},H)}catch{}}function m(F){if(O&&typeof F=="object"&&F.initiator==="render-runner"&&Array.isArray(F.args)&&F.args[0]===S)switch(F.event){case"AdStarted":q=!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_"+F.args[1]+"_click"),e.cb("onClicked",{type:"card",cardId:F.args[1]});break;case"ItemShow":t.log("card_"+F.args[1]+"_show");break;case"AdClickThru":t.log("click"),e.cb("onClicked",{type:"common"});break;case"AdError":e.cb("onError",F.args[1]);break;case"ClosedByUser":t.log("closedByUser"),e.cb("onClosed"),e.cb("onSkipped"),le=null,g();break;case"UserAction":le=Date.now()}}function b(){Y&&(Y.style.display=J),Ae&&(Ae.style.display=X)}function y(){x&&clearInterval(x),x=null,b(),W.removeEventListener("message",a)}function g(){y(),w.dispose(),f&&f.dispose(),M&&M.dispose()}function D(){var F=document.createElement("iframe");return F.scrolling="no",F.marginWidth="0",F.marginHeight="0",F.frameBorder="0",F.id="ad-frame-"+Math.round(1e5*Math.random()),F.onclose=b,F}var N,k,x,S,w=new AdmanHTML.AdRenderer(e,t),M=new AdmanHTML.CallToActionBtnRenderer(e,t),f=null,W=null,_=null,C=t.getAd(),R=!1,V=0,oe=0,O=s(),q=!1,Y=null,J="flex",Ae=null,X="block",le=null;return O?S="b"+C.bannerID:f=new AdmanHTML.DisclaimerRenderer(e,t),w.onClick=function(){},{start:i,pause:o,resume:d,skip:w.skip,dispose:g}},AdmanHTML.ImgAdRenderer=function(e,t){"use strict";function i(){r.start(),r.registerTimer(),AdmanHTML.Utils.addCss(c,d);var p=t.getAd();r.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(),u=r.mainEl.querySelector(".rb-adman_age_wrapper");if(a&&a.advertisment&&a.advertisment.image){var m=a.advertisment.image;AdmanHTML.StyleUtils.applyStyle(r.mainEl,m,"fontFace contentIndent hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_image_wrapper"),m,"borderSize borderColor borderAlpha borderCornerRounding".split(" "));var b=a.advertisment.image.ageRestrictions;p.ageRestrictions&&b&&(AdmanHTML.StyleUtils.applyStyle(u,b),AdmanHTML.StyleUtils.applyStyle(u.querySelector(".rb-adman_age_content"),b,["textUnderline"]))}p.ageRestrictions||u.parentNode.removeChild(u),o.setWrapper(r.mainEl),o.start(),r.onStart(),s.render(),t.log("render")}function n(){r.dispose(),o.dispose(),s.dispose()}var r=new AdmanHTML.AdRenderer(e,t),o=new AdmanHTML.CloseBtnRenderer(e,t),s=new AdmanHTML.DisclaimerRenderer(e,t),d="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:r.pause,resume:r.resume,skip:r.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=d.createElement("div"),r(),s.classList.add("rb-adman-popup");var h=d.createElement("div");h.classList.add("rb-adman-popup-body"),s.appendChild(h);var p=d.createElement("div");p.classList.add("rb-adman-popup-closeButton");var a=s;o=function(){a.remove(),a=null,e.resume(!0),e.isPopupOpen=!1},p.onclick=o,h.appendChild(p);var u=d.createElement("iframe");u.classList.add("rb-adman-popup-frame"),u.setAttribute("src",c),h.appendChild(u),d.body.append(s)}function r(){var c=d.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 o,s=null,d=t().document;return{open:i,close:o}},AdmanHTML.ResearchAdRenderer=function(e,t){"use strict";function i(S,w){var M=[];return S.forEach(function(f){f.name===w&&M.push(f)}),M}function n(S,w,M){return w<=S&&(!M||M>=S)}function r(){!y&&b&&(y=!0,t.log("playbackPaused"))}function o(){y&&b&&(y=!1,t.log("playbackResumed"))}function s(){b=!1,y=!1,m.stop()}function d(S){var w=!S;w!==g&&(g=w,t.log(w?"volumeOff":"volumeOn"))}function c(){b&&(N&&p(N,N),a&&k.forEach(function(S){S.completed||(S.completed=!0,!S.viewable&&AdmanHTML.Utils.loadImg(S.url))}),s())}function h(S){t.log(S?"fullscreenOn":"fullscreenOff")}function p(S,w){if(!isNaN(S)){b||(b=!0,m.start(e.playerEl,t,!0),t.log("playbackStarted")),S=Math.round(S);var M=D!==null?S-D:null;if(D=S,t.log("thresholdValue",S),!isNaN(w)&&isFinite(w)&&w>0&&(w=Math.round(w),N=w,t.log("thresholdPValue",Math.floor(S/w*100))),M<0&&t.log("rewind"),x.forEach(function(_){if(n(S,_.start,_.end)){var C=Math.floor((S-_.start)/_.rate);C>0&&_.last!==C&&(_.last=C,AdmanHTML.Utils.loadImg(_.url.replace("[CONTENTPLAYHEAD]",S)))}else _.last=null}),a!==!1&&M!==0){var f,W=M<0||M>1;k.forEach(function(_){if(n(S,_.start,_.end)&&!_.completed){f=f||m.getViewabilityState(),a=f.state==="DETERMINED";var C=f.percent>_.percent&&f.focus;_.duration=_.duration||0,_.lastViewable&&C&&!W?_.duration+=M:_.duration=0,_.lastViewable=C,_.duration>=_.value&&(_.completed=!0,_.viewable&&AdmanHTML.Utils.loadImg(_.url))}else _.duration=0,_.lastViewable=!1})}}}var a,u=t.getExtendedAdForApp().statistics,m=new AdmanHTML.Viewability,b=!1,y=!1,g=!1,D=null,N=null,k=i(u,"mrcValue"),x=i(u,"timerValue");return{pause:r,resume:o,setVolume:d,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(){r.start(),AdmanHTML.Utils.checkFlashAsync(function(o){o===AdmanHTML.Utils.FLASH_READY?(r.registerTimer(),r.setView(n(t.getAd().src,{width:"100%",height:"100%"},{}),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"black"}),t.log("render"),r.onStart()):e.cb("onError")})}function n(o,s,d){var c,h,p=s||{},a=d||{};p.type="application/x-shockwave-flash",window.ActiveXObject?(p.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",a.movie=o):p.data=o,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 r=new AdmanHTML.AdRenderer(e,t);return{start:i,skip:r.skip,dispose:r.dispose,createSwfObject:n,super:r}},AdmanHTML.TextAdRenderer=function(e,t){"use strict";function i(){r.start(),r.registerTimer(),AdmanHTML.Utils.addCss(c,d);var p=AdmanHTML.Utils.mixin({header:"",body:"",hyperlinkText:""},t.getAd());r.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 u=a.advertisment.text;AdmanHTML.StyleUtils.applyStyle(r.mainEl,u,"fontFace width height contentPadding hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_header"),u,"headerColor headerSize headerUnderline headerBold headerIndent".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_header_text"),u,["headerUnderlineOnRollOver"]),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_body"),u,"bodyColor bodySize bodyUnderline bodyLeading bodyIndent bodyPaddingRight".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_link"),u,"hyperlinkColor hyperlinkSize hyperlinkUnderline hyperlinkIndent".split(" "));var m=a.advertisment.text.ageRestrictions,b=r.mainEl.querySelector(".rb-adman_age_wrapper");p.ageRestrictions?m&&(AdmanHTML.StyleUtils.applyStyle(b,m),AdmanHTML.StyleUtils.applyStyle(b.querySelector(".rb-adman_age_content"),m,["textUnderline"])):b.parentNode.removeChild(b);var y=r.mainEl.querySelector(".rb-adman_image_wrapper span");if(u.noImage)y.parentNode.removeChild(y);else if(u.contentPadding&&(y.style.marginRight=AdmanHTML.StyleUtils.getLength(u.contentPadding)),u.maxImageHeight||u.maxImageWidth){var g=p.width/p.height;y.style.width=AdmanHTML.StyleUtils.getLength(Math.round(u.maxImageWidth||u.maxImageHeight*g)),y.style.height=AdmanHTML.StyleUtils.getLength(Math.round(u.maxImageHeight||u.maxImageWidth/g))}}o.setWrapper(r.mainEl),o.start(),s.render(),t.log("render"),r.onStart()}function n(){r.dispose(),o.dispose(),s.dispose()}var r=new AdmanHTML.AdRenderer(e,t),o=new AdmanHTML.CloseBtnRenderer(e,t),s=new AdmanHTML.DisclaimerRenderer(e,t),d="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:r.pause,resume:r.resume,skip:r.skip,dispose:n}},AdmanHTML.VideoAdRenderer=function(e,t){"use strict";function i(){a.mainEl=e.videoEl,a.clickEl=e.clickEl||a.mainEl,b.forEach(function(x){a.mainEl.addEventListener(x,s)}),a.mainEl.parentNode?D={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(d,function(){a.mainEl.muted=!0,h=a.mainEl.play(),h.then(d,function(){})}),a.start(),u.render(),m.render()}function n(x){return x.indexOf("videolink.mycdn.me")!==-1}function r(){u.dispose(),m.dispose(),a.dispose(),b.forEach(function(x){a.mainEl.removeEventListener(x,s)}),D.src?(a.mainEl.src=D.src,a.mainEl.load(),a.mainEl.play(),c(D.time)):(a.mainEl.src="",a.mainEl.removeAttribute&&a.mainEl.removeAttribute("src"))}function o(x){if(x.indexOf("mradx")!==-1)return"rb";if(x.indexOf("videolink.mycdn.me")!==-1)return"ev";var S=new URL(x);return"evcdn:"+("hostname"in S?S.hostname:"")}function s(x){switch(x.type){case"loadstart":p=Date.now();break;case"loadeddata":N||(N=!0,k=Date.now()-p,e.stats.logMessage("firstLoadedData",k,{banner_id:g.bannerID,duration:Math.round(a.mainEl.duration),geo:g.geo!=="undefined"?g.geo:void 0,one_video_src:n(a.mainEl.src),slot:"slotId"in g?g.slotId:"no_slot_id",video_source:o(a.mainEl.src),resolution:("width"in g?g.width:"no_ad_width")+"x"+("height"in g?g.height:"no_ad_height"),label:"experimentLabel"in g?g.experimentLabel:""}));break;case"loadedmetadata":e.stats.metrics("ready"),e.stats.metrics("creative_type","video"),u.onTimeRemained(a.mainEl.currentTime,a.mainEl.duration);break;case"playing":h||d();break;case"play":e.cb("onPlayed");break;case"pause":e.cb("onPaused");break;case"timeupdate":a.onTimeRemained(a.mainEl.currentTime,a.mainEl.duration),u.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 S=x.target&&typeof x.target=="object"&&x.target.error&&typeof x.target.error=="object"&&x.target.error.code?x.target.error.code:"unknown_code",w="video_el_err_code:"+S;e.stats.logError(w),e.stats.metrics("media_error_code",S),e.cb("onError")}}function d(){if(!y){y=!0;var x=AdmanHTML.Utils.isElement(a.mainEl)?a.mainEl:a.wrapperEl;e.viewability.start(x,t),a.onStart({muted:a.mainEl.muted})}}function c(x){if(a.mainEl)try{a.mainEl.currentTime=x}catch{}}var h,p,a=new AdmanHTML.AdRenderer(e,t),u=new AdmanHTML.DisclaimerRenderer(e,t),m=new AdmanHTML.CallToActionBtnRenderer(e,t),b=["loadstart","loadeddata","loadedmetadata","error","pause","play","playing","timeupdate","ended"],y=!1,g=t.getAd(),D={},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",r()},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(x){var S=a.mainEl.muted?0:a.mainEl.volume;x>0&&a.mainEl.muted&&(a.mainEl.muted=!1),x===0&&(a.mainEl.muted=!0),a.mainEl.volume=x,(S===0&&x>0||S>0&&x===0)&&t.log(x?"volumeOn":"volumeOff")}}},AdmanHTML.VpaidJsAdRenderer=function(e,t){"use strict";function i(){var R;if(!c)return w.duration;try{R=c.callGet("adDuration"),R===void 0&&(R=w.duration)}catch{R=w.duration}return R}function n(){if(x.start(),S.render(),AdmanHTML.Utils.isElement(e.videoEl)){var R=AdmanHTML.Utils.getElementViewport;R(e.videoEl)===R(x.wrapperEl)&&(e.videoEl.parentNode?(p=e.videoEl.parentNode,a=e.videoEl.nextSibling):h=!0,x.wrapperEl.insertBefore(e.videoEl,x.wrapperEl.childNodes[0]),AdmanHTML.Utils.mixin(e.videoEl.style,{position:"absolute",width:"100%",height:"100%",top:0,display:"block"}))}var V=t.getSettings();V&&(V.loadTimeout&&(M=V.loadTimeout),V.startTimeout&&(f=V.startTimeout)),AdmanHTML.Utils.isNRVpaid(w.src)&&typeof w.timeoutsFactor=="number"&&w.timeoutsFactor>1&&(M*=w.timeoutsFactor,f*=w.timeoutsFactor),e.cb("onStarted",[t.sectionType,t.getAdForApp()||{}]),o(M,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadInterface"),c.urlToNavigateOnClick=t.getAd().urlToNavigateOnClick,x.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 r(){h&&e.videoEl.parentNode?e.videoEl.parentNode.removeChild(e.videoEl):p&&p.insertBefore(e.videoEl,a&&a.parentNode?a:null),s(),c.destroy(),S.dispose(),x.dispose()}function o(R,V){s(),D=V,m=setTimeout(d,R)}function s(){clearTimeout(m)}function d(){g=!0,s(),t.log("error"),D&&e.stats.logError(D,{bannerID:w.bannerID,isNRVpaid:AdmanHTML.Utils.isNRVpaid(w.src)}),e.cb("onError",{force:!0,message:D})}var c,h,p,a,u,m,b,y,g,D,N,k,x=new AdmanHTML.AdRenderer(e,t),S=new AdmanHTML.DisclaimerRenderer(e,t),w=t.getAd(),M=500,f=1e3;x.onResize=function(R,V){c&&c.call("resizeAd",[R,V,"normal"])},x.onClick=function(){};var W=function(R,V){if(!g){var oe,O;switch(R){case"loaded":o(M,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadJs");break;case"vpaidloaded":s();break;case"inited":c.call("handshakeVersion",["2.0"])?(o(f,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:InitAd"),c.call("initAd",[x.mainEl.offsetWidth,x.mainEl.offsetHeight,"normal",w.bitrate,{AdParameters:w.params}])):e.cb("onError");break;case"AdStarted":s(),y=c.callGet("adVolume"),b===void 0||c.autoMuted||c.callSet("adVolume",b),t.log("playbackStarted"),e.viewability.start(x.mainEl,t),e.cb("onVPAIDStarted"),e.stats.metrics("playing");break;case"AdLoaded":o(f,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:StartAd"),c.call("startAd"),e.stats.metrics("ready"),e.stats.metrics("creative_type","vpaid");break;case"AdRemainingTimeChange":oe=i(),O=c.callGet("adRemainingTime"),oe>0&&O>=0?(x.onTimeRemained(oe-O,oe),S.onTimeRemained(oe-O,oe)):e.cb("onDurationChanged",[{remained:O,duration:oe}]);break;case"AdVolumeChange":var q=c.callGet("adVolume");(y===0&&q>0||y>0&&q===0)&&t.log(q?"volumeOn":"volumeOff"),y=q;break;case"AdVideoComplete":e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",oe=i(),x.onTimeRemained(oe,oe);break;case"AdStopped":case"AdSkipped":N||(N=!0,setTimeout(function(){u?u():e.cb("onCompleted")})),e.stats.metrics(R==="AdStopped"?"completed":"skipped");break;case"AdClickThru":V.url&&V.playerHandles&&window.open(V.url,"_blank"),t.log("click"),e.cb("onClicked");break;case"AdError":e.stats.logError("EXTERNAL_JS_ADVERTISMENT_ERROR:"+(V&&V.message||"")),e.stats.metrics("vpaid_error_message",V&&V.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")}}},_=e.wrapper.ownerDocument,C=_.defaultView||_.parentWindow;return c=new AdmanHTML.VpaidLoader(e.videoEl,C),c.onVpaidEvent(W),{start:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",n()},dispose:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",r()},pause:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",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(R){c&&c.callSet("adVolume",R),b=R},skip:function(R){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",u=R;try{c&&c.call("skipAd")}catch{}e.stats.metrics("skipped")}}},AdmanHTML.VpaidSwfAdRenderer=function(e,t){"use strict";function i(){var S;if(!c)return D.duration;try{S=c.callGet("adDuration")||D.duration}catch{S=D.duration}return S}function n(){g.start();var S=t.getSettings();S&&(S.loadTimeout&&(k=S.loadTimeout),S.startTimeout&&(x=S.startTimeout)),AdmanHTML.Utils.checkFlashAsync(function(w){if(w===AdmanHTML.Utils.FLASH_READY){e.cb("onStarted",[t.sectionType,t.getAdForApp()||{}]),o(k);var M="vpaidSwfUrl="+encodeURIComponent(D.src)+"&proxyMethodName="+N;g.setView(b.createSwfObject(e.config.vpaidJsInterface,{width:"100%",height:"100%"},{flashvars:M,allowScriptAccess:"always",wmode:"opaque"}),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"black"})}else e.cb("onError")}),y.render(),t.log("render")}function r(){s(),g.dispose(),y.dispose(),window[N]=null}function o(S){s(),p=setTimeout(d,S)}function s(){clearTimeout(p)}function d(){m=!0,s(),t.log("error"),e.cb("onError")}var c,h,p,a,u,m,b=new AdmanHTML.SwfAdRenderer(e,t),y=new AdmanHTML.DisclaimerRenderer(e,t),g=b.super,D=t.getAd(),N="vpaidProxyMethod"+Date.now(),k=500,x=1e3;return g.onResize=function(S,w){c&&c.call("resizeAd",[S,w,"normal"])},g.onClick=function(){},window[N]=function(S,w){if(!m){var M;switch(S){case"loaded":o(k);break;case"vpaidloaded":s();break;case"inited":c=g.mainEl.getElementsByTagName("object")[0],c.call("handshakeVersion",["2.0"])?(o(x),c.call("initAd",[g.mainEl.offsetWidth,g.mainEl.offsetHeight,"normal",D.bitrate,D.params,""])):e.cb("onError");break;case"AdStarted":s(),u=c.callGet("adVolume"),a!==void 0&&c.callSet("adVolume",a),t.log("playbackStarted"),e.viewability.start(g.mainEl,t),e.cb("onVPAIDStarted");break;case"AdLoaded":o(x),c.call("startAd");break;case"AdRemainingTimeChange":M=i(),g.onTimeRemained(M-c.callGet("adRemainingTime"),M),y.onTimeRemained(M-c.callGet("adRemainingTime"),M);break;case"AdVolumeChange":var f=c.callGet("adVolume");(u===0&&f>0||u>0&&f===0)&&t.log(f?"volumeOn":"volumeOff"),u=f;break;case"AdVideoComplete":M=i(),g.onTimeRemained(M,M);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:r,pause:function(){c&&c.call("pauseAd")},resume:function(){c&&c.call("resumeAd")},setVolume:function(S){c&&c.callSet("adVolume",S),a=S},skip:function(S){h=S;try{c&&c.call("skipAd")}catch{}}}};window.admanAsyncLoader?setTimeout(admanAsyncLoader):window.admanAsyncInit&&setTimeout(admanAsyncInit)});var Ti="[",$i="[!",Gi="]",mi={};var et=Symbol(),qt=Symbol("filename"),ns=Symbol("hmr"),rs="http://www.w3.org/1999/xhtml";var os=globalThis.process?.env?.NODE_ENV,Q=os&&!os.toLowerCase().startsWith("prod");var Kt=Array.isArray,as=Array.prototype.indexOf,oo=Array.from,ao=Object.keys,at=Object.defineProperty,It=Object.getOwnPropertyDescriptor,so=Object.getOwnPropertyDescriptors,lo=Object.prototype,ss=Array.prototype,qi=Object.getPrototypeOf,uo=Object.isExtensible;var dt=()=>{};function Ki(e){for(var t=0;t<e.length;t++)e[t]()}var kt=Symbol("$state"),yn=Symbol("legacy props"),ls=Symbol(""),Xn=Symbol("proxy path");var bn=3,Zt=8;function er(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 us(e,t){return e!==t}function Ji(e){return!Zi(e,this.v)}function ds(){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 cs(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 ps(){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 fs(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 ms(){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 hs(){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 vs(){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 gs(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 _s(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 ys(){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 bs(){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 xs(){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 si=!1,li=!1;function Es(){si=!0}var xn=null;function hi(e){let t=Error(),i=t.stack;if(i){let n=i.split(`
21
- `),r=[`
22
- `];for(let o=0;o<n.length;o++){let s=n[o];if(s!=="Error"){if(s.includes("validate_each_keys"))return null;s.includes("svelte/src/internal")||r.push(s)}}if(r.length===1)return null;at(t,"stack",{value:r.join(`
23
- `)}),at(t,"name",{value:`${e}Error`})}return t}function Jt(e,t){return e.label=t,tr(e.v,t),e}function tr(e,t){return e?.[Xn]?.(t),e}function En(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,y=Object.getOwnPropertyNames,b=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 y(e))b.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")()}),C=x((e,t)=>{t.exports=function(e){try{return!!e()}catch(e){return!0}}}),$=x((e,t)=>{t.exports=!C()(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}),A=x((e,t)=>{var i=$(),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)})}),E=x((e,t)=>{var i=$(),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)}}}),T=x((e,t)=>{var i=E(),n=i({}.toString),r=i("".slice);t.exports=function(e){return r(n(e),8,-1)}}),P=x((e,t)=>{var i=T(),n=E();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=!C()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}),V=x((e,t)=>{var i=$(),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=E(),n=C(),r=T(),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={}}),B=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]}}),q=x((e,t)=>{t.exports=E()({}.isPrototypeOf)}),W=x((e,t)=>{var i=S().navigator,n=i&&i.userAgent;t.exports=n?String(n):""}),U=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}),Q=x((e,t)=>{var i=U(),n=C(),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=Q()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}),K=x((e,t)=>{var i=B(),n=L(),r=q(),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))}}),G=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=G(),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=E(),n=en(),r=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return r(n(e),t)}}),eo=x((e,t)=>{var i=E(),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=Q(),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=K(),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=K();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=C(),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=C(),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=$(),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=C();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,_,y,b,w=e.target,k=e.global,x=e.stat,S=e.proto,C=k?i:x?i[w]:i[w]&&i[w].prototype,$=k?l:l[w]||d(l,w,{})[w],A=$.prototype;for(v in t)p=!(n=s(k?v:w+(x?".":"#")+v,e.forced))&&C&&c(C,v),g=$[v],p&&(_=e.dontCallGetSet?(b=a(C,v))&&b.value:C[v]),m=p&&_?_:t[v],(n||S||typeof g!=typeof m)&&(y=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(y,"sham",!0),d($,v,y),S&&(c(l,h=w+"Prototype")||d(l,h,{}),d(l[h],v,m),e.real&&A&&(n||!A[v])&&d(A,v,m)))}}),ey=x((e,t)=>{var i=ei(),n=eo(),r=i("keys");t.exports=function(e){return r[e]||(r[e]=n(e))}}),eb=x((e,t)=>{t.exports=!C()(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=ey(),a=eb(),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)}}),eC=x((e,t)=>{var i=ex(),n=Math.min;t.exports=function(e){var t=i(e);return t>0?n(t,0x1fffffffffffff):0}}),e$=x((e,t)=>{var i=eC();t.exports=function(e){return i(e.length)}}),eA=x((e,t)=>{var i=D(),n=eS(),r=e$(),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)}}),eE=x((e,t)=>{t.exports={}}),eT=x((e,t)=>{var i=E(),n=er(),r=D(),o=eA().indexOf,a=eE(),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=eT(),n=eP();t.exports=Object.keys||function(e){return i(e,n)}}),eR=x((e,t)=>{var i=R(),n=C(),r=E(),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(){}}),eB=x((e,t)=>{t.exports={}}),eq=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=eq(),l=S(),u=F(),d=eg(),c=er(),f=et(),p=ey(),h=eE(),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}}}}),eU=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}}),eQ=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=B()("document","documentElement")}),eK=x((e,t)=>{var i,n=ev(),r=eQ(),o=eP(),a=eE(),s=eH(),l=eu(),u=ey(),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)}}),eG=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=C(),a=L(),s=F(),l=eK(),u=ew(),d=eG(),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=T(),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=eK(),r=I(),o=e0(),a=eB(),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=E(),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=eU(),a=L(),s=e1(),l=ew(),u=e3(),d=e0(),c=eg(),f=eG(),p=ea(),h=eB(),v=eJ(),m=o.PROPER,g=o.CONFIGURABLE,_=v.IteratorPrototype,y=v.BUGGY_SAFARI_ITERATORS,b=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,E,T,P=function(e){if(e===v&&I)return I;if(!y&&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[b]||V["@@iterator"]||v&&V[v],I=!y&&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[b])||f(A,b,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(E={values:P(k),keys:C?I:P(w),entries:P(x)},$)for(T in E)!y&&!R&&T in V||f(V,T,E[T]);else i({target:t,proto:!0,forced:y||R},E);return(!r||$)&&V[b]!==I&&f(V,b,I,{name:v}),h[t]=I,E}}),e6=x((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}}),e7=x((e,t)=>{var i=D(),n=ez(),r=eB(),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=eB(),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=eB(),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=G(),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=G(),a=e8(),s=e$(),l=q(),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,_,y,b,w,k,x=v&&v.that,S=!!(v&&v.AS_ENTRIES),C=!!(v&&v.IS_RECORD),$=!!(v&&v.IS_ITERATOR),A=!!(v&&v.INTERRUPTED),E=i(t,x),T=function(e){return m&&c(m,"normal"),new p(!0,e)},P=function(e){return S?(r(e),A?E(e[0],e[1],T):E(e[0],e[1])):A?E(e,T):E(e)};if(C)m=e.iterator;else if($)m=e;else{if(!(g=d(e)))throw new f(o(e)+" is not iterable");if(a(g)){for(_=0,y=s(e);y>_;_++)if((b=P(e[_]))&&l(h,b))return b;return new p(!1)}m=u(e,g)}for(w=C?e.next:m.next;!(k=n(w,m)).done;){try{b=P(k.value)}catch(e){c(m,"throw",e)}if("object"==typeof b&&b&&l(h,b))return b}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=eB();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=T(),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=C(),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=q(),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=E(),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=E(),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,y,b,w,k,x,S,C,$,A=n(this),E=0,T="";if(o(e)){if((c=a(e))&&!~v(s(n(u(e))),"g"))throw new h("`.replaceAll` does not allow non-global regexes");if(y=l(e,p))return t(y,e,A,i);if(f&&c)return m(s(A),e,i)}for(b=s(A),w=s(e),(k=r(i))||(i=s(i)),S=_(1,x=w.length),C=v(b,w);-1!==C;)$=k?s(i(w,C,b)):d(w,b,C,[],void 0,i),T+=g(b,E,C)+$,E=C+x,C=C+S>b.length?-1:v(b,w,C+S);return E<b.length&&(T+=g(b,E)),T}})}),t_=x((e,t)=>{t.exports=B()}),ty=x((e,t)=>{tg(),t.exports=t_()("String","replaceAll")}),tb=x((e,t)=>{t.exports=ty()}),tw=x((e,t)=>{t.exports=tb()}),tk=x(()=>{var e=e_(),t=eA().includes,i=C(),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()}),tC=x((e,t)=>{t.exports=tS()}),t$=x(()=>{var e=e_(),t=en(),i=e$(),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)=>{t$(),t.exports=t_()("Array","at")}),tE=x((e,t)=>{t.exports=tA()}),tT=x((e,t)=>{t.exports=tE()}),tP=x((e,t)=>{var i=S(),n=W(),r=T(),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=B(),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=q(),n=TypeError;t.exports=function(e,t){if(i(t,e))return e;throw new n("Incorrect invocation")}}),tI=x((e,t)=>{var i=E(),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=E(),n=C(),r=L(),o=eZ(),a=B(),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=G(),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=E()([].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)}),tB=x((e,t)=>{var i,n,r,o,a=S(),s=A(),l=ep(),u=L(),d=er(),c=C(),f=eH(),p=tD(),h=eu(),v=tF(),m=tz(),g=tL(),_=a.setImmediate,y=a.clearImmediate,b=a.process,w=a.Dispatch,k=a.Function,x=a.MessageChannel,$=a.String,E=0,T={},P="onreadystatechange";c(function(){i=a.location});var R=function(e){if(d(T,e)){var t=T[e];delete T[e],t()}},V=function(e){return function(){R(e)}},O=function(e){R(e.data)},I=function(e){a.postMessage($(e),i.protocol+"//"+i.host)};_&&y||(_=function(e){v(arguments.length,1);var t=u(e)?e:k(e),i=p(arguments,1);return T[++E]=function(){s(t,void 0,i)},n(E),E},y=function(e){delete T[e]},g?n=function(e){b.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:y}}),tq=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}),tU=x((e,t)=>{var i=W();t.exports=/ipad|iphone|ipod/i.test(i)&&"u">typeof Pebble}),tQ=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=tq(),c=ep(),f=tB().set,p=tW(),h=tz(),v=tU(),m=tQ(),g=tL(),_=u.MutationObserver||u.WebKitMutationObserver,y=u.document,b=u.process,w=u.Promise,k=d("queueMicrotask");k||(s=new p,l=function(){var e,t;for(g&&(e=b.domain)&&e.exit();t=s.get();)try{t()}catch(e){throw s.head&&i(),e}e&&e.enter()},h||g||m||!_||!y?!v&&w&&w.resolve?((o=w.resolve(void 0)).constructor=w,a=c(o.then,o),i=function(){a(l)}):g?i=function(){b.nextTick(l)}:(f=c(f,u),i=function(){f(l)}):(n=!0,r=y.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}),tK=x((e,t)=>{t.exports=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}}),tG=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=U(),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=eG(),c=e3(),f=e0(),p=tV(),h=J(),v=L(),m=F(),g=tO(),_=tj(),y=tB().set,b=tH(),w=tK(),k=tG(),x=tW(),C=eW(),$=tJ(),A=tY(),E=tZ(),T="Promise",P=A.CONSTRUCTOR,R=A.REJECTION_EVENT,O=A.SUBCLASSING,I=C.getterFor(T),M=C.set,N=$&&$.prototype,j=$,D=N,B=s.TypeError,q=s.document,W=s.process,U=E.f,Q=U,H=!!(q&&q.createEvent&&s.dispatchEvent),K="unhandledrejection",G=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 B("Promise-chain cycle")):(n=G(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,b(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=q.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===K&&w("Unhandled promise rejection",i)},et=function(e){u(y,s,function(){var t,i=e.facade,n=e.value;if(ei(e)&&(t=k(function(){a?W.emit("unhandledRejection",n,i):ee(K,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(y,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 B("Promise can't be resolved itself");var n=G(t);n?b(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:T,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=U(_(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):b(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)},E.f=U=function(e){return e===j||e===i?new t(e):Q(e)},!o&&v($)&&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,T,!1,!0),p(T)}),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=tG(),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=B(),a=L(),s=eG(),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=tG(),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=B(),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=C(),o=B(),a=L(),s=tj(),l=t9(),u=eG(),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,iy=Object.isExtensible,ib=()=>{};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"),iC=Symbol(""),i$=Symbol("proxy path"),iA=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},iE=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function iT(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 An(e){Te=e}var Xt=null;function Sn(e){Xt=e}function wn(e){return Ss("getContext").get(e)}function Tn(e,t){return Ss("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};si&&!t&&(Te.l={s:null,u:null,r1:[],r2:di(!1)}),St(()=>{n.d=!0}),Q&&(Te.function=i,Xt=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 r=0;r<s.length;r++){var o=s[r];_t(o.effect),ct(o.reaction),Nt(o.fn)}}finally{_t(i),ct(n)}}Te=t.p,Q&&(Xt=t.p?.function??null),t.m=!0}return e||{}}function ui(){return!si||Te!==null&&Te.l===null}function Ss(e){return Te===null&&En(e),Te.c??=new Map(Ed(Te)||void 0)}function Ed(e){let t=e.p;for(;t!==null;){let i=t.c;if(i!==null)return i;t=t.p}return null}var Ad=/^[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!==lo&&t!==ss)return e;var i=new Map,n=Kt(e),r=Fe(0),o=Q&&li?hi("CreatedAt"):null,s=ge,d=p=>{var a=ge;ct(s);var u=p();return ct(a),u};n&&i.set("length",Fe(e.length,o));var c="";function h(p){c=p,Jt(r,`${c} version`);for(let[a,u]of i)Jt(u,Oi(c,a))}return new Proxy(e,{defineProperty(p,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ys();var m=i.get(a);return m===void 0?m=d(()=>{var b=Fe(u.value,o);return i.set(a,b),Q&&typeof a=="string"&&Jt(b,Oi(c,a)),b}):Se(m,u.value,!0),!0},deleteProperty(p,a){var u=i.get(a);if(u===void 0){if(a in p){let y=d(()=>Fe(et,o));i.set(a,y),fo(r),Q&&Jt(y,Oi(c,a))}}else{if(n&&typeof a=="string"){var m=i.get("length"),b=Number(a);Number.isInteger(b)&&b<m.v&&Se(m,b)}Se(u,et),fo(r)}return!0},get(p,a,u){if(a===kt)return e;if(Q&&a===Xn)return h;var m=i.get(a),b=a in p;if(m===void 0&&(!b||It(p,a)?.writable)&&(m=d(()=>{var g=yt(b?p[a]:et),D=Fe(g,o);return Q&&Jt(D,Oi(c,a)),D}),i.set(a,m)),m!==void 0){var y=P(m);return y===et?void 0:y}return Reflect.get(p,a,u)},getOwnPropertyDescriptor(p,a){var u=Reflect.getOwnPropertyDescriptor(p,a);if(u&&"value"in u){var m=i.get(a);m&&(u.value=P(m))}else if(u===void 0){var b=i.get(a),y=b?.v;if(b!==void 0&&y!==et)return{enumerable:!0,configurable:!0,value:y,writable:!0}}return u},has(p,a){if(a===kt)return!0;var u=i.get(a),m=u!==void 0&&u.v!==et||Reflect.has(p,a);if(u!==void 0||ve!==null&&(!m||It(p,a)?.writable)){u===void 0&&(u=d(()=>{var y=m?yt(p[a]):et,g=Fe(y,o);return Q&&Jt(g,Oi(c,a)),g}),i.set(a,u));var b=P(u);if(b===et)return!1}return m},set(p,a,u,m){var b=i.get(a),y=a in p;if(n&&a==="length")for(var g=u;g<b.v;g+=1){var D=i.get(g+"");D!==void 0?Se(D,et):g in p&&(D=d(()=>Fe(et,o)),i.set(g+"",D),Q&&Jt(D,Oi(c,g)))}if(b===void 0)(!y||It(p,a)?.writable)&&(b=d(()=>Fe(void 0,o)),Se(b,yt(u)),i.set(a,b),Q&&Jt(b,Oi(c,a)));else{y=b.v!==et;var N=d(()=>yt(u));Se(b,N)}var k=Reflect.getOwnPropertyDescriptor(p,a);if(k?.set&&k.set.call(m,u),!y){if(n&&typeof a=="string"){var x=i.get("length"),S=Number(a);Number.isInteger(S)&&S>=x.v&&Se(x,S+1)}fo(r)}return!0},ownKeys(p){P(r);var a=Reflect.ownKeys(p).filter(b=>{var y=i.get(b);return y===void 0||y.v!==et});for(var[u,m]of i)m.v!==et&&!(u in p)&&a.push(u);return a},setPrototypeOf(){bs()}})}function Oi(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:Ad.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function fo(e,t=1){Se(e,e.v+t)}function ir(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:er,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:i??ve};return Q&&li&&(n.created=hi("CreatedAt")),n}function gi(e){let t=vi(e);return ar(t),t}function or(e){let t=vi(e);return t.equals=Ji,t}function nr(e){var t=e.effects;if(t!==null){e.effects=null;for(var i=0;i<t.length;i+=1)mt(t[i])}}var mo=[];function Sd(e){for(var t=e.parent;t!==null;){if((t.f&2)===0)return t;t=t.parent}return null}function go(e){var t,i=ve;if(_t(Sd(e)),Q){let n=Pi;ho(new Set);try{mo.includes(e)&&ds(),mo.push(e),nr(e),t=rr(e)}finally{_t(i),ho(n),mo.pop()}}else try{nr(e),t=rr(e)}finally{_t(i)}return t}function _o(e){var t=go(e);if(e.equals(t)||(e.v=t,e.wv=Mn()),!_i){var i=(yi||(e.f&256)!==0)&&e.deps!==null?4096:1024;wt(e,i)}}var Pi=new Set,Xi=new Map;function ho(e){Pi=e}function di(e,t){var i={f:0,v:e,reactions:null,equals:er,rv:0,wv:0};return Q&&li&&(i.created=t??hi("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function Fe(e,t){let i=di(e,t);return ar(i),i}function xi(e,t=!1,i=!0){let n=di(e);return t||(n.equals=Ji),si&&i&&Te!==null&&Te.l!==null&&(Te.l.s??=[]).push(n),n}function Se(e,t,i=!1){ge!==null&&(!Rt||(ge.f&262144)!==0)&&ui()&&(ge.f&262162)!==0&&!(Ot?.[1].includes(e)&&Ot[0]===ge)&&xs();let n=i?yt(t):t;return Q&&tr(n,e.label),sr(e,n)}function sr(e,t){if(!e.equals(t)){var i=e.v;if(_i?Xi.set(e,t):Xi.set(e,i),e.v=t,Q&&li&&(e.updated=hi("UpdatedAt"),ve!==null&&(e.set_during_effect=!0)),(e.f&2)!==0&&((e.f&2048)!==0&&go(e),wt(e,(e.f&256)===0?1024:4096)),e.wv=Mn(),ws(e,2048),ui()&&ve!==null&&(ve.f&1024)!==0&&(ve.f&96)===0&&(Pt===null?Ts([e]):Pt.push(e)),Q&&Pi.size>0){let n=Array.from(Pi);for(let r of n)(r.f&1024)!==0&&wt(r,4096),Ri(r)&&tn(r);Pi.clear()}}return t}function ws(e,t){var i=e.reactions;if(i!==null)for(var n=ui(),r=i.length,o=0;o<r;o++){var s=i[o],d=s.f;if((d&2048)===0&&!(!n&&s===ve)){if(Q&&(d&262144)!==0){Pi.add(s);continue}wt(s,t),(d&1280)!==0&&((d&2)!==0?ws(s,4096):kn(s))}}}var lr="font-weight: bold",ur="font-weight: normal";function Ms(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`,lr,ur):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Vi(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`,lr,ur):console.warn("https://svelte.dev/e/hydration_mismatch")}function Is(){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`,lr,ur):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function dr(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`,lr,ur):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var me=!1;function jt(e){me=e}var Ee;function rt(e){if(e===null)throw Vi(),mi;return Ee=e}function xt(){return rt(Tt(Ee))}function ie(e){if(me){if(Tt(Ee)!==null)throw Vi(),mi;Ee=e}}function nn(e=1){if(me){for(var t=e,i=Ee;t--;)i=Tt(i);Ee=i}}function Nn(){for(var e=0,t=Ee;;){if(t.nodeType===Zt){var i=t.data;if(i===Gi){if(e===0)return t;e-=1}else(i===Ti||i===$i)&&(e+=1)}var n=Tt(t);t.remove(),t=n}}function yo(e){if(!e||e.nodeType!==Zt)throw Vi(),mi;return e.data}function ks(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:i,lastIndexOf:n,includes:r}=e;e.indexOf=function(o,s){let d=i.call(this,o,s);if(d===-1){for(let c=s??0;c<this.length;c+=1)if(ir(this[c])===o){dr("array.indexOf(...)");break}}return d},e.lastIndexOf=function(o,s){let d=n.call(this,o,s??this.length-1);if(d===-1){for(let c=0;c<=(s??this.length-1);c+=1)if(ir(this[c])===o){dr("array.lastIndexOf(...)");break}}return d},e.includes=function(o,s){let d=r.call(this,o,s);if(!d){for(let c=0;c<this.length;c+=1)if(ir(this[c])===o){dr("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{e.indexOf=i,e.lastIndexOf=n,e.includes=r}}var bo,Ns,Dn,Ds,Ls;function cr(){if(bo===void 0){bo=window,Ns=document,Dn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,i=Text.prototype;Ds=It(t,"firstChild").get,Ls=It(t,"nextSibling").get,uo(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),uo(i)&&(i.__t=void 0),Q&&(e.__svelte_meta=null,ks())}}function ti(e=""){return document.createTextNode(e)}function ot(e){return Ds.call(e)}function Tt(e){return Ls.call(e)}function ne(e,t){if(!me)return ot(e);var i=ot(Ee);if(i===null)i=Ee.appendChild(ti());else if(t&&i.nodeType!==bn){var n=ti();return i?.before(n),rt(n),n}return rt(i),i}function rn(e,t){if(!me){var i=ot(e);return i.nodeType===8&&i.data===""?Tt(i):i}if(t&&Ee?.nodeType!==bn){var n=ti();return Ee?.before(n),rt(n),n}return Ee}function ce(e,t=1,i=!1){let n=me?Ee:e;for(var r;t--;)r=n,n=Tt(n);if(!me)return n;if(i&&n?.nodeType!==bn){var o=ti();return n===null?r?.after(o):n.before(o),rt(o),o}return rt(n),n}function pr(e){e.textContent=""}function $s(e){ve===null&&ge===null&&fs(e),ge!==null&&(ge.f&256)!==0&&ve===null&&ps(),_i&&cs(e)}function wd(e,t){var i=t.last;i===null?t.last=t.first=e:(i.next=e,e.prev=i,t.last=e)}function ji(e,t,i,n=!0){var r=ve;if(Q)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var o={ctx:Te,deps:null,nodes_start:null,nodes_end:null,f:e|2048,first:null,fn:t,last:null,next:null,parent:r,prev:null,teardown:null,transitions:null,wv:0};if(Q&&(o.component_function=Xt),i)try{tn(o),o.f|=32768}catch(c){throw mt(o),c}else t!==null&&kn(o);var s=i&&o.deps===null&&o.first===null&&o.nodes_start===null&&o.teardown===null&&(o.f&1048704)===0;if(!s&&n&&(r!==null&&wd(o,r),ge!==null&&(ge.f&2)!==0)){var d=ge;(d.effects??=[]).push(o)}return o}function St(e){let t=ji(8,null,!1);return wt(t,1024),t.teardown=e,t}function Ei(e){$s("$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 vr(e){let t=ji(64,e,!0);return()=>{mt(t)}}function Os(e){let t=ji(64,e,!0);return(i={})=>new Promise(n=>{i.outro?ni(t,()=>{mt(t),n(void 0)}):(mt(t),n(void 0))})}function Nt(e){return ji(4,e,!1)}function Et(e){return ji(8,e,!0)}function ze(e,t=[],i=vi){if(Q)return Et(()=>{var r=ve,o=()=>e(...s.map(P));at(r.fn,"name",{value:"{expression}"}),at(o,"name",{value:"{expression}"});let s=t.map(i);ht(o)});let n=t.map(i);return ht(()=>e(...n.map(P)))}function ht(e,t=0){return ji(24|t,e,!0)}function vt(e,t=!0){return ji(40,e,!0,t)}function Ao(e){var t=e.teardown;if(t!==null){let i=_i,n=ge;xo(!0),ct(null);try{t.call(null)}finally{xo(i),ct(n)}}}function So(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:mt(i,t),i=n}}function Ps(e){for(var t=e.first;t!==null;){var i=t.next;(t.f&32)===0&&mt(t),t=i}}function mt(e,t=!0){var i=!1;(t||(e.f&524288)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(Rs(e.nodes_start,e.nodes_end),i=!0),So(e,t&&!i),Cn(e,0),wt(e,16384);var n=e.transitions;if(n!==null)for(let o of n)o.stop();Ao(e);var r=e.parent;r!==null&&r.first!==null&&wo(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 Rs(e,t){for(;e!==null;){var i=e===t?null:Tt(e);e.remove(),e=i}}function wo(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 ni(e,t){var i=[];To(e,i,!0),Vs(i,()=>{mt(e),t&&t()})}function Vs(e,t){var i=e.length;if(i>0){var n=()=>--i||t();for(var r of e)r.out(n)}else t()}function To(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 r=n.next,o=(n.f&65536)!==0||(n.f&32)!==0;To(n,t,o?i:!1),n=r}}}function on(e){js(e,!0)}function js(e,t){if((e.f&8192)!==0){e.f^=8192;for(var i=e.first;i!==null;){var n=i.next,r=(i.f&65536)!==0||(i.f&32)!==0;js(i,r?t:!1),i=n}if(e.transitions!==null)for(let o of e.transitions)(o.is_global||t)&&o.in()}}var $n=[],Mo=[];function Us(){var e=$n;$n=[],Ki(e)}function Td(){var e=Mo;Mo=[],Ki(e)}function ri(e){$n.length===0&&queueMicrotask(Us),$n.push(e)}function zs(){$n.length>0&&Us(),Mo.length>0&&Td()}function Hs(e){var t=ve;if(Q&&e instanceof Error&&Md(e,t),(t.f&32768)===0){if((t.f&128)===0)throw e;t.fn(e)}else On(e,t)}function On(e,t){for(;t!==null;){if((t.f&128)!==0)try{t.fn(e);return}catch{}t=t.parent}throw e}var Fs=new WeakSet;function Md(e,t){if(Fs.has(e))return;Fs.add(e);let i=It(e,"message");if(!(i&&!i.configurable)){for(var n=Dn?" ":" ",r=`
34
- ${n}in ${t.fn?.name||"<unknown>"}`,o=t.ctx;o!==null;)r+=`
35
- ${n}in ${o.function?.[qt].split("/").pop()}`,o=o.p;at(e,"message",{value:e.message+`
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 iB(e){return!iz(e,this.v)}var iq=!1;function iW(e,t){var i,n;return e.label=t,i=e.v,n=t,i?.[i$]?.(n),e}var iU=null,iQ=null,iH=null;function iK(e){return iX("getContext").get(e)}function iG(e,t){let i=iX("setContext");return i.set(e,t),t}function iJ(e,t=!1,i){(iU={p:iU,i:!1,c:null,e:null,s:e,x:null,l:iq&&!t?{s:null,u:null,$:[]}:null}).function=i,iH=i}function iY(e){var t=iU,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,iU=t.p,iH=iU?.function??null,e??{}}function iZ(){return!iq||null!==iU&&null===iU.l}function iX(e){return null===iU&&iT(e),iU.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}(iU)||void 0)}var i0=[];function i1(){var e=i0;i0=[],iw(e)}function i2(e){if(0===i0.length&&!na){var t=i0;queueMicrotask(()=>{t===i0&&i1()})}i0.push(e)}var i4=new WeakMap;function i5(e){var t=ri;if(null===t)return re.f|=8388608,e;if(e instanceof Error&&!i4.has(e)&&i4.set(e,function(e,t){let i=ih(e,"message");if(!i||i.configurable){for(var n=c?" ":" ",r=`
13
+ ${n}in ${t.fn?.name||"<unknown>"}`,o=t.ctx;null!==o;)r+=`
14
+ ${n}in ${o.function?.[ia].split("/").pop()}`,o=o.p;return{message:e.message+`
36
15
  ${r}
37
- `}),e.stack&&at(e,"stack",{value:e.stack.split(`
38
- `).filter(s=>!s.includes("svelte/src/internal")).join(`
39
- `)})}}var Ui=!1,an=null,zi=!1,_i=!1;function xo(e){_i=e}var Pn=[],Rn=[],ge=null,Rt=!1;function ct(e){ge=e}var ve=null;function _t(e){ve=e}var Ot=null;function ar(e){ge!==null&&ge.f&2097152&&(Ot===null?Ot=[ge,[e]]:Ot[1].push(e))}var Mt=null,Ut=0,Pt=null;function Ts(e){Pt=e}var Ys=1,_r=0,yi=!1,yr=null;function Mn(){return++Ys}function Ri(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){var i=e.deps,n=(t&256)!==0;if(i!==null){var r,o,s=(t&512)!==0,d=n&&ve!==null&&!yi,c=i.length;if(s||d){var h=e,p=h.parent;for(r=0;r<c;r++)o=i[r],(s||!o?.reactions?.includes(h))&&(o.reactions??=[]).push(h);s&&(h.f^=512),d&&p!==null&&(p.f&256)===0&&(h.f^=256)}for(r=0;r<c;r++)if(o=i[r],Ri(o)&&_o(o),o.wv>e.wv)return!0}(!n||ve!==null&&!yi)&&wt(e,1024)}return!1}function Ws(e,t,i=!0){var n=e.reactions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];Ot?.[1].includes(e)&&Ot[0]===ge||((o.f&2)!==0?Ws(o,t,!1):t===o&&(i?wt(o,2048):(o.f&1024)!==0&&wt(o,4096),kn(o)))}}function rr(e){var t=Mt,i=Ut,n=Pt,r=ge,o=yi,s=Ot,d=Te,c=Rt,h=e.f;Mt=null,Ut=0,Pt=null,yi=(h&256)!==0&&(Rt||!zi||ge===null),ge=(h&96)===0?e:null,Ot=null,An(e.ctx),Rt=!1,_r++,e.f|=2097152;try{var p=(0,e.fn)(),a=e.deps;if(Mt!==null){var u;if(Cn(e,Ut),a!==null&&Ut>0)for(a.length=Ut+Mt.length,u=0;u<Mt.length;u++)a[Ut+u]=Mt[u];else e.deps=a=Mt;if(!yi||(h&2)!==0&&e.reactions!==null)for(u=Ut;u<a.length;u++)(a[u].reactions??=[]).push(e)}else a!==null&&Ut<a.length&&(Cn(e,Ut),a.length=Ut);if(ui()&&Pt!==null&&!Rt&&a!==null&&(e.f&6146)===0)for(u=0;u<Pt.length;u++)Ws(Pt[u],e);return r!==null&&r!==e&&(_r++,Pt!==null&&(n===null?n=Pt:n.push(...Pt))),p}catch(m){Hs(m)}finally{Mt=t,Ut=i,Pt=n,ge=r,yi=o,Ot=s,An(d),Rt=c,e.f^=2097152}}function Id(e,t){let i=t.reactions;if(i!==null){var n=as.call(i,e);if(n!==-1){var r=i.length-1;r===0?i=t.reactions=null:(i[n]=i[r],i.pop())}}i===null&&(t.f&2)!==0&&(Mt===null||!Mt.includes(t))&&(wt(t,4096),(t.f&768)===0&&(t.f^=512),nr(t),Cn(t,0))}function Cn(e,t){var i=e.deps;if(i!==null)for(var n=t;n<i.length;n++)Id(e,i[n])}function tn(e){var t=e.f;if((t&16384)===0){wt(e,1024);var i=ve,n=zi;if(ve=e,zi=!0,Q){var r=Xt;Sn(e.component_function)}try{(t&16)!==0?Ps(e):So(e),Ao(e);var o=rr(e);if(e.teardown=typeof o=="function"?o:null,e.wv=Ys,Q&&li&&(e.f&2048)!==0&&e.deps!==null)for(var s of e.deps)s.set_during_effect&&(s.wv=Mn(),s.set_during_effect=!1);Q&&Rn.push(e)}finally{zi=n,ve=i,Q&&Sn(r)}}}function Qs(){console.error("Last ten effects were: ",Rn.slice(-10).map(e=>e.fn)),Rn=[]}function kd(){try{ms()}catch(e){if(Q&&at(e,"stack",{value:""}),an!==null)if(Q)try{On(e,an)}catch(t){throw Qs(),t}else On(e,an);else throw Q&&Qs(),e}}function ko(){var e=zi;try{var t=0;for(zi=!0;Pn.length>0;){t++>1e3&&kd();var i=Pn,n=i.length;Pn=[];for(var r=0;r<n;r++){var o=Dd(i[r]);Nd(o)}Xi.clear()}}finally{Ui=!1,zi=e,an=null,Q&&(Rn=[])}}function Nd(e){var t=e.length;if(t!==0)for(var i=0;i<t;i++){var n=e[i];(n.f&24576)===0&&Ri(n)&&(tn(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?wo(n):n.fn=null))}}function kn(e){Ui||(Ui=!0,queueMicrotask(ko));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}}Pn.push(t)}function Dd(e){for(var t=[],i=e;i!==null;){var n=i.f,r=(n&96)!==0,o=r&&(n&1024)!==0;if(!o&&(n&8192)===0){(n&4)!==0?t.push(i):r?i.f^=1024:Ri(i)&&tn(i);var s=i.first;if(s!==null){i=s;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)i=d.next,d=d.parent}return t}function Vn(e){var t;for(e&&(Ui=!0,ko(),Ui=!0,t=e());;){if(zs(),Pn.length===0)return Ui=!1,an=null,Q&&(Rn=[]),t;Ui=!0,ko()}}function P(e){var t=e.f,i=(t&2)!==0;if(yr!==null&&yr.add(e),ge!==null&&!Rt){if(!Ot?.[1].includes(e)||Ot[0]!==ge){var n=ge.deps;e.rv<_r&&(e.rv=_r,Mt===null&&n!==null&&n[Ut]===e?Ut++:Mt===null?Mt=[e]:(!yi||!Mt.includes(e))&&Mt.push(e))}}else if(i&&e.deps===null&&e.effects===null){var r=e,o=r.parent;o!==null&&(o.f&256)===0&&(r.f^=256)}if(i&&(r=e,Ri(r)&&_o(r)),Q&&li&&!Rt&&xn!==null&&ge!==null&&xn.reaction===ge)if(e.trace)e.trace();else{var s=hi("TracedAt");if(s){var d=xn.entries.get(e);d===void 0&&(d={traces:[]},xn.entries.set(e,d));var c=d.traces[d.traces.length-1];s.stack!==c?.stack&&d.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 Ld=-7169;function wt(e,t){e.f=e.f&Ld|t}var No=new Set,br=new Set;function sn(e){for(var t=0;t<e.length;t++)No.add(e[t]);for(var i of br)i(e)}function jn(e){var t=this,i=t.ownerDocument,n=e.type,r=e.composedPath?.()||[],o=r[0]||e.target,s=0,d=e.__root;if(d){var c=r.indexOf(d);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var h=r.indexOf(t);if(h===-1)return;c<=h&&(s=c)}if(o=r[s]||e.target,o!==t){at(e,"currentTarget",{configurable:!0,get(){return o||i}});var p=ge,a=ve;ct(null),_t(null);try{for(var u,m=[];o!==null;){var b=o.assignedSlot||o.parentNode||o.host||null;try{var y=o["__"+n];if(y!=null&&(!o.disabled||e.target===o))if(Kt(y)){var[g,...D]=y;g.apply(o,[e,...D])}else y.call(o,e)}catch(N){u?m.push(N):u=N}if(e.cancelBubble||b===t||b===null)break;o=b}if(u){for(let N of m)queueMicrotask(()=>{throw N});throw u}}finally{e.__root=t,delete e.currentTarget,ct(p),_t(a)}}}var $d;function qs(){$d=void 0}function Un(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 ke(e,t){var i=(t&1)!==0,n=(t&2)!==0,r,o=!e.startsWith("<!>");return()=>{if(me)return zt(Ee,null),Ee;r===void 0&&(r=Un(o?e:"<!>"+e),i||(r=ot(r)));var s=n||Dn?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=ot(s),c=s.lastChild;zt(d,c)}else zt(s,s);return s}}function Rd(e,t,i="svg"){var n=!e.startsWith("<!>"),r=(t&1)!==0,o=`<${i}>${n?e:"<!>"+e}</${i}>`,s;return()=>{if(me)return zt(Ee,null),Ee;if(!s){var d=Un(o),c=ot(d);if(r)for(s=document.createDocumentFragment();ot(c);)s.appendChild(ot(c));else s=ot(c)}var h=s.cloneNode(!0);if(r){var p=ot(h),a=h.lastChild;zt(p,a)}else zt(h,h);return h}}function ci(e,t){return Rd(e,t,"svg")}function Do(){if(me)return zt(Ee,null),Ee;var e=document.createDocumentFragment(),t=document.createComment(""),i=ti();return e.append(t,i),zt(t,i),e}function pe(e,t){if(me){ve.nodes_end=Ee,xt();return}e!==null&&e.before(t)}var Vd=["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 gv=[...Vd,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var jd=["touchstart","touchmove"];function Js(e){return jd.includes(e)}var Ud=["$state","$state.raw","$derived","$derived.by"],_v=[...Ud,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var Lo=!0;function Je(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 Xs(e,t)}function $o(e,t){cr(),t.intro=t.intro??!1;let i=t.target,n=me,r=Ee;try{for(var o=ot(i);o&&(o.nodeType!==Zt||o.data!==Ti);)o=Tt(o);if(!o)throw mi;jt(!0),rt(o),xt();let s=Xs(e,{...t,anchor:o});if(Ee===null||Ee.nodeType!==Zt||Ee.data!==Gi)throw Vi(),mi;return jt(!1),s}catch(s){if(s===mi)return t.recover===!1&&hs(),cr(),pr(i),jt(!1),Ii(e,t);throw s}finally{jt(n),rt(r),qs()}}var ln=new Map;function Xs(e,{target:t,anchor:i,props:n={},events:r,context:o,intro:s=!0}){cr();var d=new Set,c=a=>{for(var u=0;u<a.length;u++){var m=a[u];if(!d.has(m)){d.add(m);var b=Js(m);t.addEventListener(m,jn,{passive:b});var y=ln.get(m);y===void 0?(document.addEventListener(m,jn,{passive:b}),ln.set(m,1)):ln.set(m,y+1)}}};c(oo(No)),br.add(c);var h=void 0,p=Os(()=>{var a=i??t.appendChild(ti());return vt(()=>{if(o){st({});var u=Te;u.c=o}r&&(n.$$events=r),me&&zt(a,null),Lo=s,h=e(a,n)||{},Lo=!0,me&&(ve.nodes_end=Ee),o&&lt()}),()=>{for(var u of d){t.removeEventListener(u,jn);var m=ln.get(u);--m===0?(document.removeEventListener(u,jn),ln.delete(u)):ln.set(u,m)}br.delete(c),a!==i&&a.parentNode?.removeChild(a)}});return Co.set(h,p),h}var Co=new WeakMap;function zn(e,t){let i=Co.get(e);return i?(Co.delete(e),i(t)):(Q&&Is(),Promise.resolve())}function xr(e,t,...i){var n=e,r=dt,o;ht(()=>{r!==(r=t())&&(o&&(mt(o),o=null),Q&&r==null&&vs(),o=vt(()=>r(n,...i)))},65536),me&&(n=Ee)}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;_s(t)},set:n=>{i=n}})}};Qd=e,e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}var Qd;function un(e){Te===null&&En("onMount"),si&&Te.l!==null?Hd(Te).m.push(e):Ei(()=>{let t=Ge(e);if(typeof t=="function")return t})}function Hd(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var nl=new Map;function rl(e,t){var i=nl.get(e);i||(i=new Set,nl.set(e,i)),i.add(t)}function Qe(e,t,[i,n]=[0,0]){me&&i===0&&xt();var r=e,o=null,s=null,d=et,c=i>0?65536:0,h=!1;let p=(u,m=!0)=>{h=!0,a(m,u)},a=(u,m)=>{if(d===(d=u))return;let b=!1;if(me&&n!==-1){if(i===0){let g=yo(r);g===Ti?n=0:g===$i?n=1/0:(n=parseInt(g.substring(1)),n!==n&&(n=d?1/0:-1))}let y=n>i;!!d===y&&(r=Nn(),rt(r),jt(!1),b=!0,n=-1)}d?(o?on(o):m&&(o=vt(()=>m(r))),s&&ni(s,()=>{s=null})):(s?on(s):m&&(s=vt(()=>m(r,[i+1,n]))),o&&ni(o,()=>{o=null})),b&&jt(!0)};ht(()=>{h=!1,t(p),h||a(null,null)},c),me&&(r=Ee)}function Oo(e,t,i){me&&xt();var n=e,r=et,o,s=ui()?us:Zi;ht(()=>{s(r,r=t())&&(o&&ni(o),o=vt(()=>i(n)))}),me&&(n=Ee)}var Vo;function ol(e){return Vo=e.target,new Ro(e)}var Ro=class{#t;#e;constructor(t){var i=new Map,n=(o,s)=>{var d=xi(s,!1,!1);return i.set(o,d),d};let r=new Proxy({...t.props||{},$$events:{}},{get(o,s){return P(i.get(s)??n(s,Reflect.get(o,s)))},has(o,s){return s===yn?!0:(P(i.get(s)??n(s,Reflect.get(o,s))),Reflect.has(o,s))},set(o,s,d){return Se(i.get(s)??n(s,d),d),Reflect.set(o,s,d)}});this.#e=(t.hydrate?$o:Ii)(t.component,{target:t.target,anchor:t.anchor,props:r,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&Vn(),this.#t=r.$$events;for(let o of Object.keys(this.#e))o==="$set"||o==="$destroy"||o==="$on"||at(this,o,{get(){return this.#e[o]},set(s){this.#e[o]=s},enumerable:!0});this.#e.$set=o=>{Object.assign(r,o)},this.#e.$destroy=()=>{zn(this.#e)}}$set(t){this.#e.$set(t)}$on(t,i){this.#t[t]=this.#t[t]||[];let n=(...r)=>i.call(this,...r);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(r=>r!==n)}}$destroy(){this.#e.$destroy()}};function ut(e,t){ri(()=>{var i=e.getRootNode(),n=i.host?i:i.head??i.ownerDocument.head??Vo?.parentNode;if(!n?.querySelector("#"+t.hash)){let r=document.createElement("style");r.id=t.hash,r.textContent=t.code,n.appendChild(r),Q&&rl(t.hash,r)}})}var sl=[...`
40
- \r\f \v\uFEFF`];function ul(e,t,i){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),i){for(var r in i)if(i[r])n=n?n+" "+r:r;else if(n.length)for(var o=r.length,s=0;(s=n.indexOf(r,s))>=0;){var d=s+o;(s===0||sl.includes(n[s-1]))&&(d===n.length||sl.includes(n[d]))?n=(s===0?"":n.substring(0,s))+n.substring(d+1):s=d}}return n===""?null:n}function ll(e,t=!1){var i=t?" !important;":";",n="";for(var r in e){var o=e[r];o!=null&&o!==""&&(n+=" "+r+": "+o+i)}return n}function jo(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function dl(e,t){if(t){var i="",n,r;if(Array.isArray(t)?(n=t[0],r=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,s=0,d=!1,c=[];n&&c.push(...Object.keys(n).map(jo)),r&&c.push(...Object.keys(r).map(jo));var h=0,p=-1;let y=e.length;for(var a=0;a<y;a++){var u=e[a];if(d?u==="/"&&e[a-1]==="*"&&(d=!1):o?o===u&&(o=!1):u==="/"&&e[a+1]==="*"?d=!0:u==='"'||u==="'"?o=u:u==="("?s++:u===")"&&s--,!d&&o===!1&&s===0){if(u===":"&&p===-1)p=a;else if(u===";"||a===y-1){if(p!==-1){var m=jo(e.substring(h,p).trim());if(!c.includes(m)){u!==";"&&a++;var b=e.substring(h,a).trim();i+=" "+b+";"}}h=a+1,p=-1}}}}return n&&(i+=ll(n)),r&&(i+=ll(r,!0)),i=i.trim(),i===""?null:i}return e==null?null:String(e)}function dn(e,t,i,n,r,o){var s=e.__className;if(me||s!==i||s===void 0){var d=ul(i,n,o);(!me||d!==e.getAttribute("class"))&&(d==null?e.removeAttribute("class"):t?e.className=d:e.setAttribute("class",d)),e.__className=i}else if(o&&r!==o)for(var c in o){var h=!!o[c];(r==null||h!==!!r[c])&&e.classList.toggle(c,h)}return o}function Uo(e,t={},i,n){for(var r in i){var o=i[r];t[r]!==o&&(i[r]==null?e.style.removeProperty(r):e.style.setProperty(r,o,n))}}function ki(e,t,i,n){var r=e.__style;if(me||r!==t){var o=dl(t,n);(!me||o!==e.getAttribute("style"))&&(o==null?e.removeAttribute("style"):e.style.cssText=o),e.__style=t}else n&&(Array.isArray(n)?(Uo(e,i?.[0],n[0]),Uo(e,i?.[1],n[1],"important")):Uo(e,i,n));return n}var sc=Symbol("class"),lc=Symbol("style"),uc=Symbol("is custom element"),dc=Symbol("is html");function Ft(e,t,i,n){var r=cc(e);if(me&&(r[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||fc(e,t,i??"");return}r[t]!==(r[t]=i)&&(t==="loading"&&(e[ls]=i),i==null?e.removeAttribute(t):typeof i!="string"&&pc(e).includes(t)?e[t]=i:e.setAttribute(t,i))}function cc(e){return e.__attributes??={[uc]:e.nodeName.includes("-"),[dc]:e.namespaceURI===rs}}var cl=new Map;function pc(e){var t=cl.get(e.nodeName);if(t)return t;cl.set(e.nodeName,t=[]);for(var i,n=e,r=Element.prototype;r!==n;){i=so(n);for(var o in i)i[o].set&&t.push(o);n=qi(n)}return t}function fc(e,t,i){Q&&(t==="srcset"&&mc(e,i)||zo(e.getAttribute(t)??"",i)||Ms(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(i)))}function zo(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function pl(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function mc(e,t){var i=pl(e.srcset),n=pl(t);return n.length===i.length&&n.every(([r,o],s)=>o===i[s][1]&&(zo(i[s][0],r)||zo(r,i[s][0])))}function fl(e,t){return e===t||e?.[kt]===t}function Fi(e={},t,i,n){return Nt(()=>{var r,o;return Et(()=>{r=o,o=n?.()||[],Ge(()=>{e!==i(...o)&&(t(e,...o),r&&fl(i(...r),e)&&t(null,...r))})}),()=>{ri(()=>{o&&fl(i(...o),e)&&t(null,...o)})}}),e}function Fn(e,t,i){if(e==null)return t(void 0),i&&i(void 0),dt;let n=Ge(()=>e.subscribe(t,i));return n.unsubscribe?()=>n.unsubscribe():n}var cn=[];function Yt(e,t){return{subscribe:z(e,t).subscribe}}function z(e,t=dt){let i=null,n=new Set;function r(d){if(Zi(e,d)&&(e=d,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 o(d){r(d(e))}function s(d,c=dt){let h=[d,c];return n.add(h),n.size===1&&(i=t(r,o)||dt),d(e),()=>{n.delete(h),n.size===0&&i&&(i(),i=null)}}return{set:r,update:o,subscribe:s}}function tt(e,t,i){let n=!Array.isArray(e),r=n?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let o=t.length<2;return Yt(i,(s,d)=>{let c=!1,h=[],p=0,a=dt,u=()=>{if(p)return;a();let b=t(n?h[0]:h,s,d);o?s(b):a=typeof b=="function"?b:dt},m=r.map((b,y)=>Fn(b,g=>{h[y]=g,p&=~(1<<y),c&&u()},()=>{p|=1<<y}));return c=!0,u(),function(){Ki(m),a(),c=!1}})}function _e(e){let t;return Fn(e,i=>t=i)(),t}var Ar=!1,Fo=Symbol();function oi(e,t,i){let n=i[t]??={store:null,source:xi(void 0),unsubscribe:dt};if(n.store!==e&&!(Fo in i))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=dt;else{var r=!0;n.unsubscribe=Fn(e,o=>{r?n.source.v=o:Se(n.source,o)}),r=!1}return e&&Fo in i?_e(e):P(n.source)}function Hi(){let e={};function t(){St(()=>{for(var i in e)e[i].unsubscribe();at(e,Fo,{enumerable:!1,value:!0})})}return[e,t]}function Ho(e){var t=Ar;try{return Ar=!1,[e(),Ar]}finally{Ar=t}}function ml(e){return e.ctx?.d??!1}function ye(e,t,i,n){var r=(i&1)!==0,o=!si||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,c=!1,h;s?[h,c]=Ho(()=>e[t]):h=e[t];var p=kt in e||yn in e,a=s&&(It(e,t)?.set??(p&&t in e&&(M=>e[t]=M)))||void 0,u=n,m=!0,b=!1,y=()=>(b=!0,m&&(m=!1,d?u=Ge(n):u=n),u);h===void 0&&n!==void 0&&(a&&o&&gs(t),h=y(),a&&a(h));var g;if(o)g=()=>{var M=e[t];return M===void 0?y():(m=!0,b=!1,M)};else{var D=(r?vi:or)(()=>e[t]);D.f|=131072,g=()=>{var M=P(D);return M!==void 0&&(u=void 0),M===void 0?u:M}}if((i&4)===0&&o)return g;if(a){var N=e.$$legacy;return function(M,f){return arguments.length>0?((!o||!f||N||c)&&a(f?g():M),M):g()}}var k=!1,x=!1,S=xi(h),w=vi(()=>{var M=g(),f=P(S);return k?(k=!1,x=!0,f):(x=!1,S.v=M)});return s&&P(w),r||(w.equals=Ji),function(M,f){if(yr!==null&&(k=x,g(),P(S)),arguments.length>0){let W=f?P(w):o&&s?yt(M):M;if(!w.equals(W)){if(k=!0,Se(S,W),b&&u!==void 0&&(u=W),ml(w))return M;Ge(()=>P(w))}return M}return ml(w)?w.v:P(w)}}var Ac;typeof HTMLElement=="function"&&(Ac=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,i){super(),this.$$ctor=e,this.$$s=t,i&&this.attachShadow({mode:"open"})}addEventListener(e,t,i){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,i)}removeEventListener(e,t,i){if(super.removeEventListener(e,t,i),this.$$c){let n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(r){return o=>{let s=document.createElement("slot");r!=="default"&&(s.name=r),pe(o,s)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let i={},n=Sc(this);for(let r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=t(r),i.default=!0):i[r]=t(r));for(let r of this.attributes){let o=this.$$g_p(r.name);o in this.$$d||(this.$$d[o]=Qo(o,r.value,this.$$p_d,"toProp"))}for(let r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=ol({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:i,$$host:this}}),this.$$me=vr(()=>{Et(()=>{this.$$r=!0;for(let r of ao(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];let o=Qo(r,this.$$d[r],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,o)}this.$$r=!1})});for(let r in this.$$l)for(let o of this.$$l[r]){let s=this.$$c.$on(r,o);this.$$l_u.set(o,s)}this.$$l={}}}attributeChangedCallback(e,t,i){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Qo(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 ao(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Qo(e,t,i,n){let r=i[e]?.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!i[e])return t;if(n==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Sc(e){let t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}var hl="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(hl);import{areValidLiveRecordSources as $p}from"@vkontakte/videoplayer-core";import"@vkontakte/videoplayer-core";import{safeStorage as Op}from"@vkontakte/videoplayer-shared";import{SeekAction as Pp}from"@vkontakte/videoplayer-statistics";import{InterfaceLanguage as wc,fillWithDefault as Tc,VideoQuality as vl}from"@vkontakte/videoplayer-shared";var Mc={debugLog:!1,devNullLog:!1,defaultLanguage:wc.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:vl.Q_480P,highQualityLimit:vl.Q_720P,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,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"},gl=e=>Tc(e,Mc),_l=e=>Tn("ui-config",e),pn=()=>wn("ui-config");var Hn="vk_player_debug_panel_opened";var yl="videoplayer",bl="videoplayer";import{assertNonNullable as Ic,VERSION as kc}from"@vkontakte/videoplayer-shared";import{VERSION as Nc}from"@vkontakte/videoplayer-core";import{VERSION as Dc}from"@vkontakte/videoplayer-statistics";var Sr="prod",fn="1.0.3-beta.0";var xl=(e,t,i)=>{let n=document.createElement("a");n.href=e,n.download=`${t}.${i}`,n.style.display="none",n.click()};var El=Symbol("storeContext"),Al=e=>{Tn(El,e),Sr==="dev"&&(window.app={store:e})},Ni=()=>{let e=wn(El);return Ic(e,"Store context is empty!"),e},Oe=(e,t)=>Tr(e,e.getValue(),t),Tr=(e,t,i)=>Yt(t,n=>{let r=e.subscribe(o=>{n(o),i?.(o)});return()=>r.unsubscribe()}),Sl=(e,t,i,n,r=["meta config not provided"])=>{let o=e.info,{width:s,height:d}=_e(i.ui.playerSize),c=o.throughputEstimation$.getValue()?.toFixed(0)??0,h=o.rttEstimation$.getValue()?.toFixed(0)??0,p=o.isAutoQualityEnabled$.getValue()?"auto":"manual",a=`${fn} (core: ${Nc}, stat: ${Dc}, shared: ${kc})`,u=_e(i.state.errorLog$),m=u.length?`
41
- `+u.map((f,W)=>{let _=`${W}) Type: ${f.id}
42
- `,C=`Message: ${f.message} (${f.thrown})
43
- `,R=`Trace: ${f.thrown?.stack}
44
- `;return _+C+R}).join(`
45
- `):void 0,b=i.state.isAudioDisabled?"disabled":_e(i.state.isAudioAvailable$)?void 0:"unavailable",y=e.info.currentVideoStream$.getValue(),g=e.info.currentAudioStream$.getValue(),D=[];y&&D.push(`Video: ${y?.codec??""}`+(y?.hdr?" (HDR)":"")),g&&D.push(`Audio: ${g?.codec??""}`+(g?.language?` (${g.language})`:""));let N=o.currentQuality$.getValue(),k="";if(N){let f=o.availableQualitiesFps$.getValue()[N];k=f?`${f}fps`:""}let x=o.httpConnectionType$.getValue(),S=o.currentBuffer$.getValue()?.end??0,w=Math.max(S-_e(i.state.positionExact$),0),M={Version:a,Browser:navigator.userAgent,Config:r.join(", "),"United video id":String(i.videoId),TraceId:n,VSID:_e(i.vsid),"Content host":o.hostname$.getValue(),"Connection type":x?x+(o.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${c}Kbps @ ${h}ms RTT`,Format:o.currentFormat$.getValue(),"Available Formats":t?.sources?Object.keys(t.sources).join(", "):"",Streams:D.join(", "),Quality:`${p} ${N??""} ${k}`,"Available qualities":o.availableQualities$.getValue().join(", "),Audio:b,Position:`${_e(i.state.positionExact$)}s`,Buffer:`${w}s`,State:`${_e(i.playerPhase)} ${o.playbackState$.getValue()??""}`,"Player size":`${s}x${d}`,URL:window.location.href,Errors:m};return Object.entries(M).filter(([f,W])=>W!==void 0).map(([f,W])=>`${f}: ${W}`).join(`
46
- `)},wl=(e,t,i)=>{let n=e.info,{width:r,height:o}=_e(i.ui.playerSize),s={version:fn,viewport:`${r}x${o}`,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(),u=n.isLive$.getValue(),m=n.liveBufferTime$.getValue();p&&a&&(u&&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 b=n.throughputEstimation$.getValue();b&&(s.speed=b);let y=n.videoBitrate$.getValue();y&&(s.bitrate=y);let g=n.liveLatency$.getValue();g&&(s.liveLatency=g);let D=n.currentVideoSegmentLength$.getValue();D&&(s.currentVideoSegmentLength=D);let N=n.currentAudioSegmentLength$.getValue();N&&(s.currentAudioSegmentLength=N);let k=_e(i.vsid);typeof k=="string"&&(s.vsid=k);let x=e.info.currentVideoStream$.getValue()?.codec;x&&(s.videoCodec=x);let S=e.info.currentAudioStream$.getValue()?.codec;S&&(s.audioCodec=S),e.info.currentVideoStream$.getValue()?.hdr&&(s.hdr=!0);let M=e.info.currentAudioStream$.getValue()?.language;return M&&(s.audioLanguage=M),s},Tl=(e,t)=>xl(e,t,"mp4"),Ml=()=>{let t=[],i=0;return{add:(n,r)=>{t[i]=[n,r],i=(i+1)%10},find:n=>t.find(([r])=>r===n)}},wr=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 Go,safeStorage as it}from"@vkontakte/videoplayer-shared";import"@vkontakte/videoplayer-core";var Lc="vk_player_",kl="vk_player_prefer_traffic_saving_enabled",Cc="vk_player_preferred_volume",$c="vk_player_prefer_volume_mute",qo="vk_player_preferred_quality",Bo="vk_player_preferred_default_quality_settings",Yo="vk_player_preferred_quality_settings_by_video",Nl="vk_player_preferred_stream_language",Dl="vk_player_preferred_rate";var Wo="vk_player_preferred_subtitles_language",Oc="vk_player_user_video_prefs",pM=`${Lc}preview_track_close_tooltip`,Pc=e=>e>1?1:e<0?0:e;var Mr=()=>{let e=it.get(Cc);return Go(e)?void 0:Pc(parseFloat(e))},Ko=(e,t)=>it.set(qo,JSON.stringify({videoId:e,value:t})),Ir=()=>it.remove(qo),Zo=e=>{let t=it.get(qo);if(Go(t))return;let{videoId:i,value:n}=JSON.parse(t);if(e!==i){Ir();return}return n},Rc=(e,t)=>{t?it.set(e,"true"):it.remove(e)},Ll=e=>it.get(e)==="true";var Cl=()=>Ll($c),Il=e=>Rc(kl,e),Jo=()=>Ll(kl),$l=()=>it.get(Nl),Ol=e=>it.set(Nl,e),Xo=()=>it.get(Wo),Vc=e=>{e?it.set(Wo,e):it.remove(Wo)},Pl=e=>it.set(Dl,JSON.stringify({rate:e})),Rl=()=>{let e=it.get(Dl);if(Go(e))return;let{rate:t}=JSON.parse(e);return t};var jc=()=>{let e=p=>{it.set(Bo,JSON.stringify(p))},t=()=>{try{let p=it.get(Bo);return p?JSON.parse(p):null}catch{return null}},i=()=>{try{let p=it.get(Yo);return p?JSON.parse(p):null}catch{return null}},n=p=>{it.set(Yo,JSON.stringify(p))},r=p=>{h(p);let a=p?i():null;if(a&&a?.videoId===p)return{...a,appliesTo:"to-video"};a&&o();let u=t();return u?{...u,appliesTo:"as-default"}:(e({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},o=()=>{it.remove(Yo)},s=()=>{it.remove(Bo)},d=(p,a="as-default")=>{p.type==="exact_quality"||a==="to-video"?n(p):e(p)},c=p=>{let a=r(p);if(a){switch(a.type){case"traffic_saving":Il(!0);break;case"exact_quality":Ko(p,a.quality)}o(),s()}},h=p=>{let a=Zo(p);if(a){n({type:"exact_quality",videoId:p,quality:a});return}Jo()&&e({type:"traffic_saving",videoId:p}),Il(!1),Ir()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:c,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:o,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:Xo,savePreferredSubtitlesLanguage:Vc}},{getPreferredQualitySettings:fM,migrateSettingsToLegacyWay:Vl,savePreferredQualitySettings:mM,savePreferredDefaultQualitySettings:hM,removePreferredQualitySettingsByVideo:vM,getPreferredDefaultQualitySettings:gM}=jc();var Uc=()=>{let e=it.get(Oc);if(e)try{return JSON.parse(e)}catch{return null}return null},kr=(e,t)=>Uc()?.[e]?.[t]??null;import"@vkontakte/videoplayer-core";var mn;(function(e){e.fatal="fatal",e.error="error",e.warning="warning",e.log="log",e.info="info",e.debug="debug",e.critical="critical"})(mn||(mn={}));var zc=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Fc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,Hc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Nr="?",Qc="X-Sentry-Auth",Bc=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Yc(e){if(!e.stack)return null;let t=[],i=e.stack.split(`
47
- `),n,r;for(let o=0;o<i.length;++o){if(n=zc.exec(i[o]))r={filename:n[2]&&n[2].indexOf("address at ")===0?n[2].substr(11):n[2],function:n[1]||Nr,lineno:n[3]?+n[3]:null,colno:n[4]?+n[4]:null};else if(n=Hc.exec(i[o]))r={filename:n[2],function:n[1]||Nr,lineno:+n[3],colno:n[4]?+n[4]:null};else if(n=Fc.exec(i[o]))o===0&&!n[5]&&e.columnNumber!==void 0&&(t[0].column=e.columnNumber+1),r={filename:n[3],function:n[1]||Nr,lineno:n[4]?+n[4]:null,colno:n[5]?+n[5]:null};else continue;!r.function&&r.lineno&&(r.function=Nr),t.push(r)}return t.length?{value:jl(e),type:e.name,stacktrace:{frames:t.reverse()}}:null}function jl(e){return(e&&e.message||"No error message").split(`
48
- `).filter(i=>!!i)[0]}function Wc(e){try{let t=Yc(e);if(t)return t}catch{}return{value:jl(e),type:e&&e.name,stacktrace:{frames:[]}}}function Gc(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var Dr=class{constructor(t){if(t&&t.dsn){let i=Bc.exec(t.dsn),n=i?i.slice(1):[],r=n[5].split("/"),o=r.slice(0,-1).join("/");this.apiUrl=n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(o?"/"+o:"")+"/api/"+r.pop()+"/store/",this.authHeader="Sentry sentry_version=7,sentry_key="+n[1]+(n[2]?",sentry_secret="+n[2]:"")}this.environment=t&&t.environment}prepare(t){return{...this.getRequestBlank(),exception:{values:[Wc(t)]}}}report(t){this.send(this.prepare(t))}send(t){!this.apiUrl||!t||this.createRequest(t)}createRequest(t){let i=new XMLHttpRequest;i.open("POST",this.apiUrl,!0),i.setRequestHeader("Content-type","application/json"),i.setRequestHeader(Qc,this.authHeader||""),i.send(JSON.stringify(t))}getRequestBlank(){return{platform:"javascript",event_id:Gc(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function Ul(e,t){return Object.prototype.toString.call(t)==="[object RegExp]"?t.test(e):typeof t=="string"?e.indexOf(t)!==-1:!1}function qc(){return window}var Lr=class e extends Dr{constructor(t,i=qc()){super(t),this.options=t,this.window=i,this.destroyed=!1,this._state={};let{plugins:n=[],beforeSend:r=h=>h,beforeBreadcrumb:o=h=>h,blacklistUrls:s=[],ignoreErrors:d=[],release:c=void 0}=this.options||{};this.plugins=n.map(h=>new h(this)),this.beforeSend=r,this.beforeBreadcrumb=o,this.blacklistUrls=s,this.ignoreErrors=d,this.release=c}get state(){return this._state}clearState(){this._state={}}setTags(t){return this.setKeyState("tags",{...t}),this}setTag(t,i){return this.extendState({tags:{[t]:i}}),this}setExtra(t,i){return this.extendState({extra:{[t]:i}}),this}setExtras(t){return this.setKeyState("extra",{...t}),this}setUser(t){return this.setKeyState("user",{...t}),this}clone(){let t=new e({...this.options,plugins:[]});return t.extendState(this.state),t}withScope(t){let i=this.clone();t(i),i.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(t){this.extendState({breadcrumbs:[{timestamp:Date.now()/1e3,...this.beforeBreadcrumb(t)}]})}setBreadcrumbs(t){this.setKeyState("breadcrumbs",t)}captureMessage(t,i){this.send({...this.getRequestBlank(),message:t,level:i})}destroy(){this.destroyed=!0,this.plugins.forEach(t=>{t.destroy&&t.destroy()})}isIgnoredError(t){return this.ignoreErrors.length?this.getPossibleEventMessages(t).some(i=>this.ignoreErrors.some(n=>Ul(i,n))):!1}getRequestBlank(){return{request:{url:this.window.location.toString(),headers:{"User-Agent":this.window.navigator.userAgent}},...super.getRequestBlank(),sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"},...this.state}}send(t){this.destroyed||this.isDeniedUrl(t)||this.isIgnoredError(t)||(super.send(this.beforeSend({release:this.release,...t})),this.setBreadcrumbs(void 0))}getPossibleEventMessages(t){if(t.message)return[t.message];if(t.exception)try{let{type:i="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${i}: ${n}`]}catch{return[]}return[]}isDeniedUrl(t){if(!this.blacklistUrls.length)return!1;let i=this.getEventFilterUrl(t);return i?this.blacklistUrls.some(n=>Ul(i,n)):!1}getEventFilterUrl(t){try{if(t.exception){let i=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return i&&i[i.length-1].filename||null}return null}catch{return null}}extendState(t){this._state=Object.keys(t).reduce((i,n)=>{let r=this._state[n],o=Array.isArray(r)?r:null,s=t[n],d=Array.isArray(s)?s:null;return{...i,[n]:o||d?[...o||[],...d||[]]:{...typeof r!="string"?r:{},...typeof s!="string"?s:{}}}},this._state)}setKeyState(t,i){this._state[t]=i}};import{isNonNullable as Cr,Subscription as Kc}from"@vkontakte/videoplayer-shared";var $r=null,Qi=class{constructor(t,i,n={}){!$r&&t.dsn&&(this.sentryClient=new Lr({dsn:t.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new Kc,this.options=t,this.context=n,$r=this)}destroy(){this.sentryClient?.destroy(),this.sentrySubscription?.unsubscribe(),$r=null}logIError(t,i=!1){t.thrown&&this.report(t.thrown,{fatal:i,errorType:t.id,category:t.category},{message:t.message,errorData:t.data})}report(t,i={},n={}){let{sentryClient:r,context:o,options:s}=this,{sampleRate:d=0,whiteErrorIdList:c,whiteErrorCategoryList:h=[],blackErrorIdList:p,blackErrorCategoryList:a}=s,{errorType:u,category:m}=i;if(Cr(m)&&a.includes(m)||Cr(u)&&p.includes(u))return;if(Math.random()<=d||Cr(m)&&h.includes(m)||Cr(u)&&c.includes(u)){Object.keys(i).length&&r.setTags({version:this.version,...i}),(Object.keys(o).length||Object.keys(n).length)&&r.setExtras({...o,...n});try{u&&r.captureMessage(u,i.fatal?mn.fatal:mn.error),r.report(t)}catch(y){console.error(y)}}}static getInstance(){return $r}};var Or=class{constructor(t){this.value=t,this.next=null}};var hn=class{constructor(t){this.top=null,this.bottom=null,this.size=0,this.maxSize=t}push(t){let i=new Or(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 Zc=ke('<div class="container s-8"><canvas class="s-8"></canvas></div>'),Jc={hash:"s-8",code:".container.s-8{display:inline-block;height:16px;width:120px}canvas.s-8{margin-top:2px;transform:scaleY(-1)}"};function Qn(e,t){st(t,!0),ut(e,Jc);let i=ye(t,"values",19,()=>[]),n=Fe(void 0),r=Fe(null),o=16,s=120,d=60,c=s/d;un(()=>{P(n).width=s,P(n).height=o,Se(r,P(n).getContext("2d"),!0)});function h(u,m,b,y,g){g===0&&(g=1),u.fillStyle="#fff",u.fillRect(m,b,y,g)}Ei(()=>{let u="";if(P(r)){let m=i()[0];for(let y=1;y<i().length;y++)i()[y]>m&&(m=i()[y]);P(r).clearRect(0,0,s,o);let b=d-1;for(let y=i().length-1;y>=0;y--){let g=b*c,D=m>0?o*(i()[y]/m):0;h(P(r),g,0,c,D),u=D+" "+u,b--}}});var p=Zc(),a=ne(p);Fi(a,u=>Se(n,u),()=>P(n)),ie(p),pe(e,p),lt()}import{safeStorage as Yl}from"@vkontakte/videoplayer-shared";import{isNullable as Hl,InterfaceLanguage as Ql}from"@vkontakte/videoplayer-shared";var Xc={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:`Видео грузится слишком медленно,
49
- качество изменено на «Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
50
- попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},zl=Xc;var ep={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,
51
- so the quality was changed to Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
52
- 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"},Fl=ep;var Ai=new Map;Ai.set(Ql.EN,Fl);Ai.set(Ql.RU,zl);var Bl=new Map,ea=({language:e,pack:t,fallback:i})=>{if(Ai.has(e)){let n=Ai.get(e);Ai.set(e,{...n,...t})}else Ai.set(e,t);Bl.set(e,i)},ta=e=>Ai.has(e),ia=(e,t,i,n)=>{let o=Ai.get(e)?.[t];if(Hl(o)){let s=Bl.get(e)??n;o=(s?Ai.get(s):void 0)?.[t]}return Hl(o)?t+Object.values(i??{}).join(" "):i?o.replaceAll(/{(\w+?)}/g,(s,d)=>i[d]??""):o},Pr=(e,t)=>{let{interfaceLanguage$:i}=Ni(),n=_e(i),r=pn();return ia(n,e,t,r.defaultLanguage)};var tp=(e,t)=>{e.stopPropagation(),Yl.remove(Hn),t.set(!1)},ip=ke('<div class="s-7"><div class="s-7">Video id</div> <span> </span></div>'),np=ke('<div class="s-7"><div class="s-7">VSID</div> <span> </span></div>'),rp=ke('<div class="s-7"><div class="s-7">Provider</div> <span> </span></div>'),op=ke('<div class="s-7"><div class="s-7">Streams</div> <span> </span></div>'),ap=ke('<div class="s-7"><div class="s-7">Viewport</div> <span> </span></div>'),sp=ke('<div class="s-7"><div class="s-7">Video size</div> <span> </span></div>'),lp=ke('<div class="s-7"><div class="s-7">CDN host</div> <span> </span></div>'),up=ke('<div class="s-7"><div class="s-7">Volume</div> <span> </span></div>'),dp=ke('<div class="s-7"><div class="s-7">Position</div> <span> </span></div>'),cp=ke('<div class="s-7"><div class="s-7">Buffer</div> <span> </span></div>'),pp=ke('<div class="s-7"><div class="s-7">Nbuffer</div> <span> </span></div>'),fp=ke('<div class="s-7"><div class="s-7">Live latency</div> <span> </span></div>'),mp=ke('<div class="s-7"><div class="s-7">Segment</div> <span> </span></div>'),hp=ke('<div class="s-7"><div class="s-7">Network</div> <!> <span> </span></div>'),vp=ke('<div class="s-7"><div class="s-7">V bitrate</div> <!> <span> </span></div>'),gp=ke('<div class="container s-7" role="region"><button class="close s-7" title="закрыть">[x]</button> <div class="content s-7"><div class="s-7"><div class="s-7">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-7"><div class="s-7">Dropped</div> <span> </span></div> <!> <!> <div class="s-7"><div class="s-7">FPS</div> <!> <span> </span></div></div></div>'),_p={hash:"s-7",code:".container.s-7{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-7,button.close.s-7{color:#fff;position:absolute}button.close.s-7{background-color:transparent;border:none;cursor:pointer;outline:0;padding:0;right:5px;top:3px}.content.s-7{padding:5px}.content.s-7>div:where(.s-7)>div:where(.s-7){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function na(e,t){st(t,!0),ut(e,_p);let i=Ni(),n=i.ui.debugPanelVisible,r=Fe(yt(i.actions.internal.getDebugPanelData())),o=i.actions.internal.getVideoElement(),s=Fe(0),d=Fe(0),c=Fe(0),h=new hn(60),p=new hn(60),a=new hn(60),u=Fe(yt([])),m=Fe(yt([])),b=Fe(yt([])),y=Pr("aria_label_debug_panel");un(()=>{Yl.set(Hn,"true"),o&&(Se(d,o.getVideoPlaybackQuality().droppedVideoFrames,!0),Se(s,o.getVideoPlaybackQuality().totalVideoFrames,!0));let T=window.setInterval(()=>{Se(r,i.actions.internal.getDebugPanelData(),!0)},500),U;return o&&(U=window.setInterval(()=>{if(o){Se(d,o.getVideoPlaybackQuality().droppedVideoFrames,!0);let ee=o.getVideoPlaybackQuality().totalVideoFrames;Se(c,ee-P(s)),Se(s,ee,!0),h.push(P(c)),P(r).speed&&p.push(P(r).speed),P(r).bitrate&&a.push(P(r).bitrate),Se(u,h.getValuesFromBottom(),!0),Se(m,p.getValuesFromBottom(),!0),Se(b,a.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(T),U&&clearInterval(U)}});var g=gp(),D=ne(g);D.__click=[tp,n];var N=ce(D,2),k=ne(N),x=ce(ne(k),2),S=ne(x,!0);ie(x),ie(k);var w=ce(k,2);{var M=T=>{var U=ip(),ee=ce(ne(U),2),de=ne(ee,!0);ie(ee),ie(U),ze(()=>Je(de,P(r).id)),pe(T,U)};Qe(w,T=>{P(r).id&&T(M)})}var f=ce(w,2);{var W=T=>{var U=np(),ee=ce(ne(U),2),de=ne(ee,!0);ie(ee),ie(U),ze(()=>Je(de,P(r).vsid)),pe(T,U)};Qe(f,T=>{P(r).vsid&&T(W)})}var _=ce(f,2);{var C=T=>{var U=rp(),ee=ce(ne(U),2),de=ne(ee,!0);ie(ee),ie(U),ze(()=>Je(de,P(r).provider)),pe(T,U)};Qe(_,T=>{P(r).provider&&T(C)})}var R=ce(_,2);{var V=T=>{var U=op(),ee=ce(ne(U),2),de=ne(ee);ie(ee),ie(U),ze(()=>Je(de,`Video: ${(P(r).videoCodec||"")??""} ${P(r).hdr?"(HDR)":""}
16
+ `,stack:e.stack?.split(`
17
+ `).filter(e=>!e.includes("svelte/src/internal")).join(`
18
+ `)}}}(e,t)),(32768&t.f)==0&&(4&t.f)==0)throw!t.parent&&e instanceof Error&&i9(e),e;i3(e,t)}function i3(e,t){for(;null!==t;){if((128&t.f)!=0){if((32768&t.f)==0)throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e instanceof Error&&i9(e),e}function i9(e){let t=i4.get(e);t&&(ip(e,"message",{value:t.message}),ip(e,"stack",{value:t.stack}))}function i6(e,t){e.f=-7169&e.f|t}function i7(e){(512&e.f)!=0||null===e.deps?i6(e,1024):i6(e,4096)}function i8(e,t,i){(2048&e.f)!=0?t.add(e):(4096&e.f)!=0&&i.add(e),function e(t){if(null!==t)for(let i of t)(2&i.f)!=0&&(65536&i.f)!=0&&(i.f^=65536,e(i.deps))}(e.deps),i6(e,1024)}var ne=new Set,nt=null,ni=null,nn=[],nr=null,no=!1,na=!1;class ns{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#i=0;#n=0;#r=null;#o=new Set;#a=new Set;#s=new Map;is_fork=!1;#l=!1;is_deferred(){return this.is_fork||this.#n>0}skip_effect(e){this.#s.has(e)||this.#s.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#s.get(e);if(t){for(var i of(this.#s.delete(e),t.d))i6(i,2048),nc(i);for(i of t.m)i6(i,4096),nc(i)}}process(e){nn=[],this.apply();var t=[],i=[];for(let n of e)this.#u(n,t,i);if(this.is_deferred())for(let[e,n]of(this.#d(i),this.#d(t),this.#s))!function e(t,i){if((32&t.f)==0||(1024&t.f)==0){(2048&t.f)!=0?i.d.push(t):(4096&t.f)!=0&&i.m.push(t),i6(t,1024);for(var n=t.first;null!==n;)e(n,i),n=n.next}}(e,n);else{for(let e of this.#e)e();this.#e.clear(),0===this.#i&&this.#c(),nt=null,nd(i),nd(t),this.#r?.resolve()}ni=null}#u(e,t,i){e.f^=1024;for(var n=e.first,r=null;null!==n;){var o=n.f,a=(96&o)!=0;if(!(a&&(1024&o)!=0||(8192&o)!=0||this.#s.has(n))&&null!==n.fn){a?n.f^=1024:null!==r&&(0x100000c&o)!=0?r.b.defer_effect(n):(4&o)!=0?t.push(n):rc(n)&&((16&o)!=0&&this.#a.add(n),rh(n));var s=n.first;if(null!==s){n=s;continue}}for(;null!==n;){n===r&&(r=null);var l=n.next;if(null!==l){n=l;break}n=n.parent}}}#d(e){for(var t=0;t<e.length;t+=1)i8(e[t],this.#o,this.#a)}capture(e,t){t===io||this.previous.has(e)||this.previous.set(e,t),(8388608&e.f)==0&&(this.current.set(e,e.v),ni?.set(e,e.v))}activate(){nt=this,this.apply()}deactivate(){nt===this&&(nt=null,ni=null)}flush(){if(this.activate(),nn.length>0){if(nl(),null!==nt&&nt!==this)return}else 0===this.#i&&this.process([]);this.deactivate()}discard(){for(let e of this.#t)e(this);this.#t.clear()}#c(){if(ne.size>1){this.previous.clear();var e=ni,t=!0;for(let e of ne){if(e===this){t=!1;continue}let n=[];for(let[i,r]of this.current){if(e.current.has(i))if(!t||r===e.current.get(i))continue;else e.current.set(i,r);n.push(i)}if(0===n.length)continue;let r=[...e.current.keys()].filter(e=>!this.current.has(e));if(r.length>0){var i=nn;nn=[];let t=new Set,o=new Map;for(let e of n)!function e(t,i,n,r){if(!n.has(t)&&(n.add(t),null!==t.reactions))for(let o of t.reactions){let t=o.f;(2&t)!=0?e(o,i,n,r):(4194320&t)!=0&&(2048&t)==0&&function e(t,i,n){let r=n.get(t);if(void 0!==r)return r;if(null!==t.deps)for(let r of t.deps){if(id.call(i,r))return!0;if((2&r.f)!=0&&e(r,i,n))return n.set(r,!0),!0}return n.set(t,!1),!1}(o,i,r)&&(i6(o,2048),nc(o))}}(e,r,t,o);if(nn.length>0){for(let t of(nt=e,e.apply(),nn))e.#u(t,[],[]);e.deactivate()}nn=i}}nt=null,ni=e}this.committed=!0,ne.delete(this)}increment(e){this.#i+=1,e&&(this.#n+=1)}decrement(e){this.#i-=1,e&&(this.#n-=1),this.#l||(this.#l=!0,i2(()=>{this.#l=!1,this.is_deferred()?nn.length>0&&this.flush():this.revive()}))}revive(){for(let e of this.#o)this.#a.delete(e),i6(e,2048),nc(e);for(let e of this.#a)i6(e,4096),nc(e);this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#r??=ik()).promise}static ensure(){if(null===nt){let e=nt=new ns;ne.add(nt),na||i2(()=>{nt===e&&e.flush()})}return nt}apply(){}}function nl(){no=!0;var e=new Set;try{for(var t=0;nn.length>0;){var i=ns.ensure();if(t++>1e3){var n=new Map;for(let e of i.current.keys())for(let[t,i]of e.updated??[]){var r=n.get(t);r||(r={error:i.error,count:0},n.set(t,r)),r.count+=i.count}for(let e of n.values())e.error&&console.error(e.error);try{{let e=Error(`effect_update_depth_exceeded
19
+ Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
20
+ https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}}catch(e){ip(e,"stack",{value:""}),i3(e,nr)}}for(let t of(i.process(nn),nx.clear(),i.current.keys()))e.add(t)}}finally{for(let t of(nn=[],no=!1,nr=null,e))t.updated=null}}var nu=null;function nd(e){var t=e.length;if(0!==t){for(var i=0;i<t;){var n=e[i++];if((24576&n.f)==0&&rc(n)&&(nu=new Set,rh(n),null===n.deps&&null===n.first&&null===n.nodes&&null===n.teardown&&null===n.ac&&n3(n),nu?.size>0)){for(let e of(nx.clear(),nu)){if((24576&e.f)!=0)continue;let t=[e],i=e.parent;for(;null!==i;)nu.has(i)&&(nu.delete(i),t.push(i)),i=i.parent;for(let e=t.length-1;e>=0;e--){let i=t[e];(24576&i.f)==0&&rh(i)}}nu.clear()}}nu=null}}function nc(e){for(var t=nr=e;null!==t.parent;){var i=(t=t.parent).f;if(no&&t===ri&&(16&i)!=0&&(262144&i)==0)return;if((96&i)!=0){if((1024&i)==0)return;t.f^=1024}}nn.push(t)}class nf{parent;is_pending=!1;#f;#p=iO?u:null;#h;#v;#m;#g=null;#_=null;#y=null;#b=null;#w=0;#k=0;#x=!1;#o=new Set;#a=new Set;#S=null;#C=(function(e){let t,i=0,n=nC(0);return iW(n,"createSubscriber version"),()=>{nK()&&(rv(n),nZ(()=>(0===i&&(t=rm(()=>e(()=>nL(n)))),i+=1,()=>{i2(()=>{0==(i-=1)&&(t?.(),t=void 0,nL(n))})})))}})(()=>(this.#S=nC(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.#$():this.#A()}else this.#E()},589824),iO&&(this.#f=u)}#A(){try{this.#g=n1(()=>this.#v(this.#f))}catch(e){this.error(e)}}#$(){let e=this.#h.pending;e&&(this.is_pending=!0,this.#_=n1(()=>e(this.#f)),i2(()=>{var e=this.#b=document.createDocumentFragment(),t=nj();e.append(t),this.#g=this.#T(()=>(ns.ensure(),n1(()=>this.#v(t)))),0===this.#k&&(this.#f.before(e),this.#b=null,n9(this.#_,()=>{this.#_=null}),this.is_pending=!1)}))}#E(){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.#b=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}#T(e){var t=ri,i=re,n=iU;ri=this.#m,re=this.#m,iU=this.#m.ctx;try{return e()}catch(e){return i5(e),null}finally{ri=t,re=i,iU=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.#b&&(this.#f.before(this.#b),this.#b=null)}}update_pending_count(e){this.#P(e),this.#w+=e,this.#S&&!this.#x&&(this.#x=!0,i2(()=>{this.#x=!1,this.#S&&nT(this.#S,this.#w)}))}get_effect_pending(){return this.#C(),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.#y&&(n5(this.#y),this.#y=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.#y&&n9(this.#y,()=>{this.#y=null}),this.#T(()=>{ns.ensure(),this.#E()}))};i2(()=>{try{r=!0,t?.(e,o),r=!1}catch(e){i3(e,this.#m&&this.#m.parent)}i&&(this.#y=this.#T(()=>{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,iU=null,iQ=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:iU,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=iB,t}var n_=[];function ny(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 nb(e){var t=ny(e);e.equals(t)||(e.wv=++rl,nt?.is_fork&&null!==e.deps)||(e.v=t,null!==e.deps)?!n8&&(null!==ni?(nK()||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 nC(e,t){return{f:0,v:e,reactions:null,equals:iF,rv:0,wv:0}}function n$(e,t){let i=nC(e,t);return rr(i),i}function nA(e,t=!1,i=!0){let n=nC(e);return t||(n.equals=iB),iq&&i&&null!==iU&&null!==iU.l&&(iU.l.s??=[]).push(n),n}function nE(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?.[i$]?.(n),nT(e,r)}function nT(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&&ny(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){nE(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=n$(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",n$(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=n$(n.value,null);return i.set(t,e),"string"==typeof t&&iW(e,nO(s,t)),e}):nE(r,n.value,!0),!0},deleteProperty(e,t){var n=i.get(t);if(void 0===n){if(t in e){let e=a(()=>n$(io,null));i.set(t,e),nL(r),iW(e,nO(s,t))}}else nE(n,io),nL(r);return!0},get(t,n,r){if(n===ix)return e;if(n===i$)return u;var o=i.get(n),l=n in t;if(void 0===o&&(!l||ih(t,n)?.writable)&&(o=a(()=>{var e=n$(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=n$(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?nE(f,io):c in e&&(f=a(()=>n$(io,null)),i.set(c+"",f),iW(f,nO(s,c)))}void 0===u?(!d||ih(e,t)?.writable)&&(iW(u=a(()=>n$(void 0,null)),nO(s,t)),nE(u,nV(o)),i.set(t,u)):(d=u.v!==io,nE(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&&nE(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,iy(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),iy(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&&nU(i),iI(i),i}function nB(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}nU(u)}return u}function nq(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}nU(n)}return iI(n),n}function nW(e,t,i){return document.createElementNS(t??is,e,i?{is:i}:void 0)}function nU(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 nQ(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:iU,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 nK(){return null!==re&&!rt}function nG(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=iU;(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=iU,l=nt,u=iQ,function(e=!0){ri=o,re=a,iU=s,e&&l?.activate(),iQ=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=nC(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,nT(r,t));else{for(let[t,i]of((8388608&r.f)!=0&&(r.f^=8388608),nT(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),nG(()=>{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=iQ,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&&nQ(()=>{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)&&nb(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=iU,s=rt,l=rd,u=e.f;ro=null,ra=0,rs=null,re=(96&u)==0?e:null,rn=null,iU=e.ctx,rt=!1,rd=++ru,null!==e.ac&&(nQ(()=>{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(nK()&&(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,iU=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=ib,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=iQ;iQ=e.dev_stack??iQ;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,iQ=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=ny(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),nb(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,ry=new Set;function rb(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 ry)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 rC(e,t){var i=ri;null===i.nodes&&(i.nodes={start:e,end:t,a:null,t:null})}function r$(e,t){var i,n=(1&t)!=0,r=(2&t)!=0,o=!e.startsWith("<!>");return()=>{if(iO)return rC(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?rC(nD(t),t.lastChild):rC(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 rC(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?rC(nD(t),t.lastChild):rC(t,t),t}}(e,t,"svg")}function rE(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 rT=["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=iU;if(o&&(i.c=o),r&&(n.$$events=r),iO&&rC(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=rT.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_)),ry.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)}ry.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===iU&&iT("onMount"),iq&&null!==iU.l?(t=iU.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 rB=[...`
36
+ \r\f\xa0\v\uFEFF`];function rq(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 rU(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||rB.includes(n[a-1]))&&(s===n.length||rB.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 rQ(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+=rq(i)),n&&(r+=rq(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)?(rQ(e,i?.[0],n[0]),rQ(e,i?.[1],n[1],"important")):rQ(e,i,n));return n}Symbol("class"),Symbol("style");var rK=Symbol("is custom element"),rG=Symbol("is html"),rJ=iE?"link":"LINK";function rY(e,t,i,n){var r,o=(r=e,r.__attributes??={[rK]:r.nodeName.includes("-"),[rG]: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[iC]=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),ib;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=ib){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=ib){let l=[a,s];return n.add(l),1===n.size&&(i=t(r,o)||ib),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=ib,d=()=>{if(l)return;u();let r=t(n?s[0]:s,e,i);o?e(r):u="function"==typeof r?r:ib},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:ib};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=ib;else{var r=!0;n.unsubscribe=r5(e,e=>{r?n.source.v=e:nE(n.source,e)}),r=!1}return e&&ot in i?r8(e):rv(n.source)}function on(){let e={};return[e,function(){nG(()=>{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=!iq||(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 nE(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 oy,assertNonNullable as ob,VERSION as ow,isNullable as ok,safeStorage as ox,safeStorage as oS,isNullable as oC,InterfaceLanguage as o$,assertNonNullable as oA,getHighestQuality as oE,InterfaceLanguage as oT,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 oB,detectEmbed as oq,devNull as oW,isNonNullable as oU,now as oQ,addScript as oH,Subject as oK,clearVideoElement as oG,isNonNullable as oJ,isNonNullable as oY,Subscription as oZ,now as oX,ValueSubject as o0,cloneDeepWith as o1,InterfaceLanguage as o2,Observable as o4,Subscription as o5,InternalsExposure as o3,skip as o9,getPlayerId as o6,Subscription as o7,devNull as o8,getWindow as ae,InterfaceLanguage as at,VKNumericLanguage as ai,loadVKLangPack as an}from"@vkontakte/videoplayer-shared";import{SeekAction as ar,VERSION as ao,SeekAction as aa,OneStat as as,ThinOneStat as al,MediascopePixel as au}from"@vkontakte/videoplayer-statistics";var ad={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:oy.Q_480P,highQualityLimit:oy.Q_720P,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,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"},ac="vk_player_debug_panel_opened",af=k(eM(),1),{NativeAbortSignal:ap,NativeAbortController:ah}={NativeAbortSignal:(a="u">typeof self?self:global).AbortSignal,NativeAbortController:a.AbortController};class av{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 am extends av{constructor(){super(),this.listeners||av.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 ag;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,"TimeoutError")),e),t.signal}static any(e){let t=new ag;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 ag{constructor(){Object.defineProperty(this,"signal",{value:new am,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 a_(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&&(ag.prototype[Symbol.toStringTag]="AbortController",am.prototype[Symbol.toStringTag]="AbortSignal");var ay="object"==typeof globalThis&&globalThis||"object"==typeof window&&window,ab="fetch"in ay&&a_({fetch:ay.fetch,Request:ay.Request,AbortController:ay.AbortController}),aw=ab?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(!a_({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:ay.fetch,Request:ay.Request,AbortController:ay.AbortController}):void 0,ak=ab?aw.fetch:ay.fetch;ab?aw.Request:ay.Request;var ax=ab?ag:ay.AbortController;ab||ay.AbortSignal;var aS="1.0.3-dev.416df800.0",aC=Symbol("storeContext"),a$=()=>{let e=iK(aC);return ob(e,"Store context is empty!"),e},aA=(e,t)=>aE(e,e.getValue(),t),aE=(e,t,i)=>r9(t,t=>{let n=e.subscribe(e=>{t(e),i?.(e)});return()=>n.unsubscribe()});class aT{destroyController=new ax;pendingDownloads=new Set;async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let t=await ak(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 aP="vk_player_prefer_traffic_saving_enabled",aL="vk_player_preferred_quality",aR="vk_player_preferred_default_quality_settings",aV="vk_player_preferred_quality_settings_by_video",aO="vk_player_preferred_stream_language",aI="vk_player_preferred_rate",aM="vk_player_preferred_subtitles_language",aN=()=>{let e,t=ox.get("vk_player_preferred_volume");return ok(t)?void 0:(e=parseFloat(t))>1?1:e<0?0:e},aj=(e,t)=>ox.set(aL,JSON.stringify({videoId:e,value:t})),aD=e=>{let t=ox.get(aL);if(ok(t))return;let{videoId:i,value:n}=JSON.parse(t);return e!==i?void ox.remove(aL):n},aF=e=>"true"===ox.get(e),az=e=>{e?ox.set(aP,"true"):ox.remove(aP)},aB=()=>ox.get(aM),aq=(e=e=>{ox.set(aR,JSON.stringify(e))},t=()=>{try{let e=ox.get(aR);return e?JSON.parse(e):null}catch(e){return null}},i=e=>{ox.set(aV,JSON.stringify(e))},n=i=>{o(i);let n=i?(()=>{try{let e=ox.get(aV);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(aV)},o=t=>{let n=aD(t);n?i({type:"exact_quality",videoId:t,quality:n}):(aF(aP)&&e({type:"traffic_saving",videoId:t}),az(!1),ox.remove(aL))},{getPreferredQualitySettings:n,migrateSettingsToLegacyWay:e=>{let t=n(e);if(t){switch(t.type){case"traffic_saving":az(!0);break;case"exact_quality":aj(e,t.quality)}r(),ox.remove(aR)}},savePreferredQualitySettings:(t,n="as-default")=>{"exact_quality"===t.type||"to-video"===n?i(t):e(t)},savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:r,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:aB,savePreferredSubtitlesLanguage:e=>{e?ox.set(aM,e):ox.remove(aM)}});aq.getPreferredQualitySettings;var aW=aq.migrateSettingsToLegacyWay;aq.savePreferredQualitySettings,aq.savePreferredDefaultQualitySettings,aq.removePreferredQualitySettingsByVideo,aq.getPreferredDefaultQualitySettings;var aU=(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 aQ{value;next;constructor(e){this.value=e,this.next=null}}class aH{top;bottom;size;maxSize;constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let t=new aQ(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 aK=r$('<div class="container s-8"><canvas class="s-8"></canvas></div>'),aG={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 aJ(e,t){iJ(t,!0),rz(e,aG);let i=or(t,"values",19,()=>[]),n=n$(void 0),r=n$(null);rN(()=>{rv(n).width=120,rv(n).height=16,nE(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=aK();r4(nz(o),e=>nE(n,e),()=>rv(n)),iN(o),rE(e,o),iY()}var aY=k(eF(),1),aZ=k(tw(),1),aX={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:"Выйти из режима точной перемотки"},a0={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"},a1=new Map;a1.set(o$.EN,a0),a1.set(o$.RU,aX);var a2=new Map,a4=({language:e,pack:t,fallback:i})=>{if(a1.has(e)){let i=a1.get(e);a1.set(e,{...i,...t})}else a1.set(e,t);a2.set(e,i)},a5=(e,t,i,n)=>{let r=a1.get(e),o=r?.[t];if(oC(o)){let i=a2.get(e)??n,r=i?a1.get(i):void 0;o=r?.[t]}return oC(o)?t+aY.default(i??{}).join(" "):i?aZ.default(o,/{(\w+?)}/g,(e,t)=>i[t]??""):o},a3=(e,t)=>{let{interfaceLanguage$:i}=a$();return a5(r8(i),e,t,iK("ui-config").defaultLanguage)},a9=r$('<div class="s-5"><div class="s-5">Video id</div> <span> </span></div>'),a6=r$('<div class="s-5"><div class="s-5">VSID</div> <span> </span></div>'),a7=r$('<div class="s-5"><div class="s-5">Provider</div> <span> </span></div>'),a8=r$('<div class="s-5"><div class="s-5">Streams</div> <span> </span></div>'),se=r$('<div class="s-5"><div class="s-5">Viewport</div> <span> </span></div>'),st=r$('<div class="s-5"><div class="s-5">Video size</div> <span> </span></div>'),si=r$('<div class="s-5"><div class="s-5">CDN host</div> <span> </span></div>'),sn=r$('<div class="s-5"><div class="s-5">Volume</div> <span> </span></div>'),sr=r$('<div class="s-5"><div class="s-5">Position</div> <span> </span></div>'),so=r$('<div class="s-5"><div class="s-5">Buffer</div> <span> </span></div>'),sa=r$('<div class="s-5"><div class="s-5">Nbuffer</div> <span> </span></div>'),ss=r$('<div class="s-5"><div class="s-5">Live latency</div> <span> </span></div>'),sl=r$('<div class="s-5"><div class="s-5">Segment</div> <span> </span></div>'),su=r$('<div class="s-5"><div class="s-5">Network</div> <!> <span> </span></div>'),sd=r$('<div class="s-5"><div class="s-5">V bitrate</div> <!> <span> </span></div>'),sc=r$('<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>'),sf={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"]),iq=!0;var sp=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),sh=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 sv(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=sh(),s=nz(a),l=e=>{var i=sp(),n=nB(i);rM(nz(n),()=>t.children),iN(n),ij(),rE(e,i)},d=e=>{var i=function(){if(iO)return rC(u,null),u;var e=document.createDocumentFragment(),t=document.createComment(""),i=nj();return e.append(t,i),rC(t,i),e}();rM(nB(i),()=>t.children),rE(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)}),rE(e,a),iY()}var sm=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>'),sg=r$('<div class="container s-4"><!></div>'),s_={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 sy(e){rz(e,s_);var t=sg();sv(nz(t),{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,t)=>{rE(e,sm())},$$slots:{default:!0}}),iN(t),rE(e,t)}var sb=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>'),sw=r$('<div class="playButton s-7" tabindex="0" role="button"><div class="playButtonBackground s-7"></div> <!></div>'),sk=r$('<div data-testid="unstarted-thumb"><!></div>'),sx={hash:"s-7",code:`.container.s-7 {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-7 {opacity:0;visibility:hidden;}.container.bgCover.s-7 {background-size:cover;}.playButton.s-7 {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-7 {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-7:hover .playButtonBackground:where(.s-7) {background-color:var(--big-play-hover-bg-color);transform:scale(1.15);}.playButton.s-7 svg {position:relative;}`};rw(["click","contextmenu"]);var sS=r$('<div><div class="video-container s-6"></div></div>'),sC={hash:"s-6",code:`.video-wrapper.s-6,
47
+ .video-container.s-6 {position:absolute;width:100%;height:100%;left:0;top:0;}.video-wrapper.s-6 {z-index:var(--video-container-z-index);background:var(--black);}.video-container.s-6 {z-index:var(--video-container-z-index);transition:var(--rotate-transition-duration) ease all;}`},s$=r$("<!> <!> <!> <!>",1),sA=r$('<div class="player-wrapper s-3"><!></div>'),sE={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;}"},sT=r$('<div class="vk-vp-tv-root s-0"><!></div>'),sP={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 sL(e,t){iJ(t,!0),rz(e,sP);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),y=or(t,"showAds",7),b=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),C=or(t,"shadowRootContainer",7),$=or(t,"outerContainerRef",7),A=or(t,"fullScreenTarget",7,void 0),E=or(t,"failoverHosts",7,void 0),T=or(t,"saveRate",7),P=or(t,"volumeMultiplier",7),L=or(t,"showEndScreen",7,!0);iG("ui-config",s());let R=iK("ui-config"),V=o().ui.debugPanelVisible,O=o().state.isLive$,I=n$(void 0),M=n$(!1);o().getAdmanWrapper().init({switchFromAdsToVideo:o().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:o().actions.internal.switchFromVideoToAds,setMuted:o().actions.external.setMuted},o().ads,{vsid:o().vsid}),iG(aC,o()),nJ(()=>{a().callbacks?.onDomReady?.()});let N=(e=!1)=>{nE(M,!0),e?o().actions.external.firstStart(y()):o().actions.internal.firstStart(y())};function j(e){let t,n=r()||e;n&&o().initVideo({container:rv(I),sources:n,failoverHosts:E(),subtitles:d(),subtitlesForcedLanguage:c(),volumeMultiplier:P()});let a="true"===om.get(ac);V.set(a),g()>0&&o().actions.external.seekTime(g());let s=v()??aN()??R.volumeDefault,l=m()??aF("vk_player_prefer_volume_mute");if(o().actions.external.setVolume(s),o().actions.external.setMuted(l),o().getAdmanWrapper().setInitialVolume(l?0:s),aW(o().videoId),aF(aP)&&o().actions.internal.setTrafficSavingEnabled(!0),(t=aD(o().videoId))&&o().actions.internal.setQuality(t),R.features.saveRate&&T()){let e=(()=>{let e=ox.get(aI);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=aU(R.userSalt,String(o().videoId));e?.subtitleTrackId&&(t=oi(D,"$availableSubtitlesList$",i).find(t=>t.value===e.subtitleTrackId))}let n=c()??aB();n&&(t=oi(D,"$availableSubtitlesList$",i).find(e=>e.language===n)),o().actions.internal.setSubtitle(t)}})}var F=sT();!function(e,t){iJ(t,!0),rz(e,sE);let[i,n]=on(),r=or(t,"videoContainer",15),o=a$(),a=o.interfaceLanguage$,s=o.playerPhase,l=o.state.crashed$,u=o.ui.debugPanelVisible,d=n$(void 0);var c,f,p,h,v=sA();c=nz(v),f=e=>{var n,o,a,d,c=s$(),f=nB(c);!function(e,t){let i;iJ(t,!0),rz(e,sC);let[n,r]=on(),o=or(t,"videoContainer",15),{playerPhase:a}=a$();var s=sS();r4(nz(s),e=>o(e),()=>o()),iN(s),nX(()=>i=rU(s,1,"video-wrapper s-6",null,i,{hidden:"video"!==oi(a,"$playerPhase",n)})),rE(e,s),iY(),r()}(f,{get videoContainer(){return r()},set videoContainer($$value){r($$value)}});var p=nq(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,sx),r=or(n,"iconVisible",3,!0),u=iK("ui-config"),c=a3("tooltip_play"),f=e=>{e.stopPropagation(),n.startVideo?.(),n.onClick?.(e)},a=nz(o=sk()),d=e=>{let t;var i,n,r=sw();i=nq(nz(r),2),iJ(n={get size(){return"48"}},!0),t=nm(()=>{let e;return e=n.size,`width:${e}px;height:${e}px;`}),sv(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)=>{rE(e,sb())},$$slots:{default:!0}}),iY(),iN(r),nX(()=>rY(r,"aria-label",c)),rE(e,r)},rD(a,e=>{r()&&e(d)}),iN(o),nX(()=>{e=rU(o,1,"container s-7",null,e,{hidden:n.hidden,bgCover:u.features.previewNoEmptySpace}),rH(o,`background-color: #222; background-image: url('${n.thumbUrl||""}')`)}),rb("click",o,f),rb("contextmenu",o,function(...e){n.onContextMenu?.apply(this,e)}),rE(p,o),iY({handleClick:f})}var h=nq(p,2),v=e=>{sy(e,{})};rD(h,e=>{oi(l,"$crashed",i)&&e(v)});var m=nq(h,2),g=e=>{var t,i,n,r,o,a,s,l,u,d,c,f,p,h,v,m,g,_,y,b,w,k,x,S,C,$,A,E,T,P,L,R,V,O,I,M,N,j,D,F,z,B,q;let W,U,Q,H,K,G,J,Y,Z,X,ee,et,ei,en;iJ({},!0),rz(e,sf),U=(W=a$()).ui.debugPanelVisible,Q=n$(nV(W.actions.internal.getDebugPanelData())),H=W.actions.internal.getVideoElement(),K=n$(0),G=n$(0),J=n$(0),Y=new aH(60),Z=new aH(60),X=new aH(60),ee=n$(nV([])),et=n$(nV([])),ei=n$(nV([])),en=a3("aria_label_debug_panel"),rN(()=>{let e;oS.set(ac,"true"),H&&(nE(G,H.getVideoPlaybackQuality().droppedVideoFrames,!0),nE(K,H.getVideoPlaybackQuality().totalVideoFrames,!0));let t=window.setInterval(()=>{nE(Q,W.actions.internal.getDebugPanelData(),!0)},500);return H&&(e=window.setInterval(()=>{if(H){nE(G,H.getVideoPlaybackQuality().droppedVideoFrames,!0);let e=H.getVideoPlaybackQuality().totalVideoFrames;nE(J,e-rv(K)),nE(K,e,!0),Y.push(rv(J)),rv(Q).speed&&Z.push(rv(Q).speed),rv(Q).bitrate&&X.push(rv(Q).bitrate),nE(ee,Y.getValuesFromBottom(),!0),nE(et,Z.getValuesFromBottom(),!0),nE(ei,X.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(t),e&&clearInterval(e)}}),n=nq(i=nz(t=sc()),2),r=nz(n),o=nq(nz(r),2),a=nz(o,!0),iN(o),iN(r),s=nq(r,2),l=e=>{var t=a9(),i=nq(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(Q).id)),rE(e,t)},rD(s,e=>{rv(Q).id&&e(l)}),u=nq(s,2),d=e=>{var t=a6(),i=nq(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(Q).vsid)),rE(e,t)},rD(u,e=>{rv(Q).vsid&&e(d)}),c=nq(u,2),f=e=>{var t=a7(),i=nq(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(Q).provider)),rE(e,t)},rD(c,e=>{rv(Q).provider&&e(f)}),p=nq(c,2),h=e=>{var t=a8(),i=nq(nz(t),2),n=nz(i);iN(i),iN(t),nX(()=>rP(n,`Video: ${(rv(Q).videoCodec||"")??""} ${rv(Q).hdr?"(HDR)":""}
53
48
  &
54
- Audio: ${(P(r).audioCodec||"")??""} ${P(r).audioLanguage?`(${P(r).audioLanguage})`:""}`)),pe(T,U)};Qe(R,T=>{(P(r).videoCodec||P(r).audioCodec)&&T(V)})}var oe=ce(R,2);{var O=T=>{var U=ap(),ee=ce(ne(U),2),de=ne(ee,!0);ie(ee),ie(U),ze(()=>Je(de,P(r).viewport)),pe(T,U)};Qe(oe,T=>{P(r).viewport&&T(O)})}var q=ce(oe,2);{var Y=T=>{var U=sp(),ee=ce(ne(U),2),de=ne(ee,!0);ie(ee),ie(U),ze(()=>Je(de,P(r).videoSize)),pe(T,U)};Qe(q,T=>{P(r).videoSize&&T(Y)})}var J=ce(q,2);{var Ae=T=>{var U=lp(),ee=ce(ne(U),2),de=ne(ee,!0);ie(ee),ie(U),ze(()=>Je(de,P(r).cdn)),pe(T,U)};Qe(J,T=>{P(r).cdn&&T(Ae)})}var X=ce(J,2);{var le=T=>{var U=up(),ee=ce(ne(U),2),de=ne(ee);ie(ee),ie(U),ze(()=>Je(de,`${P(r).volume??""} %`)),pe(T,U)};Qe(X,T=>{P(r).volume&&T(le)})}var F=ce(X,2);{var he=T=>{var U=dp(),ee=ce(ne(U),2),de=ne(ee);ie(ee),ie(U),ze(A=>Je(de,`${A??""} s`),[()=>P(r).position.toFixed(2)]),pe(T,U)};Qe(F,T=>{P(r).position&&T(he)})}var H=ce(F,2);{var Le=T=>{var U=cp(),ee=ce(ne(U),2),de=ne(ee);ie(ee),ie(U),ze(A=>Je(de,`${A??""} s`),[()=>P(r).buffer.toFixed(2)]),pe(T,U)};Qe(H,T=>{P(r).buffer&&T(Le)})}var we=ce(H,2);{var se=T=>{var U=pp(),ee=ce(ne(U),2),de=ne(ee);ie(ee),ie(U),ze(A=>Je(de,`${A??""} s`),[()=>P(r).nativeBuffer.toFixed(2)]),pe(T,U)};Qe(we,T=>{P(r).nativeBuffer&&T(se)})}var L=ce(we,2);{var fe=T=>{var U=fp(),ee=ce(ne(U),2),de=ne(ee);ie(ee),ie(U),ze(A=>Je(de,`${A??""} s`),[()=>P(r).liveLatency.toFixed(2)]),pe(T,U)};Qe(L,T=>{P(r).liveLatency&&T(fe)})}var ae=ce(L,2);{var ue=T=>{var U=mp(),ee=ce(ne(U),2),de=ne(ee,!0);ie(ee),ie(U),ze(A=>Je(de,A),[()=>[{value:P(r).currentVideoSegmentLength,title:"Video:"},{value:P(r).currentAudioSegmentLength,title:"Audio:"}].filter(({value:A})=>A).map(({value:A,title:G})=>`${G} ${((A??0)/1e3).toFixed(2)} s`).join(" & ")]),pe(T,U)};Qe(ae,T=>{(P(r).currentVideoSegmentLength||P(r).currentAudioSegmentLength)&&T(ue)})}var Re=ce(ae,2),Me=ce(ne(Re),2),be=ne(Me);ie(Me),ie(Re);var v=ce(Re,2);{var I=T=>{var U=hp(),ee=ce(ne(U),2);Qn(ee,{get values(){return P(m)}});var de=ce(ee,2),A=ne(de);ie(de),ie(U),ze(G=>Je(A,`${G??""} Kbps`),[()=>P(r).speed.toFixed(2)]),pe(T,U)};Qe(v,T=>{P(r).speed&&T(I)})}var $=ce(v,2);{var B=T=>{var U=vp(),ee=ce(ne(U),2);Qn(ee,{get values(){return P(b)}});var de=ce(ee,2),A=ne(de);ie(de),ie(U),ze(G=>Je(A,`${G??""} Kbps`),[()=>P(r).bitrate.toFixed(2)]),pe(T,U)};Qe($,T=>{P(r).bitrate&&T(B)})}var Z=ce($,2),re=ce(ne(Z),2);Qn(re,{get values(){return P(u)}});var Ie=ce(re,2),Pe=ne(Ie,!0);ie(Ie),ie(Z),ie(N),ie(g),ze(()=>{Ft(g,"aria-label",y),Je(S,P(r).version),Je(be,`${P(d)??""} / ${P(s)??""} frames`),Je(Pe,P(c))}),pe(e,g),lt()}sn(["click"]);Es();var Wl="var(--btn-color, #fff)";var yp=ci('<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),bp=ci('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Bi(e,t){st(t,!0);let i=ye(t,"width",19,()=>"24"),n=ye(t,"height",19,()=>"24"),r=ye(t,"fill",3,Wl),o=t.viewBox??`0 0 ${i()} ${n()}`;var s=bp(),d=ne(s);{var c=p=>{var a=yp(),u=rn(a),m=ne(u);xr(m,()=>t.children),ie(u),nn(),pe(p,a)},h=p=>{var a=Do(),u=rn(a);xr(u,()=>t.children),pe(p,a)};Qe(d,p=>{t.shadow?p(c):p(h,!1)})}ie(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",o),Ft(s,"fill",r()),ki(s,t.style),Ft(s,"data-testid",t.testId)}),pe(e,s),lt()}var xp=ci('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function ra(e){Bi(e,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(t,i)=>{var n=xp();pe(t,n)},$$slots:{default:!0}})}var Ep=ke('<div class="container s-3"><!></div>'),Ap={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 Bn(e){ut(e,Ap);var t=Ep(),i=ne(t);ra(i,{}),ie(t),pe(e,t)}var ql=e=>`width:${e}px;height:${e}px;`;var Sp=ci('<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 oa(e,t){st(t,!0);let i=gi(()=>ql(t.size));Bi(e,{get width(){return"48"},get height(){return"48"},get fill(){return t.fill},get style(){return P(i)},testId:"play-icon",get shadow(){return t.shadow},children:(n,r)=>{var o=Sp();pe(n,o)},$$slots:{default:!0}}),lt()}var wp=ke('<div class="playButton s-5" tabindex="0" role="button"><div class="playButtonBackground s-5"></div> <!></div>'),Tp=ke('<div data-testid="unstarted-thumb"><!></div>'),Mp={hash:"s-5",code:".container.s-5{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-5{opacity:0;visibility:hidden}.container.bgCover.s-5{background-size:cover}.playButton.s-5{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-5,.playButtonBackground.s-5{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-5{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-5:hover .playButtonBackground:where(.s-5){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-5 svg{position:relative}"};function aa(e,t){st(t,!0),ut(e,Mp);let i=ye(t,"iconVisible",3,!0),n=pn(),r=Pr("tooltip_play"),o=p=>{p.stopPropagation(),t.startVideo?.(),t.onClick?.(p)};var s=Tp();let d;s.__click=o,s.__contextmenu=function(...p){t.onContextMenu?.apply(this,p)};var c=ne(s);{var h=p=>{var a=wp(),u=ce(ne(a),2);oa(u,{get size(){return"48"}}),ie(a),ze(()=>Ft(a,"aria-label",r)),pe(p,a)};Qe(c,p=>{i()&&p(h)})}return ie(s),ze(p=>{d=dn(s,1,"container s-5",null,d,p),ki(s,`background-color: #222; background-image: url('${t.thumbUrl||""}')`)},[()=>({hidden:t.hidden,bgCover:n.features.previewNoEmptySpace})]),pe(e,s),lt({handleClick:o})}sn(["click","contextmenu"]);var Ip=ke('<div><div class="video-container s-6"></div></div>'),kp={hash:"s-6",code:".video-container.s-6,.video-wrapper.s-6{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-6{background:var(--black)}.video-container.s-6,.video-wrapper.s-6{z-index:var(--video-container-z-index)}.video-container.s-6{transition:var(--rotate-transition-duration) ease all}"};function la(e,t){st(t,!0),ut(e,kp);let[i,n]=Hi(),r=()=>oi(s,"$playerPhase",i),o=ye(t,"videoContainer",15),{playerPhase:s}=Ni();var d=Ip();let c;var h=ne(d);Fi(h,p=>o(p),()=>o()),ie(d),ze(p=>c=dn(d,1,"video-wrapper s-6",null,c,p),[()=>({hidden:r()!=="video"})]),pe(e,d),lt(),n()}var Np=ke("<!> <!> <!> <!>",1),Dp=ke('<div class="player-wrapper s-4"><!></div>'),Lp={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 ua(e,t){st(t,!0),ut(e,Lp);let[i,n]=Hi(),r=()=>oi(p,"$language$",i),o=()=>oi(a,"$playerPhase",i),s=()=>oi(u,"$crashed",i),d=()=>oi(m,"$debugPanelVisible",i),c=ye(t,"videoContainer",15),h=Ni(),p=h.interfaceLanguage$,a=h.playerPhase,u=h.state.crashed$,m=h.ui.debugPanelVisible,b=Fe(void 0);var y=Dp(),g=ne(y);Oo(g,r,D=>{var N=Np(),k=rn(N);la(k,{get videoContainer(){return c()},set videoContainer(_){c(_)}});var x=ce(k,2);let S=gi(()=>o()!=="thumb"||s()&&t.autoplay);aa(x,{get hidden(){return P(S)},get thumbUrl(){return t.thumbUrl},get startVideo(){return t.firstStart}});var w=ce(x,2);{var M=_=>{Bn(_,{})};Qe(w,_=>{s()&&_(M)})}var f=ce(w,2);{var W=_=>{na(_,{})};Qe(f,_=>{d()&&_(W)})}pe(D,N)}),ie(y),Fi(y,D=>Se(b,D),()=>P(b)),pe(e,y),lt(),n()}var Rp=ke('<div class="vk-vp-tv-root s-0"><!></div>'),Vp={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,.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 da(e,t){st(t,!0),ut(e,Vp);let[i,n]=Hi(),r=()=>oi(X,"$isLive$",i),o=()=>oi(Z,"$availableSubtitlesList$",i),s=ye(t,"sources",7),d=ye(t,"store",7),c=ye(t,"videoConfig",7),h=ye(t,"uiConfig",7),p=ye(t,"title",7),a=ye(t,"thumbUrl",7),u=ye(t,"subtitles",7),m=ye(t,"subtitlesForcedLanguage",7),b=ye(t,"live",7),y=ye(t,"preload",7),g=ye(t,"autoplay",7),D=ye(t,"volume",7,void 0),N=ye(t,"muted",7,void 0),k=ye(t,"fromTime",7),x=ye(t,"canRewindLive",7),S=ye(t,"showAds",7),w=ye(t,"adsSlotId",7,void 0),M=ye(t,"adsParams",7,void 0),f=ye(t,"adsAutoplayParam",7,void 0),W=ye(t,"duration",7,void 0),_=ye(t,"supportLink",7),C=ye(t,"shadowRootContainer",7),R=ye(t,"outerContainerRef",7),V=ye(t,"fullScreenTarget",7,void 0),oe=ye(t,"failoverHosts",7,void 0),O=ye(t,"saveRate",7),q=ye(t,"volumeMultiplier",7),Y=ye(t,"showEndScreen",7,!0);_l(h());let J=pn(),Ae=d().ui.debugPanelVisible,X=d().state.isLive$,le=Fe(void 0),F=Fe(!1);d().getAdmanWrapper().init({switchFromAdsToVideo:d().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:d().actions.internal.switchFromVideoToAds,setMuted:d().actions.external.setMuted},d().ads,{vsid:d().vsid}),Al(d()),Ei(()=>{c().callbacks?.onDomReady?.()});let he=(T=!1)=>{Se(F,!0),T?d().actions.external.firstStart(S()):d().actions.internal.firstStart(S())},H=()=>{Vl(d().videoId),Jo()&&d().actions.internal.setTrafficSavingEnabled(!0);let U=Zo(d().videoId);U&&d().actions.internal.setQuality(U)};function Le(T){let U=s()||T;U&&d().initVideo({container:P(le),sources:U,failoverHosts:oe(),subtitles:u(),subtitlesForcedLanguage:m(),volumeMultiplier:q()});let ee=Op.get(Hn)==="true";Ae.set(ee),k()>0&&d().actions.external.seekTime(k());let de=D()??Mr()??J.volumeDefault,A=N()??Cl();if(d().actions.external.setVolume(de),d().actions.external.setMuted(A),d().getAdmanWrapper().setInitialVolume(A?0:de),H(),J.features.saveRate&&O()){let G=Rl();G&&!r()&&d().actions.internal.setPlaybackRate(G)}d().ui.isAutoplay.set(g()),g()&&he(),y()&&J.features.preload&&d().actions.internal.preload()}un(()=>{let T=()=>d().destroy();return b()?.status==="upcoming"?(d().actions.internal.setLiveWaitingStart(!0),T):b()?.status==="waiting"?(d().actions.internal.setLiveWaitingRecover(!0),T):(b()?.status==="finished"||b()?.status==="postlive")&&!(s()&&$p(s()))?(d().actions.internal.setLiveWaitingRecord(!0),T):(Le(),T)});function we(){P(F)?d().actions.external.play():he(!0)}function se(){d().actions.external.pause()}function L(T){d().actions.external.setMuted(T)}function fe(){d().actions.external.toggleSubtitle()}function ae(T,U){d().actions.external.changeSubtitle(T,U)}function ue(T){d().actions.external.changeAudioStream(T)}function Re(T){T>=0&&T<=1&&d().actions.external.setVolume(T)}function Me(T){d().actions.internal.seekTime(T,Pp.UNKNOWN)}function be(T){d().actions.external.setPlaybackRate(T)}function v(T){d().actions.external.setAutoQualityLimits(T)}function I(){d().actions.external.setQuality("auto")}function $(T){d().actions.external.setTrafficSavingEnabled(T)}function B(T){d().actions.external.setHighQualityEnabled(T)}let Z=d().state.availableSubtitlesList$;if(J.features.initSubtitles){let T=!1;Ei(()=>{if(!T&&o().length){T=!0;let U;if(J.features.userVideoPrefs&&d().videoId){let de=kr(J.userSalt,String(d().videoId));de?.subtitleTrackId&&(U=o().find(A=>A.value===de.subtitleTrackId))}let ee=m()??Xo();ee&&(U=o().find(de=>de.language===ee)),d().actions.internal.setSubtitle(U)}})}var re=Rp(),Ie=ne(re);ua(Ie,{get thumbUrl(){return a()},firstStart:he,get autoplay(){return g()},get videoContainer(){return P(le)},set videoContainer(T){Se(le,T,!0)}}),ie(re),pe(e,re);var Pe=lt({initVideo:Le,play:we,pause:se,setMuted:L,toggleSubtitle:fe,changeSubtitle:ae,changeAudioStream:ue,setVolume:Re,seekTime:Me,setPlaybackRate:be,setAutoQualityLimits:v,setAutoQuality:I,toggleTrafficSaving:$,toggleHighQuality:B,get sources(){return s()},set sources(T){s(T)},get store(){return d()},set store(T){d(T)},get videoConfig(){return c()},set videoConfig(T){c(T)},get uiConfig(){return h()},set uiConfig(T){h(T)},get title(){return p()},set title(T){p(T)},get thumbUrl(){return a()},set thumbUrl(T){a(T)},get subtitles(){return u()},set subtitles(T){u(T)},get subtitlesForcedLanguage(){return m()},set subtitlesForcedLanguage(T){m(T)},get live(){return b()},set live(T){b(T)},get preload(){return y()},set preload(T){y(T)},get autoplay(){return g()},set autoplay(T){g(T)},get volume(){return D()},set volume(T){D(T)},get muted(){return N()},set muted(T){N(T)},get fromTime(){return k()},set fromTime(T){k(T)},get canRewindLive(){return x()},set canRewindLive(T){x(T)},get showAds(){return S()},set showAds(T){S(T)},get adsSlotId(){return w()},set adsSlotId(T){w(T)},get adsParams(){return M()},set adsParams(T){M(T)},get adsAutoplayParam(){return f()},set adsAutoplayParam(T){f(T)},get duration(){return W()},set duration(T){W(T)},get supportLink(){return _()},set supportLink(T){_(T)},get shadowRootContainer(){return C()},set shadowRootContainer(T){C(T)},get outerContainerRef(){return R()},set outerContainerRef(T){R(T)},get fullScreenTarget(){return V()},set fullScreenTarget(T){V(T)},get failoverHosts(){return oe()},set failoverHosts(T){oe(T)},get saveRate(){return O()},set saveRate(T){O(T)},get volumeMultiplier(){return q()},set volumeMultiplier(T){q(T)},get showEndScreen(){return Y()},set showEndScreen(T){Y(T)}});return n(),Pe}var jp=ci('<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 ca(e,t){let i=ye(t,"isWhite",3,!1),n=gi(()=>i()?"#fff":"#909499");Bi(e,{width:"57",height:"60",get fill(){return P(n)},testId:"stub-icon",children:(r,o)=>{var s=jp();nn(9),pe(r,s)},$$slots:{default:!0}})}var Up=ke('<div class="title s-2"> </div>'),zp=ke('<div class="playerStub s-2"><!> <!></div>'),Fp={hash:"s-2",code:".playerStub.s-2{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-2{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 pa(e,t){ut(e,Fp);var i=zp(),n=ne(i);{var r=d=>{var c=Up(),h=ne(c,!0);ie(c),ze(()=>Je(h,t.title)),pe(d,c)};Qe(n,d=>{t.title&&d(r)})}var o=ce(n,2);{var s=d=>{let c=gi(()=>!!t.thumbUrl);ca(d,{get isWhite(){return P(c)}})};Qe(o,d=>{(!t.title||!t.thumbUrl)&&d(s)})}ie(i),ze(()=>ki(i,t.thumbUrl?`background-image: url('${t.thumbUrl}')`:"")),pe(e,i)}var Hp=ke('<div class="playerError s-1"><!></div>'),Qp={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 fa(e){ut(e,Qp);var t=Hp(),i=ne(t);Bn(i,{}),ie(t),pe(e,t)}import{ChromecastState as tf,PlaybackState as Yn,Player as nf,PredefinedQualityLimits as Di,VideoFormat as Fr,clientChecker as ou}from"@vkontakte/videoplayer-core";import{assertNonNullable as Ht,getHighestQuality as rf,InterfaceLanguage as of,isInvariantQuality as af,isNonNullable as sf,loadVKLangPack as lf,Logger as uf,map as au,merge as df,Observable as Hr,Subject as Wn,Subscription as su,TracerFactory as cf,VideoQuality as pf,devNull as ff,now as mf}from"@vkontakte/videoplayer-shared";import{SeekAction as Gn}from"@vkontakte/videoplayer-statistics";import{detectEmbed as Yp,devNull as Ne,isNonNullable as Wp,now as De}from"@vkontakte/videoplayer-shared";import{addScript as Gp,Subject as At,clearVideoElement as qp}from"@vkontakte/videoplayer-shared";var Kp="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Rr=class{constructor(t,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new At,loadStarted$:new At,loadEnded$:new At,loadError$:new At,ready$:new At,slotRequested$:new At,started$:new At,timeRemained$:new At,paused$:new At,resumed$:new At,ended$:new At,empty$:new At,skipped$:new At,clicked$:new At,closed$:new At,error$:new At};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 r;this.events.loadStarted$.next();let o=()=>{clearTimeout(r),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())};Gp(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=o,r=window.setTimeout(o,this.initTimeout))}).catch(s=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(s)],numbers:[De()]}),n(),clearTimeout(r)})});this.loadAdmanNPM=t=>new Promise((i,n)=>{let r;this.events.loadStarted$.next();let o=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(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=()=>{d=!0,n()},d=!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(()=>yd(Kl(),1)).then(()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[De()]}),!d&&(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=o,r=window.setTimeout(o,this.initTimeout)))},s).finally(()=>{clearTimeout(r),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:r,adsContainer:o,adsVideoElement:s,slotId:d,params:c={},paramsOverride:h={},duration:p,externalApi:a}=t;this.externalApi=a;let u,m=this.playerState&&_e(this.playerState.vsid);m&&(this.isVsidOriginal?u=m:u=parseInt(m,36));let{isEmbed:b,immediateOrigin:y}=Yp(),g=(b?y:window.location.href)??window.location.href,D={...c,dl:encodeURIComponent(g),autoplay:r?1:0,player_width:i,player_height:n,...u?{request_id:u}:{},duration:p,...h};D=Object.fromEntries(Object.entries(D).filter(([k,x])=>Wp(x)));let N={slot:d,wrapper:o,videoEl:s,videoQuality:n,params:D,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 x=await this.safeExternalCall(this.externalApi.videoGetAds,D);x&&(delete N.slot,delete N.params,Object.assign(N,{json:x}))}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&&qp(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 Zl=(e,t)=>t?!0:e.fullscreenEnabled||!!e.webkitFullscreenEnabled||!!e.mozFullscreenEnabled||!!e.msFullscreenEnabled,Jl=e=>{let t=e;t?.webkitExitFullscreen&&t?.webkitExitFullscreen()},Zp=()=>{let e=document;return e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement},Xl=()=>!!Zp();var eu=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 ma=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(t,i){let n=[],r=t.split(this.twoLinesRegExp);for(let o of r){let s={startTime:0,endTime:0,texts:[],lang:i},d=o.split(this.oneLineRegExp);for(let c of d)if(!s.startTime&&!s.endTime){let h=new Vr,{startTime:p,endTime:a}=h.parse(c);s.startTime=p,s.endTime=a}else if(c.trim()!==""){let h=new ha,{texts:p}=h.parse(c);s.texts=[...s.texts,...p]}(s.startTime||s.endTime)&&s.texts.length>0&&n.push(s)}return n}},Vr=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(t){let i={startTime:0,endTime:0},n=this.timingRegExp.exec(t);return n&&(i.startTime=this.calcTime(n[1],n[2],n[3],n[4]),i.endTime=this.calcTime(n[6],n[7],n[8],n[9])),i}parseTime(t){let i=this.timeRegExp.exec(t);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(t){return this.timeRegExp.test(t)}calcTime(t="0",i="0",n="0",r="0"){let o=Number(t)*60*60,s=Number(i)*60,d=Number(n),c=+`0.${r}`;return o+s+d+c}},ha=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(t){let i={texts:[]},r=t.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](s){let d=0,c=[];for(;d<s.length;){let h=["<",">"].reduce((p,a)=>{let u=s.indexOf(a,d);return p===-1||p>u?u:p},-1);if(h===-1){c.push(s.substring(d));break}c.push(s.substring(d,h)),d=h+1}return c}}),o=new Vr;for(let s of r)o.isTime(s)?i.texts.push({type:"timestamp",value:o.parseTime(s)}):i.texts.push({type:"text",value:s});return i}},tu=ma;import{isNonNullable as va}from"@vkontakte/videoplayer-shared";var Yi,Wt,ga=0,_a=!1,iu="",nu=(e,t=0,i=0)=>e<t&&e<i,jr=(e,t=0,i=0)=>e>=t&&e<=i,Jp=(e,t=0,i=0)=>e>t&&e>i,ru=(e,t,i,n=!1)=>{let r=i.find(({id:d})=>d===t.value)?.subtitles;if(n)return r?.find(({startTime:c,endTime:h})=>jr(e,c,h));let o=e>=ga,s=e<ga;if(ga=e,s&&(_a=!1),va(Yi)&&jr(e,Yi.startTime,Yi.endTime)&&iu===t.value)return Yi;if(!va(Wt)&&r?.length&&!_a){Wt=r.find(({startTime:c,endTime:h})=>jr(e,c,h)||o&&nu(e,c,h)),Yi=void 0,!va(Wt)&&r[r.length-1].endTime<e&&(_a=!0);return}else{if(jr(e,Wt?.startTime,Wt?.endTime))return Yi=Wt,Wt=void 0,iu=t.value,Yi;(o&&Jp(e,Wt?.startTime,Wt?.endTime)||s&&nu(e,Wt?.startTime,Wt?.endTime))&&(Wt=void 0)}};var Ur={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"},Xp={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"},ya=e=>Ur[e]??Ur[Xp[e]]??void 0;import{Subscription as ef}from"@vkontakte/videoplayer-shared";import"@vkontakte/videoplayer-statistics";var zr=class{constructor(t,i,n,r=new ef){this.oneStat=t;this.thinOneStat=i;this.mediascopePixel=n;this.statSubscription=r}destroy(){this.oneStat?.destroy(),this.thinOneStat?.destroy(),this.mediascopePixel?.destroy(),this.statSubscription.unsubscribe()}};var ai="off";var lu=({interfaceLanguage:e,isCyrillicRelatedInterface:t,videoId:i,isLiveCatchUpMode:n,statAuthToken:r,isAudioDisabled:o,canDownload:s,callbacks:d,webApi:c,previewThumbsData:h,uiConfig:p,coreConfig:a,player:u,stopPlayer:m,looped:b=!1,statistics:y,saveRate:g,internalsExposure:D,playerId:N,metaConfig:k})=>{let x={...a,isAudioDisabled:o,live:{...a.live??{},isLiveCatchUpMode:!!n}},S=p,w=cf.createRootTracer(!1),M=w.createComponentTracer("Store"),f=u||new nf(x,w,{playerId:N,onDevNullLog:d?.onDevNullLog});D?.expose({corePlayer:f});let W=new uf,_=new Rr(W,{loadTimeout:S.ads.loadTimeout,initTimeout:S.ads.initTimeout,runtimeTimeout:S.ads.runtimeTimeout,useAdmanFromNPM:S.ads.useAdmanFromNPM,volumeMultiplier:S.ads.volumeMultiplier,isVsidOriginal:S.ads.isVsidOriginal}),C=Qi.getInstance(),R=c?.focusManager,V=W.createComponentLog("Store"),oe,O,q={},Y=new wr,J=new su,Ae="",X=z(!1),le=y&&y.oneStat?Oe(y.oneStat.vsid$):Yt(void 0),F=z(Xl()),he=z(!1),H=()=>Zl(document,ou.device.isIOS),Le=z(!1),we=z([]),se=df(f.events.fatalError$,f.events.managedError$).subscribe(l=>we.update(E=>[...E,l])),L=Yt(!1,l=>{let E=f.events.fatalError$.subscribe(()=>l(!0));return()=>E.unsubscribe()}),fe=async l=>{let E=Object.values(of).includes(l);if(S.downloadVKLanguages&&(E&&S.updateBuiltinLanguages||!ta(l))){let K;try{K=await lf(l,yl,bl)}catch(xe){y?.oneStat?.logError({errorType:"VKLangPack",fatal:!1}),C?.report(xe,{errorType:"VKLangPack",fatal:!1})}K&&(ea({language:l,pack:K,fallback:S.defaultLanguage}),ae.set(l),ue.update(xe=>xe+1))}ta(l)&&ae.set(l)},ae=z(e),ue=z(0),Re=z(t);fe(e);let Me=(l,E)=>{let j=_e(ae);return ia(j,l,E,S.defaultLanguage)},be=z("thumb");be.subscribe(l=>{l==="ads"&&f.info.playbackState$.getValue()&&$()});let v=(()=>{let l=tt([L,be],([E,j])=>E?"crashed":j);return{...l,is:E=>_e(l)===E}})(),I=z(),$=()=>{I.set({muted:f.info.muted$.getValue()})},B=z({width:0,height:0}),Z=null,re=f.info.isBuffering$,Ie=Yt(re.getValue(),l=>{let E=re.subscribe(j=>{j&&Z===null?Z=window.setTimeout(()=>{l(re.getValue()),Z=null},S.loaderDelay):l(j)});return()=>{E.unsubscribe(),Z&&clearTimeout(Z)}});M.log("create store"),V({message:"create store"});let Pe=l=>{V({message:`init video, config: ${JSON.stringify(l)}`}),ff.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[mf()]}),f.initVideo(l),M.log("init video"),l.subtitles&&f.setExternalTextTracks(l.subtitles),oe=l,Ae=l.subtitlesForcedLanguage||""},T=new Wn,U=new Wn,ee=new Wn,de={actionRewind$:T,actionSeek$:U,inFullscreen$:new Hr(l=>F.subscribe(E=>l.next(E))),actionSetSubtitle$:ee},A=new Wn,G=new Wn,te={actionSeek$:U,actionSubtitlesSwitched$:A,actionQuality$:G,playerSize$:new Hr(l=>B.subscribe(E=>l.next(E))),inFullscreen$:new Hr(l=>F.subscribe(E=>l.next(E))),isLoaderVisible$:new Hr(l=>Ie.subscribe(E=>l.next(E)))};if(y){let{oneStat:l,thinOneStat:E,mediascopePixel:j,statSubscription:K}=y;l&&(K.add(l.attachToUi(de)),K.add(l.attachToAds(_.events)),l.authorize(r).catch(xe=>{V({message:`onestat auth error ${String(xe)}`})}),j&&j.attachTo(f)),E&&(K.add(E.attachTo(f,_.events)),K.add(E.attachToUi(te)),K.add(E.attachToAds(_.events)),E.updateContext({isMobile:_e(X)}),E.authorize(r))}if(C){let l=new su,E=(j,K)=>l.add(j.subscribe(K));if(E(f.events.managedError$,j=>{C.logIError(j)}),E(f.events.fatalError$,j=>{C.logIError(j,!0)}),y){let{oneStat:j}=y;j&&E(j.experimental.error$,K=>{C.logIError(K)})}C.sentrySubscription.add(l)}let je=()=>{if(ou.device.isIOS&&O)try{Jl(O)}catch(l){V({message:`exitIosSafariFullscreen failed: ${l}`})}};J.add(f.experimental.element$.subscribe(l=>{l&&(O=l,l.classList.add("player-media"))})).add(f.events.ended$.subscribe(()=>{je(),d?.onEnded?.()})).add(f.events.looped$.subscribe(()=>{d?.onLooped?.()})).add(f.events.started$.subscribe(async()=>{let l=f.info.muted$.getValue();d?.onStarted?.(),q.onStarted?.(l)})).add(f.events.willSeek$.subscribe(({from:l,to:E})=>{d?.onSeek?.(l,E)})).add(f.events.autoplaySoundProhibited$.subscribe(()=>{d?.onAutoplaySoundProhibited?.()})).add(f.info.position$.subscribe(l=>{let E=f.info.duration$.getValue();isFinite(E)&&E>0&&(d?.onTimeupdate?.(E,l),_.setPosition(l,E))})).add(f.events.fatalError$.subscribe(l=>{d?.onCrashed?.(l?`${l.id}: ${l.message}`:void 0)})).add(f.events.fetcherRecoverableError$.subscribe(l=>{d?.onRecoverableError?.(l?`${l.id}: ${l.message}`:void 0)})).add(f.events.loadedMetadata$.subscribe(()=>{Le.set(!0)})).add(f.info.liveTime$.subscribe(l=>{d?.onLiveTime?.(l)})).add(f.info.isStalled$.subscribe(l=>{d?.onStalledChanged?.(l)})).add(f.info.isLiveEnded$.subscribe(l=>l&&d?.onLiveEnded?.())).add(_.events.loadStarted$.subscribe(()=>d?.adsInfo?.onLoadStarted?.())).add(_.events.loadEnded$.subscribe(()=>d?.adsInfo?.onLoadEnded?.())).add(_.events.loadError$.subscribe(()=>d?.adsInfo?.onLoadError?.())).add(_.events.init$.subscribe(()=>d?.adsInfo?.onInit?.())).add(_.events.ready$.subscribe(()=>d?.adsInfo?.onReady?.())).add(_.events.started$.subscribe(l=>d?.adsInfo?.onStarted?.(l))).add(_.events.timeRemained$.subscribe(l=>d?.adsInfo?.onTimeRemained?.(l))).add(_.events.ended$.subscribe(l=>d?.adsInfo?.onCompleted?.(l))).add(_.events.empty$.subscribe(()=>d?.adsInfo?.onEmpty?.())).add(_.events.clicked$.subscribe(l=>d?.adsInfo?.onClicked?.(l))).add(_.events.closed$.subscribe(l=>d?.adsInfo?.onClosed?.(l))).add(_.events.error$.subscribe(l=>d?.adsInfo?.onError?.(l))).add(_.events.paused$.subscribe(()=>d?.adsInfo?.onPaused?.())).add(_.events.resumed$.subscribe(()=>d?.adsInfo?.onResumed?.()));let Ce=Yt(f.info.position$.getValue(),l=>{let E,j,K=()=>{let xe=f.info.playbackState$.getValue(),Ve=f.info.isLive$.getValue(),$e=f.info.duration$.getValue(),We=f.info.position$.getValue();if(xe&&[Yn.PLAYING,Yn.PAUSED].includes(xe)){let Ct=Ve?We-$e:f.getExactTime();Ct!==j&&l(Ct),j=Ct}E=requestAnimationFrame(K)};return K(),()=>cancelAnimationFrame(E)}),qe=Oe(f.info.playbackState$),Ye=Oe(f.info.isBuffering$),nt=tt([qe,Ye],([l,E])=>E?"buffering":l),Ke=Oe(f.info.currentBuffer$),pi=Oe(f.info.isEnded$),Gt=Oe(f.info.isLive$),Qt=S.features.playbackRate?Oe(f.info.canChangePlaybackSpeed$):Yt(!1),fi=Oe(f.info.liveBufferTime$),Li=Oe(f.info.volume$),Si=Oe(f.info.muted$),He=Tr(f.info.predefinedQualityLimitType$.pipe(au(l=>l===Di.TRAFFIC_SAVING)),f.info.predefinedQualityLimitType$.getValue()===Di.TRAFFIC_SAVING),Ue=Tr(f.info.predefinedQualityLimitType$.pipe(au(l=>l===Di.HIGH_QUALITY)),f.info.predefinedQualityLimitType$.getValue()===Di.HIGH_QUALITY),Xe=Oe(f.info.autoQualityLimitingAvailable$),Wr=Oe(f.info.availableQualities$),vn=Oe(f.info.availableQualitiesFps$),pt=Oe(f.info.chromecastState$),Ze=Oe(f.info.chromecastDeviceName$),Ci=Oe(f.info.currentFormat$),Wi=Oe(f.info.throughputEstimation$),du=Oe(f.info.videoBitrate$),cu=Oe(f.info.intrinsicVideoSize$),Ea=Oe(f.info.duration$),pu=Oe(f.info.isAudioAvailable$),fu=()=>{Z&&clearTimeout(Z),Z=null},Kn=tt([Ea,Gt],([l,E])=>E?-l:l),Aa=tt([qe],([l])=>l===Yn.PLAYING),Sa=Oe(f.info.atLiveEdge$),wa=Oe(f.info.atLiveDurationEdge$),Ta=Oe(f.info.position$),mu=tt([Ta,Ea],([l,E])=>isFinite(l)&&isFinite(E)&&!!E),hu=tt([pt],([l])=>l===tf.CONNECTED),vu=Oe(f.info.availableVideoStreams$),Ma=S.features.audioLanguages?Oe(f.info.availableAudioStreams$):Yt([]),gu=Oe(f.info.currentVideoStream$),Ia=Oe(f.info.currentAudioStream$),_u=l=>{l.language&&Ol(l.language),f.setVideoStream(l)},ka=l=>{f.setAudioStream(l)},Na=l=>{let E;if(l.length===1&&(E=l.at(0)),E??=l.find(K=>"isDefault"in K&&K.isDefault),S.features.userVideoPrefs&&i){let K=kr(S.userSalt,String(i));K?.audioTrackId&&(E=l.find(Ve=>Ve.id===K.audioTrackId)??E)}let j=$l();return j&&(E??=l.find(({language:K})=>j===K)),E??=l.at(0),E},yu=l=>{M.log("change audio stream",{id:l});let E=f.info.availableAudioStreams$.getValue().find(j=>j.id===l);E&&ka(E)},Da=!1;J.add(f.info.availableAudioStreams$.subscribe(l=>{if(!Da&&l.length){let E=Na(l);E&&(f.setAudioStream(E),Da=!0)}})),Ma.subscribe(l=>{d?.onAvailableAudioStreamsChanged?.(l.map(({label:E="",id:j="",language:K=""})=>({label:E,language:K,id:j})))}),Ia.subscribe(l=>l&&d?.onAudioStreamChanged?.(l.id));let La=!1;J.add(f.info.availableVideoStreams$.subscribe(l=>{if(!La&&l.length){let E=Na(l);E&&(f.setVideoStream(E),La=!0)}}));let Zn=z(void 0),Ca=Oe(f.info.isAutoQualityEnabled$,l=>l&&Zn.set(void 0)),bu=Oe(f.info.currentQuality$,()=>Zn.set(void 0)),$a=tt([Zn,bu],([l,E])=>l??E),Oa=tt(Ci,l=>l!==Fr.MPEG),xu=tt([Wr,vn,Ca,$a,Oa],([l,E,j,K,xe])=>{let Ve=[];xe&&Ve.push({value:"auto",displayValue:Me("auto_quality_option"),selected:j});let $e=l.filter(We=>!af(We));for(let We of $e){let Ct=E[We];Ve.push({value:We,displayValue:`${We}${Ct?eu(Ct):""}`,selected:j?!1:We===K})}return Ve}),Gr=Oe(f.info.currentPlaybackRate$),qr=tt([Gr,Sa,wa],([l,E,j])=>{let K=j?1:S.controls.playbackRateMin,xe=E?1:S.controls.playbackRateMax,Ve=S.controls.playbackRateStep,$e=[];for(let We=K;We<=xe;We+=Ve)$e.push({value:We,displayValue:We===1?Me("playback_rate_1"):Me("playback_rate",{multiplier:We.toString(10)}),selected:l===We});return $e}),Jn=()=>({displayValue:Me("subtitles_off"),value:ai,language:""}),Pa=z(Jn()),wi=tt([Pa,ue],([l],E)=>{l.value===ai?E(Jn()):E(l)}),Kr=S.features.subtitles?Oe(f.info.availableTextTracks$):Yt([]),Ra=Ml(),Eu=tt([Kr,wi],([l,E],j)=>{let K=[],xe=l.find(({id:Ve})=>Ve===E.value);if(xe?.url){let[,Ve]=Ra.find(xe.url)??[];if(Ve){j(Ve);return}Y.download(xe.url).then($e=>{if(!$e||Y.isDestroyed())return;let We=new tu,Ct=xe.language;if(Ct){let ro=!!xe.isAuto,cd=We.parse($e,Ct);K.push({lang:Ct,subtitles:cd,isAuto:ro,id:xe.id})}Ra.add(xe.url,K),_e(wi).value===E.value&&j(K)}).catch($e=>{y?.oneStat?.logError({errorType:"Subtitles download",fatal:!1}),C?.report($e,{errorType:"Subtitles download",fatal:!1})})}j(K)}),Au=tt([Gr,Aa,wi],([l,E,j],K)=>{let $e;if(f.info.isLive$.getValue()&&E&&j.value!==ai){let Ct=()=>{let ro=1e3/(3*l);$e=setTimeout(Ct,ro),K(Date.now())};return Ct(),()=>clearTimeout($e)}}),Va=tt([Kr,wi],([l,E])=>{if(!l.length)return[];let j=[];for(let{language:K,isAuto:xe,id:Ve}of l){let $e=K&&ya(K);K&&$e&&j.push({displayValue:xe?Me("subtitles_auto",{language:$e}):$e,value:Ve,selected:E?.value===Ve,isAuto:xe,language:K})}return j.length?(j.unshift({...Jn(),selected:E?.value===ai}),j):[]}),gn={available:[],prev:[]},Su=()=>f.experimental.getCurrentTime$.getValue()?.()??O?.currentTime??0,wu=tt([Ce,wi,Eu,Au],([l,E,j,K])=>{let xe=f.info.isLive$.getValue();if(xe&&gn.prev!==j){let Ve=j.find(({id:We})=>We===E.value),$e=gn.prev.find(({id:We})=>We===E.value);if(Ve){let We={...Ve,subtitles:[...$e?.subtitles??[],...Ve.subtitles]};gn.available=[We],gn.prev=j}}if(E&&E.value!==ai){let Ve=xe?Su():l,$e=xe?gn.available:j;return ru(Ve,E,$e,xe)}}),Tu=tt([wu],([l])=>l?.texts?l.texts:[]);J.add(wi.subscribe(l=>{if(l.value===ai)d?.onSubtitleOff?.();else{let E=Object.entries(Ur).find(([j,K])=>K===l.displayValue);d?.onSubtitleOn?.(E?E[0]:"",l.value)}}));let Mu=z(!0),Iu=tt([Ke,Kn,Ta,fi],([l,E,j,K])=>{let xe=l?.end??0;if(!K)return xe/E;let $e=-j+K-E;return(xe-$e)/E}),ja=Oe(f.info.availableSources$),ku=tt([ja],([l])=>Object.keys(l?.[Fr.MPEG]||{}).length>0),Nu=()=>{let l=Object.keys(f.info.availableSources$?.getValue()?.[Fr.MPEG]||{}),E=rf(l)||pf.Q_144P;return oe.sources[Fr.MPEG]?.[E]},Du=()=>{let l=Nu();if(l)M.log("download video",{url:l}),Tl(l,oe?.meta?.title||"video");else{let E="There is no URL for download video";M.log("download video",{message:E}),V({message:E})}},Lu=()=>{V({message:"toggle muted"});let l=f.info.muted$.getValue();f.info.volume$.getValue()===0&&!l?Jr(Zr()):_n(!l)},Cu=()=>{Be.ui.settingsMenu.visible$.set(!1),M.log("close settings menu")},$u=async(l,E=()=>Promise.resolve())=>{Be.ui.settingsMenu.visible$.set(!0),await E(),M.log("open settings menu",{wasOpenedByKeyboard:l})},Zr=()=>{let l=Math.max(S.volumeMinRestore,Mr()??0);return l===0?S.volumeDefault:l},Jr=l=>{let E=l===0?Zr():l,j=f.info.muted$.getValue();V({message:`set volume, volume: ${l}, preferredVolume: ${E}`});let K=!o||v.is("ads");j&&l>0&&K&&(j=!1),f.setVolume(l,j),_.setVolume(l)},_n=l=>{let E=f.info.volume$.getValue();V({message:`set muted, currentVolume: ${E}, mute: ${l}`});let j=v.is("ads");if(f.setMuted(l,j),_.setVolume(l?0:E),!l&&E===0){let K=Zr();f.setVolume(K),_.setVolume(K)}},Ua=z(!1),za=l=>{M.log("set looped",{isLooped:l}),Ua.set(l),f.setLooped(l)};za(b);let Ou=()=>{f.prepare()},Pu=()=>{Ht(Be);let l=_e(Be.playerPhase),E={playerPhase:l,isVideoEnded:!1,action:"none"};if(V({message:"toggle play"}),l==="ads"){E.action="play",M.log("toggle adman play",E),_.togglePlay();return}let j=()=>{V({message:"toggle play, call player.play"}),E.action="play",f.play(),d?.onPlay?.()},K=()=>{V({message:"toggle play, call player.pause"}),E.action="pause",f.pause(),d?.onPause?.()};f.info.isEnded$.getValue()?(V({message:"toggle play, video ended, seek to 0"}),T.next(),U.next(Gn.REWIND),f.seekTime(0),j()):f.info.playbackState$.getValue()!==Yn.PLAYING?j():K(),M.log("toggle play",E)},Fa=(l,{byUser:E=!1}={})=>{V({message:`set quality, quality: ${l}`}),M.log("set quality",{quality:l}),E&&G.next(l),f.setAutoQuality(l==="auto"),Ir(),l!=="auto"&&(Ko(i,l),Zn.set(l),f.setQuality(l))},Ha=l=>{V({message:`set trafficSavingEnabled, value: ${l}`}),M.log("set traffic saving enabled",{trafficSavingEnabled:l});let E=l?Di.TRAFFIC_SAVING:Di.UNKNOWN;f.setPredefinedQualityLimits(E)},Qa=l=>{V({message:`set highQualityEnabled, value: ${l}`}),M.log("set high quality enabled",{highQualityEnabled:l}),Ru(l?Di.HIGH_QUALITY:Di.UNKNOWN)},Ru=l=>{f.setPredefinedQualityLimits(l)},Xr=(l,E=!0)=>{M.log("set playback rate",{playbackRate:l}),f.setPlaybackRate(l),S.features.saveRate&&g&&!f.info.isLive$.getValue()&&E&&Pl(l)},Vu=()=>{let l=_e(Qt),E=_e(qr),j=E.findIndex(({selected:xe})=>xe);if(j===E.length-1||!l)return E[j];let K=E[j+1];return Xr(K.value),K},ju=()=>{let l=_e(Qt),E=_e(qr),j=E.findIndex(({selected:xe})=>xe);if(j===0||!l)return E[j];let K=E[j-1];return Xr(K.value),K},eo=(l={...Jn(),selected:!1})=>{M.log("set subtitles",{...l}),l.value!==ai&&ee.next(l.isAuto?l.value+"_auto":l.value),A.next({enabled:l.value!==ai,lang:l.language,auto:!!l.isAuto}),Pa.set(l)},Ba=l=>{M.log("toggle subtitles"),_e(wi)?.value===ai?Ya(l):Wa()},Uu=(l,E)=>{M.log("change subtitle",{enabled:l}),l?Ya(!0,E):Wa()},Ya=(l,E)=>{M.log("subtitle on");let j=_e(Va),K=_e(ae),xe=Ae??K,Ve;E&&(Ve=j.find($e=>$e.value===E)),Ve??=j.filter($e=>$e.value!==ai).find($e=>$e.language===xe),eo(Ve??j[1])},Wa=()=>{M.log("subtitle off"),eo(void 0)};J.add(f.info.availableTextTracks$.subscribe(l=>{function E(){let j=[];for(let{language:K,isAuto:xe,id:Ve}of l){let $e=K&&ya(K);K&&$e&&j.push({id:Ve,language:K,title:xe?Me("subtitles_auto",{language:$e}):$e})}return j}d?.onAvailableSubtitlesChanged?.(E())}));let Ga=z(!0),qa=l=>{Ga.set(l)},Ka=(l,E,j=!0)=>{if(V({message:`seek to time, time: ${l}`}),M.log("seek to time",{time:l,action:E,forcePrecise:j}),U.next(E),f.info.isLive$.getValue()){let K=f.info.duration$.getValue(),xe=Math.min(0,K+l);f.seekTime(xe,j)}else f.info.isEnded$.getValue()&&(V({message:"seek after ended, call callbacks.onPlay"}),d?.onPlay?.()),f.seekTime(l,j)},Za=(l,E,j=!1)=>{V({message:`seek to percent, percent: ${l}`}),M.log("seek to percent",{percent:l,action:E});let K=_e(Kn)*l;Ka(K,E,j)},zu=l=>{V({message:`seek external, time: ${l}`}),M.log("seek external",{time:l}),U.next(Gn.UNKNOWN),f.seekTime(f.info.isLive$.getValue()?-l:l)},Fu=l=>{let E=l.max??"none",j=l.min??"none";V({message:`set auto quality limitation. Max: ${E}. Min: ${j}`}),M.log("set auto quality limits",{max:E,min:j}),f.setAutoQualityLimits(l)},Hu=l=>{V({message:`set playback rate to: ${l}`}),M.log("set playback rate external",{playbackRate:l}),f.setPlaybackRate(l)},to=z(void 0),io=z(!1),Qu=l=>{V({message:`start scrubbing, progress: ${l}`}),M.log("start scrubbing",{progress:l}),io.set(!0),Ja(l)},Ja=l=>{to.set(l)},Bu=()=>{to.set(void 0),io.set(!1)},Yu=(l,E=!1)=>{V({message:`complete scrubbing, progress: ${l}`}),M.log("complete scrubbing",{progress:l}),Za(l,Gn.SLIDER,E),Bu()},Wu=tt([Ce,Kn,to],([l,E,j],K)=>{K(sf(j)?j*E:l)}),no=z(!1),Gu=()=>{no.set(!0)},qu=()=>{no.set(!1)},Ku=l=>{U.next(Gn.LIVE),V({message:"live switch to low latency "+l}),M.log("live switch to low latency "+l),f.setLiveLowLatency(l)},Zu=()=>{U.next(Gn.LIVE),V({message:"switch to active live"}),M.log("switch to active live"),f.seekTime(0),f.info.playbackState$.getValue()!==Yn.PLAYING&&Be.actions.internal.togglePlay()},Ju=()=>{M.log("skip adman"),_.skip()},Xu=(l=!0)=>{Ht(Be),V({message:`switch from ads to video, callPlay: ${l}`}),M.log("switch from ads to video",{callPlay:l}),be.set("video"),l&&f.play(),o&&_n(!0);let E=_e(I)?.muted,j=!f.info.muted$.getValue();E!==void 0&&!j&&_n(E),I.set(void 0)},ed=()=>{Ht(Be),V({message:"switch from video to ads"}),M.log("switch from video to ads"),Be.actions.internal.pause(),je(),be.set("ads")},td=l=>{Ht(Be);let E=l?"LiveWaitingStart":"thumb";M.log("set live waiting start",{state:l,playerPhase:E}),be.set(E)},id=l=>{Ht(Be);let E=l?"LiveWaitingRecover":"thumb";M.log("set live waiting recover",{state:l,playerPhase:E}),be.set(E)},nd=l=>{Ht(Be);let E=l?"LiveWaitingRecord":"thumb";M.log("set live waiting record",{state:l,playerPhase:E}),be.set(E)},rd=()=>(Ht(Be),M.log("get debug text data"),Sl(f,oe,Be,w.getTraceId(),k)),od=()=>(Ht(Be),JSON.stringify(w.getFinishedSpans())),ad=()=>(Ht(Be),wl(f,oe,Be)),sd=()=>O,Xa=l=>{if(Ht(Be),f.info.isEnded$.getValue())return;let E=!l;if(_e(Be.playerPhase)==="ads"){V({message:`pause ads, internalCall: ${E}`}),M.log("pause ads",{internalCall:E}),_.pause();return}V({message:`pause video, internalCall: ${E}`}),M.log("pause video",{internalCall:E}),E&&d?.onPause?.(),f.pause()},es=l=>{Ht(Be);let E=!l;if(_e(Be.playerPhase)==="ads"){V({message:`play ads, internalCall: ${E}`}),M.log("play ads",{internalCall:E}),_.play();return}V({message:`play video, internalCall: ${E}`}),M.log("play video",{internalCall:E}),E&&d?.onPlay?.(),f.play()},ld=l=>{Ht(Be);let E=!l;if(_e(Be.playerPhase)==="ads"){V({message:"player cannot be stopped during ads via external method"});return}V({message:`player will be stopped, internalCall: ${E}`}),m?.()},ts=(l,E)=>{Ht(Be),V({message:`first start, show ads: ${l}, internalCall: ${!E}`}),M.log("first start",{showAds:l,external:E}),l?be.set("ads"):(be.set("video"),E?f.play():Be.actions.internal.togglePlay())},ud=()=>(V({message:"getting preview thumbs data"}),M.log("get preview thumbs data",{...h}),h),dd=()=>{M.log("destroy store"),J.unsubscribe(),f.destroy(),_.destroy(),y?.destroy(),C?.destroy(),se.unsubscribe(),Y.destroy()},Be={interfaceLanguage$:ae,isCyrillicRelatedInterface$:Re,initVideo:Pe,videoId:i,playerPhase:v,vsid:le,state:{positionExact$:Ce,positionWithScrubbing$:Wu,duration$:Kn,playbackState$:qe,playbackStateRealistic$:nt,isPlaying$:Aa,isLoaderVisible:Ie,bufferedProgress$:Iu,isLive$:Gt,canChangePlaybackSpeed$:Qt,isActiveLive$:Sa,isOldestAvailableLive$:wa,isRewindableLive$:mu,isEnded$:pi,muted$:Si,volume$:Li,trafficSavingEnabled$:He,highQualityEnabled$:Ue,autoQualityLimitingAvailable$:Xe,availableVideoStreams$:vu,availableAudioStreams$:Ma,videoStream$:gu,audioStream$:Ia,currentQuality$:$a,isAutoQualityEnabled$:Ca,availableQualities$:xu,currentPlaybackRate$:Gr,availablePlaybackRates$:qr,currentSubtitle$:wi,availableTextTracks$:Kr,availableSubtitlesList$:Va,currentSubtitleCaptions$:Tu,isAutoSubtitleCaptionVisible$:Mu,chromecastState$:pt,chromecastDeviceName$:Ze,chromecastConnected$:hu,currentFormat$:Ci,throughputEstimation$:Wi,videoBitrate$:du,videoSize$:cu,errorLog$:we,crashed$:L,isAudioAvailable$:pu,isAudioDisabled:!!o,canDownload:S.features.download&&!!s,availableSources$:ja,hasMpegSources$:ku,looped$:Ua,loadedMetadata$:Le,isAutoQualityAvailable$:Oa},ui:{t:Me,controlsVisible:z(!1),touched:z(!1),controls:{prevButton:z(void 0),playButton:z(void 0),replayButton:z(void 0),nextButton:z(void 0),playPrevChapterButton:z(void 0),seekToInteractiveButton:z(void 0),interactiveGraphButton:z(void 0),liveButton:z(void 0),time:z(void 0),episodes:z(void 0),volume:z(void 0),subtitles:z(void 0),settings:z(void 0),context:z(void 0),chromecast:z(void 0),pip:z(void 0),fullscreen:z(void 0),vkLogo:z(void 0),interactiveTimeIndicator:z(void 0),timeline:z(void 0),autoplayNextToggle:z(void 0)},modals:{hotKeyMap:{show:z(!1),data:z({title:"",closeBtnText:"",groups:[]})}},isFullscreen:F,isFullscreenOpenedByKeyboard:he,isAutoplay:z(!1),debugPanelVisible:z(!1),episodes:{panelOpened$:z(!1),openedByKeyboard$:z(!1)},contextMenu:{visible$:z(!1),btnRef$:z(void 0),openedByBtnKeyboard$:z(!1),openedByHotKey$:z(!1),lastActiveElem$:z(void 0),showContextMenuBtn$:z(!1),position$:z({top:0,left:0})},playerSize:B,isMobile:X,icon3DVideoVisible:z(!1),scrubbingInProgress:io,volumeChangingInProgress:no,interactiveHideMobileControls:z(!1),overlayContainer$:z(void 0),startedByKeyboard$:z(!1),autoplayNextEnabled$:z(!1),timerNextVideoRunning$:z(!0),settingsMenu:{visible$:z(!1),ref$:z(void 0),openedByBtnKeyboard$:z(!1)},settingsSubMenu:{visible$:z(!1),ref$:z(void 0),name$:z(void 0)},userActionsDisabled:z(!1),hiddenControls:{volume:z(!1),vkLogo:z(!1),pip:z(!1),chromecast:z(!1),settings:z(!1)},isControlsAvailable:Ga,controlBlocks:{topLeft:z(void 0),topRight:z(void 0),middle:z(void 0),bottom:z(void 0),bottomLeft:z(void 0),bottomRight:z(void 0)},videoTitleInfo:z(void 0),previewTrackNotificationVisible:z(!1)},ads:{position:z(0),duration:z(0),playbackState:z("inactive"),canSkip:z(!1),secondsToWatchBeforeSkip:z(0),postrollPassed:z(!1)},webApi:{focusManager:R},actions:{internal:{preload:Ou,firstStart:l=>ts(l,!1),play:()=>es(!1),pause:()=>Xa(!1),togglePlay:Pu,toggleMuted:Lu,openSettingsMenu:$u,closeSettingsMenu:Cu,setVolume:l=>Jr(l),setMuted:l=>_n(l),startVolumeChanging:Gu,stopVolumeChanging:qu,setVideoStream:_u,setAudioStream:l=>ka(l),setQuality:(l,E)=>Fa(l,E),setTrafficSavingEnabled:l=>Ha(l),setHighQualityEnabled:l=>Qa(l),setPlaybackRate:Xr,incrementPlaybackRate:Vu,decrementPlaybackRate:ju,setSubtitle:l=>eo(l),toggleSubtitle:()=>Ba(!1),startScrubbing:Qu,progressScrubbing:Ja,completeScrubbing:Yu,switchToActiveLive:Zu,switchFromAdsToVideo:Xu,switchFromVideoToAds:ed,skipAd:Ju,setLiveWaitingStart:td,setLiveWaitingRecover:id,setLiveWaitingRecord:nd,getDebugTextData:rd,getTraceTextData:od,getDebugPanelData:ad,getVideoElement:sd,seekTime:(l,E,j)=>Ka(l,E,j),clearDelayedBufferingCheckTimeout:fu,seekToPercent:Za,getPreviewThumbsData:ud,downloadVideo:Du,addLanguage:ea,setLanguage:fe,setLooped:za,checkFullscreenSupport:H},external:{firstStart:l=>ts(l,!0),play:()=>es(!0),pause:()=>Xa(!0),stop:()=>ld(!0),seekTime:l=>zu(l),setPlaybackRate:l=>Hu(l),setAutoQualityLimits:l=>Fu(l),setMuted:l=>_n(l),toggleSubtitle:()=>Ba(!0),changeSubtitle:Uu,setVolume:l=>Jr(l),setLiveLowLatency:Ku,hideControls:()=>qa(!1),showControls:()=>qa(!0),setQuality:l=>Fa(l),setTrafficSavingEnabled:l=>Ha(l),setHighQualityEnabled:l=>Qa(l),changeAudioStream:yu}},callbacks:d,setUiCallbacks:l=>{q={...l}},getAdmanWrapper:()=>_,getLogger:()=>W,getPlayer:()=>f,destroy:dd};return Be};import{now as vf,ValueSubject as gf}from"@vkontakte/videoplayer-shared";import{cloneDeepWith as _f,InterfaceLanguage as yf,Observable as bf,Subscription as xf,InternalsExposure as Ef,skip as Af,getPlayerId as Sf}from"@vkontakte/videoplayer-shared";import{clientChecker as wf}from"@vkontakte/videoplayer-core";import{OneStat as Tf,ThinOneStat as Mf,MediascopePixel as If}from"@vkontakte/videoplayer-statistics";function qn(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}import{devNull as xa}from"@vkontakte/videoplayer-shared";var Qr=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],r=this.getActiveElement();t.shiftKey&&r===i?(t.preventDefault(),n.focus()):!t.shiftKey&&r===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 Br=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 Qr(()=>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 hf}from"@vkontakte/videoplayer-shared";var ba=hf().HTMLElement||class{constructor(){this.isConnected=!1}};var kf={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:yf.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},uu=Fe(void 0),Yr=class extends ba{svelteStubComponent;svelteRootComponent;svelteErrorComponent;store;statistics;sentry;_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 gf(null);constructor(){super(),this.subscription=new xf,this.fatalError$.subscribe(t=>{this.unmountComponent(this.svelteErrorComponent),t&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Ii(fa,{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}),r={target:this.playerContainer,props:n};this.svelteStubComponent=Ii(pa,r),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:r,statUserSalt:o,statTrackCode:s,statVKAppId:d,refreshStatAuthToken:c,autoplay:h,isTouch:p,refDomain:a,deviceId:u}=qn(this.videoConfig,i),{unitedVideoId:m,isClip:b=!1}=t;if(this.uiConfig.features.statistics&&m)try{return new Tf({movieId:m,albumId:n,place:r,trackCode:s,vkAppId:d,autoplay:h??!1,mobile:p,clip:b,refDomain:a,deviceId:u,isPreviewPlayerView:!1},{refreshAuthToken:c,userSalt:o,config:this.statisticsConfig})}catch(g){console.error(g)}};createThinOneStat(t,i={}){if(!this.videoConfig)return;let{deviceId:n,preload:r,refreshStatAuthToken:o}=qn(this.videoConfig,i),{unitedVideoId:s}=t;if(this.uiConfig.features.thinStatistics&&s)return new Mf.ThinOneStat({deviceId:n,movieId:s,preload:r,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:o})}createPlayer(t,i={},n){if(!this.videoConfig)return;let{albumId:r,statPlace:o,statAuthToken:s,preload:d,autoplay:c,volume:h,muted:p,fromTime:a,canRewindLive:u,supportLink:m,showAds:b,adsSlotId:y,adsParams:g={},adsAutoplayParam:D,interfaceLanguage:N,isCyrillicRelatedInterface:k,isTouch:x,isAudioDisabled:S,isLiveCatchUpMode:w,fullScreenTarget:M,failoverHosts:f,canDownload:W,callbacks:_,saveRate:C,volumeMultiplier:R,showEndScreen:V,mediascopePixels:oe}=qn(this.videoConfig,i),{sources:O,title:q,thumbUrl:Y,unitedVideoId:J,isClip:Ae=!1,duration:X,adsParams:le={},previewThumbsData:F,subtitles:he,subtitlesForcedLanguage:H,live:Le,adsExternalApi:we}=t;if(!O&&!Le){let be=new Error("empty sources and live");this.fatalError$.next(be),_?.onCrashed?.(be.message);return}let se={...g,...le},L={focusManager:this.focusManager},fe=this.createOneStat(t,i),ae=this.createThinOneStat(t,i),ue;oe&&(ue=new If({pixels:oe})),(fe||ae)&&(this.statistics=new zr(fe,ae,ue)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Qi(this.uiConfig.sentry,{version:fn,env:Sr},{movieId:J,albumId:r,place:o,autoplay:c??!1,mobile:x,clip:Ae}),this.sentry={...this.sentry,...Qi.getInstance()},this.store=lu({player:n,interfaceLanguage:N,isCyrillicRelatedInterface:k,videoId:J,isLiveCatchUpMode:w,isAudioDisabled:S,statAuthToken:s,callbacks:_,webApi:L,previewThumbsData:F,canDownload:W,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:C,stopPlayer:()=>this.stop(),statistics:this.statistics,internalsExposure:this.internalsExposure,playerId:this.playerId});let Me=()=>{if(!this.store||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(v=>_?.onCurrentFormatChanged?.(v))),this.subscription.add(this.store.state.throughputEstimation$.subscribe(v=>_?.onThroughputEstimationChanged?.(v))),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(v=>_?.onTrafficSavingEnabledChanged?.(v))),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(v=>_?.onHighQualityEnabledChanged?.(v))),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(v=>_?.onAutoQualityEnabledChanged?.(!!v))),this.subscription.add(new bf(v=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(I=>v.next(I)))}).pipe(Af(1)).subscribe(v=>_?.onCurrentPlaybackRateChanged?.(v))),this.subscription.add(this.store.state.volume$.subscribe(v=>_?.onVolumeChange?.(v))),this.subscription.add(this.store.state.muted$.subscribe(v=>{if(v)_?.onMute?.();else{let I=(this.store?.state.volume$&&_e(this.store.state.volume$))??0;_?.onUnmute?.(I)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(v=>_?.onVideoBitrateChanged?.(v))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(v=>_?.onVSIDChanged?.(v))),Se(uu,{sources:O,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:q,thumbUrl:Y,subtitles:he,subtitlesForcedLanguage:H,live:Le,preload:d,autoplay:c,muted:p,volume:h,fromTime:a,canRewindLive:u,supportLink:m,showAds:b,adsSlotId:y,adsParams:se,adsAutoplayParam:D,duration:X,failoverHosts:f,fullScreenTarget:M,saveRate:C,shadowRootContainer:this.shadowRootContainer,outerContainerRef:this.rootContainer,volumeMultiplier:R,showEndScreen:V,adsExternalApi:we,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let be={target:this.playerContainer,props:P(uu)};this.svelteRootComponent=Ii(da,be),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?xa.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):xa.destroy("ui")};this.coreConfig.asyncResolveClientChecker?wf.isInited$.subscribe(be=>{be&&(console.log("UI TV SDK async start"),Me())}):Me()}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=qn(kf,_f(t,n=>n instanceof ba?n:void 0)),this.playerId=Sf(t.playerId),this.uiConfig=gl(i.ui??{}),this.coreConfig=i.core??{},this.statisticsConfig=i.statistics??{},this.metaConfig=i.meta,this.sentry={config:this.uiConfig.sentry??{}},this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new Ef("ui",this.playerId)),xa.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+this.videoConfig?.showAds],numbers:[vf()]}),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 Br(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,r=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0)};n&&r(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{n||r(),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(),r=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(t,{autoplay:!1})};if(n){r();return}this.store?.callbacks&&(this.store.callbacks.onLiveEnded=r)}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&&zn(t)}};import{InterfaceLanguage as kk,VKNumericLanguage as Nk,loadVKLangPack as Dk}from"@vkontakte/videoplayer-shared";import{VideoQuality as Ck,VideoFormat as $k}from"@vkontakte/videoplayer-core";var wk=()=>{window.customElements.define("vk-video-player-tv",Yr)};export{kk as InterfaceLanguage,fn as VERSION,Nk as VKNumericLanguage,$k as VideoFormat,Ck as VideoQuality,Dk as loadVKLangPack,wk as registerPlayerWebComponent};
49
+ Audio: ${(rv(Q).audioCodec||"")??""} ${rv(Q).audioLanguage?`(${rv(Q).audioLanguage})`:""}`)),rE(e,t)},rD(p,e=>{(rv(Q).videoCodec||rv(Q).audioCodec)&&e(h)}),v=nq(p,2),m=e=>{var t=se(),i=nq(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(Q).viewport)),rE(e,t)},rD(v,e=>{rv(Q).viewport&&e(m)}),g=nq(v,2),_=e=>{var t=st(),i=nq(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(Q).videoSize)),rE(e,t)},rD(g,e=>{rv(Q).videoSize&&e(_)}),y=nq(g,2),b=e=>{var t=si(),i=nq(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(()=>rP(n,rv(Q).cdn)),rE(e,t)},rD(y,e=>{rv(Q).cdn&&e(b)}),w=nq(y,2),k=e=>{var t=sn(),i=nq(nz(t),2),n=nz(i);iN(i),iN(t),nX(()=>rP(n,`${rv(Q).volume??""} %`)),rE(e,t)},rD(w,e=>{rv(Q).volume&&e(k)}),x=nq(w,2),S=e=>{var t=sr(),i=nq(nz(t),2),n=nz(i);iN(i),iN(t),nX(e=>rP(n,`${e??""} s`),[()=>rv(Q).position.toFixed(2)]),rE(e,t)},rD(x,e=>{rv(Q).position&&e(S)}),C=nq(x,2),$=e=>{var t=so(),i=nq(nz(t),2),n=nz(i);iN(i),iN(t),nX(e=>rP(n,`${e??""} s`),[()=>rv(Q).buffer.toFixed(2)]),rE(e,t)},rD(C,e=>{rv(Q).buffer&&e($)}),A=nq(C,2),E=e=>{var t=sa(),i=nq(nz(t),2),n=nz(i);iN(i),iN(t),nX(e=>rP(n,`${e??""} s`),[()=>rv(Q).nativeBuffer.toFixed(2)]),rE(e,t)},rD(A,e=>{rv(Q).nativeBuffer&&e(E)}),T=nq(A,2),P=e=>{var t=ss(),i=nq(nz(t),2),n=nz(i);iN(i),iN(t),nX(e=>rP(n,`${e??""} s`),[()=>rv(Q).liveLatency.toFixed(2)]),rE(e,t)},rD(T,e=>{rv(Q).liveLatency&&e(P)}),L=nq(T,2),R=e=>{var t=sl(),i=nq(nz(t),2),n=nz(i,!0);iN(i),iN(t),nX(e=>rP(n,e),[()=>[{value:rv(Q).currentVideoSegmentLength,title:"Video:"},{value:rv(Q).currentAudioSegmentLength,title:"Audio:"}].filter(({value:e})=>e).map(({value:e,title:t})=>`${t} ${((e??0)/1e3).toFixed(2)} s`).join(" & ")]),rE(e,t)},rD(L,e=>{(rv(Q).currentVideoSegmentLength||rv(Q).currentAudioSegmentLength)&&e(R)}),V=nq(L,2),O=nq(nz(V),2),I=nz(O),iN(O),iN(V),M=nq(V,2),N=e=>{var t=su(),i=nq(nz(t),2);aJ(i,{get values(){return rv(et)}});var n=nq(i,2),r=nz(n);iN(n),iN(t),nX(e=>rP(r,`${e??""} Kbps`),[()=>rv(Q).speed.toFixed(2)]),rE(e,t)},rD(M,e=>{rv(Q).speed&&e(N)}),j=nq(M,2),D=e=>{var t=sd(),i=nq(nz(t),2);aJ(i,{get values(){return rv(ei)}});var n=nq(i,2),r=nz(n);iN(n),iN(t),nX(e=>rP(r,`${e??""} Kbps`),[()=>rv(Q).bitrate.toFixed(2)]),rE(e,t)},rD(j,e=>{rv(Q).bitrate&&e(D)}),F=nq(j,2),aJ(z=nq(nz(F),2),{get values(){return rv(ee)}}),q=nz(B=nq(z,2),!0),iN(B),iN(F),iN(n),iN(t),nX(()=>{rY(t,"aria-label",en),rP(a,rv(Q).version),rP(I,`${rv(G)??""} / ${rv(K)??""} frames`),rP(q,rv(J))}),rb("click",i,e=>{e.stopPropagation(),oS.remove(ac),U.set(!1)}),rE(e,t),iY()};rD(m,e=>{oi(u,"$debugPanelVisible",i)&&e(g)}),rE(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=>nE(d,e),()=>rv(d)),rE(e,v),iY(),n()}(nz(F),{get thumbUrl(){return u()},firstStart:N,get autoplay(){return h()},get videoContainer(){return rv(I)},set videoContainer($$value){nE(I,$$value,!0)}}),iN(F),rE(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,ar.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 y()},set showAds($$value){y($$value)},get adsSlotId(){return b()},set adsSlotId($$value){b($$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 C()},set shadowRootContainer($$value){C($$value)},get outerContainerRef(){return $()},set outerContainerRef($$value){$($$value)},get fullScreenTarget(){return A()},set fullScreenTarget($$value){A($$value)},get failoverHosts(){return E()},set failoverHosts($$value){E($$value)},get saveRate(){return T()},set saveRate($$value){T($$value)},get volumeMultiplier(){return P()},set volumeMultiplier($$value){P($$value)},get showEndScreen(){return L()},set showEndScreen($$value){L($$value)}});return n(),z}var sR=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),sV=r$('<div class="title s-2"> </div>'),sO=r$('<div class="playerStub s-2"><!> <!></div>'),sI={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 sM(e,t){rz(e,sI);var i=sO(),n=nz(i),r=e=>{var i=sV(),n=nz(i,!0);iN(i),nX(()=>rP(n,t.title)),rE(e,i)};rD(n,e=>{t.title&&e(r)});var o=nq(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"),sv(e,{width:"57",height:"60",get fill(){return rv(n)},testId:"stub-icon",children:(e,t)=>{var i=sR();ij(9),rE(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}')`:"")),rE(e,i)}var sN=r$('<div class="playerError s-1"><!></div>'),sj={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 sD(e){rz(e,sj);var t=sN();sy(nz(t),{}),iN(t),rE(e,t)}var sF=k(eF(),1),sz=k(tC(),1),sB=k(tT(),1),sq=k(eM(),1),sW=k(ii(),1),sU=k(eM(),1),sQ=k(td(),1);class sH{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 oK,loadStarted$:new oK,loadEnded$:new oK,loadError$:new oK,ready$:new oK,slotRequested$:new oK,started$:new oK,timeRemained$:new oK,paused$:new oK,resumed$:new oK,ended$:new oK,empty$:new oK,skipped$:new oK,clicked$:new oK,closed$:new oK,error$:new oK};constructor(e,t){this.log=e.createComponentLog("AdmanWrapper"),oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[oQ()]}),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:[oQ()]}),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:[oQ()]}),t(),this.events.loadEnded$.next()):(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[oQ()]}),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:[oQ()]}),window.AdmanHTML?(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[oQ()]}),t(),this.events.loadEnded$.next()):(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[oQ()]}),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:[oQ()]}),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:[oQ()]}),t(),this.events.loadEnded$.next()):(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[oQ()]}),i())},o=()=>{a=!0,i()},a=!1,s=window.setTimeout(()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[oQ()]}),o()},this.loadTimeout);e.addEventListener("abort",o),e.aborted&&(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[oQ()]}),o()),window.AdmanHTML=window.AdmanHTML||null,sW.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:[oQ()]}),a||(window.AdmanHTML?(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[oQ()]}),t(),this.events.loadEnded$.next()):(oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[oQ()]}),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:[oQ(),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}=oq(),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=sQ.default(sU.default(m).filter(([e,t])=>oU(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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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:[oQ(),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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};onAdClosed=()=>{oW.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",this.currentAdSection??""],numbers:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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:[oQ()]}),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&&oG(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 sK=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 sG{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 sJ{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 sG;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 sY=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 sJ).parse(t);e.texts=[...e.texts,...i]}}else{let{startTime:i,endTime:n}=(new sG).parse(t);e.startTime=i,e.endTime=n}(e.startTime||e.endTime)&&e.texts.length>0&&i.push(e)}return i}},sZ=0,sX=!1,s0="",s1=(e,t=0,i=0)=>e<t&&e<i,s2=(e,t=0,i=0)=>e>=t&&e<=i,s4={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"},s5={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"},s3=e=>s4[e]??s4[s5[e]]??void 0,s9=k(tC(),1);import{MicroSentryClient as s6,Severity as s7}from"@micro-sentry/core";function s8(e,t){return"[object RegExp]"===Object.prototype.toString.call(t)?t.test(e):"string"==typeof t&&-1!==e.indexOf(t)}class le extends s6{constructor(e,t=window){super(e),this.options=e,this.window=t,this.destroyed=!1,this._state={};let{plugins:i=[],beforeSend:n=e=>e,beforeBreadcrumb:r=e=>e,blacklistUrls:o=[],ignoreErrors:a=[],release:s}=this.options||{};this.plugins=i.map(e=>new e(this)),this.beforeSend=n,this.beforeBreadcrumb=r,this.blacklistUrls=o,this.ignoreErrors=a,this.release=s}get state(){return this._state}clearState(){this._state={}}setTags(e){return this.setKeyState("tags",{...e}),this}setTag(e,t){return this.extendState({tags:{[e]:t}}),this}setExtra(e,t){return this.extendState({extra:{[e]:t}}),this}setExtras(e){return this.setKeyState("extra",{...e}),this}setUser(e){return this.setKeyState("user",{...e}),this}clone(){let e=new le({...this.options,plugins:[]});return e.extendState(this.state),e}withScope(e){let t=this.clone();e(t),t.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(e){this.extendState({breadcrumbs:[{timestamp:Date.now()/1e3,...this.beforeBreadcrumb(e)}]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,t){this.send({...this.getRequestBlank(),message:e,level:t})}destroy(){this.destroyed=!0,this.plugins.forEach(e=>{e.destroy&&e.destroy()})}isIgnoredError(e){return!!this.ignoreErrors.length&&this.getPossibleEventMessages(e).some(e=>this.ignoreErrors.some(t=>s8(e,t)))}getRequestBlank(){return{request:{url:this.window.location.toString(),headers:{"User-Agent":this.window.navigator.userAgent}},...super.getRequestBlank(),sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"},...this.state}}send(e){this.destroyed||this.isDeniedUrl(e)||this.isIgnoredError(e)||(super.send(this.beforeSend({release:this.release,...e})),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{let{type:t="",value:i=""}=e.exception.values&&e.exception.values[0]||{};return[`${i}`,`${t}: ${i}`]}catch(e){}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;let t=this.getEventFilterUrl(e);return!!t&&this.blacklistUrls.some(e=>s8(t,e))}getEventFilterUrl(e){try{if(e.exception){let t=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return t&&t[t.length-1].filename||null}return null}catch(e){return null}}extendState(e){this._state=Object.keys(e).reduce((t,i)=>{let n=this._state[i],r=Array.isArray(n)?n:null,o=e[i],a=Array.isArray(o)?o:null;return{...t,[i]:r||a?[...r||[],...a||[]]:{..."string"!=typeof n?n:{},..."string"!=typeof o?o:{}}}},this._state)}setKeyState(e,t){this._state[e]=t}}var lt=null;class li{sentrySubscription;options;version;context;sentryClient;constructor(e,t,i={}){!lt&&e.dsn&&(this.sentryClient=new le({dsn:e.dsn,environment:t.env}),this.version=t.version,this.sentrySubscription=new oZ,this.options=e,this.context=i,lt=this)}destroy(){this.sentryClient?.destroy(),this.sentrySubscription?.unsubscribe(),lt=null}logIError(e,t=!1){e.thrown&&this.report(e.thrown,{fatal:t,errorType:e.id,category:e.category},{message:e.message,errorData:e.data})}report(e,t={},i={}){let{sentryClient:n,context:r,options:o}=this,{sampleRate:a=0,whiteErrorIdList:s,whiteErrorCategoryList:l=[],blackErrorIdList:u,blackErrorCategoryList:d}=o,{errorType:c,category:f}=t;if(!(oY(f)&&s9.default(d,f)||oY(c)&&s9.default(u,c))&&(Math.random()<=a||oY(f)&&s9.default(l,f)||oY(c)&&s9.default(s,c))){Object.keys(t).length&&n.setTags({version:this.version,...t}),(Object.keys(r).length||Object.keys(i).length)&&n.setExtras({...r,...i});try{c&&n.captureMessage(c,t.fatal?s7.fatal:s7.error),n.report(e)}catch(e){console.error(e)}}}static getInstance(){return lt}}function ln(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 lr{oneStat;thinOneStat;mediascopePixel;statSubscription;constructor(e,t,i,n=new o7){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 lo{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 la{shadowRoot;lastFocusedNode=null;focusLock;constructor(e){this.shadowRoot=e,this.focusLock=new lo(()=>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 ls=ae().HTMLElement||class{isConnected=!1},ll={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:o2.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},lu=n$(void 0);class ld extends ls{svelteStubComponent;svelteRootComponent;svelteErrorComponent;store;statistics;sentry;_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 o0(null);constructor(){super(),this.subscription=new o5,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=rR(sD,{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(sM,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}=ln(this.videoConfig,t),{unitedVideoId:f,isClip:p=!1}=e;if(this.uiConfig.features.statistics&&f)try{return new as({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}=ln(this.videoConfig,t),{unitedVideoId:o}=e;if(this.uiConfig.features.thinStatistics&&o)return new al.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{albumId:r,statPlace:o,statAuthToken:a,preload:s,autoplay:l,volume:u,muted:d,fromTime:c,canRewindLive:f,supportLink:p,showAds:m,adsSlotId:g,adsParams:_={},adsAutoplayParam:y,interfaceLanguage:b,isCyrillicRelatedInterface:w,isTouch:k,isAudioDisabled:x,isLiveCatchUpMode:S,fullScreenTarget:C,failoverHosts:$,canDownload:A,callbacks:E,saveRate:T,volumeMultiplier:P,showEndScreen:L,mediascopePixels:R}=ln(this.videoConfig,t),{sources:V,title:O,thumbUrl:I,unitedVideoId:M,isClip:N=!1,duration:j,adsParams:D={},previewThumbsData:F,subtitles:z,subtitlesForcedLanguage:B,live:q,adsExternalApi:W}=e;if(!V&&!q){let e=Error("empty sources and live");this.fatalError$.next(e),E?.onCrashed?.(e.message);return}let U={..._,...D},Q={focusManager:this.focusManager},H=this.createOneStat(e,t),K=this.createThinOneStat(e,t);R&&(n=new au({pixels:R})),(H||K)&&(this.statistics=new lr(H,K,n)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new li(this.uiConfig.sentry,{version:aS,env:"prod"},{movieId:M,albumId:r,place:o,autoplay:l??!1,mobile:k,clip:N}),this.sentry={...this.sentry,...li.getInstance()},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:y,playerId:b,metaConfig:w})=>{let k,x,S,C,$,A,E={...c,isAudioDisabled:o,live:{...c.live??{},isLiveCatchUpMode:!!n}},T=oD.createRootTracer(!1),P=T.createComponentTracer("Store"),L=f||new ou(E,T,{playerId:b,onDevNullLog:s?.onDevNullLog});y?.expose({corePlayer:L});let R=new oV,V=new sH(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=li.getInstance(),I=l?.focusManager,M=R.createComponentLog("Store"),N={},j=new aT,D=new oj,F="",z=r6(!1),B=g&&g.oneStat?aA(g.oneStat.vsid$):r9(void 0),q=r6(!!(S=document).fullscreenElement||!!S.mozFullScreenElement||!!S.webkitFullscreenElement||!!S.msFullscreenElement),W=r6(!1),U=r6(!1),Q=r6([]),H=oI(L.events.fatalError$,L.events.managedError$).subscribe(e=>Q.update(t=>[...t,e])),K=r9(!1,e=>{let t=L.events.fatalError$.subscribe(()=>e(!0));return()=>t.unsubscribe()}),G=async e=>{let t=sz.default(sF.default(oT),e);if(d.downloadVKLanguages&&(t&&d.updateBuiltinLanguages||!a1.has(e))){let t;try{t=await oR(e,"videoplayer","videoplayer")}catch(e){g?.oneStat?.logError({errorType:"VKLangPack",fatal:!1}),O?.report(e,{errorType:"VKLangPack",fatal:!1})}t&&(a4({language:e,pack:t,fallback:d.defaultLanguage}),J.set(e),Y.update(e=>e+1))}a1.has(e)&&J.set(e)},J=r6(e),Y=r6(0),Z=r6(t);G(e);let X=(e,t)=>a5(r8(J),e,t,d.defaultLanguage),ee=r6("thumb");ee.subscribe(e=>{"ads"===e&&L.info.playbackState$.getValue()&&en()});let et={...C=r7([K,ee],([e,t])=>e?"crashed":t),is:e=>r8(C)===e},ei=r6(),en=()=>{ei.set({muted:L.info.muted$.getValue()})},er=r6({width:0,height:0}),eo=null,ea=L.info.isBuffering$,es=r9(ea.getValue(),e=>{let t=ea.subscribe(t=>{t&&null===eo?eo=window.setTimeout(()=>{e(ea.getValue()),eo=null},d.loaderDelay):e(t)});return()=>{t.unsubscribe(),eo&&clearTimeout(eo)}});P.log("create store"),M({message:"create store"});let el=new oN,eu=new oN,ed=new oN,ec={actionRewind$:el,actionSeek$:eu,inFullscreen$:new oM(e=>q.subscribe(t=>e.next(t))),actionSetSubtitle$:ed},ef=new oN,ep=new oN,eh={actionSeek$:eu,actionSubtitlesSwitched$:ef,actionQuality$:ep,playerSize$:new oM(e=>er.subscribe(t=>e.next(t))),inFullscreen$:new oM(e=>q.subscribe(t=>e.next(t))),isLoaderVisible$:new oM(e=>es.subscribe(t=>e.next(t)))};if(g){let{oneStat:e,thinOneStat:t,mediascopePixel:i,statSubscription:n}=g;e&&(n.add(e.attachToUi(ec)),n.add(e.attachToAds(V.events)),e.authorize(r).catch(e=>{M({message:`onestat auth error ${String(e)}`})}),i&&i.attachTo(L)),t&&(n.add(t.attachTo(L,V.events)),n.add(t.attachToUi(eh)),n.add(t.attachToAds(V.events)),t.updateContext({isMobile:r8(z)}),t.authorize(r))}if(O){let e=new oj,t=(t,i)=>e.add(t.subscribe(i));if(t(L.events.managedError$,e=>{O.logIError(e)}),t(L.events.fatalError$,e=>{O.logIError(e,!0)}),g){let{oneStat:e}=g;e&&t(e.experimental.error$,e=>{O.logIError(e)})}O.sentrySubscription.add(e)}let ev=()=>{if(of.device.isIOS&&x)try{var e;e=x,e?.webkitExitFullscreen&&e?.webkitExitFullscreen()}catch(e){M({message:`exitIosSafariFullscreen failed: ${e}`})}};D.add(L.experimental.element$.subscribe(e=>{e&&(x=e,e.classList.add("player-media"))})).add(L.events.ended$.subscribe(()=>{ev(),s?.onEnded?.()})).add(L.events.looped$.subscribe(()=>{s?.onLooped?.()})).add(L.events.started$.subscribe(async()=>{let e=L.info.muted$.getValue();s?.onStarted?.(),N.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(()=>{U.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 em=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&&sz.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)}),eg=aA(L.info.playbackState$),e_=r7([eg,aA(L.info.isBuffering$)],([e,t])=>t?"buffering":e),ey=aA(L.info.currentBuffer$),eb=aA(L.info.isEnded$),ew=aA(L.info.isLive$),ek=d.features.playbackRate?aA(L.info.canChangePlaybackSpeed$):r9(!1),ex=aA(L.info.liveBufferTime$),eS=aA(L.info.volume$),eC=aA(L.info.muted$),e$=aE(L.info.predefinedQualityLimitType$.pipe(oO(e=>e===od.TRAFFIC_SAVING)),L.info.predefinedQualityLimitType$.getValue()===od.TRAFFIC_SAVING),eA=aE(L.info.predefinedQualityLimitType$.pipe(oO(e=>e===od.HIGH_QUALITY)),L.info.predefinedQualityLimitType$.getValue()===od.HIGH_QUALITY),eE=aA(L.info.autoQualityLimitingAvailable$),eT=aA(L.info.availableQualities$),eP=aA(L.info.availableQualitiesFps$),eL=aA(L.info.chromecastState$),eR=aA(L.info.chromecastDeviceName$),eV=aA(L.info.currentFormat$),eO=aA(L.info.throughputEstimation$),eI=aA(L.info.videoBitrate$),eM=aA(L.info.intrinsicVideoSize$),eN=aA(L.info.duration$),ej=aA(L.info.isAudioAvailable$),eD=r7([eN,ew],([e,t])=>t?-e:e),eF=r7([eg],([e])=>e===ol.PLAYING),ez=aA(L.info.atLiveEdge$),eB=aA(L.info.atLiveDurationEdge$),eq=aA(L.info.position$),eW=r7([eq,eN],([e,t])=>isFinite(e)&&isFinite(t)&&!!t),eU=r7([eL],([e])=>e===os.CONNECTED),eQ=aA(L.info.availableVideoStreams$),eH=d.features.audioLanguages?aA(L.info.availableAudioStreams$):r9([]),eK=aA(L.info.currentVideoStream$),eG=aA(L.info.currentAudioStream$),eJ=e=>{L.setAudioStream(e)},eY=e=>{let t;if(1===e.length&&(t=sB.default(e,0)),t??=e.find(e=>"isDefault"in e&&e.isDefault),d.features.userVideoPrefs&&i){let n=aU(d.userSalt,String(i));n?.audioTrackId&&(t=e.find(e=>e.id===n.audioTrackId)??t)}let n=ox.get(aO);return n&&(t??=e.find(({language:e})=>n===e)),t??=sB.default(e,0)},eZ=!1;D.add(L.info.availableAudioStreams$.subscribe(e=>{if(!eZ&&e.length){let t=eY(e);t&&(L.setAudioStream(t),eZ=!0)}})),eH.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 eX=!1;D.add(L.info.availableVideoStreams$.subscribe(e=>{if(!eX&&e.length){let t=eY(e);t&&(L.setVideoStream(t),eX=!0)}}));let e0=r6(void 0),e1=aA(L.info.isAutoQualityEnabled$,e=>e&&e0.set(void 0)),e2=aA(L.info.currentQuality$,()=>e0.set(void 0)),e4=r7([e0,e2],([e,t])=>e??t),e5=r7(eV,e=>e!==oc.MPEG),e3=r7([eT,eP,e1,e4,e5],([e,t,i,n,r])=>{let o=[];for(let a of(r&&o.push({value:"auto",displayValue:X("auto_quality_option"),selected:i}),e.filter(e=>!oP(e)))){let e=t[a];o.push({value:a,displayValue:`${a}${e?sK(e):""}`,selected:!i&&a===n})}return o}),e9=aA(L.info.currentPlaybackRate$),e6=r7([e9,ez,eB],([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?X("playback_rate_1"):X("playback_rate",{multiplier:t.toString(10)}),selected:e===t});return a}),e7=()=>({displayValue:X("subtitles_off"),value:"off",language:""}),e8=r6(e7()),te=r7([e8,Y],([e],t)=>{t("off"===e.value?e7():e)}),tt=d.features.subtitles?aA(L.info.availableTextTracks$):r9([]),ti=($=[],A=0,{add:(e,t)=>{$[A]=[e,t],A=(A+1)%10},find:e=>$.find(([t])=>t===e)}),tn=r7([tt,te],([e,t],i)=>{let n=[],r=e.find(({id:e})=>e===t.value);if(r?.url){let[,e]=ti.find(r.url)??[];if(e)return void i(e);j.download(r.url).then(e=>{if(!e||j.isDestroyed())return;let o=new sY,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})}ti.add(r.url,n),r8(te).value===t.value&&i(n)}).catch(e=>{g?.oneStat?.logError({errorType:"Subtitles download",fatal:!1}),O?.report(e,{errorType:"Subtitles download",fatal:!1})})}i(n)}),tr=r7([e9,eF,te],([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)}}),to=r7([tt,te],([e,t])=>{if(!e.length)return[];let i=[];for(let{language:n,isAuto:r,id:o}of e){let e=n&&s3(n);n&&e&&i.push({displayValue:r?X("subtitles_auto",{language:e}):e,value:o,selected:t?.value===o,isAuto:r,language:n})}return i.length?(i.unshift({...e7(),selected:t?.value==="off"}),i):[]}),ta={available:[],prev:[]},ts=r7([em,te,tn,tr],([e,t,i,n])=>{let r=L.info.isLive$.getValue();if(r&&ta.prev!==i){let e=i.find(({id:e})=>e===t.value),n=ta.prev.find(({id:e})=>e===t.value);e&&(ta.available=[{...e,subtitles:[...n?.subtitles??[],...e.subtitles]}],ta.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})=>s2(e,t,i));let o=e>=sZ,a=e<sZ;if(sZ=e,a&&(sX=!1),oJ(h)&&s2(e,h.startTime,h.endTime)&&s0===t.value)return h;if(!oJ(v)&&r?.length&&!sX){v=r.find(({startTime:t,endTime:i})=>s2(e,t,i)||o&&s1(e,t,i)),h=void 0,!oJ(v)&&r[r.length-1].endTime<e&&(sX=!0);return}if(s2(e,v?.startTime,v?.endTime))return h=v,v=void 0,s0=t.value,h;(o&&((e,t=0,i=0)=>e>t&&e>i)(e,v?.startTime,v?.endTime)||a&&s1(e,v?.startTime,v?.endTime))&&(v=void 0)})(r?(n=L.experimental.getCurrentTime$.getValue(),n?.()??x?.currentTime??0):e,t,r?ta.available:i,r)}}),tl=r7([ts],([e])=>e?.texts?e.texts:[]);D.add(te.subscribe(e=>{if("off"===e.value)s?.onSubtitleOff?.();else{let t=sq.default(s4).find(([t,i])=>i===e.displayValue);s?.onSubtitleOn?.(t?t[0]:"",e.value)}}));let tu=r6(!0),td=r7([ey,eD,eq,ex],([e,t,i,n])=>{let r=e?.end??0;return n?(r-(-i+n-t))/t:r/t}),tc=aA(L.info.availableSources$),tf=r7([tc],([e])=>Object.keys(e?.[oc.MPEG]||{}).length>0),tp=async(e,t=()=>Promise.resolve())=>{tF.ui.settingsMenu.visible$.set(!0),await t(),P.log("open settings menu",{wasOpenedByKeyboard:e})},th=()=>{let e=Math.max(d.volumeMinRestore,aN()??0);return 0===e?d.volumeDefault:e},tv=e=>{let t=0===e?th():e,i=L.info.muted$.getValue();M({message:`set volume, volume: ${e}, preferredVolume: ${t}`});let n=!o||et.is("ads");i&&e>0&&n&&(i=!1),L.setVolume(e,i),V.setVolume(e)},tm=e=>{let t=L.info.volume$.getValue();M({message:`set muted, currentVolume: ${t}, mute: ${e}`});let i=et.is("ads");if(L.setMuted(e,i),V.setVolume(e?0:t),!e&&0===t){let e=th();L.setVolume(e),V.setVolume(e)}},tg=r6(!1),t_=e=>{P.log("set looped",{isLooped:e}),tg.set(e),L.setLooped(e)};t_(m);let ty=(e,{byUser:t=!1}={})=>{M({message:`set quality, quality: ${e}`}),P.log("set quality",{quality:e}),t&&ep.next(e),L.setAutoQuality("auto"===e),ox.remove(aL),"auto"!==e&&(aj(i,e),e0.set(e),L.setQuality(e))},tb=e=>{M({message:`set trafficSavingEnabled, value: ${e}`}),P.log("set traffic saving enabled",{trafficSavingEnabled:e});let t=e?od.TRAFFIC_SAVING:od.UNKNOWN;L.setPredefinedQualityLimits(t)},tw=e=>{M({message:`set highQualityEnabled, value: ${e}`}),P.log("set high quality enabled",{highQualityEnabled:e}),tk(e?od.HIGH_QUALITY:od.UNKNOWN)},tk=e=>{L.setPredefinedQualityLimits(e)},tx=(e,t=!0)=>{P.log("set playback rate",{playbackRate:e}),L.setPlaybackRate(e),d.features.saveRate&&_&&!L.info.isLive$.getValue()&&t&&ox.set(aI,JSON.stringify({rate:e}))},tS=(e={...e7(),selected:!1})=>{P.log("set subtitles",{...e}),"off"!==e.value&&ed.next(e.isAuto?e.value+"_auto":e.value),ef.next({enabled:"off"!==e.value,lang:e.language,auto:!!e.isAuto}),e8.set(e)},tC=e=>{P.log("toggle subtitles");let t=r8(te);t?.value==="off"?t$(e):tA()},t$=(e,t)=>{let i;P.log("subtitle on");let n=r8(to),r=r8(J),o=F??r;t&&(i=n.find(e=>e.value===t)),tS((i??=n.filter(e=>"off"!==e.value).find(e=>e.language===o))??n[1])},tA=()=>{P.log("subtitle off"),tS(void 0)};D.add(L.info.availableTextTracks$.subscribe(e=>{s?.onAvailableSubtitlesChanged?.(function(){let t=[];for(let{language:i,isAuto:n,id:r}of e){let e=i&&s3(i);i&&e&&t.push({id:r,language:i,title:n?X("subtitles_auto",{language:e}):e})}return t}())}));let tE=r6(!0),tT=e=>{tE.set(e)},tP=(e,t,i=!0)=>{if(M({message:`seek to time, time: ${e}`}),P.log("seek to time",{time:e,action:t,forcePrecise:i}),eu.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()&&(M({message:"seek after ended, call callbacks.onPlay"}),s?.onPlay?.()),L.seekTime(e,i)},tL=(e,t,i=!1)=>{M({message:`seek to percent, percent: ${e}`}),P.log("seek to percent",{percent:e,action:t}),tP(r8(eD)*e,t,i)},tR=r6(void 0),tV=r6(!1),tO=e=>{tR.set(e)},tI=r7([em,eD,tR],([e,t,i],n)=>{n(oL(i)?i*t:e)}),tM=r6(!1),tN=e=>{if(oA(tF),L.info.isEnded$.getValue())return;let t=!e;if("ads"===r8(tF.playerPhase)){M({message:`pause ads, internalCall: ${t}`}),P.log("pause ads",{internalCall:t}),V.pause();return}M({message:`pause video, internalCall: ${t}`}),P.log("pause video",{internalCall:t}),t&&s?.onPause?.(),L.pause()},tj=e=>{oA(tF);let t=!e;if("ads"===r8(tF.playerPhase)){M({message:`play ads, internalCall: ${t}`}),P.log("play ads",{internalCall:t}),V.play();return}M({message:`play video, internalCall: ${t}`}),P.log("play video",{internalCall:t}),t&&s?.onPlay?.(),L.play()},tD=(e,t)=>{oA(tF),M({message:`first start, show ads: ${e}, internalCall: ${!t}`}),P.log("first start",{showAds:e,external:t}),e?ee.set("ads"):(ee.set("video"),t?L.play():tF.actions.internal.togglePlay())},tF={interfaceLanguage$:J,isCyrillicRelatedInterface$:Z,initVideo:e=>{M({message:`init video, config: ${JSON.stringify(e)}`}),oz.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[oB()]}),L.initVideo(e),P.log("init video"),e.subtitles&&L.setExternalTextTracks(e.subtitles),k=e,F=e.subtitlesForcedLanguage||""},videoId:i,playerPhase:et,vsid:B,state:{positionExact$:em,positionWithScrubbing$:tI,duration$:eD,playbackState$:eg,playbackStateRealistic$:e_,isPlaying$:eF,isLoaderVisible:es,bufferedProgress$:td,isLive$:ew,canChangePlaybackSpeed$:ek,isActiveLive$:ez,isOldestAvailableLive$:eB,isRewindableLive$:eW,isEnded$:eb,muted$:eC,volume$:eS,trafficSavingEnabled$:e$,highQualityEnabled$:eA,autoQualityLimitingAvailable$:eE,availableVideoStreams$:eQ,availableAudioStreams$:eH,videoStream$:eK,audioStream$:eG,currentQuality$:e4,isAutoQualityEnabled$:e1,availableQualities$:e3,currentPlaybackRate$:e9,availablePlaybackRates$:e6,currentSubtitle$:te,availableTextTracks$:tt,availableSubtitlesList$:to,currentSubtitleCaptions$:tl,isAutoSubtitleCaptionVisible$:tu,chromecastState$:eL,chromecastDeviceName$:eR,chromecastConnected$:eU,currentFormat$:eV,throughputEstimation$:eO,videoBitrate$:eI,videoSize$:eM,errorLog$:Q,crashed$:K,isAudioAvailable$:ej,isAudioDisabled:!!o,canDownload:d.features.download&&!!a,availableSources$:tc,hasMpegSources$:tf,looped$:tg,loadedMetadata$:U,isAutoQualityAvailable$:e5},ui:{t:X,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:W,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:er,isMobile:z,icon3DVideoVisible:r6(!1),scrubbingInProgress:tV,volumeChangingInProgress:tM,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:tE,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:I},actions:{internal:{preload:()=>{L.prepare()},firstStart:e=>tD(e,!1),play:()=>tj(!1),pause:()=>tN(!1),togglePlay:()=>{oA(tF);let e=r8(tF.playerPhase),t={playerPhase:e,isVideoEnded:!1,action:"none"};if(M({message:"toggle play"}),"ads"===e){t.action="play",P.log("toggle adman play",t),V.togglePlay();return}let i=()=>{M({message:"toggle play, call player.play"}),t.action="play",L.play(),s?.onPlay?.()};L.info.isEnded$.getValue()?(M({message:"toggle play, video ended, seek to 0"}),el.next(),eu.next(aa.REWIND),L.seekTime(0),i()):L.info.playbackState$.getValue()!==ol.PLAYING?i():(M({message:"toggle play, call player.pause"}),t.action="pause",L.pause(),s?.onPause?.()),P.log("toggle play",t)},toggleMuted:()=>{M({message:"toggle muted"});let e=L.info.muted$.getValue();0!==L.info.volume$.getValue()||e?tm(!e):tv(th())},openSettingsMenu:tp,closeSettingsMenu:()=>{tF.ui.settingsMenu.visible$.set(!1),P.log("close settings menu")},setVolume:e=>tv(e),setMuted:e=>tm(e),startVolumeChanging:()=>{tM.set(!0)},stopVolumeChanging:()=>{tM.set(!1)},setVideoStream:e=>{let t;e.language&&(t=e.language,ox.set(aO,t)),L.setVideoStream(e)},setAudioStream:e=>eJ(e),setQuality:(e,t)=>ty(e,t),setTrafficSavingEnabled:e=>tb(e),setHighQualityEnabled:e=>tw(e),setPlaybackRate:tx,incrementPlaybackRate:()=>{let e=r8(ek),t=r8(e6),i=t.findIndex(({selected:e})=>e);if(i===t.length-1||!e)return t[i];let n=t[i+1];return tx(n.value),n},decrementPlaybackRate:()=>{let e=r8(ek),t=r8(e6),i=t.findIndex(({selected:e})=>e);if(0===i||!e)return t[i];let n=t[i-1];return tx(n.value),n},setSubtitle:e=>tS(e),toggleSubtitle:()=>tC(!1),startScrubbing:e=>{M({message:`start scrubbing, progress: ${e}`}),P.log("start scrubbing",{progress:e}),tV.set(!0),tO(e)},progressScrubbing:tO,completeScrubbing:(e,t=!1)=>{M({message:`complete scrubbing, progress: ${e}`}),P.log("complete scrubbing",{progress:e}),tL(e,aa.SLIDER,t),tR.set(void 0),tV.set(!1)},switchToActiveLive:()=>{eu.next(aa.LIVE),M({message:"switch to active live"}),P.log("switch to active live"),L.seekTime(0),L.info.playbackState$.getValue()!==ol.PLAYING&&tF.actions.internal.togglePlay()},switchFromAdsToVideo:(e=!0)=>{oA(tF),M({message:`switch from ads to video, callPlay: ${e}`}),P.log("switch from ads to video",{callPlay:e}),ee.set("video"),e&&L.play(),o&&tm(!0);let t=r8(ei)?.muted,i=!L.info.muted$.getValue();void 0===t||i||tm(t),ei.set(void 0)},switchFromVideoToAds:()=>{oA(tF),M({message:"switch from video to ads"}),P.log("switch from video to ads"),tF.actions.internal.pause(),ev(),ee.set("ads")},skipAd:()=>{P.log("skip adman"),V.skip()},setLiveWaitingStart:e=>{oA(tF);let t=e?"LiveWaitingStart":"thumb";P.log("set live waiting start",{state:e,playerPhase:t}),ee.set(t)},setLiveWaitingRecover:e=>{oA(tF);let t=e?"LiveWaitingRecover":"thumb";P.log("set live waiting recover",{state:e,playerPhase:t}),ee.set(t)},setLiveWaitingRecord:e=>{oA(tF);let t=e?"LiveWaitingRecord":"thumb";P.log("set live waiting record",{state:e,playerPhase:t}),ee.set(t)},getDebugTextData:()=>(oA(tF),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=`${aS} (core: ${oa}, stat: ${ao}, 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(),y="";if(_){let e=o.availableQualitiesFps$.getValue()[_];y=e?`${e}fps`:""}let b=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":b?b+(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} ${_??""} ${y}`,"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 af.default(k).filter(([e,t])=>void 0!==t).map(([e,t])=>`${e}: ${t}`).join(`
55
+ `)})(L,k,tF,T.getTraceId(),w)),getTraceTextData:()=>(oA(tF),JSON.stringify(T.getFinishedSpans())),getDebugPanelData:()=>(oA(tF),((e,t,i)=>{let n=e.info,{width:r,height:o}=r8(i.ui.playerSize),a={version:aS,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 y=e.info.currentAudioStream$.getValue()?.codec;y&&(a.audioCodec=y),e.info.currentVideoStream$.getValue()?.hdr&&(a.hdr=!0);let b=e.info.currentAudioStream$.getValue()?.language;return b&&(a.audioLanguage=b),a})(L,0,tF)),getVideoElement:()=>x,seekTime:(e,t,i)=>tP(e,t,i),clearDelayedBufferingCheckTimeout:()=>{eo&&clearTimeout(eo),eo=null},seekToPercent:tL,getPreviewThumbsData:()=>(M({message:"getting preview thumbs data"}),P.log("get preview thumbs data",{...u}),u),downloadVideo:()=>{let e,t=(e=oE(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}),M({message:e})}},addLanguage:a4,setLanguage:G,setLooped:t_,checkFullscreenSupport:()=>{var e;return e=document,!!of.device.isIOS||e.fullscreenEnabled||!!e.webkitFullscreenEnabled||!!e.mozFullscreenEnabled||!!e.msFullscreenEnabled}},external:{firstStart:e=>tD(e,!0),play:()=>tj(!0),pause:()=>tN(!0),stop:()=>{(oA(tF),"ads"===r8(tF.playerPhase))?M({message:"player cannot be stopped during ads via external method"}):(M({message:"player will be stopped, internalCall: false"}),p?.())},seekTime:e=>{M({message:`seek external, time: ${e}`}),P.log("seek external",{time:e}),eu.next(aa.UNKNOWN),L.seekTime(L.info.isLive$.getValue()?-e:e)},setPlaybackRate:e=>{M({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(M({message:`set auto quality limitation. Max: ${t}. Min: ${i}`}),P.log("set auto quality limits",{max:t,min:i}),L.setAutoQualityLimits(e))},setMuted:e=>tm(e),toggleSubtitle:()=>tC(!0),changeSubtitle:(e,t)=>{P.log("change subtitle",{enabled:e}),e?t$(!0,t):tA()},setVolume:e=>tv(e),setLiveLowLatency:e=>{eu.next(aa.LIVE),M({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=>ty(e),setTrafficSavingEnabled:e=>tb(e),setHighQualityEnabled:e=>tw(e),changeAudioStream:e=>{P.log("change audio stream",{id:e});let t=L.info.availableAudioStreams$.getValue().find(t=>t.id===e);t&&eJ(t)}}},callbacks:s,setUiCallbacks:e=>{N={...e}},getAdmanWrapper:()=>V,getLogger:()=>R,getPlayer:()=>L,destroy:()=>{P.log("destroy store"),D.unsubscribe(),L.destroy(),V.destroy(),g?.destroy(),O?.destroy(),H.unsubscribe(),j.destroy()}};return tF})({player:i,interfaceLanguage:b,isCyrillicRelatedInterface:w,videoId:M,isLiveCatchUpMode:S,isAudioDisabled:x,statAuthToken:a,callbacks:E,webApi:Q,previewThumbsData:F,canDownload:A,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:T,stopPlayer:()=>this.stop(),statistics:this.statistics,internalsExposure:this.internalsExposure,playerId:this.playerId});let G=()=>{if(!this.store||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(e=>E?.onCurrentFormatChanged?.(e))),this.subscription.add(this.store.state.throughputEstimation$.subscribe(e=>E?.onThroughputEstimationChanged?.(e))),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(e=>E?.onTrafficSavingEnabledChanged?.(e))),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(e=>E?.onHighQualityEnabledChanged?.(e))),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(e=>E?.onAutoQualityEnabledChanged?.(!!e))),this.subscription.add(new o4(e=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(t=>e.next(t)))}).pipe(o9(1)).subscribe(e=>E?.onCurrentPlaybackRateChanged?.(e))),this.subscription.add(this.store.state.volume$.subscribe(e=>E?.onVolumeChange?.(e))),this.subscription.add(this.store.state.muted$.subscribe(e=>{if(e)E?.onMute?.();else{let e=(this.store?.state.volume$&&r8(this.store.state.volume$))??0;E?.onUnmute?.(e)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(e=>E?.onVideoBitrateChanged?.(e))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(e=>E?.onVSIDChanged?.(e))),nE(lu,{sources:V,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:O,thumbUrl:I,subtitles:z,subtitlesForcedLanguage:B,live:q,preload:s,autoplay:l,muted:d,volume:u,fromTime:c,canRewindLive:f,supportLink:p,showAds:m,adsSlotId:g,adsParams:U,adsAutoplayParam:y,duration:j,failoverHosts:$,fullScreenTarget:C,saveRate:T,shadowRootContainer:this.shadowRootContainer,outerContainerRef:this.rootContainer,volumeMultiplier:P,showEndScreen:L,adsExternalApi:W,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let e={target:this.playerContainer,props:rv(lu)};this.svelteRootComponent=rR(sL,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?o8.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):o8.destroy("ui")};this.coreConfig.asyncResolveClientChecker?op.isInited$.subscribe(e=>{e&&(console.log("UI TV SDK async start"),G())}):G()}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=ln(ll,o1(e,e=>e instanceof ls?e:void 0)),this.playerId=o6(e.playerId),this.uiConfig=o_(t.ui??{},ad),this.coreConfig=t.core??{},this.statisticsConfig=t.statistics??{},this.metaConfig=t.meta,this.sentry={config:this.uiConfig.sentry??{}},this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new o3("ui",this.playerId)),o8.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+this.videoConfig?.showAds],numbers:[oX()]}),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 la(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 lc=()=>{window.customElements.define("vk-video-player-tv",ld)};export{lc as registerPlayerWebComponent,an as loadVKLangPack,oh as VideoQuality,ov as VideoFormat,ai as VKNumericLanguage,aS as VERSION,at as InterfaceLanguage};