@viewlift/player-backup 2.0.384-backup → 2.0.385-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/bundle.css +48 -48
- package/cjs/index.js +1 -1
- package/esm/bundle.css +48 -48
- package/esm/index.js +1 -1
- package/package.json +1 -1
package/cjs/bundle.css
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
4
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
7
5
|
height: 0.7em !important;
|
|
8
6
|
position: absolute !important;
|
|
@@ -211,6 +209,8 @@
|
|
|
211
209
|
text-decoration: underline;
|
|
212
210
|
}
|
|
213
211
|
|
|
212
|
+
|
|
213
|
+
|
|
214
214
|
.video-js.skin_news .vjs-button>.vjs-icon-placeholder:before {
|
|
215
215
|
font-size: 2.2em;
|
|
216
216
|
line-height: 2.6;
|
|
@@ -2229,53 +2229,7 @@
|
|
|
2229
2229
|
|
|
2230
2230
|
|
|
2231
2231
|
|
|
2232
|
-
.vjs-custom-big-mute.vjs-control{
|
|
2233
|
-
position: absolute;
|
|
2234
|
-
align-items: center;
|
|
2235
|
-
background: #fcb700;
|
|
2236
|
-
border: 0;
|
|
2237
|
-
display: flex;
|
|
2238
|
-
align-items: center;
|
|
2239
|
-
height: 44px;
|
|
2240
|
-
justify-content: center;
|
|
2241
|
-
padding: 0;
|
|
2242
|
-
width: 44px;
|
|
2243
|
-
z-index: 1;
|
|
2244
|
-
outline: none;
|
|
2245
|
-
text-shadow:none !important;
|
|
2246
|
-
cursor: pointer;
|
|
2247
|
-
}
|
|
2248
|
-
.video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control {
|
|
2249
|
-
display: flex;
|
|
2250
|
-
top: 50px;
|
|
2251
|
-
height: 50px;
|
|
2252
|
-
width: 50px;
|
|
2253
|
-
}
|
|
2254
|
-
.video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control >svg {
|
|
2255
|
-
height: 28px;
|
|
2256
|
-
width: 28px;
|
|
2257
|
-
}
|
|
2258
|
-
.vjs-custom-big-mute.vjs-control:hover{
|
|
2259
|
-
filter: none;
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
.vjs-custom-big-mute.vjs-control.tl{
|
|
2264
|
-
top: 0;
|
|
2265
|
-
left: 0;
|
|
2266
|
-
margin: 15px 0 0 15px;
|
|
2267
|
-
}
|
|
2268
|
-
|
|
2269
|
-
.vjs-custom-big-mute.vjs-control.hide{
|
|
2270
|
-
display: none !important;
|
|
2271
|
-
|
|
2272
|
-
}
|
|
2273
2232
|
|
|
2274
|
-
.vjs-custom-big-mute.vjs-control > svg {
|
|
2275
|
-
color: #071d39;
|
|
2276
|
-
height: 22px;
|
|
2277
|
-
width: 22px;
|
|
2278
|
-
}
|
|
2279
2233
|
|
|
2280
2234
|
|
|
2281
2235
|
|
|
@@ -2359,7 +2313,53 @@
|
|
|
2359
2313
|
align-content: baseline;
|
|
2360
2314
|
}
|
|
2361
2315
|
|
|
2316
|
+
.vjs-custom-big-mute.vjs-control{
|
|
2317
|
+
position: absolute;
|
|
2318
|
+
align-items: center;
|
|
2319
|
+
background: #fcb700;
|
|
2320
|
+
border: 0;
|
|
2321
|
+
display: flex;
|
|
2322
|
+
align-items: center;
|
|
2323
|
+
height: 44px;
|
|
2324
|
+
justify-content: center;
|
|
2325
|
+
padding: 0;
|
|
2326
|
+
width: 44px;
|
|
2327
|
+
z-index: 1;
|
|
2328
|
+
outline: none;
|
|
2329
|
+
text-shadow:none !important;
|
|
2330
|
+
cursor: pointer;
|
|
2331
|
+
}
|
|
2332
|
+
.video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control {
|
|
2333
|
+
display: flex;
|
|
2334
|
+
top: 50px;
|
|
2335
|
+
height: 50px;
|
|
2336
|
+
width: 50px;
|
|
2337
|
+
}
|
|
2338
|
+
.video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control >svg {
|
|
2339
|
+
height: 28px;
|
|
2340
|
+
width: 28px;
|
|
2341
|
+
}
|
|
2342
|
+
.vjs-custom-big-mute.vjs-control:hover{
|
|
2343
|
+
filter: none;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
.vjs-custom-big-mute.vjs-control.tl{
|
|
2348
|
+
top: 0;
|
|
2349
|
+
left: 0;
|
|
2350
|
+
margin: 15px 0 0 15px;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
.vjs-custom-big-mute.vjs-control.hide{
|
|
2354
|
+
display: none !important;
|
|
2355
|
+
|
|
2356
|
+
}
|
|
2362
2357
|
|
|
2358
|
+
.vjs-custom-big-mute.vjs-control > svg {
|
|
2359
|
+
color: #071d39;
|
|
2360
|
+
height: 22px;
|
|
2361
|
+
width: 22px;
|
|
2362
|
+
}
|
|
2363
2363
|
|
|
2364
2364
|
/* Watch in Vertical View Button */
|
|
2365
2365
|
.video-js .vjs-control.vjs-vertical-view-button {
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),r=require("video.js"),i=require("@babel/runtime/helpers/classCallCheck"),o=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/get"),a=require("@babel/runtime/helpers/inherits"),u=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),c=require("./generic-46d02ba0.js"),d=require("./index-79d88164.js"),v=require("./captions-3171bf62.js"),f=require("./renditions-05a85e06.js"),p=require("./resolution-ac7705e6.js"),m=require("./skin-55634dc6.js"),g=require("./browser-3670a923.js"),h=require("./localisation-da6f64c6.js"),y=require("@babel/runtime/helpers/typeof"),b=require("./manager-77ddd30c.js"),k=require("./playerControlEvents-db923a5c.js");require("@viewlift/comscore/index.js");var w=require("@babel/runtime/helpers/toConsumableArray"),S=require("@babel/runtime/helpers/toArray"),C=require("@viewlift/sse"),E=require("./relatedVideosManager-44ec6d59.js");function T(e,n,t,r){var i=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof i?function(e){return i.apply(t,e)}:i}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/objectWithoutProperties"),require("@babel/runtime/helpers/assertThisInitialized");var O=r.getComponent("TextTrackSettings"),P=r.dom,x=[{value:"0.50",label:"50%"},{value:"0.75",label:"75%"},{value:"1.00",label:"100%"},{value:"1.25",label:"125%"},{value:"1.50",label:"150%"},{value:"1.75",label:"175%"},{value:"2.00",label:"200%"},{value:"3.00",label:"300%"},{value:"4.00",label:"400%"}],j=x.map((function(e){return e.value})),I="1.00",_=".vjs-font-percent > select",A="vlp-caption-font-size-style",L="#FFF",R="1",B="#000",M="1",N="#000",V="0",U="proportionalSansSerif",q="#222",H="#ccc",F={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},z=function(e,n){var t=parseFloat(e);return isNaN(t)?n:t},G=function(e,n){var t;if(e&&4===e.length)t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(!e||7!==e.length)return e;t=e.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+n+")"},W=null;function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(K=function(){return!!e})()}O?(W=function(){a(r,O);var e,n,t=(e=r,n=D(),function(){var t,r=s(e);if(n){var i=s(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return u(this,t)});function r(e,n){var o;return i(this,r),(o=t.call(this,e,n)).customReady_=!0,o.customUiReady_=!0,o.triggerEl_=null,o.applyCustomFontSizeUI_(),o}return o(r,[{key:"conditionalFocus_",value:function(){this.triggerEl_=this.getCaptionsTrigger_(),this.previouslyActiveEl_=null,this.focus()}},{key:"conditionalBlur_",value:function(){this.previouslyActiveEl_=null;var e=this.player_;e&&"function"==typeof e.userActive&&e.userActive(!0);var n=this.triggerEl_||this.getCaptionsTrigger_();this.triggerEl_=null;var t=function(){n&&"function"==typeof n.focus&&n.focus()};"undefined"!=typeof window&&"function"==typeof window.setTimeout?window.setTimeout(t,0):t()}},{key:"getCaptionsTrigger_",value:function(){var e=this.player_&&this.player_.controlBar;return e&&(e.subsCapsButton||e.captionsButton||e.subtitlesButton)||null}},{key:"applyCustomFontSizeUI_",value:function(){var e=this;this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.on(this.player_,["playerresize","fullscreenchange"],(function(){return e.applyDashCaptionStyles_()})),this.applyDashCaptionStyles_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(_);if(e){for(var n=e.value;e.firstChild;)e.removeChild(e.firstChild);x.forEach((function(n){e.appendChild(P.createEl("option",{value:n.value,textContent:n.label}))})),e.value=-1!==j.indexOf(n)?n:I}}},{key:"bindCaptionStyleChange_",value:function(){for(var e=this,n=this.$$("select"),t=0;t<n.length;t++)this.on(n[t],"change",(function(){return e.applyDashCaptionStyles_()}))}},{key:"selectedMultiplier_",value:function(){var e=this.$(_),n=e&&-1!==j.indexOf(e.value)?e.value:I;return parseFloat(n)}},{key:"styleEl_",value:function(){if("undefined"==typeof document)return null;var e=document.getElementById(A);return e||((e=document.createElement("style")).id=A,document.head.appendChild(e)),e}},{key:"applyDashCaptionStyles_",value:function(){if(this.customReady_){var e;try{e="function"==typeof this.getValues&&this.getValues()||{}}catch(e){return}var n=this.styleEl_(),t=this.player_&&this.player_.el();if(n&&t){var r=[];(e.color&&e.color!==L||e.textOpacity&&e.textOpacity!==R)&&r.push("color: "+G(e.color||L,z(e.textOpacity,1))+" !important");var i=function(e){switch(e){case"dropshadow":return"2px 2px 3px ".concat(q,", 2px 2px 4px ").concat(q,", 2px 2px 5px ").concat(q);case"raised":return"1px 1px ".concat(q,", 2px 2px ").concat(q,", 3px 3px ").concat(q);case"depressed":return"1px 1px ".concat(H,", 0 1px ").concat(H,", -1px -1px ").concat(q,", 0 -1px ").concat(q);case"uniform":return"0 0 4px ".concat(q,", 0 0 4px ").concat(q,", 0 0 4px ").concat(q,", 0 0 4px ").concat(q);default:return""}}(e.edgeStyle);i&&r.push("text-shadow: "+i+" !important"),"small-caps"===e.fontFamily?(r.push("font-family: "+F[U]+" !important"),r.push("font-variant: small-caps !important")):e.fontFamily&&e.fontFamily!==U&&F[e.fontFamily]?(r.push("font-family: "+F[e.fontFamily]+" !important"),r.push("font-variant: normal !important")):r.push("font-variant: normal !important");var o=this.selectedMultiplier_(),l="function"==typeof this.player_.currentHeight&&this.player_.currentHeight()||t.offsetHeight||0;if(1!==o&&l){var a=Math.round(.05*l*o*100)/100;r.push("font-size: "+a+"px !important"),r.push("line-height: normal !important")}var u=e.backgroundColor&&e.backgroundColor!==B||e.backgroundOpacity&&e.backgroundOpacity!==M?"background-color: "+G(e.backgroundColor||B,z(e.backgroundOpacity,1))+" !important":"",s=e.windowColor&&e.windowColor!==N||e.windowOpacity&&e.windowOpacity!==V?"background-color: "+G(e.windowColor||N,z(e.windowOpacity,0))+" !important":"",c=[];r.length&&c.push(".vjs-text-track-display-ttml div,.vjs-text-track-display-ttml span,.vjs-text-track-display-ttml p{"+r.join(";")+"}"),s&&c.push(".vjs-text-track-display-ttml p{"+s+"}"),u&&c.push(".vjs-text-track-display-ttml span{"+u+"}"),n.textContent=c.join("")}}}},{key:"setDefaults",value:function(){if(T(r,"setDefaults",this,3)([]),this.applyDashCaptionStyles_(),"function"==typeof Event)for(var e=this.$$("select"),n=0;n<e.length;n++)e[n].dispatchEvent(new Event("change",{bubbles:!0}))}},{key:"handleLanguagechange",value:function(){T(r,"handleLanguagechange",this,3)([]),this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.applyDashCaptionStyles_()}},{key:"close",value:function(){var e=this.opened_;T(r,"close",this,3)([]),e&&this.focusCaptionsButton_()}},{key:"focusCaptionsButton_",value:function(){var e=this.player_&&this.player_.controlBar;if(e){var n=e.getChild("SubsCapsButton")||e.getChild("CaptionsButton")||e.getChild("SubtitlesButton");n&&"function"==typeof n.focus&&n.focus()}}}]),r}(),r.registerComponent("TextTrackSettings",W)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var Y=r.getComponent("SubsCapsButton"),$=null;Y?($=function(){a(r,Y);var e,n,t=(e=r,n=K(),function(){var t,r=s(e);if(n){var i=s(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return u(this,t)});function r(){return i(this,r),t.apply(this,arguments)}return o(r,[{key:"pressButton",value:function(){!function(e,n,t,r){var i=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof i?function(e){return i.apply(t,e)}:i}(r,"pressButton",this,3)([]),this.buttonPressed_&&this.focusFirstVisibleItem_()}},{key:"focusFirstVisibleItem_",value:function(){if(this.menu&&this.menu.el_&&this.menu.el_.contains(document.activeElement)){var e=this.menu.children().slice();e.length&&e[0].hasClass("vjs-menu-title")&&e.shift();for(var n=0;n<e.length&&e[n].hasClass("vjs-texttrack-settings");)n++;n>0&&n<e.length&&this.menu.focus(n)}}}]),r}(),r.registerComponent("SubsCapsButton",$)):console.warn("[vlp] CustomSubsCapsButton: video.js SubsCapsButton is not registered; skipping override.");var J=function(e){return new Promise((function(n,t){if(X(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}}))},X=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},Q=function(e,n,t){var r=m.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var i=parseFloat(n)/100;r.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Z=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ee=function(){var e=n(t.mark((function e(n){var i,o,l,a,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=m.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,Promise.resolve().then((function(){return require("./index-774736bd.js")})).then((function(e){return e.index}));case 4:return a=e.sent,e.prev=5,e.next=8,J("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(r),e.finish(13);case 16:(u=r.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==g.detectBrowser()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(n){return e.apply(this,arguments)}}(),ne=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,i,o,l,a,u=this.el(),s=r.dom.getPointerPosition(u,n).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}}))};var te=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),J("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("@viewlift/comscore/index.js").then((function(e){c.comscoreInstanceManager.set(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then((function(e){r.getPlugin("eme")||r.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(r),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./index-de9db53d.js")}));case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./videojs-dash5.es-0f92604f.js")}));case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),ue=Object.freeze({__proto__:null,importChromecast:function(){Promise.resolve().then((function(){return require("./index-774736bd.js")})).then((function(e){return e.index})).then((function(e){J("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(r)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){Promise.resolve().then((function(){return require("./index-f3365b73.js")})).then((function(e){return e.index})).then((function(e){e.default(r)}))},loadAdsLibrary:te,loadEMELibrary:ie,loadMuxPlugin:oe,loadDvrSeekbar:le,loadContribDash:ae,loadComscorePlugin:re});function se(e){return ce.apply(this,arguments)}function ce(){return(ce=n(t.mark((function e(n){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(null==n?void 0:n.airplay)||!1,e.next=3,te();case 3:r&&"Safari"==g.detectBrowser()&&Promise.resolve().then((function(){return ue})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e){return ve.apply(this,arguments)}function ve(){return(ve=n(t.mark((function e(n){var r,i,o,l,a,u,s,c,d,v;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=m.getPlayer(n.playerId),e.next=3,re();case 3:v.comscore({publisherId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.publishedId,endpoint:null==n||null===(i=n.comscore)||void 0===i?void 0:i.endpoint,applicationName:(null==n||null===(o=n.comscore)||void 0===o?void 0:o.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e,n){return pe.apply(this,arguments)}function pe(){return(pe=n(t.mark((function e(n,r){var i,o,l,a,u,s,c,d,v,f,p,m,h,y;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==r?void 0:r.contentType)||"video",f=null==r||null===(i=r[v])||void 0===i?void 0:i.drmEnabled,null==r||null===(o=r[v])||void 0===o||null===(l=o.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==r||null===(a=r[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==g.detectBrowser()?ie():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?ae():ie():"Safari"!=g.detectBrowser()&&p?ae():null,m?de(n):null,h?oe():null,ee(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}}),e,null,[[7,12]])})))).apply(this,arguments)}function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ge(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var he=new Set,ye=null,be=function(e,n,t,r){var i,o,l,a,u,s,d,v,f={},p=(null==e?void 0:e.contentType)||"video";f["c3.cm.id"]=(null===(i=e[p])||void 0===i?void 0:i.id)||"Null",f["c3.cm.contentType"]=De(e),f[null==t||null===(o=t.Constants)||void 0===o?void 0:o.IS_LIVE]=!(null==e||!e.linearchannel),f[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc();var m=(null===(a=b.playerConfigManager.getConfig())||void 0===a?void 0:a.userId)||c.getUserId();f[null==t||null===(u=t.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===m?"NULL":m,f["c3.cm.categoryType"]=Ce(e),f["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),f.DRMEnabled=(null===(s=e[p])||void 0===s?void 0:s.drmEnabled)||"None",f.DAIStream=null!==(d=e[p])&&void 0!==d&&null!==(v=d.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",f[t.Constants.DEFAULT_RESOURCE]="AKAMAI",f["c3.cm.brand"]="NULL",f.CDVREnabled=Ee(e),f["c3.cm.genreList"]=we(e),f["c3.cm.genre"]=ke(e),f["c3.cm.channel"]=Se(e,r);var g=Pe(c.getCurrentSeries(),e);return f=ge(ge({},f),g)},ke=function(e){var n,t,r,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},we=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map((function(e){return null==e?void 0:e.title})).join(", ")||"Null"},Se=function(e,n){var t,r,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(r=((null==e||null===(t=e[i])||void 0===t?void 0:t.channels)||[]).find((function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)})))||void 0===r?void 0:r.title)||"NULL"},Ce=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},Ee=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},Te=function(e,n){var t,r,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var o=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[o])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},De=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Oe,Pe=function(e,n){var t,r,i,o,l,a={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return a;var u=c.getSeasonNumber(),s=c.getEpisodeNumber();return a["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(r=t.series)||void 0===r?void 0:r.title)||"Null",a["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",a["c3.cm.showTitle"]=(null==e||null===(i=e[u-1])||void 0===i||null===(o=i.episodes)||void 0===o||null===(l=o[s-1])||void 0===l?void 0:l.title)||"Null",a["c3.cm.episodeNumber"]=(null==s?void 0:s.toString())||"Null",a},xe=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},je=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Ie=function(){var e=n(t.mark((function e(n,r){var i,o,l,a,u,s,d,v,f,p,g,h;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.convivaConfig)||{},o=i.trackConvivaPlayerEvent,l=i.paymentHandler,a=i.tveProvider,u=i.enable,s=i.appName,v=(d=r||{}).token,f=d.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(p=m.getPlayer(n),"function"==typeof(g=o)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,g("getConvivaObject");case 10:if(h=e.sent){e.next=13;break}return e.abrupt("return");case 13:p.ready((function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=xe(t.keySystem);g("contentInfo",{DRMEnabled:r})}else g("contentInfo",{DRMEnabled:"None"})})),n||g("contentInfo",{DRMEnabled:"None"})})),p.on("loadstart",(function(){var e,n;ye&&ye!==p.currentSrc()&&g("playbackEnded"),g("setPlayer",p),he.clear(),ye=p.currentSrc();var t=je(p.currentType()),i=c.getCurrentVideo(),o=be(i,p,h,f);o[null==h||null===(e=h.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",o[null==h||null===(n=h.Constants)||void 0===n?void 0:n.ASSET_NAME]=Te(i,r),o.authToken=v||"NULL",o.streamType=t,o.D2CType=l||"NONE",o.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",o["c3.cm.affiliate"]=a||"NULL",_e.setData(o),g("contentInfo",o)})),p.on("loadedmetadata",(function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})})),p.on("play",(function(){he.has(p.currentSrc())||(he.add(p.currentSrc()),g("playbackStarted",null))})),p.on("ended",(function(){he.has(p.currentSrc())&&he.delete(p.currentSrc()),g("playbackEnded")})),p.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})})),p.on("dispose",(function(){null==he||he.clear(),g("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),_e=(Oe={},{setData:function(e){Oe=ge(ge({},Oe),e)},getData:function(){return Oe}}),Ae=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-ace14d43.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-1bbb2916.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-a64932ac.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-96e07080.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-5747db33.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t?Promise.resolve().then((function(){return require("./skin-87233809.js")})).then((function(t){t.initialiseSkin(e,n)})):"news"==t?Promise.resolve().then((function(){return require("./skin-12ea8f57.js")})).then((function(t){t.initialiseSkin(e,n)})):"news_live"==t?Promise.resolve().then((function(){return require("./skin-b0f1d65d.js")})).then((function(t){t.initialiseSkin(e,n)})):"mini"==t?Promise.resolve().then((function(){return require("./skin-59aa968d.js")})).then((function(t){t.initialiseSkin(e,n)})):"CN_NEWS"==t&&Promise.resolve().then((function(){return require("./skin-0f56c90a.js")})).then((function(t){t.initialiseSkin(e,n)}))};function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}var Re,Be=["offsetSeconds","offsetLabel"],Me=function(n){if(!n||"object"!==y(n))return n;if(!Be.some((function(e){return e in n})))return n;var t=function(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Le(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}({},n);return Be.forEach((function(e){return delete t[e]})),t},Ne=function(e){try{if(!e)return null;e.refreshAnchor();var n="function"==typeof e.anchorInfo?e.anchorInfo():{};if("vod"===n.source)return{live:!1,source:"vod"};var t=("function"==typeof e.displayBounds?e.displayBounds():e.windowBounds())||{},r=t.start,i=t.end;if(!(Number.isFinite(r)&&i>r))return null;var o=null!=n.anchorPdtSec&&null!=n.anchorPlayerT;return{live:!0,source:n.source,windowEnd:i,anchorT:o?n.anchorPlayerT:null,anchorUtc:o?n.anchorPdtSec:null,nowSec:Date.now()/1e3}}catch(e){return null}},Ve=function(e,n){try{return Ue(e,n)}catch(e){return null}},Ue=function(e,n){if(!e)return null;var t=c.chapterUtcBounds(n).start;if(!Number.isFinite(t))return null;if(!e.live)return{seconds:t,live:!1};var r=null!=e.anchorUtc?e.anchorT+(t-e.anchorUtc):e.windowEnd-(e.nowSec-t);return Number.isFinite(r)?{seconds:Math.max(0,e.windowEnd-r),live:!0}:null},qe=function(e){if(!e||!Number.isFinite(e.seconds))return"";var n=r.formatTime(e.seconds,e.seconds);return e.live?"-".concat(n):n},He=(Re=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n.map(Me):[];return Re.set(e,t),t},get:function(e){return Re.get(e)||[]},remove:function(e){Re.delete(e)}}),Fe="chapter-change",ze="chapter-click",Ge="chapters-updated";function We(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=m.getPlayer(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function Ke(e){var n=m.getPlayer(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(Fe,e)},onChapterClick:function(e){return t(ze,e)},onChaptersUpdated:function(e){return t(Ge,e)}}}var Ye="vjs-chapter-marker",$e="vjs-chapter-preview",Je=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function Xe(e,n){var t=n.store,r=n.mapper,i=n.chaptersConfig,o=void 0===i?{}:i,l=n.seek,a=m.getPlayer(e);if(!a)return{render:function(){},reposition:function(){},destroy:function(){}};var u=new Map,s=null,c=-1,d=null,v=function(){return!0===(null==o?void 0:o.enable)},f=function(e){try{return r.chapterStartPercent(e)}catch(e){return null}},p=function(n,t,i){var o=m.getPlayer(e),l=Je(o);if(l){var a=function(e){if(s&&s.isConnected)return s;(s=document.createElement("div")).className=$e;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",s.appendChild(n),s.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",s.appendChild(r),s._time=n,s._label=t,s._pointer=r,e.appendChild(s),s}(l);a._time.textContent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ne(r);return qe(Ve(n,e))}(n,i),a._label.textContent=(null==n?void 0:n.label)||"",a.classList.add("vjs-chapter-preview--visible");var u="function"==typeof(null==o?void 0:o.el)?o.el():null;u&&u.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var i="function"==typeof(null==t?void 0:t.el)?t.el():null;if(i){var o=i.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=o.left+8+u,d=o.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(a,l,o,t)}},g=function(){d=null,s&&s.classList.remove("vjs-chapter-preview--visible");var n=m.getPlayer(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},h=function(e){if(d&&s&&s.classList.contains("vjs-chapter-preview--visible")){var n=f(d);null!=n?p(d,n,e):g()}},y=function(n){var r=document.createElement("div");r.className=Ye,r.dataset.segmentId=String(n.segmentId);var i=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=m.parseSvgString(n);r&&t.appendChild(r)}else{var i=document.createElement("img");i.src=n,i.alt="",t.appendChild(i)}return t}(n);i&&r.appendChild(i);var o=function(r){if("touchstart"===r.type)r.preventDefault();else if("mousedown"===r.type&&0!==r.button)return;r.stopPropagation(),"function"==typeof l&&l(n.segmentId);var i=t.get(e).indexOf(n);We(e,ze,{chapter:n,index:i,position:i>=0?i+1:void 0})};return r.addEventListener("mousedown",o),r.addEventListener("touchstart",o),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),null!=n&&n.label&&r.setAttribute("aria-label",String(n.label)),r.addEventListener("keydown",(function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||e.repeat||(e.preventDefault(),o(e))})),r.addEventListener("mouseenter",(function(){var e=f(n);null!=e&&(d=n,p(n,e))})),r.addEventListener("mouseleave",g),r},b=function(n){v()&&0!==u.size&&(n||r.refreshAnchor(),t.get(e).forEach((function(e){var n=u.get(String(e.segmentId));if(n){var t=f(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}})))},k=0,w=function(n){u.forEach((function(e){return e.classList.remove("".concat(Ye,"--active"))}));var r=t.get(e),i=n>=0?r[n]:null;if(i){var o=u.get(String(i.segmentId));o&&o.classList.add("".concat(Ye,"--active"))}},S=function(){var n=m.getPlayer(e);if(n){var i=t.get(e),o=r.playerTimeToChapterIndex(n.currentTime()||0,i);-1===o&&Date.now()<k||o!==c&&(c=o,w(o),We(e,Fe,{chapter:o>=0?i[o]:null}))}},C=m.throttle((function(){var e=Ne(r);b(!0),h(e),S()}),1e3),E=function(){var e=Ne(r);b(!0),h(e),S()},T=function(){Ne(r),b(!0)};a.on("timeupdate",C),a.on("seeked",E);var D=!1;try{a.liveTracker&&"function"==typeof a.liveTracker.on&&(a.liveTracker.on("liveedgechange",T),D=!0)}catch(e){}var O=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(O=setInterval((function(){var e=Ne(r);b(!0),h(e)}),500));return{render:function(){var n=m.getPlayer(e),i=Je(n);i&&(g(),i.querySelectorAll(".".concat(Ye)).forEach((function(e){return e.remove()})),u.clear(),v()&&(r.refreshAnchor(),t.get(e).forEach((function(e){var n=y(e);i.appendChild(n),u.set(String(e.segmentId),n)})),b(!0),w(c),S()))},reposition:b,destroy:function(){try{a.off("timeupdate",C),a.off("seeked",E),D&&a.liveTracker.off("liveedgechange",T)}catch(e){}O&&(clearInterval(O),O=null);var n=Je(m.getPlayer(e));n&&n.querySelectorAll(".".concat(Ye,", .").concat($e)).forEach((function(e){return e.remove()})),u.clear(),s=null,d=null},setActiveBySegment:function(n){var r=t.get(e),i=r.findIndex((function(e){return String(e.segmentId)===String(n)}));i<0||(k=Date.now()+1500,i!==c&&(c=i,w(i),We(e,Fe,{chapter:r[i]})))}}}function Qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ze(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var en=new Map,nn=function(e){var n=e.live,t=e.dvr;return function(e){return Array.isArray(e)&&e.some((function(e){return e&&e.eventStartUtc}))}(e.chapters)||n&&t?"livedvr":"vod"},tn=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},rn=function(e){var n=en.get(e);if(n)return n;n={mapper:c.createTimelineMapper(e,{timeMode:"vod"}),markers:null,chaptersConfig:{enable:!0},timeMode:"vod",live:!1,dvr:!1,disposed:!1},en.set(e,n);var t=m.getPlayer(e);return t&&(t.on("dispose",(function(){return cn(e)})),t.one("loadeddata",(function(){n.disposed||on(e)}))),n},on=function(e){var n=en.get(e),t=function(e){var n=en.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=m.getPlayer(e);return t&&tn(t)?(n.markers=Xe(e,{store:He,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return sn(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function ln(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=rn(e);He.set(e,n);var r=nn({live:t.live,dvr:t.dvr,chapters:n});return r!==t.timeMode&&(t.timeMode=r,t.mapper=c.createTimelineMapper(e,{timeMode:r}),t.markers&&(t.markers.destroy(),t.markers=null)),on(e),We(e,Ge,{chapters:He.get(e)}),!0}function an(e){var n=He.get(e),t=en.get(e);if(!t||!n.length)return n;var r=Ne(t.mapper);try{return n.map((function(e){var n=Ve(r,e);return Ze(Ze({},e),{},{offsetSeconds:n?n.seconds:null,offsetLabel:qe(n)})}))}catch(e){return n}}function un(e){He.set(e,[]);var n=en.get(e);return null!=n&&n.markers&&n.markers.render(),We(e,Ge,{chapters:[]}),!0}function sn(e,n){var t,r,i=m.getPlayer(e),o=rn(e);if(!i)return!1;var l=He.get(e).find((function(e){return e.segmentId===n}));if(!l)return!1;o.mapper.refreshAnchor();var a=o.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=o.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),i.currentTime(a),null===(t=o.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function cn(e){var n=en.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),en.delete(e),He.remove(e)}function dn(e){var n,t,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=b.playerConfigManager.getConfig();(null!=o&&null!==(n=o.chaptersConfig)&&void 0!==n&&n.enable||null!=o&&null!==(t=o.chapters)&&void 0!==t&&t.length)&&(function(e,n){var t,r=null===(t=m.getPlayer(e))||void 0===t?void 0:t.el();if(r&&n){var i=function(e,n){null!=n&&""!==n&&r.style.setProperty(e,n)};i("--vl-chapter-color",n.markerColor),i("--vl-chapter-active",n.markerActiveColor),i("--vl-chapter-hover",n.markerHoverColor),i("--vl-chapter-size",null!=n.markerSize?"".concat(n.markerSize,"px"):null),i("--vl-chapter-opacity",null!=n.markerOpacity?String(n.markerOpacity):null),i("--vl-chapter-tooltip",n.tooltipColor)}}(e,null==o||null===(r=o.chaptersConfig)||void 0===r?void 0:r.style),function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,i=n.live,o=void 0!==i&&i,l=n.dvr,a=void 0!==l&&l;n.res;var u=n.chaptersConfig,s=void 0===u?{}:u,d=m.getPlayer(e);if(!d)return!1;Array.isArray(r)&&He.set(e,r);var v=nn({live:o,dvr:a,chapters:r}),f=en.get(e);null!=f&&f.markers&&f.markers.destroy();var p={mapper:c.createTimelineMapper(e,{timeMode:v}),markers:null,chaptersConfig:s||{},timeMode:v,live:o,dvr:a,disposed:!1};en.set(e,p);var g=function(){p.disposed||on(e)};d.one("loadeddata",g),tn(d)&&g(),d.on("dispose",(function(){return cn(e)}))}(e,{chapters:(null==o?void 0:o.chapters)||[],live:(null==i?void 0:i.liveVideo)||!1,dvr:(null==i?void 0:i.isDvrEnabled)||!1,res:null==i?void 0:i.res,chaptersConfig:(null==o?void 0:o.chaptersConfig)||{}}))}var vn=!1,fn=function(e,n){var t,r,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!vn){var o=pn(e,"videoAssets","secondaryVideoAssets"),l=c.getSource(o,n);return l&&c.loadVideo(n,l),vn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function pn(e,n,t){if(Array.isArray(e))return e.map((function(e){return pn(e,n,t)}));if(null!==e&&"object"===y(e)){var r={};return Object.keys(e).forEach((function(i){i===n&&void 0!==e[t]?r[i]=e[t]:i===t&&void 0!==e[n]?r[i]=e[n]:r[i]=pn(e[i],n,t)})),r}return e}function mn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return gn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?gn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function gn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function yn(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):hn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var bn,kn=function(e,r,i,o){var l,a,u,s,d,f=o.res,p=o.sres,h=m.getPlayer(e),b=(null==f?void 0:f.contentType)||"video",w=(null==f||null===(l=f[b])||void 0===l?void 0:l.drmEnabled)||!1,S=!(null==f||null===(a=f[b])||void 0===a||null===(u=a.streamingInfo)||void 0===u||!u.isLiveStream)||"linearchannel"===b,C=(null==f||null===(s=f[b])||void 0===s||null===(d=s.liveDetails)||void 0===d?void 0:d.isDvrEnabled)||!1;if(c.setCurrentVideo(f),c.videoReplayTracker.set(f),h){var E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500;return new Promise((function(n){var t=h.currentTime();setTimeout((function(){if(h.isDisposed())return n(!1);n(h.currentTime()-t>.5)}),e)}))};k.initPlayerControlEvents(e,{liveVideo:S,isDvrEnabled:C}),h.on("loadstart",(function(){S?i.resolve({status:!0,msg:"Video Loaded",response:f}):i.resolve(yn({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))})),h.on("loadeddata",(function(){var n,t,i,o,l=v.getCaptions(e);if(null==l||l.map((function(n){return v.disableCaptions(e,n.id)})),C&&"Safari"===g.detectBrowser())try{var a;null==h||null===(a=h.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==h||!h.muted())&&Q(e,sessionStorage.getItem("volume")||"100"),k.resyncControlState(e);var u=c.getCurrentVideo();if(c.initialiseComscoreStreamingTracking(r),c.clearError(),null!=r&&null!==(n=r.watchHistory)&&void 0!==n&&n.isExternal){var s=yn(yn({},r),f);c.initiateWatchHistoryHandlingExternal(h,s)}else if(null!=r&&r.watchHistory&&null!=r&&null!==(t=r.watchHistory)&&void 0!==t&&t.enable&&(!r.isAnonymousUser||null!=r&&null!==(i=r.watchHistory)&&void 0!==i&&i.saveOffline)){var d,p,m=yn(yn({},r),f);c.initiateWatchHistoryHandling(e,m,null==u||null===(d=u.video)||void 0===d||null===(p=d.gist)||void 0===p?void 0:p.id)}if(null!=r&&null!==(o=r.analytics)&&void 0!==o&&o.muxKey&&null!=h&&h.mux){var y,b,w,S,E,T,D=(null===(y=c.getCurrentVideo())||void 0===y?void 0:y.video)||(null==f?void 0:f.video),O=null==D?void 0:D.gist,P={env_key:null==r||null===(b=r.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==O?void 0:O.id,video_title:null==O?void 0:O.title,video_series:null==D||null===(S=D.series)||void 0===S?void 0:S.title,video_stream_type:null!=D&&null!==(E=D.streamingInfo)&&void 0!==E&&E.isLiveStream?"live":"video",viewer_user_id:null==r||null===(T=r.analytics)||void 0===T?void 0:T.userId};h.mux({debug:!1,data:P})}})),h.textTracks().on("change",(function(n){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];v.syncTtmlDisplay(e),h.trigger("subtitlechanged",t)})),h.tech_.on("retryplaylist",(function(){S&&fn(f,e)}));var T=0,D=null,O=!1,P=null,x=function(){clearTimeout(D),D=null,T=0,O=!1},j=function r(){D=setTimeout(n(t.mark((function n(){var o,l;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return D=null,n.next=3,E();case 3:if(o=n.sent,O){n.next=6;break}return n.abrupt("return");case 6:if(!(!(null!=h&&h.paused()||null!=h&&h.ended()||null!=h&&h.seeking())&&(null==h?void 0:h.readyState())>=3||o)){n.next=9;break}return x(),n.abrupt("return");case 9:if(!(T>=3)){n.next=13;break}return x(),fn(f,e)||(c.handleError(e,P||"Some error occured"),i.reject({status:!1,msg:P||"Some error occured",response:f})),n.abrupt("return");case 13:T++,console.log("Stream not progressing. Retry attempt ".concat(T,"/").concat(3,"...")),null==h||h.error(null);try{null==h||null===(l=h.liveTracker)||void 0===l||l.seekToLiveEdge(),null==h||h.play()}catch(e){console.log("Cannot seek to Live Edge",e)}r();case 18:case"end":return n.stop()}}),n)}))),1e3*Math.pow(2,T))};h.one("dispose",x),h.on("error",(function(){var n,t,r,o;3===(null==h||null===(n=h.error())||void 0===n?void 0:n.code)&&S?O||(console.log("Retrying to play the live stream due to media decode error"),O=!0,P=null===(t=h.error())||void 0===t?void 0:t.message,j()):(x(),console.log("ERROR",h.error(),h.error().code),4===h.error().code&&S?fn(f,e):(c.handleError(e,(null==h||null===(r=h.error())||void 0===r?void 0:r.message)||"Some error occured"),i.reject({status:!1,msg:(null==h||null===(o=h.error())||void 0===o?void 0:o.message)||"Some error occured",response:f})))})),h.one("play",(function(){var e,n,t,i,o;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(t=n.appcmsMain)||void 0===t||null===(i=t.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=r&&null!==(o=r.series)&&void 0!==o&&o.enable){var l,a,u,s=null===(l=c.getCurrentVideo())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=c.getSeriesWatchMap(),v=(null==d?void 0:d.get(s))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&c.seekToResumeTime(h,f)}else{var m,g,y,b,k,w,S,C=null!==(m=null==r?void 0:r.watchHistoryResumeTime)&&void 0!==m?m:null==r||null===(g=r.watchHistory)||void 0===g?void 0:g.watchedTime,E=null!==(y=null!==(b=null==r?void 0:r.watchedPercentage)&&void 0!==b?b:null==r||null===(k=r.watchHistory)||void 0===k?void 0:k.watchedPercentage)&&void 0!==y?y:0,T=null!==(w=null==r||null===(S=r.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==w?w:95;C&&E<T&&c.seekToResumeTime(h,C)}if(null!=h&&h.dvrSeekbar)try{h.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}})),h.on("volumechange",(function(){var e=100*h.volume().toFixed(2);h.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),h.on("chromecastDisconnected",(function(){if(S){h.currentSource();for(var n=h.textTracks(),t=n.length-1;t>=0;t--)h.removeRemoteTextTrack(n[t])}var r=h.textTracks(),i=function(){return v.removeDuplicateCaptions(e)};i(),r.addEventListener("addtrack",i),setTimeout((function(){return r.removeEventListener("addtrack",i)}),15e3)})),h.one("loadeddata",(function(){var e,n=(null==h||null===(e=h.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort((function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0})),"object"==y(h.dash)){var t,r,i,o=null==h||null===(t=h.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==o?void 0:o.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),a=mn(n);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],d=mn(n);try{for(d.s();!(s=d.n()).done;){var v,f,p,m=s.value;("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!w))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1")?h.audioTracks().removeTrack(m):c.push(m)}}catch(e){d.e(e)}finally{d.f()}for(var b=c.find((function(e){return"main"===e.kind})),k=b||c.find((function(e){return e.enabled}))||c[0],S=0,C=c;S<C.length;S++){var E=C[S];E.enabled=E===k}}}))}},wn=(null===(bn=r.time)||void 0===bn?void 0:bn.createTimeRanges)||r.createTimeRanges;function Sn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.scheduleStartDate,r=n.startOverTime;if(e&&(t||r)){var i,o=t?(i=t)>1e12?i/1e3:i:null,l=r>0?r:null,a=e.seekable.bind(e);e.seekable=function(){var e=a();if(!e||!e.length)return e;var n=e.start(0),t=e.end(e.length-1),r=Date.now()/1e3,i=1/0;if(null!=o&&(i=Math.min(i,r-o)),null!=l&&(i=Math.min(i,l)),!isFinite(i))return e;var u=i<=0?t:Math.max(n,t-i);return wn(u,t)};e.on("seeking",(function(){var n=e.seekable();if(n&&n.length){var t=n.start(0);e.currentTime()<t-.5&&e.currentTime(t)}}))}}function Cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function En(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Cn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var Tn="urn:x-cast:com.viewlift.player.caf",Dn={eng:"en",spa:"es",esp:"es",cast:"es",fre:"fr",fra:"fr",ger:"de",deu:"de",por:"pt",ita:"it",dut:"nl",nld:"nl",chi:"zh",zho:"zh",cmn:"zh",yue:"zh",jpn:"ja",kor:"ko",ara:"ar",hin:"hi",rus:"ru",heb:"he",iw:"he",ind:"id",in:"id",fil:"tl",tgl:"tl",vie:"vi",tha:"th",tur:"tr",pol:"pl",swe:"sv",nor:"no",nob:"no",nb:"no",dan:"da",fin:"fi",gre:"el",ell:"el",cze:"cs",ces:"cs",ukr:"uk",rum:"ro",ron:"ro",hun:"hu",ben:"bn",tam:"ta",tel:"te",mal:"ml",kan:"kn",mar:"mr",pan:"pa",guj:"gu",urd:"ur"},On=["und","mul","zxx"];function Pn(){try{return"true"===new URLSearchParams(window.location.search).get("castdebug")}catch(e){return!1}}function xn(){var e;Pn()&&(e=console).log.apply(e,arguments)}function jn(){var e;Pn()&&(e=console).warn.apply(e,arguments)}function In(e){if(!e)return"";var n=String(e).trim().toLowerCase().replace(/_/g,"-").split("@")[0].split(".")[0].split("-").filter(Boolean),t=S(n),r=t[0],i=t.slice(1);return r?[Dn[r]||r].concat(w(i)).join("-"):""}function _n(e){return In(e).split("-")[0]}function An(e){var n=_n(e);return!!n&&!On.includes(n)}function Ln(e,n){return An(e)&&An(n)&&_n(e)===_n(n)}function Rn(e){return e?String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase():""}function Bn(e,n){return!!e&&!!n&&Rn(e)===Rn(n)}function Mn(e){return(null==e?void 0:e.language)||(null==e?void 0:e.lang)||""}function Nn(e){return e?{language:Mn(e)||void 0,label:e.label||void 0,roles:["captions"===e.kind?"caption":"subtitle"],forced:!!e.forced}:null}function Vn(e){return e?{language:Mn(e)||void 0,label:e.label||void 0}:null}function Un(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(!n||!e.length)return null;for(var t=0,r=[function(e){return t=Mn(e),r=n.language,An(t)&&An(r)&&In(t)===In(r);var t,r},function(e){return Ln(Mn(e),n.language)},function(e){return Bn(e.label,n.label)}];t<r.length;t++){var i=r[t],o=e.filter(i);if(1===o.length)return o[0];if(o.length>1)return qn(o,n)}return null}function qn(e,n){var t=n.roles||[];return e.find((function(e){var n;return null===(n=e.roles)||void 0===n?void 0:n.some((function(e){return t.includes(e)}))}))||e[0]}var Hn={textTracks:[],audioTracks:[],activeCaption:null,activeAudio:null};function Fn(e,n){if(!n)return null;var t=Un(e,n);return null!=(null==t?void 0:t.id)?{id:t.id}:n}function zn(e,n,t){if(!n)return!t;if(!t)return!1;var r=Un(e,t);return r&&null!=n.id?r.id===n.id:!!Ln(Mn(n),t.language)&&(!n.label||!t.label||Bn(n.label,t.label))}function Gn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=function(){var e,n,t,r,i,o,l=null===(e=window)||void 0===e||null===(n=e.cast)||void 0===n?void 0:n.framework,a=null==l||null===(t=l.CastContext)||void 0===t||null===(r=t.getInstance)||void 0===r?void 0:r.call(t),u=null==a||null===(i=a.getCurrentSession)||void 0===i?void 0:i.call(a);return u&&"function"==typeof u.sendMessage?null!=l&&l.CastState&&(null===(o=a.getCastState)||void 0===o?void 0:o.call(a))!==l.CastState.CONNECTED?null:u:null}();if(t){var r=En(En({type:"COMMAND",source:"sender",command:e},n),{},{ts:Date.now()});xn("[Cast] ->",e,n);try{Promise.resolve(t.sendMessage(Tn,r)).catch((function(n){return jn("[Cast] command failed",e,(null==n?void 0:n.message)||n)}))}catch(n){jn("[Cast] command failed",e,(null==n?void 0:n.message)||n)}}}var Wn=function(){return Gn("play")},Kn=function(){return Gn("pause")},Yn=function(e){return Gn("seek",{currentTime:e})},$n=function(e){return Gn("setPlaybackRate",{rate:e})},Jn=function(e,n){return Gn("setVolume",{volume:e,muted:n})},Xn=function(e){zn(Hn.textTracks,Hn.activeCaption,e)||Gn("setCaption",{track:Fn(Hn.textTracks,e)})},Qn=function(e){e&&(zn(Hn.audioTracks,Hn.activeAudio,e)||Gn("setAudio",{track:Fn(Hn.audioTracks,e)}))};function Zn(e){return e?e.tracks_||Array.from(e):[]}function et(e){var n;return Zn(null===(n=e.textTracks)||void 0===n?void 0:n.call(e)).filter((function(e){return"captions"===e.kind||"subtitles"===e.kind}))}function nt(e){return"function"==typeof e.audioTracks?Zn(e.audioTracks()):[]}function tt(e){return et(e).find((function(e){return"showing"===e.mode}))||null}function rt(e){return nt(e).find((function(e){return e.enabled}))||null}function it(e,n){var t=et(e),r=n?Un(t,n):null;n&&!r||t.forEach((function(e){e.mode=e===r?"showing":"disabled"}))}var ot=null;var lt=null;function at(e,n){if("STATE"===n.type)return Hn.textTracks=n.textTracks||[],Hn.audioTracks=n.audioTracks||[],Hn.activeCaption=n.activeCaption||null,Hn.activeAudio=n.activeAudio||null,void function(){if(lt&&(Hn.textTracks.length||Hn.audioTracks.length)){var e=lt,n=e.caption,t=e.audio;lt=null,Xn(n),Qn(t)}}();if("LOG_STATUS"===n.type&&xn("[Cast] <- LOG_STATUS",n.type,n),"EVENT"===n.type)switch(xn("[Cast] <-",n.event,n),n.event){case"CaptionChanged":Hn.activeCaption=n.activeCaption||null,it(e,Hn.activeCaption);break;case"AudioChanged":Hn.activeAudio=n.activeAudio||null,function(e,n){var t=n&&Un(nt(e),n);t&&!t.enabled&&(t.enabled=!0)}(e,Hn.activeAudio);break;case"TracksChanged":Hn.textTracks=[],Hn.audioTracks=[];break;case"TrackUnresolved":jn("[Cast] receiver could not resolve track",n.kind,n.requested)}}var ut=!1;function st(e){!function(e){var n,t,r,i,o,l,a=null===(n=window)||void 0===n||null===(t=n.cast)||void 0===t?void 0:t.framework,u=null==a||null===(r=a.CastContext)||void 0===r||null===(i=r.getInstance)||void 0===i?void 0:i.call(r);if(u){var s=function(n){n&&!n.__vlCastListening&&(n.__vlCastListening=!0,n.addMessageListener(Tn,(function(n,t){try{var r="string"==typeof t?JSON.parse(t):t;"receiver"===(null==r?void 0:r.source)&&at(e,r)}catch(e){jn("[Cast] could not handle receiver message",(null==e?void 0:e.message)||e,t)}})))};s(null===(o=u.getCurrentSession)||void 0===o?void 0:o.call(u)),!ut&&null!=a&&null!==(l=a.CastContextEventType)&&void 0!==l&&l.SESSION_STATE_CHANGED&&(ut=!0,u.addEventListener(a.CastContextEventType.SESSION_STATE_CHANGED,(function(){var e;return s(null===(e=u.getCurrentSession)||void 0===e?void 0:e.call(u))})))}}(e),e.addClass("vl-casting");var n=tt(e);n&&(ot=Nn(n));var t=function(){return it(e,ot)};e.one("loadeddata",(function(){return setTimeout(t,0)})),setTimeout(t,1500),function(e){var n=Nn(tt(e))||ot,t=Vn(rt(e));xn("[Cast] syncing selected tracks",lt={caption:n,audio:t}),Gn("setCaption",{track:Fn(Hn.textTracks,n)}),t&&Gn("setAudio",{track:Fn(Hn.audioTracks,t)})}(e)}function ct(e){var n;if(e&&!e.__vlCastSyncBound){e.__vlCastSyncBound=!0,e.on("chromecastConnected",(function(){return st(e)})),e.on("chromecastDisconnected",(function(){e.removeClass("vl-casting"),Hn.textTracks=[],Hn.audioTracks=[],Hn.activeCaption=null,Hn.activeAudio=null,lt=null}));var t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:150,t=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout((function(){return e.apply(void 0,i)}),n)}}((function(){return Jn(e.volume(),e.muted())}));e.on("play",(function(){return Wn()})),e.on("pause",(function(){return Kn()})),e.on("seeked",(function(){return Yn(e.currentTime())})),e.on("volumechange",t),e.on("ratechange",(function(){return $n(e.playbackRate())})),e.on("texttrackchange",(function(){var n=Nn(tt(e));n&&(ot=n),Xn(n)}));var r="function"==typeof e.audioTracks?e.audioTracks():null;null==r||null===(n=r.addEventListener)||void 0===n||n.call(r,"change",(function(){return Qn(Vn(rt(e)))}))}}function dt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function vt(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function ft(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return pt(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?pt(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function pt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var mt={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0},gt=function(e){var n;if(e){var t=function(){var n,t="function"==typeof e.currentWidth&&e.currentWidth()||(null===(n=e.el())||void 0===n?void 0:n.clientWidth)||0;e.toggleClass("vlp-hide-pip",t<=500&&function(){var n,t=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);if(!t)return!1;for(var r=0;r<t.length;r++){var i,o=null===(i=t[r])||void 0===i?void 0:i.kind;if("captions"===o||"subtitles"===o)return!0}return!1}())};t(),e.on("playerresize",t),e.on("fullscreenchange",t);var r=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);null!=r&&r.addEventListener&&(r.addEventListener("addtrack",t),r.addEventListener("removetrack",t),e.on("dispose",(function(){r.removeEventListener("addtrack",t),r.removeEventListener("removetrack",t)})))}};function ht(e,n,t){var r=b.playerConfigManager.getConfig()||{};c.emitApiErrorEvent(e,{status:t,message:"DRM ".concat(n," request failed")},"playback",{requestKind:n,videoId:null==r?void 0:r.videoId})}function yt(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var i=n[r[t]];if("string"==typeof i)return i;if(null!=i&&i.url)return i.url;if(null!=i&&i.licenseUri)return i.licenseUri}var o=null==e?void 0:e.keySystemOptions;if(Array.isArray(o)){var l,a=ft(o);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function bt(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return yt("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function kt(e,n){n&&!n.__vlDrmDashHooksInstalled&&(n.__vlDrmDashHooksInstalled=!0,"function"==typeof n.addResponseInterceptor&&n.addResponseInterceptor((function(e){try{var n=(null==e?void 0:e.request)||{},t=(null==e?void 0:e.url)||(null==n?void 0:n.url)||"",r=c.classifyRequestKind(t,(null==n?void 0:n.type)||(null==e?void 0:e.type));if(c.isDrmRequestKind(r)){var i=c.extractStatusCode(e,null);c.isHttpOk(i)||ht(t,r,i)}}catch(e){}return Promise.resolve(e)})),"function"==typeof n.registerLicenseRequestFilter&&n.registerLicenseRequestFilter((function(e){try{null!=e&&e.url&&(n.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()})),"function"==typeof n.on&&n.on("public_licenseRequestComplete",(function(t){try{var r,i,o,l;if(null==t||!t.error)return;var a=null!==(r=null==t||null===(i=t.error)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.responseCode)&&void 0!==r?r:c.extractStatusCode(null,t.error);ht((null==t||null===(l=t.data)||void 0===l?void 0:l.url)||n.__vlLastLicenseUrl||bt(e)||"","license",a)}catch(e){}})))}var wt=!1,St=null,Ct=new Set;function Et(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,Ct.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,Ct.delete(e),function(){if(wt&&!(Ct.size>0)){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof St&&e.removeHook("beforeinitialize",St),wt=!1,St=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function Tt(e){if(e){Et(e),function(){if(!wt){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.hook&&(St=function(e,n){null!=e&&e.__vlDrmDashEnabled&&kt(e,n)},wt=!0,e.hook("beforeinitialize",St))}}(),function(e){e&&!e.__vlEmeDrmErrorInstalled&&(e.__vlEmeDrmErrorInstalled=!0,e.on("error",(function(){try{var n,t="function"==typeof e.error?e.error():null;if(!t||!c.isDrmError(t))return;if(null!=e&&null!==(n=e.dash)&&void 0!==n&&n.mediaPlayer)return;ht(bt(e),"license",null)}catch(e){}})))}(e);var n=function(){var n;!function(e){var n,t,r=null==e||null===(n=e.tech_)||void 0===n||null===(t=n.vhs)||void 0===t?void 0:t.xhr;r&&"function"==typeof r.onResponse&&!e.__vlDrmVhsHooksInstalled&&(e.__vlDrmVhsHooksInstalled=!0,r.onResponse((function(e,n,t){try{var r=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(e),i=c.classifyRequestKind(r,null==e?void 0:e.type);if(!c.isDrmRequestKind(i))return;var o=c.extractStatusCode(t,n);c.isHttpOk(o)&&!n||ht(r,i,o)}catch(e){}})))}(e),kt(e,null==e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer)};n(),e.on("xhr-hooks-ready",n),e.on("loadstart",(function(){setTimeout(n,0)}))}}var Dt=function(i,o,l,a){var u,s,d,f,p,h,b,k,w,S,C,E,T,D,O,P,x,j,I,_,A,L,R,B,M,N,V,U,q,H,F,z,G,W,K,Y,$,J,X=o.res,Q=void 0===X?null:X,Z=o.sres,ee=void 0===Z?null:Z,te=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=mt[r]?mt[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),re=te.playerDebug,ie=te.logLevel,oe=te.dashLogLevel;re&&(console.log("[PLAYER DEBUG] config:",l),console.log("[PLAYER DEBUG] entitlement (res):",Q),ee&&console.log("[PLAYER DEBUG] series response (sres):",ee));var le=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(u=Q)||void 0===u?void 0:u.contentType)||"video",ue=m.impolicy16x9(null===(s=Q)||void 0===s||null===(d=s[ae])||void 0===d||null===(f=d.gist)||void 0===f?void 0:f.videoImageUrl)||m.impolicy16x9(null===(p=Q)||void 0===p||null===(h=p[ae])||void 0===h||null===(b=h.gist)||void 0===b||null===(k=b.imageGist)||void 0===k?void 0:k.r16x9),se=(null===(w=Q)||void 0===w||null===(S=w[ae])||void 0===S||null===(C=S.liveDetails)||void 0===C?void 0:C.isDvrEnabled)||!1,ce=!(null===(E=Q)||void 0===E||null===(T=E[ae])||void 0===T||null===(D=T.streamingInfo)||void 0===D||!D.isLiveStream)||"linearchannel"===ae,de=(null===(O=Q)||void 0===O||null===(P=O.ads)||void 0===P||null===(x=P.preRoll)||void 0===x||null===(j=x.adTags)||void 0===j||null===(I=j.web)||void 0===I?void 0:I.active)&&(null===(_=Q)||void 0===_||null===(A=_.ads)||void 0===A||null===(L=A.preRoll)||void 0===L||null===(R=L.adTags)||void 0===R||null===(B=R.web)||void 0===B?void 0:B.url);Q=vt(vt({},Q),{},{audioAssetSource:null==l?void 0:l.audioAssetSource});var ve=(null==l||null===(M=l.customData)||void 0===M?void 0:M.ads)||{},pe=(null===(N=Q)||void 0===N||null===(V=N[ae])||void 0===V?void 0:V.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,me=!(null===(U=Q)||void 0===U||null===(q=U[ae])||void 0===q||!q.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),ge=(null==l?void 0:l.latency)||6,he=(null==l?void 0:l.skin_settings)||{},ye=($={enableSmoothSeeking:!0,controls:0!=(null==l?void 0:l.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==l?void 0:l.muted)||!1,autoplay:(null==l?void 0:l.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==he?void 0:he.pictureInPictureToggle)||!1},playbackRates:null!=he&&he.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==l.skin,liveui:se},e($,"autoplay",null==l?void 0:l.autoplay),e($,"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!de),e($,"loop",(null==l?void 0:l.loop)||!1),e($,"audioPosterMode",null==l?void 0:l.audioPosterMode),e($,"html5",vt(vt({dash:vt(vt({},!r.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:vt(vt({},((null==l?void 0:l.debugConfig)&&(null==l||null===(H=l.debugConfig)||void 0===H?void 0:H.enable)||re)&&{debug:{logLevel:oe}}),{},{streaming:{parseInbandPrft:!0,delay:{liveDelay:ge},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:vt({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:vt(vt(vt(vt({},(null==l?void 0:l.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==l?void 0:l.initialBandwidth)/1e3}}),(null==l?void 0:l.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==l?void 0:l.maxBitrate)/1e3}}),(null==l?void 0:l.minBitrate)&&{minBitrate:{audio:-1,video:(null==l?void 0:l.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:vt(vt(vt({},(null==l?void 0:l.initialBandwidth)&&{bandwidth:l.initialBandwidth}),{},{liveRangeSafeTimeDelta:ge,useDevicePixelRatio:!0,experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==l||!l.initialBandwidth},(null==l||null===(F=l.customData)||void 0===F?void 0:F.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(z=null==l?void 0:l.enableLowInitialPlaylist)&&void 0!==z&&z},((null==l?void 0:l.debugConfig)&&(null==l||null===(G=l.debugConfig)||void 0===G?void 0:G.enable)||re)&&{debug:!0}),debug:(null==l?void 0:l.debugConfig)&&(null==l||null===(W=l.debugConfig)||void 0===W?void 0:W.enable)||re||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==l||null===(K=l.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(Y=l.customData)||void 0===Y?void 0:Y.nativeVideoTracks)&&{nativeVideoTracks:!1})),e($,"poster",ue),e($,"techOrder",le),e($,"chromecast",{requestCustomDataFn:function(e){var n,t,r=m.getPlayer(i),o=((null==r?void 0:r.textTracksJson_)||r.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),a=function(e,n,t){var r,i,o,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,h,b,k,w,S,C;p.isDrmEnabled=!0;var E=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,T=(null==E?void 0:E.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(b=h.options)||void 0===b?void 0:b.serverURL);p.licenseUrl=T;var D=(null==E?void 0:E.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(k=n.keySystemOptions)||void 0===k||null===(w=k[0])||void 0===w||null===(S=w.options)||void 0===S||null===(C=S.httpRequestHeaders)||void 0===C?void 0:C["X-AxDRM-Message"]);p.licenseToken=D}var O=(null==e||null===(r=e[f])||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=O;var P=null==e||null===(o=e[f])||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.runtime;p.duration=P;var x=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=x;var j,I,_=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=_,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,void 0!==("undefined"==typeof window?"undefined":y(window))&&(p.siteId=(null===(j=window)||void 0===j?void 0:j.siteId)||null,p.userId=(null===(I=window)||void 0===I?void 0:I.sessionStorage)&&window.sessionStorage.getItem("uid")||null),console.log(p),p}(Q,e,o),u=o.find((function(e){return"showing"===e.mode}))||null;return ot=Nn(u),vt(vt({},a),{},{activeCaption:{enabled:!!u,language:(null==u?void 0:u.language)||(null==u?void 0:u.lang)||null,label:(null==u?void 0:u.label)||null},transmitTrackingUrl:c.trackingUrlManager.get()||null,convivaMetaData:vt({customerKey:(null==l||null===(n=l.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==l||null===(t=l.convivaConfig)||void 0===t?void 0:t.debug)||!1},_e.getData())})},modifyLoadRequestFn:function(e){var n,t,r,o,l,a=m.getPlayer(i),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Q)||void 0===n||null===(t=n[ae])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(o=r.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!r.getPlayers()[i]){(null!=l&&l.debugConfig&&null!=l&&null!==(J=l.debugConfig)&&void 0!==J&&J.enable||re)&&r.log.level(ie||"debug");var be=r(i,ye,function(){var e=n(t.mark((function e(){var n,o,u,s,d,f,p,m,g,h,y,b,k,w,S,C,E,T,D,O,P,x,j,I,_,A;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Tt(be),gt(be),console.log(be),console.log(r.VERSION),console.log(r.getPlugins()),e.next=7,fe(l,Q);case 7:if(null!=l&&l.debugConfig&&null!=l&&null!==(n=l.debugConfig)&&void 0!==n&&n.enable||re){try{r.log.level(ie||"debug")}catch(e){}(C=function(){try{var e,n,t;null==be||null===(e=be.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:oe}})}catch(e){}})(),be.one("loadedmetadata",C)}if(E=null===(o=Q)||void 0===o||null===(u=o[ae])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.startOverTime,null!=l&&l.disableControls||dn(i,{liveVideo:ce,isDvrEnabled:se,res:Q}),ce&&a.resolve(vt({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Q}:{response:Q})),c.inititateBeacon(i,{content:Q,analyticsCb:null==l?void 0:l.analyticsCb,analyticsEventParams:null==l?void 0:l.analyticsEventParams,userId:null==l?void 0:l.userId}),Ie(i,l),ct(be),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),se&&ne(i,E),!de||null!=l&&null!==(d=l.customData)&&void 0!==d&&d.disableAds||c.initialiseAdvertisement(i,de,Q),null!=l&&l.disableControls||c.initDvrStartOver(i,{config:l,content:Q,liveVideo:ce,isDvrEnabled:se}),T=c.getSource(Q,i),console.log(T),re&&(console.log("[PLAYER DEBUG] source:",T),console.log("[PLAYER DEBUG] videojs options:",ye)),null!=l&&l.nearestClusterUrl&&(T=c.getUpdatedClusterSource(T,l.nearestClusterUrl)),!pe){e.next=28;break}return e.next=25,c.getSGAIEnabledSource(i,Q);case 25:T=e.sent,e.next=32;break;case 28:if(!me){e.next=32;break}return e.next=31,c.getTransmitEnabledSource(T,Q,i);case 31:T=e.sent;case 32:be&&(be.__vlDrmLicenseUrl=yt(T)),T?c.loadVideo(i,T):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:Q}),c.handleError(i,"Incompatible / Missing Source")),D=null===(f=Q)||void 0===f||null===(p=f[ae])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.scheduleStartDate,ce&&se&&(D||E)&&Sn(be,{scheduleStartDate:D,startOverTime:E}),((null===(g=Q)||void 0===g||null===(h=g[ae])||void 0===h||null===(y=h.contentDetails)||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0||(null===(k=Q)||void 0===k||null===(w=k[ae])||void 0===w||null===(S=w.closedCaptions)||void 0===S?void 0:S.length)>0)&&(A=(null===(P=Q)||void 0===P||null===(x=P[ae])||void 0===x||null===(j=x.contentDetails)||void 0===j?void 0:j.closedCaptions)||(null===(I=Q)||void 0===I||null===(_=I[ae])||void 0===_?void 0:_.closedCaptions),O=A.filter((function(e){return"VTT"===e.format})),v.addCaptions(i,O)),null!=l&&l.disableControls?c.disableControls(i):Ae(i,vt(vt(vt({},l),ye),{},{liveVideo:ce,isDvrEnabled:se,res:Q,sres:ee})),kn(i,vt(vt(vt({},l),ye),{},{liveVideo:ce}),a,{res:Q,sres:ee});case 39:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}};function Ot(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Pt(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Ot(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var xt=function(e,n){var t=n.resolve,r=n.reject,i=null==e?void 0:e.playerId,o=jt(e);Dt(i,{res:o},e,{resolve:t,reject:r})},jt=function(e){var n,t,r,i,o,l,a,u,s,d,v,f,p,m,g,h=null==e?void 0:e.streamingInfo,y=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,b=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,k=(null==e||null===(r=e.streamingInfo)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.url)||null,S=(null==e||null===(o=e.streamingInfo)||void 0===o?void 0:o.posterUrl)||null,C=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],E=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,T=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],D=(null==e||null===(d=e.customData)||void 0===d||null===(v=d.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,O=(null==e||null===(f=e.streamingInfo)||void 0===f?void 0:f.scheduleStartDate)||null,P=(null==e||null===(p=e.streamingInfo)||void 0===p?void 0:p.startOverTime)||null,x=null==e?void 0:e.token,j=c.getDecodedToken(x);null==j||j.site;var I=null==j?void 0:j.siteId,_=(null==e||null===(m=e.customData)||void 0===m||null===(g=m.comscore)||void 0===g?void 0:g.video)||null,A=Pt(Pt({id:I?"".concat(I,"_external"):"external"},!b&&{directPlaybackUrl:null==y?void 0:y.url}),{},{video:Pt(Pt(Pt(Pt(Pt({drmEnabled:b,streamingInfo:Pt(Pt({videoAssets:Pt(Pt({},E&&{drmProvider:E}),{},{widevine:null==y?void 0:y.widevine,fairPlay:null==y?void 0:y.fairPlay,playReady:null==y?void 0:y.playReady})},(null==h?void 0:h.isDvrEnabled)&&{isLiveStream:!0}),(null==_?void 0:_.isLiveStream)&&{isLiveStream:null==_?void 0:_.isLiveStream})},D&&{isSSAIEnabled:D}),{},{metadata:T,liveDetails:Pt({isDvrEnabled:null==h?void 0:h.isDvrEnabled},P&&{startOverTime:P}),gist:Pt(Pt(Pt(Pt({},S&&{videoImageUrl:S}),O&&{scheduleStartDate:O}),(null==_?void 0:_.videoId)&&{id:null==_?void 0:_.videoId}),(null==_?void 0:_.videoTitle)&&{title:null==_?void 0:_.videoTitle}),contentDetails:Pt({},(null==C?void 0:C.length)>0&&{closedCaptions:w(C)})},(null==_?void 0:_.runtime)&&{runtime:null==_?void 0:_.runtime}),(null==_?void 0:_.publishDate)&&{publishDate:null==_?void 0:_.publishDate}),(null==_?void 0:_.platform)&&{platform:null==_?void 0:_.platform}),(null==_?void 0:_.series)&&{series:null==_?void 0:_.series}),ads:{preRoll:{adTags:{web:Pt(Pt({},k&&{active:!0}),k&&{url:k})}}}});return _&&(null!=_&&_.isDvrEnabled&&(A.video.liveDetails=Pt(Pt({},A.video.liveDetails),{},{isDvrEnabled:null==_?void 0:_.isDvrEnabled})),null!=_&&_.metadata&&(A.video.metadata=[].concat(w(A.video.metadata),w(null==_?void 0:_.metadata)))),A},It=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||"");return t.has("ssaiDisable")?t.get("ssaiDisable"):null}catch(e){return null}};function _t(e,n){return At.apply(this,arguments)}function At(){return(At=n(t.mark((function e(n,r){var i,o,l,a,u,s,v,f,p,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,u=null==n?void 0:n.videoId,s=null==n?void 0:n.playerId,v=!(null==n||!n.anonymousId),e.next=6,c.getToken();case 6:f=e.sent,p=!1===(null==n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.isSSAIEnabled),null!==(m=It())&&(p="true"===m),c.getVideoDetails(u,f,p).then((function(e){var t,r,i,o,p,m,g,h,y,b,k;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType,c.setCurrentVideo(null==e?void 0:e.data);var w=null==e||null===(o=e.data)||void 0===o||null===(p=o.video)||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.scheduleEndDate,S=null==e||null===(g=e.data)||void 0===g||null===(h=g.video)||void 0===h||null===(y=h.gist)||void 0===y?void 0:y.scheduleStartDate;d.handlePlayerMessage(s,{scheduleEndDate:w,scheduleStartDate:S});var C=null==e?void 0:e.data;if(null!=n&&null!==(b=n.watchHistory)&&void 0!==b&&b.isExternal)C.contentType="video",Dt(s,{res:C},n,{resolve:l,reject:a});else if(null!=n&&n.watchHistory&&null!=n&&null!==(k=n.watchHistory)&&void 0!==k&&k.enable&&!v){var E;if((null===(E=n.watchHistory)||void 0===E?void 0:E.saveOffline)||!1){var T,D,O,P=(null===(T=n.watchHistory)||void 0===T?void 0:T.profileId)||"",x=c.getWatchHistoryByIdFromStorage(P,u,null==n?void 0:n.siteOwner);if(x&&x.length)n.watchHistoryResumeTime=(null===(D=x[0])||void 0===D?void 0:D.watchedTime)||null,n.watchedPercentage=(null===(O=x[0])||void 0===O?void 0:O.watchedPercentage)||null;C.contentType="video",Dt(s,{res:C},n,{resolve:l,reject:a})}else c.getVideoInfo(u,f).then((function(e){var t,r,i,o,l,a;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,C.contentType="video"})).catch((function(){})).finally((function(){Dt(s,{res:C},n,{resolve:l,reject:a})}))}else Dt(s,{res:C},n,{resolve:l,reject:a})})).catch((function(e){var t,r,i=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,o=(null==n||null===(r=n.event)||void 0===r?void 0:r.onCountdownComplete)||null;i&&d.handleCountdownTimer(s,e,o),c.initiateErrorHandling(e,s,a,u)}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lt(e,n){return Rt.apply(this,arguments)}function Rt(){return(Rt=n(t.mark((function e(n,r){var i,o,l,a,u,s,d,v;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,e.next=3,c.getToken();case 3:u=e.sent,s=null==n?void 0:n.playerId,d=null==n?void 0:n.epg,v=!1===(null==n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.isSSAIEnabled),c.getLinearChannelDetails(d,u,v).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==d?void 0:d.channelId,c.setCurrentVideo(t),Dt(s,{res:t},n,{resolve:l,reject:a})})).catch((function(e){c.initiateErrorHandling(e,s,a,videoId)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Bt(e,n){return Mt.apply(this,arguments)}function Mt(){return(Mt=n(t.mark((function e(n,r){var i,o,l,a,u,s,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r.resolve,l=r.reject,e.next=3,c.getToken();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,c.seasonIdxManager.set(parseInt(s)),d=null==n||null===(i=n.series)||void 0===i?void 0:i.id,c.getSeriesDetails(d,a).then((function(e){var t,r,i,s=e.data,v=e.data.seasons;c.setCurrentSeries(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id);c.createSeriesWatchMap(d,a),c.getVideoDetails(f,a).then((function(e){var t,r,i;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType,c.setCurrentVideo(e.data),Dt(u,{res:null==e?void 0:e.data,sres:s},n,{resolve:o,reject:l})})).catch((function(e){c.initiateErrorHandling(e,u,l,videoId)}))})).catch((function(e){c.initiateErrorHandling(e,u,l)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Nt,Vt=function(e){var n=e.site,t=e.sseBaseUrl,r=e.sseEndpoint,i=e.debug,o=void 0!==i&&i;return C.createSSETransport({site:n,sseBaseUrl:t,getToken:c.getToken,sseEndpoint:r,onOpen:function(e){var n=e.userId,t=e.endpoint;o&&console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,r,i,l,a,u,s,v,f;if(o&&console.log("SSE Message:",e),(null===(n=c.getCurrentVideo())||void 0===n||null===(t=n.video)||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.id)===(null==e||null===(i=e.payload)||void 0===i?void 0:i.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var p=1e3*(null==e||null===(l=e.payload)||void 0===l||null===(a=l.states)||void 0===a||null===(u=a.live)||void 0===u?void 0:u.startDateTime),m=1e3*(null==e||null===(s=e.payload)||void 0===s||null===(v=s.states)||void 0===v||null===(f=v.end)||void 0===f?void 0:f.endDateTime);p&&m&&(console.log("Setting schedule timer",p,m),d.scheduleTimerInstanceManager.set({startDateTime:p,endDateTime:m}))}},onReconnectAttempt:function(e){o&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;o&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){o&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){o&&console.error("SSE Error:",e,n)},onClose:function(){o&&console.log("SSE Closed")}})},Ut=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,i=e.sseEndpoint,o=e.debug;if(n){var l=Vt({site:t,sseBaseUrl:r,sseEndpoint:i,debug:void 0!==o&&o});return l._sseBaseUrl=r,l._site=t,l._sseEndpoint=i,l}};function qt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ht(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):qt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}module.exports=function(){return{loadVideoInstantly:c.loadVideoInstantly,onTimeUpdate:d.onTimeUpdate,getVideoDuration:d.getVideoDuration,onVideoEnded:d.onVideoEnded,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=n(t.mark((function n(r,i){var o,l,a,u,s,d,v,f,p,g,y,k,w,S,C,T,D,O,P,x,j,I,_,A,L,R,B,M,N,V,U;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!c.isPlayerInitialised(null==e?void 0:e.playerId)){n.next=3;break}return r({status:!0,msg:"Player already initialised",skipped:!0}),n.abrupt("return");case 3:if(O=(null==e?void 0:e.videoSourceUrl)||!1,P=null==e?void 0:e.asat,x=(null==e||null===(o=e.epg)||void 0===o?void 0:o.enable)||!1,j=null==e?void 0:e.videoId,I=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,_=(null==e?void 0:e.streamingInfo)||!1,window.videoId=j,A=null==e?void 0:e.token,!c.token_authentication_enabled(e)){n.next=18;break}if(sessionStorage.setItem("vlp_token",A),c.refreshTokenManager().set(null==e?void 0:e.refreshToken),A&&!c.isTokenExpired(A)){n.next=17;break}return i({status:!1,msg:"".concat(A?"Token is expired !":"Missing Authorization Token"),response:{token:A}}),n.abrupt("return");case 17:Nt=JSON.parse(atob(A.split(".")[1]));case 18:return window.siteName=null===(a=Nt)||void 0===a?void 0:a.site,window.siteId=null===(u=Nt)||void 0===u?void 0:u.siteId,e.isAnonymousUser=!(null===(s=Nt)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=Nt)||void 0===d?void 0:d.site)||null,e.userId=(null===(v=Nt)||void 0===v?void 0:v.userId)||null,c.setUserId((null===(f=Nt)||void 0===f?void 0:f.userId)||(null===(p=Nt)||void 0===p?void 0:p.anonymousId)||null),window.watchHistory=e.watchHistory||null,L=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(g=e.series)&&void 0!==g&&g.enable?null:null==e?void 0:e.chromecastReceiverId,R=(null==e||null===(y=e.analytics)||void 0===y?void 0:y.gaId)||null,(B=null==e?void 0:e.errors)&&(window.customErrors=B),window.customData=null==e?void 0:e.customData,h.setLocalisation(h.resolveLocalisation(e)),c.baseUrlManager.set(e.apiBaseUrl),null!=e&&e.skin&&!m.isNotAValidSkin(e.skin)||(e.skin="VL_ONE"),b.playerConfigManager.setConfig(e),E.relatedVideosManager.reset(),E.relatedVideosManager.set(null==e?void 0:e.relatedVideos),n.next=39,se(e);case 39:R&&J("https://www.googletagmanager.com/gtag/js?id=".concat(R)).then((function(){return c.runGtag(R)})).catch((function(e){})),(M=null===(k=document)||void 0===k?void 0:k.getElementById("".concat(L)))&&M.addEventListener("contextmenu",(function(e){return e.preventDefault()})),(N=Ut({enable:null==e||null===(w=e.sse)||void 0===w?void 0:w.enable,site:null==e||null===(S=e.sse)||void 0===S?void 0:S.siteName,sseBaseUrl:null==e||null===(C=e.sse)||void 0===C?void 0:C.sseBaseUrl,sseEndpoint:null==e||null===(T=e.sse)||void 0===T?void 0:T.sseEndpoint,debug:null==e||null===(D=e.sse)||void 0===D?void 0:D.debug}))&&!N.isConnectionActive()&&N.connect(),O?(U={directPlaybackUrl:O,id:V="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}},P?c.getVideoDetails(V,A).then((function(n){var t,o=(null==n?void 0:n.data)||{},l=Ht(Ht(Ht({},o),U),{},{video:Ht(Ht({},null==o?void 0:o.video),{},{liveDetails:Ht(Ht({},null==o||null===(t=o.video)||void 0===t?void 0:t.liveDetails),{},{isDvrEnabled:!(null==e||!e.isDvr)})})});Dt(L,{res:l},e,{resolve:r,reject:i})})).catch((function(e){c.initiateErrorHandling(e,L,i,V)})):Dt(L,{res:Ht(Ht({},U),{},{video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}})},e,{resolve:r,reject:i})):_?xt(e,{resolve:r,reject:i}):I?Bt(e,{resolve:r,reject:i}):x?Lt(e,{resolve:r,reject:i}):_t(e,{resolve:r,reject:i});case 45:case"end":return n.stop()}}),n)})));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:f.getRenditions,skip:c.skip,getPlayer:m.getPlayer,play:c.play,pause:c.pause,detectBrowser:g.detectBrowser,rewind:c.rewind,loadVideo:c.loadVideo,seekToTimeStamp:d.seekToTimeStamp,isPlayerInitialised:c.isPlayerInitialised,load:c.load,authenticateLC:c.authenticateLC,dispose:c.dispose,enableCaptions:v.enableCaptions,disableCaptions:v.disableCaptions,getCaptions:v.getCaptions,playSelectedResolution:p.playSelectedResolution,getSource:c.getSource,setVolume:Q,getVolume:Z,disableControls:c.disableControls,setPlaybackSpeed:d.setPlaybackSpeed,getEntitlementData:c.getEntitlementData,getSsaiEvents:c.getSsaiEvents,getPlayerControlEvents:k.getPlayerControlEvents,playerEvents:d.playerEvents,onReplay:d.onReplay,relatedVideosManager:E.relatedVideosManager,setChapters:ln,getChapters:an,clearChapters:un,seekToChapter:sn,getChapterEvents:Ke,onWatchInVerticalView:d.onWatchInVerticalView,fireBeaconEvent:c.fireBeaconEvent,getDvrManager:c.getDvrManager}};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),r=require("video.js"),i=require("@babel/runtime/helpers/classCallCheck"),o=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/get"),a=require("@babel/runtime/helpers/inherits"),u=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),c=require("./generic-46d02ba0.js"),d=require("./index-79d88164.js"),v=require("./captions-3171bf62.js"),f=require("./renditions-05a85e06.js"),p=require("./resolution-ac7705e6.js"),m=require("./skin-55634dc6.js"),g=require("./browser-3670a923.js"),h=require("./localisation-da6f64c6.js"),y=require("@babel/runtime/helpers/typeof"),b=require("./manager-77ddd30c.js"),k=require("./playerControlEvents-db923a5c.js");require("@viewlift/comscore/index.js");var w=require("@babel/runtime/helpers/toConsumableArray"),S=require("@babel/runtime/helpers/toArray"),C=require("@viewlift/sse"),E=require("./relatedVideosManager-44ec6d59.js");function T(e,n,t,r){var i=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof i?function(e){return i.apply(t,e)}:i}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/objectWithoutProperties"),require("@babel/runtime/helpers/assertThisInitialized");var O=r.getComponent("TextTrackSettings"),P=r.dom,x=[{value:"0.50",label:"50%"},{value:"0.75",label:"75%"},{value:"1.00",label:"100%"},{value:"1.25",label:"125%"},{value:"1.50",label:"150%"},{value:"1.75",label:"175%"},{value:"2.00",label:"200%"},{value:"3.00",label:"300%"},{value:"4.00",label:"400%"}],j=x.map((function(e){return e.value})),I="1.00",_=".vjs-font-percent > select",A="vlp-caption-font-size-style",L="#FFF",R="1",B="#000",M="1",N="#000",V="0",U="proportionalSansSerif",q="#222",H="#ccc",F={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},z=function(e,n){var t=parseFloat(e);return isNaN(t)?n:t},G=function(e,n){var t;if(e&&4===e.length)t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(!e||7!==e.length)return e;t=e.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+n+")"},W=null;function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(K=function(){return!!e})()}O?(W=function(){a(r,O);var e,n,t=(e=r,n=D(),function(){var t,r=s(e);if(n){var i=s(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return u(this,t)});function r(e,n){var o;return i(this,r),(o=t.call(this,e,n)).customReady_=!0,o.customUiReady_=!0,o.triggerEl_=null,o.applyCustomFontSizeUI_(),o}return o(r,[{key:"conditionalFocus_",value:function(){this.triggerEl_=this.getCaptionsTrigger_(),this.previouslyActiveEl_=null,this.focus()}},{key:"conditionalBlur_",value:function(){this.previouslyActiveEl_=null;var e=this.player_;e&&"function"==typeof e.userActive&&e.userActive(!0);var n=this.triggerEl_||this.getCaptionsTrigger_();this.triggerEl_=null;var t=function(){n&&"function"==typeof n.focus&&n.focus()};"undefined"!=typeof window&&"function"==typeof window.setTimeout?window.setTimeout(t,0):t()}},{key:"getCaptionsTrigger_",value:function(){var e=this.player_&&this.player_.controlBar;return e&&(e.subsCapsButton||e.captionsButton||e.subtitlesButton)||null}},{key:"applyCustomFontSizeUI_",value:function(){var e=this;this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.on(this.player_,["playerresize","fullscreenchange"],(function(){return e.applyDashCaptionStyles_()})),this.applyDashCaptionStyles_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(_);if(e){for(var n=e.value;e.firstChild;)e.removeChild(e.firstChild);x.forEach((function(n){e.appendChild(P.createEl("option",{value:n.value,textContent:n.label}))})),e.value=-1!==j.indexOf(n)?n:I}}},{key:"bindCaptionStyleChange_",value:function(){for(var e=this,n=this.$$("select"),t=0;t<n.length;t++)this.on(n[t],"change",(function(){return e.applyDashCaptionStyles_()}))}},{key:"selectedMultiplier_",value:function(){var e=this.$(_),n=e&&-1!==j.indexOf(e.value)?e.value:I;return parseFloat(n)}},{key:"styleEl_",value:function(){if("undefined"==typeof document)return null;var e=document.getElementById(A);return e||((e=document.createElement("style")).id=A,document.head.appendChild(e)),e}},{key:"applyDashCaptionStyles_",value:function(){if(this.customReady_){var e;try{e="function"==typeof this.getValues&&this.getValues()||{}}catch(e){return}var n=this.styleEl_(),t=this.player_&&this.player_.el();if(n&&t){var r=[];(e.color&&e.color!==L||e.textOpacity&&e.textOpacity!==R)&&r.push("color: "+G(e.color||L,z(e.textOpacity,1))+" !important");var i=function(e){switch(e){case"dropshadow":return"2px 2px 3px ".concat(q,", 2px 2px 4px ").concat(q,", 2px 2px 5px ").concat(q);case"raised":return"1px 1px ".concat(q,", 2px 2px ").concat(q,", 3px 3px ").concat(q);case"depressed":return"1px 1px ".concat(H,", 0 1px ").concat(H,", -1px -1px ").concat(q,", 0 -1px ").concat(q);case"uniform":return"0 0 4px ".concat(q,", 0 0 4px ").concat(q,", 0 0 4px ").concat(q,", 0 0 4px ").concat(q);default:return""}}(e.edgeStyle);i&&r.push("text-shadow: "+i+" !important"),"small-caps"===e.fontFamily?(r.push("font-family: "+F[U]+" !important"),r.push("font-variant: small-caps !important")):e.fontFamily&&e.fontFamily!==U&&F[e.fontFamily]?(r.push("font-family: "+F[e.fontFamily]+" !important"),r.push("font-variant: normal !important")):r.push("font-variant: normal !important");var o=this.selectedMultiplier_(),l="function"==typeof this.player_.currentHeight&&this.player_.currentHeight()||t.offsetHeight||0;if(1!==o&&l){var a=Math.round(.05*l*o*100)/100;r.push("font-size: "+a+"px !important"),r.push("line-height: normal !important")}var u=e.backgroundColor&&e.backgroundColor!==B||e.backgroundOpacity&&e.backgroundOpacity!==M?"background-color: "+G(e.backgroundColor||B,z(e.backgroundOpacity,1))+" !important":"",s=e.windowColor&&e.windowColor!==N||e.windowOpacity&&e.windowOpacity!==V?"background-color: "+G(e.windowColor||N,z(e.windowOpacity,0))+" !important":"",c=[];r.length&&c.push(".vjs-text-track-display-ttml div,.vjs-text-track-display-ttml span,.vjs-text-track-display-ttml p{"+r.join(";")+"}"),s&&c.push(".vjs-text-track-display-ttml p{"+s+"}"),u&&c.push(".vjs-text-track-display-ttml span{"+u+"}"),n.textContent=c.join("")}}}},{key:"setDefaults",value:function(){if(T(r,"setDefaults",this,3)([]),this.applyDashCaptionStyles_(),"function"==typeof Event)for(var e=this.$$("select"),n=0;n<e.length;n++)e[n].dispatchEvent(new Event("change",{bubbles:!0}))}},{key:"handleLanguagechange",value:function(){T(r,"handleLanguagechange",this,3)([]),this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.applyDashCaptionStyles_()}},{key:"close",value:function(){var e=this.opened_;T(r,"close",this,3)([]),e&&this.focusCaptionsButton_()}},{key:"focusCaptionsButton_",value:function(){var e=this.player_&&this.player_.controlBar;if(e){var n=e.getChild("SubsCapsButton")||e.getChild("CaptionsButton")||e.getChild("SubtitlesButton");n&&"function"==typeof n.focus&&n.focus()}}}]),r}(),r.registerComponent("TextTrackSettings",W)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var Y=r.getComponent("SubsCapsButton"),$=null;Y?($=function(){a(r,Y);var e,n,t=(e=r,n=K(),function(){var t,r=s(e);if(n){var i=s(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return u(this,t)});function r(){return i(this,r),t.apply(this,arguments)}return o(r,[{key:"pressButton",value:function(){!function(e,n,t,r){var i=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof i?function(e){return i.apply(t,e)}:i}(r,"pressButton",this,3)([]),this.buttonPressed_&&this.focusFirstVisibleItem_()}},{key:"focusFirstVisibleItem_",value:function(){if(this.menu&&this.menu.el_&&this.menu.el_.contains(document.activeElement)){var e=this.menu.children().slice();e.length&&e[0].hasClass("vjs-menu-title")&&e.shift();for(var n=0;n<e.length&&e[n].hasClass("vjs-texttrack-settings");)n++;n>0&&n<e.length&&this.menu.focus(n)}}}]),r}(),r.registerComponent("SubsCapsButton",$)):console.warn("[vlp] CustomSubsCapsButton: video.js SubsCapsButton is not registered; skipping override.");var J=function(e){return new Promise((function(n,t){if(X(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}}))},X=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},Q=function(e,n,t){var r=m.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var i=parseFloat(n)/100;r.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Z=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ee=function(){var e=n(t.mark((function e(n){var i,o,l,a,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=m.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,Promise.resolve().then((function(){return require("./index-774736bd.js")})).then((function(e){return e.index}));case 4:return a=e.sent,e.prev=5,e.next=8,J("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(r),e.finish(13);case 16:(u=r.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==g.detectBrowser()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(n){return e.apply(this,arguments)}}(),ne=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,i,o,l,a,u=this.el(),s=r.dom.getPointerPosition(u,n).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}}))};var te=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),J("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("@viewlift/comscore/index.js").then((function(e){c.comscoreInstanceManager.set(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then((function(e){r.getPlugin("eme")||r.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(r),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./index-de9db53d.js")}));case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./videojs-dash5.es-0f92604f.js")}));case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),ue=Object.freeze({__proto__:null,importChromecast:function(){Promise.resolve().then((function(){return require("./index-774736bd.js")})).then((function(e){return e.index})).then((function(e){J("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(r)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){Promise.resolve().then((function(){return require("./index-f3365b73.js")})).then((function(e){return e.index})).then((function(e){e.default(r)}))},loadAdsLibrary:te,loadEMELibrary:ie,loadMuxPlugin:oe,loadDvrSeekbar:le,loadContribDash:ae,loadComscorePlugin:re});function se(e){return ce.apply(this,arguments)}function ce(){return(ce=n(t.mark((function e(n){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(null==n?void 0:n.airplay)||!1,e.next=3,te();case 3:r&&"Safari"==g.detectBrowser()&&Promise.resolve().then((function(){return ue})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e){return ve.apply(this,arguments)}function ve(){return(ve=n(t.mark((function e(n){var r,i,o,l,a,u,s,c,d,v;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=m.getPlayer(n.playerId),e.next=3,re();case 3:v.comscore({publisherId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.publishedId,endpoint:null==n||null===(i=n.comscore)||void 0===i?void 0:i.endpoint,applicationName:(null==n||null===(o=n.comscore)||void 0===o?void 0:o.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e,n){return pe.apply(this,arguments)}function pe(){return(pe=n(t.mark((function e(n,r){var i,o,l,a,u,s,c,d,v,f,p,m,h,y;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==r?void 0:r.contentType)||"video",f=null==r||null===(i=r[v])||void 0===i?void 0:i.drmEnabled,null==r||null===(o=r[v])||void 0===o||null===(l=o.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==r||null===(a=r[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==g.detectBrowser()?ie():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?ae():ie():"Safari"!=g.detectBrowser()&&p?ae():null,m?de(n):null,h?oe():null,ee(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}}),e,null,[[7,12]])})))).apply(this,arguments)}function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ge(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var he=new Set,ye=null,be=function(e,n,t,r){var i,o,l,a,u,s,d,v,f={},p=(null==e?void 0:e.contentType)||"video";f["c3.cm.id"]=(null===(i=e[p])||void 0===i?void 0:i.id)||"Null",f["c3.cm.contentType"]=De(e),f[null==t||null===(o=t.Constants)||void 0===o?void 0:o.IS_LIVE]=!(null==e||!e.linearchannel),f[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc();var m=(null===(a=b.playerConfigManager.getConfig())||void 0===a?void 0:a.userId)||c.getUserId();f[null==t||null===(u=t.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===m?"NULL":m,f["c3.cm.categoryType"]=Ce(e),f["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),f.DRMEnabled=(null===(s=e[p])||void 0===s?void 0:s.drmEnabled)||"None",f.DAIStream=null!==(d=e[p])&&void 0!==d&&null!==(v=d.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",f[t.Constants.DEFAULT_RESOURCE]="AKAMAI",f["c3.cm.brand"]="NULL",f.CDVREnabled=Ee(e),f["c3.cm.genreList"]=we(e),f["c3.cm.genre"]=ke(e),f["c3.cm.channel"]=Se(e,r);var g=Pe(c.getCurrentSeries(),e);return f=ge(ge({},f),g)},ke=function(e){var n,t,r,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},we=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map((function(e){return null==e?void 0:e.title})).join(", ")||"Null"},Se=function(e,n){var t,r,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(r=((null==e||null===(t=e[i])||void 0===t?void 0:t.channels)||[]).find((function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)})))||void 0===r?void 0:r.title)||"NULL"},Ce=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},Ee=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},Te=function(e,n){var t,r,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var o=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[o])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},De=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Oe,Pe=function(e,n){var t,r,i,o,l,a={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return a;var u=c.getSeasonNumber(),s=c.getEpisodeNumber();return a["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(r=t.series)||void 0===r?void 0:r.title)||"Null",a["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",a["c3.cm.showTitle"]=(null==e||null===(i=e[u-1])||void 0===i||null===(o=i.episodes)||void 0===o||null===(l=o[s-1])||void 0===l?void 0:l.title)||"Null",a["c3.cm.episodeNumber"]=(null==s?void 0:s.toString())||"Null",a},xe=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},je=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Ie=function(){var e=n(t.mark((function e(n,r){var i,o,l,a,u,s,d,v,f,p,g,h;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==r?void 0:r.convivaConfig)||{},o=i.trackConvivaPlayerEvent,l=i.paymentHandler,a=i.tveProvider,u=i.enable,s=i.appName,v=(d=r||{}).token,f=d.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(p=m.getPlayer(n),"function"==typeof(g=o)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,g("getConvivaObject");case 10:if(h=e.sent){e.next=13;break}return e.abrupt("return");case 13:p.ready((function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=xe(t.keySystem);g("contentInfo",{DRMEnabled:r})}else g("contentInfo",{DRMEnabled:"None"})})),n||g("contentInfo",{DRMEnabled:"None"})})),p.on("loadstart",(function(){var e,n;ye&&ye!==p.currentSrc()&&g("playbackEnded"),g("setPlayer",p),he.clear(),ye=p.currentSrc();var t=je(p.currentType()),i=c.getCurrentVideo(),o=be(i,p,h,f);o[null==h||null===(e=h.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",o[null==h||null===(n=h.Constants)||void 0===n?void 0:n.ASSET_NAME]=Te(i,r),o.authToken=v||"NULL",o.streamType=t,o.D2CType=l||"NONE",o.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",o["c3.cm.affiliate"]=a||"NULL",_e.setData(o),g("contentInfo",o)})),p.on("loadedmetadata",(function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})})),p.on("play",(function(){he.has(p.currentSrc())||(he.add(p.currentSrc()),g("playbackStarted",null))})),p.on("ended",(function(){he.has(p.currentSrc())&&he.delete(p.currentSrc()),g("playbackEnded")})),p.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})})),p.on("dispose",(function(){null==he||he.clear(),g("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),_e=(Oe={},{setData:function(e){Oe=ge(ge({},Oe),e)},getData:function(){return Oe}}),Ae=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-ace14d43.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-1bbb2916.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-a64932ac.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-96e07080.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-5747db33.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t?Promise.resolve().then((function(){return require("./skin-87233809.js")})).then((function(t){t.initialiseSkin(e,n)})):"news"==t?Promise.resolve().then((function(){return require("./skin-12ea8f57.js")})).then((function(t){t.initialiseSkin(e,n)})):"news_live"==t?Promise.resolve().then((function(){return require("./skin-b0f1d65d.js")})).then((function(t){t.initialiseSkin(e,n)})):"mini"==t?Promise.resolve().then((function(){return require("./skin-59aa968d.js")})).then((function(t){t.initialiseSkin(e,n)})):"CN_NEWS"==t&&Promise.resolve().then((function(){return require("./skin-0f56c90a.js")})).then((function(t){t.initialiseSkin(e,n)}))};function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}var Re,Be=["offsetSeconds","offsetLabel"],Me=function(n){if(!n||"object"!==y(n))return n;if(!Be.some((function(e){return e in n})))return n;var t=function(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Le(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}({},n);return Be.forEach((function(e){return delete t[e]})),t},Ne=function(e){try{if(!e)return null;e.refreshAnchor();var n="function"==typeof e.anchorInfo?e.anchorInfo():{};if("vod"===n.source)return{live:!1,source:"vod"};var t=("function"==typeof e.displayBounds?e.displayBounds():e.windowBounds())||{},r=t.start,i=t.end;if(!(Number.isFinite(r)&&i>r))return null;var o=null!=n.anchorPdtSec&&null!=n.anchorPlayerT;return{live:!0,source:n.source,windowEnd:i,anchorT:o?n.anchorPlayerT:null,anchorUtc:o?n.anchorPdtSec:null,nowSec:Date.now()/1e3}}catch(e){return null}},Ve=function(e,n){try{return Ue(e,n)}catch(e){return null}},Ue=function(e,n){if(!e)return null;var t=c.chapterUtcBounds(n).start;if(!Number.isFinite(t))return null;if(!e.live)return{seconds:t,live:!1};var r=null!=e.anchorUtc?e.anchorT+(t-e.anchorUtc):e.windowEnd-(e.nowSec-t);return Number.isFinite(r)?{seconds:Math.max(0,e.windowEnd-r),live:!0}:null},qe=function(e){if(!e||!Number.isFinite(e.seconds))return"";var n=r.formatTime(e.seconds,e.seconds);return e.live?"-".concat(n):n},He=(Re=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n.map(Me):[];return Re.set(e,t),t},get:function(e){return Re.get(e)||[]},remove:function(e){Re.delete(e)}}),Fe="chapter-change",ze="chapter-click",Ge="chapters-updated";function We(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=m.getPlayer(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function Ke(e){var n=m.getPlayer(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(Fe,e)},onChapterClick:function(e){return t(ze,e)},onChaptersUpdated:function(e){return t(Ge,e)}}}var Ye="vjs-chapter-marker",$e="vjs-chapter-preview",Je=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function Xe(e,n){var t=n.store,r=n.mapper,i=n.chaptersConfig,o=void 0===i?{}:i,l=n.seek,a=m.getPlayer(e);if(!a)return{render:function(){},reposition:function(){},destroy:function(){}};var u=new Map,s=null,c=-1,d=null,v=function(){return!0===(null==o?void 0:o.enable)},f=function(e){try{return r.chapterStartPercent(e)}catch(e){return null}},p=function(n,t,i){var o=m.getPlayer(e),l=Je(o);if(l){var a=function(e){if(s&&s.isConnected)return s;(s=document.createElement("div")).className=$e;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",s.appendChild(n),s.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",s.appendChild(r),s._time=n,s._label=t,s._pointer=r,e.appendChild(s),s}(l);a._time.textContent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ne(r);return qe(Ve(n,e))}(n,i),a._label.textContent=(null==n?void 0:n.label)||"",a.classList.add("vjs-chapter-preview--visible");var u="function"==typeof(null==o?void 0:o.el)?o.el():null;u&&u.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var i="function"==typeof(null==t?void 0:t.el)?t.el():null;if(i){var o=i.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=o.left+8+u,d=o.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(a,l,o,t)}},g=function(){d=null,s&&s.classList.remove("vjs-chapter-preview--visible");var n=m.getPlayer(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},h=function(e){if(d&&s&&s.classList.contains("vjs-chapter-preview--visible")){var n=f(d);null!=n?p(d,n,e):g()}},y=function(n){var r=document.createElement("div");r.className=Ye,r.dataset.segmentId=String(n.segmentId);var i=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=m.parseSvgString(n);r&&t.appendChild(r)}else{var i=document.createElement("img");i.src=n,i.alt="",t.appendChild(i)}return t}(n);i&&r.appendChild(i);var o=function(r){if("touchstart"===r.type)r.preventDefault();else if("mousedown"===r.type&&0!==r.button)return;r.stopPropagation(),"function"==typeof l&&l(n.segmentId);var i=t.get(e).indexOf(n);We(e,ze,{chapter:n,index:i,position:i>=0?i+1:void 0})};return r.addEventListener("mousedown",o),r.addEventListener("touchstart",o),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),null!=n&&n.label&&r.setAttribute("aria-label",String(n.label)),r.addEventListener("keydown",(function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||e.repeat||(e.preventDefault(),o(e))})),r.addEventListener("mouseenter",(function(){var e=f(n);null!=e&&(d=n,p(n,e))})),r.addEventListener("mouseleave",g),r},b=function(n){v()&&0!==u.size&&(n||r.refreshAnchor(),t.get(e).forEach((function(e){var n=u.get(String(e.segmentId));if(n){var t=f(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}})))},k=0,w=function(n){u.forEach((function(e){return e.classList.remove("".concat(Ye,"--active"))}));var r=t.get(e),i=n>=0?r[n]:null;if(i){var o=u.get(String(i.segmentId));o&&o.classList.add("".concat(Ye,"--active"))}},S=function(){var n=m.getPlayer(e);if(n){var i=t.get(e),o=r.playerTimeToChapterIndex(n.currentTime()||0,i);-1===o&&Date.now()<k||o!==c&&(c=o,w(o),We(e,Fe,{chapter:o>=0?i[o]:null}))}},C=m.throttle((function(){var e=Ne(r);b(!0),h(e),S()}),1e3),E=function(){var e=Ne(r);b(!0),h(e),S()},T=function(){Ne(r),b(!0)};a.on("timeupdate",C),a.on("seeked",E);var D=!1;try{a.liveTracker&&"function"==typeof a.liveTracker.on&&(a.liveTracker.on("liveedgechange",T),D=!0)}catch(e){}var O=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(O=setInterval((function(){var e=Ne(r);b(!0),h(e)}),500));return{render:function(){var n=m.getPlayer(e),i=Je(n);i&&(g(),i.querySelectorAll(".".concat(Ye)).forEach((function(e){return e.remove()})),u.clear(),v()&&(r.refreshAnchor(),t.get(e).forEach((function(e){var n=y(e);i.appendChild(n),u.set(String(e.segmentId),n)})),b(!0),w(c),S()))},reposition:b,destroy:function(){try{a.off("timeupdate",C),a.off("seeked",E),D&&a.liveTracker.off("liveedgechange",T)}catch(e){}O&&(clearInterval(O),O=null);var n=Je(m.getPlayer(e));n&&n.querySelectorAll(".".concat(Ye,", .").concat($e)).forEach((function(e){return e.remove()})),u.clear(),s=null,d=null},setActiveBySegment:function(n){var r=t.get(e),i=r.findIndex((function(e){return String(e.segmentId)===String(n)}));i<0||(k=Date.now()+1500,i!==c&&(c=i,w(i),We(e,Fe,{chapter:r[i]})))}}}function Qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ze(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var en=new Map,nn=function(e){var n=e.live,t=e.dvr;return function(e){return Array.isArray(e)&&e.some((function(e){return e&&e.eventStartUtc}))}(e.chapters)||n&&t?"livedvr":"vod"},tn=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},rn=function(e){var n=en.get(e);if(n)return n;n={mapper:c.createTimelineMapper(e,{timeMode:"vod"}),markers:null,chaptersConfig:{enable:!0},timeMode:"vod",live:!1,dvr:!1,disposed:!1},en.set(e,n);var t=m.getPlayer(e);return t&&(t.on("dispose",(function(){return cn(e)})),t.one("loadeddata",(function(){n.disposed||on(e)}))),n},on=function(e){var n=en.get(e),t=function(e){var n=en.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=m.getPlayer(e);return t&&tn(t)?(n.markers=Xe(e,{store:He,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return sn(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function ln(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=rn(e);He.set(e,n);var r=nn({live:t.live,dvr:t.dvr,chapters:n});return r!==t.timeMode&&(t.timeMode=r,t.mapper=c.createTimelineMapper(e,{timeMode:r}),t.markers&&(t.markers.destroy(),t.markers=null)),on(e),We(e,Ge,{chapters:He.get(e)}),!0}function an(e){var n=He.get(e),t=en.get(e);if(!t||!n.length)return n;var r=Ne(t.mapper);try{return n.map((function(e){var n=Ve(r,e);return Ze(Ze({},e),{},{offsetSeconds:n?n.seconds:null,offsetLabel:qe(n)})}))}catch(e){return n}}function un(e){He.set(e,[]);var n=en.get(e);return null!=n&&n.markers&&n.markers.render(),We(e,Ge,{chapters:[]}),!0}function sn(e,n){var t,r,i=m.getPlayer(e),o=rn(e);if(!i)return!1;var l=He.get(e).find((function(e){return e.segmentId===n}));if(!l)return!1;o.mapper.refreshAnchor();var a=o.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=o.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),i.currentTime(a),null===(t=o.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function cn(e){var n=en.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),en.delete(e),He.remove(e)}function dn(e){var n,t,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=b.playerConfigManager.getConfig();(null!=o&&null!==(n=o.chaptersConfig)&&void 0!==n&&n.enable||null!=o&&null!==(t=o.chapters)&&void 0!==t&&t.length)&&(function(e,n){var t,r=null===(t=m.getPlayer(e))||void 0===t?void 0:t.el();if(r&&n){var i=function(e,n){null!=n&&""!==n&&r.style.setProperty(e,n)};i("--vl-chapter-color",n.markerColor),i("--vl-chapter-active",n.markerActiveColor),i("--vl-chapter-hover",n.markerHoverColor),i("--vl-chapter-size",null!=n.markerSize?"".concat(n.markerSize,"px"):null),i("--vl-chapter-opacity",null!=n.markerOpacity?String(n.markerOpacity):null),i("--vl-chapter-tooltip",n.tooltipColor)}}(e,null==o||null===(r=o.chaptersConfig)||void 0===r?void 0:r.style),function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,i=n.live,o=void 0!==i&&i,l=n.dvr,a=void 0!==l&&l;n.res;var u=n.chaptersConfig,s=void 0===u?{}:u,d=m.getPlayer(e);if(!d)return!1;Array.isArray(r)&&He.set(e,r);var v=nn({live:o,dvr:a,chapters:r}),f=en.get(e);null!=f&&f.markers&&f.markers.destroy();var p={mapper:c.createTimelineMapper(e,{timeMode:v}),markers:null,chaptersConfig:s||{},timeMode:v,live:o,dvr:a,disposed:!1};en.set(e,p);var g=function(){p.disposed||on(e)};d.one("loadeddata",g),tn(d)&&g(),d.on("dispose",(function(){return cn(e)}))}(e,{chapters:(null==o?void 0:o.chapters)||[],live:(null==i?void 0:i.liveVideo)||!1,dvr:(null==i?void 0:i.isDvrEnabled)||!1,res:null==i?void 0:i.res,chaptersConfig:(null==o?void 0:o.chaptersConfig)||{}}))}var vn=!1,fn=function(e,n){var t,r,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!vn){var o=pn(e,"videoAssets","secondaryVideoAssets"),l=c.getSource(o,n);return l&&c.loadVideo(n,l),vn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function pn(e,n,t){if(Array.isArray(e))return e.map((function(e){return pn(e,n,t)}));if(null!==e&&"object"===y(e)){var r={};return Object.keys(e).forEach((function(i){i===n&&void 0!==e[t]?r[i]=e[t]:i===t&&void 0!==e[n]?r[i]=e[n]:r[i]=pn(e[i],n,t)})),r}return e}function mn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return gn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?gn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function gn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function yn(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):hn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var bn,kn=function(e,r,i,o){var l,a,u,s,d,f=o.res,p=o.sres,h=m.getPlayer(e),b=(null==f?void 0:f.contentType)||"video",w=(null==f||null===(l=f[b])||void 0===l?void 0:l.drmEnabled)||!1,S=!(null==f||null===(a=f[b])||void 0===a||null===(u=a.streamingInfo)||void 0===u||!u.isLiveStream)||"linearchannel"===b,C=(null==f||null===(s=f[b])||void 0===s||null===(d=s.liveDetails)||void 0===d?void 0:d.isDvrEnabled)||!1;if(c.setCurrentVideo(f),c.videoReplayTracker.set(f),h){var E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500;return new Promise((function(n){var t=h.currentTime();setTimeout((function(){if(h.isDisposed())return n(!1);n(h.currentTime()-t>.5)}),e)}))};k.initPlayerControlEvents(e,{liveVideo:S,isDvrEnabled:C}),h.on("loadstart",(function(){S?i.resolve({status:!0,msg:"Video Loaded",response:f}):i.resolve(yn({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))})),h.on("loadeddata",(function(){var n,t,i,o,l=v.getCaptions(e);if(null==l||l.map((function(n){return v.disableCaptions(e,n.id)})),C&&"Safari"===g.detectBrowser())try{var a;null==h||null===(a=h.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==h||!h.muted())&&Q(e,sessionStorage.getItem("volume")||"100"),k.resyncControlState(e);var u=c.getCurrentVideo();if(c.initialiseComscoreStreamingTracking(r),c.clearError(),null!=r&&null!==(n=r.watchHistory)&&void 0!==n&&n.isExternal){var s=yn(yn({},r),f);c.initiateWatchHistoryHandlingExternal(h,s)}else if(null!=r&&r.watchHistory&&null!=r&&null!==(t=r.watchHistory)&&void 0!==t&&t.enable&&(!r.isAnonymousUser||null!=r&&null!==(i=r.watchHistory)&&void 0!==i&&i.saveOffline)){var d,p,m=yn(yn({},r),f);c.initiateWatchHistoryHandling(e,m,null==u||null===(d=u.video)||void 0===d||null===(p=d.gist)||void 0===p?void 0:p.id)}if(null!=r&&null!==(o=r.analytics)&&void 0!==o&&o.muxKey&&null!=h&&h.mux){var y,b,w,S,E,T,D=(null===(y=c.getCurrentVideo())||void 0===y?void 0:y.video)||(null==f?void 0:f.video),O=null==D?void 0:D.gist,P={env_key:null==r||null===(b=r.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==O?void 0:O.id,video_title:null==O?void 0:O.title,video_series:null==D||null===(S=D.series)||void 0===S?void 0:S.title,video_stream_type:null!=D&&null!==(E=D.streamingInfo)&&void 0!==E&&E.isLiveStream?"live":"video",viewer_user_id:null==r||null===(T=r.analytics)||void 0===T?void 0:T.userId};h.mux({debug:!1,data:P})}})),h.textTracks().on("change",(function(n){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];v.syncTtmlDisplay(e),h.trigger("subtitlechanged",t)})),h.tech_.on("retryplaylist",(function(){S&&fn(f,e)}));var T=0,D=null,O=!1,P=null,x=function(){clearTimeout(D),D=null,T=0,O=!1},j=function r(){D=setTimeout(n(t.mark((function n(){var o,l,a,u,s,d;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return D=null,n.next=3,E();case 3:if(o=n.sent,O){n.next=6;break}return n.abrupt("return");case 6:if(!(!(null!=h&&h.paused()||null!=h&&h.ended()||null!=h&&h.seeking())&&(null==h?void 0:h.readyState())>=3||o)){n.next=9;break}return x(),n.abrupt("return");case 9:if(!(T>=3)){n.next=13;break}return x(),fn(f,e)||(c.handleError(e,P||"Some error occured"),i.reject({status:!1,msg:P||"Some error occured",response:f})),n.abrupt("return");case 13:T++,console.log("Stream not progressing. Retry attempt ".concat(T,"/").concat(3,"...")),null==h||h.error(null);try{a=null==h?void 0:h.currentTime(),u=null==h||null===(l=h.liveTracker)||void 0===l?void 0:l.seekableEnd(),(s=a+3)<u?null==h||h.currentTime(s):null==h||null===(d=h.liveTracker)||void 0===d||d.seekToLiveEdge(),null==h||h.play()}catch(e){console.log("Cannot seek to Live Edge",e)}r();case 18:case"end":return n.stop()}}),n)}))),1e3*Math.pow(2,T))};h.one("dispose",x),h.on("error",(function(){var n,t,r,o;3===(null==h||null===(n=h.error())||void 0===n?void 0:n.code)&&S?O||(console.log("Retrying to play the live stream due to media decode error"),O=!0,P=null===(t=h.error())||void 0===t?void 0:t.message,j()):(x(),console.log("ERROR",h.error(),h.error().code),4===h.error().code&&S?fn(f,e):(c.handleError(e,(null==h||null===(r=h.error())||void 0===r?void 0:r.message)||"Some error occured"),i.reject({status:!1,msg:(null==h||null===(o=h.error())||void 0===o?void 0:o.message)||"Some error occured",response:f})))})),h.one("play",(function(){var e,n,t,i,o;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(t=n.appcmsMain)||void 0===t||null===(i=t.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=r&&null!==(o=r.series)&&void 0!==o&&o.enable){var l,a,u,s=null===(l=c.getCurrentVideo())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=c.getSeriesWatchMap(),v=(null==d?void 0:d.get(s))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&c.seekToResumeTime(h,f)}else{var m,g,y,b,k,w,S,C=null!==(m=null==r?void 0:r.watchHistoryResumeTime)&&void 0!==m?m:null==r||null===(g=r.watchHistory)||void 0===g?void 0:g.watchedTime,E=null!==(y=null!==(b=null==r?void 0:r.watchedPercentage)&&void 0!==b?b:null==r||null===(k=r.watchHistory)||void 0===k?void 0:k.watchedPercentage)&&void 0!==y?y:0,T=null!==(w=null==r||null===(S=r.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==w?w:95;C&&E<T&&c.seekToResumeTime(h,C)}if(null!=h&&h.dvrSeekbar)try{h.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}})),h.on("volumechange",(function(){var e=100*h.volume().toFixed(2);h.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),h.on("chromecastDisconnected",(function(){if(S){h.currentSource();for(var n=h.textTracks(),t=n.length-1;t>=0;t--)h.removeRemoteTextTrack(n[t])}var r=h.textTracks(),i=function(){return v.removeDuplicateCaptions(e)};i(),r.addEventListener("addtrack",i),setTimeout((function(){return r.removeEventListener("addtrack",i)}),15e3)})),h.one("loadeddata",(function(){var e,n=(null==h||null===(e=h.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort((function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0})),"object"==y(h.dash)){var t,r,i,o=null==h||null===(t=h.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==o?void 0:o.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),a=mn(n);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],d=mn(n);try{for(d.s();!(s=d.n()).done;){var v,f,p,m=s.value;("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!w))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1")?h.audioTracks().removeTrack(m):c.push(m)}}catch(e){d.e(e)}finally{d.f()}for(var b=c.find((function(e){return"main"===e.kind})),k=b||c.find((function(e){return e.enabled}))||c[0],S=0,C=c;S<C.length;S++){var E=C[S];E.enabled=E===k}}}))}},wn=(null===(bn=r.time)||void 0===bn?void 0:bn.createTimeRanges)||r.createTimeRanges;function Sn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.scheduleStartDate,r=n.startOverTime;if(e&&(t||r)){var i,o=t?(i=t)>1e12?i/1e3:i:null,l=r>0?r:null,a=e.seekable.bind(e);e.seekable=function(){var e=a();if(!e||!e.length)return e;var n=e.start(0),t=e.end(e.length-1),r=Date.now()/1e3,i=1/0;if(null!=o&&(i=Math.min(i,r-o)),null!=l&&(i=Math.min(i,l)),!isFinite(i))return e;var u=i<=0?t:Math.max(n,t-i);return wn(u,t)};e.on("seeking",(function(){var n=e.seekable();if(n&&n.length){var t=n.start(0);e.currentTime()<t-.5&&e.currentTime(t)}}))}}function Cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function En(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Cn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var Tn="urn:x-cast:com.viewlift.player.caf",Dn={eng:"en",spa:"es",esp:"es",cast:"es",fre:"fr",fra:"fr",ger:"de",deu:"de",por:"pt",ita:"it",dut:"nl",nld:"nl",chi:"zh",zho:"zh",cmn:"zh",yue:"zh",jpn:"ja",kor:"ko",ara:"ar",hin:"hi",rus:"ru",heb:"he",iw:"he",ind:"id",in:"id",fil:"tl",tgl:"tl",vie:"vi",tha:"th",tur:"tr",pol:"pl",swe:"sv",nor:"no",nob:"no",nb:"no",dan:"da",fin:"fi",gre:"el",ell:"el",cze:"cs",ces:"cs",ukr:"uk",rum:"ro",ron:"ro",hun:"hu",ben:"bn",tam:"ta",tel:"te",mal:"ml",kan:"kn",mar:"mr",pan:"pa",guj:"gu",urd:"ur"},On=["und","mul","zxx"];function Pn(){try{return"true"===new URLSearchParams(window.location.search).get("castdebug")}catch(e){return!1}}function xn(){var e;Pn()&&(e=console).log.apply(e,arguments)}function jn(){var e;Pn()&&(e=console).warn.apply(e,arguments)}function In(e){if(!e)return"";var n=String(e).trim().toLowerCase().replace(/_/g,"-").split("@")[0].split(".")[0].split("-").filter(Boolean),t=S(n),r=t[0],i=t.slice(1);return r?[Dn[r]||r].concat(w(i)).join("-"):""}function _n(e){return In(e).split("-")[0]}function An(e){var n=_n(e);return!!n&&!On.includes(n)}function Ln(e,n){return An(e)&&An(n)&&_n(e)===_n(n)}function Rn(e){return e?String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase():""}function Bn(e,n){return!!e&&!!n&&Rn(e)===Rn(n)}function Mn(e){return(null==e?void 0:e.language)||(null==e?void 0:e.lang)||""}function Nn(e){return e?{language:Mn(e)||void 0,label:e.label||void 0,roles:["captions"===e.kind?"caption":"subtitle"],forced:!!e.forced}:null}function Vn(e){return e?{language:Mn(e)||void 0,label:e.label||void 0}:null}function Un(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(!n||!e.length)return null;for(var t=0,r=[function(e){return t=Mn(e),r=n.language,An(t)&&An(r)&&In(t)===In(r);var t,r},function(e){return Ln(Mn(e),n.language)},function(e){return Bn(e.label,n.label)}];t<r.length;t++){var i=r[t],o=e.filter(i);if(1===o.length)return o[0];if(o.length>1)return qn(o,n)}return null}function qn(e,n){var t=n.roles||[];return e.find((function(e){var n;return null===(n=e.roles)||void 0===n?void 0:n.some((function(e){return t.includes(e)}))}))||e[0]}var Hn={textTracks:[],audioTracks:[],activeCaption:null,activeAudio:null};function Fn(e,n){if(!n)return null;var t=Un(e,n);return null!=(null==t?void 0:t.id)?{id:t.id}:n}function zn(e,n,t){if(!n)return!t;if(!t)return!1;var r=Un(e,t);return r&&null!=n.id?r.id===n.id:!!Ln(Mn(n),t.language)&&(!n.label||!t.label||Bn(n.label,t.label))}function Gn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=function(){var e,n,t,r,i,o,l=null===(e=window)||void 0===e||null===(n=e.cast)||void 0===n?void 0:n.framework,a=null==l||null===(t=l.CastContext)||void 0===t||null===(r=t.getInstance)||void 0===r?void 0:r.call(t),u=null==a||null===(i=a.getCurrentSession)||void 0===i?void 0:i.call(a);return u&&"function"==typeof u.sendMessage?null!=l&&l.CastState&&(null===(o=a.getCastState)||void 0===o?void 0:o.call(a))!==l.CastState.CONNECTED?null:u:null}();if(t){var r=En(En({type:"COMMAND",source:"sender",command:e},n),{},{ts:Date.now()});xn("[Cast] ->",e,n);try{Promise.resolve(t.sendMessage(Tn,r)).catch((function(n){return jn("[Cast] command failed",e,(null==n?void 0:n.message)||n)}))}catch(n){jn("[Cast] command failed",e,(null==n?void 0:n.message)||n)}}}var Wn=function(){return Gn("play")},Kn=function(){return Gn("pause")},Yn=function(e){return Gn("seek",{currentTime:e})},$n=function(e){return Gn("setPlaybackRate",{rate:e})},Jn=function(e,n){return Gn("setVolume",{volume:e,muted:n})},Xn=function(e){zn(Hn.textTracks,Hn.activeCaption,e)||Gn("setCaption",{track:Fn(Hn.textTracks,e)})},Qn=function(e){e&&(zn(Hn.audioTracks,Hn.activeAudio,e)||Gn("setAudio",{track:Fn(Hn.audioTracks,e)}))};function Zn(e){return e?e.tracks_||Array.from(e):[]}function et(e){var n;return Zn(null===(n=e.textTracks)||void 0===n?void 0:n.call(e)).filter((function(e){return"captions"===e.kind||"subtitles"===e.kind}))}function nt(e){return"function"==typeof e.audioTracks?Zn(e.audioTracks()):[]}function tt(e){return et(e).find((function(e){return"showing"===e.mode}))||null}function rt(e){return nt(e).find((function(e){return e.enabled}))||null}function it(e,n){var t=et(e),r=n?Un(t,n):null;n&&!r||t.forEach((function(e){e.mode=e===r?"showing":"disabled"}))}var ot=null;var lt=null;function at(e,n){if("STATE"===n.type)return Hn.textTracks=n.textTracks||[],Hn.audioTracks=n.audioTracks||[],Hn.activeCaption=n.activeCaption||null,Hn.activeAudio=n.activeAudio||null,void function(){if(lt&&(Hn.textTracks.length||Hn.audioTracks.length)){var e=lt,n=e.caption,t=e.audio;lt=null,Xn(n),Qn(t)}}();if("LOG_STATUS"===n.type&&xn("[Cast] <- LOG_STATUS",n.type,n),"EVENT"===n.type)switch(xn("[Cast] <-",n.event,n),n.event){case"CaptionChanged":Hn.activeCaption=n.activeCaption||null,it(e,Hn.activeCaption);break;case"AudioChanged":Hn.activeAudio=n.activeAudio||null,function(e,n){var t=n&&Un(nt(e),n);t&&!t.enabled&&(t.enabled=!0)}(e,Hn.activeAudio);break;case"TracksChanged":Hn.textTracks=[],Hn.audioTracks=[];break;case"TrackUnresolved":jn("[Cast] receiver could not resolve track",n.kind,n.requested)}}var ut=!1;function st(e){!function(e){var n,t,r,i,o,l,a=null===(n=window)||void 0===n||null===(t=n.cast)||void 0===t?void 0:t.framework,u=null==a||null===(r=a.CastContext)||void 0===r||null===(i=r.getInstance)||void 0===i?void 0:i.call(r);if(u){var s=function(n){n&&!n.__vlCastListening&&(n.__vlCastListening=!0,n.addMessageListener(Tn,(function(n,t){try{var r="string"==typeof t?JSON.parse(t):t;"receiver"===(null==r?void 0:r.source)&&at(e,r)}catch(e){jn("[Cast] could not handle receiver message",(null==e?void 0:e.message)||e,t)}})))};s(null===(o=u.getCurrentSession)||void 0===o?void 0:o.call(u)),!ut&&null!=a&&null!==(l=a.CastContextEventType)&&void 0!==l&&l.SESSION_STATE_CHANGED&&(ut=!0,u.addEventListener(a.CastContextEventType.SESSION_STATE_CHANGED,(function(){var e;return s(null===(e=u.getCurrentSession)||void 0===e?void 0:e.call(u))})))}}(e),e.addClass("vl-casting");var n=tt(e);n&&(ot=Nn(n));var t=function(){return it(e,ot)};e.one("loadeddata",(function(){return setTimeout(t,0)})),setTimeout(t,1500),function(e){var n=Nn(tt(e))||ot,t=Vn(rt(e));xn("[Cast] syncing selected tracks",lt={caption:n,audio:t}),Gn("setCaption",{track:Fn(Hn.textTracks,n)}),t&&Gn("setAudio",{track:Fn(Hn.audioTracks,t)})}(e)}function ct(e){var n;if(e&&!e.__vlCastSyncBound){e.__vlCastSyncBound=!0,e.on("chromecastConnected",(function(){return st(e)})),e.on("chromecastDisconnected",(function(){e.removeClass("vl-casting"),Hn.textTracks=[],Hn.audioTracks=[],Hn.activeCaption=null,Hn.activeAudio=null,lt=null}));var t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:150,t=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout((function(){return e.apply(void 0,i)}),n)}}((function(){return Jn(e.volume(),e.muted())}));e.on("play",(function(){return Wn()})),e.on("pause",(function(){return Kn()})),e.on("seeked",(function(){return Yn(e.currentTime())})),e.on("volumechange",t),e.on("ratechange",(function(){return $n(e.playbackRate())})),e.on("texttrackchange",(function(){var n=Nn(tt(e));n&&(ot=n),Xn(n)}));var r="function"==typeof e.audioTracks?e.audioTracks():null;null==r||null===(n=r.addEventListener)||void 0===n||n.call(r,"change",(function(){return Qn(Vn(rt(e)))}))}}function dt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function vt(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function ft(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return pt(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?pt(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function pt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var mt={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0},gt=function(e){var n;if(e){var t=function(){var n,t="function"==typeof e.currentWidth&&e.currentWidth()||(null===(n=e.el())||void 0===n?void 0:n.clientWidth)||0;e.toggleClass("vlp-hide-pip",t<=500&&function(){var n,t=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);if(!t)return!1;for(var r=0;r<t.length;r++){var i,o=null===(i=t[r])||void 0===i?void 0:i.kind;if("captions"===o||"subtitles"===o)return!0}return!1}())};t(),e.on("playerresize",t),e.on("fullscreenchange",t);var r=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);null!=r&&r.addEventListener&&(r.addEventListener("addtrack",t),r.addEventListener("removetrack",t),e.on("dispose",(function(){r.removeEventListener("addtrack",t),r.removeEventListener("removetrack",t)})))}};function ht(e,n,t){var r=b.playerConfigManager.getConfig()||{};c.emitApiErrorEvent(e,{status:t,message:"DRM ".concat(n," request failed")},"playback",{requestKind:n,videoId:null==r?void 0:r.videoId})}function yt(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var i=n[r[t]];if("string"==typeof i)return i;if(null!=i&&i.url)return i.url;if(null!=i&&i.licenseUri)return i.licenseUri}var o=null==e?void 0:e.keySystemOptions;if(Array.isArray(o)){var l,a=ft(o);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function bt(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return yt("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function kt(e,n){n&&!n.__vlDrmDashHooksInstalled&&(n.__vlDrmDashHooksInstalled=!0,"function"==typeof n.addResponseInterceptor&&n.addResponseInterceptor((function(e){try{var n=(null==e?void 0:e.request)||{},t=(null==e?void 0:e.url)||(null==n?void 0:n.url)||"",r=c.classifyRequestKind(t,(null==n?void 0:n.type)||(null==e?void 0:e.type));if(c.isDrmRequestKind(r)){var i=c.extractStatusCode(e,null);c.isHttpOk(i)||ht(t,r,i)}}catch(e){}return Promise.resolve(e)})),"function"==typeof n.registerLicenseRequestFilter&&n.registerLicenseRequestFilter((function(e){try{null!=e&&e.url&&(n.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()})),"function"==typeof n.on&&n.on("public_licenseRequestComplete",(function(t){try{var r,i,o,l;if(null==t||!t.error)return;var a=null!==(r=null==t||null===(i=t.error)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.responseCode)&&void 0!==r?r:c.extractStatusCode(null,t.error);ht((null==t||null===(l=t.data)||void 0===l?void 0:l.url)||n.__vlLastLicenseUrl||bt(e)||"","license",a)}catch(e){}})))}var wt=!1,St=null,Ct=new Set;function Et(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,Ct.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,Ct.delete(e),function(){if(wt&&!(Ct.size>0)){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof St&&e.removeHook("beforeinitialize",St),wt=!1,St=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function Tt(e){if(e){Et(e),function(){if(!wt){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.hook&&(St=function(e,n){null!=e&&e.__vlDrmDashEnabled&&kt(e,n)},wt=!0,e.hook("beforeinitialize",St))}}(),function(e){e&&!e.__vlEmeDrmErrorInstalled&&(e.__vlEmeDrmErrorInstalled=!0,e.on("error",(function(){try{var n,t="function"==typeof e.error?e.error():null;if(!t||!c.isDrmError(t))return;if(null!=e&&null!==(n=e.dash)&&void 0!==n&&n.mediaPlayer)return;ht(bt(e),"license",null)}catch(e){}})))}(e);var n=function(){var n;!function(e){var n,t,r=null==e||null===(n=e.tech_)||void 0===n||null===(t=n.vhs)||void 0===t?void 0:t.xhr;r&&"function"==typeof r.onResponse&&!e.__vlDrmVhsHooksInstalled&&(e.__vlDrmVhsHooksInstalled=!0,r.onResponse((function(e,n,t){try{var r=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(e),i=c.classifyRequestKind(r,null==e?void 0:e.type);if(!c.isDrmRequestKind(i))return;var o=c.extractStatusCode(t,n);c.isHttpOk(o)&&!n||ht(r,i,o)}catch(e){}})))}(e),kt(e,null==e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer)};n(),e.on("xhr-hooks-ready",n),e.on("loadstart",(function(){setTimeout(n,0)}))}}var Dt=function(i,o,l,a){var u,s,d,f,p,h,b,k,w,S,C,E,T,D,O,P,x,j,I,_,A,L,R,B,M,N,V,U,q,H,F,z,G,W,K,Y,$,J,X=o.res,Q=void 0===X?null:X,Z=o.sres,ee=void 0===Z?null:Z,te=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=mt[r]?mt[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),re=te.playerDebug,ie=te.logLevel,oe=te.dashLogLevel;re&&(console.log("[PLAYER DEBUG] config:",l),console.log("[PLAYER DEBUG] entitlement (res):",Q),ee&&console.log("[PLAYER DEBUG] series response (sres):",ee));var le=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(u=Q)||void 0===u?void 0:u.contentType)||"video",ue=m.impolicy16x9(null===(s=Q)||void 0===s||null===(d=s[ae])||void 0===d||null===(f=d.gist)||void 0===f?void 0:f.videoImageUrl)||m.impolicy16x9(null===(p=Q)||void 0===p||null===(h=p[ae])||void 0===h||null===(b=h.gist)||void 0===b||null===(k=b.imageGist)||void 0===k?void 0:k.r16x9),se=(null===(w=Q)||void 0===w||null===(S=w[ae])||void 0===S||null===(C=S.liveDetails)||void 0===C?void 0:C.isDvrEnabled)||!1,ce=!(null===(E=Q)||void 0===E||null===(T=E[ae])||void 0===T||null===(D=T.streamingInfo)||void 0===D||!D.isLiveStream)||"linearchannel"===ae,de=(null===(O=Q)||void 0===O||null===(P=O.ads)||void 0===P||null===(x=P.preRoll)||void 0===x||null===(j=x.adTags)||void 0===j||null===(I=j.web)||void 0===I?void 0:I.active)&&(null===(_=Q)||void 0===_||null===(A=_.ads)||void 0===A||null===(L=A.preRoll)||void 0===L||null===(R=L.adTags)||void 0===R||null===(B=R.web)||void 0===B?void 0:B.url);Q=vt(vt({},Q),{},{audioAssetSource:null==l?void 0:l.audioAssetSource});var ve=(null==l||null===(M=l.customData)||void 0===M?void 0:M.ads)||{},pe=(null===(N=Q)||void 0===N||null===(V=N[ae])||void 0===V?void 0:V.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,me=!(null===(U=Q)||void 0===U||null===(q=U[ae])||void 0===q||!q.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),ge=(null==l?void 0:l.latency)||6,he=(null==l?void 0:l.skin_settings)||{},ye=($={enableSmoothSeeking:!0,controls:0!=(null==l?void 0:l.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==l?void 0:l.muted)||!1,autoplay:(null==l?void 0:l.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==he?void 0:he.pictureInPictureToggle)||!1},playbackRates:null!=he&&he.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==l.skin,liveui:se},e($,"autoplay",null==l?void 0:l.autoplay),e($,"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!de),e($,"loop",(null==l?void 0:l.loop)||!1),e($,"audioPosterMode",null==l?void 0:l.audioPosterMode),e($,"html5",vt(vt({dash:vt(vt({},!r.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:vt(vt({},((null==l?void 0:l.debugConfig)&&(null==l||null===(H=l.debugConfig)||void 0===H?void 0:H.enable)||re)&&{debug:{logLevel:oe}}),{},{streaming:{parseInbandPrft:!0,delay:{liveDelay:ge},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:vt({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:vt(vt(vt(vt({},(null==l?void 0:l.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==l?void 0:l.initialBandwidth)/1e3}}),(null==l?void 0:l.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==l?void 0:l.maxBitrate)/1e3}}),(null==l?void 0:l.minBitrate)&&{minBitrate:{audio:-1,video:(null==l?void 0:l.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:vt(vt(vt({},(null==l?void 0:l.initialBandwidth)&&{bandwidth:l.initialBandwidth}),{},{liveRangeSafeTimeDelta:ge,useDevicePixelRatio:!0,experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==l||!l.initialBandwidth},(null==l||null===(F=l.customData)||void 0===F?void 0:F.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(z=null==l?void 0:l.enableLowInitialPlaylist)&&void 0!==z&&z},((null==l?void 0:l.debugConfig)&&(null==l||null===(G=l.debugConfig)||void 0===G?void 0:G.enable)||re)&&{debug:!0}),debug:(null==l?void 0:l.debugConfig)&&(null==l||null===(W=l.debugConfig)||void 0===W?void 0:W.enable)||re||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==l||null===(K=l.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(Y=l.customData)||void 0===Y?void 0:Y.nativeVideoTracks)&&{nativeVideoTracks:!1})),e($,"poster",ue),e($,"techOrder",le),e($,"chromecast",{requestCustomDataFn:function(e){var n,t,r=m.getPlayer(i),o=((null==r?void 0:r.textTracksJson_)||r.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),a=function(e,n,t){var r,i,o,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,h,b,k,w,S,C;p.isDrmEnabled=!0;var E=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,T=(null==E?void 0:E.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(b=h.options)||void 0===b?void 0:b.serverURL);p.licenseUrl=T;var D=(null==E?void 0:E.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(k=n.keySystemOptions)||void 0===k||null===(w=k[0])||void 0===w||null===(S=w.options)||void 0===S||null===(C=S.httpRequestHeaders)||void 0===C?void 0:C["X-AxDRM-Message"]);p.licenseToken=D}var O=(null==e||null===(r=e[f])||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=O;var P=null==e||null===(o=e[f])||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.runtime;p.duration=P;var x=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=x;var j,I,_=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=_,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,void 0!==("undefined"==typeof window?"undefined":y(window))&&(p.siteId=(null===(j=window)||void 0===j?void 0:j.siteId)||null,p.userId=(null===(I=window)||void 0===I?void 0:I.sessionStorage)&&window.sessionStorage.getItem("uid")||null),console.log(p),p}(Q,e,o),u=o.find((function(e){return"showing"===e.mode}))||null;return ot=Nn(u),vt(vt({},a),{},{activeCaption:{enabled:!!u,language:(null==u?void 0:u.language)||(null==u?void 0:u.lang)||null,label:(null==u?void 0:u.label)||null},transmitTrackingUrl:c.trackingUrlManager.get()||null,convivaMetaData:vt({customerKey:(null==l||null===(n=l.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==l||null===(t=l.convivaConfig)||void 0===t?void 0:t.debug)||!1},_e.getData())})},modifyLoadRequestFn:function(e){var n,t,r,o,l,a=m.getPlayer(i),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Q)||void 0===n||null===(t=n[ae])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(o=r.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!r.getPlayers()[i]){(null!=l&&l.debugConfig&&null!=l&&null!==(J=l.debugConfig)&&void 0!==J&&J.enable||re)&&r.log.level(ie||"debug");var be=r(i,ye,function(){var e=n(t.mark((function e(){var n,o,u,s,d,f,p,m,g,h,y,b,k,w,S,C,E,T,D,O,P,x,j,I,_,A;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Tt(be),gt(be),console.log(be),console.log(r.VERSION),console.log(r.getPlugins()),e.next=7,fe(l,Q);case 7:if(null!=l&&l.debugConfig&&null!=l&&null!==(n=l.debugConfig)&&void 0!==n&&n.enable||re){try{r.log.level(ie||"debug")}catch(e){}(C=function(){try{var e,n,t;null==be||null===(e=be.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:oe}})}catch(e){}})(),be.one("loadedmetadata",C)}if(E=null===(o=Q)||void 0===o||null===(u=o[ae])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.startOverTime,null!=l&&l.disableControls||dn(i,{liveVideo:ce,isDvrEnabled:se,res:Q}),ce&&a.resolve(vt({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Q}:{response:Q})),c.inititateBeacon(i,{content:Q,analyticsCb:null==l?void 0:l.analyticsCb,analyticsEventParams:null==l?void 0:l.analyticsEventParams,userId:null==l?void 0:l.userId}),Ie(i,l),ct(be),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),se&&ne(i,E),!de||null!=l&&null!==(d=l.customData)&&void 0!==d&&d.disableAds||c.initialiseAdvertisement(i,de,Q),null!=l&&l.disableControls||c.initDvrStartOver(i,{config:l,content:Q,liveVideo:ce,isDvrEnabled:se}),T=c.getSource(Q,i),console.log(T),re&&(console.log("[PLAYER DEBUG] source:",T),console.log("[PLAYER DEBUG] videojs options:",ye)),null!=l&&l.nearestClusterUrl&&(T=c.getUpdatedClusterSource(T,l.nearestClusterUrl)),!pe){e.next=28;break}return e.next=25,c.getSGAIEnabledSource(i,Q);case 25:T=e.sent,e.next=32;break;case 28:if(!me){e.next=32;break}return e.next=31,c.getTransmitEnabledSource(T,Q,i);case 31:T=e.sent;case 32:be&&(be.__vlDrmLicenseUrl=yt(T)),T?c.loadVideo(i,T):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:Q}),c.handleError(i,"Incompatible / Missing Source")),D=null===(f=Q)||void 0===f||null===(p=f[ae])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.scheduleStartDate,ce&&se&&(D||E)&&Sn(be,{scheduleStartDate:D,startOverTime:E}),((null===(g=Q)||void 0===g||null===(h=g[ae])||void 0===h||null===(y=h.contentDetails)||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0||(null===(k=Q)||void 0===k||null===(w=k[ae])||void 0===w||null===(S=w.closedCaptions)||void 0===S?void 0:S.length)>0)&&(A=(null===(P=Q)||void 0===P||null===(x=P[ae])||void 0===x||null===(j=x.contentDetails)||void 0===j?void 0:j.closedCaptions)||(null===(I=Q)||void 0===I||null===(_=I[ae])||void 0===_?void 0:_.closedCaptions),O=A.filter((function(e){return"VTT"===e.format})),v.addCaptions(i,O)),null!=l&&l.disableControls?c.disableControls(i):Ae(i,vt(vt(vt({},l),ye),{},{liveVideo:ce,isDvrEnabled:se,res:Q,sres:ee})),kn(i,vt(vt(vt({},l),ye),{},{liveVideo:ce}),a,{res:Q,sres:ee});case 39:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}};function Ot(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Pt(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Ot(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var xt=function(e,n){var t=n.resolve,r=n.reject,i=null==e?void 0:e.playerId,o=jt(e);Dt(i,{res:o},e,{resolve:t,reject:r})},jt=function(e){var n,t,r,i,o,l,a,u,s,d,v,f,p,m,g,h=null==e?void 0:e.streamingInfo,y=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,b=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,k=(null==e||null===(r=e.streamingInfo)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.url)||null,S=(null==e||null===(o=e.streamingInfo)||void 0===o?void 0:o.posterUrl)||null,C=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],E=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,T=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],D=(null==e||null===(d=e.customData)||void 0===d||null===(v=d.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,O=(null==e||null===(f=e.streamingInfo)||void 0===f?void 0:f.scheduleStartDate)||null,P=(null==e||null===(p=e.streamingInfo)||void 0===p?void 0:p.startOverTime)||null,x=null==e?void 0:e.token,j=c.getDecodedToken(x);null==j||j.site;var I=null==j?void 0:j.siteId,_=(null==e||null===(m=e.customData)||void 0===m||null===(g=m.comscore)||void 0===g?void 0:g.video)||null,A=Pt(Pt({id:I?"".concat(I,"_external"):"external"},!b&&{directPlaybackUrl:null==y?void 0:y.url}),{},{video:Pt(Pt(Pt(Pt(Pt({drmEnabled:b,streamingInfo:Pt(Pt({videoAssets:Pt(Pt({},E&&{drmProvider:E}),{},{widevine:null==y?void 0:y.widevine,fairPlay:null==y?void 0:y.fairPlay,playReady:null==y?void 0:y.playReady})},(null==h?void 0:h.isDvrEnabled)&&{isLiveStream:!0}),(null==_?void 0:_.isLiveStream)&&{isLiveStream:null==_?void 0:_.isLiveStream})},D&&{isSSAIEnabled:D}),{},{metadata:T,liveDetails:Pt({isDvrEnabled:null==h?void 0:h.isDvrEnabled},P&&{startOverTime:P}),gist:Pt(Pt(Pt(Pt({},S&&{videoImageUrl:S}),O&&{scheduleStartDate:O}),(null==_?void 0:_.videoId)&&{id:null==_?void 0:_.videoId}),(null==_?void 0:_.videoTitle)&&{title:null==_?void 0:_.videoTitle}),contentDetails:Pt({},(null==C?void 0:C.length)>0&&{closedCaptions:w(C)})},(null==_?void 0:_.runtime)&&{runtime:null==_?void 0:_.runtime}),(null==_?void 0:_.publishDate)&&{publishDate:null==_?void 0:_.publishDate}),(null==_?void 0:_.platform)&&{platform:null==_?void 0:_.platform}),(null==_?void 0:_.series)&&{series:null==_?void 0:_.series}),ads:{preRoll:{adTags:{web:Pt(Pt({},k&&{active:!0}),k&&{url:k})}}}});return _&&(null!=_&&_.isDvrEnabled&&(A.video.liveDetails=Pt(Pt({},A.video.liveDetails),{},{isDvrEnabled:null==_?void 0:_.isDvrEnabled})),null!=_&&_.metadata&&(A.video.metadata=[].concat(w(A.video.metadata),w(null==_?void 0:_.metadata)))),A},It=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||"");return t.has("ssaiDisable")?t.get("ssaiDisable"):null}catch(e){return null}};function _t(e,n){return At.apply(this,arguments)}function At(){return(At=n(t.mark((function e(n,r){var i,o,l,a,u,s,v,f,p,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,u=null==n?void 0:n.videoId,s=null==n?void 0:n.playerId,v=!(null==n||!n.anonymousId),e.next=6,c.getToken();case 6:f=e.sent,p=!1===(null==n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.isSSAIEnabled),null!==(m=It())&&(p="true"===m),c.getVideoDetails(u,f,p).then((function(e){var t,r,i,o,p,m,g,h,y,b,k;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType,c.setCurrentVideo(null==e?void 0:e.data);var w=null==e||null===(o=e.data)||void 0===o||null===(p=o.video)||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.scheduleEndDate,S=null==e||null===(g=e.data)||void 0===g||null===(h=g.video)||void 0===h||null===(y=h.gist)||void 0===y?void 0:y.scheduleStartDate;d.handlePlayerMessage(s,{scheduleEndDate:w,scheduleStartDate:S});var C=null==e?void 0:e.data;if(null!=n&&null!==(b=n.watchHistory)&&void 0!==b&&b.isExternal)C.contentType="video",Dt(s,{res:C},n,{resolve:l,reject:a});else if(null!=n&&n.watchHistory&&null!=n&&null!==(k=n.watchHistory)&&void 0!==k&&k.enable&&!v){var E;if((null===(E=n.watchHistory)||void 0===E?void 0:E.saveOffline)||!1){var T,D,O,P=(null===(T=n.watchHistory)||void 0===T?void 0:T.profileId)||"",x=c.getWatchHistoryByIdFromStorage(P,u,null==n?void 0:n.siteOwner);if(x&&x.length)n.watchHistoryResumeTime=(null===(D=x[0])||void 0===D?void 0:D.watchedTime)||null,n.watchedPercentage=(null===(O=x[0])||void 0===O?void 0:O.watchedPercentage)||null;C.contentType="video",Dt(s,{res:C},n,{resolve:l,reject:a})}else c.getVideoInfo(u,f).then((function(e){var t,r,i,o,l,a;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,C.contentType="video"})).catch((function(){})).finally((function(){Dt(s,{res:C},n,{resolve:l,reject:a})}))}else Dt(s,{res:C},n,{resolve:l,reject:a})})).catch((function(e){var t,r,i=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,o=(null==n||null===(r=n.event)||void 0===r?void 0:r.onCountdownComplete)||null;i&&d.handleCountdownTimer(s,e,o),c.initiateErrorHandling(e,s,a,u)}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lt(e,n){return Rt.apply(this,arguments)}function Rt(){return(Rt=n(t.mark((function e(n,r){var i,o,l,a,u,s,d,v;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,e.next=3,c.getToken();case 3:u=e.sent,s=null==n?void 0:n.playerId,d=null==n?void 0:n.epg,v=!1===(null==n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.isSSAIEnabled),c.getLinearChannelDetails(d,u,v).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==d?void 0:d.channelId,c.setCurrentVideo(t),Dt(s,{res:t},n,{resolve:l,reject:a})})).catch((function(e){c.initiateErrorHandling(e,s,a,videoId)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Bt(e,n){return Mt.apply(this,arguments)}function Mt(){return(Mt=n(t.mark((function e(n,r){var i,o,l,a,u,s,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r.resolve,l=r.reject,e.next=3,c.getToken();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,c.seasonIdxManager.set(parseInt(s)),d=null==n||null===(i=n.series)||void 0===i?void 0:i.id,c.getSeriesDetails(d,a).then((function(e){var t,r,i,s=e.data,v=e.data.seasons;c.setCurrentSeries(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id);c.createSeriesWatchMap(d,a),c.getVideoDetails(f,a).then((function(e){var t,r,i;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType,c.setCurrentVideo(e.data),Dt(u,{res:null==e?void 0:e.data,sres:s},n,{resolve:o,reject:l})})).catch((function(e){c.initiateErrorHandling(e,u,l,videoId)}))})).catch((function(e){c.initiateErrorHandling(e,u,l)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Nt,Vt=function(e){var n=e.site,t=e.sseBaseUrl,r=e.sseEndpoint,i=e.debug,o=void 0!==i&&i;return C.createSSETransport({site:n,sseBaseUrl:t,getToken:c.getToken,sseEndpoint:r,onOpen:function(e){var n=e.userId,t=e.endpoint;o&&console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,r,i,l,a,u,s,v,f;if(o&&console.log("SSE Message:",e),(null===(n=c.getCurrentVideo())||void 0===n||null===(t=n.video)||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.id)===(null==e||null===(i=e.payload)||void 0===i?void 0:i.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var p=1e3*(null==e||null===(l=e.payload)||void 0===l||null===(a=l.states)||void 0===a||null===(u=a.live)||void 0===u?void 0:u.startDateTime),m=1e3*(null==e||null===(s=e.payload)||void 0===s||null===(v=s.states)||void 0===v||null===(f=v.end)||void 0===f?void 0:f.endDateTime);p&&m&&(console.log("Setting schedule timer",p,m),d.scheduleTimerInstanceManager.set({startDateTime:p,endDateTime:m}))}},onReconnectAttempt:function(e){o&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;o&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){o&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){o&&console.error("SSE Error:",e,n)},onClose:function(){o&&console.log("SSE Closed")}})},Ut=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,i=e.sseEndpoint,o=e.debug;if(n){var l=Vt({site:t,sseBaseUrl:r,sseEndpoint:i,debug:void 0!==o&&o});return l._sseBaseUrl=r,l._site=t,l._sseEndpoint=i,l}};function qt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ht(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):qt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}module.exports=function(){return{loadVideoInstantly:c.loadVideoInstantly,onTimeUpdate:d.onTimeUpdate,getVideoDuration:d.getVideoDuration,onVideoEnded:d.onVideoEnded,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=n(t.mark((function n(r,i){var o,l,a,u,s,d,v,f,p,g,y,k,w,S,C,T,D,O,P,x,j,I,_,A,L,R,B,M,N,V,U;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!c.isPlayerInitialised(null==e?void 0:e.playerId)){n.next=3;break}return r({status:!0,msg:"Player already initialised",skipped:!0}),n.abrupt("return");case 3:if(O=(null==e?void 0:e.videoSourceUrl)||!1,P=null==e?void 0:e.asat,x=(null==e||null===(o=e.epg)||void 0===o?void 0:o.enable)||!1,j=null==e?void 0:e.videoId,I=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,_=(null==e?void 0:e.streamingInfo)||!1,window.videoId=j,A=null==e?void 0:e.token,!c.token_authentication_enabled(e)){n.next=18;break}if(sessionStorage.setItem("vlp_token",A),c.refreshTokenManager().set(null==e?void 0:e.refreshToken),A&&!c.isTokenExpired(A)){n.next=17;break}return i({status:!1,msg:"".concat(A?"Token is expired !":"Missing Authorization Token"),response:{token:A}}),n.abrupt("return");case 17:Nt=JSON.parse(atob(A.split(".")[1]));case 18:return window.siteName=null===(a=Nt)||void 0===a?void 0:a.site,window.siteId=null===(u=Nt)||void 0===u?void 0:u.siteId,e.isAnonymousUser=!(null===(s=Nt)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=Nt)||void 0===d?void 0:d.site)||null,e.userId=(null===(v=Nt)||void 0===v?void 0:v.userId)||null,c.setUserId((null===(f=Nt)||void 0===f?void 0:f.userId)||(null===(p=Nt)||void 0===p?void 0:p.anonymousId)||null),window.watchHistory=e.watchHistory||null,L=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(g=e.series)&&void 0!==g&&g.enable?null:null==e?void 0:e.chromecastReceiverId,R=(null==e||null===(y=e.analytics)||void 0===y?void 0:y.gaId)||null,(B=null==e?void 0:e.errors)&&(window.customErrors=B),window.customData=null==e?void 0:e.customData,h.setLocalisation(h.resolveLocalisation(e)),c.baseUrlManager.set(e.apiBaseUrl),null!=e&&e.skin&&!m.isNotAValidSkin(e.skin)||(e.skin="VL_ONE"),b.playerConfigManager.setConfig(e),E.relatedVideosManager.reset(),E.relatedVideosManager.set(null==e?void 0:e.relatedVideos),n.next=39,se(e);case 39:R&&J("https://www.googletagmanager.com/gtag/js?id=".concat(R)).then((function(){return c.runGtag(R)})).catch((function(e){})),(M=null===(k=document)||void 0===k?void 0:k.getElementById("".concat(L)))&&M.addEventListener("contextmenu",(function(e){return e.preventDefault()})),(N=Ut({enable:null==e||null===(w=e.sse)||void 0===w?void 0:w.enable,site:null==e||null===(S=e.sse)||void 0===S?void 0:S.siteName,sseBaseUrl:null==e||null===(C=e.sse)||void 0===C?void 0:C.sseBaseUrl,sseEndpoint:null==e||null===(T=e.sse)||void 0===T?void 0:T.sseEndpoint,debug:null==e||null===(D=e.sse)||void 0===D?void 0:D.debug}))&&!N.isConnectionActive()&&N.connect(),O?(U={directPlaybackUrl:O,id:V="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}},P?c.getVideoDetails(V,A).then((function(n){var t,o=(null==n?void 0:n.data)||{},l=Ht(Ht(Ht({},o),U),{},{video:Ht(Ht({},null==o?void 0:o.video),{},{liveDetails:Ht(Ht({},null==o||null===(t=o.video)||void 0===t?void 0:t.liveDetails),{},{isDvrEnabled:!(null==e||!e.isDvr)})})});Dt(L,{res:l},e,{resolve:r,reject:i})})).catch((function(e){c.initiateErrorHandling(e,L,i,V)})):Dt(L,{res:Ht(Ht({},U),{},{video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}})},e,{resolve:r,reject:i})):_?xt(e,{resolve:r,reject:i}):I?Bt(e,{resolve:r,reject:i}):x?Lt(e,{resolve:r,reject:i}):_t(e,{resolve:r,reject:i});case 45:case"end":return n.stop()}}),n)})));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:f.getRenditions,skip:c.skip,getPlayer:m.getPlayer,play:c.play,pause:c.pause,detectBrowser:g.detectBrowser,rewind:c.rewind,loadVideo:c.loadVideo,seekToTimeStamp:d.seekToTimeStamp,isPlayerInitialised:c.isPlayerInitialised,load:c.load,authenticateLC:c.authenticateLC,dispose:c.dispose,enableCaptions:v.enableCaptions,disableCaptions:v.disableCaptions,getCaptions:v.getCaptions,playSelectedResolution:p.playSelectedResolution,getSource:c.getSource,setVolume:Q,getVolume:Z,disableControls:c.disableControls,setPlaybackSpeed:d.setPlaybackSpeed,getEntitlementData:c.getEntitlementData,getSsaiEvents:c.getSsaiEvents,getPlayerControlEvents:k.getPlayerControlEvents,playerEvents:d.playerEvents,onReplay:d.onReplay,relatedVideosManager:E.relatedVideosManager,setChapters:ln,getChapters:an,clearChapters:un,seekToChapter:sn,getChapterEvents:Ke,onWatchInVerticalView:d.onWatchInVerticalView,fireBeaconEvent:c.fireBeaconEvent,getDvrManager:c.getDvrManager}};
|
package/esm/bundle.css
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
4
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
7
5
|
height: 0.7em !important;
|
|
8
6
|
position: absolute !important;
|
|
@@ -211,6 +209,8 @@
|
|
|
211
209
|
text-decoration: underline;
|
|
212
210
|
}
|
|
213
211
|
|
|
212
|
+
|
|
213
|
+
|
|
214
214
|
.video-js.skin_news .vjs-button>.vjs-icon-placeholder:before {
|
|
215
215
|
font-size: 2.2em;
|
|
216
216
|
line-height: 2.6;
|
|
@@ -2229,53 +2229,7 @@
|
|
|
2229
2229
|
|
|
2230
2230
|
|
|
2231
2231
|
|
|
2232
|
-
.vjs-custom-big-mute.vjs-control{
|
|
2233
|
-
position: absolute;
|
|
2234
|
-
align-items: center;
|
|
2235
|
-
background: #fcb700;
|
|
2236
|
-
border: 0;
|
|
2237
|
-
display: flex;
|
|
2238
|
-
align-items: center;
|
|
2239
|
-
height: 44px;
|
|
2240
|
-
justify-content: center;
|
|
2241
|
-
padding: 0;
|
|
2242
|
-
width: 44px;
|
|
2243
|
-
z-index: 1;
|
|
2244
|
-
outline: none;
|
|
2245
|
-
text-shadow:none !important;
|
|
2246
|
-
cursor: pointer;
|
|
2247
|
-
}
|
|
2248
|
-
.video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control {
|
|
2249
|
-
display: flex;
|
|
2250
|
-
top: 50px;
|
|
2251
|
-
height: 50px;
|
|
2252
|
-
width: 50px;
|
|
2253
|
-
}
|
|
2254
|
-
.video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control >svg {
|
|
2255
|
-
height: 28px;
|
|
2256
|
-
width: 28px;
|
|
2257
|
-
}
|
|
2258
|
-
.vjs-custom-big-mute.vjs-control:hover{
|
|
2259
|
-
filter: none;
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
.vjs-custom-big-mute.vjs-control.tl{
|
|
2264
|
-
top: 0;
|
|
2265
|
-
left: 0;
|
|
2266
|
-
margin: 15px 0 0 15px;
|
|
2267
|
-
}
|
|
2268
|
-
|
|
2269
|
-
.vjs-custom-big-mute.vjs-control.hide{
|
|
2270
|
-
display: none !important;
|
|
2271
|
-
|
|
2272
|
-
}
|
|
2273
2232
|
|
|
2274
|
-
.vjs-custom-big-mute.vjs-control > svg {
|
|
2275
|
-
color: #071d39;
|
|
2276
|
-
height: 22px;
|
|
2277
|
-
width: 22px;
|
|
2278
|
-
}
|
|
2279
2233
|
|
|
2280
2234
|
|
|
2281
2235
|
|
|
@@ -2359,7 +2313,53 @@
|
|
|
2359
2313
|
align-content: baseline;
|
|
2360
2314
|
}
|
|
2361
2315
|
|
|
2316
|
+
.vjs-custom-big-mute.vjs-control{
|
|
2317
|
+
position: absolute;
|
|
2318
|
+
align-items: center;
|
|
2319
|
+
background: #fcb700;
|
|
2320
|
+
border: 0;
|
|
2321
|
+
display: flex;
|
|
2322
|
+
align-items: center;
|
|
2323
|
+
height: 44px;
|
|
2324
|
+
justify-content: center;
|
|
2325
|
+
padding: 0;
|
|
2326
|
+
width: 44px;
|
|
2327
|
+
z-index: 1;
|
|
2328
|
+
outline: none;
|
|
2329
|
+
text-shadow:none !important;
|
|
2330
|
+
cursor: pointer;
|
|
2331
|
+
}
|
|
2332
|
+
.video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control {
|
|
2333
|
+
display: flex;
|
|
2334
|
+
top: 50px;
|
|
2335
|
+
height: 50px;
|
|
2336
|
+
width: 50px;
|
|
2337
|
+
}
|
|
2338
|
+
.video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control >svg {
|
|
2339
|
+
height: 28px;
|
|
2340
|
+
width: 28px;
|
|
2341
|
+
}
|
|
2342
|
+
.vjs-custom-big-mute.vjs-control:hover{
|
|
2343
|
+
filter: none;
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
.vjs-custom-big-mute.vjs-control.tl{
|
|
2348
|
+
top: 0;
|
|
2349
|
+
left: 0;
|
|
2350
|
+
margin: 15px 0 0 15px;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
.vjs-custom-big-mute.vjs-control.hide{
|
|
2354
|
+
display: none !important;
|
|
2355
|
+
|
|
2356
|
+
}
|
|
2362
2357
|
|
|
2358
|
+
.vjs-custom-big-mute.vjs-control > svg {
|
|
2359
|
+
color: #071d39;
|
|
2360
|
+
height: 22px;
|
|
2361
|
+
width: 22px;
|
|
2362
|
+
}
|
|
2363
2363
|
|
|
2364
2364
|
/* Watch in Vertical View Button */
|
|
2365
2365
|
.video-js .vjs-control.vjs-vertical-view-button {
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import r from"video.js";import o from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/get";import a from"@babel/runtime/helpers/inherits";import u from"@babel/runtime/helpers/possibleConstructorReturn";import s from"@babel/runtime/helpers/getPrototypeOf";import{c,g as d,a as v,b as f,d as p,e as m,f as h,h as g,i as y,l as b,s as w,v as k,j as S,k as C,m as E,n as T,o as O,p as D,q as j,t as x,r as I,u as _,w as P,x as A,y as L,z as R,A as N,B,C as M,D as U,E as F,F as V,G as H,H as z,I as G,J as q,K as W,L as K,M as Y,N as $,O as J,P as X,Q,R as Z,S as ee,T as ne,U as te,V as re,W as oe,X as ie,Y as le,Z as ae,_ as ue,$ as se,a0 as ce,a1 as de,a2 as ve,a3 as fe,a4 as pe,a5 as me,a6 as he,a7 as ge,a8 as ye}from"./generic-72bc2234.js";import{h as be,a as we,s as ke,o as Se,g as Ce,b as Ee,c as Te,d as Oe,p as De,e as je,f as xe}from"./index-27b173c2.js";import{g as Ie,d as _e,s as Pe,r as Ae,a as Le,e as Re}from"./captions-90173c21.js";import{g as Ne}from"./renditions-28891b91.js";import{p as Be}from"./resolution-d9d21f0e.js";import{g as Me,t as Ue,p as Fe,i as Ve,a as He}from"./skin-2a3ee818.js";import{d as ze}from"./browser-02f174cf.js";import{s as Ge,r as qe}from"./localisation-2f1ee38c.js";import We from"@babel/runtime/helpers/typeof";import{p as Ke}from"./manager-d812dea7.js";import{i as Ye,r as $e,g as Je}from"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import Xe from"@babel/runtime/helpers/toConsumableArray";import Qe from"@babel/runtime/helpers/toArray";import{createSSETransport as Ze}from"@viewlift/sse";import{r as en}from"./relatedVideosManager-93533a90.js";import"axios";import"md5";import"js-cookie";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/assertThisInitialized";function nn(e,n,t,r){var o=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function tn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tn=function(){return!!e})()}var rn=r.getComponent("TextTrackSettings"),on=r.dom,ln=[{value:"0.50",label:"50%"},{value:"0.75",label:"75%"},{value:"1.00",label:"100%"},{value:"1.25",label:"125%"},{value:"1.50",label:"150%"},{value:"1.75",label:"175%"},{value:"2.00",label:"200%"},{value:"3.00",label:"300%"},{value:"4.00",label:"400%"}],an=ln.map((function(e){return e.value})),un="1.00",sn=".vjs-font-percent > select",cn="vlp-caption-font-size-style",dn="#FFF",vn="1",fn="#000",pn="1",mn="#000",hn="0",gn="proportionalSansSerif",yn="#222",bn="#ccc",wn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},kn=function(e,n){var t=parseFloat(e);return isNaN(t)?n:t},Sn=function(e,n){var t;if(e&&4===e.length)t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(!e||7!==e.length)return e;t=e.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+n+")"},Cn=null;function En(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(En=function(){return!!e})()}rn?(Cn=function(){a(r,rn);var e,n,t=(e=r,n=tn(),function(){var t,r=s(e);if(n){var o=s(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)});function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).customReady_=!0,i.customUiReady_=!0,i.triggerEl_=null,i.applyCustomFontSizeUI_(),i}return i(r,[{key:"conditionalFocus_",value:function(){this.triggerEl_=this.getCaptionsTrigger_(),this.previouslyActiveEl_=null,this.focus()}},{key:"conditionalBlur_",value:function(){this.previouslyActiveEl_=null;var e=this.player_;e&&"function"==typeof e.userActive&&e.userActive(!0);var n=this.triggerEl_||this.getCaptionsTrigger_();this.triggerEl_=null;var t=function(){n&&"function"==typeof n.focus&&n.focus()};"undefined"!=typeof window&&"function"==typeof window.setTimeout?window.setTimeout(t,0):t()}},{key:"getCaptionsTrigger_",value:function(){var e=this.player_&&this.player_.controlBar;return e&&(e.subsCapsButton||e.captionsButton||e.subtitlesButton)||null}},{key:"applyCustomFontSizeUI_",value:function(){var e=this;this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.on(this.player_,["playerresize","fullscreenchange"],(function(){return e.applyDashCaptionStyles_()})),this.applyDashCaptionStyles_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(sn);if(e){for(var n=e.value;e.firstChild;)e.removeChild(e.firstChild);ln.forEach((function(n){e.appendChild(on.createEl("option",{value:n.value,textContent:n.label}))})),e.value=-1!==an.indexOf(n)?n:un}}},{key:"bindCaptionStyleChange_",value:function(){for(var e=this,n=this.$$("select"),t=0;t<n.length;t++)this.on(n[t],"change",(function(){return e.applyDashCaptionStyles_()}))}},{key:"selectedMultiplier_",value:function(){var e=this.$(sn),n=e&&-1!==an.indexOf(e.value)?e.value:un;return parseFloat(n)}},{key:"styleEl_",value:function(){if("undefined"==typeof document)return null;var e=document.getElementById(cn);return e||((e=document.createElement("style")).id=cn,document.head.appendChild(e)),e}},{key:"applyDashCaptionStyles_",value:function(){if(this.customReady_){var e;try{e="function"==typeof this.getValues&&this.getValues()||{}}catch(e){return}var n=this.styleEl_(),t=this.player_&&this.player_.el();if(n&&t){var r=[];(e.color&&e.color!==dn||e.textOpacity&&e.textOpacity!==vn)&&r.push("color: "+Sn(e.color||dn,kn(e.textOpacity,1))+" !important");var o=function(e){switch(e){case"dropshadow":return"2px 2px 3px ".concat(yn,", 2px 2px 4px ").concat(yn,", 2px 2px 5px ").concat(yn);case"raised":return"1px 1px ".concat(yn,", 2px 2px ").concat(yn,", 3px 3px ").concat(yn);case"depressed":return"1px 1px ".concat(bn,", 0 1px ").concat(bn,", -1px -1px ").concat(yn,", 0 -1px ").concat(yn);case"uniform":return"0 0 4px ".concat(yn,", 0 0 4px ").concat(yn,", 0 0 4px ").concat(yn,", 0 0 4px ").concat(yn);default:return""}}(e.edgeStyle);o&&r.push("text-shadow: "+o+" !important"),"small-caps"===e.fontFamily?(r.push("font-family: "+wn[gn]+" !important"),r.push("font-variant: small-caps !important")):e.fontFamily&&e.fontFamily!==gn&&wn[e.fontFamily]?(r.push("font-family: "+wn[e.fontFamily]+" !important"),r.push("font-variant: normal !important")):r.push("font-variant: normal !important");var i=this.selectedMultiplier_(),l="function"==typeof this.player_.currentHeight&&this.player_.currentHeight()||t.offsetHeight||0;if(1!==i&&l){var a=Math.round(.05*l*i*100)/100;r.push("font-size: "+a+"px !important"),r.push("line-height: normal !important")}var u=e.backgroundColor&&e.backgroundColor!==fn||e.backgroundOpacity&&e.backgroundOpacity!==pn?"background-color: "+Sn(e.backgroundColor||fn,kn(e.backgroundOpacity,1))+" !important":"",s=e.windowColor&&e.windowColor!==mn||e.windowOpacity&&e.windowOpacity!==hn?"background-color: "+Sn(e.windowColor||mn,kn(e.windowOpacity,0))+" !important":"",c=[];r.length&&c.push(".vjs-text-track-display-ttml div,.vjs-text-track-display-ttml span,.vjs-text-track-display-ttml p{"+r.join(";")+"}"),s&&c.push(".vjs-text-track-display-ttml p{"+s+"}"),u&&c.push(".vjs-text-track-display-ttml span{"+u+"}"),n.textContent=c.join("")}}}},{key:"setDefaults",value:function(){if(nn(r,"setDefaults",this,3)([]),this.applyDashCaptionStyles_(),"function"==typeof Event)for(var e=this.$$("select"),n=0;n<e.length;n++)e[n].dispatchEvent(new Event("change",{bubbles:!0}))}},{key:"handleLanguagechange",value:function(){nn(r,"handleLanguagechange",this,3)([]),this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.applyDashCaptionStyles_()}},{key:"close",value:function(){var e=this.opened_;nn(r,"close",this,3)([]),e&&this.focusCaptionsButton_()}},{key:"focusCaptionsButton_",value:function(){var e=this.player_&&this.player_.controlBar;if(e){var n=e.getChild("SubsCapsButton")||e.getChild("CaptionsButton")||e.getChild("SubtitlesButton");n&&"function"==typeof n.focus&&n.focus()}}}]),r}(),r.registerComponent("TextTrackSettings",Cn)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var Tn=r.getComponent("SubsCapsButton"),On=null;Tn?(On=function(){a(r,Tn);var e,n,t=(e=r,n=En(),function(){var t,r=s(e);if(n){var o=s(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)});function r(){return o(this,r),t.apply(this,arguments)}return i(r,[{key:"pressButton",value:function(){!function(e,n,t,r){var o=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof o?function(e){return o.apply(t,e)}:o}(r,"pressButton",this,3)([]),this.buttonPressed_&&this.focusFirstVisibleItem_()}},{key:"focusFirstVisibleItem_",value:function(){if(this.menu&&this.menu.el_&&this.menu.el_.contains(document.activeElement)){var e=this.menu.children().slice();e.length&&e[0].hasClass("vjs-menu-title")&&e.shift();for(var n=0;n<e.length&&e[n].hasClass("vjs-texttrack-settings");)n++;n>0&&n<e.length&&this.menu.focus(n)}}}]),r}(),r.registerComponent("SubsCapsButton",On)):console.warn("[vlp] CustomSubsCapsButton: video.js SubsCapsButton is not registered; skipping override.");var Dn=function(e){return new Promise((function(n,t){if(jn(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}}))},jn=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},xn=function(e,n,t){var r=Me(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},In=function(e){var n=Me(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},_n=function(){var e=n(t.mark((function e(n){var o,i,l,a,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Me(null==n?void 0:n.playerId),null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("./index-cbb86a6c.js").then((function(e){return e.i}));case 4:return a=e.sent,e.prev=5,e.next=8,Dn("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(r),e.finish(13);case 16:(u=r.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==ze()?null==i||i.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(n){return e.apply(this,arguments)}}(),Pn=function(e,n){var t=Me(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,l,a,u=this.el(),s=r.dom.getPointerPosition(u,n).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}}))};var An=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),Dn("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ln=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("@viewlift/comscore/index.js").then((function(e){c.set(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Rn=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then((function(e){r.getPlugin("eme")||r.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Nn=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(r),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),Bn=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-e9e43270.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),Mn=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-cfe95daa.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),Un=Object.freeze({__proto__:null,importChromecast:function(){import("./index-cbb86a6c.js").then((function(e){return e.i})).then((function(e){Dn("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(r)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("./index-28ebfa21.js").then((function(e){return e.i})).then((function(e){e.default(r)}))},loadAdsLibrary:An,loadEMELibrary:Rn,loadMuxPlugin:Nn,loadDvrSeekbar:Bn,loadContribDash:Mn,loadComscorePlugin:Ln});function Fn(e){return Vn.apply(this,arguments)}function Vn(){return(Vn=n(t.mark((function e(n){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(null==n?void 0:n.airplay)||!1,e.next=3,An();case 3:r&&"Safari"==ze()&&Promise.resolve().then((function(){return Un})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Hn(e){return zn.apply(this,arguments)}function zn(){return(zn=n(t.mark((function e(n){var r,o,i,l,a,u,s,c,d,v;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=Me(n.playerId),e.next=3,Ln();case 3:v.comscore({publisherId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(i=n.comscore)||void 0===i?void 0:i.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gn(e,n){return qn.apply(this,arguments)}function qn(){return(qn=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f,p,m,h,g;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==r?void 0:r.contentType)||"video",f=null==r||null===(o=r[v])||void 0===o?void 0:o.drmEnabled,null==r||null===(i=r[v])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==r||null===(a=r[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==ze()?Rn():"caliente"!=(null===(g=window)||void 0===g?void 0:g.siteName)?Mn():Rn():"Safari"!=ze()&&p?Mn():null,m?Hn(n):null,h?Nn():null,_n(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}}),e,null,[[7,12]])})))).apply(this,arguments)}function Wn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Kn(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wn(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Wn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var Yn=new Set,$n=null,Jn=function(e,n,t,r){var o,i,l,a,u,s,c,v,p={},m=(null==e?void 0:e.contentType)||"video";p["c3.cm.id"]=(null===(o=e[m])||void 0===o?void 0:o.id)||"Null",p["c3.cm.contentType"]=rt(e),p[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),p[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc();var h=(null===(a=Ke.getConfig())||void 0===a?void 0:a.userId)||d();p[null==t||null===(u=t.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===h?"NULL":h,p["c3.cm.categoryType"]=et(e),p["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),p.DRMEnabled=(null===(s=e[m])||void 0===s?void 0:s.drmEnabled)||"None",p.DAIStream=null!==(c=e[m])&&void 0!==c&&null!==(v=c.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",p[t.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NULL",p.CDVREnabled=nt(e),p["c3.cm.genreList"]=Qn(e),p["c3.cm.genre"]=Xn(e),p["c3.cm.channel"]=Zn(e,r);var g=it(f(),e);return p=Kn(Kn({},p),g)},Xn=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},Qn=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map((function(e){return null==e?void 0:e.title})).join(", ")||"Null"},Zn=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(r=((null==e||null===(t=e[o])||void 0===t?void 0:t.channels)||[]).find((function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)})))||void 0===r?void 0:r.title)||"NULL"},et=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},nt=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},tt=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},rt=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ot,it=function(e,n){var t,r,o,i,l,a={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return a;var u=p(),s=v();return a["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(r=t.series)||void 0===r?void 0:r.title)||"Null",a["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",a["c3.cm.showTitle"]=(null==e||null===(o=e[u-1])||void 0===o||null===(i=o.episodes)||void 0===i||null===(l=i[s-1])||void 0===l?void 0:l.title)||"Null",a["c3.cm.episodeNumber"]=(null==s?void 0:s.toString())||"Null",a},lt=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},at=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ut=function(){var e=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f,p,h;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==r?void 0:r.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,u=o.enable,s=o.appName,d=(c=r||{}).token,v=c.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(f=Me(n),"function"==typeof(p=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,p("getConvivaObject");case 10:if(h=e.sent){e.next=13;break}return e.abrupt("return");case 13:f.ready((function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=lt(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})})),n||p("contentInfo",{DRMEnabled:"None"})})),f.on("loadstart",(function(){var e,n;$n&&$n!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),Yn.clear(),$n=f.currentSrc();var t=at(f.currentType()),o=m(),i=Jn(o,f,h,v);i[null==h||null===(e=h.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",i[null==h||null===(n=h.Constants)||void 0===n?void 0:n.ASSET_NAME]=tt(o,r),i.authToken=d||"NULL",i.streamType=t,i.D2CType=l||"NONE",i.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",i["c3.cm.affiliate"]=a||"NULL",st.setData(i),p("contentInfo",i)})),f.on("loadedmetadata",(function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})})),f.on("play",(function(){Yn.has(f.currentSrc())||(Yn.add(f.currentSrc()),p("playbackStarted",null))})),f.on("ended",(function(){Yn.has(f.currentSrc())&&Yn.delete(f.currentSrc()),p("playbackEnded")})),f.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})})),f.on("dispose",(function(){null==Yn||Yn.clear(),p("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),st=(ot={},{setData:function(e){ot=Kn(Kn({},ot),e)},getData:function(){return ot}}),ct=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-24ed1b71.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-65fab669.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-de1d7d56.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-6af2950f.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?import("./skin-71418867.js").then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t?import("./skin-237bef24.js").then((function(t){t.initialiseSkin(e,n)})):"news"==t?import("./skin-c6d3eac0.js").then((function(t){t.initialiseSkin(e,n)})):"news_live"==t?import("./skin-a6a30830.js").then((function(t){t.initialiseSkin(e,n)})):"mini"==t?import("./skin-dd2d5f12.js").then((function(t){t.initialiseSkin(e,n)})):"CN_NEWS"==t&&import("./skin-4ce58a71.js").then((function(t){t.initialiseSkin(e,n)}))};function dt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}var vt,ft=["offsetSeconds","offsetLabel"],pt=function(n){if(!n||"object"!==We(n))return n;if(!ft.some((function(e){return e in n})))return n;var t=function(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}({},n);return ft.forEach((function(e){return delete t[e]})),t},mt=function(e){try{if(!e)return null;e.refreshAnchor();var n="function"==typeof e.anchorInfo?e.anchorInfo():{};if("vod"===n.source)return{live:!1,source:"vod"};var t=("function"==typeof e.displayBounds?e.displayBounds():e.windowBounds())||{},r=t.start,o=t.end;if(!(Number.isFinite(r)&&o>r))return null;var i=null!=n.anchorPdtSec&&null!=n.anchorPlayerT;return{live:!0,source:n.source,windowEnd:o,anchorT:i?n.anchorPlayerT:null,anchorUtc:i?n.anchorPdtSec:null,nowSec:Date.now()/1e3}}catch(e){return null}},ht=function(e,n){try{return gt(e,n)}catch(e){return null}},gt=function(e,n){if(!e)return null;var t=h(n).start;if(!Number.isFinite(t))return null;if(!e.live)return{seconds:t,live:!1};var r=null!=e.anchorUtc?e.anchorT+(t-e.anchorUtc):e.windowEnd-(e.nowSec-t);return Number.isFinite(r)?{seconds:Math.max(0,e.windowEnd-r),live:!0}:null},yt=function(e){if(!e||!Number.isFinite(e.seconds))return"";var n=r.formatTime(e.seconds,e.seconds);return e.live?"-".concat(n):n},bt=(vt=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n.map(pt):[];return vt.set(e,t),t},get:function(e){return vt.get(e)||[]},remove:function(e){vt.delete(e)}}),wt="chapter-change",kt="chapter-click",St="chapters-updated";function Ct(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Me(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function Et(e){var n=Me(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(wt,e)},onChapterClick:function(e){return t(kt,e)},onChaptersUpdated:function(e){return t(St,e)}}}var Tt="vjs-chapter-marker",Ot="vjs-chapter-preview",Dt=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function jt(e,n){var t=n.store,r=n.mapper,o=n.chaptersConfig,i=void 0===o?{}:o,l=n.seek,a=Me(e);if(!a)return{render:function(){},reposition:function(){},destroy:function(){}};var u=new Map,s=null,c=-1,d=null,v=function(){return!0===(null==i?void 0:i.enable)},f=function(e){try{return r.chapterStartPercent(e)}catch(e){return null}},p=function(n,t,o){var i=Me(e),l=Dt(i);if(l){var a=function(e){if(s&&s.isConnected)return s;(s=document.createElement("div")).className=Ot;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",s.appendChild(n),s.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",s.appendChild(r),s._time=n,s._label=t,s._pointer=r,e.appendChild(s),s}(l);a._time.textContent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mt(r);return yt(ht(n,e))}(n,o),a._label.textContent=(null==n?void 0:n.label)||"",a.classList.add("vjs-chapter-preview--visible");var u="function"==typeof(null==i?void 0:i.el)?i.el():null;u&&u.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var o="function"==typeof(null==t?void 0:t.el)?t.el():null;if(o){var i=o.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=i.left+8+u,d=i.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(a,l,i,t)}},m=function(){d=null,s&&s.classList.remove("vjs-chapter-preview--visible");var n=Me(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},h=function(e){if(d&&s&&s.classList.contains("vjs-chapter-preview--visible")){var n=f(d);null!=n?p(d,n,e):m()}},g=function(n){var r=document.createElement("div");r.className=Tt,r.dataset.segmentId=String(n.segmentId);var o=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=Fe(n);r&&t.appendChild(r)}else{var o=document.createElement("img");o.src=n,o.alt="",t.appendChild(o)}return t}(n);o&&r.appendChild(o);var i=function(r){if("touchstart"===r.type)r.preventDefault();else if("mousedown"===r.type&&0!==r.button)return;r.stopPropagation(),"function"==typeof l&&l(n.segmentId);var o=t.get(e).indexOf(n);Ct(e,kt,{chapter:n,index:o,position:o>=0?o+1:void 0})};return r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),null!=n&&n.label&&r.setAttribute("aria-label",String(n.label)),r.addEventListener("keydown",(function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||e.repeat||(e.preventDefault(),i(e))})),r.addEventListener("mouseenter",(function(){var e=f(n);null!=e&&(d=n,p(n,e))})),r.addEventListener("mouseleave",m),r},y=function(n){v()&&0!==u.size&&(n||r.refreshAnchor(),t.get(e).forEach((function(e){var n=u.get(String(e.segmentId));if(n){var t=f(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}})))},b=0,w=function(n){u.forEach((function(e){return e.classList.remove("".concat(Tt,"--active"))}));var r=t.get(e),o=n>=0?r[n]:null;if(o){var i=u.get(String(o.segmentId));i&&i.classList.add("".concat(Tt,"--active"))}},k=function(){var n=Me(e);if(n){var o=t.get(e),i=r.playerTimeToChapterIndex(n.currentTime()||0,o);-1===i&&Date.now()<b||i!==c&&(c=i,w(i),Ct(e,wt,{chapter:i>=0?o[i]:null}))}},S=Ue((function(){var e=mt(r);y(!0),h(e),k()}),1e3),C=function(){var e=mt(r);y(!0),h(e),k()},E=function(){mt(r),y(!0)};a.on("timeupdate",S),a.on("seeked",C);var T=!1;try{a.liveTracker&&"function"==typeof a.liveTracker.on&&(a.liveTracker.on("liveedgechange",E),T=!0)}catch(e){}var O=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(O=setInterval((function(){var e=mt(r);y(!0),h(e)}),500));return{render:function(){var n=Me(e),o=Dt(n);o&&(m(),o.querySelectorAll(".".concat(Tt)).forEach((function(e){return e.remove()})),u.clear(),v()&&(r.refreshAnchor(),t.get(e).forEach((function(e){var n=g(e);o.appendChild(n),u.set(String(e.segmentId),n)})),y(!0),w(c),k()))},reposition:y,destroy:function(){try{a.off("timeupdate",S),a.off("seeked",C),T&&a.liveTracker.off("liveedgechange",E)}catch(e){}O&&(clearInterval(O),O=null);var n=Dt(Me(e));n&&n.querySelectorAll(".".concat(Tt,", .").concat(Ot)).forEach((function(e){return e.remove()})),u.clear(),s=null,d=null},setActiveBySegment:function(n){var r=t.get(e),o=r.findIndex((function(e){return String(e.segmentId)===String(n)}));o<0||(b=Date.now()+1500,o!==c&&(c=o,w(o),Ct(e,wt,{chapter:r[o]})))}}}function xt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function It(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var _t=new Map,Pt=function(e){var n=e.live,t=e.dvr;return function(e){return Array.isArray(e)&&e.some((function(e){return e&&e.eventStartUtc}))}(e.chapters)||n&&t?"livedvr":"vod"},At=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},Lt=function(e){var n=_t.get(e);if(n)return n;n={mapper:g(e,{timeMode:"vod"}),markers:null,chaptersConfig:{enable:!0},timeMode:"vod",live:!1,dvr:!1,disposed:!1},_t.set(e,n);var t=Me(e);return t&&(t.on("dispose",(function(){return Ft(e)})),t.one("loadeddata",(function(){n.disposed||Rt(e)}))),n},Rt=function(e){var n=_t.get(e),t=function(e){var n=_t.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=Me(e);return t&&At(t)?(n.markers=jt(e,{store:bt,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return Ut(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function Nt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Lt(e);bt.set(e,n);var r=Pt({live:t.live,dvr:t.dvr,chapters:n});return r!==t.timeMode&&(t.timeMode=r,t.mapper=g(e,{timeMode:r}),t.markers&&(t.markers.destroy(),t.markers=null)),Rt(e),Ct(e,St,{chapters:bt.get(e)}),!0}function Bt(e){var n=bt.get(e),t=_t.get(e);if(!t||!n.length)return n;var r=mt(t.mapper);try{return n.map((function(e){var n=ht(r,e);return It(It({},e),{},{offsetSeconds:n?n.seconds:null,offsetLabel:yt(n)})}))}catch(e){return n}}function Mt(e){bt.set(e,[]);var n=_t.get(e);return null!=n&&n.markers&&n.markers.render(),Ct(e,St,{chapters:[]}),!0}function Ut(e,n){var t,r,o=Me(e),i=Lt(e);if(!o)return!1;var l=bt.get(e).find((function(e){return e.segmentId===n}));if(!l)return!1;i.mapper.refreshAnchor();var a=i.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=i.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),o.currentTime(a),null===(t=i.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function Ft(e){var n=_t.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),_t.delete(e),bt.remove(e)}function Vt(e){var n,t,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Ke.getConfig();(null!=i&&null!==(n=i.chaptersConfig)&&void 0!==n&&n.enable||null!=i&&null!==(t=i.chapters)&&void 0!==t&&t.length)&&(function(e,n){var t,r=null===(t=Me(e))||void 0===t?void 0:t.el();if(r&&n){var o=function(e,n){null!=n&&""!==n&&r.style.setProperty(e,n)};o("--vl-chapter-color",n.markerColor),o("--vl-chapter-active",n.markerActiveColor),o("--vl-chapter-hover",n.markerHoverColor),o("--vl-chapter-size",null!=n.markerSize?"".concat(n.markerSize,"px"):null),o("--vl-chapter-opacity",null!=n.markerOpacity?String(n.markerOpacity):null),o("--vl-chapter-tooltip",n.tooltipColor)}}(e,null==i||null===(r=i.chaptersConfig)||void 0===r?void 0:r.style),function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,o=n.live,i=void 0!==o&&o,l=n.dvr,a=void 0!==l&&l;n.res;var u=n.chaptersConfig,s=void 0===u?{}:u,c=Me(e);if(!c)return!1;Array.isArray(r)&&bt.set(e,r);var d=Pt({live:i,dvr:a,chapters:r}),v=_t.get(e);null!=v&&v.markers&&v.markers.destroy();var f={mapper:g(e,{timeMode:d}),markers:null,chaptersConfig:s||{},timeMode:d,live:i,dvr:a,disposed:!1};_t.set(e,f);var p=function(){f.disposed||Rt(e)};c.one("loadeddata",p),At(c)&&p(),c.on("dispose",(function(){return Ft(e)}))}(e,{chapters:(null==i?void 0:i.chapters)||[],live:(null==o?void 0:o.liveVideo)||!1,dvr:(null==o?void 0:o.isDvrEnabled)||!1,res:null==o?void 0:o.res,chaptersConfig:(null==i?void 0:i.chaptersConfig)||{}}))}var Ht=!1,zt=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[o])||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!Ht){var i=Gt(e,"videoAssets","secondaryVideoAssets"),l=y(i,n);return l&&b(n,l),Ht=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function Gt(e,n,t){if(Array.isArray(e))return e.map((function(e){return Gt(e,n,t)}));if(null!==e&&"object"===We(e)){var r={};return Object.keys(e).forEach((function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=Gt(e[o],n,t)})),r}return e}function qt(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Wt(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Wt(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Wt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Kt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Yt(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var $t,Jt=function(e,r,o,i){var l,a,u,s,c,d=i.res,v=i.sres,f=Me(e),p=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(l=d[p])||void 0===l?void 0:l.drmEnabled)||!1,g=!(null==d||null===(a=d[p])||void 0===a||null===(u=a.streamingInfo)||void 0===u||!u.isLiveStream)||"linearchannel"===p,y=(null==d||null===(s=d[p])||void 0===s||null===(c=s.liveDetails)||void 0===c?void 0:c.isDvrEnabled)||!1;if(w(d),k.set(d),f){var b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500;return new Promise((function(n){var t=f.currentTime();setTimeout((function(){if(f.isDisposed())return n(!1);n(f.currentTime()-t>.5)}),e)}))};Ye(e,{liveVideo:g,isDvrEnabled:y}),f.on("loadstart",(function(){g?o.resolve({status:!0,msg:"Video Loaded",response:d}):o.resolve(Yt({status:!0,msg:"Player Initialised"},v?{seriesResponse:v,response:d}:{response:d}))})),f.on("loadeddata",(function(){var n,t,o,i,l=Ie(e);if(null==l||l.map((function(n){return _e(e,n.id)})),y&&"Safari"===ze())try{var a;null==f||null===(a=f.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==f||!f.muted())&&xn(e,sessionStorage.getItem("volume")||"100"),$e(e);var u=m();if(S(r),C(),null!=r&&null!==(n=r.watchHistory)&&void 0!==n&&n.isExternal){var s=Yt(Yt({},r),d);E(f,s)}else if(null!=r&&r.watchHistory&&null!=r&&null!==(t=r.watchHistory)&&void 0!==t&&t.enable&&(!r.isAnonymousUser||null!=r&&null!==(o=r.watchHistory)&&void 0!==o&&o.saveOffline)){var c,v,p=Yt(Yt({},r),d);T(e,p,null==u||null===(c=u.video)||void 0===c||null===(v=c.gist)||void 0===v?void 0:v.id)}if(null!=r&&null!==(i=r.analytics)&&void 0!==i&&i.muxKey&&null!=f&&f.mux){var h,g,b,w,k,O,D=(null===(h=m())||void 0===h?void 0:h.video)||(null==d?void 0:d.video),j=null==D?void 0:D.gist,x={env_key:null==r||null===(g=r.analytics)||void 0===g?void 0:g.muxKey,player_name:"vl-web-player",player_version:null===(b=window)||void 0===b?void 0:b.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==D||null===(w=D.series)||void 0===w?void 0:w.title,video_stream_type:null!=D&&null!==(k=D.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==r||null===(O=r.analytics)||void 0===O?void 0:O.userId};f.mux({debug:!1,data:x})}})),f.textTracks().on("change",(function(n){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];Pe(e),f.trigger("subtitlechanged",t)})),f.tech_.on("retryplaylist",(function(){g&&zt(d,e)}));var x=0,I=null,_=!1,P=null,A=function(){clearTimeout(I),I=null,x=0,_=!1},L=function r(){I=setTimeout(n(t.mark((function n(){var i,l;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return I=null,n.next=3,b();case 3:if(i=n.sent,_){n.next=6;break}return n.abrupt("return");case 6:if(!(!(null!=f&&f.paused()||null!=f&&f.ended()||null!=f&&f.seeking())&&(null==f?void 0:f.readyState())>=3||i)){n.next=9;break}return A(),n.abrupt("return");case 9:if(!(x>=3)){n.next=13;break}return A(),zt(d,e)||(O(e,P||"Some error occured"),o.reject({status:!1,msg:P||"Some error occured",response:d})),n.abrupt("return");case 13:x++,console.log("Stream not progressing. Retry attempt ".concat(x,"/").concat(3,"...")),null==f||f.error(null);try{null==f||null===(l=f.liveTracker)||void 0===l||l.seekToLiveEdge(),null==f||f.play()}catch(e){console.log("Cannot seek to Live Edge",e)}r();case 18:case"end":return n.stop()}}),n)}))),1e3*Math.pow(2,x))};f.one("dispose",A),f.on("error",(function(){var n,t,r,i;3===(null==f||null===(n=f.error())||void 0===n?void 0:n.code)&&g?_||(console.log("Retrying to play the live stream due to media decode error"),_=!0,P=null===(t=f.error())||void 0===t?void 0:t.message,L()):(A(),console.log("ERROR",f.error(),f.error().code),4===f.error().code&&g?zt(d,e):(O(e,(null==f||null===(r=f.error())||void 0===r?void 0:r.message)||"Some error occured"),o.reject({status:!1,msg:(null==f||null===(i=f.error())||void 0===i?void 0:i.message)||"Some error occured",response:d})))})),f.one("play",(function(){var e,n,t,o,i;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(t=n.appcmsMain)||void 0===t||null===(o=t.adsConfig)||void 0===o||!o.vodAdClientSideTracking){if(null!=r&&null!==(i=r.series)&&void 0!==i&&i.enable){var l,a,u,s=null===(l=m())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,c=j(),d=(null==c?void 0:c.get(s))||{t:0,p:0},v=d.t,p=d.p;v&&p<95&&D(f,v)}else{var h,g,y,b,w,k,S,C=null!==(h=null==r?void 0:r.watchHistoryResumeTime)&&void 0!==h?h:null==r||null===(g=r.watchHistory)||void 0===g?void 0:g.watchedTime,E=null!==(y=null!==(b=null==r?void 0:r.watchedPercentage)&&void 0!==b?b:null==r||null===(w=r.watchHistory)||void 0===w?void 0:w.watchedPercentage)&&void 0!==y?y:0,T=null!==(k=null==r||null===(S=r.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==k?k:95;C&&E<T&&D(f,C)}if(null!=f&&f.dvrSeekbar)try{f.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}})),f.on("volumechange",(function(){var e=100*f.volume().toFixed(2);f.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),f.on("chromecastDisconnected",(function(){if(g){f.currentSource();for(var n=f.textTracks(),t=n.length-1;t>=0;t--)f.removeRemoteTextTrack(n[t])}var r=f.textTracks(),o=function(){return Ae(e)};o(),r.addEventListener("addtrack",o),setTimeout((function(){return r.removeEventListener("addtrack",o)}),15e3)})),f.one("loadeddata",(function(){var e,n=(null==f||null===(e=f.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort((function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0})),"object"==We(f.dash)){var t,r,o,i=null==f||null===(t=f.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),a=qt(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],d=qt(n);try{for(d.s();!(s=d.n()).done;){var v,p,m,g=s.value;("Chrome"==ze()||"Edge"==ze()&&(null!==(v=navigator)&&void 0!==v&&null!==(p=v.userAgent)&&void 0!==p&&p.includes("Macintosh")||!h))&&null!=g&&null!==(m=g.label)&&void 0!==m&&m.includes("5.1")?f.audioTracks().removeTrack(g):c.push(g)}}catch(e){d.e(e)}finally{d.f()}for(var y=c.find((function(e){return"main"===e.kind})),b=y||c.find((function(e){return e.enabled}))||c[0],w=0,k=c;w<k.length;w++){var S=k[w];S.enabled=S===b}}}))}},Xt=(null===($t=r.time)||void 0===$t?void 0:$t.createTimeRanges)||r.createTimeRanges;function Qt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.scheduleStartDate,r=n.startOverTime;if(e&&(t||r)){var o,i=t?(o=t)>1e12?o/1e3:o:null,l=r>0?r:null,a=e.seekable.bind(e);e.seekable=function(){var e=a();if(!e||!e.length)return e;var n=e.start(0),t=e.end(e.length-1),r=Date.now()/1e3,o=1/0;if(null!=i&&(o=Math.min(o,r-i)),null!=l&&(o=Math.min(o,l)),!isFinite(o))return e;var u=o<=0?t:Math.max(n,t-o);return Xt(u,t)};e.on("seeking",(function(){var n=e.seekable();if(n&&n.length){var t=n.start(0);e.currentTime()<t-.5&&e.currentTime(t)}}))}}function Zt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function er(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var nr="urn:x-cast:com.viewlift.player.caf",tr={eng:"en",spa:"es",esp:"es",cast:"es",fre:"fr",fra:"fr",ger:"de",deu:"de",por:"pt",ita:"it",dut:"nl",nld:"nl",chi:"zh",zho:"zh",cmn:"zh",yue:"zh",jpn:"ja",kor:"ko",ara:"ar",hin:"hi",rus:"ru",heb:"he",iw:"he",ind:"id",in:"id",fil:"tl",tgl:"tl",vie:"vi",tha:"th",tur:"tr",pol:"pl",swe:"sv",nor:"no",nob:"no",nb:"no",dan:"da",fin:"fi",gre:"el",ell:"el",cze:"cs",ces:"cs",ukr:"uk",rum:"ro",ron:"ro",hun:"hu",ben:"bn",tam:"ta",tel:"te",mal:"ml",kan:"kn",mar:"mr",pan:"pa",guj:"gu",urd:"ur"},rr=["und","mul","zxx"];function or(){try{return"true"===new URLSearchParams(window.location.search).get("castdebug")}catch(e){return!1}}function ir(){var e;or()&&(e=console).log.apply(e,arguments)}function lr(){var e;or()&&(e=console).warn.apply(e,arguments)}function ar(e){if(!e)return"";var n=String(e).trim().toLowerCase().replace(/_/g,"-").split("@")[0].split(".")[0].split("-").filter(Boolean),t=Qe(n),r=t[0],o=t.slice(1);return r?[tr[r]||r].concat(Xe(o)).join("-"):""}function ur(e){return ar(e).split("-")[0]}function sr(e){var n=ur(e);return!!n&&!rr.includes(n)}function cr(e,n){return sr(e)&&sr(n)&&ur(e)===ur(n)}function dr(e){return e?String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase():""}function vr(e,n){return!!e&&!!n&&dr(e)===dr(n)}function fr(e){return(null==e?void 0:e.language)||(null==e?void 0:e.lang)||""}function pr(e){return e?{language:fr(e)||void 0,label:e.label||void 0,roles:["captions"===e.kind?"caption":"subtitle"],forced:!!e.forced}:null}function mr(e){return e?{language:fr(e)||void 0,label:e.label||void 0}:null}function hr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(!n||!e.length)return null;for(var t=0,r=[function(e){return t=fr(e),r=n.language,sr(t)&&sr(r)&&ar(t)===ar(r);var t,r},function(e){return cr(fr(e),n.language)},function(e){return vr(e.label,n.label)}];t<r.length;t++){var o=r[t],i=e.filter(o);if(1===i.length)return i[0];if(i.length>1)return gr(i,n)}return null}function gr(e,n){var t=n.roles||[];return e.find((function(e){var n;return null===(n=e.roles)||void 0===n?void 0:n.some((function(e){return t.includes(e)}))}))||e[0]}var yr={textTracks:[],audioTracks:[],activeCaption:null,activeAudio:null};function br(e,n){if(!n)return null;var t=hr(e,n);return null!=(null==t?void 0:t.id)?{id:t.id}:n}function wr(e,n,t){if(!n)return!t;if(!t)return!1;var r=hr(e,t);return r&&null!=n.id?r.id===n.id:!!cr(fr(n),t.language)&&(!n.label||!t.label||vr(n.label,t.label))}function kr(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=function(){var e,n,t,r,o,i,l=null===(e=window)||void 0===e||null===(n=e.cast)||void 0===n?void 0:n.framework,a=null==l||null===(t=l.CastContext)||void 0===t||null===(r=t.getInstance)||void 0===r?void 0:r.call(t),u=null==a||null===(o=a.getCurrentSession)||void 0===o?void 0:o.call(a);return u&&"function"==typeof u.sendMessage?null!=l&&l.CastState&&(null===(i=a.getCastState)||void 0===i?void 0:i.call(a))!==l.CastState.CONNECTED?null:u:null}();if(t){var r=er(er({type:"COMMAND",source:"sender",command:e},n),{},{ts:Date.now()});ir("[Cast] ->",e,n);try{Promise.resolve(t.sendMessage(nr,r)).catch((function(n){return lr("[Cast] command failed",e,(null==n?void 0:n.message)||n)}))}catch(n){lr("[Cast] command failed",e,(null==n?void 0:n.message)||n)}}}var Sr=function(){return kr("play")},Cr=function(){return kr("pause")},Er=function(e){return kr("seek",{currentTime:e})},Tr=function(e){return kr("setPlaybackRate",{rate:e})},Or=function(e,n){return kr("setVolume",{volume:e,muted:n})},Dr=function(e){wr(yr.textTracks,yr.activeCaption,e)||kr("setCaption",{track:br(yr.textTracks,e)})},jr=function(e){e&&(wr(yr.audioTracks,yr.activeAudio,e)||kr("setAudio",{track:br(yr.audioTracks,e)}))};function xr(e){return e?e.tracks_||Array.from(e):[]}function Ir(e){var n;return xr(null===(n=e.textTracks)||void 0===n?void 0:n.call(e)).filter((function(e){return"captions"===e.kind||"subtitles"===e.kind}))}function _r(e){return"function"==typeof e.audioTracks?xr(e.audioTracks()):[]}function Pr(e){return Ir(e).find((function(e){return"showing"===e.mode}))||null}function Ar(e){return _r(e).find((function(e){return e.enabled}))||null}function Lr(e,n){var t=Ir(e),r=n?hr(t,n):null;n&&!r||t.forEach((function(e){e.mode=e===r?"showing":"disabled"}))}var Rr=null;var Nr=null;function Br(e,n){if("STATE"===n.type)return yr.textTracks=n.textTracks||[],yr.audioTracks=n.audioTracks||[],yr.activeCaption=n.activeCaption||null,yr.activeAudio=n.activeAudio||null,void function(){if(Nr&&(yr.textTracks.length||yr.audioTracks.length)){var e=Nr,n=e.caption,t=e.audio;Nr=null,Dr(n),jr(t)}}();if("LOG_STATUS"===n.type&&ir("[Cast] <- LOG_STATUS",n.type,n),"EVENT"===n.type)switch(ir("[Cast] <-",n.event,n),n.event){case"CaptionChanged":yr.activeCaption=n.activeCaption||null,Lr(e,yr.activeCaption);break;case"AudioChanged":yr.activeAudio=n.activeAudio||null,function(e,n){var t=n&&hr(_r(e),n);t&&!t.enabled&&(t.enabled=!0)}(e,yr.activeAudio);break;case"TracksChanged":yr.textTracks=[],yr.audioTracks=[];break;case"TrackUnresolved":lr("[Cast] receiver could not resolve track",n.kind,n.requested)}}var Mr=!1;function Ur(e){!function(e){var n,t,r,o,i,l,a=null===(n=window)||void 0===n||null===(t=n.cast)||void 0===t?void 0:t.framework,u=null==a||null===(r=a.CastContext)||void 0===r||null===(o=r.getInstance)||void 0===o?void 0:o.call(r);if(u){var s=function(n){n&&!n.__vlCastListening&&(n.__vlCastListening=!0,n.addMessageListener(nr,(function(n,t){try{var r="string"==typeof t?JSON.parse(t):t;"receiver"===(null==r?void 0:r.source)&&Br(e,r)}catch(e){lr("[Cast] could not handle receiver message",(null==e?void 0:e.message)||e,t)}})))};s(null===(i=u.getCurrentSession)||void 0===i?void 0:i.call(u)),!Mr&&null!=a&&null!==(l=a.CastContextEventType)&&void 0!==l&&l.SESSION_STATE_CHANGED&&(Mr=!0,u.addEventListener(a.CastContextEventType.SESSION_STATE_CHANGED,(function(){var e;return s(null===(e=u.getCurrentSession)||void 0===e?void 0:e.call(u))})))}}(e),e.addClass("vl-casting");var n=Pr(e);n&&(Rr=pr(n));var t=function(){return Lr(e,Rr)};e.one("loadeddata",(function(){return setTimeout(t,0)})),setTimeout(t,1500),function(e){var n=pr(Pr(e))||Rr,t=mr(Ar(e));ir("[Cast] syncing selected tracks",Nr={caption:n,audio:t}),kr("setCaption",{track:br(yr.textTracks,n)}),t&&kr("setAudio",{track:br(yr.audioTracks,t)})}(e)}function Fr(e){var n;if(e&&!e.__vlCastSyncBound){e.__vlCastSyncBound=!0,e.on("chromecastConnected",(function(){return Ur(e)})),e.on("chromecastDisconnected",(function(){e.removeClass("vl-casting"),yr.textTracks=[],yr.audioTracks=[],yr.activeCaption=null,yr.activeAudio=null,Nr=null}));var t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:150,t=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];clearTimeout(t),t=setTimeout((function(){return e.apply(void 0,o)}),n)}}((function(){return Or(e.volume(),e.muted())}));e.on("play",(function(){return Sr()})),e.on("pause",(function(){return Cr()})),e.on("seeked",(function(){return Er(e.currentTime())})),e.on("volumechange",t),e.on("ratechange",(function(){return Tr(e.playbackRate())})),e.on("texttrackchange",(function(){var n=pr(Pr(e));n&&(Rr=n),Dr(n)}));var r="function"==typeof e.audioTracks?e.audioTracks():null;null==r||null===(n=r.addEventListener)||void 0===n||n.call(r,"change",(function(){return jr(mr(Ar(e)))}))}}function Vr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Hr(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function zr(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Gr(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Gr(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Gr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var qr={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0},Wr=function(e){var n;if(e){var t=function(){var n,t="function"==typeof e.currentWidth&&e.currentWidth()||(null===(n=e.el())||void 0===n?void 0:n.clientWidth)||0;e.toggleClass("vlp-hide-pip",t<=500&&function(){var n,t=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);if(!t)return!1;for(var r=0;r<t.length;r++){var o,i=null===(o=t[r])||void 0===o?void 0:o.kind;if("captions"===i||"subtitles"===i)return!0}return!1}())};t(),e.on("playerresize",t),e.on("fullscreenchange",t);var r=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);null!=r&&r.addEventListener&&(r.addEventListener("addtrack",t),r.addEventListener("removetrack",t),e.on("dispose",(function(){r.removeEventListener("addtrack",t),r.removeEventListener("removetrack",t)})))}};function Kr(e,n,t){var r=Ke.getConfig()||{};M(e,{status:t,message:"DRM ".concat(n," request failed")},"playback",{requestKind:n,videoId:null==r?void 0:r.videoId})}function Yr(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var o=n[r[t]];if("string"==typeof o)return o;if(null!=o&&o.url)return o.url;if(null!=o&&o.licenseUri)return o.licenseUri}var i=null==e?void 0:e.keySystemOptions;if(Array.isArray(i)){var l,a=zr(i);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function $r(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return Yr("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function Jr(e,n){n&&!n.__vlDrmDashHooksInstalled&&(n.__vlDrmDashHooksInstalled=!0,"function"==typeof n.addResponseInterceptor&&n.addResponseInterceptor((function(e){try{var n=(null==e?void 0:e.request)||{},t=(null==e?void 0:e.url)||(null==n?void 0:n.url)||"",r=U(t,(null==n?void 0:n.type)||(null==e?void 0:e.type));if(F(r)){var o=V(e,null);H(o)||Kr(t,r,o)}}catch(e){}return Promise.resolve(e)})),"function"==typeof n.registerLicenseRequestFilter&&n.registerLicenseRequestFilter((function(e){try{null!=e&&e.url&&(n.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()})),"function"==typeof n.on&&n.on("public_licenseRequestComplete",(function(t){try{var r,o,i,l;if(null==t||!t.error)return;var a=null!==(r=null==t||null===(o=t.error)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.responseCode)&&void 0!==r?r:V(null,t.error);Kr((null==t||null===(l=t.data)||void 0===l?void 0:l.url)||n.__vlLastLicenseUrl||$r(e)||"","license",a)}catch(e){}})))}var Xr=!1,Qr=null,Zr=new Set;function eo(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,Zr.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,Zr.delete(e),function(){if(Xr&&!(Zr.size>0)){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof Qr&&e.removeHook("beforeinitialize",Qr),Xr=!1,Qr=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function no(e){if(e){eo(e),function(){if(!Xr){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.hook&&(Qr=function(e,n){null!=e&&e.__vlDrmDashEnabled&&Jr(e,n)},Xr=!0,e.hook("beforeinitialize",Qr))}}(),function(e){e&&!e.__vlEmeDrmErrorInstalled&&(e.__vlEmeDrmErrorInstalled=!0,e.on("error",(function(){try{var n,t="function"==typeof e.error?e.error():null;if(!t||!B(t))return;if(null!=e&&null!==(n=e.dash)&&void 0!==n&&n.mediaPlayer)return;Kr($r(e),"license",null)}catch(e){}})))}(e);var n=function(){var n;!function(e){var n,t,r=null==e||null===(n=e.tech_)||void 0===n||null===(t=n.vhs)||void 0===t?void 0:t.xhr;r&&"function"==typeof r.onResponse&&!e.__vlDrmVhsHooksInstalled&&(e.__vlDrmVhsHooksInstalled=!0,r.onResponse((function(e,n,t){try{var r=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(e),o=U(r,null==e?void 0:e.type);if(!F(o))return;var i=V(t,n);H(i)&&!n||Kr(r,o,i)}catch(e){}})))}(e),Jr(e,null==e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer)};n(),e.on("xhr-hooks-ready",n),e.on("loadstart",(function(){setTimeout(n,0)}))}}var to=function(o,i,l,a){var u,s,c,d,v,f,p,m,h,g,w,k,S,C,E,T,D,j,B,M,U,F,V,H,z,G,q,W,K,Y,$,J,X,Q,Z,ee,ne,te,re=i.res,oe=void 0===re?null:re,ie=i.sres,le=void 0===ie?null:ie,ae=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=qr[r]?qr[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ue=ae.playerDebug,se=ae.logLevel,ce=ae.dashLogLevel;ue&&(console.log("[PLAYER DEBUG] config:",l),console.log("[PLAYER DEBUG] entitlement (res):",oe),le&&console.log("[PLAYER DEBUG] series response (sres):",le));var de=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],ve=(null===(u=oe)||void 0===u?void 0:u.contentType)||"video",fe=Ve(null===(s=oe)||void 0===s||null===(c=s[ve])||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.videoImageUrl)||Ve(null===(v=oe)||void 0===v||null===(f=v[ve])||void 0===f||null===(p=f.gist)||void 0===p||null===(m=p.imageGist)||void 0===m?void 0:m.r16x9),pe=(null===(h=oe)||void 0===h||null===(g=h[ve])||void 0===g||null===(w=g.liveDetails)||void 0===w?void 0:w.isDvrEnabled)||!1,me=!(null===(k=oe)||void 0===k||null===(S=k[ve])||void 0===S||null===(C=S.streamingInfo)||void 0===C||!C.isLiveStream)||"linearchannel"===ve,he=(null===(E=oe)||void 0===E||null===(T=E.ads)||void 0===T||null===(D=T.preRoll)||void 0===D||null===(j=D.adTags)||void 0===j||null===(B=j.web)||void 0===B?void 0:B.active)&&(null===(M=oe)||void 0===M||null===(U=M.ads)||void 0===U||null===(F=U.preRoll)||void 0===F||null===(V=F.adTags)||void 0===V||null===(H=V.web)||void 0===H?void 0:H.url);oe=Hr(Hr({},oe),{},{audioAssetSource:null==l?void 0:l.audioAssetSource});var ge=(null==l||null===(z=l.customData)||void 0===z?void 0:z.ads)||{},ye=(null===(G=oe)||void 0===G||null===(q=G[ve])||void 0===q?void 0:q.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ge?void 0:ge.vodAdSticherProvider)||!1,be=!(null===(W=oe)||void 0===W||null===(K=W[ve])||void 0===K||!K.isSSAIEnabled)&&"TRANSMIT"==(null==ge?void 0:ge.liveAdSticherProvider)&&!(null==ge||!ge.liveAdClientSideTracking),we=(null==l?void 0:l.latency)||6,ke=(null==l?void 0:l.skin_settings)||{},Se=(ne={enableSmoothSeeking:!0,controls:0!=(null==l?void 0:l.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==l?void 0:l.muted)||!1,autoplay:(null==l?void 0:l.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ke?void 0:ke.pictureInPictureToggle)||!1},playbackRates:null!=ke&&ke.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==l.skin,liveui:pe},e(ne,"autoplay",null==l?void 0:l.autoplay),e(ne,"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!he),e(ne,"loop",(null==l?void 0:l.loop)||!1),e(ne,"audioPosterMode",null==l?void 0:l.audioPosterMode),e(ne,"html5",Hr(Hr({dash:Hr(Hr({},!r.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Hr(Hr({},((null==l?void 0:l.debugConfig)&&(null==l||null===(Y=l.debugConfig)||void 0===Y?void 0:Y.enable)||ue)&&{debug:{logLevel:ce}}),{},{streaming:{parseInbandPrft:!0,delay:{liveDelay:we},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Hr({},"IE"==ze()&&{enableStallFix:!0,stallSeek:1}),abr:Hr(Hr(Hr(Hr({},(null==l?void 0:l.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==l?void 0:l.initialBandwidth)/1e3}}),(null==l?void 0:l.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==l?void 0:l.maxBitrate)/1e3}}),(null==l?void 0:l.minBitrate)&&{minBitrate:{audio:-1,video:(null==l?void 0:l.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:Hr(Hr(Hr({},(null==l?void 0:l.initialBandwidth)&&{bandwidth:l.initialBandwidth}),{},{liveRangeSafeTimeDelta:we,useDevicePixelRatio:!0,experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==l||!l.initialBandwidth},(null==l||null===($=l.customData)||void 0===$?void 0:$.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(J=null==l?void 0:l.enableLowInitialPlaylist)&&void 0!==J&&J},((null==l?void 0:l.debugConfig)&&(null==l||null===(X=l.debugConfig)||void 0===X?void 0:X.enable)||ue)&&{debug:!0}),debug:(null==l?void 0:l.debugConfig)&&(null==l||null===(Q=l.debugConfig)||void 0===Q?void 0:Q.enable)||ue||!1,nativeTextTracks:"Safari"==ze()},0==(null==l||null===(Z=l.customData)||void 0===Z?void 0:Z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(ee=l.customData)||void 0===ee?void 0:ee.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ne,"poster",fe),e(ne,"techOrder",de),e(ne,"chromecast",{requestCustomDataFn:function(e){var n,t,r=Me(o),i=((null==r?void 0:r.textTracksJson_)||r.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),a=function(e,n,t){var r,o,i,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,h,g,y,b,w,k,S;p.isDrmEnabled=!0;var C=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,E=(null==C?void 0:C.url)||(null==n||null===(h=n.keySystemOptions)||void 0===h||null===(g=h[0])||void 0===g||null===(y=g.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=E;var T=(null==C?void 0:C.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=T}var O=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=O;var D=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=D;var j=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=j;var x,I,_=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=_,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,void 0!==("undefined"==typeof window?"undefined":We(window))&&(p.siteId=(null===(x=window)||void 0===x?void 0:x.siteId)||null,p.userId=(null===(I=window)||void 0===I?void 0:I.sessionStorage)&&window.sessionStorage.getItem("uid")||null),console.log(p),p}(oe,e,i),u=i.find((function(e){return"showing"===e.mode}))||null;return Rr=pr(u),Hr(Hr({},a),{},{activeCaption:{enabled:!!u,language:(null==u?void 0:u.language)||(null==u?void 0:u.lang)||null,label:(null==u?void 0:u.label)||null},transmitTrackingUrl:x.get()||null,convivaMetaData:Hr({customerKey:(null==l||null===(n=l.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==l||null===(t=l.convivaConfig)||void 0===t?void 0:t.debug)||!1},st.getData())})},modifyLoadRequestFn:function(e){var n,t,r,i,l,a=Me(o),u=(null==a?void 0:a.currentSource())||{};!(null===(n=oe)||void 0===n||null===(t=n[ve])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ne);if(!r.getPlayers()[o]){(null!=l&&l.debugConfig&&null!=l&&null!==(te=l.debugConfig)&&void 0!==te&&te.enable||ue)&&r.log.level(se||"debug");var Ce=r(o,Se,function(){var e=n(t.mark((function e(){var n,i,u,s,c,d,v,f,p,m,h,g,w,k,S,C,E,T,D,j,x,B,M,U,F,V;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return no(Ce),Wr(Ce),console.log(Ce),console.log(r.VERSION),console.log(r.getPlugins()),e.next=7,Gn(l,oe);case 7:if(null!=l&&l.debugConfig&&null!=l&&null!==(n=l.debugConfig)&&void 0!==n&&n.enable||ue){try{r.log.level(se||"debug")}catch(e){}(C=function(){try{var e,n,t;null==Ce||null===(e=Ce.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:ce}})}catch(e){}})(),Ce.one("loadedmetadata",C)}if(E=null===(i=oe)||void 0===i||null===(u=i[ve])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.startOverTime,null!=l&&l.disableControls||Vt(o,{liveVideo:me,isDvrEnabled:pe,res:oe}),me&&a.resolve(Hr({status:!0,msg:"Player Initialised"},le?{seriesResponse:le,response:oe}:{response:oe})),P(o,{content:oe,analyticsCb:null==l?void 0:l.analyticsCb,analyticsEventParams:null==l?void 0:l.analyticsEventParams,userId:null==l?void 0:l.userId}),ut(o,l),Fr(Ce),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),pe&&Pn(o,E),!he||null!=l&&null!==(c=l.customData)&&void 0!==c&&c.disableAds||A(o,he,oe),null!=l&&l.disableControls||L(o,{config:l,content:oe,liveVideo:me,isDvrEnabled:pe}),T=y(oe,o),console.log(T),ue&&(console.log("[PLAYER DEBUG] source:",T),console.log("[PLAYER DEBUG] videojs options:",Se)),null!=l&&l.nearestClusterUrl&&(T=R(T,l.nearestClusterUrl)),!ye){e.next=28;break}return e.next=25,N(o,oe);case 25:T=e.sent,e.next=32;break;case 28:if(!be){e.next=32;break}return e.next=31,_(T,oe,o);case 31:T=e.sent;case 32:Ce&&(Ce.__vlDrmLicenseUrl=Yr(T)),T?b(o,T):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:oe}),O(o,"Incompatible / Missing Source")),D=null===(d=oe)||void 0===d||null===(v=d[ve])||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.scheduleStartDate,me&&pe&&(D||E)&&Qt(Ce,{scheduleStartDate:D,startOverTime:E}),((null===(p=oe)||void 0===p||null===(m=p[ve])||void 0===m||null===(h=m.contentDetails)||void 0===h||null===(g=h.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(w=oe)||void 0===w||null===(k=w[ve])||void 0===k||null===(S=k.closedCaptions)||void 0===S?void 0:S.length)>0)&&(V=(null===(x=oe)||void 0===x||null===(B=x[ve])||void 0===B||null===(M=B.contentDetails)||void 0===M?void 0:M.closedCaptions)||(null===(U=oe)||void 0===U||null===(F=U[ve])||void 0===F?void 0:F.closedCaptions),j=V.filter((function(e){return"VTT"===e.format})),Le(o,j)),null!=l&&l.disableControls?I(o):ct(o,Hr(Hr(Hr({},l),Se),{},{liveVideo:me,isDvrEnabled:pe,res:oe,sres:le})),Jt(o,Hr(Hr(Hr({},l),Se),{},{liveVideo:me}),a,{res:oe,sres:le});case 39:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}};function ro(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function oo(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ro(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):ro(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var io=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=lo(e);to(o,{res:i},e,{resolve:t,reject:r})},lo=function(e){var n,t,r,o,i,l,a,u,s,c,d,v,f,p,m,h=null==e?void 0:e.streamingInfo,g=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,y=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,b=(null==e||null===(r=e.streamingInfo)||void 0===r||null===(o=r.ads)||void 0===o?void 0:o.url)||null,w=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,k=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],S=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,C=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],E=(null==e||null===(c=e.customData)||void 0===c||null===(d=c.ads)||void 0===d?void 0:d.isSSAIEnabled)||!1,T=(null==e||null===(v=e.streamingInfo)||void 0===v?void 0:v.scheduleStartDate)||null,O=(null==e||null===(f=e.streamingInfo)||void 0===f?void 0:f.startOverTime)||null,D=null==e?void 0:e.token,j=z(D);null==j||j.site;var x=null==j?void 0:j.siteId,I=(null==e||null===(p=e.customData)||void 0===p||null===(m=p.comscore)||void 0===m?void 0:m.video)||null,_=oo(oo({id:x?"".concat(x,"_external"):"external"},!y&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:oo(oo(oo(oo(oo({drmEnabled:y,streamingInfo:oo(oo({videoAssets:oo(oo({},S&&{drmProvider:S}),{},{widevine:null==g?void 0:g.widevine,fairPlay:null==g?void 0:g.fairPlay,playReady:null==g?void 0:g.playReady})},(null==h?void 0:h.isDvrEnabled)&&{isLiveStream:!0}),(null==I?void 0:I.isLiveStream)&&{isLiveStream:null==I?void 0:I.isLiveStream})},E&&{isSSAIEnabled:E}),{},{metadata:C,liveDetails:oo({isDvrEnabled:null==h?void 0:h.isDvrEnabled},O&&{startOverTime:O}),gist:oo(oo(oo(oo({},w&&{videoImageUrl:w}),T&&{scheduleStartDate:T}),(null==I?void 0:I.videoId)&&{id:null==I?void 0:I.videoId}),(null==I?void 0:I.videoTitle)&&{title:null==I?void 0:I.videoTitle}),contentDetails:oo({},(null==k?void 0:k.length)>0&&{closedCaptions:Xe(k)})},(null==I?void 0:I.runtime)&&{runtime:null==I?void 0:I.runtime}),(null==I?void 0:I.publishDate)&&{publishDate:null==I?void 0:I.publishDate}),(null==I?void 0:I.platform)&&{platform:null==I?void 0:I.platform}),(null==I?void 0:I.series)&&{series:null==I?void 0:I.series}),ads:{preRoll:{adTags:{web:oo(oo({},b&&{active:!0}),b&&{url:b})}}}});return I&&(null!=I&&I.isDvrEnabled&&(_.video.liveDetails=oo(oo({},_.video.liveDetails),{},{isDvrEnabled:null==I?void 0:I.isDvrEnabled})),null!=I&&I.metadata&&(_.video.metadata=[].concat(Xe(_.video.metadata),Xe(null==I?void 0:I.metadata)))),_},ao=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||"");return t.has("ssaiDisable")?t.get("ssaiDisable"):null}catch(e){return null}};function uo(e,n){return so.apply(this,arguments)}function so(){return(so=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,u=null==n?void 0:n.videoId,s=null==n?void 0:n.playerId,c=!(null==n||!n.anonymousId),e.next=6,Y();case 6:d=e.sent,v=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),null!==(f=ao())&&(v="true"===f),G(u,d,v).then((function(e){var t,r,o,i,v,f,p,m,h,g,y;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,w(null==e?void 0:e.data);var b=null==e||null===(i=e.data)||void 0===i||null===(v=i.video)||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.scheduleEndDate,k=null==e||null===(p=e.data)||void 0===p||null===(m=p.video)||void 0===m||null===(h=m.gist)||void 0===h?void 0:h.scheduleStartDate;be(s,{scheduleEndDate:b,scheduleStartDate:k});var S=null==e?void 0:e.data;if(null!=n&&null!==(g=n.watchHistory)&&void 0!==g&&g.isExternal)S.contentType="video",to(s,{res:S},n,{resolve:l,reject:a});else if(null!=n&&n.watchHistory&&null!=n&&null!==(y=n.watchHistory)&&void 0!==y&&y.enable&&!c){var C;if((null===(C=n.watchHistory)||void 0===C?void 0:C.saveOffline)||!1){var E,T,O,D=(null===(E=n.watchHistory)||void 0===E?void 0:E.profileId)||"",j=q(D,u,null==n?void 0:n.siteOwner);if(j&&j.length)n.watchHistoryResumeTime=(null===(T=j[0])||void 0===T?void 0:T.watchedTime)||null,n.watchedPercentage=(null===(O=j[0])||void 0===O?void 0:O.watchedPercentage)||null;S.contentType="video",to(s,{res:S},n,{resolve:l,reject:a})}else W(u,d).then((function(e){var t,r,o,i,l,a;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"})).catch((function(){})).finally((function(){to(s,{res:S},n,{resolve:l,reject:a})}))}else to(s,{res:S},n,{resolve:l,reject:a})})).catch((function(e){var t,r,o=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,i=(null==n||null===(r=n.event)||void 0===r?void 0:r.onCountdownComplete)||null;o&&we(s,e,i),K(e,s,a,u)}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function co(e,n){return vo.apply(this,arguments)}function vo(){return(vo=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,e.next=3,Y();case 3:u=e.sent,s=null==n?void 0:n.playerId,c=null==n?void 0:n.epg,d=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),$(c,u,d).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==c?void 0:c.channelId,w(t),to(s,{res:t},n,{resolve:l,reject:a})})).catch((function(e){K(e,s,a,videoId)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fo(e,n){return po.apply(this,arguments)}function po(){return(po=n(t.mark((function e(n,r){var o,i,l,a,u,s,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.resolve,l=r.reject,e.next=3,Y();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,Q.set(parseInt(s)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,J(c,a).then((function(e){var t,r,o,s=e.data,d=e.data.seasons;Z(d);var v=videoId||(null==d||null===(t=d[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.id);X(c,a),G(v,a).then((function(e){var t,r,o;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,w(e.data),to(u,{res:null==e?void 0:e.data,sres:s},n,{resolve:i,reject:l})})).catch((function(e){K(e,u,l,videoId)}))})).catch((function(e){K(e,u,l)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var mo,ho=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,o=e.sseEndpoint,i=e.debug;if(n){var l=function(e){var n=e.site,t=e.sseBaseUrl,r=e.sseEndpoint,o=e.debug,i=void 0!==o&&o;return Ze({site:n,sseBaseUrl:t,getToken:Y,sseEndpoint:r,onOpen:function(e){var n=e.userId,t=e.endpoint;i&&console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,r,o,l,a,u,s,c,d;if(i&&console.log("SSE Message:",e),(null===(n=m())||void 0===n||null===(t=n.video)||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.id)===(null==e||null===(o=e.payload)||void 0===o?void 0:o.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var v=1e3*(null==e||null===(l=e.payload)||void 0===l||null===(a=l.states)||void 0===a||null===(u=a.live)||void 0===u?void 0:u.startDateTime),f=1e3*(null==e||null===(s=e.payload)||void 0===s||null===(c=s.states)||void 0===c||null===(d=c.end)||void 0===d?void 0:d.endDateTime);v&&f&&(console.log("Setting schedule timer",v,f),ke.set({startDateTime:v,endDateTime:f}))}},onReconnectAttempt:function(e){i&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;i&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){i&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){i&&console.error("SSE Error:",e,n)},onClose:function(){i&&console.log("SSE Closed")}})}({site:t,sseBaseUrl:r,sseEndpoint:o,debug:void 0!==i&&i});return l._sseBaseUrl=r,l._site=t,l._sseEndpoint=o,l}};function go(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function yo(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?go(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):go(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function bo(){return{loadVideoInstantly:ee,onTimeUpdate:Se,getVideoDuration:Ce,onVideoEnded:Ee,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=n(t.mark((function n(r,o){var i,l,a,u,s,c,d,v,f,p,m,h,g,y,b,w,k,S,C,E,T,O,D,j,x,I,_,P,A,L,R;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!ie(null==e?void 0:e.playerId)){n.next=3;break}return r({status:!0,msg:"Player already initialised",skipped:!0}),n.abrupt("return");case 3:if(S=(null==e?void 0:e.videoSourceUrl)||!1,C=null==e?void 0:e.asat,E=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,T=null==e?void 0:e.videoId,O=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,D=(null==e?void 0:e.streamingInfo)||!1,window.videoId=T,j=null==e?void 0:e.token,!me(e)){n.next=18;break}if(sessionStorage.setItem("vlp_token",j),he().set(null==e?void 0:e.refreshToken),j&&!ge(j)){n.next=17;break}return o({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),n.abrupt("return");case 17:mo=JSON.parse(atob(j.split(".")[1]));case 18:return window.siteName=null===(a=mo)||void 0===a?void 0:a.site,window.siteId=null===(u=mo)||void 0===u?void 0:u.siteId,e.isAnonymousUser=!(null===(s=mo)||void 0===s||!s.anonymousId),e.siteOwner=(null===(c=mo)||void 0===c?void 0:c.site)||null,e.userId=(null===(d=mo)||void 0===d?void 0:d.userId)||null,fe((null===(v=mo)||void 0===v?void 0:v.userId)||(null===(f=mo)||void 0===f?void 0:f.anonymousId)||null),window.watchHistory=e.watchHistory||null,x=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable?null:null==e?void 0:e.chromecastReceiverId,I=(null==e||null===(m=e.analytics)||void 0===m?void 0:m.gaId)||null,(_=null==e?void 0:e.errors)&&(window.customErrors=_),window.customData=null==e?void 0:e.customData,Ge(qe(e)),pe.set(e.apiBaseUrl),null!=e&&e.skin&&!He(e.skin)||(e.skin="VL_ONE"),Ke.setConfig(e),en.reset(),en.set(null==e?void 0:e.relatedVideos),n.next=39,Fn(e);case 39:I&&Dn("https://www.googletagmanager.com/gtag/js?id=".concat(I)).then((function(){return ye(I)})).catch((function(e){})),(P=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(x)))&&P.addEventListener("contextmenu",(function(e){return e.preventDefault()})),(A=ho({enable:null==e||null===(g=e.sse)||void 0===g?void 0:g.enable,site:null==e||null===(y=e.sse)||void 0===y?void 0:y.siteName,sseBaseUrl:null==e||null===(b=e.sse)||void 0===b?void 0:b.sseBaseUrl,sseEndpoint:null==e||null===(w=e.sse)||void 0===w?void 0:w.sseEndpoint,debug:null==e||null===(k=e.sse)||void 0===k?void 0:k.debug}))&&!A.isConnectionActive()&&A.connect(),S?(R={directPlaybackUrl:S,id:L="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}},C?G(L,j).then((function(n){var t,i=(null==n?void 0:n.data)||{},l=yo(yo(yo({},i),R),{},{video:yo(yo({},null==i?void 0:i.video),{},{liveDetails:yo(yo({},null==i||null===(t=i.video)||void 0===t?void 0:t.liveDetails),{},{isDvrEnabled:!(null==e||!e.isDvr)})})});to(x,{res:l},e,{resolve:r,reject:o})})).catch((function(e){K(e,x,o,L)})):to(x,{res:yo(yo({},R),{},{video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}})},e,{resolve:r,reject:o})):D?io(e,{resolve:r,reject:o}):O?fo(e,{resolve:r,reject:o}):E?co(e,{resolve:r,reject:o}):uo(e,{resolve:r,reject:o});case 45:case"end":return n.stop()}}),n)})));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:Ne,skip:ne,getPlayer:Me,play:te,pause:re,detectBrowser:ze,rewind:oe,loadVideo:b,seekToTimeStamp:Te,isPlayerInitialised:ie,load:le,authenticateLC:ae,dispose:ue,enableCaptions:Re,disableCaptions:_e,getCaptions:Ie,playSelectedResolution:Be,getSource:y,setVolume:xn,getVolume:In,disableControls:I,setPlaybackSpeed:Oe,getEntitlementData:se,getSsaiEvents:ce,getPlayerControlEvents:Je,playerEvents:De,onReplay:je,relatedVideosManager:en,setChapters:Nt,getChapters:Bt,clearChapters:Mt,seekToChapter:Ut,getChapterEvents:Et,onWatchInVerticalView:xe,fireBeaconEvent:de,getDvrManager:ve}}export{bo as default};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import r from"video.js";import o from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/get";import a from"@babel/runtime/helpers/inherits";import u from"@babel/runtime/helpers/possibleConstructorReturn";import s from"@babel/runtime/helpers/getPrototypeOf";import{c,g as d,a as v,b as f,d as p,e as m,f as h,h as g,i as y,l as b,s as w,v as k,j as S,k as C,m as E,n as T,o as O,p as D,q as j,t as x,r as I,u as _,w as P,x as A,y as L,z as R,A as N,B,C as M,D as U,E as F,F as V,G as H,H as z,I as G,J as q,K as W,L as K,M as Y,N as $,O as J,P as X,Q,R as Z,S as ee,T as ne,U as te,V as re,W as oe,X as ie,Y as le,Z as ae,_ as ue,$ as se,a0 as ce,a1 as de,a2 as ve,a3 as fe,a4 as pe,a5 as me,a6 as he,a7 as ge,a8 as ye}from"./generic-72bc2234.js";import{h as be,a as we,s as ke,o as Se,g as Ce,b as Ee,c as Te,d as Oe,p as De,e as je,f as xe}from"./index-27b173c2.js";import{g as Ie,d as _e,s as Pe,r as Ae,a as Le,e as Re}from"./captions-90173c21.js";import{g as Ne}from"./renditions-28891b91.js";import{p as Be}from"./resolution-d9d21f0e.js";import{g as Me,t as Ue,p as Fe,i as Ve,a as He}from"./skin-2a3ee818.js";import{d as ze}from"./browser-02f174cf.js";import{s as Ge,r as qe}from"./localisation-2f1ee38c.js";import We from"@babel/runtime/helpers/typeof";import{p as Ke}from"./manager-d812dea7.js";import{i as Ye,r as $e,g as Je}from"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import Xe from"@babel/runtime/helpers/toConsumableArray";import Qe from"@babel/runtime/helpers/toArray";import{createSSETransport as Ze}from"@viewlift/sse";import{r as en}from"./relatedVideosManager-93533a90.js";import"axios";import"md5";import"js-cookie";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/assertThisInitialized";function nn(e,n,t,r){var o=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function tn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tn=function(){return!!e})()}var rn=r.getComponent("TextTrackSettings"),on=r.dom,ln=[{value:"0.50",label:"50%"},{value:"0.75",label:"75%"},{value:"1.00",label:"100%"},{value:"1.25",label:"125%"},{value:"1.50",label:"150%"},{value:"1.75",label:"175%"},{value:"2.00",label:"200%"},{value:"3.00",label:"300%"},{value:"4.00",label:"400%"}],an=ln.map((function(e){return e.value})),un="1.00",sn=".vjs-font-percent > select",cn="vlp-caption-font-size-style",dn="#FFF",vn="1",fn="#000",pn="1",mn="#000",hn="0",gn="proportionalSansSerif",yn="#222",bn="#ccc",wn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},kn=function(e,n){var t=parseFloat(e);return isNaN(t)?n:t},Sn=function(e,n){var t;if(e&&4===e.length)t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(!e||7!==e.length)return e;t=e.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+n+")"},Cn=null;function En(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(En=function(){return!!e})()}rn?(Cn=function(){a(r,rn);var e,n,t=(e=r,n=tn(),function(){var t,r=s(e);if(n){var o=s(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)});function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).customReady_=!0,i.customUiReady_=!0,i.triggerEl_=null,i.applyCustomFontSizeUI_(),i}return i(r,[{key:"conditionalFocus_",value:function(){this.triggerEl_=this.getCaptionsTrigger_(),this.previouslyActiveEl_=null,this.focus()}},{key:"conditionalBlur_",value:function(){this.previouslyActiveEl_=null;var e=this.player_;e&&"function"==typeof e.userActive&&e.userActive(!0);var n=this.triggerEl_||this.getCaptionsTrigger_();this.triggerEl_=null;var t=function(){n&&"function"==typeof n.focus&&n.focus()};"undefined"!=typeof window&&"function"==typeof window.setTimeout?window.setTimeout(t,0):t()}},{key:"getCaptionsTrigger_",value:function(){var e=this.player_&&this.player_.controlBar;return e&&(e.subsCapsButton||e.captionsButton||e.subtitlesButton)||null}},{key:"applyCustomFontSizeUI_",value:function(){var e=this;this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.on(this.player_,["playerresize","fullscreenchange"],(function(){return e.applyDashCaptionStyles_()})),this.applyDashCaptionStyles_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(sn);if(e){for(var n=e.value;e.firstChild;)e.removeChild(e.firstChild);ln.forEach((function(n){e.appendChild(on.createEl("option",{value:n.value,textContent:n.label}))})),e.value=-1!==an.indexOf(n)?n:un}}},{key:"bindCaptionStyleChange_",value:function(){for(var e=this,n=this.$$("select"),t=0;t<n.length;t++)this.on(n[t],"change",(function(){return e.applyDashCaptionStyles_()}))}},{key:"selectedMultiplier_",value:function(){var e=this.$(sn),n=e&&-1!==an.indexOf(e.value)?e.value:un;return parseFloat(n)}},{key:"styleEl_",value:function(){if("undefined"==typeof document)return null;var e=document.getElementById(cn);return e||((e=document.createElement("style")).id=cn,document.head.appendChild(e)),e}},{key:"applyDashCaptionStyles_",value:function(){if(this.customReady_){var e;try{e="function"==typeof this.getValues&&this.getValues()||{}}catch(e){return}var n=this.styleEl_(),t=this.player_&&this.player_.el();if(n&&t){var r=[];(e.color&&e.color!==dn||e.textOpacity&&e.textOpacity!==vn)&&r.push("color: "+Sn(e.color||dn,kn(e.textOpacity,1))+" !important");var o=function(e){switch(e){case"dropshadow":return"2px 2px 3px ".concat(yn,", 2px 2px 4px ").concat(yn,", 2px 2px 5px ").concat(yn);case"raised":return"1px 1px ".concat(yn,", 2px 2px ").concat(yn,", 3px 3px ").concat(yn);case"depressed":return"1px 1px ".concat(bn,", 0 1px ").concat(bn,", -1px -1px ").concat(yn,", 0 -1px ").concat(yn);case"uniform":return"0 0 4px ".concat(yn,", 0 0 4px ").concat(yn,", 0 0 4px ").concat(yn,", 0 0 4px ").concat(yn);default:return""}}(e.edgeStyle);o&&r.push("text-shadow: "+o+" !important"),"small-caps"===e.fontFamily?(r.push("font-family: "+wn[gn]+" !important"),r.push("font-variant: small-caps !important")):e.fontFamily&&e.fontFamily!==gn&&wn[e.fontFamily]?(r.push("font-family: "+wn[e.fontFamily]+" !important"),r.push("font-variant: normal !important")):r.push("font-variant: normal !important");var i=this.selectedMultiplier_(),l="function"==typeof this.player_.currentHeight&&this.player_.currentHeight()||t.offsetHeight||0;if(1!==i&&l){var a=Math.round(.05*l*i*100)/100;r.push("font-size: "+a+"px !important"),r.push("line-height: normal !important")}var u=e.backgroundColor&&e.backgroundColor!==fn||e.backgroundOpacity&&e.backgroundOpacity!==pn?"background-color: "+Sn(e.backgroundColor||fn,kn(e.backgroundOpacity,1))+" !important":"",s=e.windowColor&&e.windowColor!==mn||e.windowOpacity&&e.windowOpacity!==hn?"background-color: "+Sn(e.windowColor||mn,kn(e.windowOpacity,0))+" !important":"",c=[];r.length&&c.push(".vjs-text-track-display-ttml div,.vjs-text-track-display-ttml span,.vjs-text-track-display-ttml p{"+r.join(";")+"}"),s&&c.push(".vjs-text-track-display-ttml p{"+s+"}"),u&&c.push(".vjs-text-track-display-ttml span{"+u+"}"),n.textContent=c.join("")}}}},{key:"setDefaults",value:function(){if(nn(r,"setDefaults",this,3)([]),this.applyDashCaptionStyles_(),"function"==typeof Event)for(var e=this.$$("select"),n=0;n<e.length;n++)e[n].dispatchEvent(new Event("change",{bubbles:!0}))}},{key:"handleLanguagechange",value:function(){nn(r,"handleLanguagechange",this,3)([]),this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.applyDashCaptionStyles_()}},{key:"close",value:function(){var e=this.opened_;nn(r,"close",this,3)([]),e&&this.focusCaptionsButton_()}},{key:"focusCaptionsButton_",value:function(){var e=this.player_&&this.player_.controlBar;if(e){var n=e.getChild("SubsCapsButton")||e.getChild("CaptionsButton")||e.getChild("SubtitlesButton");n&&"function"==typeof n.focus&&n.focus()}}}]),r}(),r.registerComponent("TextTrackSettings",Cn)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var Tn=r.getComponent("SubsCapsButton"),On=null;Tn?(On=function(){a(r,Tn);var e,n,t=(e=r,n=En(),function(){var t,r=s(e);if(n){var o=s(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)});function r(){return o(this,r),t.apply(this,arguments)}return i(r,[{key:"pressButton",value:function(){!function(e,n,t,r){var o=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof o?function(e){return o.apply(t,e)}:o}(r,"pressButton",this,3)([]),this.buttonPressed_&&this.focusFirstVisibleItem_()}},{key:"focusFirstVisibleItem_",value:function(){if(this.menu&&this.menu.el_&&this.menu.el_.contains(document.activeElement)){var e=this.menu.children().slice();e.length&&e[0].hasClass("vjs-menu-title")&&e.shift();for(var n=0;n<e.length&&e[n].hasClass("vjs-texttrack-settings");)n++;n>0&&n<e.length&&this.menu.focus(n)}}}]),r}(),r.registerComponent("SubsCapsButton",On)):console.warn("[vlp] CustomSubsCapsButton: video.js SubsCapsButton is not registered; skipping override.");var Dn=function(e){return new Promise((function(n,t){if(jn(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}}))},jn=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},xn=function(e,n,t){var r=Me(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},In=function(e){var n=Me(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},_n=function(){var e=n(t.mark((function e(n){var o,i,l,a,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Me(null==n?void 0:n.playerId),null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("./index-cbb86a6c.js").then((function(e){return e.i}));case 4:return a=e.sent,e.prev=5,e.next=8,Dn("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(r),e.finish(13);case 16:(u=r.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==ze()?null==i||i.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(n){return e.apply(this,arguments)}}(),Pn=function(e,n){var t=Me(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,l,a,u=this.el(),s=r.dom.getPointerPosition(u,n).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}}))};var An=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),Dn("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ln=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("@viewlift/comscore/index.js").then((function(e){c.set(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Rn=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then((function(e){r.getPlugin("eme")||r.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Nn=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(r),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),Bn=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-e9e43270.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),Mn=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-cfe95daa.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),Un=Object.freeze({__proto__:null,importChromecast:function(){import("./index-cbb86a6c.js").then((function(e){return e.i})).then((function(e){Dn("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(r)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("./index-28ebfa21.js").then((function(e){return e.i})).then((function(e){e.default(r)}))},loadAdsLibrary:An,loadEMELibrary:Rn,loadMuxPlugin:Nn,loadDvrSeekbar:Bn,loadContribDash:Mn,loadComscorePlugin:Ln});function Fn(e){return Vn.apply(this,arguments)}function Vn(){return(Vn=n(t.mark((function e(n){var r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(null==n?void 0:n.airplay)||!1,e.next=3,An();case 3:r&&"Safari"==ze()&&Promise.resolve().then((function(){return Un})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Hn(e){return zn.apply(this,arguments)}function zn(){return(zn=n(t.mark((function e(n){var r,o,i,l,a,u,s,c,d,v;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=Me(n.playerId),e.next=3,Ln();case 3:v.comscore({publisherId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(i=n.comscore)||void 0===i?void 0:i.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gn(e,n){return qn.apply(this,arguments)}function qn(){return(qn=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f,p,m,h,g;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==r?void 0:r.contentType)||"video",f=null==r||null===(o=r[v])||void 0===o?void 0:o.drmEnabled,null==r||null===(i=r[v])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==r||null===(a=r[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==ze()?Rn():"caliente"!=(null===(g=window)||void 0===g?void 0:g.siteName)?Mn():Rn():"Safari"!=ze()&&p?Mn():null,m?Hn(n):null,h?Nn():null,_n(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}}),e,null,[[7,12]])})))).apply(this,arguments)}function Wn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Kn(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wn(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Wn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var Yn=new Set,$n=null,Jn=function(e,n,t,r){var o,i,l,a,u,s,c,v,p={},m=(null==e?void 0:e.contentType)||"video";p["c3.cm.id"]=(null===(o=e[m])||void 0===o?void 0:o.id)||"Null",p["c3.cm.contentType"]=rt(e),p[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),p[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc();var h=(null===(a=Ke.getConfig())||void 0===a?void 0:a.userId)||d();p[null==t||null===(u=t.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===h?"NULL":h,p["c3.cm.categoryType"]=et(e),p["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),p.DRMEnabled=(null===(s=e[m])||void 0===s?void 0:s.drmEnabled)||"None",p.DAIStream=null!==(c=e[m])&&void 0!==c&&null!==(v=c.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",p[t.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NULL",p.CDVREnabled=nt(e),p["c3.cm.genreList"]=Qn(e),p["c3.cm.genre"]=Xn(e),p["c3.cm.channel"]=Zn(e,r);var g=it(f(),e);return p=Kn(Kn({},p),g)},Xn=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},Qn=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map((function(e){return null==e?void 0:e.title})).join(", ")||"Null"},Zn=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(r=((null==e||null===(t=e[o])||void 0===t?void 0:t.channels)||[]).find((function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)})))||void 0===r?void 0:r.title)||"NULL"},et=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},nt=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},tt=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},rt=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ot,it=function(e,n){var t,r,o,i,l,a={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return a;var u=p(),s=v();return a["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(r=t.series)||void 0===r?void 0:r.title)||"Null",a["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",a["c3.cm.showTitle"]=(null==e||null===(o=e[u-1])||void 0===o||null===(i=o.episodes)||void 0===i||null===(l=i[s-1])||void 0===l?void 0:l.title)||"Null",a["c3.cm.episodeNumber"]=(null==s?void 0:s.toString())||"Null",a},lt=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},at=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ut=function(){var e=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f,p,h;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==r?void 0:r.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,u=o.enable,s=o.appName,d=(c=r||{}).token,v=c.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(f=Me(n),"function"==typeof(p=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,p("getConvivaObject");case 10:if(h=e.sent){e.next=13;break}return e.abrupt("return");case 13:f.ready((function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=lt(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})})),n||p("contentInfo",{DRMEnabled:"None"})})),f.on("loadstart",(function(){var e,n;$n&&$n!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),Yn.clear(),$n=f.currentSrc();var t=at(f.currentType()),o=m(),i=Jn(o,f,h,v);i[null==h||null===(e=h.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",i[null==h||null===(n=h.Constants)||void 0===n?void 0:n.ASSET_NAME]=tt(o,r),i.authToken=d||"NULL",i.streamType=t,i.D2CType=l||"NONE",i.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",i["c3.cm.affiliate"]=a||"NULL",st.setData(i),p("contentInfo",i)})),f.on("loadedmetadata",(function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})})),f.on("play",(function(){Yn.has(f.currentSrc())||(Yn.add(f.currentSrc()),p("playbackStarted",null))})),f.on("ended",(function(){Yn.has(f.currentSrc())&&Yn.delete(f.currentSrc()),p("playbackEnded")})),f.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})})),f.on("dispose",(function(){null==Yn||Yn.clear(),p("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),st=(ot={},{setData:function(e){ot=Kn(Kn({},ot),e)},getData:function(){return ot}}),ct=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-24ed1b71.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-65fab669.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-de1d7d56.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-6af2950f.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?import("./skin-71418867.js").then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t?import("./skin-237bef24.js").then((function(t){t.initialiseSkin(e,n)})):"news"==t?import("./skin-c6d3eac0.js").then((function(t){t.initialiseSkin(e,n)})):"news_live"==t?import("./skin-a6a30830.js").then((function(t){t.initialiseSkin(e,n)})):"mini"==t?import("./skin-dd2d5f12.js").then((function(t){t.initialiseSkin(e,n)})):"CN_NEWS"==t&&import("./skin-4ce58a71.js").then((function(t){t.initialiseSkin(e,n)}))};function dt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}var vt,ft=["offsetSeconds","offsetLabel"],pt=function(n){if(!n||"object"!==We(n))return n;if(!ft.some((function(e){return e in n})))return n;var t=function(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}({},n);return ft.forEach((function(e){return delete t[e]})),t},mt=function(e){try{if(!e)return null;e.refreshAnchor();var n="function"==typeof e.anchorInfo?e.anchorInfo():{};if("vod"===n.source)return{live:!1,source:"vod"};var t=("function"==typeof e.displayBounds?e.displayBounds():e.windowBounds())||{},r=t.start,o=t.end;if(!(Number.isFinite(r)&&o>r))return null;var i=null!=n.anchorPdtSec&&null!=n.anchorPlayerT;return{live:!0,source:n.source,windowEnd:o,anchorT:i?n.anchorPlayerT:null,anchorUtc:i?n.anchorPdtSec:null,nowSec:Date.now()/1e3}}catch(e){return null}},ht=function(e,n){try{return gt(e,n)}catch(e){return null}},gt=function(e,n){if(!e)return null;var t=h(n).start;if(!Number.isFinite(t))return null;if(!e.live)return{seconds:t,live:!1};var r=null!=e.anchorUtc?e.anchorT+(t-e.anchorUtc):e.windowEnd-(e.nowSec-t);return Number.isFinite(r)?{seconds:Math.max(0,e.windowEnd-r),live:!0}:null},yt=function(e){if(!e||!Number.isFinite(e.seconds))return"";var n=r.formatTime(e.seconds,e.seconds);return e.live?"-".concat(n):n},bt=(vt=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n.map(pt):[];return vt.set(e,t),t},get:function(e){return vt.get(e)||[]},remove:function(e){vt.delete(e)}}),wt="chapter-change",kt="chapter-click",St="chapters-updated";function Ct(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Me(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function Et(e){var n=Me(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(wt,e)},onChapterClick:function(e){return t(kt,e)},onChaptersUpdated:function(e){return t(St,e)}}}var Tt="vjs-chapter-marker",Ot="vjs-chapter-preview",Dt=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function jt(e,n){var t=n.store,r=n.mapper,o=n.chaptersConfig,i=void 0===o?{}:o,l=n.seek,a=Me(e);if(!a)return{render:function(){},reposition:function(){},destroy:function(){}};var u=new Map,s=null,c=-1,d=null,v=function(){return!0===(null==i?void 0:i.enable)},f=function(e){try{return r.chapterStartPercent(e)}catch(e){return null}},p=function(n,t,o){var i=Me(e),l=Dt(i);if(l){var a=function(e){if(s&&s.isConnected)return s;(s=document.createElement("div")).className=Ot;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",s.appendChild(n),s.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",s.appendChild(r),s._time=n,s._label=t,s._pointer=r,e.appendChild(s),s}(l);a._time.textContent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mt(r);return yt(ht(n,e))}(n,o),a._label.textContent=(null==n?void 0:n.label)||"",a.classList.add("vjs-chapter-preview--visible");var u="function"==typeof(null==i?void 0:i.el)?i.el():null;u&&u.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var o="function"==typeof(null==t?void 0:t.el)?t.el():null;if(o){var i=o.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=i.left+8+u,d=i.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(a,l,i,t)}},m=function(){d=null,s&&s.classList.remove("vjs-chapter-preview--visible");var n=Me(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},h=function(e){if(d&&s&&s.classList.contains("vjs-chapter-preview--visible")){var n=f(d);null!=n?p(d,n,e):m()}},g=function(n){var r=document.createElement("div");r.className=Tt,r.dataset.segmentId=String(n.segmentId);var o=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=Fe(n);r&&t.appendChild(r)}else{var o=document.createElement("img");o.src=n,o.alt="",t.appendChild(o)}return t}(n);o&&r.appendChild(o);var i=function(r){if("touchstart"===r.type)r.preventDefault();else if("mousedown"===r.type&&0!==r.button)return;r.stopPropagation(),"function"==typeof l&&l(n.segmentId);var o=t.get(e).indexOf(n);Ct(e,kt,{chapter:n,index:o,position:o>=0?o+1:void 0})};return r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),null!=n&&n.label&&r.setAttribute("aria-label",String(n.label)),r.addEventListener("keydown",(function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||e.repeat||(e.preventDefault(),i(e))})),r.addEventListener("mouseenter",(function(){var e=f(n);null!=e&&(d=n,p(n,e))})),r.addEventListener("mouseleave",m),r},y=function(n){v()&&0!==u.size&&(n||r.refreshAnchor(),t.get(e).forEach((function(e){var n=u.get(String(e.segmentId));if(n){var t=f(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}})))},b=0,w=function(n){u.forEach((function(e){return e.classList.remove("".concat(Tt,"--active"))}));var r=t.get(e),o=n>=0?r[n]:null;if(o){var i=u.get(String(o.segmentId));i&&i.classList.add("".concat(Tt,"--active"))}},k=function(){var n=Me(e);if(n){var o=t.get(e),i=r.playerTimeToChapterIndex(n.currentTime()||0,o);-1===i&&Date.now()<b||i!==c&&(c=i,w(i),Ct(e,wt,{chapter:i>=0?o[i]:null}))}},S=Ue((function(){var e=mt(r);y(!0),h(e),k()}),1e3),C=function(){var e=mt(r);y(!0),h(e),k()},E=function(){mt(r),y(!0)};a.on("timeupdate",S),a.on("seeked",C);var T=!1;try{a.liveTracker&&"function"==typeof a.liveTracker.on&&(a.liveTracker.on("liveedgechange",E),T=!0)}catch(e){}var O=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(O=setInterval((function(){var e=mt(r);y(!0),h(e)}),500));return{render:function(){var n=Me(e),o=Dt(n);o&&(m(),o.querySelectorAll(".".concat(Tt)).forEach((function(e){return e.remove()})),u.clear(),v()&&(r.refreshAnchor(),t.get(e).forEach((function(e){var n=g(e);o.appendChild(n),u.set(String(e.segmentId),n)})),y(!0),w(c),k()))},reposition:y,destroy:function(){try{a.off("timeupdate",S),a.off("seeked",C),T&&a.liveTracker.off("liveedgechange",E)}catch(e){}O&&(clearInterval(O),O=null);var n=Dt(Me(e));n&&n.querySelectorAll(".".concat(Tt,", .").concat(Ot)).forEach((function(e){return e.remove()})),u.clear(),s=null,d=null},setActiveBySegment:function(n){var r=t.get(e),o=r.findIndex((function(e){return String(e.segmentId)===String(n)}));o<0||(b=Date.now()+1500,o!==c&&(c=o,w(o),Ct(e,wt,{chapter:r[o]})))}}}function xt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function It(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var _t=new Map,Pt=function(e){var n=e.live,t=e.dvr;return function(e){return Array.isArray(e)&&e.some((function(e){return e&&e.eventStartUtc}))}(e.chapters)||n&&t?"livedvr":"vod"},At=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},Lt=function(e){var n=_t.get(e);if(n)return n;n={mapper:g(e,{timeMode:"vod"}),markers:null,chaptersConfig:{enable:!0},timeMode:"vod",live:!1,dvr:!1,disposed:!1},_t.set(e,n);var t=Me(e);return t&&(t.on("dispose",(function(){return Ft(e)})),t.one("loadeddata",(function(){n.disposed||Rt(e)}))),n},Rt=function(e){var n=_t.get(e),t=function(e){var n=_t.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=Me(e);return t&&At(t)?(n.markers=jt(e,{store:bt,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return Ut(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function Nt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Lt(e);bt.set(e,n);var r=Pt({live:t.live,dvr:t.dvr,chapters:n});return r!==t.timeMode&&(t.timeMode=r,t.mapper=g(e,{timeMode:r}),t.markers&&(t.markers.destroy(),t.markers=null)),Rt(e),Ct(e,St,{chapters:bt.get(e)}),!0}function Bt(e){var n=bt.get(e),t=_t.get(e);if(!t||!n.length)return n;var r=mt(t.mapper);try{return n.map((function(e){var n=ht(r,e);return It(It({},e),{},{offsetSeconds:n?n.seconds:null,offsetLabel:yt(n)})}))}catch(e){return n}}function Mt(e){bt.set(e,[]);var n=_t.get(e);return null!=n&&n.markers&&n.markers.render(),Ct(e,St,{chapters:[]}),!0}function Ut(e,n){var t,r,o=Me(e),i=Lt(e);if(!o)return!1;var l=bt.get(e).find((function(e){return e.segmentId===n}));if(!l)return!1;i.mapper.refreshAnchor();var a=i.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=i.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),o.currentTime(a),null===(t=i.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function Ft(e){var n=_t.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),_t.delete(e),bt.remove(e)}function Vt(e){var n,t,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Ke.getConfig();(null!=i&&null!==(n=i.chaptersConfig)&&void 0!==n&&n.enable||null!=i&&null!==(t=i.chapters)&&void 0!==t&&t.length)&&(function(e,n){var t,r=null===(t=Me(e))||void 0===t?void 0:t.el();if(r&&n){var o=function(e,n){null!=n&&""!==n&&r.style.setProperty(e,n)};o("--vl-chapter-color",n.markerColor),o("--vl-chapter-active",n.markerActiveColor),o("--vl-chapter-hover",n.markerHoverColor),o("--vl-chapter-size",null!=n.markerSize?"".concat(n.markerSize,"px"):null),o("--vl-chapter-opacity",null!=n.markerOpacity?String(n.markerOpacity):null),o("--vl-chapter-tooltip",n.tooltipColor)}}(e,null==i||null===(r=i.chaptersConfig)||void 0===r?void 0:r.style),function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,o=n.live,i=void 0!==o&&o,l=n.dvr,a=void 0!==l&&l;n.res;var u=n.chaptersConfig,s=void 0===u?{}:u,c=Me(e);if(!c)return!1;Array.isArray(r)&&bt.set(e,r);var d=Pt({live:i,dvr:a,chapters:r}),v=_t.get(e);null!=v&&v.markers&&v.markers.destroy();var f={mapper:g(e,{timeMode:d}),markers:null,chaptersConfig:s||{},timeMode:d,live:i,dvr:a,disposed:!1};_t.set(e,f);var p=function(){f.disposed||Rt(e)};c.one("loadeddata",p),At(c)&&p(),c.on("dispose",(function(){return Ft(e)}))}(e,{chapters:(null==i?void 0:i.chapters)||[],live:(null==o?void 0:o.liveVideo)||!1,dvr:(null==o?void 0:o.isDvrEnabled)||!1,res:null==o?void 0:o.res,chaptersConfig:(null==i?void 0:i.chaptersConfig)||{}}))}var Ht=!1,zt=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[o])||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!Ht){var i=Gt(e,"videoAssets","secondaryVideoAssets"),l=y(i,n);return l&&b(n,l),Ht=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function Gt(e,n,t){if(Array.isArray(e))return e.map((function(e){return Gt(e,n,t)}));if(null!==e&&"object"===We(e)){var r={};return Object.keys(e).forEach((function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=Gt(e[o],n,t)})),r}return e}function qt(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Wt(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Wt(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Wt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Kt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Yt(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var $t,Jt=function(e,r,o,i){var l,a,u,s,c,d=i.res,v=i.sres,f=Me(e),p=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(l=d[p])||void 0===l?void 0:l.drmEnabled)||!1,g=!(null==d||null===(a=d[p])||void 0===a||null===(u=a.streamingInfo)||void 0===u||!u.isLiveStream)||"linearchannel"===p,y=(null==d||null===(s=d[p])||void 0===s||null===(c=s.liveDetails)||void 0===c?void 0:c.isDvrEnabled)||!1;if(w(d),k.set(d),f){var b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500;return new Promise((function(n){var t=f.currentTime();setTimeout((function(){if(f.isDisposed())return n(!1);n(f.currentTime()-t>.5)}),e)}))};Ye(e,{liveVideo:g,isDvrEnabled:y}),f.on("loadstart",(function(){g?o.resolve({status:!0,msg:"Video Loaded",response:d}):o.resolve(Yt({status:!0,msg:"Player Initialised"},v?{seriesResponse:v,response:d}:{response:d}))})),f.on("loadeddata",(function(){var n,t,o,i,l=Ie(e);if(null==l||l.map((function(n){return _e(e,n.id)})),y&&"Safari"===ze())try{var a;null==f||null===(a=f.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==f||!f.muted())&&xn(e,sessionStorage.getItem("volume")||"100"),$e(e);var u=m();if(S(r),C(),null!=r&&null!==(n=r.watchHistory)&&void 0!==n&&n.isExternal){var s=Yt(Yt({},r),d);E(f,s)}else if(null!=r&&r.watchHistory&&null!=r&&null!==(t=r.watchHistory)&&void 0!==t&&t.enable&&(!r.isAnonymousUser||null!=r&&null!==(o=r.watchHistory)&&void 0!==o&&o.saveOffline)){var c,v,p=Yt(Yt({},r),d);T(e,p,null==u||null===(c=u.video)||void 0===c||null===(v=c.gist)||void 0===v?void 0:v.id)}if(null!=r&&null!==(i=r.analytics)&&void 0!==i&&i.muxKey&&null!=f&&f.mux){var h,g,b,w,k,O,D=(null===(h=m())||void 0===h?void 0:h.video)||(null==d?void 0:d.video),j=null==D?void 0:D.gist,x={env_key:null==r||null===(g=r.analytics)||void 0===g?void 0:g.muxKey,player_name:"vl-web-player",player_version:null===(b=window)||void 0===b?void 0:b.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==D||null===(w=D.series)||void 0===w?void 0:w.title,video_stream_type:null!=D&&null!==(k=D.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==r||null===(O=r.analytics)||void 0===O?void 0:O.userId};f.mux({debug:!1,data:x})}})),f.textTracks().on("change",(function(n){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];Pe(e),f.trigger("subtitlechanged",t)})),f.tech_.on("retryplaylist",(function(){g&&zt(d,e)}));var x=0,I=null,_=!1,P=null,A=function(){clearTimeout(I),I=null,x=0,_=!1},L=function r(){I=setTimeout(n(t.mark((function n(){var i,l,a,u,s,c;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return I=null,n.next=3,b();case 3:if(i=n.sent,_){n.next=6;break}return n.abrupt("return");case 6:if(!(!(null!=f&&f.paused()||null!=f&&f.ended()||null!=f&&f.seeking())&&(null==f?void 0:f.readyState())>=3||i)){n.next=9;break}return A(),n.abrupt("return");case 9:if(!(x>=3)){n.next=13;break}return A(),zt(d,e)||(O(e,P||"Some error occured"),o.reject({status:!1,msg:P||"Some error occured",response:d})),n.abrupt("return");case 13:x++,console.log("Stream not progressing. Retry attempt ".concat(x,"/").concat(3,"...")),null==f||f.error(null);try{a=null==f?void 0:f.currentTime(),u=null==f||null===(l=f.liveTracker)||void 0===l?void 0:l.seekableEnd(),(s=a+3)<u?null==f||f.currentTime(s):null==f||null===(c=f.liveTracker)||void 0===c||c.seekToLiveEdge(),null==f||f.play()}catch(e){console.log("Cannot seek to Live Edge",e)}r();case 18:case"end":return n.stop()}}),n)}))),1e3*Math.pow(2,x))};f.one("dispose",A),f.on("error",(function(){var n,t,r,i;3===(null==f||null===(n=f.error())||void 0===n?void 0:n.code)&&g?_||(console.log("Retrying to play the live stream due to media decode error"),_=!0,P=null===(t=f.error())||void 0===t?void 0:t.message,L()):(A(),console.log("ERROR",f.error(),f.error().code),4===f.error().code&&g?zt(d,e):(O(e,(null==f||null===(r=f.error())||void 0===r?void 0:r.message)||"Some error occured"),o.reject({status:!1,msg:(null==f||null===(i=f.error())||void 0===i?void 0:i.message)||"Some error occured",response:d})))})),f.one("play",(function(){var e,n,t,o,i;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(t=n.appcmsMain)||void 0===t||null===(o=t.adsConfig)||void 0===o||!o.vodAdClientSideTracking){if(null!=r&&null!==(i=r.series)&&void 0!==i&&i.enable){var l,a,u,s=null===(l=m())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,c=j(),d=(null==c?void 0:c.get(s))||{t:0,p:0},v=d.t,p=d.p;v&&p<95&&D(f,v)}else{var h,g,y,b,w,k,S,C=null!==(h=null==r?void 0:r.watchHistoryResumeTime)&&void 0!==h?h:null==r||null===(g=r.watchHistory)||void 0===g?void 0:g.watchedTime,E=null!==(y=null!==(b=null==r?void 0:r.watchedPercentage)&&void 0!==b?b:null==r||null===(w=r.watchHistory)||void 0===w?void 0:w.watchedPercentage)&&void 0!==y?y:0,T=null!==(k=null==r||null===(S=r.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==k?k:95;C&&E<T&&D(f,C)}if(null!=f&&f.dvrSeekbar)try{f.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}})),f.on("volumechange",(function(){var e=100*f.volume().toFixed(2);f.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),f.on("chromecastDisconnected",(function(){if(g){f.currentSource();for(var n=f.textTracks(),t=n.length-1;t>=0;t--)f.removeRemoteTextTrack(n[t])}var r=f.textTracks(),o=function(){return Ae(e)};o(),r.addEventListener("addtrack",o),setTimeout((function(){return r.removeEventListener("addtrack",o)}),15e3)})),f.one("loadeddata",(function(){var e,n=(null==f||null===(e=f.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort((function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0})),"object"==We(f.dash)){var t,r,o,i=null==f||null===(t=f.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),a=qt(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],d=qt(n);try{for(d.s();!(s=d.n()).done;){var v,p,m,g=s.value;("Chrome"==ze()||"Edge"==ze()&&(null!==(v=navigator)&&void 0!==v&&null!==(p=v.userAgent)&&void 0!==p&&p.includes("Macintosh")||!h))&&null!=g&&null!==(m=g.label)&&void 0!==m&&m.includes("5.1")?f.audioTracks().removeTrack(g):c.push(g)}}catch(e){d.e(e)}finally{d.f()}for(var y=c.find((function(e){return"main"===e.kind})),b=y||c.find((function(e){return e.enabled}))||c[0],w=0,k=c;w<k.length;w++){var S=k[w];S.enabled=S===b}}}))}},Xt=(null===($t=r.time)||void 0===$t?void 0:$t.createTimeRanges)||r.createTimeRanges;function Qt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.scheduleStartDate,r=n.startOverTime;if(e&&(t||r)){var o,i=t?(o=t)>1e12?o/1e3:o:null,l=r>0?r:null,a=e.seekable.bind(e);e.seekable=function(){var e=a();if(!e||!e.length)return e;var n=e.start(0),t=e.end(e.length-1),r=Date.now()/1e3,o=1/0;if(null!=i&&(o=Math.min(o,r-i)),null!=l&&(o=Math.min(o,l)),!isFinite(o))return e;var u=o<=0?t:Math.max(n,t-o);return Xt(u,t)};e.on("seeking",(function(){var n=e.seekable();if(n&&n.length){var t=n.start(0);e.currentTime()<t-.5&&e.currentTime(t)}}))}}function Zt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function er(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var nr="urn:x-cast:com.viewlift.player.caf",tr={eng:"en",spa:"es",esp:"es",cast:"es",fre:"fr",fra:"fr",ger:"de",deu:"de",por:"pt",ita:"it",dut:"nl",nld:"nl",chi:"zh",zho:"zh",cmn:"zh",yue:"zh",jpn:"ja",kor:"ko",ara:"ar",hin:"hi",rus:"ru",heb:"he",iw:"he",ind:"id",in:"id",fil:"tl",tgl:"tl",vie:"vi",tha:"th",tur:"tr",pol:"pl",swe:"sv",nor:"no",nob:"no",nb:"no",dan:"da",fin:"fi",gre:"el",ell:"el",cze:"cs",ces:"cs",ukr:"uk",rum:"ro",ron:"ro",hun:"hu",ben:"bn",tam:"ta",tel:"te",mal:"ml",kan:"kn",mar:"mr",pan:"pa",guj:"gu",urd:"ur"},rr=["und","mul","zxx"];function or(){try{return"true"===new URLSearchParams(window.location.search).get("castdebug")}catch(e){return!1}}function ir(){var e;or()&&(e=console).log.apply(e,arguments)}function lr(){var e;or()&&(e=console).warn.apply(e,arguments)}function ar(e){if(!e)return"";var n=String(e).trim().toLowerCase().replace(/_/g,"-").split("@")[0].split(".")[0].split("-").filter(Boolean),t=Qe(n),r=t[0],o=t.slice(1);return r?[tr[r]||r].concat(Xe(o)).join("-"):""}function ur(e){return ar(e).split("-")[0]}function sr(e){var n=ur(e);return!!n&&!rr.includes(n)}function cr(e,n){return sr(e)&&sr(n)&&ur(e)===ur(n)}function dr(e){return e?String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase():""}function vr(e,n){return!!e&&!!n&&dr(e)===dr(n)}function fr(e){return(null==e?void 0:e.language)||(null==e?void 0:e.lang)||""}function pr(e){return e?{language:fr(e)||void 0,label:e.label||void 0,roles:["captions"===e.kind?"caption":"subtitle"],forced:!!e.forced}:null}function mr(e){return e?{language:fr(e)||void 0,label:e.label||void 0}:null}function hr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(!n||!e.length)return null;for(var t=0,r=[function(e){return t=fr(e),r=n.language,sr(t)&&sr(r)&&ar(t)===ar(r);var t,r},function(e){return cr(fr(e),n.language)},function(e){return vr(e.label,n.label)}];t<r.length;t++){var o=r[t],i=e.filter(o);if(1===i.length)return i[0];if(i.length>1)return gr(i,n)}return null}function gr(e,n){var t=n.roles||[];return e.find((function(e){var n;return null===(n=e.roles)||void 0===n?void 0:n.some((function(e){return t.includes(e)}))}))||e[0]}var yr={textTracks:[],audioTracks:[],activeCaption:null,activeAudio:null};function br(e,n){if(!n)return null;var t=hr(e,n);return null!=(null==t?void 0:t.id)?{id:t.id}:n}function wr(e,n,t){if(!n)return!t;if(!t)return!1;var r=hr(e,t);return r&&null!=n.id?r.id===n.id:!!cr(fr(n),t.language)&&(!n.label||!t.label||vr(n.label,t.label))}function kr(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=function(){var e,n,t,r,o,i,l=null===(e=window)||void 0===e||null===(n=e.cast)||void 0===n?void 0:n.framework,a=null==l||null===(t=l.CastContext)||void 0===t||null===(r=t.getInstance)||void 0===r?void 0:r.call(t),u=null==a||null===(o=a.getCurrentSession)||void 0===o?void 0:o.call(a);return u&&"function"==typeof u.sendMessage?null!=l&&l.CastState&&(null===(i=a.getCastState)||void 0===i?void 0:i.call(a))!==l.CastState.CONNECTED?null:u:null}();if(t){var r=er(er({type:"COMMAND",source:"sender",command:e},n),{},{ts:Date.now()});ir("[Cast] ->",e,n);try{Promise.resolve(t.sendMessage(nr,r)).catch((function(n){return lr("[Cast] command failed",e,(null==n?void 0:n.message)||n)}))}catch(n){lr("[Cast] command failed",e,(null==n?void 0:n.message)||n)}}}var Sr=function(){return kr("play")},Cr=function(){return kr("pause")},Er=function(e){return kr("seek",{currentTime:e})},Tr=function(e){return kr("setPlaybackRate",{rate:e})},Or=function(e,n){return kr("setVolume",{volume:e,muted:n})},Dr=function(e){wr(yr.textTracks,yr.activeCaption,e)||kr("setCaption",{track:br(yr.textTracks,e)})},jr=function(e){e&&(wr(yr.audioTracks,yr.activeAudio,e)||kr("setAudio",{track:br(yr.audioTracks,e)}))};function xr(e){return e?e.tracks_||Array.from(e):[]}function Ir(e){var n;return xr(null===(n=e.textTracks)||void 0===n?void 0:n.call(e)).filter((function(e){return"captions"===e.kind||"subtitles"===e.kind}))}function _r(e){return"function"==typeof e.audioTracks?xr(e.audioTracks()):[]}function Pr(e){return Ir(e).find((function(e){return"showing"===e.mode}))||null}function Ar(e){return _r(e).find((function(e){return e.enabled}))||null}function Lr(e,n){var t=Ir(e),r=n?hr(t,n):null;n&&!r||t.forEach((function(e){e.mode=e===r?"showing":"disabled"}))}var Rr=null;var Nr=null;function Br(e,n){if("STATE"===n.type)return yr.textTracks=n.textTracks||[],yr.audioTracks=n.audioTracks||[],yr.activeCaption=n.activeCaption||null,yr.activeAudio=n.activeAudio||null,void function(){if(Nr&&(yr.textTracks.length||yr.audioTracks.length)){var e=Nr,n=e.caption,t=e.audio;Nr=null,Dr(n),jr(t)}}();if("LOG_STATUS"===n.type&&ir("[Cast] <- LOG_STATUS",n.type,n),"EVENT"===n.type)switch(ir("[Cast] <-",n.event,n),n.event){case"CaptionChanged":yr.activeCaption=n.activeCaption||null,Lr(e,yr.activeCaption);break;case"AudioChanged":yr.activeAudio=n.activeAudio||null,function(e,n){var t=n&&hr(_r(e),n);t&&!t.enabled&&(t.enabled=!0)}(e,yr.activeAudio);break;case"TracksChanged":yr.textTracks=[],yr.audioTracks=[];break;case"TrackUnresolved":lr("[Cast] receiver could not resolve track",n.kind,n.requested)}}var Mr=!1;function Ur(e){!function(e){var n,t,r,o,i,l,a=null===(n=window)||void 0===n||null===(t=n.cast)||void 0===t?void 0:t.framework,u=null==a||null===(r=a.CastContext)||void 0===r||null===(o=r.getInstance)||void 0===o?void 0:o.call(r);if(u){var s=function(n){n&&!n.__vlCastListening&&(n.__vlCastListening=!0,n.addMessageListener(nr,(function(n,t){try{var r="string"==typeof t?JSON.parse(t):t;"receiver"===(null==r?void 0:r.source)&&Br(e,r)}catch(e){lr("[Cast] could not handle receiver message",(null==e?void 0:e.message)||e,t)}})))};s(null===(i=u.getCurrentSession)||void 0===i?void 0:i.call(u)),!Mr&&null!=a&&null!==(l=a.CastContextEventType)&&void 0!==l&&l.SESSION_STATE_CHANGED&&(Mr=!0,u.addEventListener(a.CastContextEventType.SESSION_STATE_CHANGED,(function(){var e;return s(null===(e=u.getCurrentSession)||void 0===e?void 0:e.call(u))})))}}(e),e.addClass("vl-casting");var n=Pr(e);n&&(Rr=pr(n));var t=function(){return Lr(e,Rr)};e.one("loadeddata",(function(){return setTimeout(t,0)})),setTimeout(t,1500),function(e){var n=pr(Pr(e))||Rr,t=mr(Ar(e));ir("[Cast] syncing selected tracks",Nr={caption:n,audio:t}),kr("setCaption",{track:br(yr.textTracks,n)}),t&&kr("setAudio",{track:br(yr.audioTracks,t)})}(e)}function Fr(e){var n;if(e&&!e.__vlCastSyncBound){e.__vlCastSyncBound=!0,e.on("chromecastConnected",(function(){return Ur(e)})),e.on("chromecastDisconnected",(function(){e.removeClass("vl-casting"),yr.textTracks=[],yr.audioTracks=[],yr.activeCaption=null,yr.activeAudio=null,Nr=null}));var t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:150,t=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];clearTimeout(t),t=setTimeout((function(){return e.apply(void 0,o)}),n)}}((function(){return Or(e.volume(),e.muted())}));e.on("play",(function(){return Sr()})),e.on("pause",(function(){return Cr()})),e.on("seeked",(function(){return Er(e.currentTime())})),e.on("volumechange",t),e.on("ratechange",(function(){return Tr(e.playbackRate())})),e.on("texttrackchange",(function(){var n=pr(Pr(e));n&&(Rr=n),Dr(n)}));var r="function"==typeof e.audioTracks?e.audioTracks():null;null==r||null===(n=r.addEventListener)||void 0===n||n.call(r,"change",(function(){return jr(mr(Ar(e)))}))}}function Vr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Hr(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function zr(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Gr(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Gr(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Gr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var qr={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0},Wr=function(e){var n;if(e){var t=function(){var n,t="function"==typeof e.currentWidth&&e.currentWidth()||(null===(n=e.el())||void 0===n?void 0:n.clientWidth)||0;e.toggleClass("vlp-hide-pip",t<=500&&function(){var n,t=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);if(!t)return!1;for(var r=0;r<t.length;r++){var o,i=null===(o=t[r])||void 0===o?void 0:o.kind;if("captions"===i||"subtitles"===i)return!0}return!1}())};t(),e.on("playerresize",t),e.on("fullscreenchange",t);var r=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);null!=r&&r.addEventListener&&(r.addEventListener("addtrack",t),r.addEventListener("removetrack",t),e.on("dispose",(function(){r.removeEventListener("addtrack",t),r.removeEventListener("removetrack",t)})))}};function Kr(e,n,t){var r=Ke.getConfig()||{};M(e,{status:t,message:"DRM ".concat(n," request failed")},"playback",{requestKind:n,videoId:null==r?void 0:r.videoId})}function Yr(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var o=n[r[t]];if("string"==typeof o)return o;if(null!=o&&o.url)return o.url;if(null!=o&&o.licenseUri)return o.licenseUri}var i=null==e?void 0:e.keySystemOptions;if(Array.isArray(i)){var l,a=zr(i);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function $r(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return Yr("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function Jr(e,n){n&&!n.__vlDrmDashHooksInstalled&&(n.__vlDrmDashHooksInstalled=!0,"function"==typeof n.addResponseInterceptor&&n.addResponseInterceptor((function(e){try{var n=(null==e?void 0:e.request)||{},t=(null==e?void 0:e.url)||(null==n?void 0:n.url)||"",r=U(t,(null==n?void 0:n.type)||(null==e?void 0:e.type));if(F(r)){var o=V(e,null);H(o)||Kr(t,r,o)}}catch(e){}return Promise.resolve(e)})),"function"==typeof n.registerLicenseRequestFilter&&n.registerLicenseRequestFilter((function(e){try{null!=e&&e.url&&(n.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()})),"function"==typeof n.on&&n.on("public_licenseRequestComplete",(function(t){try{var r,o,i,l;if(null==t||!t.error)return;var a=null!==(r=null==t||null===(o=t.error)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.responseCode)&&void 0!==r?r:V(null,t.error);Kr((null==t||null===(l=t.data)||void 0===l?void 0:l.url)||n.__vlLastLicenseUrl||$r(e)||"","license",a)}catch(e){}})))}var Xr=!1,Qr=null,Zr=new Set;function eo(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,Zr.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,Zr.delete(e),function(){if(Xr&&!(Zr.size>0)){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof Qr&&e.removeHook("beforeinitialize",Qr),Xr=!1,Qr=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function no(e){if(e){eo(e),function(){if(!Xr){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.hook&&(Qr=function(e,n){null!=e&&e.__vlDrmDashEnabled&&Jr(e,n)},Xr=!0,e.hook("beforeinitialize",Qr))}}(),function(e){e&&!e.__vlEmeDrmErrorInstalled&&(e.__vlEmeDrmErrorInstalled=!0,e.on("error",(function(){try{var n,t="function"==typeof e.error?e.error():null;if(!t||!B(t))return;if(null!=e&&null!==(n=e.dash)&&void 0!==n&&n.mediaPlayer)return;Kr($r(e),"license",null)}catch(e){}})))}(e);var n=function(){var n;!function(e){var n,t,r=null==e||null===(n=e.tech_)||void 0===n||null===(t=n.vhs)||void 0===t?void 0:t.xhr;r&&"function"==typeof r.onResponse&&!e.__vlDrmVhsHooksInstalled&&(e.__vlDrmVhsHooksInstalled=!0,r.onResponse((function(e,n,t){try{var r=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(e),o=U(r,null==e?void 0:e.type);if(!F(o))return;var i=V(t,n);H(i)&&!n||Kr(r,o,i)}catch(e){}})))}(e),Jr(e,null==e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer)};n(),e.on("xhr-hooks-ready",n),e.on("loadstart",(function(){setTimeout(n,0)}))}}var to=function(o,i,l,a){var u,s,c,d,v,f,p,m,h,g,w,k,S,C,E,T,D,j,B,M,U,F,V,H,z,G,q,W,K,Y,$,J,X,Q,Z,ee,ne,te,re=i.res,oe=void 0===re?null:re,ie=i.sres,le=void 0===ie?null:ie,ae=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=qr[r]?qr[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ue=ae.playerDebug,se=ae.logLevel,ce=ae.dashLogLevel;ue&&(console.log("[PLAYER DEBUG] config:",l),console.log("[PLAYER DEBUG] entitlement (res):",oe),le&&console.log("[PLAYER DEBUG] series response (sres):",le));var de=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],ve=(null===(u=oe)||void 0===u?void 0:u.contentType)||"video",fe=Ve(null===(s=oe)||void 0===s||null===(c=s[ve])||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.videoImageUrl)||Ve(null===(v=oe)||void 0===v||null===(f=v[ve])||void 0===f||null===(p=f.gist)||void 0===p||null===(m=p.imageGist)||void 0===m?void 0:m.r16x9),pe=(null===(h=oe)||void 0===h||null===(g=h[ve])||void 0===g||null===(w=g.liveDetails)||void 0===w?void 0:w.isDvrEnabled)||!1,me=!(null===(k=oe)||void 0===k||null===(S=k[ve])||void 0===S||null===(C=S.streamingInfo)||void 0===C||!C.isLiveStream)||"linearchannel"===ve,he=(null===(E=oe)||void 0===E||null===(T=E.ads)||void 0===T||null===(D=T.preRoll)||void 0===D||null===(j=D.adTags)||void 0===j||null===(B=j.web)||void 0===B?void 0:B.active)&&(null===(M=oe)||void 0===M||null===(U=M.ads)||void 0===U||null===(F=U.preRoll)||void 0===F||null===(V=F.adTags)||void 0===V||null===(H=V.web)||void 0===H?void 0:H.url);oe=Hr(Hr({},oe),{},{audioAssetSource:null==l?void 0:l.audioAssetSource});var ge=(null==l||null===(z=l.customData)||void 0===z?void 0:z.ads)||{},ye=(null===(G=oe)||void 0===G||null===(q=G[ve])||void 0===q?void 0:q.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ge?void 0:ge.vodAdSticherProvider)||!1,be=!(null===(W=oe)||void 0===W||null===(K=W[ve])||void 0===K||!K.isSSAIEnabled)&&"TRANSMIT"==(null==ge?void 0:ge.liveAdSticherProvider)&&!(null==ge||!ge.liveAdClientSideTracking),we=(null==l?void 0:l.latency)||6,ke=(null==l?void 0:l.skin_settings)||{},Se=(ne={enableSmoothSeeking:!0,controls:0!=(null==l?void 0:l.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==l?void 0:l.muted)||!1,autoplay:(null==l?void 0:l.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ke?void 0:ke.pictureInPictureToggle)||!1},playbackRates:null!=ke&&ke.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==l.skin,liveui:pe},e(ne,"autoplay",null==l?void 0:l.autoplay),e(ne,"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!he),e(ne,"loop",(null==l?void 0:l.loop)||!1),e(ne,"audioPosterMode",null==l?void 0:l.audioPosterMode),e(ne,"html5",Hr(Hr({dash:Hr(Hr({},!r.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Hr(Hr({},((null==l?void 0:l.debugConfig)&&(null==l||null===(Y=l.debugConfig)||void 0===Y?void 0:Y.enable)||ue)&&{debug:{logLevel:ce}}),{},{streaming:{parseInbandPrft:!0,delay:{liveDelay:we},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Hr({},"IE"==ze()&&{enableStallFix:!0,stallSeek:1}),abr:Hr(Hr(Hr(Hr({},(null==l?void 0:l.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==l?void 0:l.initialBandwidth)/1e3}}),(null==l?void 0:l.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==l?void 0:l.maxBitrate)/1e3}}),(null==l?void 0:l.minBitrate)&&{minBitrate:{audio:-1,video:(null==l?void 0:l.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:Hr(Hr(Hr({},(null==l?void 0:l.initialBandwidth)&&{bandwidth:l.initialBandwidth}),{},{liveRangeSafeTimeDelta:we,useDevicePixelRatio:!0,experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==l||!l.initialBandwidth},(null==l||null===($=l.customData)||void 0===$?void 0:$.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(J=null==l?void 0:l.enableLowInitialPlaylist)&&void 0!==J&&J},((null==l?void 0:l.debugConfig)&&(null==l||null===(X=l.debugConfig)||void 0===X?void 0:X.enable)||ue)&&{debug:!0}),debug:(null==l?void 0:l.debugConfig)&&(null==l||null===(Q=l.debugConfig)||void 0===Q?void 0:Q.enable)||ue||!1,nativeTextTracks:"Safari"==ze()},0==(null==l||null===(Z=l.customData)||void 0===Z?void 0:Z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(ee=l.customData)||void 0===ee?void 0:ee.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ne,"poster",fe),e(ne,"techOrder",de),e(ne,"chromecast",{requestCustomDataFn:function(e){var n,t,r=Me(o),i=((null==r?void 0:r.textTracksJson_)||r.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),a=function(e,n,t){var r,o,i,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,h,g,y,b,w,k,S;p.isDrmEnabled=!0;var C=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,E=(null==C?void 0:C.url)||(null==n||null===(h=n.keySystemOptions)||void 0===h||null===(g=h[0])||void 0===g||null===(y=g.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=E;var T=(null==C?void 0:C.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=T}var O=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=O;var D=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=D;var j=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=j;var x,I,_=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=_,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,void 0!==("undefined"==typeof window?"undefined":We(window))&&(p.siteId=(null===(x=window)||void 0===x?void 0:x.siteId)||null,p.userId=(null===(I=window)||void 0===I?void 0:I.sessionStorage)&&window.sessionStorage.getItem("uid")||null),console.log(p),p}(oe,e,i),u=i.find((function(e){return"showing"===e.mode}))||null;return Rr=pr(u),Hr(Hr({},a),{},{activeCaption:{enabled:!!u,language:(null==u?void 0:u.language)||(null==u?void 0:u.lang)||null,label:(null==u?void 0:u.label)||null},transmitTrackingUrl:x.get()||null,convivaMetaData:Hr({customerKey:(null==l||null===(n=l.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==l||null===(t=l.convivaConfig)||void 0===t?void 0:t.debug)||!1},st.getData())})},modifyLoadRequestFn:function(e){var n,t,r,i,l,a=Me(o),u=(null==a?void 0:a.currentSource())||{};!(null===(n=oe)||void 0===n||null===(t=n[ve])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ne);if(!r.getPlayers()[o]){(null!=l&&l.debugConfig&&null!=l&&null!==(te=l.debugConfig)&&void 0!==te&&te.enable||ue)&&r.log.level(se||"debug");var Ce=r(o,Se,function(){var e=n(t.mark((function e(){var n,i,u,s,c,d,v,f,p,m,h,g,w,k,S,C,E,T,D,j,x,B,M,U,F,V;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return no(Ce),Wr(Ce),console.log(Ce),console.log(r.VERSION),console.log(r.getPlugins()),e.next=7,Gn(l,oe);case 7:if(null!=l&&l.debugConfig&&null!=l&&null!==(n=l.debugConfig)&&void 0!==n&&n.enable||ue){try{r.log.level(se||"debug")}catch(e){}(C=function(){try{var e,n,t;null==Ce||null===(e=Ce.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:ce}})}catch(e){}})(),Ce.one("loadedmetadata",C)}if(E=null===(i=oe)||void 0===i||null===(u=i[ve])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.startOverTime,null!=l&&l.disableControls||Vt(o,{liveVideo:me,isDvrEnabled:pe,res:oe}),me&&a.resolve(Hr({status:!0,msg:"Player Initialised"},le?{seriesResponse:le,response:oe}:{response:oe})),P(o,{content:oe,analyticsCb:null==l?void 0:l.analyticsCb,analyticsEventParams:null==l?void 0:l.analyticsEventParams,userId:null==l?void 0:l.userId}),ut(o,l),Fr(Ce),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),pe&&Pn(o,E),!he||null!=l&&null!==(c=l.customData)&&void 0!==c&&c.disableAds||A(o,he,oe),null!=l&&l.disableControls||L(o,{config:l,content:oe,liveVideo:me,isDvrEnabled:pe}),T=y(oe,o),console.log(T),ue&&(console.log("[PLAYER DEBUG] source:",T),console.log("[PLAYER DEBUG] videojs options:",Se)),null!=l&&l.nearestClusterUrl&&(T=R(T,l.nearestClusterUrl)),!ye){e.next=28;break}return e.next=25,N(o,oe);case 25:T=e.sent,e.next=32;break;case 28:if(!be){e.next=32;break}return e.next=31,_(T,oe,o);case 31:T=e.sent;case 32:Ce&&(Ce.__vlDrmLicenseUrl=Yr(T)),T?b(o,T):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:oe}),O(o,"Incompatible / Missing Source")),D=null===(d=oe)||void 0===d||null===(v=d[ve])||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.scheduleStartDate,me&&pe&&(D||E)&&Qt(Ce,{scheduleStartDate:D,startOverTime:E}),((null===(p=oe)||void 0===p||null===(m=p[ve])||void 0===m||null===(h=m.contentDetails)||void 0===h||null===(g=h.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(w=oe)||void 0===w||null===(k=w[ve])||void 0===k||null===(S=k.closedCaptions)||void 0===S?void 0:S.length)>0)&&(V=(null===(x=oe)||void 0===x||null===(B=x[ve])||void 0===B||null===(M=B.contentDetails)||void 0===M?void 0:M.closedCaptions)||(null===(U=oe)||void 0===U||null===(F=U[ve])||void 0===F?void 0:F.closedCaptions),j=V.filter((function(e){return"VTT"===e.format})),Le(o,j)),null!=l&&l.disableControls?I(o):ct(o,Hr(Hr(Hr({},l),Se),{},{liveVideo:me,isDvrEnabled:pe,res:oe,sres:le})),Jt(o,Hr(Hr(Hr({},l),Se),{},{liveVideo:me}),a,{res:oe,sres:le});case 39:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}};function ro(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function oo(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ro(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):ro(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var io=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=lo(e);to(o,{res:i},e,{resolve:t,reject:r})},lo=function(e){var n,t,r,o,i,l,a,u,s,c,d,v,f,p,m,h=null==e?void 0:e.streamingInfo,g=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,y=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,b=(null==e||null===(r=e.streamingInfo)||void 0===r||null===(o=r.ads)||void 0===o?void 0:o.url)||null,w=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,k=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],S=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,C=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],E=(null==e||null===(c=e.customData)||void 0===c||null===(d=c.ads)||void 0===d?void 0:d.isSSAIEnabled)||!1,T=(null==e||null===(v=e.streamingInfo)||void 0===v?void 0:v.scheduleStartDate)||null,O=(null==e||null===(f=e.streamingInfo)||void 0===f?void 0:f.startOverTime)||null,D=null==e?void 0:e.token,j=z(D);null==j||j.site;var x=null==j?void 0:j.siteId,I=(null==e||null===(p=e.customData)||void 0===p||null===(m=p.comscore)||void 0===m?void 0:m.video)||null,_=oo(oo({id:x?"".concat(x,"_external"):"external"},!y&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:oo(oo(oo(oo(oo({drmEnabled:y,streamingInfo:oo(oo({videoAssets:oo(oo({},S&&{drmProvider:S}),{},{widevine:null==g?void 0:g.widevine,fairPlay:null==g?void 0:g.fairPlay,playReady:null==g?void 0:g.playReady})},(null==h?void 0:h.isDvrEnabled)&&{isLiveStream:!0}),(null==I?void 0:I.isLiveStream)&&{isLiveStream:null==I?void 0:I.isLiveStream})},E&&{isSSAIEnabled:E}),{},{metadata:C,liveDetails:oo({isDvrEnabled:null==h?void 0:h.isDvrEnabled},O&&{startOverTime:O}),gist:oo(oo(oo(oo({},w&&{videoImageUrl:w}),T&&{scheduleStartDate:T}),(null==I?void 0:I.videoId)&&{id:null==I?void 0:I.videoId}),(null==I?void 0:I.videoTitle)&&{title:null==I?void 0:I.videoTitle}),contentDetails:oo({},(null==k?void 0:k.length)>0&&{closedCaptions:Xe(k)})},(null==I?void 0:I.runtime)&&{runtime:null==I?void 0:I.runtime}),(null==I?void 0:I.publishDate)&&{publishDate:null==I?void 0:I.publishDate}),(null==I?void 0:I.platform)&&{platform:null==I?void 0:I.platform}),(null==I?void 0:I.series)&&{series:null==I?void 0:I.series}),ads:{preRoll:{adTags:{web:oo(oo({},b&&{active:!0}),b&&{url:b})}}}});return I&&(null!=I&&I.isDvrEnabled&&(_.video.liveDetails=oo(oo({},_.video.liveDetails),{},{isDvrEnabled:null==I?void 0:I.isDvrEnabled})),null!=I&&I.metadata&&(_.video.metadata=[].concat(Xe(_.video.metadata),Xe(null==I?void 0:I.metadata)))),_},ao=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||"");return t.has("ssaiDisable")?t.get("ssaiDisable"):null}catch(e){return null}};function uo(e,n){return so.apply(this,arguments)}function so(){return(so=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,u=null==n?void 0:n.videoId,s=null==n?void 0:n.playerId,c=!(null==n||!n.anonymousId),e.next=6,Y();case 6:d=e.sent,v=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),null!==(f=ao())&&(v="true"===f),G(u,d,v).then((function(e){var t,r,o,i,v,f,p,m,h,g,y;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,w(null==e?void 0:e.data);var b=null==e||null===(i=e.data)||void 0===i||null===(v=i.video)||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.scheduleEndDate,k=null==e||null===(p=e.data)||void 0===p||null===(m=p.video)||void 0===m||null===(h=m.gist)||void 0===h?void 0:h.scheduleStartDate;be(s,{scheduleEndDate:b,scheduleStartDate:k});var S=null==e?void 0:e.data;if(null!=n&&null!==(g=n.watchHistory)&&void 0!==g&&g.isExternal)S.contentType="video",to(s,{res:S},n,{resolve:l,reject:a});else if(null!=n&&n.watchHistory&&null!=n&&null!==(y=n.watchHistory)&&void 0!==y&&y.enable&&!c){var C;if((null===(C=n.watchHistory)||void 0===C?void 0:C.saveOffline)||!1){var E,T,O,D=(null===(E=n.watchHistory)||void 0===E?void 0:E.profileId)||"",j=q(D,u,null==n?void 0:n.siteOwner);if(j&&j.length)n.watchHistoryResumeTime=(null===(T=j[0])||void 0===T?void 0:T.watchedTime)||null,n.watchedPercentage=(null===(O=j[0])||void 0===O?void 0:O.watchedPercentage)||null;S.contentType="video",to(s,{res:S},n,{resolve:l,reject:a})}else W(u,d).then((function(e){var t,r,o,i,l,a;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"})).catch((function(){})).finally((function(){to(s,{res:S},n,{resolve:l,reject:a})}))}else to(s,{res:S},n,{resolve:l,reject:a})})).catch((function(e){var t,r,o=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,i=(null==n||null===(r=n.event)||void 0===r?void 0:r.onCountdownComplete)||null;o&&we(s,e,i),K(e,s,a,u)}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function co(e,n){return vo.apply(this,arguments)}function vo(){return(vo=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,e.next=3,Y();case 3:u=e.sent,s=null==n?void 0:n.playerId,c=null==n?void 0:n.epg,d=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),$(c,u,d).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==c?void 0:c.channelId,w(t),to(s,{res:t},n,{resolve:l,reject:a})})).catch((function(e){K(e,s,a,videoId)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fo(e,n){return po.apply(this,arguments)}function po(){return(po=n(t.mark((function e(n,r){var o,i,l,a,u,s,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.resolve,l=r.reject,e.next=3,Y();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,Q.set(parseInt(s)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,J(c,a).then((function(e){var t,r,o,s=e.data,d=e.data.seasons;Z(d);var v=videoId||(null==d||null===(t=d[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.id);X(c,a),G(v,a).then((function(e){var t,r,o;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,w(e.data),to(u,{res:null==e?void 0:e.data,sres:s},n,{resolve:i,reject:l})})).catch((function(e){K(e,u,l,videoId)}))})).catch((function(e){K(e,u,l)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var mo,ho=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,o=e.sseEndpoint,i=e.debug;if(n){var l=function(e){var n=e.site,t=e.sseBaseUrl,r=e.sseEndpoint,o=e.debug,i=void 0!==o&&o;return Ze({site:n,sseBaseUrl:t,getToken:Y,sseEndpoint:r,onOpen:function(e){var n=e.userId,t=e.endpoint;i&&console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,r,o,l,a,u,s,c,d;if(i&&console.log("SSE Message:",e),(null===(n=m())||void 0===n||null===(t=n.video)||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.id)===(null==e||null===(o=e.payload)||void 0===o?void 0:o.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var v=1e3*(null==e||null===(l=e.payload)||void 0===l||null===(a=l.states)||void 0===a||null===(u=a.live)||void 0===u?void 0:u.startDateTime),f=1e3*(null==e||null===(s=e.payload)||void 0===s||null===(c=s.states)||void 0===c||null===(d=c.end)||void 0===d?void 0:d.endDateTime);v&&f&&(console.log("Setting schedule timer",v,f),ke.set({startDateTime:v,endDateTime:f}))}},onReconnectAttempt:function(e){i&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;i&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){i&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){i&&console.error("SSE Error:",e,n)},onClose:function(){i&&console.log("SSE Closed")}})}({site:t,sseBaseUrl:r,sseEndpoint:o,debug:void 0!==i&&i});return l._sseBaseUrl=r,l._site=t,l._sseEndpoint=o,l}};function go(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function yo(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?go(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):go(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function bo(){return{loadVideoInstantly:ee,onTimeUpdate:Se,getVideoDuration:Ce,onVideoEnded:Ee,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=n(t.mark((function n(r,o){var i,l,a,u,s,c,d,v,f,p,m,h,g,y,b,w,k,S,C,E,T,O,D,j,x,I,_,P,A,L,R;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!ie(null==e?void 0:e.playerId)){n.next=3;break}return r({status:!0,msg:"Player already initialised",skipped:!0}),n.abrupt("return");case 3:if(S=(null==e?void 0:e.videoSourceUrl)||!1,C=null==e?void 0:e.asat,E=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,T=null==e?void 0:e.videoId,O=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,D=(null==e?void 0:e.streamingInfo)||!1,window.videoId=T,j=null==e?void 0:e.token,!me(e)){n.next=18;break}if(sessionStorage.setItem("vlp_token",j),he().set(null==e?void 0:e.refreshToken),j&&!ge(j)){n.next=17;break}return o({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),n.abrupt("return");case 17:mo=JSON.parse(atob(j.split(".")[1]));case 18:return window.siteName=null===(a=mo)||void 0===a?void 0:a.site,window.siteId=null===(u=mo)||void 0===u?void 0:u.siteId,e.isAnonymousUser=!(null===(s=mo)||void 0===s||!s.anonymousId),e.siteOwner=(null===(c=mo)||void 0===c?void 0:c.site)||null,e.userId=(null===(d=mo)||void 0===d?void 0:d.userId)||null,fe((null===(v=mo)||void 0===v?void 0:v.userId)||(null===(f=mo)||void 0===f?void 0:f.anonymousId)||null),window.watchHistory=e.watchHistory||null,x=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable?null:null==e?void 0:e.chromecastReceiverId,I=(null==e||null===(m=e.analytics)||void 0===m?void 0:m.gaId)||null,(_=null==e?void 0:e.errors)&&(window.customErrors=_),window.customData=null==e?void 0:e.customData,Ge(qe(e)),pe.set(e.apiBaseUrl),null!=e&&e.skin&&!He(e.skin)||(e.skin="VL_ONE"),Ke.setConfig(e),en.reset(),en.set(null==e?void 0:e.relatedVideos),n.next=39,Fn(e);case 39:I&&Dn("https://www.googletagmanager.com/gtag/js?id=".concat(I)).then((function(){return ye(I)})).catch((function(e){})),(P=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(x)))&&P.addEventListener("contextmenu",(function(e){return e.preventDefault()})),(A=ho({enable:null==e||null===(g=e.sse)||void 0===g?void 0:g.enable,site:null==e||null===(y=e.sse)||void 0===y?void 0:y.siteName,sseBaseUrl:null==e||null===(b=e.sse)||void 0===b?void 0:b.sseBaseUrl,sseEndpoint:null==e||null===(w=e.sse)||void 0===w?void 0:w.sseEndpoint,debug:null==e||null===(k=e.sse)||void 0===k?void 0:k.debug}))&&!A.isConnectionActive()&&A.connect(),S?(R={directPlaybackUrl:S,id:L="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}},C?G(L,j).then((function(n){var t,i=(null==n?void 0:n.data)||{},l=yo(yo(yo({},i),R),{},{video:yo(yo({},null==i?void 0:i.video),{},{liveDetails:yo(yo({},null==i||null===(t=i.video)||void 0===t?void 0:t.liveDetails),{},{isDvrEnabled:!(null==e||!e.isDvr)})})});to(x,{res:l},e,{resolve:r,reject:o})})).catch((function(e){K(e,x,o,L)})):to(x,{res:yo(yo({},R),{},{video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}})},e,{resolve:r,reject:o})):D?io(e,{resolve:r,reject:o}):O?fo(e,{resolve:r,reject:o}):E?co(e,{resolve:r,reject:o}):uo(e,{resolve:r,reject:o});case 45:case"end":return n.stop()}}),n)})));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:Ne,skip:ne,getPlayer:Me,play:te,pause:re,detectBrowser:ze,rewind:oe,loadVideo:b,seekToTimeStamp:Te,isPlayerInitialised:ie,load:le,authenticateLC:ae,dispose:ue,enableCaptions:Re,disableCaptions:_e,getCaptions:Ie,playSelectedResolution:Be,getSource:y,setVolume:xn,getVolume:In,disableControls:I,setPlaybackSpeed:Oe,getEntitlementData:se,getSsaiEvents:ce,getPlayerControlEvents:Je,playerEvents:De,onReplay:je,relatedVideosManager:en,setChapters:Nt,getChapters:Bt,clearChapters:Mt,seekToChapter:Ut,getChapterEvents:Et,onWatchInVerticalView:xe,fireBeaconEvent:de,getDvrManager:ve}}export{bo as default};
|