@viewlift/player-backup 2.0.113-backup → 2.0.114-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/bundle.css +71 -35
- package/cjs/{caption-settings-cb1121bf.js → caption-settings-3835231a.js} +1 -1
- package/cjs/{features-d412f904.js → features-2bb2dd4e.js} +1 -1
- package/cjs/{icons-0ea2e662.js → icons-79591410.js} +1 -1
- package/cjs/index-1a9cf743.js +1 -0
- package/cjs/{index-41fedd42.js → index-c5039d58.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-b4cb6b64.js → multicamv2-4afd8915.js} +1 -1
- package/cjs/{multicamv2-2ab01124.js → multicamv2-aaaa65d6.js} +1 -1
- package/cjs/{nextEpisodeButton-edcaf798.js → nextEpisodeButton-d160dcfd.js} +1 -1
- package/cjs/{playlist-1aad2fbc.js → playlist-72ba84d5.js} +1 -1
- package/cjs/{series-608a4f30.js → series-6049ffcc.js} +1 -1
- package/cjs/{series-v2-9b1cdaa2.js → series-v2-8a4359ea.js} +1 -1
- package/cjs/{series-v2-4974eb2d.js → series-v2-ea10318d.js} +1 -1
- package/cjs/{settings-icon-a72149cc.js → settings-icon-27b60de6.js} +1 -1
- package/cjs/{skin-476b4639.js → skin-021caaea.js} +1 -1
- package/cjs/{skin-f3f9eef1.js → skin-32396be4.js} +1 -1
- package/cjs/{skin-b88b5424.js → skin-43e130dc.js} +1 -1
- package/cjs/skin-a86f763d.js +1 -0
- package/cjs/start-begin-btn-35c37795.js +1 -0
- package/cjs/{videoSelector-c082c2dd.js → videoSelector-187f3529.js} +1 -1
- package/cjs/{videoSelector-3b3418be.js → videoSelector-9c3339e2.js} +1 -1
- package/cjs/watch-live-btn-04bf383d.js +1 -0
- package/esm/assets/icons.d.ts +3 -0
- package/esm/bundle.css +71 -35
- package/esm/{caption-settings-6bd8327e.js → caption-settings-c9b18ef8.js} +1 -1
- package/esm/components/dvr-overlay/index.d.ts +1 -0
- package/esm/components/dvr-overlay/start-begin-btn.d.ts +6 -0
- package/esm/components/dvr-overlay/watch-live-btn.d.ts +6 -0
- package/esm/{features-174da21d.js → features-2d66d073.js} +1 -1
- package/esm/features.d.ts +2 -0
- package/esm/{icons-0676e9c7.js → icons-c139587c.js} +1 -1
- package/esm/index-3b50e289.js +1 -0
- package/esm/{index-17ea394a.js → index-5863b4b8.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-b894be91.js → multicamv2-20406485.js} +1 -1
- package/esm/{multicamv2-9f9dd1fb.js → multicamv2-beef2152.js} +1 -1
- package/esm/{nextEpisodeButton-f578df68.js → nextEpisodeButton-ce9c073f.js} +1 -1
- package/esm/{playlist-d740ad17.js → playlist-3fc8d123.js} +1 -1
- package/esm/{series-5a3f4998.js → series-59e62fbe.js} +1 -1
- package/esm/{series-v2-7b0be61b.js → series-v2-0de0cb77.js} +1 -1
- package/esm/{series-v2-b7180bcb.js → series-v2-ecbcd52a.js} +1 -1
- package/esm/{settings-icon-1f56ba2c.js → settings-icon-e8ed293a.js} +1 -1
- package/esm/skin-0c5f06e9.js +1 -0
- package/esm/{skin-6538b324.js → skin-6185e3d0.js} +1 -1
- package/esm/{skin-ee080d2c.js → skin-757c1e70.js} +1 -1
- package/esm/{skin-e6cd9e29.js → skin-7b1fe120.js} +1 -1
- package/esm/start-begin-btn-63a71f73.js +1 -0
- package/esm/{videoSelector-fdf21cf3.js → videoSelector-69c96a51.js} +1 -1
- package/esm/{videoSelector-96e704fd.js → videoSelector-6d99a9f5.js} +1 -1
- package/esm/watch-live-btn-2d5cd4d3.js +1 -0
- package/package.json +1 -1
- package/cjs/index-1a4cc489.js +0 -1
- package/cjs/skin-12a4cd99.js +0 -1
- package/esm/index-d26618e8.js +0 -1
- package/esm/skin-03df0bc9.js +0 -1
package/cjs/index-1a4cc489.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-26d3fd75.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("./util-db87d399.js"),l=require("./captions-bf891620.js"),a=require("./resolution-9c4872ec.js"),u=require("./skin-9e714900.js"),s=require("./player_instance-fcf6a8fb.js"),c=require("./localisation-56e0a999.js"),d=require("@babel/runtime/helpers/typeof"),v=require("@babel/runtime/helpers/toConsumableArray"),f=require("@babel/runtime/helpers/slicedToArray"),p=function(e){return new Promise(function(n,t){if(m(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},m=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},g=function(e,n,t){var r=s.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},y=function(e){var n=s.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},h=function(){var n=t(r.mark(function n(t){var i,l,a,u,c;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l=s.getPlayer(null==t?void 0:t.playerId),null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable||null==t||!t.chromecastReceiverId){n.next=22;break}return n.next=4,import("@silvermine/videojs-chromecast");case 4:return u=n.sent,n.prev=5,n.next=8,p("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:n.next=13;break;case 10:n.prev=10,n.t0=n.catch(5),console.log("Error",n.t0);case 13:return n.prev=13,u.default(o),n.finish(13);case 16:(c=o.getTech("chromecast"))&&!c.prototype.seeking&&(c.prototype.seeking=function(){}),null!==(a=window)&&void 0!==a&&a.cast?null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=t&&t.airplay&&"Safari"==e.detectBrowser()?null==l||l.airPlay({addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return n.stop()}},n,null,[[5,10,13,16]])}));return function(e){return n.apply(this,arguments)}}(),b=function(e,n){var t=s.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,i,l,a,u=this.el(),s=o.dom.getPointerPosition(u,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}})};var w=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),p("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)}}(),k=function(){var e=t(r.mark(function e(){return r.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)}}(),S=function(){var e=t(r.mark(function e(){var n;return r.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)}}(),O=function(){var e=t(r.mark(function e(){return r.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)}}(),P=function(){var e=t(r.mark(function e(){return r.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-0c89add5.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)}}(),I=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){p("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:w,loadEMELibrary:k,loadMuxPlugin:S,loadDvrSeekbar:O,loadContribDash:P});function T(e){return j.apply(this,arguments)}function j(){return(j=t(r.mark(function n(t){var o;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o=(null==t?void 0:t.airplay)||!1,n.next=3,w();case 3:o&&"Safari"==e.detectBrowser()&&Promise.resolve().then(function(){return I}).then(function(e){e.importAirplay()});case 4:case"end":return n.stop()}},n)}))).apply(this,arguments)}function E(e,n){return D.apply(this,arguments)}function D(){return(D=t(r.mark(function n(t,o){var i,l,a,u,s,c,d,v,f,p;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return d=(null==o?void 0:o.contentType)||"video",v=null==o||null===(i=o[d])||void 0===i?void 0:i.drmEnabled,null==o||null===(l=o[d])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==t||t.showPositiveSeekbar,f=(null==o||null===(u=o[d])||void 0===u||null===(s=u.streamingInfo)||void 0===s||null===(c=s.videoAssets)||void 0===c?void 0:c.dash)||null,n.prev=5,n.next=8,Promise.allSettled([v?"Safari"==e.detectBrowser()?k():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?P():k():"Safari"!=e.detectBrowser()&&f?P():null,h(t)]);case 8:n.next=13;break;case 10:n.prev=10,n.t0=n.catch(5),console.log("Error",n.t0);case 13:case"end":return n.stop()}},n,null,[[5,10]])}))).apply(this,arguments)}function C(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var x=new Set,R=null,L=function(n,t,r){var o,i,l,a,u,s,c,d={},v=(null==n?void 0:n.contentType)||"video";d["c3.cm.id"]=(null===(o=n[v])||void 0===o?void 0:o.id)||"Null",d["c3.cm.contentType"]=H(n),d[null==r||null===(i=r.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==n||!n.linearchannel),d[null==r||null===(l=r.Constants)||void 0===l?void 0:l.STREAM_URL]=t.currentSrc(),d[null==r||null===(a=r.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),d["c3.cm.categoryType"]=_(n),d["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"}}(),d.DRMEnabled=(null===(u=n[v])||void 0===u?void 0:u.drmEnabled)||"None",d.DAIStream=null!==(s=n[v])&&void 0!==s&&null!==(c=s.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",d[r.Constants.DEFAULT_RESOURCE]="AKAMAI",d["c3.cm.brand"]="NULL",d.CDVREnabled=B(n),d["c3.cm.genreList"]=M(n),d["c3.cm.genre"]=N(n),d["c3.cm.channel"]=V(n);var f=Q(e.getCurrentSeries(),n);return d=A(A({},d),f)},N=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},M=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"},V=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},_=function(e){return(null==e?void 0:e.contentType)||"null"},B=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},U=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},H=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var q,F,Q=function(n,t){var r,o,i,l,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(),c=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(o=r.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===(i=n[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[c-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},G=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"}},K=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},W=function(){var n=t(r.mark(function n(t,o){var i,l,a,u,c,d,v,f,p,m;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},l=i.trackConvivaPlayerEvent,a=i.paymentHandler,u=i.tveProvider,c=i.enable,d=i.appName,v=(o||{}).token,c){n.next=4;break}return n.abrupt("return");case 4:if(f=s.getPlayer(t),"function"==typeof(p=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,p("getConvivaObject");case 10:if(m=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 r=G(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;R&&R!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),x.clear(),R=f.currentSrc();var r=K(f.currentType()),i=e.getCurrentVideo(),l=L(i,f,m);l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",l[null==m||null===(t=m.Constants)||void 0===t?void 0:t.ASSET_NAME]=U(i,o),l.authToken=v||"NULL",l.streamType=r,l.D2CType=a||"NONE",l.subscriberType=u||(a?"D2C":"FREE"),l["c3.cm.affiliate"]=u||"NULL",z.setData(l),p("contentInfo",l)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),f.on("play",function(){x.has(f.currentSrc())||(x.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){x.has(f.currentSrc())&&x.delete(f.currentSrc()),p("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==x||x.clear(),p("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),z=(q={},{setData:function(e){q=A(A({},q),e)},getData:function(){return q}}),J=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-f3f9eef1.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-7a98d3fd.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-b88b5424.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-476b4639.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-84eed465.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&Promise.resolve().then(function(){return require("./skin-12a4cd99.js")}).then(function(t){t.initialiseSkin(e,n)})};function X(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $=[],Z=0,ee=null;function ne(t,r,o){var i,l,a,u,s,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(i=r.watchHistory)||void 0===i||i.apiVersion;var d=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(u=r.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==r||null===(s=r.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),y=c?100:Math.floor(v/f*100),h={};m?function(t,r,o){var i=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(o),l=te(i),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return Y(Y({},e),{},n({},t,s[t]))},{}),d=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===F});d<0?l.push(Y(Y({content:c},t),{},{addedDate:a,updateDate:a})):l[d]=Y(Y(Y({},l[d]),t),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:c,watchedTime:g,watchedPercentage:y},d,r.siteOwner):(h=Y(Y({videoId:F,watchedTime:g,watchedPercentage:y,doneWatching:c,profileId:d},ee&&{seriesId:ee}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then(function(e){}).catch(function(e){})),Z=v+o}function te(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function re(e,n,t){var r=te(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return r&&Array.isArray(r)&&(o=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var oe=!1,ie=function(n,t){var r,o,i=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[i])||void 0===r||null===(o=r.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!oe){var l=le(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,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 le(e,n,t){if(Array.isArray(e))return e.map(function(e){return le(e,n,t)});if(null!==e&&"object"===d(e)){var r={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=le(e[o],n,t)}),r}return e}function ae(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 ue(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)?ue(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?se(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):se(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var de=function(n,t,r,o){var i,a,u,c,v=o.res,f=o.sres,p=s.getPlayer(n),m=(null==v?void 0:v.contentType)||"video",y=(null==v?void 0:v[m].drmEnabled)||!1,h=(null==v||null===(i=v[m])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,b=(null==v||null===(u=v[m])||void 0===u||null===(c=u.liveDetails)||void 0===c?void 0:c.isDvrEnabled)||!1;e.setCurrentVideo(v),p&&(p.on("loadstart",function(){h?r.resolve({status:!0,msg:"Video Loaded",response:v}):r.resolve(ce({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:v}:{response:v}))}),p.on("loadeddata",function(){var r,o,i,a=l.getCaptions(n);if(null==a||a.map(function(e){return l.disableCaptions(n,e.id)}),b&&"Safari"===e.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())&&g(n,sessionStorage.getItem("volume")||"100");var c=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var d,f,m=ce(ce({},t),v);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(ee=null==n||null===(o=n.series)||void 0===o?void 0:o.id),$=[],Z=0,F=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=s.getPlayer(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());$.includes(Z)||(e==Z?($.push(e),ne(a,n,l)):e>Z&&(Z=e+l))}}),a.one("ended",function(){ne(a,n,l,!0)}))}(n,m,null==c||null===(d=c.video)||void 0===d||null===(f=d.gist)||void 0===f?void 0:f.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=p&&p.mux){var y,h,w,k,S,O,P=(null===(y=e.getCurrentVideo())||void 0===y?void 0:y.video)||(null==v?void 0:v.video),I=null==P?void 0:P.gist,T={env_key:null==t||null===(h=t.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==P||null===(k=P.series)||void 0===k?void 0:k.title,video_stream_type:null!=P&&null!==(S=P.streamingInfo)&&void 0!==S&&S.isLiveStream?"live":"video",viewer_user_id:null==t||null===(O=t.analytics)||void 0===O?void 0:O.userId};p.mux({debug:!1,data:T})}}),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,r,o,i,l,a,u,s,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(c=s.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,g=p.getMediaSession(),y=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),p.tech_.on("retryplaylist",function(){h&&ie(v,n)}),p.on("error",function(){var t,o;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&h)?ie(v,n):(e.handleError(n,(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==p||null===(o=p.error())||void 0===o?void 0:o.message)||"Some error occured",response:v}))}),p.one("play",function(){var n,r,o,i,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(o=r.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,u,s,c=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,d=e.getSeriesWatchMap(),v=(null==d?void 0:d.get(c))||{t:0,p:0},f=v.t,m=v.p;f&&m<95&&setTimeout(function(){p.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){p.currentTime(null==t?void 0:t.watchHistoryResumeTime)},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(h){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}}),p.one("loadeddata",function(){var n,t=(null==p||null===(n=p.audioTracks())||void 0===n?void 0:n.tracks_)||null;if(t)if(t.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0}),"object"==d(p.dash)){var r,o,i,l=null==p||null===(r=p.dash)||void 0===r||null===(o=r.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),a=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")}),u=ae(t);try{for(u.s();!(i=u.n()).done;){var s=i.value;if(a&&(null==s?void 0:s.id)=="dash-audio-".concat(a.index)){s.enabled=!0;break}}}catch(e){u.e(e)}finally{u.f()}}else{var c,v=ae(t);try{for(v.s();!(c=v.n()).done;){var f,m,g,h=c.value;if(("Chrome"==e.detectBrowser()||"Edge"==e.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(m=f.userAgent)&&void 0!==m&&m.includes("Macintosh")||!y))&&null!=h&&null!==(g=h.label)&&void 0!==g&&g.includes("5.1"))p.audioTracks().removeTrack(h);else{if("main"==h.kind){h.enabled=!0;break}h.enabled=!1}}}catch(e){v.e(e)}finally{v.f()}}}))};var ve,fe=(ve=!0,{enable:function(){ve=!0},disable:function(){ve=!1},get enabled(){return ve}}),pe="ssai-breakStart",me="ssai-adImpression",ge="ssai-firstQuartile",ye="ssai-midpoint",he="ssai-thirdQuartile",be="ssai-complete",we="ssai-breakEnd",ke={breakStart:pe,impression:me,firstQuartile:ge,midpoint:ye,thirdQuartile:he,complete:be,breakEnd:we};function Se(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=s.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var r=n.eventType,o=ke[r];o&&t.trigger(o,n)}function Oe(e){var n=s.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{adBreakStart:function(e){return t(pe,e)},adImpression:function(e){return t(me,e)},adFirstQuartile:function(e){return t(ge,e)},adMidpoint:function(e){return t(ye,e)},adThirdQuartile:function(e){return t(he,e)},adComplete:function(e){return t(be,e)},adBreakEnd:function(e){return t(we,e)}}}function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Te(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 je(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)?je(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function je(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var Ee,De,Ce=(Ee="",{set:function(e){e&&(Ee=e)},get:function(){return Ee}}),Ae=(De=null,{set:function(e){De=e},get position(){return De}});function xe(e,n){return Re.apply(this,arguments)}function Re(){return Re=t(r.mark(function n(t,o){var i,l,a,u,c,d,v,p,m,g,y,h,b,w;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s.getPlayer(t),i=e.getSource(o,t),l=i.src,a=l.replace("/dash/","/session/").replace("master","session"),a=e.replaceMacros(a,t,o),u=Le(a),c=f(u,2),d=c[0],v=c[1],a=new URL(a.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var n=f(e,2),t=n[0],r=n[1];a.searchParams.set(t,r)}),n.prev=8,n.next=11,fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Ie({},d)})});case 11:return p=n.sent,n.next=14,p.json();case 14:return m=n.sent,g="https://"+new URL(a).hostname,y=m.trackingUrl,h=m.manifestUrl,b=g+y,w=g+h,Ce.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),i.src=w,n.abrupt("return",i);case 26:return n.prev=26,n.t0=n.catch(8),n.abrupt("return",i);case 29:case"end":return n.stop()}},n,null,[[8,26]])})),Re.apply(this,arguments)}function Le(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var r,o=Te(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=f(i,2),a=l[0],u=l[1];n[decodeURIComponent(a)]=decodeURIComponent(u||"")}}catch(e){o.e(e)}finally{o.f()}for(var s={},c={},d=0,v=Object.entries(n);d<v.length;d++){var p=f(v[d],2),m=p[0],g=p[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=g;else c[m]=g}return[s,c]}var Ne,Me=(Ne=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Ne=Array.isArray(e)?v(e):Ne},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Ne),v(Ne)}});function Ve(){return Ve=t(r.mark(function n(o,i){var l,a,c,d,f,p,m,g,y,h,b,w,k,S,O,P,I;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:I=function(e,n,t,r,i,l){var a=s.getPlayer(o);if(!a.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(a.currentTime());var u,c=Te(t);try{var d=function(){var t,s,c,d=u.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,g=d.durationInSeconds,y=p||0,h=f,b=(null===(t=window)||void 0===t||null===(s=t.customData)||void 0===s||null===(c=s.ads)||void 0===c?void 0:c.adEventHandler)||null,w="".concat(y,"_").concat(v),k=O.get("pod-".concat(i))||[];if(console.warn(e,y,"map:",v,"condition1:",e>=y,"map:",O),e>=y&&!k.includes(w)){k.push(w),O.set("pod-".concat(i),k);try{P(v,n,h,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var S=Ae.position;Ae.set(null),setTimeout(function(){null!=S&&(a.currentTime(S),l())},500)}if("function"==typeof b)try{var I,T={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:g,ad:null==n||null===(I=n.ads)||void 0===I?void 0:I[r],adIndex:r};b({adsData:T}),Se(o,T)}catch(e){console.error("Error when calling ads callback:",e)}}};for(c.s();!(u=c.n()).done;)d()}catch(e){c.e(e)}finally{c.f()}}},P=function(e,n,t,r){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(r.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(r.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},S=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Ae.set(i),f=Ce.get(),(p=s.getPlayer(o)).one("loadeddata",function(){f&&k(f)}),m=new Map,g=new Map,y=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,b=(null==p||null===(c=p.controlBar)||void 0===c?void 0:c.getChild("videoSelector"))||null,w=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,k=function(){var n=t(r.mark(function n(t){var l,a,c,d,f,p,k,O,P,T,j,E,D,C,A,x,R;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return D=function(e){document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",D),0===e.button&&T()},E=function(e){},j=function(){var e,n=k.currentTime(),t=null,r=Te(p);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=(o.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,m.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){k.currentTime(t+2.2)},100))},T=function(){var e,n=k.currentTime(),t=null,r=Te(p);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=o.ads,u=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>u||n>i)&&!m.has(i)||n>=i&&n<=u)&&(t=i,m.set(i,!0),g.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){k.currentTime(t+.4)},100))},a=!1,n.next=7,fetch(t);case 7:return c=n.sent,n.next=10,c.json();case 10:d=n.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",d),f=d.avails,p=[],k=s.getPlayer(o),O=k.controlBar.progressControl,P=O.seekBar.el(),f.map(function(e,n){var t,r,o;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(a=!0),p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(r=e.adBreakTrackingEvents)||void 0===r||null===(o=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===o?void 0:o[0])||[]})}),!a&&i&&(k.currentTime(i),j()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p),console.log(p,"data"),p.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,r=k.duration();if(!(n>r||Array.isArray(t)&&0==(null==t?void 0:t.length))){var o=n/r*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(o,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(o,"%"),i.style.pointerEvents="none",P.appendChild(i)}}),k.on("timeupdate",u.throttle(function(){var e=k.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=p[r],o=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=o+i;if(e>=o-1.2&&e<=a+1.2){e>=o&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&m.set(o,!0),fe.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),O.el().style.visibility="hidden";for(var u=e-o,s=0,c=0,d=0;d<l.length;d++){var f,y=null==l||null===(f=l[d])||void 0===f?void 0:f.durationInSeconds;if(u<s+y){c=d;break}s+=y}l[c];var k=Math.max(0,i-u),P=Math.round(k);C.style.display="block",R.textContent="".concat(c+1," of ").concat(l.length," • ").concat(S(P));var T=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});T.push.apply(T,v(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&T.push(null==t?void 0:t.podSlotImpressionBeacon),I(e,t,T,c,r,j),"break"}g.delete(o)},r=0;r<p.length;r++){if("break"===t())break}n||(C.style.display="none",O.el().style.visibility="visible",b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),fe.enable())}},1e3)),null===(l=document)||void 0===l||l.addEventListener("keydown",function(n){fe.enabled&&"ArrowRight"==n.key&&(T(),e.skip(o,10),n.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",E),document.addEventListener("pointerup",D))}),(C=document.createElement("div")).className="ssai-ad-container",(A=document.createElement("div")).className="sponsored-adbox",(x=document.createElement("div")).className="sponsored-text",x.textContent="Sponsored Ad",A.append(x),(R=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",C.append(A),C.append(R),k.el().appendChild(C);case 41:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}(),O=new Map;case 16:case"end":return n.stop()}},n)})),Ve.apply(this,arguments)}function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ue=function(i,a,c,d){var v,f,p,m,g,y,h,w,k,S,O,P,I,T,j,D,C,A,x,R,L,N,M,V,_,B,U,H,q,F,Q,G,K,X,Y,$,Z,ee,ne=a.res,te=void 0===ne?null:ne,re=a.sres,oe=void 0===re?null:re,ie=null!=c&&c.chromecastReceiverId?["chromecast","html5"]:["html5"],le=(null===(v=te)||void 0===v?void 0:v.contentType)||"video",ae=u.impolicy16x9(null===(f=te)||void 0===f||null===(p=f[le])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.videoImageUrl)||u.impolicy16x9(null===(g=te)||void 0===g||null===(y=g[le])||void 0===y||null===(h=y.gist)||void 0===h||null===(w=h.imageGist)||void 0===w?void 0:w.r16x9),ue=(null===(k=te)||void 0===k||null===(S=k[le])||void 0===S||null===(O=S.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,se=(null===(P=te)||void 0===P||null===(I=P[le])||void 0===I||null===(T=I.streamingInfo)||void 0===T?void 0:T.isLiveStream)||!1,ce=(null===(j=te)||void 0===j||null===(D=j.ads)||void 0===D||null===(C=D.preRoll)||void 0===C||null===(A=C.adTags)||void 0===A||null===(x=A.web)||void 0===x?void 0:x.active)&&(null===(R=te)||void 0===R||null===(L=R.ads)||void 0===L||null===(N=L.preRoll)||void 0===N||null===(M=N.adTags)||void 0===M||null===(V=M.web)||void 0===V?void 0:V.url),ve=(null===(_=te=Be(Be({},te),{},{audioAssetSource:null==c?void 0:c.audioAssetSource}))||void 0===_||null===(B=_[le])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(U=window)||void 0===U||null===(H=U.app_data)||void 0===H||null===(q=H.appcmsMain)||void 0===q||null===(F=q.adsConfig)||void 0===F?void 0:F.vodAdSticherProvider)||!1,fe=(null==c?void 0:c.latency)||6,pe=(null==c?void 0:c.skin_settings)||{},me=(ee={enableSmoothSeeking:!0,controls:0!=(null==c?void 0:c.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==c?void 0:c.muted)||!1,autoplay:(null==c?void 0:c.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==pe?void 0:pe.pictureInPictureToggle)||!1},playbackRates:null!=pe&&pe.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==c.skin,liveui:ue},n(ee,"autoplay",null==c?void 0:c.autoplay),n(ee,"normalizeAutoplay",(null==c?void 0:c.autoplay)&&!ce),n(ee,"loop",(null==c?void 0:c.loop)||!1),n(ee,"audioPosterMode",null==c?void 0:c.audioPosterMode),n(ee,"html5",Be(Be({dash:Be(Be(Be({},!o.browser.IS_SAFARI&&{useTTML:!0}),(null==c?void 0:c.debugConfig)&&(null==c||null===(Q=c.debugConfig)||void 0===Q?void 0:Q.enable)&&{debug:!0,logLevel:null!=c&&null!==(G=c.debugConfig)&&void 0!==G&&G.logLevel?null==c||null===(K=c.debugConfig)||void 0===K?void 0:K.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:fe},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Be(Be({liveRangeSafeTimeDelta:fe,useDevicePixelRatio:!0,experimentalLLHLS:(null==c?void 0:c.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==c||null===(X=c.customData)||void 0===X?void 0:X.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(Y=null==c?void 0:c.enableLowInitialPlaylist)||void 0===Y||Y}),debug:!0,nativeTextTracks:"Safari"==e.detectBrowser()},0==(null==c||null===($=c.customData)||void 0===$?void 0:$.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==c||null===(Z=c.customData)||void 0===Z?void 0:Z.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(ee,"poster",ae),n(ee,"techOrder",ie),n(ee,"chromecast",{requestCustomDataFn:function(e){var n,t,r=s.getPlayer(i),o=((null==r?void 0:r.textTracksJson_)||r.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),l=function(e,n,t){var r,o,i,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,y,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,P=(null==O?void 0:O.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(y=g[0])||void 0===y||null===(h=y.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=P;var I=(null==O?void 0:O.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===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=T;var j=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=j;var E=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=E;var D=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(te,e,o);return Be(Be({},l),{},{convivaMetaData:Be({customerKey:(null==c||null===(n=c.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==c||null===(t=c.convivaConfig)||void 0===t?void 0:t.debug)||!1},z.getData())})},modifyLoadRequestFn:function(e){var n,t,r,o,l,a=s.getPlayer(i),u=(null==a?void 0:a.currentSource())||{};!(null===(n=te)||void 0===n||null===(t=n[le])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(o=r.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ee);if(!o.getPlayers()[i]){o.log.level("debug");var ge=o(i,me,function(){var n=t(r.mark(function n(){var t,a,u,s,v,f,p,m,g,y,h,w,k,S,O,P,I,T,j,D;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ge),console.log(o.VERSION),console.log(o.getPlugins()),n.next=5,E(c,te);case 5:if(w=null===(t=te)||void 0===t||null===(a=t[le])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.startOverTime,se&&d.resolve(Be({status:!0,msg:"Player Initialised"},oe?{seriesResponse:oe,response:te}:{response:te})),e.inititateBeacon(i,null==c?void 0:c.analyticsCb),W(i,c),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),ue&&b(i,w),!ce||null!=c&&null!==(s=c.customData)&&void 0!==s&&s.disableAds||e.initialiseAdvertisement(i,ce,te),k=e.getSource(te,i),console.log(k),null!=c&&c.nearestClusterUrl&&(k=e.getUpdatedClusterSource(k,c.nearestClusterUrl)),!ve){n.next=19;break}return n.next=18,xe(i,te);case 18:k=n.sent;case 19:k?e.loadVideo(i,k):(d.reject({status:!1,msg:"Incompatible / Missing Source",response:te}),e.handleError(i,"Incompatible / Missing Source")),((null===(v=te)||void 0===v||null===(f=v[le])||void 0===f||null===(p=f.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(g=te)||void 0===g||null===(y=g[le])||void 0===y||null===(h=y.closedCaptions)||void 0===h?void 0:h.length)>0)&&(D=(null===(O=te)||void 0===O||null===(P=O[le])||void 0===P||null===(I=P.contentDetails)||void 0===I?void 0:I.closedCaptions)||(null===(T=te)||void 0===T||null===(j=T[le])||void 0===j?void 0:j.closedCaptions),S=D.filter(function(e){return"VTT"===e.format}),l.addCaptions(i,S)),null!=c&&c.disableControls?e.disableControls(i):J(i,Be(Be(Be({},c),me),{},{liveVideo:se,isDvrEnabled:ue,res:te,sres:oe})),de(i,Be(Be(Be({},c),me),{},{liveVideo:se}),d,{res:te,sres:oe});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},He={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Qe,Ge=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=Ke(e);Ue(o,{res:i},e,{resolve:t,reject:r})},Ke=function(n){var t,r,o,i,l,a,u,s,c=null==n?void 0:n.streamingInfo,d=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,f=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,p=(null==n||null===(o=n.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,m=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,g=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],y=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,h=null==n?void 0:n.token,b=e.getDecodedToken(h),w=null==b?void 0:b.site;return Fe(Fe({id:null==He?void 0:He[w]},!f&&{directPlaybackUrl:null==d?void 0:d.url}),{},{video:{drmEnabled:f,streamingInfo:{videoAssets:Fe(Fe({},y&&{drmProvider:y}),{},{widevine:null==d?void 0:d.widevine,fairPlay:null==d?void 0:d.fairPlay,playReady:null==d?void 0:d.playReady})},liveDetails:{isDvrEnabled:null==c?void 0:c.isDvrEnabled},gist:Fe({},m&&{videoImageUrl:m}),contentDetails:Fe({},(null==g?void 0:g.length)>0&&{closedCaptions:v(g)})},ads:{preRoll:{adTags:{web:Fe(Fe({},p&&{active:!0}),p&&{url:p})}}}})};function We(e,n){return ze.apply(this,arguments)}function ze(){return(ze=t(r.mark(function n(t,o){var i,l,a,u,s,c;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,a=null==t?void 0:t.videoId,u=null==t?void 0:t.playerId,s=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:c=n.sent,e.getVideoDetails(a,c).then(function(n){var r,o,d,v;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(d=o.gist)||void 0===d?void 0:d.contentType,e.setCurrentVideo(null==n?void 0:n.data);var f,p=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(v=t.watchHistory)&&void 0!==v&&v.enable&&!s)if((null===(f=t.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,g,y,h=re((null===(m=t.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==t?void 0:t.siteOwner);if(h&&h.length)t.watchHistoryResumeTime=(null===(g=h[0])||void 0===g?void 0:g.watchedTime)||null,t.watchedPercentage=(null===(y=h[0])||void 0===y?void 0:y.watchedPercentage)||null;p.contentType="video",Ue(u,{res:p},t,{resolve:i,reject:l})}else e.getVideoInfo(a,c).then(function(e){var n,r,o,i,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,r,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(e))}).finally(function(){Ue(u,{res:p},t,{resolve:i,reject:l})});else Ue(u,{res:p},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,u,l,a)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Je(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=t(r.mark(function n(t,o){var i,l,a,u,s;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,n.next=3,e.getToken();case 3:a=n.sent,u=null==t?void 0:t.playerId,s=null==t?void 0:t.epg,e.getLinearChannelDetails(s,a).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==s?void 0:s.channelId,Ue(u,{res:n},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,u,l,videoId)});case 7:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ye(e,n){return $e.apply(this,arguments)}function $e(){return($e=t(r.mark(function n(t,o){var i,l,a,u,s,c,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,c=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(c)),d=null==t||null===(i=t.series)||void 0===i?void 0:i.id,e.getSeriesDetails(d,u).then(function(n){var r,o,i,c=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(o=r.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);e.createSeriesWatchMap(d,u),e.getVideoDetails(f,u).then(function(n){var r,o,i;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,e.setCurrentVideo(n.data),Ue(s,{res:null==n?void 0:n.data,sres:c},t,{resolve:l,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)}function Ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function en(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:i.onTimeUpdate,getVideoDuration:i.getVideoDuration,onVideoEnded:i.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(r.mark(function t(o,i){var l,a,s,d,v,f,m,g,y,h,b,w,k,S,O,P,I,j,E,D,C,A,x;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(b=(null==n?void 0:n.videoSourceUrl)||!1,w=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,S=null==n?void 0:n.videoId,O=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,P=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,I=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",I),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),I&&!e.isTokenExpired(I)){t.next=16;break}return i({status:!1,msg:"".concat(I?"Token is expired !":"Missing Authorization Token"),response:{token:I}}),t.abrupt("return");case 16:Qe=JSON.parse(atob(I.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(s=Qe)||void 0===s||!s.anonymousId),n.siteOwner=(null===(d=Qe)||void 0===d?void 0:d.site)||null,n.userId=(null===(v=Qe)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=Qe)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,j=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(m=n.series)&&void 0!==m&&m.enable?null:null==n?void 0:n.chromecastReceiverId,E=(null==n||null===(g=n.analytics)||void 0===g?void 0:g.gaId)||null,(D=null==n?void 0:n.errors)&&(window.customErrors=D),window.customData=null==n?void 0:n.customData,c.setLocalisation(null==n||null===(y=n.customData)||void 0===y?void 0:y.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!u.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,T(n);case 33:E&&p("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then(function(){return e.runGtag(E)}).catch(function(e){}),(C=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(j)))&&C.addEventListener("contextmenu",function(e){return e.preventDefault()}),b?(x={directPlaybackUrl:b,id:A="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(A,I).then(function(e){var t=(null==e?void 0:e.data)||{};Ue(j,{res:en(en({},t),x)},n,{resolve:o,reject:i})}).catch(function(n){e.initiateErrorHandling(n,j,i,A)}):Ue(j,{res:x},n,{resolve:o,reject:i})):P?Ge(n,{resolve:o,reject:i}):O?Ye(n,{resolve:o,reject:i}):k?Je(n,{resolve:o,reject:i}):We(n,{resolve:o,reject:i});case 37:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:s.getPlayer,play:e.play,pause:e.pause,detectBrowser:e.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:i.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,playSelectedResolution:a.playSelectedResolution,getSource:e.getSource,setVolume:g,getVolume:y,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,adsQueuePointManager:Me,getSsaiEvents:Oe,playerEvents:i.playerEvents}},exports.initialiseKeyboardEvents=function(n,t){var r,o,i,l=s.getPlayer(n),a=null==l||null===(r=l.controlBar)||void 0===r||null===(o=r.playToggle)||void 0===o?void 0:o.el_,u=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(r){var o,i,s,c,d,v,f,p,m;if(fe.enabled&&"input"!=r.target.localName){var g=r.key,y=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(r.preventDefault(),null==u||u.focus()),g){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":y&&!1===t.liveui||e.rewind(n,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(s=i.app_data)||void 0===s||null===(c=s.appcmsMain)||void 0===c||null===(d=c.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(v=window)&&void 0!==v&&null!==(f=v.app_data)&&void 0!==f&&null!==(p=f.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;y||e.skip(n,10)}}},!0)},exports.setupAdvertisementMarkers=function(e,n){return Ve.apply(this,arguments)};
|
package/cjs/skin-12a4cd99.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-d412f904.js"),l=require("./player_instance-fcf6a8fb.js"),i=require("./index-41fedd42.js"),r=require("./generic-26d3fd75.js");require("videojs-contrib-quality-menu");var o=require("./icons-0ea2e662.js"),n=require("video.js"),u=require("./index-1a4cc489.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./resolution-9c4872ec.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./skin-9e714900.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-a860d3e8.js"),require("./util-db87d399.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-bf891620.js"),require("video.js/dist/video-js.min.css");function a(n,u){var a,d=l.getPlayer(n),t=(null==u||null===(a=u.res)||void 0===a?void 0:a.siteId)||"";d&&(d.on("loadeddata",function(){var a,s,v,p,c;d.qualityLevels()&&d.qualityLevels().length?function(e){var i=l.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(n):e.addResolutionModule(n,"vl_one",o.SettingsSvg()),!(null!=u&&null!==(a=u.series)&&void 0!==a&&a.enable||null!==(s=window)&&void 0!==s&&null!==(v=s.app_data)&&void 0!==v&&null!==(p=v.appcmsMain)&&void 0!==p&&null!==(c=p.features)&&void 0!==c&&c.auto_play)||null!=u&&u.liveVideo||i.addNextEpPreview(n,u),null!=u&&u.liveVideo||r.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===t||i.initiateTrickplay(n)}),d.one("play",function(){var l,i,r,o;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(n,null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}var d=function(e,i){var r,o,u,a,d,t,s,v,p,c,b,y,g=l.getPlayer(e),m=(null==i?void 0:i.theme)||{},q=n.dom.$(".vjs-play-progress"),h=n.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(r=window)||void 0===r||null===(o=r.app_data)||void 0===o||null===(u=o.appcmsMain)||void 0===u||null===(a=u.brand)||void 0===a||null===(d=a.cta)||void 0===d||null===(t=d.primary)||void 0===t?void 0:t.backgroundColor)),q&&(q.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(c=p.brand)||void 0===c||null===(b=c.cta)||void 0===b||null===(y=b.primary)||void 0===y?void 0:y.backgroundColor));var j=g.getChild("BigPlayButton")||null;(null==m?void 0:m.progressBarColor)&&q&&(q.style.background=m.progressBarColor),(null==m?void 0:m.playButtonBackgroundColor)&&j&&(j.el().style.background=m.playButtonBackgroundColor),(null==m?void 0:m.playButtonColor)&&h&&(h.style.color=m.playButtonColor),(null==m?void 0:m.playButtonType)&&("square"==(null==m?void 0:m.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(n,t){l.getPlayer(n).addClass("skin_vlone"),a(n,t),function(l,n){var a,d,t,s,v,p,c,b,y,g,m,q,h,j,f=(null==n||null===(a=n.res)||void 0===a||null===(d=a.video)||void 0===d?void 0:d.isSSAIEnabled)||!1,k=r.getSource(null==n?void 0:n.res,l)||{};k.src;var w=(null==n?void 0:n.skin_settings)||{};null!=w&&w.skipBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(l,"VL_ONE",o.SkipSvgV2());(null!=w&&w.rewindBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(l,"VL_ONE",o.RewindSvgV2());(null==n||null===(t=n.relatedVideos)||void 0===t||null===(s=t.content)||void 0===s?void 0:s.length)>0&&e.addVideoSelector(l,null==n?void 0:n.relatedVideos);null!=n&&null!==(v=n.series)&&void 0!==v&&v.enable&&e.addSeriesSelectorV2(l,n);(null==n||null===(p=n.streams)||void 0===p?void 0:p.length)>1&&e.addMulticamSelector(l,null==n?void 0:n.streams);if(i.addTVProviderImage(l,n),u.initialiseKeyboardEvents(l,n),"MEDIA_TAILOR"==(null===(c=window)||void 0===c||null===(b=c.app_data)||void 0===b||null===(y=b.appcmsMain)||void 0===y||null===(g=y.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)&&null!==(m=window)&&void 0!==m&&null!==(q=m.app_data)&&void 0!==q&&null!==(h=q.appcmsMain)&&void 0!==h&&null!==(j=h.adsConfig)&&void 0!==j&&j.vodAdClientSideTracking&&f){var C,B=null;if(null!=n&&null!==(C=n.series)&&void 0!==C&&C.enable){var S,V,M,_=null===(S=r.getCurrentVideo())||void 0===S||null===(V=S.video)||void 0===V||null===(M=V.gist)||void 0===M?void 0:M.id,P=r.getSeriesWatchMap(),T=(null==P?void 0:P.get(_))||{t:0,p:0},A=T.t;T.p<95&&(B=A)}else{var R=n.watchHistoryResumeTime;n.watchedPercentage<95&&(B=R)}u.setupAdvertisementMarkers(l,B)}}(n,t),d(n,t)};
|
package/esm/index-d26618e8.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{d as e,g as n,a as t,b as o,c as r,e as i,s as l,f as a,l as s,h as u,i as c,j as d,k as v,m as f,r as p,n as m,o as y,p as g,q as h,t as b,u as w,v as k,w as S,x as O,y as I,z as j,A as T,B as P,C as E,D,E as A,F as x,G as C,H as R,I as L,J as N,K as M,L as _,M as U,N as V,O as B,P as H,Q as F}from"./generic-7fb8e9c5.js";import Q from"@babel/runtime/helpers/defineProperty";import G from"@babel/runtime/helpers/asyncToGenerator";import K from"@babel/runtime/regenerator";import q from"video.js";import{o as z,g as J,a as W,s as X,b as Y,p as $}from"./util-9649ae40.js";import{g as Z,d as ee,a as ne,e as te}from"./captions-b619441b.js";import{g as oe,p as re}from"./resolution-62be852a.js";import{t as ie,i as le,a as ae}from"./skin-16f83185.js";import{g as se}from"./player_instance-34118a5b.js";import{s as ue}from"./localisation-0bf399a1.js";import ce from"@babel/runtime/helpers/typeof";import de from"@babel/runtime/helpers/toConsumableArray";import ve from"@babel/runtime/helpers/slicedToArray";var fe=function(e){return new Promise(function(n,t){if(pe(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},pe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},me=function(e,n,t){var o=se(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),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,"'")})},ye=function(e){var n=se(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ge=function(){var n=G(K.mark(function n(t){var o,r,i,l,a;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(r=se(null==t?void 0:t.playerId),null!=t&&null!==(o=t.series)&&void 0!==o&&o.enable||null==t||!t.chromecastReceiverId){n.next=22;break}return n.next=4,import("@silvermine/videojs-chromecast");case 4:return l=n.sent,n.prev=5,n.next=8,fe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:n.next=13;break;case 10:n.prev=10,n.t0=n.catch(5),console.log("Error",n.t0);case 13:return n.prev=13,l.default(q),n.finish(13);case 16:(a=q.getTech("chromecast"))&&!a.prototype.seeking&&(a.prototype.seeking=function(){}),null!==(i=window)&&void 0!==i&&i.cast?null==r||r.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==r||r.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=t&&t.airplay&&"Safari"==e()?null==r||r.airPlay({addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return n.stop()}},n,null,[[5,10,13,16]])}));return function(e){return n.apply(this,arguments)}}(),he=function(e,n){var t=se(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=q.dom.getPointerPosition(a,n).x;q.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var be=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),fe("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)}}(),we=function(){var e=G(K.mark(function e(){return K.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){q.getPlugin("eme")||q.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ke=function(){var e=G(K.mark(function e(){var n;return K.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(q),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)}}(),Se=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.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)}}(),Oe=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-6c1ba1fe.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)}}(),Ie=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){fe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(q)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(q)})},loadAdsLibrary:be,loadEMELibrary:we,loadMuxPlugin:ke,loadDvrSeekbar:Se,loadContribDash:Oe});function je(e){return Te.apply(this,arguments)}function Te(){return(Te=G(K.mark(function n(t){var o;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o=(null==t?void 0:t.airplay)||!1,n.next=3,be();case 3:o&&"Safari"==e()&&Promise.resolve().then(function(){return Ie}).then(function(e){e.importAirplay()});case 4:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Pe(e,n){return Ee.apply(this,arguments)}function Ee(){return(Ee=G(K.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return c=(null==o?void 0:o.contentType)||"video",d=null==o||null===(r=o[c])||void 0===r?void 0:r.drmEnabled,null==o||null===(i=o[c])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==t||t.showPositiveSeekbar,v=(null==o||null===(a=o[c])||void 0===a||null===(s=a.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.dash)||null,n.prev=5,n.next=8,Promise.allSettled([d?"Safari"==e()?we():"caliente"!=(null===(f=window)||void 0===f?void 0:f.siteName)?Oe():we():"Safari"!=e()&&v?Oe():null,ge(t)]);case 8:n.next=13;break;case 10:n.prev=10,n.t0=n.catch(5),console.log("Error",n.t0);case 13:case"end":return n.stop()}},n,null,[[5,10]])}))).apply(this,arguments)}function De(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?De(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):De(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var xe=new Set,Ce=null,Re=function(e,t,r){var i,l,a,s,u,c,d,v={},f=(null==e?void 0:e.contentType)||"video";v["c3.cm.id"]=(null===(i=e[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=Be(e),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==e||!e.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===n()?"NULL":n(),v["c3.cm.categoryType"]=_e(e),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===(u=e[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=e[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=Ue(e),v["c3.cm.genreList"]=Ne(e),v["c3.cm.genre"]=Le(e),v["c3.cm.channel"]=Me(e);var p=Qe(o(),e);return v=Ae(Ae({},v),p)},Le=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Ne=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"},Me=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},_e=function(e){return(null==e?void 0:e.contentType)||"null"},Ue=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Ve=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},Be=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var He,Fe,Qe=function(e,n){var o,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var c=r(),d=t();return u["c3.cm.seriesName"]=(null==n||null===(o=n.video)||void 0===o||null===(i=o.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Ge=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"}},Ke=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},qe=function(){var e=G(K.mark(function e(n,t){var o,r,l,a,s,u,c,d,v,f;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},r=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=se(n),"function"==typeof(v=r)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Ge(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Ce&&Ce!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),xe.clear(),Ce=d.currentSrc();var o=Ke(d.currentType()),r=i(),s=Re(r,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=Ve(r,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",ze.setData(s),v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){xe.has(d.currentSrc())||(xe.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){xe.has(d.currentSrc())&&xe.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==xe||xe.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),ze=(He={},{setData:function(e){He=Ae(Ae({},He),e)},getData:function(){return He}}),Je=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-6538b324.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-93e0aec2.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-e6cd9e29.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-ee080d2c.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-59cd094a.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&import("./skin-03df0bc9.js").then(function(t){t.initialiseSkin(e,n)})};function We(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Xe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?We(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):We(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ye=[],$e=0,Ze=null;function en(e,n,t){var o,r,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),g=c?100:Math.floor(v/f*100),h={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),r=nn(o),l=(new Date).getTime(),a=i(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return Xe(Xe({},e),{},Q({},n,s[n]))},{}),c=r.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Fe});c<0?r.push(Xe(Xe({content:u},e),{},{addedDate:l,updateDate:l})):r[c]=Xe(Xe(Xe({},r[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(r))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,n.siteOwner):(h=Xe(Xe({videoId:Fe,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},Ze&&{seriesId:Ze}),p&&{originalObjectId:p}),l(h).then(function(e){}).catch(function(e){})),$e=v+t}function nn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function tn(e,n,t){var o=nn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var on=!1,rn=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!on){var i=ln(e,"videoAssets","secondaryVideoAssets"),l=a(i,n);return l&&s(n,l),on=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ln(e,n,t){if(Array.isArray(e))return e.map(function(e){return ln(e,n,t)});if(null!==e&&"object"===ce(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=ln(e[r],n,t)}),o}return e}function an(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 sn(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)?sn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function sn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function un(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function cn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?un(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):un(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var dn=function(n,t,o,r){var l,a,s,f,p=r.res,m=r.sres,y=se(n),g=(null==p?void 0:p.contentType)||"video",h=(null==p?void 0:p[g].drmEnabled)||!1,b=(null==p||null===(l=p[g])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,w=(null==p||null===(s=p[g])||void 0===s||null===(f=s.liveDetails)||void 0===f?void 0:f.isDvrEnabled)||!1;u(p),y&&(y.on("loadstart",function(){b?o.resolve({status:!0,msg:"Video Loaded",response:p}):o.resolve(cn({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:p}:{response:p}))}),y.on("loadeddata",function(){var o,r,l,a=Z(n);if(null==a||a.map(function(e){return ee(n,e.id)}),w&&"Safari"===e())try{var s;null==y||null===(s=y.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==y||!y.muted())&&me(n,sessionStorage.getItem("volume")||"100");var u=i();if(c(),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.saveOffline)){var d,v,f=cn(cn({},t),p);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(Ze=null==n||null===(r=n.series)||void 0===r?void 0:r.id),Ye=[],$e=0,Fe=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=se(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Ye.includes($e)||(e==$e?(Ye.push(e),en(a,n,l)):e>$e&&($e=e+l))}}),a.one("ended",function(){en(a,n,l,!0)}))}(n,f,null==u||null===(d=u.video)||void 0===d||null===(v=d.gist)||void 0===v?void 0:v.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=y&&y.mux){var m,g,h,b,k,S,O=(null===(m=i())||void 0===m?void 0:m.video)||(null==p?void 0:p.video),I=null==O?void 0:O.gist,j={env_key:null==t||null===(g=t.analytics)||void 0===g?void 0:g.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==O||null===(b=O.series)||void 0===b?void 0:b.title,video_stream_type:null!=O&&null!==(k=O.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==t||null===(S=t.analytics)||void 0===S?void 0:S.userId};y.mux({debug:!1,data:j})}}),y.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];y.trigger("subtitlechanged",n)}),y.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),y.tech_.on("retryplaylist",function(){b&&rn(p,n)}),y.on("error",function(){var e,t;(console.log("ERROR",y.error(),y.error().code),4===y.error().code&&b)?rn(p,n):(d(n,(null==y||null===(e=y.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==y||null===(t=y.error())||void 0===t?void 0:t.message)||"Some error occured",response:p}))}),y.one("play",function(){var e,n,o,r,l;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(r=o.adsConfig)||void 0===r||!r.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,s,u,c=null===(a=i())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,d=v(),f=(null==d?void 0:d.get(c))||{t:0,p:0},p=f.t,m=f.p;p&&m<95&&setTimeout(function(){y.currentTime(p)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){y.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=y&&y.dvrSeekbar)try{y.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),y.on("volumechange",function(){var e=100*y.volume().toFixed(2);y.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),y.on("chromecastDisconnected",function(){if(b){y.currentSource();for(var e=y.textTracks(),n=e.length-1;n>=0;n--)y.removeRemoteTextTrack(e[n])}}),y.one("loadeddata",function(){var n,t=(null==y||null===(n=y.audioTracks())||void 0===n?void 0:n.tracks_)||null;if(t)if(t.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==ce(y.dash)){var o,r,i,l=null==y||null===(o=y.dash)||void 0===o||null===(r=o.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),a=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")}),s=an(t);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(a&&(null==u?void 0:u.id)=="dash-audio-".concat(a.index)){u.enabled=!0;break}}}catch(e){s.e(e)}finally{s.f()}}else{var c,d=an(t);try{for(d.s();!(c=d.n()).done;){var v,f,p,m=c.value;if(("Chrome"==e()||"Edge"==e()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!h))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1"))y.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function vn(e,n){var t,o,r,i=se(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,s,u,c,d,v,m,y;if(pn.enabled&&"input"!=t.target.localName){var g=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(t.preventDefault(),null==a||a.focus()),g){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":h&&!1===n.liveui||p(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(s=r.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(c=u.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(d=window)&&void 0!==d&&null!==(v=d.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(y=m.adsConfig)&&void 0!==y&&y.vodAdClientSideTracking)return;h||f(e,10)}}},!0)}var fn,pn=(fn=!0,{enable:function(){fn=!0},disable:function(){fn=!1},get enabled(){return fn}}),mn="ssai-breakStart",yn="ssai-adImpression",gn="ssai-firstQuartile",hn="ssai-midpoint",bn="ssai-thirdQuartile",wn="ssai-complete",kn="ssai-breakEnd",Sn={breakStart:mn,impression:yn,firstQuartile:gn,midpoint:hn,thirdQuartile:bn,complete:wn,breakEnd:kn};function On(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=se(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Sn[o];r&&t.trigger(r,n)}function In(e){var n=se(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(mn,e)},adImpression:function(e){return t(yn,e)},adFirstQuartile:function(e){return t(gn,e)},adMidpoint:function(e){return t(hn,e)},adThirdQuartile:function(e){return t(bn,e)},adComplete:function(e){return t(wn,e)},adBreakEnd:function(e){return t(kn,e)}}}function jn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Tn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jn(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Pn(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 En(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)?En(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function En(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Dn,An,xn=(Dn="",{set:function(e){e&&(Dn=e)},get:function(){return Dn}}),Cn=(An=null,{set:function(e){An=e},get position(){return An}});function Rn(e,n){return Ln.apply(this,arguments)}function Ln(){return Ln=G(K.mark(function e(n,t){var o,r,i,l,s,u,c,d,v,f,p,y,g,h;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return se(n),o=a(t,n),r=o.src,i=r.replace("/dash/","/session/").replace("master","session"),i=m(i,n,t),l=Nn(i),s=ve(l,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=ve(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.prev=8,e.next=11,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Tn({},u)})});case 11:return d=e.sent,e.next=14,d.json();case 14:return v=e.sent,f="https://"+new URL(i).hostname,p=v.trackingUrl,y=v.manifestUrl,g=f+p,h=f+y,xn.set(g),console.log("%c TRACKING URL","background: #bdf369; color: #000",g),o.src=h,e.abrupt("return",o);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",o);case 29:case"end":return e.stop()}},e,null,[[8,26]])})),Ln.apply(this,arguments)}function Nn(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var o,r=Pn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=ve(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=ve(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}var Mn,_n=(Mn=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Mn=Array.isArray(e)?de(e):Mn},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Mn),de(Mn)}});function Un(e,n){return Vn.apply(this,arguments)}function Vn(){return Vn=G(K.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v,p,m,y,g,h,b,w;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:w=function(e,t,o,r,i,l){var a=se(n);if(!a.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(a.currentTime());var s,u=Pn(o);try{var c=function(){var o,u,c,d=s.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,y=d.durationInSeconds,g=p||0,w=f,k=(null===(o=window)||void 0===o||null===(u=o.customData)||void 0===u||null===(c=u.ads)||void 0===c?void 0:c.adEventHandler)||null,S="".concat(g,"_").concat(v),O=h.get("pod-".concat(i))||[];if(console.warn(e,g,"map:",v,"condition1:",e>=g,"map:",h),e>=g&&!O.includes(S)){O.push(S),h.set("pod-".concat(i),O);try{b(v,t,w,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,t)}if("breakEnd"==v){var I=Cn.position;Cn.set(null),setTimeout(function(){null!=I&&(a.currentTime(I),l())},500)}if("function"==typeof k)try{var j,T={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:y,ad:null==t||null===(j=t.ads)||void 0===j?void 0:j[r],adIndex:r};k({adsData:T}),On(n,T)}catch(e){console.error("Error when calling ads callback:",e)}}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},b=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},g=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Cn.set(t),a=xn.get(),(s=se(n)).one("loadeddata",function(){a&&y(a)}),u=new Map,c=new Map,d=-1,v=(null===(o=document)||void 0===o||null===(r=o.getElementsByClassName("tvProviderImage"))||void 0===r?void 0:r[0])||null,p=(null==s||null===(i=s.controlBar)||void 0===i?void 0:i.getChild("videoSelector"))||null,m=(null==s||null===(l=s.controlBar)||void 0===l?void 0:l.getChild("seriesV2"))||null,y=function(){var e=G(K.mark(function e(o){var r,i,l,a,s,y,h,b,k,S,O,I,j,T,P,E,D;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return j=function(e){document.removeEventListener("pointermove",I),document.removeEventListener("pointerup",j),0===e.button&&S()},I=function(e){},O=function(){var e,n=h.currentTime(),t=null,o=Pn(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,u.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},S=function(){var e,n=h.currentTime(),t=null,o=Pn(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!u.has(i)||n>=i&&n<=s)&&(t=i,u.set(i,!0),c.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t+.4)},100))},i=!1,e.next=7,fetch(o);case 7:return l=e.sent,e.next=10,l.json();case 10:a=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",a),s=a.avails,y=[],h=se(n),b=h.controlBar.progressControl,k=b.seekBar.el(),s.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(i=!0),y.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!i&&t&&(h.currentTime(t),O()),null!=y&&y.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",y),window.adsQueueList=y),console.log(y,"data"),y.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=h.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",k.appendChild(i)}}),h.on("timeupdate",ie(function(){var e=h.currentTime();if(e!==d){d=e;for(var n=!1,t=function(){var t=y[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&u.set(r,!0),pn.disable(),v&&v.classList.add("vjs-hidden"),p&&(p.el().style.pointerEvents="none",p.el().classList.add("vjs-hidden")),m&&(m.el().style.pointerEvents="none",m.el().classList.add("vjs-hidden")),b.el().style.visibility="hidden";for(var s=e-r,d=0,f=0,h=0;h<l.length;h++){var k,S=null==l||null===(k=l[h])||void 0===k?void 0:k.durationInSeconds;if(s<d+S){f=h;break}d+=S}l[f];var I=Math.max(0,i-s),j=Math.round(I);T.style.display="block",D.textContent="".concat(f+1," of ").concat(l.length," • ").concat(g(j));var P=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});P.push.apply(P,de(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&P.push(null==t?void 0:t.podSlotImpressionBeacon),w(e,t,P,f,o,O),"break"}c.delete(r)},o=0;o<y.length;o++){if("break"===t())break}n||(T.style.display="none",b.el().style.visibility="visible",p&&(p.el().style.pointerEvents="auto",p.el().classList.remove("vjs-hidden")),m&&(m.el().style.pointerEvents="auto",m.el().classList.remove("vjs-hidden")),v&&v.classList.remove("vjs-hidden"),pn.enable())}},1e3)),null===(r=document)||void 0===r||r.addEventListener("keydown",function(e){pn.enabled&&"ArrowRight"==e.key&&(S(),f(n,10),e.stopPropagation())}),b.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",I),document.addEventListener("pointerup",j))}),(T=document.createElement("div")).className="ssai-ad-container",(P=document.createElement("div")).className="sponsored-adbox",(E=document.createElement("div")).className="sponsored-text",E.textContent="Sponsored Ad",P.append(E),(D=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",T.append(P),T.append(D),h.el().appendChild(T);case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),h=new Map;case 16:case"end":return e.stop()}},e)})),Vn.apply(this,arguments)}function Bn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Hn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Bn(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Bn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Fn=function(n,t,o,r){var i,l,u,c,v,f,p,m,w,k,S,O,I,j,T,P,E,D,A,x,C,R,L,N,M,_,U,V,B,H,F,z,J,W,X,Y,$,Z,ee=t.res,te=void 0===ee?null:ee,oe=t.sres,re=void 0===oe?null:oe,ie=null!=o&&o.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(i=te)||void 0===i?void 0:i.contentType)||"video",ue=le(null===(l=te)||void 0===l||null===(u=l[ae])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl)||le(null===(v=te)||void 0===v||null===(f=v[ae])||void 0===f||null===(p=f.gist)||void 0===p||null===(m=p.imageGist)||void 0===m?void 0:m.r16x9),ce=(null===(w=te)||void 0===w||null===(k=w[ae])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,de=(null===(O=te)||void 0===O||null===(I=O[ae])||void 0===I||null===(j=I.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,ve=(null===(T=te)||void 0===T||null===(P=T.ads)||void 0===P||null===(E=P.preRoll)||void 0===E||null===(D=E.adTags)||void 0===D||null===(A=D.web)||void 0===A?void 0:A.active)&&(null===(x=te)||void 0===x||null===(C=x.ads)||void 0===C||null===(R=C.preRoll)||void 0===R||null===(L=R.adTags)||void 0===L||null===(N=L.web)||void 0===N?void 0:N.url),fe=(null===(M=te=Hn(Hn({},te),{},{audioAssetSource:null==o?void 0:o.audioAssetSource}))||void 0===M||null===(_=M[ae])||void 0===_?void 0:_.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(U=window)||void 0===U||null===(V=U.app_data)||void 0===V||null===(B=V.appcmsMain)||void 0===B||null===(H=B.adsConfig)||void 0===H?void 0:H.vodAdSticherProvider)||!1,pe=(null==o?void 0:o.latency)||6,me=(null==o?void 0:o.skin_settings)||{},ye=(Z={enableSmoothSeeking:!0,controls:0!=(null==o?void 0:o.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==o?void 0:o.muted)||!1,autoplay:(null==o?void 0:o.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==me?void 0:me.pictureInPictureToggle)||!1},playbackRates:null!=me&&me.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==o.skin,liveui:ce},Q(Z,"autoplay",null==o?void 0:o.autoplay),Q(Z,"normalizeAutoplay",(null==o?void 0:o.autoplay)&&!ve),Q(Z,"loop",(null==o?void 0:o.loop)||!1),Q(Z,"audioPosterMode",null==o?void 0:o.audioPosterMode),Q(Z,"html5",Hn(Hn({dash:Hn(Hn(Hn({},!q.browser.IS_SAFARI&&{useTTML:!0}),(null==o?void 0:o.debugConfig)&&(null==o||null===(F=o.debugConfig)||void 0===F?void 0:F.enable)&&{debug:!0,logLevel:null!=o&&null!==(z=o.debugConfig)&&void 0!==z&&z.logLevel?null==o||null===(J=o.debugConfig)||void 0===J?void 0:J.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:pe},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Hn(Hn({liveRangeSafeTimeDelta:pe,useDevicePixelRatio:!0,experimentalLLHLS:(null==o?void 0:o.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==o||null===(W=o.customData)||void 0===W?void 0:W.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(X=null==o?void 0:o.enableLowInitialPlaylist)||void 0===X||X}),debug:!0,nativeTextTracks:"Safari"==e()},0==(null==o||null===(Y=o.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==o||null===($=o.customData)||void 0===$?void 0:$.nativeVideoTracks)&&{nativeVideoTracks:!1})),Q(Z,"poster",ue),Q(Z,"techOrder",ie),Q(Z,"chromecast",{requestCustomDataFn:function(e){var t,r,i=se(n),l=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,I=(null==O?void 0:O.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=I;var j=(null==O?void 0:O.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=j}var T=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=T;var P=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=P;var E=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=E;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(te,e,l);return Hn(Hn({},a),{},{convivaMetaData:Hn({customerKey:(null==o||null===(t=o.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==o||null===(r=o.convivaConfig)||void 0===r?void 0:r.debug)||!1},ze.getData())})},modifyLoadRequestFn:function(e){var t,o,r,i,l,a=se(n),s=(null==a?void 0:a.currentSource())||{};!(null===(t=te)||void 0===t||null===(o=t[ae])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),Z);if(!q.getPlayers()[n]){q.log.level("debug");var ge=q(n,ye,function(){var e=G(K.mark(function e(){var t,i,l,u,c,v,f,p,m,w,k,S,O,I,j,T,P,E,D,A;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(ge),console.log(q.VERSION),console.log(q.getPlugins()),e.next=5,Pe(o,te);case 5:if(S=null===(t=te)||void 0===t||null===(i=t[ae])||void 0===i||null===(l=i.liveDetails)||void 0===l?void 0:l.startOverTime,de&&r.resolve(Hn({status:!0,msg:"Player Initialised"},re?{seriesResponse:re,response:te}:{response:te})),g(n,null==o?void 0:o.analyticsCb),qe(n,o),/Android/i.test(navigator.userAgent)&&(q.options.vhs.overrideNative=!0),ce&&he(n,S),!ve||null!=o&&null!==(u=o.customData)&&void 0!==u&&u.disableAds||h(n,ve,te),O=a(te,n),console.log(O),null!=o&&o.nearestClusterUrl&&(O=b(O,o.nearestClusterUrl)),!fe){e.next=19;break}return e.next=18,Rn(n,te);case 18:O=e.sent;case 19:O?s(n,O):(r.reject({status:!1,msg:"Incompatible / Missing Source",response:te}),d(n,"Incompatible / Missing Source")),((null===(c=te)||void 0===c||null===(v=c[ae])||void 0===v||null===(f=v.contentDetails)||void 0===f||null===(p=f.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(m=te)||void 0===m||null===(w=m[ae])||void 0===w||null===(k=w.closedCaptions)||void 0===k?void 0:k.length)>0)&&(A=(null===(j=te)||void 0===j||null===(T=j[ae])||void 0===T||null===(P=T.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null===(E=te)||void 0===E||null===(D=E[ae])||void 0===D?void 0:D.closedCaptions),I=A.filter(function(e){return"VTT"===e.format}),ne(n,I)),null!=o&&o.disableControls?y(n):Je(n,Hn(Hn(Hn({},o),ye),{},{liveVideo:de,isDvrEnabled:ce,res:te,sres:re})),dn(n,Hn(Hn(Hn({},o),ye),{},{liveVideo:de}),r,{res:te,sres:re});case 23:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}},Qn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Gn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Kn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gn(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var qn,zn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Jn(e);Fn(r,{res:i},e,{resolve:t,reject:o})},Jn=function(e){var n,t,o,r,i,l,a,s,u=null==e?void 0:e.streamingInfo,c=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,d=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,v=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.url)||null,f=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,p=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],m=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.drmProvider)||null,y=null==e?void 0:e.token,g=w(y),h=null==g?void 0:g.site;return Kn(Kn({id:null==Qn?void 0:Qn[h]},!d&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:d,streamingInfo:{videoAssets:Kn(Kn({},m&&{drmProvider:m}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==u?void 0:u.isDvrEnabled},gist:Kn({},f&&{videoImageUrl:f}),contentDetails:Kn({},(null==p?void 0:p.length)>0&&{closedCaptions:de(p)})},ads:{preRoll:{adTags:{web:Kn(Kn({},v&&{active:!0}),v&&{url:v})}}}})};function Wn(e,n){return Xn.apply(this,arguments)}function Xn(){return(Xn=G(K.mark(function e(n,t){var o,r,i,l,a,s;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,I();case 6:s=e.sent,k(i,s).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,u(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=tn((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",Fn(l,{res:p},n,{resolve:o,reject:r})}else S(i,s).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Fn(l,{res:p},n,{resolve:o,reject:r})});else Fn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Yn(e,n){return $n.apply(this,arguments)}function $n(){return($n=G(K.mark(function e(n,t){var o,r,i,l,a;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,I();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,j(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,Fn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Zn(e,n){return et.apply(this,arguments)}function et(){return(et=G(K.mark(function e(n,t){var o,r,i,l,a,s,c;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,I();case 3:l=e.sent,a=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,E.set(parseInt(s)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,T(c,l).then(function(e){var t,o,s,d=e.data,v=e.data.seasons;D(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.id);P(c,l),k(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,u(e.data),Fn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){O(e,a,i,videoId)})}).catch(function(e){O(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function nt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function tt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nt(Object(t),!0).forEach(function(n){Q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ot(){return{loadVideoInstantly:A,onTimeUpdate:z,getVideoDuration:J,onVideoEnded:W,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=G(K.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,w,S,I,j,T,P,E;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!R(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,g=null==e?void 0:e.videoId,h=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=g,w=null==e?void 0:e.token,!V(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",w),B().set(null==e?void 0:e.refreshToken),w&&!H(w)){n.next=16;break}return o({status:!1,msg:"".concat(w?"Token is expired !":"Missing Authorization Token"),response:{token:w}}),n.abrupt("return");case 16:qn=JSON.parse(atob(w.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=qn)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=qn)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=qn)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=qn)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,S=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,I=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(j=null==e?void 0:e.errors)&&(window.customErrors=j),window.customData=null==e?void 0:e.customData,ue(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),U.set(e.apiBaseUrl),null!=e&&e.skin&&!ae(e.skin)||(e.skin="VL_ONE"),n.next=33,je(e);case 33:I&&fe("https://www.googletagmanager.com/gtag/js?id=".concat(I)).then(function(){return F(I)}).catch(function(e){}),(T=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(S)))&&T.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(E={directPlaybackUrl:p,id:P="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?k(P,w).then(function(n){var r=(null==n?void 0:n.data)||{};Fn(S,{res:tt(tt({},r),E)},e,{resolve:t,reject:o})}).catch(function(e){O(e,S,o,P)}):Fn(S,{res:E},e,{resolve:t,reject:o})):b?zn(e,{resolve:t,reject:o}):h?Zn(e,{resolve:t,reject:o}):y?Yn(e,{resolve:t,reject:o}):Wn(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:oe,skip:f,getPlayer:se,play:x,pause:C,detectBrowser:e,rewind:p,loadVideo:s,seekToTimeStamp:X,isPlayerInitialised:R,load:L,authenticateLC:N,dispose:M,enableCaptions:te,disableCaptions:ee,getCaptions:Z,playSelectedResolution:re,getSource:a,setVolume:me,getVolume:ye,disableControls:y,setPlaybackSpeed:Y,getEntitlementData:_,adsQueuePointManager:_n,getSsaiEvents:In,playerEvents:$}}export{ot as V,vn as i,Un as s};
|
package/esm/skin-03df0bc9.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l,h as o,d as i,e,o as n,p as a,q as r}from"./features-174da21d.js";import{g as t}from"./player_instance-34118a5b.js";import{a as s,i as d,b as u}from"./index-17ea394a.js";import{R as v,f as p,e as m,k as c}from"./generic-7fb8e9c5.js";import"videojs-contrib-quality-menu";import{S as b,c as y,d as f}from"./icons-0676e9c7.js";import g from"video.js";import{i as h,s as j}from"./index-d26618e8.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./resolution-62be852a.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./skin-16f83185.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-51072eff.js";import"./util-9649ae40.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"ua-parser-js";import"./captions-b619441b.js";import"video.js/dist/video-js.min.css";function C(i,e){var n,a=t(i),r=(null==e||null===(n=e.res)||void 0===n?void 0:n.siteId)||"";a&&(a.on("loadeddata",function(){var o,n,u,p,m;a.qualityLevels()&&a.qualityLevels().length?function(l){var o=t(l);o&&(null==o||o.qualityMenu,o.qualityMenu({useResolutionLabels:!0}))}(i):l(i,"vl_one",b()),!(null!=e&&null!==(o=e.series)&&void 0!==o&&o.enable||null!==(n=window)&&void 0!==n&&null!==(u=n.app_data)&&void 0!==u&&null!==(p=u.appcmsMain)&&void 0!==p&&null!==(m=p.features)&&void 0!==m&&m.auto_play)||null!=e&&e.liveVideo||s(i,e),null!=e&&e.liveVideo||v()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===r||d(i)}),a.one("play",function(){var l,e,n,a;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(a=n.customData)||void 0===a?void 0:a.iframeOverlayUrl)}))}function w(l,o){t(l).addClass("skin_vlone"),C(l,o),function(l,o){var t,s,d,v,b,g,C,w,k,B,_,V,A,M,T=(null==o||null===(t=o.res)||void 0===t||null===(s=t.video)||void 0===s?void 0:s.isSSAIEnabled)||!1,q=p(null==o?void 0:o.res,l)||{};q.src;var R=(null==o?void 0:o.skin_settings)||{};null!=R&&R.skipBtn&&0==(null==o?void 0:o.liveVideo)&&0==(null==o?void 0:o.liveui)&&i(l,"VL_ONE",y());(null!=R&&R.rewindBtn&&0==(null==o?void 0:o.liveVideo)&&0==(null==o?void 0:o.liveui)||1==(null==o?void 0:o.liveui))&&e(l,"VL_ONE",f());(null==o||null===(d=o.relatedVideos)||void 0===d||null===(v=d.content)||void 0===v?void 0:v.length)>0&&n(l,null==o?void 0:o.relatedVideos);null!=o&&null!==(b=o.series)&&void 0!==b&&b.enable&&a(l,o);(null==o||null===(g=o.streams)||void 0===g?void 0:g.length)>1&&r(l,null==o?void 0:o.streams);if(u(l,o),h(l,o),"MEDIA_TAILOR"==(null===(C=window)||void 0===C||null===(w=C.app_data)||void 0===w||null===(k=w.appcmsMain)||void 0===k||null===(B=k.adsConfig)||void 0===B?void 0:B.vodAdSticherProvider)&&null!==(_=window)&&void 0!==_&&null!==(V=_.app_data)&&void 0!==V&&null!==(A=V.appcmsMain)&&void 0!==A&&null!==(M=A.adsConfig)&&void 0!==M&&M.vodAdClientSideTracking&&T){var L,O=null;if(null!=o&&null!==(L=o.series)&&void 0!==L&&L.enable){var x,I,P,S=null===(x=m())||void 0===x||null===(I=x.video)||void 0===I||null===(P=I.gist)||void 0===P?void 0:P.id,E=c(),D=(null==E?void 0:E.get(S))||{t:0,p:0},N=D.t;D.p<95&&(O=N)}else{var U=o.watchHistoryResumeTime;o.watchedPercentage<95&&(O=U)}j(l,O)}}(l,o),k(l,o)}var k=function(l,o){var i,e,n,a,r,s,d,u,v,p,m,c,b=t(l),y=(null==o?void 0:o.theme)||{},f=g.dom.$(".vjs-play-progress"),h=g.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(i=window)||void 0===i||null===(e=i.app_data)||void 0===e||null===(n=e.appcmsMain)||void 0===n||null===(a=n.brand)||void 0===a||null===(r=a.cta)||void 0===r||null===(s=r.primary)||void 0===s?void 0:s.backgroundColor)),f&&(f.style.background="".concat(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(v=u.appcmsMain)||void 0===v||null===(p=v.brand)||void 0===p||null===(m=p.cta)||void 0===m||null===(c=m.primary)||void 0===c?void 0:c.backgroundColor));var j=b.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&f&&(f.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&j&&(j.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&h&&(h.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};export{w as initialiseSkin};
|