@viewlift/player-backup 2.0.292-backup → 2.0.294-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/{autoNextVideo-d783039e.js → autoNextVideo-4e5aceb8.js} +1 -1
- package/cjs/bundle.css +201 -201
- package/cjs/{features-e77b2cc5.js → features-d070e5e9.js} +1 -1
- package/cjs/generic-b2ccfd5e.js +1 -0
- package/cjs/{index-ba862bae.js → index-04ba3869.js} +1 -1
- package/cjs/{index-9c86b65a.js → index-358d3a74.js} +1 -1
- package/cjs/{index-248cea68.js → index-c69cc94c.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-a43f64a1.js → multicamv2-082968be.js} +1 -1
- package/cjs/{multicamv2-420b64ce.js → multicamv2-fefbef03.js} +1 -1
- package/cjs/{nextEpisodeButton-a0c35a98.js → nextEpisodeButton-e3411358.js} +1 -1
- package/cjs/{playlist-51489f94.js → playlist-aacf1e48.js} +1 -1
- package/cjs/{series-9abe4870.js → series-f4111a52.js} +1 -1
- package/cjs/{series-v2-828e87bd.js → series-v2-2cf1a060.js} +1 -1
- package/cjs/{series-v2-4630b42f.js → series-v2-7b6dc717.js} +1 -1
- package/cjs/{skin-7e07993b.js → skin-012a6dac.js} +1 -1
- package/cjs/{skin-737b56f1.js → skin-015c723e.js} +1 -1
- package/cjs/{skin-cf55d6a4.js → skin-7860187e.js} +1 -1
- package/cjs/{skin-bfa66ca0.js → skin-908e8c2b.js} +1 -1
- package/cjs/{skin-dff6e173.js → skin-966aa1e7.js} +1 -1
- package/cjs/{skin-25f9f101.js → skin-a75bf11a.js} +1 -1
- package/cjs/{skin-e7515c1a.js → skin-c46d8f40.js} +1 -1
- package/cjs/{skin-3abb4521.js → skin-c8afd3aa.js} +1 -1
- package/cjs/{skin-64830002.js → skin-f0ba253b.js} +1 -1
- package/cjs/{videoSelector-7b25405a.js → videoSelector-66a04b3f.js} +1 -1
- package/cjs/{videoSelector-3d5ff1bf.js → videoSelector-ac6eae36.js} +1 -1
- package/esm/autoNextVideo-e34d4926.js +1 -0
- package/esm/bundle.css +201 -201
- package/esm/{features-a8a9f436.js → features-dbe64e24.js} +1 -1
- package/esm/generic-bfe86693.js +1 -0
- package/esm/helpers/drmErrorDetection.d.ts +6 -0
- package/esm/index-16598af9.js +1 -0
- package/esm/index-a271dbe5.js +1 -0
- package/esm/{index-2621a170.js → index-b50bbe70.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-49b2f54d.js → multicamv2-978e7d5c.js} +1 -1
- package/esm/{multicamv2-acbd2e35.js → multicamv2-cb086d7a.js} +1 -1
- package/esm/{nextEpisodeButton-f2bddf2c.js → nextEpisodeButton-cfc892fc.js} +1 -1
- package/esm/{playlist-8f26ed93.js → playlist-03c2520c.js} +1 -1
- package/esm/{series-82908795.js → series-bbeb06d0.js} +1 -1
- package/esm/{series-v2-6be7f616.js → series-v2-10c541bd.js} +1 -1
- package/esm/{series-v2-ed3a799c.js → series-v2-40f0a1a0.js} +1 -1
- package/esm/{skin-5cf211bb.js → skin-233e7f23.js} +1 -1
- package/esm/skin-24287449.js +1 -0
- package/esm/skin-63a75648.js +1 -0
- package/esm/{skin-739f37c9.js → skin-806ff63d.js} +1 -1
- package/esm/{skin-bc25c1dc.js → skin-94eafdb7.js} +1 -1
- package/esm/{skin-9061acb8.js → skin-afac5246.js} +1 -1
- package/esm/{skin-c27ab30f.js → skin-c3de509e.js} +1 -1
- package/esm/{skin-b64addd2.js → skin-d70b645b.js} +1 -1
- package/esm/{skin-f0691120.js → skin-e5bb0687.js} +1 -1
- package/esm/{videoSelector-ca70dece.js → videoSelector-48a731a1.js} +1 -1
- package/esm/{videoSelector-0148241c.js → videoSelector-9d4fe718.js} +1 -1
- package/package.json +29 -29
- package/cjs/generic-690f32fe.js +0 -1
- package/esm/autoNextVideo-c799bcd9.js +0 -1
- package/esm/generic-2e248650.js +0 -1
- package/esm/index-c957fc87.js +0 -1
- package/esm/index-cad73f72.js +0 -1
- package/esm/skin-503626ae.js +0 -1
- package/esm/skin-ece7709a.js +0 -1
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-690f32fe.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/regenerator"),o=require("video.js"),l=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/get"),u=require("@babel/runtime/helpers/inherits"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),c=require("./index-ba862bae.js"),v=require("./captions-5f9611f1.js"),p=require("./renditions-6f165ef5.js"),f=require("./resolution-19103db5.js"),m=require("./skin-16ae23af.js"),g=require("./browser-3670a923.js"),h=require("./localisation-56e0a999.js"),y=require("@babel/runtime/helpers/typeof");require("@viewlift/comscore/index.js");var b=require("@babel/runtime/helpers/toConsumableArray"),w=require("@viewlift/sse"),k=require("./relatedVideosManager-eeeaf32c.js");function S(e,n,t,i){var o=a(d(1&i?e.prototype:e),n,t);return 2&i&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/assertThisInitialized");var E=o.getComponent("TextTrackSettings"),I=o.dom,P=[{value:"12",label:"12px"},{value:"14",label:"14px"},{value:"16",label:"16px"},{value:"18",label:"18px"},{value:"20",label:"20px"},{value:"24",label:"24px"},{value:"28",label:"28px"},{value:"32",label:"32px"}],O=P.map(function(e){return e.value}),j="16",D="vlp-caption-font-size-px",C="vlp-caption-font-size-style",x=".vjs-font-percent > select",R=function(e){return-1!==O.indexOf(e)?e:j},A=null;E?(A=function(){u(i,E);var e,n,t=(e=i,n=T(),function(){var t,i=d(e);if(n){var o=d(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return s(this,t)});function i(e,n){var o;return l(this,i),(o=t.call(this,e,n)).customUiReady_=!0,o.applyCustomFontSizeUI_(),o}return r(i,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(x);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);P.forEach(function(n){e.appendChild(I.createEl("option",{value:n.value,textContent:n.label}))}),e.value=j}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$(x);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=R(e);if("undefined"!=typeof document){var t=document.getElementById(C);t||((t=document.createElement("style")).id=C,document.head.appendChild(t)),t.textContent=[".vjs-text-track-cue,",".vjs-text-track-cue > div,",".vjs-text-track-display-ttml,",".vjs-text-track-display-ttml span,",".vjs-text-track-display-ttml div","{ font-size: ".concat(n,"px !important; line-height: normal !important; }")].join(" ")}}},{key:"restoreCustomFontSize_",value:function(){var e=null;try{e=window.localStorage.getItem(D)}catch(e){}var n=R(e),t=this.$(x);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=S(i,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(S(i,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$(x);e&&(e.value=j),this.applyFontSize_(j)}}},{key:"saveSettings",value:function(){if(S(i,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$(x);if(e)try{window.localStorage.setItem(D,R(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){S(i,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),i}(),o.registerComponent("TextTrackSettings",A)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var L=function(e){return new Promise(function(n,t){if(_(e))t("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){n()},i.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(i)}})},_=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},V=function(e,n,t){var i=m.getPlayer(e);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var o=parseFloat(n)/100;i.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,"'")})},N=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},B=function(){var e=t(i.mark(function e(n){var t,l,r,a,u;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=m.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,L("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(o),e.finish(13);case 16:(u=o.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.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==l||l.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)}}(),M=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,i,l,r,a,u=this.el(),s=o.dom.getPointerPosition(u,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(l=i.framework)||void 0===l||null===(r=l.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}})};var U=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),L("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)}}(),q=function(){var n=t(i.mark(function n(){return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),H=function(){var e=t(i.mark(function e(){return i.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){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),F=function(){var e=t(i.mark(function e(){var n;return i.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(o),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)}}(),z=function(){var e=t(i.mark(function e(){return i.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-84cce26a.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)}}(),G=function(){var e=t(i.mark(function e(){return i.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-072614bc.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)}}(),W=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){L("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:U,loadEMELibrary:H,loadMuxPlugin:F,loadDvrSeekbar:z,loadContribDash:G,loadComscorePlugin:q});function K(e){return Y.apply(this,arguments)}function Y(){return(Y=t(i.mark(function e(n){var t;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,U();case 3:t&&"Safari"==g.detectBrowser()&&Promise.resolve().then(function(){return W}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $(e){return J.apply(this,arguments)}function J(){return(J=t(i.mark(function e(n){var t,o,l,r,a,u,s,d,c,v;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=m.getPlayer(n.playerId),e.next=3,q();case 3:v.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(l=n.comscore)||void 0===l?void 0:l.applicationName)||(null===(r=window)||void 0===r?void 0:r.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===(d=n.comscore)||void 0===d?void 0:d.persistentLabels)||{},metadata:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function X(e,n){return Q.apply(this,arguments)}function Q(){return(Q=t(i.mark(function e(n,t){var o,l,r,a,u,s,d,c,v,p,f,m,h,y;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",p=null==t||null===(o=t[v])||void 0===o?void 0:o.drmEnabled,null==t||null===(l=t[v])||void 0===l||null===(r=l.liveDetails)||void 0===r||r.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[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===(d=n.comscore)||void 0===d?void 0:d.enable)||!1,h=!(null==n||null===(c=n.analytics)||void 0===c||!c.muxKey),e.prev=7,e.next=10,Promise.allSettled([p?"Safari"==g.detectBrowser()?H():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?G():H():"Safari"!=g.detectBrowser()&&f?G():null,m?$(n):null,h?F():null,B(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 Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ee(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Z(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var ne=new Set,te=null,ie=function(n,t,i,o){var l,r,a,u,s,d,c,v={},p=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(l=n[p])||void 0===l?void 0:l.id)||"Null",v["c3.cm.contentType"]=de(n),v[null==i||null===(r=i.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==n||!n.linearchannel),v[null==i||null===(a=i.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==i||null===(u=i.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),v["c3.cm.categoryType"]=ae(n),v["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"}}(),v.DRMEnabled=(null===(s=n[p])||void 0===s?void 0:s.drmEnabled)||"None",v.DAIStream=null!==(d=n[p])&&void 0!==d&&null!==(c=d.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",v[i.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=ue(n),v["c3.cm.genreList"]=le(n),v["c3.cm.genre"]=oe(n),v["c3.cm.channel"]=re(n,o);var f=pe(e.getCurrentSeries(),n);return v=ee(ee({},v),f)},oe=function(e){var n,t,i,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===(i=t.primaryCategory)||void 0===i?void 0:i.title)||"Null"},le=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"},re=function(e,n){var t,i,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(i=((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===i?void 0:i.title)||"NULL"},ae=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"},ue=function(e){var n,t,i=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[i])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},se=function(e,n){var t,i,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(i=t.gist)||void 0===i?void 0:i.title)||"Null";return"".concat(r)},de=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ce,ve,pe=function(n,t){var i,o,l,r,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(i=t.video)||void 0===i||null===(o=i.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(l=n[s-1])||void 0===l||null===(r=l.episodes)||void 0===r||null===(a=r[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},fe=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"}},me=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ge=function(){var n=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v,p,f,g,h;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l=(null==o?void 0:o.convivaConfig)||{},r=l.trackConvivaPlayerEvent,a=l.paymentHandler,u=l.tveProvider,s=l.enable,d=l.appName,v=(c=o||{}).token,p=c.epg,s){n.next=4;break}return n.abrupt("return");case 4:if(f=m.getPlayer(t),"function"==typeof(g=r)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,g("getConvivaObject");case 10:if(h=n.sent){n.next=13;break}return n.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 i=fe(t.keySystem);g("contentInfo",{DRMEnabled:i})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;te&&te!==f.currentSrc()&&g("playbackEnded"),g("setPlayer",f),ne.clear(),te=f.currentSrc();var i=me(f.currentType()),l=e.getCurrentVideo(),r=ie(l,f,h,p);r[null==h||null===(n=h.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",r[null==h||null===(t=h.Constants)||void 0===t?void 0:t.ASSET_NAME]=se(l,o),r.authToken=v||"NULL",r.streamType=i,r.D2CType=a||"NONE",r.subscriberType=u?"MVPD":"FREE"!==a?"D2C":"FREE",r["c3.cm.affiliate"]=u||"NULL",he.setData(r),g("contentInfo",r)}),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"),g("contentInfo",{screenResolution:e})}),f.on("play",function(){ne.has(f.currentSrc())||(ne.add(f.currentSrc()),g("playbackStarted",null))}),f.on("ended",function(){ne.has(f.currentSrc())&&ne.delete(f.currentSrc()),g("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==ne||ne.clear(),g("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),he=(ce={},{setData:function(e){ce=ee(ee({},ce),e)},getData:function(){return ce}}),ye=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-e7515c1a.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-7e07993b.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-cf55d6a4.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-737b56f1.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-bfa66ca0.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-25f9f101.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-3abb4521.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-64830002.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&Promise.resolve().then(function(){return require("./skin-dff6e173.js")}).then(function(t){t.initialiseSkin(e,n)})};function be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function we(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?be(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):be(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var ke=[],Se=0,Te=null;function Ee(){ve=null,ke=[],Se=0,Te=null}function Ie(t,i,o){var l,r,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==i||null===(l=i.watchHistory)||void 0===l||l.apiVersion;var c=null==i||null===(r=i.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(t.currentTime()),p=Math.floor(t.duration());null==i||null===(a=i.watchHistory)||void 0===a||a.xapiKey;var f=(null==i||null===(u=i.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==i||null===(s=i.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),h=d?100:Math.floor(v/p*100),y={};m?function(t,i,o){var l=i?"watchhistory-data-".concat(i):"watchhistory-data-guest-".concat(o),r=Pe(l),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return we(we({},e),{},n({},t,s[t]))},{}),c=r.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ve});c<0?r.push(we(we({content:d},t),{},{addedDate:a,updateDate:a})):r[c]=we(we(we({},r[c]),t),{},{updateDate:a});localStorage.setItem("".concat(l),JSON.stringify(r))}(y={completed:d,watchedTime:g,watchedPercentage:h},c,i.siteOwner):(y=we(we({videoId:ve,watchedTime:g,watchedPercentage:h,doneWatching:d,profileId:c},Te&&{seriesId:Te}),f&&{originalObjectId:f}),e.saveWatchHistory(y).then(function(e){}).catch(function(e){})),Se=v+o}function Pe(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Oe(e,n,t){var i=Pe(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return i&&Array.isArray(i)&&(o=i.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var je=!1,De=function(n,t){var i,o,l=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(i=n[l])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!je){var r=Ce(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(r,t);return a&&e.loadVideo(t,a),je=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function Ce(e,n,t){if(Array.isArray(e))return e.map(function(e){return Ce(e,n,t)});if(null!==e&&"object"===y(e)){var i={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?i[o]=e[t]:o===t&&void 0!==e[n]?i[o]=e[n]:i[o]=Ce(e[o],n,t)}),i}return e}function xe(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 Re(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)?Re(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},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 l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Re(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Le(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ae(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var _e=function(n,t,i,o){var l,r,a,u,s,d=o.res,c=o.sres,p=m.getPlayer(n),f=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(l=d[f])||void 0===l?void 0:l.drmEnabled)||!1,b=!(null==d||null===(r=d[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===f,w=(null==d||null===(u=d[f])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;e.setCurrentVideo(d),e.videoReplayTracker.set(d),p&&(p.on("loadstart",function(){b?i.resolve({status:!0,msg:"Video Loaded",response:d}):i.resolve(Le({status:!0,msg:"Player Initialised"},c?{seriesResponse:c,response:d}:{response:d}))}),p.on("loadeddata",function(){var i,o,l,r,a=v.getCaptions(n);if(null==a||a.map(function(e){return v.disableCaptions(n,e.id)}),w&&"Safari"===g.detectBrowser())try{var u;null==p||null===(u=p.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==p||!p.muted())&&V(n,sessionStorage.getItem("volume")||"100");var s=e.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.isExternal){var c=Le(Le({},t),d);!function(e,n){var t,i,o;if(null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.cb&&"function"==typeof(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.cb)){var l,r,a,u=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,s=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.completionThreshold)||95,d=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.cb,c=-1;e.on("seeked",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(c=t,t>0){var i=Math.floor(n/e.duration()*100);d({watchedTime:n,watchedPercentage:i,doneWatching:i>=s})}}),e.on("timeupdate",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(n%u===0&&t!==c){c=t;var i=Math.floor(n/e.duration()*100);d({watchedTime:n,watchedPercentage:i,doneWatching:i>=s||!1})}}),e.on("ended",function(){d({watchedTime:Math.floor(e.duration()),watchedPercentage:100,doneWatching:!0})})}}(p,c)}else if(null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.saveOffline)){var f,h,y=Le(Le({},t),d);!function(e,n,t){var i,o,l;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(Te=null==n||null===(o=n.series)||void 0===o?void 0:o.id),ke=[],Se=0,ve=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=m.getPlayer(e);a&&(a.on("dispose",Ee),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());ke.includes(Se)||(e!=Se||e<r?e>Se&&(Se=e+r):(ke.push(e),Ie(a,n,r)))}}),a.one("ended",function(){Ie(a,n,r,!0)}))}(n,y,null==s||null===(f=s.video)||void 0===f||null===(h=f.gist)||void 0===h?void 0:h.id)}if(null!=t&&null!==(r=t.analytics)&&void 0!==r&&r.muxKey&&null!=p&&p.mux){var b,k,S,T,E,I,P=(null===(b=e.getCurrentVideo())||void 0===b?void 0:b.video)||(null==d?void 0:d.video),O=null==P?void 0:P.gist,j={env_key:null==t||null===(k=t.analytics)||void 0===k?void 0:k.muxKey,player_name:"vl-web-player",player_version:null===(S=window)||void 0===S?void 0:S.vl_player_version,video_id:null==O?void 0:O.id,video_title:null==O?void 0:O.title,video_series:null==P||null===(T=P.series)||void 0===T?void 0:T.title,video_stream_type:null!=P&&null!==(E=P.streamingInfo)&&void 0!==E&&E.isLiveStream?"live":"video",viewer_user_id:null==t||null===(I=t.analytics)||void 0===I?void 0:I.userId};p.mux({debug:!1,data:j})}}),p.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];p.trigger("subtitlechanged",n)}),p.on("subtitlechanged",function(e,n){var t,i,o,l,r,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=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===(r=l.getInstance())||void 0===r?void 0:r.S,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),p.tech_.on("retryplaylist",function(){b&&De(d,n)}),p.on("error",function(){var t,o;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&b)?De(d,n):(e.handleError(n,(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured"),i.reject({status:!1,msg:(null==p||null===(o=p.error())||void 0===o?void 0:o.message)||"Some error occured",response:d}))}),p.one("play",function(){var n,i,o,l,r;if(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(l=o.adsConfig)||void 0===l||!l.vodAdClientSideTracking){if(null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable){var a,u,s,d=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},f=v.t,m=v.p;f&&m<95&&setTimeout(function(){p.currentTime(f)},0)}else{var g,h,y,b,w,k,S,T=null!==(g=null==t?void 0:t.watchHistoryResumeTime)&&void 0!==g?g:null==t||null===(h=t.watchHistory)||void 0===h?void 0:h.watchedTime,E=null!==(y=null!==(b=null==t?void 0:t.watchedPercentage)&&void 0!==b?b:null==t||null===(w=t.watchHistory)||void 0===w?void 0:w.watchedPercentage)&&void 0!==y?y:0,I=null!==(k=null==t||null===(S=t.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==k?k:95;T&&E<I&&setTimeout(function(){p.currentTime(T)},0)}if(null!=p&&p.dvrSeekbar)try{p.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),p.on("volumechange",function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),p.on("chromecastDisconnected",function(){if(b){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}}),p.one("loadeddata",function(){var e,n=(null==p||null===(e=p.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),i=(n.language||n.label||"").toUpperCase();return t<i?-1:t>i?1:0}),"object"==y(p.dash)){var t,i,o,l=null==p||null===(t=p.dash)||void 0===t||null===(i=t.mediaPlayer)||void 0===i?void 0:i.getTracksFor("audio"),r=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=xe(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(r&&(null==u?void 0:u.id)=="dash-audio-".concat(r.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=xe(n);try{for(d.s();!(s=d.n()).done;){var c,v,f,m=s.value;if(("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(c=navigator)&&void 0!==c&&null!==(v=c.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=m&&null!==(f=m.label)&&void 0!==f&&f.includes("5.1"))p.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function Ve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Ne(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ve(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Be={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},Me=function(l,r,a,u){var s,d,c,p,f,h,y,b,w,k,S,T,E,I,P,O,j,D,C,x,R,A,L,_,V,N,B,U,q,H,F,z,G,W,K,Y,$,J,Q=r.res,Z=void 0===Q?null:Q,ee=r.sres,ne=void 0===ee?null:ee,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)||""),i=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:i,dashLogLevel:null!=i&&null!=Be[i]?Be[i]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ie=te.playerDebug,oe=te.logLevel,le=te.dashLogLevel;ie&&(console.log("[PLAYER DEBUG] config:",a),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var re=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(s=Z)||void 0===s?void 0:s.contentType)||"video",ue=m.impolicy16x9(null===(d=Z)||void 0===d||null===(c=d[ae])||void 0===c||null===(p=c.gist)||void 0===p?void 0:p.videoImageUrl)||m.impolicy16x9(null===(f=Z)||void 0===f||null===(h=f[ae])||void 0===h||null===(y=h.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),se=(null===(w=Z)||void 0===w||null===(k=w[ae])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,de=!(null===(T=Z)||void 0===T||null===(E=T[ae])||void 0===E||null===(I=E.streamingInfo)||void 0===I||!I.isLiveStream)||"linearchannel"===ae,ce=(null===(P=Z)||void 0===P||null===(O=P.ads)||void 0===O||null===(j=O.preRoll)||void 0===j||null===(D=j.adTags)||void 0===D||null===(C=D.web)||void 0===C?void 0:C.active)&&(null===(x=Z)||void 0===x||null===(R=x.ads)||void 0===R||null===(A=R.preRoll)||void 0===A||null===(L=A.adTags)||void 0===L||null===(_=L.web)||void 0===_?void 0:_.url);Z=Ne(Ne({},Z),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ve=(null==a||null===(V=a.customData)||void 0===V?void 0:V.ads)||{},pe=(null===(N=Z)||void 0===N||null===(B=N[ae])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,fe=!(null===(U=Z)||void 0===U||null===(q=U[ae])||void 0===q||!q.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),me=(null==a?void 0:a.latency)||6,be=(null==a?void 0:a.skin_settings)||{},we=($={enableSmoothSeeking:!0,controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==be?void 0:be.pictureInPictureToggle)||!1},playbackRates:null!=be&&be.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==a.skin,liveui:se},n($,"autoplay",null==a?void 0:a.autoplay),n($,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!ce),n($,"loop",(null==a?void 0:a.loop)||!1),n($,"audioPosterMode",null==a?void 0:a.audioPosterMode),n($,"html5",Ne(Ne({dash:Ne(Ne({},!o.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Ne(Ne({},((null==a?void 0:a.debugConfig)&&(null==a||null===(H=a.debugConfig)||void 0===H?void 0:H.enable)||ie)&&{debug:{logLevel:le}}),{},{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Ne({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:Ne(Ne(Ne(Ne({},(null==a?void 0:a.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==a?void 0:a.initialBandwidth)/1e3}}),(null==a?void 0:a.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==a?void 0:a.maxBitrate)/1e3}}),(null==a?void 0:a.minBitrate)&&{minBitrate:{audio:-1,video:(null==a?void 0:a.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:Ne(Ne(Ne({},(null==a?void 0:a.initialBandwidth)&&{bandwidth:a.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==a||!a.initialBandwidth},(null==a||null===(F=a.customData)||void 0===F?void 0:F.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(z=null==a?void 0:a.enableLowInitialPlaylist)&&void 0!==z&&z},((null==a?void 0:a.debugConfig)&&(null==a||null===(G=a.debugConfig)||void 0===G?void 0:G.enable)||ie)&&{debug:!0}),debug:(null==a?void 0:a.debugConfig)&&(null==a||null===(W=a.debugConfig)||void 0===W?void 0:W.enable)||ie||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==a||null===(K=a.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(Y=a.customData)||void 0===Y?void 0:Y.nativeVideoTracks)&&{nativeVideoTracks:!1})),n($,"poster",ue),n($,"techOrder",re),n($,"chromecast",{requestCustomDataFn:function(n){var t,i,o=m.getPlayer(l),r=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),u=function(e,n,t){var i,o,l,r,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,h,y,b,w,k,S;f.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,E=(null==T?void 0:T.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);f.licenseUrl=E;var I=(null==T?void 0:T.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"]);f.licenseToken=I}var P=(null==e||null===(i=e[p])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";f.contentType=P;var O=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=O;var j=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=j;var D=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=D,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(Z,n,r);return Ne(Ne({},u),{},{transmitTrackingUrl:e.trackingUrlManager.get()||null,convivaMetaData:Ne({customerKey:(null==a||null===(t=a.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==a||null===(i=a.convivaConfig)||void 0===i?void 0:i.debug)||!1},he.getData())})},modifyLoadRequestFn:function(e){var n,t,i,o,r,a=m.getPlayer(l),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Z)||void 0===n||null===(t=n[ae])||void 0===t||null===(i=t.streamingInfo)||void 0===i||null===(o=i.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(r=u.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!o.getPlayers()[l]){(null!=a&&a.debugConfig&&null!=a&&null!==(J=a.debugConfig)&&void 0!==J&&J.enable||ie)&&o.log.level(oe||"debug");var ke=o(l,we,function(){var n=t(i.mark(function n(){var t,r,s,d,c,p,f,m,g,h,y,b,w,k,S,T,E,I,P,O,j,D;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ke),console.log(o.VERSION),console.log(o.getPlugins()),n.next=5,X(a,Z);case 5:if(null!=a&&a.debugConfig&&null!=a&&null!==(t=a.debugConfig)&&void 0!==t&&t.enable||ie){try{o.log.level(oe||"debug")}catch(e){}(w=function(){try{var e,n,t;null==ke||null===(e=ke.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:le}})}catch(e){}})(),ke.one("loadedmetadata",w)}if(k=null===(r=Z)||void 0===r||null===(s=r[ae])||void 0===s||null===(d=s.liveDetails)||void 0===d?void 0:d.startOverTime,de&&u.resolve(Ne({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),e.inititateBeacon(l,{analyticsCb:null==a?void 0:a.analyticsCb,analyticsEventParams:null==a?void 0:a.analyticsEventParams,userId:null==a?void 0:a.userId}),ge(l,a),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),se&&M(l,k),!ce||null!=a&&null!==(c=a.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(l,ce,Z),S=e.getSource(Z,l),console.log(S),ie&&(console.log("[PLAYER DEBUG] source:",S),console.log("[PLAYER DEBUG] videojs options:",we)),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),!pe){n.next=23;break}return n.next=20,e.getSGAIEnabledSource(l,Z);case 20:S=n.sent,n.next=27;break;case 23:if(!fe){n.next=27;break}return n.next=26,e.getTransmitEnabledSource(S,Z,l);case 26:S=n.sent;case 27:S?e.loadVideo(l,S):(u.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),e.handleError(l,"Incompatible / Missing Source")),((null===(p=Z)||void 0===p||null===(f=p[ae])||void 0===f||null===(m=f.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=Z)||void 0===h||null===(y=h[ae])||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0)&&(D=(null===(E=Z)||void 0===E||null===(I=E[ae])||void 0===I||null===(P=I.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null===(O=Z)||void 0===O||null===(j=O[ae])||void 0===j?void 0:j.closedCaptions),T=D.filter(function(e){return"VTT"===e.format}),v.addCaptions(l,T)),null!=a&&a.disableControls?e.disableControls(l):ye(l,Ne(Ne(Ne({},a),we),{},{liveVideo:de,isDvrEnabled:se,res:Z,sres:ne})),_e(l,Ne(Ne(Ne({},a),we),{},{liveVideo:de}),u,{res:Z,sres:ne});case 31:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function Ue(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function qe(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ue(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var He=function(e,n){var t=n.resolve,i=n.reject,o=null==e?void 0:e.playerId,l=Fe(e);Me(o,{res:l},e,{resolve:t,reject:i})},Fe=function(n){var t,i,o,l,r,a,u,s,d,c,v,p,f,m=null==n?void 0:n.streamingInfo,g=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,h=(null==n||null===(i=n.streamingInfo)||void 0===i?void 0:i.isDrmEnabled)||null,y=(null==n||null===(o=n.streamingInfo)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.url)||null,w=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.posterUrl)||null,k=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],S=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,T=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],E=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,I=null==n?void 0:n.token,P=e.getDecodedToken(I);null==P||P.site;var O=null==P?void 0:P.siteId,j=(null==n||null===(p=n.customData)||void 0===p||null===(f=p.comscore)||void 0===f?void 0:f.video)||null,D=qe(qe({id:"".concat(O,"_external")},!h&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:qe(qe(qe(qe(qe({drmEnabled:h,streamingInfo:qe(qe({videoAssets:qe(qe({},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==m?void 0:m.isDvrEnabled)&&{isLiveStream:!0}),(null==j?void 0:j.isLiveStream)&&{isLiveStream:null==j?void 0:j.isLiveStream})},E&&{isSSAIEnabled:E}),{},{metadata:T,liveDetails:{isDvrEnabled:null==m?void 0:m.isDvrEnabled},gist:qe(qe(qe({},w&&{videoImageUrl:w}),(null==j?void 0:j.videoId)&&{id:null==j?void 0:j.videoId}),(null==j?void 0:j.videoTitle)&&{title:null==j?void 0:j.videoTitle}),contentDetails:qe({},(null==k?void 0:k.length)>0&&{closedCaptions:b(k)})},(null==j?void 0:j.runtime)&&{runtime:null==j?void 0:j.runtime}),(null==j?void 0:j.publishDate)&&{publishDate:null==j?void 0:j.publishDate}),(null==j?void 0:j.platform)&&{platform:null==j?void 0:j.platform}),(null==j?void 0:j.series)&&{series:null==j?void 0:j.series}),ads:{preRoll:{adTags:{web:qe(qe({},y&&{active:!0}),y&&{url:y})}}}});return j&&(null!=j&&j.isDvrEnabled&&(D.video.liveDetails=qe(qe({},D.video.liveDetails),{},{isDvrEnabled:null==j?void 0:j.isDvrEnabled})),null!=j&&j.metadata&&(D.video.metadata=[].concat(b(D.video.metadata),b(null==j?void 0:j.metadata)))),D};function ze(e,n){return Ge.apply(this,arguments)}function Ge(){return(Ge=t(i.mark(function n(t,o){var l,r,a,u,s,d,v,p,f;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.resolve,u=o.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,v=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:p=n.sent,f=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getVideoDetails(s,p,f).then(function(n){var i,o,l,r,f,m,g,h,y,b,w;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(o=i.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(null==n?void 0:n.data);var k=null==n||null===(r=n.data)||void 0===r||null===(f=r.video)||void 0===f||null===(m=f.gist)||void 0===m?void 0:m.scheduleEndDate,S=null==n||null===(g=n.data)||void 0===g||null===(h=g.video)||void 0===h||null===(y=h.gist)||void 0===y?void 0:y.scheduleStartDate;c.handlePlayerMessage(d,{scheduleEndDate:k,scheduleStartDate:S});var T=null==n?void 0:n.data;if(null!=t&&null!==(b=t.watchHistory)&&void 0!==b&&b.isExternal)T.contentType="video",Me(d,{res:T},t,{resolve:a,reject:u});else if(null!=t&&t.watchHistory&&null!=t&&null!==(w=t.watchHistory)&&void 0!==w&&w.enable&&!v){var E;if((null===(E=t.watchHistory)||void 0===E?void 0:E.saveOffline)||!1){var I,P,O,j=Oe((null===(I=t.watchHistory)||void 0===I?void 0:I.profileId)||"",s,null==t?void 0:t.siteOwner);if(j&&j.length)t.watchHistoryResumeTime=(null===(P=j[0])||void 0===P?void 0:P.watchedTime)||null,t.watchedPercentage=(null===(O=j[0])||void 0===O?void 0:O.watchedPercentage)||null;T.contentType="video",Me(d,{res:T},t,{resolve:a,reject:u})}else e.getVideoInfo(s,p).then(function(e){var n,i,o,l,r,a;null!==(n=window)&&void 0!==n&&null!==(i=n.watchHistory)&&void 0!==i&&i.cb&&(null===(o=window)||void 0===o||null===(l=o.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,T.contentType="video"}).catch(function(){}).finally(function(){Me(d,{res:T},t,{resolve:a,reject:u})})}else Me(d,{res:T},t,{resolve:a,reject:u})}).catch(function(n){var i,o,l=(null==t||null===(i=t.event)||void 0===i?void 0:i.showScheduleTimer)||!1,r=(null==t||null===(o=t.event)||void 0===o?void 0:o.onCountdownComplete)||null;l&&c.handleCountdownTimer(d,n,r),e.initiateErrorHandling(n,d,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function We(e,n){return Ke.apply(this,arguments)}function Ke(){return(Ke=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.resolve,u=o.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,Me(d,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,d,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ye(e,n){return $e.apply(this,arguments)}function $e(){return($e=t(i.mark(function n(t,o){var l,r,a,u,s,d,c;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(l=t.series)||void 0===l?void 0:l.id,e.getSeriesDetails(c,u).then(function(n){var i,o,l,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var p=videoId||(null==v||null===(i=v[0])||void 0===i||null===(o=i.episodes)||void 0===o||null===(l=o[0])||void 0===l?void 0:l.id);e.createSeriesWatchMap(c,u),e.getVideoDetails(p,u).then(function(n){var i,o,l;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(o=i.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(n.data),Me(s,{res:null==n?void 0:n.data,sres:d},t,{resolve:r,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}var Je,Xe=function(n){var t=n.site,i=n.sseBaseUrl,o=n.sseEndpoint,l=n.debug,r=void 0!==l&&l;return w.createSSETransport({site:t,sseBaseUrl:i,getToken:e.getToken,sseEndpoint:o,onOpen:function(e){var n=e.userId,t=e.endpoint;r&&console.log("SSE Connected:",n,t)},onMessage:function(n){var t,i,o,l,a,u,s,d,v,p;if(r&&console.log("SSE Message:",n),(null===(t=e.getCurrentVideo())||void 0===t||null===(i=t.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id)===(null==n||null===(l=n.payload)||void 0===l?void 0:l.id)&&"GAME_STATE_CHANGE"===(null==n?void 0:n.notificationType)){var f=1e3*(null==n||null===(a=n.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.live)||void 0===s?void 0:s.startDateTime),m=1e3*(null==n||null===(d=n.payload)||void 0===d||null===(v=d.states)||void 0===v||null===(p=v.end)||void 0===p?void 0:p.endDateTime);f&&m&&(console.log("Setting schedule timer",f,m),c.scheduleTimerInstanceManager.set({startDateTime:f,endDateTime:m}))}},onReconnectAttempt:function(e){r&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;r&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){r&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){r&&console.error("SSE Error:",e,n)},onClose:function(){r&&console.log("SSE Closed")}})},Qe=function(e){var n=e.enable,t=e.site,i=e.sseBaseUrl,o=e.sseEndpoint,l=e.debug;if(n){var r=Xe({site:t,sseBaseUrl:i,sseEndpoint:o,debug:void 0!==l&&l});return r._sseBaseUrl=i,r._site=t,r._sseEndpoint=o,r}};function Ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function en(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ze(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:c.onTimeUpdate,getVideoDuration:c.getVideoDuration,onVideoEnded:c.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(i.mark(function t(o,l){var r,a,u,s,d,c,v,p,f,g,y,b,w,S,T,E,I,P,O,j,D,C,x,R,A,_,V,N,B,M,U,q;return i.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=3;break}return o({status:!0,msg:"Player already initialised",skipped:!0}),t.abrupt("return");case 3:if(O=(null==n?void 0:n.videoSourceUrl)||!1,j=null==n?void 0:n.asat,D=(null==n||null===(r=n.epg)||void 0===r?void 0:r.enable)||!1,C=null==n?void 0:n.videoId,x=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,R=(null==n?void 0:n.streamingInfo)||!1,window.videoId=C,A=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=18;break}if(sessionStorage.setItem("vlp_token",A),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),A&&!e.isTokenExpired(A)){t.next=17;break}return l({status:!1,msg:"".concat(A?"Token is expired !":"Missing Authorization Token"),response:{token:A}}),t.abrupt("return");case 17:Je=JSON.parse(atob(A.split(".")[1]));case 18:return window.siteName=null===(u=Je)||void 0===u?void 0:u.site,window.siteId=null===(s=Je)||void 0===s?void 0:s.siteId,n.isAnonymousUser=!(null===(d=Je)||void 0===d||!d.anonymousId),n.siteOwner=(null===(c=Je)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=Je)||void 0===v?void 0:v.userId)||null,e.setUserId((null===(p=Je)||void 0===p?void 0:p.userId)||(null===(f=Je)||void 0===f?void 0:f.anonymousId)||null),window.watchHistory=n.watchHistory||null,_=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,V=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(N=null==n?void 0:n.errors)&&(window.customErrors=N),window.customData=null==n?void 0:n.customData,h.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!m.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),e.playerConfigManager.setConfig(n),k.relatedVideosManager.reset(),k.relatedVideosManager.set(null==n?void 0:n.relatedVideos),t.next=39,K(n);case 39:V&&L("https://www.googletagmanager.com/gtag/js?id=".concat(V)).then(function(){return e.runGtag(V)}).catch(function(e){}),(B=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(_)))&&B.addEventListener("contextmenu",function(e){return e.preventDefault()}),(M=Qe({enable:null==n||null===(S=n.sse)||void 0===S?void 0:S.enable,site:null==n||null===(T=n.sse)||void 0===T?void 0:T.siteName,sseBaseUrl:null==n||null===(E=n.sse)||void 0===E?void 0:E.sseBaseUrl,sseEndpoint:null==n||null===(I=n.sse)||void 0===I?void 0:I.sseEndpoint,debug:null==n||null===(P=n.sse)||void 0===P?void 0:P.debug}))&&!M.isConnectionActive()&&M.connect(),O?(q={directPlaybackUrl:O,id:U="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},j?e.getVideoDetails(U,A).then(function(e){var t=(null==e?void 0:e.data)||{};Me(_,{res:en(en({},t),q)},n,{resolve:o,reject:l})}).catch(function(n){e.initiateErrorHandling(n,_,l,U)}):Me(_,{res:q},n,{resolve:o,reject:l})):R?He(n,{resolve:o,reject:l}):x?Ye(n,{resolve:o,reject:l}):D?We(n,{resolve:o,reject:l}):ze(n,{resolve:o,reject:l});case 45:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:p.getRenditions,skip:e.skip,getPlayer:m.getPlayer,play:e.play,pause:e.pause,detectBrowser:g.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:c.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:v.enableCaptions,disableCaptions:v.disableCaptions,getCaptions:v.getCaptions,playSelectedResolution:f.playSelectedResolution,getSource:e.getSource,setVolume:V,getVolume:N,disableControls:e.disableControls,setPlaybackSpeed:c.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:e.getSsaiEvents,playerEvents:c.playerEvents,onReplay:c.onReplay,relatedVideosManager:k.relatedVideosManager}};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-b2ccfd5e.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/regenerator"),o=require("video.js"),l=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/get"),u=require("@babel/runtime/helpers/inherits"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),c=require("./index-04ba3869.js"),v=require("./captions-5f9611f1.js"),f=require("./renditions-6f165ef5.js"),p=require("./resolution-19103db5.js"),m=require("./skin-16ae23af.js"),g=require("./browser-3670a923.js"),h=require("./localisation-56e0a999.js"),y=require("@babel/runtime/helpers/typeof");require("@viewlift/comscore/index.js");var b=require("@babel/runtime/helpers/toConsumableArray"),w=require("@viewlift/sse"),k=require("./relatedVideosManager-eeeaf32c.js");function S(e,n,t,i){var o=a(d(1&i?e.prototype:e),n,t);return 2&i&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(E=function(){return!!e})()}require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/assertThisInitialized");var D=o.getComponent("TextTrackSettings"),I=o.dom,T=[{value:"12",label:"12px"},{value:"14",label:"14px"},{value:"16",label:"16px"},{value:"18",label:"18px"},{value:"20",label:"20px"},{value:"24",label:"24px"},{value:"28",label:"28px"},{value:"32",label:"32px"}],P=T.map(function(e){return e.value}),O="16",j="vlp-caption-font-size-px",C="vlp-caption-font-size-style",x=".vjs-font-percent > select",R=function(e){return-1!==P.indexOf(e)?e:O},_=null;D?(_=function(){u(i,D);var e,n,t=(e=i,n=E(),function(){var t,i=d(e);if(n){var o=d(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return s(this,t)});function i(e,n){var o;return l(this,i),(o=t.call(this,e,n)).customUiReady_=!0,o.applyCustomFontSizeUI_(),o}return r(i,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(x);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);T.forEach(function(n){e.appendChild(I.createEl("option",{value:n.value,textContent:n.label}))}),e.value=O}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$(x);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=R(e);if("undefined"!=typeof document){var t=document.getElementById(C);t||((t=document.createElement("style")).id=C,document.head.appendChild(t)),t.textContent=[".vjs-text-track-cue,",".vjs-text-track-cue > div,",".vjs-text-track-display-ttml,",".vjs-text-track-display-ttml span,",".vjs-text-track-display-ttml div","{ font-size: ".concat(n,"px !important; line-height: normal !important; }")].join(" ")}}},{key:"restoreCustomFontSize_",value:function(){var e=null;try{e=window.localStorage.getItem(j)}catch(e){}var n=R(e),t=this.$(x);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=S(i,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(S(i,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$(x);e&&(e.value=O),this.applyFontSize_(O)}}},{key:"saveSettings",value:function(){if(S(i,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$(x);if(e)try{window.localStorage.setItem(j,R(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){S(i,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),i}(),o.registerComponent("TextTrackSettings",_)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var A=function(e){return new Promise(function(n,t){if(L(e))t("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){n()},i.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(i)}})},L=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},U=function(e,n,t){var i=m.getPlayer(e);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var o=parseFloat(n)/100;i.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,"'")})},V=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},N=function(){var e=t(i.mark(function e(n){var t,l,r,a,u;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=m.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,A("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(o),e.finish(13);case 16:(u=o.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.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==l||l.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)}}(),M=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,i,l,r,a,u=this.el(),s=o.dom.getPointerPosition(u,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(l=i.framework)||void 0===l||null===(r=l.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){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 B=function(){var e=t(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),A("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)}}(),q=function(){var n=t(i.mark(function n(){return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),H=function(){var e=t(i.mark(function e(){return i.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){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),F=function(){var e=t(i.mark(function e(){var n;return i.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(o),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)}}(),z=function(){var e=t(i.mark(function e(){return i.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-84cce26a.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)}}(),G=function(){var e=t(i.mark(function e(){return i.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-072614bc.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)}}(),K=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){A("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:B,loadEMELibrary:H,loadMuxPlugin:F,loadDvrSeekbar:z,loadContribDash:G,loadComscorePlugin:q});function W(e){return Y.apply(this,arguments)}function Y(){return(Y=t(i.mark(function e(n){var t;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,B();case 3:t&&"Safari"==g.detectBrowser()&&Promise.resolve().then(function(){return K}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function J(e){return $.apply(this,arguments)}function $(){return($=t(i.mark(function e(n){var t,o,l,r,a,u,s,d,c,v;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=m.getPlayer(n.playerId),e.next=3,q();case 3:v.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(l=n.comscore)||void 0===l?void 0:l.applicationName)||(null===(r=window)||void 0===r?void 0:r.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===(d=n.comscore)||void 0===d?void 0:d.persistentLabels)||{},metadata:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function X(e,n){return Q.apply(this,arguments)}function Q(){return(Q=t(i.mark(function e(n,t){var o,l,r,a,u,s,d,c,v,f,p,m,h,y;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",f=null==t||null===(o=t[v])||void 0===o?void 0:o.drmEnabled,null==t||null===(l=t[v])||void 0===l||null===(r=l.liveDetails)||void 0===r||r.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==t||null===(a=t[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===(d=n.comscore)||void 0===d?void 0:d.enable)||!1,h=!(null==n||null===(c=n.analytics)||void 0===c||!c.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==g.detectBrowser()?H():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?G():H():"Safari"!=g.detectBrowser()&&p?G():null,m?J(n):null,h?F():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 Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ee(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Z(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var ne=new Set,te=null,ie=function(n,t,i,o){var l,r,a,u,s,d,c,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(l=n[f])||void 0===l?void 0:l.id)||"Null",v["c3.cm.contentType"]=de(n),v[null==i||null===(r=i.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==n||!n.linearchannel),v[null==i||null===(a=i.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==i||null===(u=i.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),v["c3.cm.categoryType"]=ae(n),v["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"}}(),v.DRMEnabled=(null===(s=n[f])||void 0===s?void 0:s.drmEnabled)||"None",v.DAIStream=null!==(d=n[f])&&void 0!==d&&null!==(c=d.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",v[i.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=ue(n),v["c3.cm.genreList"]=le(n),v["c3.cm.genre"]=oe(n),v["c3.cm.channel"]=re(n,o);var p=fe(e.getCurrentSeries(),n);return v=ee(ee({},v),p)},oe=function(e){var n,t,i,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===(i=t.primaryCategory)||void 0===i?void 0:i.title)||"Null"},le=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"},re=function(e,n){var t,i,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(i=((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===i?void 0:i.title)||"NULL"},ae=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"},ue=function(e){var n,t,i=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[i])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},se=function(e,n){var t,i,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(i=t.gist)||void 0===i?void 0:i.title)||"Null";return"".concat(r)},de=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ce,ve,fe=function(n,t){var i,o,l,r,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(i=t.video)||void 0===i||null===(o=i.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(l=n[s-1])||void 0===l||null===(r=l.episodes)||void 0===r||null===(a=r[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},pe=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"}},me=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ge=function(){var n=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v,f,p,g,h;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l=(null==o?void 0:o.convivaConfig)||{},r=l.trackConvivaPlayerEvent,a=l.paymentHandler,u=l.tveProvider,s=l.enable,d=l.appName,v=(c=o||{}).token,f=c.epg,s){n.next=4;break}return n.abrupt("return");case 4:if(p=m.getPlayer(t),"function"==typeof(g=r)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,g("getConvivaObject");case 10:if(h=n.sent){n.next=13;break}return n.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 i=pe(t.keySystem);g("contentInfo",{DRMEnabled:i})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),p.on("loadstart",function(){var n,t;te&&te!==p.currentSrc()&&g("playbackEnded"),g("setPlayer",p),ne.clear(),te=p.currentSrc();var i=me(p.currentType()),l=e.getCurrentVideo(),r=ie(l,p,h,f);r[null==h||null===(n=h.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",r[null==h||null===(t=h.Constants)||void 0===t?void 0:t.ASSET_NAME]=se(l,o),r.authToken=v||"NULL",r.streamType=i,r.D2CType=a||"NONE",r.subscriberType=u?"MVPD":"FREE"!==a?"D2C":"FREE",r["c3.cm.affiliate"]=u||"NULL",he.setData(r),g("contentInfo",r)}),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(){ne.has(p.currentSrc())||(ne.add(p.currentSrc()),g("playbackStarted",null))}),p.on("ended",function(){ne.has(p.currentSrc())&&ne.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==ne||ne.clear(),g("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),he=(ce={},{setData:function(e){ce=ee(ee({},ce),e)},getData:function(){return ce}}),ye=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-c46d8f40.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-012a6dac.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-7860187e.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-015c723e.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-908e8c2b.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-a75bf11a.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-c8afd3aa.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-f0ba253b.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&Promise.resolve().then(function(){return require("./skin-966aa1e7.js")}).then(function(t){t.initialiseSkin(e,n)})};function be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function we(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?be(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):be(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var ke=[],Se=0,Ee=null;function De(){ve=null,ke=[],Se=0,Ee=null}function Ie(t,i,o){var l,r,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==i||null===(l=i.watchHistory)||void 0===l||l.apiVersion;var c=null==i||null===(r=i.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==i||null===(a=i.watchHistory)||void 0===a||a.xapiKey;var p=(null==i||null===(u=i.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==i||null===(s=i.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),h=d?100:Math.floor(v/f*100),y={};m?function(t,i,o){var l=i?"watchhistory-data-".concat(i):"watchhistory-data-guest-".concat(o),r=Te(l),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return we(we({},e),{},n({},t,s[t]))},{}),c=r.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ve});c<0?r.push(we(we({content:d},t),{},{addedDate:a,updateDate:a})):r[c]=we(we(we({},r[c]),t),{},{updateDate:a});localStorage.setItem("".concat(l),JSON.stringify(r))}(y={completed:d,watchedTime:g,watchedPercentage:h},c,i.siteOwner):(y=we(we({videoId:ve,watchedTime:g,watchedPercentage:h,doneWatching:d,profileId:c},Ee&&{seriesId:Ee}),p&&{originalObjectId:p}),e.saveWatchHistory(y).then(function(e){}).catch(function(e){})),Se=v+o}function Te(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Pe(e,n,t){var i=Te(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return i&&Array.isArray(i)&&(o=i.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var Oe=!1,je=function(n,t){var i,o,l=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(i=n[l])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!Oe){var r=Ce(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(r,t);return a&&e.loadVideo(t,a),Oe=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function Ce(e,n,t){if(Array.isArray(e))return e.map(function(e){return Ce(e,n,t)});if(null!==e&&"object"===y(e)){var i={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?i[o]=e[t]:o===t&&void 0!==e[n]?i[o]=e[n]:i[o]=Ce(e[o],n,t)}),i}return e}function xe(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 Re(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)?Re(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},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 l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Re(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Ae(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_e(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Le=function(n,t,i,o){var l,r,a,u,s,d=o.res,c=o.sres,f=m.getPlayer(n),p=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(l=d[p])||void 0===l?void 0:l.drmEnabled)||!1,b=!(null==d||null===(r=d[p])||void 0===r||null===(a=r.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===p,w=(null==d||null===(u=d[p])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;e.setCurrentVideo(d),e.videoReplayTracker.set(d),f&&(f.on("loadstart",function(){b?i.resolve({status:!0,msg:"Video Loaded",response:d}):i.resolve(Ae({status:!0,msg:"Player Initialised"},c?{seriesResponse:c,response:d}:{response:d}))}),f.on("loadeddata",function(){var i,o,l,r,a=v.getCaptions(n);if(null==a||a.map(function(e){return v.disableCaptions(n,e.id)}),w&&"Safari"===g.detectBrowser())try{var u;null==f||null===(u=f.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==f||!f.muted())&&U(n,sessionStorage.getItem("volume")||"100");var s=e.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.isExternal){var c=Ae(Ae({},t),d);!function(e,n){var t,i,o;if(null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.cb&&"function"==typeof(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.cb)){var l,r,a,u=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,s=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.completionThreshold)||95,d=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.cb,c=-1;e.on("seeked",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(c=t,t>0){var i=Math.floor(n/e.duration()*100);d({watchedTime:n,watchedPercentage:i,doneWatching:i>=s})}}),e.on("timeupdate",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(n%u===0&&t!==c){c=t;var i=Math.floor(n/e.duration()*100);d({watchedTime:n,watchedPercentage:i,doneWatching:i>=s||!1})}}),e.on("ended",function(){d({watchedTime:Math.floor(e.duration()),watchedPercentage:100,doneWatching:!0})})}}(f,c)}else if(null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.saveOffline)){var p,h,y=Ae(Ae({},t),d);!function(e,n,t){var i,o,l;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(Ee=null==n||null===(o=n.series)||void 0===o?void 0:o.id),ke=[],Se=0,ve=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=m.getPlayer(e);a&&(a.on("dispose",De),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());ke.includes(Se)||(e!=Se||e<r?e>Se&&(Se=e+r):(ke.push(e),Ie(a,n,r)))}}),a.one("ended",function(){Ie(a,n,r,!0)}))}(n,y,null==s||null===(p=s.video)||void 0===p||null===(h=p.gist)||void 0===h?void 0:h.id)}if(null!=t&&null!==(r=t.analytics)&&void 0!==r&&r.muxKey&&null!=f&&f.mux){var b,k,S,E,D,I,T=(null===(b=e.getCurrentVideo())||void 0===b?void 0:b.video)||(null==d?void 0:d.video),P=null==T?void 0:T.gist,O={env_key:null==t||null===(k=t.analytics)||void 0===k?void 0:k.muxKey,player_name:"vl-web-player",player_version:null===(S=window)||void 0===S?void 0:S.vl_player_version,video_id:null==P?void 0:P.id,video_title:null==P?void 0:P.title,video_series:null==T||null===(E=T.series)||void 0===E?void 0:E.title,video_stream_type:null!=T&&null!==(D=T.streamingInfo)&&void 0!==D&&D.isLiveStream?"live":"video",viewer_user_id:null==t||null===(I=t.analytics)||void 0===I?void 0:I.userId};f.mux({debug:!1,data:O})}}),f.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];f.trigger("subtitlechanged",n)}),f.on("subtitlechanged",function(e,n){var t,i,o,l,r,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=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===(r=l.getInstance())||void 0===r?void 0:r.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var m,g=p.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),f.tech_.on("retryplaylist",function(){b&&je(d,n)}),f.on("error",function(){var t,o;(console.log("ERROR",f.error(),f.error().code),4===f.error().code&&b)?je(d,n):(e.handleError(n,(null==f||null===(t=f.error())||void 0===t?void 0:t.message)||"Some error occured"),i.reject({status:!1,msg:(null==f||null===(o=f.error())||void 0===o?void 0:o.message)||"Some error occured",response:d}))}),f.one("play",function(){var n,i,o,l,r;if(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(l=o.adsConfig)||void 0===l||!l.vodAdClientSideTracking){if(null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable){var a,u,s,d=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},p=v.t,m=v.p;p&&m<95&&setTimeout(function(){f.currentTime(p)},0)}else{var g,h,y,b,w,k,S,E=null!==(g=null==t?void 0:t.watchHistoryResumeTime)&&void 0!==g?g:null==t||null===(h=t.watchHistory)||void 0===h?void 0:h.watchedTime,D=null!==(y=null!==(b=null==t?void 0:t.watchedPercentage)&&void 0!==b?b:null==t||null===(w=t.watchHistory)||void 0===w?void 0:w.watchedPercentage)&&void 0!==y?y:0,I=null!==(k=null==t||null===(S=t.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==k?k:95;E&&D<I&&setTimeout(function(){f.currentTime(E)},0)}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(b){f.currentSource();for(var e=f.textTracks(),n=e.length-1;n>=0;n--)f.removeRemoteTextTrack(e[n])}}),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(),i=(n.language||n.label||"").toUpperCase();return t<i?-1:t>i?1:0}),"object"==y(f.dash)){var t,i,o,l=null==f||null===(t=f.dash)||void 0===t||null===(i=t.mediaPlayer)||void 0===i?void 0:i.getTracksFor("audio"),r=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=xe(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(r&&(null==u?void 0:u.id)=="dash-audio-".concat(r.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=xe(n);try{for(d.s();!(s=d.n()).done;){var c,v,p,m=s.value;if(("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(c=navigator)&&void 0!==c&&null!==(v=c.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1"))f.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function Ue(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Ve(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ue(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}function Ne(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 Me(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)?Me(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},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 l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Me(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var Be={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};function qe(n,t,i){e.emitApiErrorEvent(n,{status:i,message:"DRM ".concat(t," request failed")},"Playback Errors",{requestKind:t})}function He(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,i=Object.keys(n);t<i.length;t++){var o=n[i[t]];if("string"==typeof o)return o;if(null!=o&&o.url)return o.url;if(null!=o&&o.licenseUri)return o.licenseUri}var l=null==e?void 0:e.keySystemOptions;if(Array.isArray(l)){var r,a=Ne(l);try{for(a.s();!(r=a.n()).done;){var u,s,d,c=r.value,v=(null==c||null===(u=c.options)||void 0===u?void 0:u.serverURL)||(null==c||null===(s=c.options)||void 0===s?void 0:s.licenseUri)||(null==c||null===(d=c.options)||void 0===d?void 0:d.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function Fe(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return He("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function ze(n,t){t&&!t.__vlDrmDashHooksInstalled&&(t.__vlDrmDashHooksInstalled=!0,"function"==typeof t.addResponseInterceptor&&t.addResponseInterceptor(function(n){try{var t=(null==n?void 0:n.request)||{},i=(null==n?void 0:n.url)||(null==t?void 0:t.url)||"",o=e.classifyRequestKind(i,(null==t?void 0:t.type)||(null==n?void 0:n.type));if(e.isDrmRequestKind(o)){var l=e.extractStatusCode(n,null);e.isHttpOk(l)||qe(i,o,l)}}catch(e){}return Promise.resolve(n)}),"function"==typeof t.registerLicenseRequestFilter&&t.registerLicenseRequestFilter(function(e){try{null!=e&&e.url&&(t.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()}),"function"==typeof t.on&&t.on("public_licenseRequestComplete",function(i){try{var o,l,r,a;if(null==i||!i.error)return;var u=null!==(o=null==i||null===(l=i.error)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.responseCode)&&void 0!==o?o:e.extractStatusCode(null,i.error);qe((null==i||null===(a=i.data)||void 0===a?void 0:a.url)||t.__vlLastLicenseUrl||Fe(n)||"","license",u)}catch(e){}}))}var Ge=!1,Ke=null,We=new Set;function Ye(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,We.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,We.delete(e),function(){if(Ge&&!(We.size>0)){var e=null==o?void 0:o.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof Ke&&e.removeHook("beforeinitialize",Ke),Ge=!1,Ke=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function Je(n){if(n){Ye(n),function(){if(!Ge){var e=null==o?void 0:o.Html5DashJS;e&&"function"==typeof e.hook&&(Ke=function(e,n){null!=e&&e.__vlDrmDashEnabled&&ze(e,n)},Ge=!0,e.hook("beforeinitialize",Ke))}}(),function(n){n&&!n.__vlEmeDrmErrorInstalled&&(n.__vlEmeDrmErrorInstalled=!0,n.on("error",function(){try{var t,i="function"==typeof n.error?n.error():null;if(!i||!e.isDrmError(i))return;if(null!=n&&null!==(t=n.dash)&&void 0!==t&&t.mediaPlayer)return;qe(Fe(n),"license",null)}catch(e){}}))}(n);var t=function(){var t;!function(n){var t,i,o=null==n||null===(t=n.tech_)||void 0===t||null===(i=t.vhs)||void 0===i?void 0:i.xhr;o&&"function"==typeof o.onResponse&&!n.__vlDrmVhsHooksInstalled&&(n.__vlDrmVhsHooksInstalled=!0,o.onResponse(function(n,t,i){try{var o=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(n),l=e.classifyRequestKind(o,null==n?void 0:n.type);if(!e.isDrmRequestKind(l))return;var r=e.extractStatusCode(i,t);e.isHttpOk(r)&&!t||qe(o,l,r)}catch(e){}}))}(n),ze(n,null==n||null===(t=n.dash)||void 0===t?void 0:t.mediaPlayer)};t(),n.on("xhr-hooks-ready",t),n.on("loadstart",function(){setTimeout(t,0)})}}var $e=function(l,r,a,u){var s,d,c,f,p,h,y,b,w,k,S,E,D,I,T,P,O,j,C,x,R,_,A,L,U,V,N,B,q,H,F,z,G,K,W,Y,J,$,Q=r.res,Z=void 0===Q?null:Q,ee=r.sres,ne=void 0===ee?null:ee,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)||""),i=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:i,dashLogLevel:null!=i&&null!=Be[i]?Be[i]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ie=te.playerDebug,oe=te.logLevel,le=te.dashLogLevel;ie&&(console.log("[PLAYER DEBUG] config:",a),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var re=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(s=Z)||void 0===s?void 0:s.contentType)||"video",ue=m.impolicy16x9(null===(d=Z)||void 0===d||null===(c=d[ae])||void 0===c||null===(f=c.gist)||void 0===f?void 0:f.videoImageUrl)||m.impolicy16x9(null===(p=Z)||void 0===p||null===(h=p[ae])||void 0===h||null===(y=h.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),se=(null===(w=Z)||void 0===w||null===(k=w[ae])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,de=!(null===(E=Z)||void 0===E||null===(D=E[ae])||void 0===D||null===(I=D.streamingInfo)||void 0===I||!I.isLiveStream)||"linearchannel"===ae,ce=(null===(T=Z)||void 0===T||null===(P=T.ads)||void 0===P||null===(O=P.preRoll)||void 0===O||null===(j=O.adTags)||void 0===j||null===(C=j.web)||void 0===C?void 0:C.active)&&(null===(x=Z)||void 0===x||null===(R=x.ads)||void 0===R||null===(_=R.preRoll)||void 0===_||null===(A=_.adTags)||void 0===A||null===(L=A.web)||void 0===L?void 0:L.url);Z=Ve(Ve({},Z),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ve=(null==a||null===(U=a.customData)||void 0===U?void 0:U.ads)||{},fe=(null===(V=Z)||void 0===V||null===(N=V[ae])||void 0===N?void 0:N.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,pe=!(null===(B=Z)||void 0===B||null===(q=B[ae])||void 0===q||!q.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),me=(null==a?void 0:a.latency)||6,be=(null==a?void 0:a.skin_settings)||{},we=(J={enableSmoothSeeking:!0,controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==be?void 0:be.pictureInPictureToggle)||!1},playbackRates:null!=be&&be.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==a.skin,liveui:se},n(J,"autoplay",null==a?void 0:a.autoplay),n(J,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!ce),n(J,"loop",(null==a?void 0:a.loop)||!1),n(J,"audioPosterMode",null==a?void 0:a.audioPosterMode),n(J,"html5",Ve(Ve({dash:Ve(Ve({},!o.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Ve(Ve({},((null==a?void 0:a.debugConfig)&&(null==a||null===(H=a.debugConfig)||void 0===H?void 0:H.enable)||ie)&&{debug:{logLevel:le}}),{},{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Ve({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:Ve(Ve(Ve(Ve({},(null==a?void 0:a.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==a?void 0:a.initialBandwidth)/1e3}}),(null==a?void 0:a.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==a?void 0:a.maxBitrate)/1e3}}),(null==a?void 0:a.minBitrate)&&{minBitrate:{audio:-1,video:(null==a?void 0:a.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:Ve(Ve(Ve({},(null==a?void 0:a.initialBandwidth)&&{bandwidth:a.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==a||!a.initialBandwidth},(null==a||null===(F=a.customData)||void 0===F?void 0:F.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(z=null==a?void 0:a.enableLowInitialPlaylist)&&void 0!==z&&z},((null==a?void 0:a.debugConfig)&&(null==a||null===(G=a.debugConfig)||void 0===G?void 0:G.enable)||ie)&&{debug:!0}),debug:(null==a?void 0:a.debugConfig)&&(null==a||null===(K=a.debugConfig)||void 0===K?void 0:K.enable)||ie||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(Y=a.customData)||void 0===Y?void 0:Y.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(J,"poster",ue),n(J,"techOrder",re),n(J,"chromecast",{requestCustomDataFn:function(n){var t,i,o=m.getPlayer(l),r=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),u=function(e,n,t){var i,o,l,r,a,u,s,d,c,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,y,b,w,k,S;p.isDrmEnabled=!0;var E=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,D=(null==E?void 0:E.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=D;var I=(null==E?void 0:E.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=I}var T=(null==e||null===(i=e[f])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=T;var P=null==e||null===(l=e[f])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;p.duration=P;var O=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=O;var j=null==e||null===(s=e[f])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=j,p.subTitles=t,p.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,n,r);return Ve(Ve({},u),{},{transmitTrackingUrl:e.trackingUrlManager.get()||null,convivaMetaData:Ve({customerKey:(null==a||null===(t=a.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==a||null===(i=a.convivaConfig)||void 0===i?void 0:i.debug)||!1},he.getData())})},modifyLoadRequestFn:function(e){var n,t,i,o,r,a=m.getPlayer(l),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Z)||void 0===n||null===(t=n[ae])||void 0===t||null===(i=t.streamingInfo)||void 0===i||null===(o=i.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(r=u.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),J);if(!o.getPlayers()[l]){(null!=a&&a.debugConfig&&null!=a&&null!==($=a.debugConfig)&&void 0!==$&&$.enable||ie)&&o.log.level(oe||"debug");var ke=o(l,we,function(){var n=t(i.mark(function n(){var t,r,s,d,c,f,p,m,g,h,y,b,w,k,S,E,D,I,T,P,O,j;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return Je(ke),console.log(ke),console.log(o.VERSION),console.log(o.getPlugins()),n.next=6,X(a,Z);case 6:if(null!=a&&a.debugConfig&&null!=a&&null!==(t=a.debugConfig)&&void 0!==t&&t.enable||ie){try{o.log.level(oe||"debug")}catch(e){}(w=function(){try{var e,n,t;null==ke||null===(e=ke.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:le}})}catch(e){}})(),ke.one("loadedmetadata",w)}if(k=null===(r=Z)||void 0===r||null===(s=r[ae])||void 0===s||null===(d=s.liveDetails)||void 0===d?void 0:d.startOverTime,de&&u.resolve(Ve({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),e.inititateBeacon(l,{analyticsCb:null==a?void 0:a.analyticsCb,analyticsEventParams:null==a?void 0:a.analyticsEventParams,userId:null==a?void 0:a.userId}),ge(l,a),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),se&&M(l,k),!ce||null!=a&&null!==(c=a.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(l,ce,Z),S=e.getSource(Z,l),console.log(S),ie&&(console.log("[PLAYER DEBUG] source:",S),console.log("[PLAYER DEBUG] videojs options:",we)),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),!fe){n.next=24;break}return n.next=21,e.getSGAIEnabledSource(l,Z);case 21:S=n.sent,n.next=28;break;case 24:if(!pe){n.next=28;break}return n.next=27,e.getTransmitEnabledSource(S,Z,l);case 27:S=n.sent;case 28:ke&&(ke.__vlDrmLicenseUrl=He(S)),S?e.loadVideo(l,S):(u.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),e.handleError(l,"Incompatible / Missing Source")),((null===(f=Z)||void 0===f||null===(p=f[ae])||void 0===p||null===(m=p.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=Z)||void 0===h||null===(y=h[ae])||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0)&&(j=(null===(D=Z)||void 0===D||null===(I=D[ae])||void 0===I||null===(T=I.contentDetails)||void 0===T?void 0:T.closedCaptions)||(null===(P=Z)||void 0===P||null===(O=P[ae])||void 0===O?void 0:O.closedCaptions),E=j.filter(function(e){return"VTT"===e.format}),v.addCaptions(l,E)),null!=a&&a.disableControls?e.disableControls(l):ye(l,Ve(Ve(Ve({},a),we),{},{liveVideo:de,isDvrEnabled:se,res:Z,sres:ne})),Le(l,Ve(Ve(Ve({},a),we),{},{liveVideo:de}),u,{res:Z,sres:ne});case 33:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function Xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Qe(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Xe(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var Ze=function(e,n){var t=n.resolve,i=n.reject,o=null==e?void 0:e.playerId,l=en(e);$e(o,{res:l},e,{resolve:t,reject:i})},en=function(n){var t,i,o,l,r,a,u,s,d,c,v,f,p,m=null==n?void 0:n.streamingInfo,g=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,h=(null==n||null===(i=n.streamingInfo)||void 0===i?void 0:i.isDrmEnabled)||null,y=(null==n||null===(o=n.streamingInfo)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.url)||null,w=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.posterUrl)||null,k=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],S=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,E=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],D=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,I=null==n?void 0:n.token,T=e.getDecodedToken(I);null==T||T.site;var P=null==T?void 0:T.siteId,O=(null==n||null===(f=n.customData)||void 0===f||null===(p=f.comscore)||void 0===p?void 0:p.video)||null,j=Qe(Qe({id:"".concat(P,"_external")},!h&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:Qe(Qe(Qe(Qe(Qe({drmEnabled:h,streamingInfo:Qe(Qe({videoAssets:Qe(Qe({},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==m?void 0:m.isDvrEnabled)&&{isLiveStream:!0}),(null==O?void 0:O.isLiveStream)&&{isLiveStream:null==O?void 0:O.isLiveStream})},D&&{isSSAIEnabled:D}),{},{metadata:E,liveDetails:{isDvrEnabled:null==m?void 0:m.isDvrEnabled},gist:Qe(Qe(Qe({},w&&{videoImageUrl:w}),(null==O?void 0:O.videoId)&&{id:null==O?void 0:O.videoId}),(null==O?void 0:O.videoTitle)&&{title:null==O?void 0:O.videoTitle}),contentDetails:Qe({},(null==k?void 0:k.length)>0&&{closedCaptions:b(k)})},(null==O?void 0:O.runtime)&&{runtime:null==O?void 0:O.runtime}),(null==O?void 0:O.publishDate)&&{publishDate:null==O?void 0:O.publishDate}),(null==O?void 0:O.platform)&&{platform:null==O?void 0:O.platform}),(null==O?void 0:O.series)&&{series:null==O?void 0:O.series}),ads:{preRoll:{adTags:{web:Qe(Qe({},y&&{active:!0}),y&&{url:y})}}}});return O&&(null!=O&&O.isDvrEnabled&&(j.video.liveDetails=Qe(Qe({},j.video.liveDetails),{},{isDvrEnabled:null==O?void 0:O.isDvrEnabled})),null!=O&&O.metadata&&(j.video.metadata=[].concat(b(j.video.metadata),b(null==O?void 0:O.metadata)))),j};function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=t(i.mark(function n(t,o){var l,r,a,u,s,d,v,f,p;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.resolve,u=o.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,v=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:f=n.sent,p=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getVideoDetails(s,f,p).then(function(n){var i,o,l,r,p,m,g,h,y,b,w;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(o=i.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(null==n?void 0:n.data);var k=null==n||null===(r=n.data)||void 0===r||null===(p=r.video)||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.scheduleEndDate,S=null==n||null===(g=n.data)||void 0===g||null===(h=g.video)||void 0===h||null===(y=h.gist)||void 0===y?void 0:y.scheduleStartDate;c.handlePlayerMessage(d,{scheduleEndDate:k,scheduleStartDate:S});var E=null==n?void 0:n.data;if(null!=t&&null!==(b=t.watchHistory)&&void 0!==b&&b.isExternal)E.contentType="video",$e(d,{res:E},t,{resolve:a,reject:u});else if(null!=t&&t.watchHistory&&null!=t&&null!==(w=t.watchHistory)&&void 0!==w&&w.enable&&!v){var D;if((null===(D=t.watchHistory)||void 0===D?void 0:D.saveOffline)||!1){var I,T,P,O=Pe((null===(I=t.watchHistory)||void 0===I?void 0:I.profileId)||"",s,null==t?void 0:t.siteOwner);if(O&&O.length)t.watchHistoryResumeTime=(null===(T=O[0])||void 0===T?void 0:T.watchedTime)||null,t.watchedPercentage=(null===(P=O[0])||void 0===P?void 0:P.watchedPercentage)||null;E.contentType="video",$e(d,{res:E},t,{resolve:a,reject:u})}else e.getVideoInfo(s,f).then(function(e){var n,i,o,l,r,a;null!==(n=window)&&void 0!==n&&null!==(i=n.watchHistory)&&void 0!==i&&i.cb&&(null===(o=window)||void 0===o||null===(l=o.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,E.contentType="video"}).catch(function(){}).finally(function(){$e(d,{res:E},t,{resolve:a,reject:u})})}else $e(d,{res:E},t,{resolve:a,reject:u})}).catch(function(n){var i,o,l=(null==t||null===(i=t.event)||void 0===i?void 0:i.showScheduleTimer)||!1,r=(null==t||null===(o=t.event)||void 0===o?void 0:o.onCountdownComplete)||null;l&&c.handleCountdownTimer(d,n,r),e.initiateErrorHandling(n,d,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function on(e,n){return ln.apply(this,arguments)}function ln(){return(ln=t(i.mark(function n(t,o){var l,r,a,u,s,d,c,v;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.resolve,u=o.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(l=t.customData)||void 0===l||null===(r=l.ads)||void 0===r?void 0:r.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,$e(d,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,d,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function rn(e,n){return an.apply(this,arguments)}function an(){return(an=t(i.mark(function n(t,o){var l,r,a,u,s,d,c;return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(l=t.series)||void 0===l?void 0:l.id,e.getSeriesDetails(c,u).then(function(n){var i,o,l,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(i=v[0])||void 0===i||null===(o=i.episodes)||void 0===o||null===(l=o[0])||void 0===l?void 0:l.id);e.createSeriesWatchMap(c,u),e.getVideoDetails(f,u).then(function(n){var i,o,l;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(o=i.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(n.data),$e(s,{res:null==n?void 0:n.data,sres:d},t,{resolve:r,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}var un,sn=function(n){var t=n.site,i=n.sseBaseUrl,o=n.sseEndpoint,l=n.debug,r=void 0!==l&&l;return w.createSSETransport({site:t,sseBaseUrl:i,getToken:e.getToken,sseEndpoint:o,onOpen:function(e){var n=e.userId,t=e.endpoint;r&&console.log("SSE Connected:",n,t)},onMessage:function(n){var t,i,o,l,a,u,s,d,v,f;if(r&&console.log("SSE Message:",n),(null===(t=e.getCurrentVideo())||void 0===t||null===(i=t.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id)===(null==n||null===(l=n.payload)||void 0===l?void 0:l.id)&&"GAME_STATE_CHANGE"===(null==n?void 0:n.notificationType)){var p=1e3*(null==n||null===(a=n.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.live)||void 0===s?void 0:s.startDateTime),m=1e3*(null==n||null===(d=n.payload)||void 0===d||null===(v=d.states)||void 0===v||null===(f=v.end)||void 0===f?void 0:f.endDateTime);p&&m&&(console.log("Setting schedule timer",p,m),c.scheduleTimerInstanceManager.set({startDateTime:p,endDateTime:m}))}},onReconnectAttempt:function(e){r&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;r&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){r&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){r&&console.error("SSE Error:",e,n)},onClose:function(){r&&console.log("SSE Closed")}})},dn=function(e){var n=e.enable,t=e.site,i=e.sseBaseUrl,o=e.sseEndpoint,l=e.debug;if(n){var r=sn({site:t,sseBaseUrl:i,sseEndpoint:o,debug:void 0!==l&&l});return r._sseBaseUrl=i,r._site=t,r._sseEndpoint=o,r}};function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function vn(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):cn(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:c.onTimeUpdate,getVideoDuration:c.getVideoDuration,onVideoEnded:c.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(i.mark(function t(o,l){var r,a,u,s,d,c,v,f,p,g,y,b,w,S,E,D,I,T,P,O,j,C,x,R,_,L,U,V,N,M,B,q;return i.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=3;break}return o({status:!0,msg:"Player already initialised",skipped:!0}),t.abrupt("return");case 3:if(P=(null==n?void 0:n.videoSourceUrl)||!1,O=null==n?void 0:n.asat,j=(null==n||null===(r=n.epg)||void 0===r?void 0:r.enable)||!1,C=null==n?void 0:n.videoId,x=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,R=(null==n?void 0:n.streamingInfo)||!1,window.videoId=C,_=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=18;break}if(sessionStorage.setItem("vlp_token",_),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),_&&!e.isTokenExpired(_)){t.next=17;break}return l({status:!1,msg:"".concat(_?"Token is expired !":"Missing Authorization Token"),response:{token:_}}),t.abrupt("return");case 17:un=JSON.parse(atob(_.split(".")[1]));case 18:return window.siteName=null===(u=un)||void 0===u?void 0:u.site,window.siteId=null===(s=un)||void 0===s?void 0:s.siteId,n.isAnonymousUser=!(null===(d=un)||void 0===d||!d.anonymousId),n.siteOwner=(null===(c=un)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=un)||void 0===v?void 0:v.userId)||null,e.setUserId((null===(f=un)||void 0===f?void 0:f.userId)||(null===(p=un)||void 0===p?void 0:p.anonymousId)||null),window.watchHistory=n.watchHistory||null,L=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,U=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(V=null==n?void 0:n.errors)&&(window.customErrors=V),window.customData=null==n?void 0:n.customData,h.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!m.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),e.playerConfigManager.setConfig(n),k.relatedVideosManager.reset(),k.relatedVideosManager.set(null==n?void 0:n.relatedVideos),t.next=39,W(n);case 39:U&&A("https://www.googletagmanager.com/gtag/js?id=".concat(U)).then(function(){return e.runGtag(U)}).catch(function(e){}),(N=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(L)))&&N.addEventListener("contextmenu",function(e){return e.preventDefault()}),(M=dn({enable:null==n||null===(S=n.sse)||void 0===S?void 0:S.enable,site:null==n||null===(E=n.sse)||void 0===E?void 0:E.siteName,sseBaseUrl:null==n||null===(D=n.sse)||void 0===D?void 0:D.sseBaseUrl,sseEndpoint:null==n||null===(I=n.sse)||void 0===I?void 0:I.sseEndpoint,debug:null==n||null===(T=n.sse)||void 0===T?void 0:T.debug}))&&!M.isConnectionActive()&&M.connect(),P?(q={directPlaybackUrl:P,id:B="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},O?e.getVideoDetails(B,_).then(function(e){var t=(null==e?void 0:e.data)||{};$e(L,{res:vn(vn({},t),q)},n,{resolve:o,reject:l})}).catch(function(n){e.initiateErrorHandling(n,L,l,B)}):$e(L,{res:q},n,{resolve:o,reject:l})):R?Ze(n,{resolve:o,reject:l}):x?rn(n,{resolve:o,reject:l}):j?on(n,{resolve:o,reject:l}):nn(n,{resolve:o,reject:l});case 45:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:f.getRenditions,skip:e.skip,getPlayer:m.getPlayer,play:e.play,pause:e.pause,detectBrowser:g.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:c.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:v.enableCaptions,disableCaptions:v.disableCaptions,getCaptions:v.getCaptions,playSelectedResolution:p.playSelectedResolution,getSource:e.getSource,setVolume:U,getVolume:V,disableControls:e.disableControls,setPlaybackSpeed:c.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:e.getSsaiEvents,playerEvents:c.playerEvents,onReplay:c.onReplay,relatedVideosManager:k.relatedVideosManager}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-eb807ef0.js"),o=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-eb807ef0.js"),o=require("./generic-b2ccfd5e.js"),l=require("./skin-16ae23af.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-5f9611f1.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var d=s.getComponent("Component"),u=function(){r(h,d);var u,m,p=(u=h,m=c(),function(){var e,t=a(u);if(m){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return n(this,e)});function h(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=p.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(h,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(i.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-7a86b517.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(l.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var n=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i.SelectedStream())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",o.load(t.playerId,t.streams[e].id).then(function(e){o.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",n.append(a),s.dom.appendContent(u,n),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(n,a),s.dom.appendContent(n,c),s.dom.appendContent(e,n),s.dom.appendContent(e,d),l.getPlayer(this.playerId).on("fullscreenchange",function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")})}}]),h}();exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-eb807ef0.js"),o=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-eb807ef0.js"),o=require("./generic-b2ccfd5e.js"),l=require("./skin-16ae23af.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-5f9611f1.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var d=s.getComponent("Component"),u=function(){r(v,d);var u,m,p=(u=v,m=c(),function(){var e,t=n(u);if(m){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(r=p.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(v,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(i.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-1efdbdb9.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=r.classList)&&void 0!==a&&a.contains("hidden")?(l.closeOpenDrawers(),r.classList.remove("hidden"),t.classList.add("open"),l.setUpdatedElHeight(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var a=document.getElementById(this.playerId);if(a){var n=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(n,"px"),a.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=s.dom.createEl("div",{className:"stream-selector-head"}),n=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,a,n,l=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i.SelectedStream())});0==e&&(l.classList.add("selected"),l.style.border="2px solid #D2393B"),l.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");l.classList.add("selected"),l.style.border="2px solid #D2393B",o.load(t.playerId,t.streams[e].id).then(function(e){o.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},l.style.backgroundImage="url(".concat(t.streams[e].img,")");var c=document.createElement("img");c.className="stream-thumbnail-image",c.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(a=window)||void 0===a||null===(n=a.customData)||void 0===n?void 0:n.fallbackImage)),l.append(c),s.dom.appendContent(u,l),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(a,n),s.dom.appendContent(a,c),s.dom.appendContent(e,a),s.dom.appendContent(e,d),l.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-eb807ef0.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-eb807ef0.js"),s=require("./generic-b2ccfd5e.js"),a=require("./skin-16ae23af.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-5f9611f1.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var u=o.getComponent("Component"),c=function(){t(p,u);var s,a,c=(s=p,a=d(),function(){var e,n=i(s);if(a){var t=i(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return r(this,e)});function p(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(t=c.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(p,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./nextEpisodeButton-b6e6586f.js")}).then(function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)})}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,l),o.dom.appendContent(n,t),o.dom.appendContent(n,r),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),n.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")}),n.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")})}}]),p}(),p=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach(function(e,r){e.gist.id===n&&(t=r)}),t):null},h=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then(function(e){s.setCurrentVideo(e.response)})};var r=o.dom.$(".next-eps-image"),i=a.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==r||r.append(l);for(var d=o.dom.$(".next-eps-description"),u=a.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=u&&u.firstChild;)null==d||d.appendChild(u.firstChild)};exports.default=c,exports.initaliseFunctionality=function(e,n){var t=p(e,n.video.gist.id),r=m(e[t],n.video.gist.id),i=v(e[t],r);h(i.nextEp)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),r=require("./icons-eb807ef0.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),r=require("./icons-eb807ef0.js"),s=require("./generic-b2ccfd5e.js"),c=require("./autoNextVideo-4e5aceb8.js"),d=require("./skin-16ae23af.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-5f9611f1.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./index-04ba3869.js"),require("./localisation-56e0a999.js");var p=o.getComponent("Component"),m=function(){l(h,p);var m,v,y=(m=h,v=u(),function(){var e,t=a(m);if(v){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function h(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(a=y.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&c.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(r.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./playlist-df87ca90.js")}).then(function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),u=o.dom.createEl("div",{className:"playlist-selector-content"}),p=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),r=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),d=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(r,c),o.dom.appendContent(r,d),o.dom.appendContent(a,r),o.dom.appendContent(u,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=o.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,v),o.dom.appendContent(p,m),o.dom.appendContent(a,p),o.dom.appendContent(u,a),p.onclick=function(e){e.stopPropagation(),s.setVideoIdx(t+1),s.load(n.playerId,n.videos[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})},r.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==r||null===(l=r.classList)||void 0===l||l.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},m=0;m<this.videos.length;m++)p(m);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,u),d.getPlayer(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}})}}]),h}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-b2ccfd5e.js"),u=require("./icons-eb807ef0.js"),p=require("./skin-16ae23af.js");require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-5f9611f1.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var v=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var m,f=c.getComponent("Component"),g=function(){n(d,f);var e,l,c=(e=d,l=h(),function(){var i,t=a(e);if(l){var s=a(this).constructor;i=Reflect.construct(t,arguments,s)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,n),o(s(t),"seriesData",[]),t.seriesData=n.seriesData,m=n.playerId,y(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-9c237975.js")}).then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}]),d}();function b(){return(b=e(l.mark(function e(i,t,s,n){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(m),v(m),d.load(m,t).then(function(e){d.setCurrentVideo(e.response),d.play(m)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function y(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var s=p.parseHtmlString(t);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}exports.customSeasonList=y,exports.handleSeasonChange=function(e,i,t,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map(function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")}).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=p.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),h=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;h.addEventListener("click",function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(n,r)});for(var g=function(i){c[i].addEventListener("click",function(){return function(e,i,t){var s=i.querySelector(".meta-details");i.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),t.forEach(function(i,s){s!==e&&(t[s].classList.remove("episode-active"),t[s].querySelector(".meta-details").classList.remove("metadetails-active"))})}(i,u[i],u)}),v[i].addEventListener("click",function(){return function(e,i,t,s){return b.apply(this,arguments)}(i,f[i].id,t,u)}),e.episodes[i].id==m&&u[i].classList.add("highlight-active-eps")},y=0;y<c.length;y++)g(y)},exports.seriesModule=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-eb807ef0.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-eb807ef0.js"),d=require("./generic-b2ccfd5e.js"),c=require("./skin-16ae23af.js"),u=require("./autoNextVideo-4e5aceb8.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-5f9611f1.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./index-04ba3869.js"),require("./localisation-56e0a999.js");var p=l.getComponent("Component"),m=function(){i(f,p);var m,h,g=(m=f,h=v(),function(){var e,t=r(m);if(h){var n=r(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function f(n){var i,o,r,l,a,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,f),(c=g.call(this,n,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(i=v.sres)||void 0===i?void 0:i.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(o=v.series)||void 0===o?void 0:o.cb,c.autoPlayNext=(null==v||null===(r=v.series)||void 0===r?void 0:r.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=d.getSeriesWatchMap(),null!==(l=s(c))&&void 0!==l&&l.autoPlayNext&&null!=v&&null!==(a=v.series)&&void 0!==a&&a.enable){var p,m,h,C,y=null==v||null===(p=v.sres)||void 0===p?void 0:p.seasons,b=[];y.map(function(t){b.push.apply(b,e(t.episodes))}),d.createIdxMapping(b),d.setVideoIdxById(null===(m=c.options_)||void 0===m||null===(h=m.res)||void 0===h||null===(C=h.video)||void 0===C?void 0:C.id),u.autoPlayNext({playerId:c.playerId,content:b,cb:c.cb,series:null==v?void 0:v.sres})}return c}return n(f,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-e037e14e.js")}).then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=document.getElementById(this.playerId);if(s){var i=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(i,"px"),l.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(s,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=c.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),d=this.createSeasonLister();l.dom.appendContent(r,d),l.dom.appendContent(s,i),l.dom.appendContent(s,o),l.dom.appendContent(e,s),l.dom.appendContent(e,r),c.getPlayer(this.playerId).on("fullscreenchange",function(){var n=document.getElementById(t.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}})}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),n=l.dom.createEl("div",{className:"season-container"}),s=function(s){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(s));var r=document.createElement("div");r.className="season - ".concat(s),r.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){d.seasonIdxManager.set(s),e.showSeasonDetails(s)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(n,o)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map(function(e){var t,n,i,o,r;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(n=e.gist)||void 0===n||null===(i=n.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==s||null===(o=s.watchMap)||void 0===o||null===(r=o.get(null==e?void 0:e.id))||void 0===r?void 0:r.p)||0}});for(var i=function(i){var o,r,a,c,u,v,p,m=l.dom.createEl("div",{className:"series-container"}),h=l.dom.createEl("div",{className:"series-section",index:i}),g=l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),f=l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});l.dom.appendContent(h,g),l.dom.appendContent(h,f),l.dom.appendContent(m,h),l.dom.appendContent(n,m);var C=l.dom.createEl("div",{className:"series-section-expanded hidden"}),y=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(a=y)||void 0===a?void 0:a.length)>170&&(y=y.substr(0,170)+"...");var b=l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(y||"")}),S=l.dom.createEl("img",{className:"series-image"});S.src="".concat((null===(c=t[i])||void 0===c?void 0:c.img)||(null===(u=window)||void 0===u||null===(v=u.customData)||void 0===v?void 0:v.fallbackImage)),S.alt="".concat(null===(p=t[i])||void 0===p?void 0:p.title),l.dom.appendContent(C,S),l.dom.appendContent(C,b),l.dom.appendContent(m,C),l.dom.appendContent(n,m),C.onclick=function(e){var n;e.stopPropagation(),d.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),d.load(s.playerId,t[i].id).then(function(e){null!=s&&s.cb&&s.cb(e)}).catch(function(e){null!=s&&s.cb&&s.cb(e)})},h.onclick=function(t){var n,s,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(m.style.backgroundColor="#0000007d",null==r||null===(s=r.classList)||void 0===s||s.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),m.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=l.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=c.parseSvgString(a.BackIcon());s.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),f}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),o=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-eb807ef0.js"),d=require("./generic-690f32fe.js"),c=require("./skin-16ae23af.js"),u=require("./autoNextVideo-d783039e.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-5f9611f1.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./index-ba862bae.js"),require("./localisation-56e0a999.js");var m=r.getComponent("Component"),p=function(){o(b,m);var p,h,y=(p=b,h=v(),function(){var e,t=l(p);if(h){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function b(s){var o,i,l,r,a,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,b),(c=y.call(this,s,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(o=v.sres)||void 0===o?void 0:o.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(i=v.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==v||null===(l=v.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=d.getSeriesWatchMap(),null!==(r=n(c))&&void 0!==r&&r.autoPlayNext&&null!=v&&null!==(a=v.series)&&void 0!==a&&a.enable){var m,p,h,g,f=null==v||null===(m=v.sres)||void 0===m?void 0:m.seasons,C=[];f.map(function(t){C.push.apply(C,e(t.episodes))}),d.createIdxMapping(C),d.setVideoIdxById(null===(p=c.options_)||void 0===p||null===(h=p.res)||void 0===h||null===(g=h.video)||void 0===g?void 0:g.id),u.autoPlayNext({playerId:c.playerId,content:C,cb:c.cb,series:null==v?void 0:v.sres})}return c}return s(b,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(a.PlaylistIcon())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-2105fd89.js")}).then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),e.classList.remove("hidden"),s.classList.add("open"),c.setUpdatedElHeight(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout(function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()},100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=r.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),r.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),r.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var n=r.dom.$(".series-selector-content",this.el());for(r.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=this.createSeasonLister();for(r.dom.appendContent(n,o),r.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=c.parseSvgString(a.crossIconSvg());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=r.dom.createEl("div",{className:"series-selector-head"}),o=r.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(a.crossIconSvg()),tabIndex:-1});o.onclick=function(){t.handleSeriesCloseIcon(o,e,s)},o.onkeydown=function(n){"Enter"===n.key&&t.handleSeriesCloseIcon(o,e,s)};var i=r.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=r.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),d=r.dom.createEl("div",{className:"series-selector-content"}),u=this.createSeasonLister();r.dom.appendContent(n,l),r.dom.appendContent(d,u),r.dom.appendContent(n,o),r.dom.appendContent(n,i),r.dom.appendContent(e,n),r.dom.appendContent(e,d),c.handleDrawerResizing(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),s=r.dom.createEl("div",{className:"season-container"}),n=function(n){var o,i,l,a,c=document.createElement("label");c.className="season-holder",c.ariaLabel=null===(o=t[n])||void 0===o?void 0:o.title,c.role="button",c.type="button",c.setAttribute("aria-LabelledBy",null===(i=t[n])||void 0===i?void 0:i.title),c.setAttribute("for","season-".concat(n));var u=document.createElement("div");u.className="season - ".concat(n),u.textContent=null===(l=t[n])||void 0===l?void 0:l.title,u.id=null===(a=t[n])||void 0===a?void 0:a.title;var v=r.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});v.setAttribute("type","radio"),e.selectedSeason==n&&(v.checked=!0),v.onclick=function(t){d.seasonIdxManager.set(n),e.showSeasonDetails(n)},c.onkeydown=function(t){"Enter"===t.key&&(d.seasonIdxManager.set(n),e.showSeasonDetails(n))},r.dom.appendContent(c,v),r.dom.appendContent(c,u),r.dom.appendContent(s,c)},o=0;o<t.length;o++)n(o);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,n=this;d.setVideoIdxById(null===(s=e[t])||void 0===s?void 0:s.id),d.load(this.playerId,e[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map(function(e){var t,s,o,i,l,r,a,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(o=s.imageGist)||void 0===o?void 0:o.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(r=l.appcmsMain)||void 0===r||null===(a=r.images)||void 0===a?void 0:a.placeholderCover),watchedPercentage:(null==n||null===(d=n.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var o=function(o){var i,l,a,d,u,v=r.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=r.dom.createEl("div",{className:"series-section-data",index:o,innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")});r.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[o])||void 0===l?void 0:l.title)||"")}),r.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var p=r.dom.createEl("div",{className:"series-section-image"}),h=(null===(a=t[o])||void 0===a?void 0:a.description)||"";(null===(d=h)||void 0===d?void 0:d.length)>170&&(h=h.substr(0,170)+"..."),r.dom.createEl("div",{className:"series-description",innerHTML:"".concat(h||"")});var y=r.dom.createEl("img",{className:"series-image"});y.src="".concat(c.impolicy16x9(null===(u=t[o])||void 0===u?void 0:u.img)),y.alt="Episode ".concat(o+1),r.dom.appendContent(p,y),r.dom.appendContent(v,p),r.dom.appendContent(v,m),r.dom.appendContent(s,v),v.onclick=function(e){e.stopPropagation(),n.loadSeriesAssetById(t,o)},v.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),n.loadSeriesAssetById(t,o))},m.onclick=function(t){var s,n,o,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=r.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=r.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=c.parseSvgString(a.BackIcon());n.appendChild(o),r.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),b}();exports.default=p;
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),o=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-eb807ef0.js"),d=require("./generic-b2ccfd5e.js"),c=require("./skin-16ae23af.js"),u=require("./autoNextVideo-4e5aceb8.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-5f9611f1.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./index-04ba3869.js"),require("./localisation-56e0a999.js");var m=r.getComponent("Component"),p=function(){o(b,m);var p,h,y=(p=b,h=v(),function(){var e,t=l(p);if(h){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function b(s){var o,i,l,r,a,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,b),(c=y.call(this,s,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(o=v.sres)||void 0===o?void 0:o.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(i=v.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==v||null===(l=v.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=d.getSeriesWatchMap(),null!==(r=n(c))&&void 0!==r&&r.autoPlayNext&&null!=v&&null!==(a=v.series)&&void 0!==a&&a.enable){var m,p,h,g,f=null==v||null===(m=v.sres)||void 0===m?void 0:m.seasons,C=[];f.map(function(t){C.push.apply(C,e(t.episodes))}),d.createIdxMapping(C),d.setVideoIdxById(null===(p=c.options_)||void 0===p||null===(h=p.res)||void 0===h||null===(g=h.video)||void 0===g?void 0:g.id),u.autoPlayNext({playerId:c.playerId,content:C,cb:c.cb,series:null==v?void 0:v.sres})}return c}return s(b,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(a.PlaylistIcon())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-2105fd89.js")}).then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),e.classList.remove("hidden"),s.classList.add("open"),c.setUpdatedElHeight(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout(function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()},100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=r.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),r.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),r.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var n=r.dom.$(".series-selector-content",this.el());for(r.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=this.createSeasonLister();for(r.dom.appendContent(n,o),r.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=c.parseSvgString(a.crossIconSvg());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=r.dom.createEl("div",{className:"series-selector-head"}),o=r.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(a.crossIconSvg()),tabIndex:-1});o.onclick=function(){t.handleSeriesCloseIcon(o,e,s)},o.onkeydown=function(n){"Enter"===n.key&&t.handleSeriesCloseIcon(o,e,s)};var i=r.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=r.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),d=r.dom.createEl("div",{className:"series-selector-content"}),u=this.createSeasonLister();r.dom.appendContent(n,l),r.dom.appendContent(d,u),r.dom.appendContent(n,o),r.dom.appendContent(n,i),r.dom.appendContent(e,n),r.dom.appendContent(e,d),c.handleDrawerResizing(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),s=r.dom.createEl("div",{className:"season-container"}),n=function(n){var o,i,l,a,c=document.createElement("label");c.className="season-holder",c.ariaLabel=null===(o=t[n])||void 0===o?void 0:o.title,c.role="button",c.type="button",c.setAttribute("aria-LabelledBy",null===(i=t[n])||void 0===i?void 0:i.title),c.setAttribute("for","season-".concat(n));var u=document.createElement("div");u.className="season - ".concat(n),u.textContent=null===(l=t[n])||void 0===l?void 0:l.title,u.id=null===(a=t[n])||void 0===a?void 0:a.title;var v=r.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});v.setAttribute("type","radio"),e.selectedSeason==n&&(v.checked=!0),v.onclick=function(t){d.seasonIdxManager.set(n),e.showSeasonDetails(n)},c.onkeydown=function(t){"Enter"===t.key&&(d.seasonIdxManager.set(n),e.showSeasonDetails(n))},r.dom.appendContent(c,v),r.dom.appendContent(c,u),r.dom.appendContent(s,c)},o=0;o<t.length;o++)n(o);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,n=this;d.setVideoIdxById(null===(s=e[t])||void 0===s?void 0:s.id),d.load(this.playerId,e[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map(function(e){var t,s,o,i,l,r,a,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(o=s.imageGist)||void 0===o?void 0:o.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(r=l.appcmsMain)||void 0===r||null===(a=r.images)||void 0===a?void 0:a.placeholderCover),watchedPercentage:(null==n||null===(d=n.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var o=function(o){var i,l,a,d,u,v=r.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=r.dom.createEl("div",{className:"series-section-data",index:o,innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")});r.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[o])||void 0===l?void 0:l.title)||"")}),r.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var p=r.dom.createEl("div",{className:"series-section-image"}),h=(null===(a=t[o])||void 0===a?void 0:a.description)||"";(null===(d=h)||void 0===d?void 0:d.length)>170&&(h=h.substr(0,170)+"..."),r.dom.createEl("div",{className:"series-description",innerHTML:"".concat(h||"")});var y=r.dom.createEl("img",{className:"series-image"});y.src="".concat(c.impolicy16x9(null===(u=t[o])||void 0===u?void 0:u.img)),y.alt="Episode ".concat(o+1),r.dom.appendContent(p,y),r.dom.appendContent(v,p),r.dom.appendContent(v,m),r.dom.appendContent(s,v),v.onclick=function(e){e.stopPropagation(),n.loadSeriesAssetById(t,o)},v.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),n.loadSeriesAssetById(t,o))},m.onclick=function(t){var s,n,o,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=r.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=r.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=c.parseSvgString(a.BackIcon());n.appendChild(o),r.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),b}();exports.default=p;
|