@viewlift/player-backup 2.0.108-backup → 2.0.109-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 +34 -34
- package/cjs/{index-47d3ef6e.js → index-d80d0a07.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{skin-6deb3aa6.js → skin-cad6be68.js} +1 -1
- package/cjs/{skin-695fcf9d.js → skin-f345edef.js} +1 -1
- package/esm/bundle.css +34 -34
- package/esm/{index-25b5becd.js → index-327acdc3.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{skin-2b8dbcb9.js → skin-265b0043.js} +1 -1
- package/esm/{skin-acb304de.js → skin-494c04d4.js} +1 -1
- package/package.json +1 -1
package/cjs/bundle.css
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
4
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
7
5
|
height: 0.7em;
|
|
8
6
|
position: absolute;
|
|
@@ -187,6 +185,8 @@
|
|
|
187
185
|
}
|
|
188
186
|
|
|
189
187
|
|
|
188
|
+
|
|
189
|
+
|
|
190
190
|
/* CSS for videojs-dvr-seekbar */
|
|
191
191
|
|
|
192
192
|
.video-js.vjs-dvr-seekbar {
|
|
@@ -518,6 +518,38 @@
|
|
|
518
518
|
margin-left: 8px;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
+
/* a wrapper element that tracks the mouse vertically */
|
|
522
|
+
.vjs-thumbnail-holder {
|
|
523
|
+
position: absolute;
|
|
524
|
+
left: -1000px;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/* the thumbnail image itself */
|
|
528
|
+
.vjs-thumbnail {
|
|
529
|
+
position: absolute;
|
|
530
|
+
left: 0;
|
|
531
|
+
bottom: 1.3em;
|
|
532
|
+
opacity: 0;
|
|
533
|
+
transition: opacity .2s ease;
|
|
534
|
+
-webkit-transition: opacity .2s ease;
|
|
535
|
+
-moz-transition: opacity .2s ease;
|
|
536
|
+
-mz-transition: opacity .2s ease;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/* fade in the thumbnail when hovering over the progress bar */
|
|
540
|
+
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
541
|
+
.vjs-progress-control:hover .vjs-thumbnail,
|
|
542
|
+
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
543
|
+
.vjs-progress-control:active .vjs-thumbnail {
|
|
544
|
+
opacity: 1;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/* ... but hide the thumbnail when hovering directly over it */
|
|
548
|
+
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
549
|
+
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
550
|
+
opacity: 0;
|
|
551
|
+
}
|
|
552
|
+
|
|
521
553
|
.video-js.vjs-quality-menu {
|
|
522
554
|
display: block;
|
|
523
555
|
}
|
|
@@ -588,38 +620,6 @@
|
|
|
588
620
|
-webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
589
621
|
animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
590
622
|
}
|
|
591
|
-
/* a wrapper element that tracks the mouse vertically */
|
|
592
|
-
.vjs-thumbnail-holder {
|
|
593
|
-
position: absolute;
|
|
594
|
-
left: -1000px;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
/* the thumbnail image itself */
|
|
598
|
-
.vjs-thumbnail {
|
|
599
|
-
position: absolute;
|
|
600
|
-
left: 0;
|
|
601
|
-
bottom: 1.3em;
|
|
602
|
-
opacity: 0;
|
|
603
|
-
transition: opacity .2s ease;
|
|
604
|
-
-webkit-transition: opacity .2s ease;
|
|
605
|
-
-moz-transition: opacity .2s ease;
|
|
606
|
-
-mz-transition: opacity .2s ease;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
/* fade in the thumbnail when hovering over the progress bar */
|
|
610
|
-
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
611
|
-
.vjs-progress-control:hover .vjs-thumbnail,
|
|
612
|
-
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
613
|
-
.vjs-progress-control:active .vjs-thumbnail {
|
|
614
|
-
opacity: 1;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
/* ... but hide the thumbnail when hovering directly over it */
|
|
618
|
-
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
619
|
-
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
620
|
-
opacity: 0;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
623
|
.vjs-poster {
|
|
624
624
|
display: inline-block;
|
|
625
625
|
vertical-align: middle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-77c1578a.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-ef2cd61e.js"),l=require("./captions-07bd3069.js"),a=require("./renditions-c5618ab7.js"),u=require("./resolution-3b2ae0ba.js"),s=require("./skin-3544db58.js"),c=require("./browser-77c57718.js"),d=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof"),f=require("@babel/runtime/helpers/toConsumableArray"),p=require("@babel/runtime/helpers/slicedToArray"),m=function(e){return new Promise(function(n,t){if(y(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)}})},y=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,"'")})},h=function(e){var n=s.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},b=function(){var e=t(r.mark(function e(n){var t,i,l,a,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=s.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(o),e.finish(13);case 16:(u=o.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==c.detectBrowser()?null==i||i.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),w=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 k=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"),m("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)}}(),S=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)}}(),O=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)}}(),T=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)}}(),j=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){m("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:k,loadEMELibrary:S,loadMuxPlugin:O,loadDvrSeekbar:T,loadContribDash:P});function I(e){return E.apply(this,arguments)}function E(){return(E=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,k();case 3:t&&"Safari"==c.detectBrowser()&&Promise.resolve().then(function(){return j}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function D(e,n){return C.apply(this,arguments)}function C(){return(C=t(r.mark(function e(n,t){var o,i,l,a,u,s,d,v,f,p;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[d])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[d])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[d])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==c.detectBrowser()?S():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?P():S():"Safari"!=c.detectBrowser()&&f?P():null,b(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}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 A(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 L=new Set,R=null,N=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"]=q(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"]=B(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=U(n),d["c3.cm.genreList"]=V(n),d["c3.cm.genre"]=M(n),d["c3.cm.channel"]=_(n);var f=G(e.getCurrentSeries(),n);return d=A(A({},d),f)},M=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"},V=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"},_=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"},B=function(e){return(null==e?void 0:e.contentType)||"null"},U=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"},H=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)},q=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var F,G=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},Q=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=Q(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),L.clear(),R=f.currentSrc();var r=K(f.currentType()),i=e.getCurrentVideo(),l=N(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]=H(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",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(){L.has(f.currentSrc())||(L.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){L.has(f.currentSrc())&&L.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==L||L.clear(),p("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),z=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-695fcf9d.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-8dcda2d4.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-4fc1c0e5.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-1a596cda.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-33248e57.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&Promise.resolve().then(function(){return require("./skin-6deb3aa6.js")}).then(function(t){t.initialiseSkin(e,n)})};function J(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 X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Y=[],$=0,Z=null;function ee(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,y=Math.floor(t.currentTime()),g=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=ne(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 X(X({},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(X(X({content:c},t),{},{addedDate:a,updateDate:a})):l[d]=X(X(X({},l[d]),t),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,r.siteOwner):(h=X(X({videoId:F,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},Z&&{seriesId:Z}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then(function(e){}).catch(function(e){})),$=v+o}function ne(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function te(e,n,t){var r=ne(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 re=!1,oe=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)&&!re){var l=ie(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),re=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ie(e,n,t){if(Array.isArray(e))return e.map(function(e){return ie(e,n,t)});if(null!==e&&"object"===v(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]=ie(e[o],n,t)}),r}return e}function le(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 ae(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)?ae(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 ae(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 ue(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 se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ce=function(n,t,r,o){var i,a,u,d,f=o.res,p=o.sres,m=s.getPlayer(n),y=(null==f?void 0:f.contentType)||"video",h=(null==f?void 0:f[y].drmEnabled)||!1,b=(null==f||null===(i=f[y])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,w=(null==f||null===(u=f[y])||void 0===u||null===(d=u.liveDetails)||void 0===d?void 0:d.isDvrEnabled)||!1;e.setCurrentVideo(f),m&&(m.on("loadstart",function(){b?r.resolve({status:!0,msg:"Video Loaded",response:f}):r.resolve(se({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var r,o,i,a=l.getCaptions(n);if(null==a||a.map(function(e){return l.disableCaptions(n,e.id)}),w&&"Safari"===c.detectBrowser())try{var u;null==m||null===(u=m.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&g(n,sessionStorage.getItem("volume")||"100");var d=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 v,p,y=se(se({},t),f);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(Z=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Y=[],$=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());Y.includes($)||(e==$?(Y.push(e),ee(a,n,l)):e>$&&($=e+l))}}),a.one("ended",function(){ee(a,n,l,!0)}))}(n,y,null==d||null===(v=d.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var h,b,k,S,O,T,P=(null===(h=e.getCurrentVideo())||void 0===h?void 0:h.video)||(null==f?void 0:f.video),j=null==P?void 0:P.gist,I={env_key:null==t||null===(b=t.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(k=window)||void 0===k?void 0:k.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(O=P.streamingInfo)&&void 0!==O&&O.isLiveStream?"live":"video",viewer_user_id:null==t||null===(T=t.analytics)||void 0===T?void 0:T.userId};m.mux({debug:!1,data:I})}}),m.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];m.trigger("subtitlechanged",n)}),m.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,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)}}),m.tech_.on("retryplaylist",function(){b&&oe(f,n)}),m.on("error",function(){var t,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&b)?oe(f,n):(e.handleError(n,(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.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,p=v.p;f&&p<95&&setTimeout(function(){m.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(b){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==v(m.dash)){var t,r,o,i=null==m||null===(t=m.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=le(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=le(n);try{for(d.s();!(s=d.n()).done;){var f,p,y,g=s.value;("Chrome"==c.detectBrowser()||"Edge"==c.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(p=f.userAgent)&&void 0!==p&&p.includes("Macintosh")||!h))&&null!=g&&null!==(y=g.label)&&void 0!==y&&y.includes("5.1")?m.audioTracks().removeTrack(g):"main"==g.kind?g.enabled=!0:g.enabled=!1}}catch(e){d.e(e)}finally{d.f()}}}))};var de,ve=(de=!0,{enable:function(){de=!0},disable:function(){de=!1},get enabled(){return de}});function fe(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 pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function me(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 ye(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)?ye(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 ye(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 ge,he,be=(ge="",{set:function(e){e&&(ge=e)},get:function(){return ge}}),we=(he=null,{set:function(e){he=e},get position(){return he}});function ke(e,n){return Se.apply(this,arguments)}function Se(){return(Se=t(r.mark(function n(t,o){var i,l,a,u,c,d,v,f,m,y,g,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=Oe(a),c=p(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=p(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:pe({},d)})});case 11:return f=n.sent,n.next=14,f.json();case 14:return m=n.sent,y="https://"+new URL(a).hostname,g=m.trackingUrl,h=m.manifestUrl,b=y+g,w=y+h,be.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]])}))).apply(this,arguments)}function Oe(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var r,o=me(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=p(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 f=p(v[d],2),m=f[0],y=f[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=y;else c[m]=y}return[s,c]}var Te,Pe=(Te=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Te=Array.isArray(e)?f(e):Te},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Te),f(Te)}});function je(){return je=t(r.mark(function n(o,i){var l,a,u,d,v,p,m,y,g,h,b,w,k,S,O,T,P;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:P=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=me(t);try{var d=function(){var t,o,s,c=u.value,d=c.eventType,v=c.beaconUrls,f=c.startTimeInSeconds,p=c.startTime,m=c.durationInSeconds,y=f||0,g=v,h=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(s=o.ads)||void 0===s?void 0:s.adEventHandler)||null,b="".concat(y,"_").concat(d),w=O.get("pod-".concat(i))||[];if(console.warn(e,y,"map:",d,"condition1:",e>=y,"map:",O),e>=y&&!w.includes(b)){w.push(b),O.set("pod-".concat(i),w);try{T(d,n,g,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,d,n)}if("breakEnd"==d){var k=we.position;we.set(null),setTimeout(function(){null!=k&&(a.currentTime(k),l())},500)}if("function"==typeof h)try{var S;h({adsData:{eventType:d,startTimeInSeconds:f,startTime:p,durationInSeconds:m,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[r],adIndex:r}})}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()}}},T=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"))},we.set(i),v=be.get(),(p=s.getPlayer(o)).one("loadeddata",function(){v&&k(v)}),m=new Map,y=new Map,g=-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===(u=p.controlBar)||void 0===u?void 0:u.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,u,d,v,p,k,O,T,j,I,E,D,C,x,A,L;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&&j()},E=function(e){},I=function(){var e,n=k.currentTime(),t=null,r=me(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))},j=function(){var e,n=k.currentTime(),t=null,r=me(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),y.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 u=n.sent,n.next=10,u.json();case 10:d=n.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",d),v=d.avails,p=[],k=s.getPlayer(o),O=k.controlBar.progressControl,T=O.seekBar.el(),v.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),I()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),Pe.setQueuePoints(p),window.adsQueueList=p),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",T.appendChild(i)}}),k.on("timeupdate",s.throttle(function(){var e=k.currentTime();if(e!==g){g=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&&!y.has(o)&&!k.seeking()&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&"Safari"==c.detectBrowser()&&0!=o&&(console.log("jfc"),k.currentTime(0),setTimeout(function(){k.currentTime(o+.4)},50),y.set(o,!0)),e>=o&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&m.set(o,!0),ve.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,d=0,v=0;v<l.length;v++){var g,T=null==l||null===(g=l[v])||void 0===g?void 0:g.durationInSeconds;if(u<s+T){d=v;break}s+=T}var j=l[d],E=u-s,D=Math.max(0,(null==j?void 0:j.durationInSeconds)-E),x=Math.round(D);C.style.display="block",L.textContent="".concat(d+1," of ").concat(l.length," • ").concat(S(x));var A=[];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)});A.push.apply(A,f(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&A.push(null==t?void 0:t.podSlotImpressionBeacon),P(e,t,A,d,r,I),"break"}y.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"),ve.enable())}},1e3)),null===(l=document)||void 0===l||l.addEventListener("keydown",function(n){ve.enabled&&"ArrowRight"==n.key&&(j(),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",(x=document.createElement("div")).className="sponsored-adbox",(A=document.createElement("div")).className="sponsored-text",A.textContent="Sponsored Ad",x.append(A),(L=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",C.append(x),C.append(L),k.el().appendChild(C);case 40: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)})),je.apply(this,arguments)}function Ie(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 Ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var De=function(i,a,u,d){var v,f,p,m,y,g,h,b,k,S,O,T,P,j,I,E,C,x,A,L,R,N,M,V,_,B,U,H,q,F,G,Q,K,J,X,Y=a.res,$=void 0===Y?null:Y,Z=a.sres,ee=void 0===Z?null:Z,ne=null!=u&&u.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(v=$)||void 0===v?void 0:v.contentType)||"video",re=s.impolicy16x9(null===(f=$)||void 0===f||null===(p=f[te])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.videoImageUrl)||s.impolicy16x9(null===(y=$)||void 0===y||null===(g=y[te])||void 0===g||null===(h=g.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),oe=(null===(k=$)||void 0===k||null===(S=k[te])||void 0===S||null===(O=S.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,ie=(null===(T=$)||void 0===T||null===(P=T[te])||void 0===P||null===(j=P.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,le=(null===(I=$)||void 0===I||null===(E=I.ads)||void 0===E||null===(C=E.preRoll)||void 0===C||null===(x=C.adTags)||void 0===x||null===(A=x.web)||void 0===A?void 0:A.active)&&(null===(L=$)||void 0===L||null===(R=L.ads)||void 0===R||null===(N=R.preRoll)||void 0===N||null===(M=N.adTags)||void 0===M||null===(V=M.web)||void 0===V?void 0:V.url);$=Ee(Ee({},$),{},{audioAssetSource:null==u?void 0:u.audioAssetSource});var ae="MEDIA_TAILOR"==(null===(_=window)||void 0===_||null===(B=_.app_data)||void 0===B||null===(U=B.appcmsMain)||void 0===U||null===(H=U.adsConfig)||void 0===H?void 0:H.vodAdSticherProvider)||!1,ue=(null==u?void 0:u.latency)||6,se=(X={enableSmoothSeeking:!0,controls:0!=(null==u?void 0:u.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==u?void 0:u.muted)||!1,autoplay:(null==u?void 0:u.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==u.skin,liveui:oe},n(X,"autoplay",null==u?void 0:u.autoplay),n(X,"normalizeAutoplay",(null==u?void 0:u.autoplay)&&!le),n(X,"loop",(null==u?void 0:u.loop)||!1),n(X,"audioPosterMode",null==u?void 0:u.audioPosterMode),n(X,"html5",Ee(Ee({dash:Ee(Ee(Ee({},!o.browser.IS_SAFARI&&{useTTML:!0}),(null==u?void 0:u.debugConfig)&&(null==u||null===(q=u.debugConfig)||void 0===q?void 0:q.enable)&&{debug:!0,logLevel:null!=u&&null!==(F=u.debugConfig)&&void 0!==F&&F.logLevel?null==u||null===(G=u.debugConfig)||void 0===G?void 0:G.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ue},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Ee(Ee({liveRangeSafeTimeDelta:ue,useDevicePixelRatio:!0,experimentalLLHLS:(null==u?void 0:u.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==u||null===(Q=u.customData)||void 0===Q?void 0:Q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==c.detectBrowser()},0==(null==u||null===(K=u.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==u||null===(J=u.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(X,"poster",re),n(X,"techOrder",ne),n(X,"chromecast",{requestCustomDataFn:function(e){var n=s.getPlayer(i),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return 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,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,T=(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=T;var P=(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=P}var j=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=j;var I=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=I;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}($,e,t)},modifyLoadRequestFn:function(e){var n,t,r,o,l,a=s.getPlayer(i),u=(null==a?void 0:a.currentSource())||{};!(null===(n=$)||void 0===n||null===(t=n[te])||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}}),X);if(!o.getPlayers()[i]){o.log.level("debug");var de=o(i,se,function(){var n=t(r.mark(function n(){var t,a,s,c,v,f,p,m,y,g,h,b,k,S,O,T,P,j,I,E;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(de),console.log(o.VERSION),console.log(o.getPlugins()),n.next=5,D(u,$);case 5:if(b=null===(t=$)||void 0===t||null===(a=t[te])||void 0===a||null===(s=a.liveDetails)||void 0===s?void 0:s.startOverTime,ie&&d.resolve(Ee({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:$}:{response:$})),e.inititateBeacon(i,null==u?void 0:u.analyticsCb),W(i,u),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),oe&&w(i,b),!le||null!=u&&null!==(c=u.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(i,le,$),k=e.getSource($,i),console.log(k),null!=u&&u.nearestClusterUrl&&(k=e.getUpdatedClusterSource(k,u.nearestClusterUrl)),!ae){n.next=19;break}return n.next=18,ke(i,$);case 18:k=n.sent;case 19:k?e.loadVideo(i,k):(d.reject({status:!1,msg:"Incompatible / Missing Source",response:$}),e.handleError(i,"Incompatible / Missing Source")),((null===(v=$)||void 0===v||null===(f=v[te])||void 0===f||null===(p=f.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(y=$)||void 0===y||null===(g=y[te])||void 0===g||null===(h=g.closedCaptions)||void 0===h?void 0:h.length)>0)&&(E=(null===(O=$)||void 0===O||null===(T=O[te])||void 0===T||null===(P=T.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null===(j=$)||void 0===j||null===(I=j[te])||void 0===I?void 0:I.closedCaptions),S=E.filter(function(e){return"VTT"===e.format}),l.addCaptions(i,S)),null!=u&&u.disableControls?e.disableControls(i):z(i,Ee(Ee(Ee({},u),se),{},{liveVideo:ie,isDvrEnabled:oe,res:$,sres:ee})),ce(i,Ee(Ee(Ee({},u),se),{},{liveVideo:ie}),d,{res:$,sres:ee});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Ce={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function xe(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 Ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Le,Re=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=Ne(e);De(o,{res:i},e,{resolve:t,reject:r})},Ne=function(n){var t,r,o=null==n?void 0:n.streamingInfo,i=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,l=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,a=null==n?void 0:n.token,u=e.getDecodedToken(a),s=null==u?void 0:u.site;return Ae(Ae({id:null==Ce?void 0:Ce[s]},!l&&{directPlaybackUrl:null==i?void 0:i.url}),{},{video:{drmEnabled:l,streamingInfo:{videoAssets:{widevine:null==i?void 0:i.widevine,fairPlay:null==i?void 0:i.fairPlay,playReady:null==i?void 0:i.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Me(e,n){return Ve.apply(this,arguments)}function Ve(){return(Ve=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,y,g,h=te((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===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,t.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",De(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(){De(u,{res:p},t,{resolve:i,reject:l})});else De(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 _e(e,n){return Be.apply(this,arguments)}function Be(){return(Be=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,De(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 Ue(e,n){return He.apply(this,arguments)}function He(){return(He=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),De(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 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}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,u,c,v,f,p,y,g,h,b,w,k,S,O,T,P,j,E,D,C,x,A;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,T=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,P=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",P),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),P&&!e.isTokenExpired(P)){t.next=16;break}return i({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}}),t.abrupt("return");case 16:Le=JSON.parse(atob(P.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(u=Le)||void 0===u||!u.anonymousId),n.siteOwner=(null===(c=Le)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=Le)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=Le)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,j=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable?null:null==n?void 0:n.chromecastReceiverId,E=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(D=null==n?void 0:n.errors)&&(window.customErrors=D),window.customData=null==n?void 0:n.customData,d.setLocalisation(null==n||null===(g=n.customData)||void 0===g?void 0:g.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!s.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,I(n);case 33:E&&m("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?(A={directPlaybackUrl:b,id:x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(x,P).then(function(e){var t=(null==e?void 0:e.data)||{};De(j,{res:Fe(Fe({},t),A)},n,{resolve:o,reject:i})}).catch(function(n){e.initiateErrorHandling(n,j,i,x)}):De(j,{res:A},n,{resolve:o,reject:i})):T?Re(n,{resolve:o,reject:i}):O?Ue(n,{resolve:o,reject:i}):k?_e(n,{resolve:o,reject:i}):Me(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:c.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:u.playSelectedResolution,getSource:e.getSource,setVolume:g,getVolume:h,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,adsQueuePointManager:Pe}},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(ve.enabled&&"input"!=r.target.localName){var y=r.key,g=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(y)&&(r.preventDefault(),null==u||u.focus()),y){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":g&&!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;g||e.skip(n,10)}}},!0)},exports.setupAdvertisementMarkers=function(e,n){return je.apply(this,arguments)};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-77c1578a.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-ef2cd61e.js"),l=require("./captions-07bd3069.js"),a=require("./renditions-c5618ab7.js"),u=require("./resolution-3b2ae0ba.js"),s=require("./skin-3544db58.js"),c=require("./browser-77c57718.js"),d=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof"),f=require("@babel/runtime/helpers/toConsumableArray"),p=require("@babel/runtime/helpers/slicedToArray"),m=function(e){return new Promise(function(n,t){if(y(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)}})},y=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,"'")})},h=function(e){var n=s.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},b=function(){var e=t(r.mark(function e(n){var t,i,l,a,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=s.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(o),e.finish(13);case 16:(u=o.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==c.detectBrowser()?null==i||i.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),w=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 k=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"),m("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)}}(),S=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)}}(),O=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)}}(),T=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)}}(),j=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){m("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:k,loadEMELibrary:S,loadMuxPlugin:O,loadDvrSeekbar:T,loadContribDash:P});function I(e){return E.apply(this,arguments)}function E(){return(E=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,k();case 3:t&&"Safari"==c.detectBrowser()&&Promise.resolve().then(function(){return j}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function D(e,n){return C.apply(this,arguments)}function C(){return(C=t(r.mark(function e(n,t){var o,i,l,a,u,s,d,v,f,p;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[d])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[d])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[d])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==c.detectBrowser()?S():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?P():S():"Safari"!=c.detectBrowser()&&f?P():null,b(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}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 A(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 L=new Set,R=null,N=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"]=q(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"]=B(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=U(n),d["c3.cm.genreList"]=V(n),d["c3.cm.genre"]=M(n),d["c3.cm.channel"]=_(n);var f=G(e.getCurrentSeries(),n);return d=A(A({},d),f)},M=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"},V=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"},_=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"},B=function(e){return(null==e?void 0:e.contentType)||"null"},U=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"},H=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)},q=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var F,G=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},Q=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=Q(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),L.clear(),R=f.currentSrc();var r=K(f.currentType()),i=e.getCurrentVideo(),l=N(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]=H(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",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(){L.has(f.currentSrc())||(L.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){L.has(f.currentSrc())&&L.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==L||L.clear(),p("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),z=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-f345edef.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-8dcda2d4.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-4fc1c0e5.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-1a596cda.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-33248e57.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&Promise.resolve().then(function(){return require("./skin-cad6be68.js")}).then(function(t){t.initialiseSkin(e,n)})};function J(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 X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Y=[],$=0,Z=null;function ee(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,y=Math.floor(t.currentTime()),g=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=ne(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 X(X({},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(X(X({content:c},t),{},{addedDate:a,updateDate:a})):l[d]=X(X(X({},l[d]),t),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,r.siteOwner):(h=X(X({videoId:F,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},Z&&{seriesId:Z}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then(function(e){}).catch(function(e){})),$=v+o}function ne(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function te(e,n,t){var r=ne(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 re=!1,oe=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)&&!re){var l=ie(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),re=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ie(e,n,t){if(Array.isArray(e))return e.map(function(e){return ie(e,n,t)});if(null!==e&&"object"===v(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]=ie(e[o],n,t)}),r}return e}function le(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 ae(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)?ae(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 ae(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 ue(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 se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ce=function(n,t,r,o){var i,a,u,d,f=o.res,p=o.sres,m=s.getPlayer(n),y=(null==f?void 0:f.contentType)||"video",h=(null==f?void 0:f[y].drmEnabled)||!1,b=(null==f||null===(i=f[y])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,w=(null==f||null===(u=f[y])||void 0===u||null===(d=u.liveDetails)||void 0===d?void 0:d.isDvrEnabled)||!1;e.setCurrentVideo(f),m&&(m.on("loadstart",function(){b?r.resolve({status:!0,msg:"Video Loaded",response:f}):r.resolve(se({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var r,o,i,a=l.getCaptions(n);if(null==a||a.map(function(e){return l.disableCaptions(n,e.id)}),w&&"Safari"===c.detectBrowser())try{var u;null==m||null===(u=m.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&g(n,sessionStorage.getItem("volume")||"100");var d=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 v,p,y=se(se({},t),f);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(Z=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Y=[],$=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());Y.includes($)||(e==$?(Y.push(e),ee(a,n,l)):e>$&&($=e+l))}}),a.one("ended",function(){ee(a,n,l,!0)}))}(n,y,null==d||null===(v=d.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var h,b,k,S,O,T,P=(null===(h=e.getCurrentVideo())||void 0===h?void 0:h.video)||(null==f?void 0:f.video),j=null==P?void 0:P.gist,I={env_key:null==t||null===(b=t.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(k=window)||void 0===k?void 0:k.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(O=P.streamingInfo)&&void 0!==O&&O.isLiveStream?"live":"video",viewer_user_id:null==t||null===(T=t.analytics)||void 0===T?void 0:T.userId};m.mux({debug:!1,data:I})}}),m.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];m.trigger("subtitlechanged",n)}),m.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,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)}}),m.tech_.on("retryplaylist",function(){b&&oe(f,n)}),m.on("error",function(){var t,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&b)?oe(f,n):(e.handleError(n,(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.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,p=v.p;f&&p<95&&setTimeout(function(){m.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(b){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==v(m.dash)){var t,r,o,i=null==m||null===(t=m.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=le(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=le(n);try{for(d.s();!(s=d.n()).done;){var f,p,y,g=s.value;("Chrome"==c.detectBrowser()||"Edge"==c.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(p=f.userAgent)&&void 0!==p&&p.includes("Macintosh")||!h))&&null!=g&&null!==(y=g.label)&&void 0!==y&&y.includes("5.1")?m.audioTracks().removeTrack(g):"main"==g.kind?g.enabled=!0:g.enabled=!1}}catch(e){d.e(e)}finally{d.f()}}}))};var de,ve=(de=!0,{enable:function(){de=!0},disable:function(){de=!1},get enabled(){return de}});function fe(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 pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function me(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 ye(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)?ye(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 ye(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 ge,he,be=(ge="",{set:function(e){e&&(ge=e)},get:function(){return ge}}),we=(he=null,{set:function(e){he=e},get position(){return he}});function ke(e,n){return Se.apply(this,arguments)}function Se(){return(Se=t(r.mark(function n(t,o){var i,l,a,u,c,d,v,f,m,y,g,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=Oe(a),c=p(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=p(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:pe({},d)})});case 11:return f=n.sent,n.next=14,f.json();case 14:return m=n.sent,y="https://"+new URL(a).hostname,g=m.trackingUrl,h=m.manifestUrl,b=y+g,w=y+h,be.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]])}))).apply(this,arguments)}function Oe(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var r,o=me(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=p(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 f=p(v[d],2),m=f[0],y=f[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=y;else c[m]=y}return[s,c]}var Te,Pe=(Te=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Te=Array.isArray(e)?f(e):Te},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Te),f(Te)}});function je(){return je=t(r.mark(function n(o,i){var l,a,u,d,v,p,m,y,g,h,b,w,k,S,O,T,P;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:P=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=me(t);try{var d=function(){var t,o,s,c=u.value,d=c.eventType,v=c.beaconUrls,f=c.startTimeInSeconds,p=c.startTime,m=c.durationInSeconds,y=f||0,g=v,h=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(s=o.ads)||void 0===s?void 0:s.adEventHandler)||null,b="".concat(y,"_").concat(d),w=O.get("pod-".concat(i))||[];if(console.warn(e,y,"map:",d,"condition1:",e>=y,"map:",O),e>=y&&!w.includes(b)){w.push(b),O.set("pod-".concat(i),w);try{T(d,n,g,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,d,n)}if("breakEnd"==d){var k=we.position;we.set(null),setTimeout(function(){null!=k&&(a.currentTime(k),l())},500)}if("function"==typeof h)try{var S;h({adsData:{eventType:d,startTimeInSeconds:f,startTime:p,durationInSeconds:m,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[r],adIndex:r}})}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()}}},T=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"))},we.set(i),v=be.get(),(p=s.getPlayer(o)).one("loadeddata",function(){v&&k(v)}),m=new Map,y=new Map,g=-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===(u=p.controlBar)||void 0===u?void 0:u.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,u,d,v,p,k,O,T,j,I,E,D,C,x,A,L;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&&j()},E=function(e){},I=function(){var e,n=k.currentTime(),t=null,r=me(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))},j=function(){var e,n=k.currentTime(),t=null,r=me(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),y.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 u=n.sent,n.next=10,u.json();case 10:d=n.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",d),v=d.avails,p=[],k=s.getPlayer(o),O=k.controlBar.progressControl,T=O.seekBar.el(),v.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),I()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),Pe.setQueuePoints(p),window.adsQueueList=p),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",T.appendChild(i)}}),k.on("timeupdate",s.throttle(function(){var e=k.currentTime();if(e!==g){g=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&&!y.has(o)&&!k.seeking()&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&"Safari"==c.detectBrowser()&&0!=o&&(console.log("jfc"),k.currentTime(0),setTimeout(function(){k.currentTime(o+.4)},50),y.set(o,!0)),e>=o&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&m.set(o,!0),ve.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,d=0,v=0;v<l.length;v++){var g,T=null==l||null===(g=l[v])||void 0===g?void 0:g.durationInSeconds;if(u<s+T){d=v;break}s+=T}l[d];var j=Math.max(0,i-u),E=Math.round(j);C.style.display="block",L.textContent="".concat(d+1," of ").concat(l.length," • ").concat(S(E));var D=[];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)});D.push.apply(D,f(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&D.push(null==t?void 0:t.podSlotImpressionBeacon),P(e,t,D,d,r,I),"break"}y.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"),ve.enable())}},1e3)),null===(l=document)||void 0===l||l.addEventListener("keydown",function(n){ve.enabled&&"ArrowRight"==n.key&&(j(),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",(x=document.createElement("div")).className="sponsored-adbox",(A=document.createElement("div")).className="sponsored-text",A.textContent="Sponsored Ad",x.append(A),(L=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",C.append(x),C.append(L),k.el().appendChild(C);case 40: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)})),je.apply(this,arguments)}function Ie(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 Ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var De=function(i,a,u,d){var v,f,p,m,y,g,h,b,k,S,O,T,P,j,I,E,C,x,A,L,R,N,M,V,_,B,U,H,q,F,G,Q,K,J,X,Y=a.res,$=void 0===Y?null:Y,Z=a.sres,ee=void 0===Z?null:Z,ne=null!=u&&u.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(v=$)||void 0===v?void 0:v.contentType)||"video",re=s.impolicy16x9(null===(f=$)||void 0===f||null===(p=f[te])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.videoImageUrl)||s.impolicy16x9(null===(y=$)||void 0===y||null===(g=y[te])||void 0===g||null===(h=g.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),oe=(null===(k=$)||void 0===k||null===(S=k[te])||void 0===S||null===(O=S.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,ie=(null===(T=$)||void 0===T||null===(P=T[te])||void 0===P||null===(j=P.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,le=(null===(I=$)||void 0===I||null===(E=I.ads)||void 0===E||null===(C=E.preRoll)||void 0===C||null===(x=C.adTags)||void 0===x||null===(A=x.web)||void 0===A?void 0:A.active)&&(null===(L=$)||void 0===L||null===(R=L.ads)||void 0===R||null===(N=R.preRoll)||void 0===N||null===(M=N.adTags)||void 0===M||null===(V=M.web)||void 0===V?void 0:V.url);$=Ee(Ee({},$),{},{audioAssetSource:null==u?void 0:u.audioAssetSource});var ae="MEDIA_TAILOR"==(null===(_=window)||void 0===_||null===(B=_.app_data)||void 0===B||null===(U=B.appcmsMain)||void 0===U||null===(H=U.adsConfig)||void 0===H?void 0:H.vodAdSticherProvider)||!1,ue=(null==u?void 0:u.latency)||6,se=(X={enableSmoothSeeking:!0,controls:0!=(null==u?void 0:u.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==u?void 0:u.muted)||!1,autoplay:(null==u?void 0:u.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==u.skin,liveui:oe},n(X,"autoplay",null==u?void 0:u.autoplay),n(X,"normalizeAutoplay",(null==u?void 0:u.autoplay)&&!le),n(X,"loop",(null==u?void 0:u.loop)||!1),n(X,"audioPosterMode",null==u?void 0:u.audioPosterMode),n(X,"html5",Ee(Ee({dash:Ee(Ee(Ee({},!o.browser.IS_SAFARI&&{useTTML:!0}),(null==u?void 0:u.debugConfig)&&(null==u||null===(q=u.debugConfig)||void 0===q?void 0:q.enable)&&{debug:!0,logLevel:null!=u&&null!==(F=u.debugConfig)&&void 0!==F&&F.logLevel?null==u||null===(G=u.debugConfig)||void 0===G?void 0:G.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ue},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Ee(Ee({liveRangeSafeTimeDelta:ue,useDevicePixelRatio:!0,experimentalLLHLS:(null==u?void 0:u.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==u||null===(Q=u.customData)||void 0===Q?void 0:Q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==c.detectBrowser()},0==(null==u||null===(K=u.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==u||null===(J=u.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(X,"poster",re),n(X,"techOrder",ne),n(X,"chromecast",{requestCustomDataFn:function(e){var n=s.getPlayer(i),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return 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,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,T=(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=T;var P=(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=P}var j=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=j;var I=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=I;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}($,e,t)},modifyLoadRequestFn:function(e){var n,t,r,o,l,a=s.getPlayer(i),u=(null==a?void 0:a.currentSource())||{};!(null===(n=$)||void 0===n||null===(t=n[te])||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}}),X);if(!o.getPlayers()[i]){o.log.level("debug");var de=o(i,se,function(){var n=t(r.mark(function n(){var t,a,s,c,v,f,p,m,y,g,h,b,k,S,O,T,P,j,I,E;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(de),console.log(o.VERSION),console.log(o.getPlugins()),n.next=5,D(u,$);case 5:if(b=null===(t=$)||void 0===t||null===(a=t[te])||void 0===a||null===(s=a.liveDetails)||void 0===s?void 0:s.startOverTime,ie&&d.resolve(Ee({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:$}:{response:$})),e.inititateBeacon(i,null==u?void 0:u.analyticsCb),W(i,u),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),oe&&w(i,b),!le||null!=u&&null!==(c=u.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(i,le,$),k=e.getSource($,i),console.log(k),null!=u&&u.nearestClusterUrl&&(k=e.getUpdatedClusterSource(k,u.nearestClusterUrl)),!ae){n.next=19;break}return n.next=18,ke(i,$);case 18:k=n.sent;case 19:k?e.loadVideo(i,k):(d.reject({status:!1,msg:"Incompatible / Missing Source",response:$}),e.handleError(i,"Incompatible / Missing Source")),((null===(v=$)||void 0===v||null===(f=v[te])||void 0===f||null===(p=f.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(y=$)||void 0===y||null===(g=y[te])||void 0===g||null===(h=g.closedCaptions)||void 0===h?void 0:h.length)>0)&&(E=(null===(O=$)||void 0===O||null===(T=O[te])||void 0===T||null===(P=T.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null===(j=$)||void 0===j||null===(I=j[te])||void 0===I?void 0:I.closedCaptions),S=E.filter(function(e){return"VTT"===e.format}),l.addCaptions(i,S)),null!=u&&u.disableControls?e.disableControls(i):z(i,Ee(Ee(Ee({},u),se),{},{liveVideo:ie,isDvrEnabled:oe,res:$,sres:ee})),ce(i,Ee(Ee(Ee({},u),se),{},{liveVideo:ie}),d,{res:$,sres:ee});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Ce={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function xe(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 Ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Le,Re=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=Ne(e);De(o,{res:i},e,{resolve:t,reject:r})},Ne=function(n){var t,r,o=null==n?void 0:n.streamingInfo,i=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,l=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,a=null==n?void 0:n.token,u=e.getDecodedToken(a),s=null==u?void 0:u.site;return Ae(Ae({id:null==Ce?void 0:Ce[s]},!l&&{directPlaybackUrl:null==i?void 0:i.url}),{},{video:{drmEnabled:l,streamingInfo:{videoAssets:{widevine:null==i?void 0:i.widevine,fairPlay:null==i?void 0:i.fairPlay,playReady:null==i?void 0:i.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Me(e,n){return Ve.apply(this,arguments)}function Ve(){return(Ve=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,y,g,h=te((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===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,t.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",De(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(){De(u,{res:p},t,{resolve:i,reject:l})});else De(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 _e(e,n){return Be.apply(this,arguments)}function Be(){return(Be=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,De(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 Ue(e,n){return He.apply(this,arguments)}function He(){return(He=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),De(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 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}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,u,c,v,f,p,y,g,h,b,w,k,S,O,T,P,j,E,D,C,x,A;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,T=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,P=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",P),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),P&&!e.isTokenExpired(P)){t.next=16;break}return i({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}}),t.abrupt("return");case 16:Le=JSON.parse(atob(P.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(u=Le)||void 0===u||!u.anonymousId),n.siteOwner=(null===(c=Le)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=Le)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=Le)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,j=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable?null:null==n?void 0:n.chromecastReceiverId,E=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(D=null==n?void 0:n.errors)&&(window.customErrors=D),window.customData=null==n?void 0:n.customData,d.setLocalisation(null==n||null===(g=n.customData)||void 0===g?void 0:g.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!s.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,I(n);case 33:E&&m("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?(A={directPlaybackUrl:b,id:x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(x,P).then(function(e){var t=(null==e?void 0:e.data)||{};De(j,{res:Fe(Fe({},t),A)},n,{resolve:o,reject:i})}).catch(function(n){e.initiateErrorHandling(n,j,i,x)}):De(j,{res:A},n,{resolve:o,reject:i})):T?Re(n,{resolve:o,reject:i}):O?Ue(n,{resolve:o,reject:i}):k?_e(n,{resolve:o,reject:i}):Me(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:c.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:u.playSelectedResolution,getSource:e.getSource,setVolume:g,getVolume:h,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,adsQueuePointManager:Pe}},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(ve.enabled&&"input"!=r.target.localName){var y=r.key,g=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(y)&&(r.preventDefault(),null==u||u.focus()),y){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":g&&!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;g||e.skip(n,10)}}},!0)},exports.setupAdvertisementMarkers=function(e,n){return je.apply(this,arguments)};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css"),require("./generic-77c1578a.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js");var e=require("./index-
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css"),require("./generic-77c1578a.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js");var e=require("./index-d80d0a07.js");require("./util-ef2cd61e.js"),require("./captions-07bd3069.js"),require("./renditions-c5618ab7.js"),require("./resolution-3b2ae0ba.js"),require("./skin-3544db58.js"),require("./browser-77c57718.js"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),module.exports=e.VLPlayerCore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-c5dfe323.js"),l=require("./skin-3544db58.js"),r=require("./index-b0ccbe15.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/toConsumableArray"),require("videojs-contrib-quality-menu");var i=require("video.js"),o=require("./index-
|
|
1
|
+
"use strict";var e=require("./features-c5dfe323.js"),l=require("./skin-3544db58.js"),r=require("./index-b0ccbe15.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/toConsumableArray"),require("videojs-contrib-quality-menu");var i=require("video.js"),o=require("./index-d80d0a07.js"),n=require("./generic-77c1578a.js");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("./renditions-c5618ab7.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-948fb789.js"),require("./util-ef2cd61e.js"),require("./icons-0ea2e662.js"),require("@babel/runtime/helpers/typeof"),require("video.js/dist/video-js.min.css"),require("./captions-07bd3069.js"),require("./resolution-3b2ae0ba.js"),require("@babel/runtime/helpers/assertThisInitialized"),require("./browser-77c57718.js"),require("axios"),require("js-cookie"),require("ua-parser-js");function a(i,o){var n=l.getPlayer(i);n&&(n.on("loadeddata",function(){var e,n,a,u,d;!function(e){var r=l.getPlayer(e);r&&(null==r||r.qualityMenu,r.qualityMenu({useResolutionLabels:!0}))}(i),!(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable||null!==(n=window)&&void 0!==n&&null!==(a=n.app_data)&&void 0!==a&&null!==(u=a.appcmsMain)&&void 0!==u&&null!==(d=u.features)&&void 0!==d&&d.auto_play)||null!=o&&o.liveVideo||r.addNextEpPreview(i,o)}),n.one("play",function(){var l,r,o,n;null!==(l=window)&&void 0!==l&&null!==(r=l.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(i,null===(o=window)||void 0===o||null===(n=o.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}var u=function(e,r){var o,n,a,u,d,t,s,v,p,c,b,y,m=l.getPlayer(e),q=(null==r?void 0:r.theme)||{},g=i.dom.$(".vjs-play-progress"),h=i.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(o=window)||void 0===o||null===(n=o.app_data)||void 0===n||null===(a=n.appcmsMain)||void 0===a||null===(u=a.brand)||void 0===u||null===(d=u.cta)||void 0===d||null===(t=d.primary)||void 0===t?void 0:t.backgroundColor)),g&&(g.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=m.getChild("BigPlayButton")||null;(null==q?void 0:q.progressBarColor)&&g&&(g.style.background=q.progressBarColor),(null==q?void 0:q.playButtonBackgroundColor)&&j&&(j.el().style.background=q.playButtonBackgroundColor),(null==q?void 0:q.playButtonColor)&&h&&(h.style.color=q.playButtonColor),(null==q?void 0:q.playButtonType)&&("square"==(null==q?void 0:q.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(i,d){l.getPlayer(i).addClass("skin_vlone"),a(i,d),function(l,i){var a,u,d,t,s,v,p,c,b,y,m,q,g=n.getSource(null==i?void 0:i.res,l)||{};g.src,(null==i||null===(a=i.relatedVideos)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&e.addVideoSelector(l,null==i?void 0:i.relatedVideos);null!=i&&null!==(d=i.series)&&void 0!==d&&d.enable&&e.addSeriesSelectorV2(l,i);(null==i||null===(t=i.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector(l,null==i?void 0:i.streams);if(r.addTVProviderImage(l,i),o.initialiseKeyboardEvents(l,i),"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(c=p.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(b=window)&&void 0!==b&&null!==(y=b.app_data)&&void 0!==y&&null!==(m=y.appcmsMain)&&void 0!==m&&null!==(q=m.adsConfig)&&void 0!==q&&q.vodAdClientSideTracking){var h,j=null;if(null!=i&&null!==(h=i.series)&&void 0!==h&&h.enable){var f,C,w,k=null===(f=n.getCurrentVideo())||void 0===f||null===(C=f.video)||void 0===C||null===(w=C.gist)||void 0===w?void 0:w.id,B=n.getSeriesWatchMap(),M=(null==B?void 0:B.get(k))||{t:0,p:0},P=M.t;M.p<95&&(j=P)}else{var S=i.watchHistoryResumeTime;i.watchedPercentage<95&&(j=S)}o.setupAdvertisementMarkers(l,j)}}(i,d),u(i,d)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-c5dfe323.js"),r=require("./index-
|
|
1
|
+
"use strict";var e=require("./features-c5dfe323.js"),r=require("./index-d80d0a07.js"),i=require("./icons-0ea2e662.js"),n=require("./skin-3544db58.js"),t=require("./generic-77c1578a.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("video.js"),require("./renditions-c5618ab7.js"),require("./localisation-56e0a999.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("./util-ef2cd61e.js"),require("./captions-07bd3069.js"),require("./resolution-3b2ae0ba.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./browser-77c57718.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),exports.initialiseSkin=function(s,l){n.getPlayer(s).addClass("skin_default"),r.initialiseKeyboardEvents(s,l),Promise.resolve().then(function(){return require("./skin-ba38afdb.js")}).then(function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)}),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(s,l),function(r,s){var l=n.getPlayer(r),o=(null==s?void 0:s.sres)||null;l.on("loadeddata",function(){e.addResolutionModule(r,"default",i.SettingsSvg()),o&&Promise.resolve().then(function(){return require("./nextEpisodeButton-3b022b8f.js")}).then(function(e){e.initaliseFunctionality(s.sres.seasons,t.getCurrentVideo())})}),l.one("loadedmetadata",function(){var i;o&&(e.addSeriesModule(r,null==s||null===(i=s.sres)||void 0===i?void 0:i.seasons,s),e.addNextEpisodeButton(s.sres,s.res,r))})}(s,l),function(e,r){var t,s,l,o,u=n.getPlayer(e),a=document.getElementsByClassName("vjs-current-time")[0],d=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(a&&(a.style.display="none"),d&&(d.style.display="none"),c&&(c.style.display="none"));null===(t=u.controlBar.getChild("FullscreenToggle"))||void 0===t||null===(s=t.el())||void 0===s||s.appendChild(n.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(l=u.controlBar.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(n.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var m=u.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(i.NewCaptionsSvg()));var p=document.createElement("div");p.classList.add("caption-header"),m.querySelector(".vjs-menu-content").insertBefore(p,m.querySelector(".vjs-menu-item"))}(s,l)};
|
package/esm/bundle.css
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
4
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
7
5
|
height: 0.7em;
|
|
8
6
|
position: absolute;
|
|
@@ -187,6 +185,8 @@
|
|
|
187
185
|
}
|
|
188
186
|
|
|
189
187
|
|
|
188
|
+
|
|
189
|
+
|
|
190
190
|
/* CSS for videojs-dvr-seekbar */
|
|
191
191
|
|
|
192
192
|
.video-js.vjs-dvr-seekbar {
|
|
@@ -518,6 +518,38 @@
|
|
|
518
518
|
margin-left: 8px;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
+
/* a wrapper element that tracks the mouse vertically */
|
|
522
|
+
.vjs-thumbnail-holder {
|
|
523
|
+
position: absolute;
|
|
524
|
+
left: -1000px;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/* the thumbnail image itself */
|
|
528
|
+
.vjs-thumbnail {
|
|
529
|
+
position: absolute;
|
|
530
|
+
left: 0;
|
|
531
|
+
bottom: 1.3em;
|
|
532
|
+
opacity: 0;
|
|
533
|
+
transition: opacity .2s ease;
|
|
534
|
+
-webkit-transition: opacity .2s ease;
|
|
535
|
+
-moz-transition: opacity .2s ease;
|
|
536
|
+
-mz-transition: opacity .2s ease;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/* fade in the thumbnail when hovering over the progress bar */
|
|
540
|
+
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
541
|
+
.vjs-progress-control:hover .vjs-thumbnail,
|
|
542
|
+
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
543
|
+
.vjs-progress-control:active .vjs-thumbnail {
|
|
544
|
+
opacity: 1;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/* ... but hide the thumbnail when hovering directly over it */
|
|
548
|
+
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
549
|
+
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
550
|
+
opacity: 0;
|
|
551
|
+
}
|
|
552
|
+
|
|
521
553
|
.video-js.vjs-quality-menu {
|
|
522
554
|
display: block;
|
|
523
555
|
}
|
|
@@ -588,38 +620,6 @@
|
|
|
588
620
|
-webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
589
621
|
animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
590
622
|
}
|
|
591
|
-
/* a wrapper element that tracks the mouse vertically */
|
|
592
|
-
.vjs-thumbnail-holder {
|
|
593
|
-
position: absolute;
|
|
594
|
-
left: -1000px;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
/* the thumbnail image itself */
|
|
598
|
-
.vjs-thumbnail {
|
|
599
|
-
position: absolute;
|
|
600
|
-
left: 0;
|
|
601
|
-
bottom: 1.3em;
|
|
602
|
-
opacity: 0;
|
|
603
|
-
transition: opacity .2s ease;
|
|
604
|
-
-webkit-transition: opacity .2s ease;
|
|
605
|
-
-moz-transition: opacity .2s ease;
|
|
606
|
-
-mz-transition: opacity .2s ease;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
/* fade in the thumbnail when hovering over the progress bar */
|
|
610
|
-
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
611
|
-
.vjs-progress-control:hover .vjs-thumbnail,
|
|
612
|
-
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
613
|
-
.vjs-progress-control:active .vjs-thumbnail {
|
|
614
|
-
opacity: 1;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
/* ... but hide the thumbnail when hovering directly over it */
|
|
618
|
-
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
619
|
-
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
620
|
-
opacity: 0;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
623
|
.vjs-poster {
|
|
624
624
|
display: inline-block;
|
|
625
625
|
vertical-align: middle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m 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 j,z as T,A as I,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 V,N as U,O as B,P as H}from"./generic-76d748e7.js";import F from"@babel/runtime/helpers/defineProperty";import G from"@babel/runtime/helpers/asyncToGenerator";import Q from"@babel/runtime/regenerator";import K from"video.js";import{o as q,g as z,a as J,s as W,b as X}from"./util-80257541.js";import{g as Y,d as $,a as Z,e as ee}from"./captions-b7fd8308.js";import{g as ne}from"./renditions-6323832e.js";import{playSelectedResolution as te}from"./resolution-fcace655.js";import{g as oe,t as re,i as ie,a as le}from"./skin-58b9263c.js";import{d as ae}from"./browser-d4613b36.js";import{s as se}from"./localisation-0bf399a1.js";import ue from"@babel/runtime/helpers/typeof";import ce from"@babel/runtime/helpers/toConsumableArray";import de from"@babel/runtime/helpers/slicedToArray";var ve=function(e){return new Promise(function(n,t){if(fe(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)}})},fe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},pe=function(e,n,t){var o=oe(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,"'")})},me=function(e){var n=oe(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ye=function(){var e=G(Q.mark(function e(n){var t,o,r,i,l;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=oe(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,ve("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(K),e.finish(13);case 16:(l=K.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==ae()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),ge=function(e,n){var t=oe(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=K.dom.getPointerPosition(a,n).x;K.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 he=function(){var e=G(Q.mark(function e(){return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),ve("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)}}(),be=function(){var e=G(Q.mark(function e(){return Q.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){K.getPlugin("eme")||K.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),we=function(){var e=G(Q.mark(function e(){var n;return Q.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(K),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)}}(),ke=function(){var e=G(Q.mark(function e(){return Q.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)}}(),Se=function(){var e=G(Q.mark(function e(){return Q.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)}}(),Oe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){ve("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(K)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(K)})},loadAdsLibrary:he,loadEMELibrary:be,loadMuxPlugin:we,loadDvrSeekbar:ke,loadContribDash:Se});function je(e){return Te.apply(this,arguments)}function Te(){return(Te=G(Q.mark(function e(n){var t;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,he();case 3:t&&"Safari"==ae()&&Promise.resolve().then(function(){return Oe}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ie(e,n){return Pe.apply(this,arguments)}function Pe(){return(Pe=G(Q.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==ae()?be():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?Se():be():"Safari"!=ae()&&d?Se():null,ye(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function Ee(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 De(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ee(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ae=new Set,xe=null,Ce=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=Ue(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=Me(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[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=_e(n),v["c3.cm.genreList"]=Le(n),v["c3.cm.genre"]=Re(n),v["c3.cm.channel"]=Ne(n);var p=He(t(),n);return v=De(De({},v),p)},Re=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"},Le=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},Ne=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"},Me=function(e){return(null==e?void 0:e.contentType)||"null"},_e=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)},Ue=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Be,He=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.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},Fe=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Ge=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(Q.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=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=oe(n),"function"==typeof(v=i)){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=Fe(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;xe&&xe!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),Ae.clear(),xe=d.currentSrc();var o=Ge(d.currentType()),i=r(),s=Ce(i,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(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",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(){Ae.has(d.currentSrc())||(Ae.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){Ae.has(d.currentSrc())&&Ae.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==Ae||Ae.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Ke=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-2b8dbcb9.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-b121228d.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-ee56f7b5.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-4c7628cf.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-66fc3448.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&import("./skin-acb304de.js").then(function(t){t.initialiseSkin(e,n)})};function qe(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 ze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qe(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Je=[],We=0,Xe=null;function Ye(e,n,t){var o,l,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===(l=n.watchHistory)||void 0===l?void 0:l.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),i=$e(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return ze(ze({},e),{},F({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Be});c<0?i.push(ze(ze({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=ze(ze(ze({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,n.siteOwner):(h=ze(ze({videoId:Be,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},Xe&&{seriesId:Xe}),p&&{originalObjectId:p}),i(h).then(function(e){}).catch(function(e){})),We=v+t}function $e(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Ze(e,n,t){var o=$e(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 en=!1,nn=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)&&!en){var i=tn(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),en=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function tn(e,n,t){if(Array.isArray(e))return e.map(function(e){return tn(e,n,t)});if(null!==e&&"object"===ue(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]=tn(e[r],n,t)}),o}return e}function on(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 rn(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)?rn(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 rn(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 ln(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 an(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ln(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ln(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var sn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=oe(e),y=(null==f?void 0:f.contentType)||"video",g=(null==f?void 0:f[y].drmEnabled)||!1,h=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadstart",function(){h?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(an({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=Y(e);if(null==l||l.map(function(n){return $(e,n.id)}),b&&"Safari"===ae())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&pe(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=an(an({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(Xe=null==n||null===(r=n.series)||void 0===r?void 0:r.id),Je=[],We=0,Be=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=oe(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Je.includes(We)||(e==We?(Je.push(e),Ye(a,n,l)):e>We&&(We=e+l))}}),a.one("ended",function(){Ye(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,g,h,w,k,S=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),O=null==S?void 0:S.gist,j={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==O?void 0:O.id,video_title:null==O?void 0:O.title,video_series:null==S||null===(h=S.series)||void 0===h?void 0:h.title,video_stream_type:null!=S&&null!==(w=S.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:j})}}),m.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];m.trigger("subtitlechanged",n)}),m.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)}}),m.tech_.on("retryplaylist",function(){h&&nn(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?nn(f,e):(c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e,t,o,i,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,s,u,c=null===(a=r())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,v=d(),f=(null==v?void 0:v.get(c))||{t:0,p:0},p=f.t,y=f.p;p&&y<95&&setTimeout(function(){m.currentTime(p)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==ue(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=on(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=on(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;("Chrome"==ae()||"Edge"==ae()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!g))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1")?m.audioTracks().removeTrack(p):"main"==p.kind?p.enabled=!0:p.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};function un(e,n){var t,o,r,i=oe(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,p,m,y;if(dn.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||f(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!==(p=d.app_data)&&void 0!==p&&null!==(m=p.appcmsMain)&&void 0!==m&&null!==(y=m.adsConfig)&&void 0!==y&&y.vodAdClientSideTracking)return;h||v(e,10)}}},!0)}var cn,dn=(cn=!0,{enable:function(){cn=!0},disable:function(){cn=!1},get enabled(){return cn}});function vn(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 fn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vn(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 mn(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)?mn(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 mn(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 yn,gn,hn=(yn="",{set:function(e){e&&(yn=e)},get:function(){return yn}}),bn=(gn=null,{set:function(e){gn=e},get position(){return gn}});function wn(e,n){return kn.apply(this,arguments)}function kn(){return(kn=G(Q.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,g,h;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return oe(n),o=l(t,n),r=o.src,i=r.replace("/dash/","/session/").replace("master","session"),i=p(i,n,t),a=Sn(i),s=de(a,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=de(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:fn({},u)})});case 11:return d=e.sent,e.next=14,d.json();case 14:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,g=f+m,h=f+y,hn.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]])}))).apply(this,arguments)}function Sn(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=de(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=de(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 On,jn=(On=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),On=Array.isArray(e)?ce(e):On},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",On),ce(On)}});function Tn(e,n){return In.apply(this,arguments)}function In(){return In=G(Q.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,f,p,m,y,g,h,b,w;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:w=function(e,t,o,r,i,l){var a=oe(n);if(!a.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(a.currentTime());var s,u=pn(o);try{var c=function(){var n,o,u,c=s.value,d=c.eventType,v=c.beaconUrls,f=c.startTimeInSeconds,p=c.startTime,m=c.durationInSeconds,y=f||0,g=v,w=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(u=o.ads)||void 0===u?void 0:u.adEventHandler)||null,k="".concat(y,"_").concat(d),S=h.get("pod-".concat(i))||[];if(console.warn(e,y,"map:",d,"condition1:",e>=y,"map:",h),e>=y&&!S.includes(k)){S.push(k),h.set("pod-".concat(i),S);try{b(d,t,g,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,d,t)}if("breakEnd"==d){var O=bn.position;bn.set(null),setTimeout(function(){null!=O&&(a.currentTime(O),l())},500)}if("function"==typeof w)try{var j;w({adsData:{eventType:d,startTimeInSeconds:f,startTime:p,durationInSeconds:m,ad:null==t||null===(j=t.ads)||void 0===j?void 0:j[r],adIndex:r}})}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"))},bn.set(t),a=hn.get(),(s=oe(n)).one("loadeddata",function(){a&&y(a)}),u=new Map,c=new Map,d=-1,f=(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(Q.mark(function e(o){var r,i,l,a,s,y,h,b,k,S,O,j,T,I,P,E,D;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return T=function(e){document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",T),0===e.button&&S()},j=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=oe(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),jn.setQueuePoints(y),window.adsQueueList=y),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",re(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&&!c.has(r)&&!h.seeking()&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&"Safari"==ae()&&0!=r&&(console.log("jfc"),h.currentTime(0),setTimeout(function(){h.currentTime(r+.4)},50),c.set(r,!0)),e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&u.set(r,!0),dn.disable(),f&&f.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,v=0,k=0;k<l.length;k++){var S,j=null==l||null===(S=l[k])||void 0===S?void 0:S.durationInSeconds;if(s<d+j){v=k;break}d+=j}var T=l[v],P=s-d,E=Math.max(0,(null==T?void 0:T.durationInSeconds)-P),A=Math.round(E);I.style.display="block",D.textContent="".concat(v+1," of ").concat(l.length," • ").concat(g(A));var x=[];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)});x.push.apply(x,ce(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&x.push(null==t?void 0:t.podSlotImpressionBeacon),w(e,t,x,v,o,O),"break"}c.delete(r)},o=0;o<y.length;o++){if("break"===t())break}n||(I.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")),f&&f.classList.remove("vjs-hidden"),dn.enable())}},1e3)),null===(r=document)||void 0===r||r.addEventListener("keydown",function(e){dn.enabled&&"ArrowRight"==e.key&&(S(),v(n,10),e.stopPropagation())}),b.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",T))}),(I=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",I.append(P),I.append(D),h.el().appendChild(I);case 40: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)})),In.apply(this,arguments)}function Pn(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 En(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Dn=function(e,n,t,o){var r,i,s,u,d,v,f,p,b,w,k,S,O,j,T,I,P,E,D,A,x,C,R,L,N,M,_,V,U,B,H,q,z,J,W,X=n.res,Y=void 0===X?null:X,$=n.sres,ee=void 0===$?null:$,ne=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(r=Y)||void 0===r?void 0:r.contentType)||"video",re=ie(null===(i=Y)||void 0===i||null===(s=i[te])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||ie(null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),le=(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.liveDetails)||void 0===k?void 0:k.isDvrEnabled)||!1,se=(null===(S=Y)||void 0===S||null===(O=S[te])||void 0===O||null===(j=O.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,ue=(null===(T=Y)||void 0===T||null===(I=T.ads)||void 0===I||null===(P=I.preRoll)||void 0===P||null===(E=P.adTags)||void 0===E||null===(D=E.web)||void 0===D?void 0:D.active)&&(null===(A=Y)||void 0===A||null===(x=A.ads)||void 0===x||null===(C=x.preRoll)||void 0===C||null===(R=C.adTags)||void 0===R||null===(L=R.web)||void 0===L?void 0:L.url);Y=En(En({},Y),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ce="MEDIA_TAILOR"==(null===(N=window)||void 0===N||null===(M=N.app_data)||void 0===M||null===(_=M.appcmsMain)||void 0===_||null===(V=_.adsConfig)||void 0===V?void 0:V.vodAdSticherProvider)||!1,de=(null==t?void 0:t.latency)||6,ve=(W={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==t.skin,liveui:le},F(W,"autoplay",null==t?void 0:t.autoplay),F(W,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!ue),F(W,"loop",(null==t?void 0:t.loop)||!1),F(W,"audioPosterMode",null==t?void 0:t.audioPosterMode),F(W,"html5",En(En({dash:En(En(En({},!K.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(U=t.debugConfig)||void 0===U?void 0:U.enable)&&{debug:!0,logLevel:null!=t&&null!==(B=t.debugConfig)&&void 0!==B&&B.logLevel?null==t||null===(H=t.debugConfig)||void 0===H?void 0:H.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:de},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:En(En({liveRangeSafeTimeDelta:de,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(q=t.customData)||void 0===q?void 0:q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==ae()},0==(null==t||null===(z=t.customData)||void 0===z?void 0:z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(J=t.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),F(W,"poster",re),F(W,"techOrder",ne),F(W,"chromecast",{requestCustomDataFn:function(n){var t=oe(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return 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,j=(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=j;var T=(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=T}var I=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=I;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}(Y,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=oe(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=Y)||void 0===t||null===(o=t[te])||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")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),W);if(!K.getPlayers()[e]){K.log.level("debug");var fe=K(e,ve,function(){var n=G(Q.mark(function n(){var r,i,s,u,d,v,f,p,b,w,k,S,O,j,T,I,P,E,D,A;return Q.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(fe),console.log(K.VERSION),console.log(K.getPlugins()),n.next=5,Ie(t,Y);case 5:if(S=null===(r=Y)||void 0===r||null===(i=r[te])||void 0===i||null===(s=i.liveDetails)||void 0===s?void 0:s.startOverTime,se&&o.resolve(En({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Y}:{response:Y})),y(e,null==t?void 0:t.analyticsCb),Qe(e,t),/Android/i.test(navigator.userAgent)&&(K.options.vhs.overrideNative=!0),le&&ge(e,S),!ue||null!=t&&null!==(u=t.customData)&&void 0!==u&&u.disableAds||g(e,ue,Y),O=l(Y,e),console.log(O),null!=t&&t.nearestClusterUrl&&(O=h(O,t.nearestClusterUrl)),!ce){n.next=19;break}return n.next=18,wn(e,Y);case 18:O=n.sent;case 19:O?a(e,O):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:Y}),c(e,"Incompatible / Missing Source")),((null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.contentDetails)||void 0===f||null===(p=f.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.closedCaptions)||void 0===k?void 0:k.length)>0)&&(A=(null===(T=Y)||void 0===T||null===(I=T[te])||void 0===I||null===(P=I.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null===(E=Y)||void 0===E||null===(D=E[te])||void 0===D?void 0:D.closedCaptions),j=A.filter(function(e){return"VTT"===e.format}),Z(e,j)),null!=t&&t.disableControls?m(e):Ke(e,En(En(En({},t),ve),{},{liveVideo:se,isDvrEnabled:le,res:Y,sres:ee})),sn(e,En(En(En({},t),ve),{},{liveVideo:se}),o,{res:Y,sres:ee});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},An={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function xn(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?xn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Rn,Ln=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Nn(e);Dn(r,{res:i},e,{resolve:t,reject:o})},Nn=function(e){var n,t,o=null==e?void 0:e.streamingInfo,r=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,i=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,l=null==e?void 0:e.token,a=b(l),s=null==a?void 0:a.site;return Cn(Cn({id:null==An?void 0:An[s]},!i&&{directPlaybackUrl:null==r?void 0:r.url}),{},{video:{drmEnabled:i,streamingInfo:{videoAssets:{widevine:null==r?void 0:r.widevine,fairPlay:null==r?void 0:r.fairPlay,playReady:null==r?void 0:r.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Mn(e,n){return _n.apply(this,arguments)}function _n(){return(_n=G(Q.mark(function e(n,t){var o,r,i,l,a,u;return Q.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,O();case 6:u=e.sent,w(i,u).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,s(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=Ze((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",Dn(l,{res:p},n,{resolve:o,reject:r})}else k(i,u).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(){Dn(l,{res:p},n,{resolve:o,reject:r})});else Dn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){S(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Vn(e,n){return Un.apply(this,arguments)}function Un(){return(Un=G(Q.mark(function e(n,t){var o,r,i,l,a;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,O();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,Dn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){S(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Bn(e,n){return Hn.apply(this,arguments)}function Hn(){return(Hn=G(Q.mark(function e(n,t){var o,r,i,l,a,u,c;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,O();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,P.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,T(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;E(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);I(c,l),w(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,s(e.data),Dn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){S(e,a,i,videoId)})}).catch(function(e){S(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Fn(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 Gn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Qn(){return{loadVideoInstantly:D,onTimeUpdate:q,getVideoDuration:z,onVideoEnded:J,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=G(Q.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,k,O,j,T,I,P,E;return Q.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!C(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,k=null==e?void 0:e.token,!V(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",k),U().set(null==e?void 0:e.refreshToken),k&&!B(k)){n.next=16;break}return o({status:!1,msg:"".concat(k?"Token is expired !":"Missing Authorization Token"),response:{token:k}}),n.abrupt("return");case 16:Rn=JSON.parse(atob(k.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=Rn)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=Rn)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=Rn)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=Rn)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,O=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,j=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,se(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),_.set(e.apiBaseUrl),null!=e&&e.skin&&!le(e.skin)||(e.skin="VL_ONE"),n.next=33,je(e);case 33:j&&ve("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then(function(){return H(j)}).catch(function(e){}),(I=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(O)))&&I.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(E={directPlaybackUrl:p,id:P="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?w(P,k).then(function(n){var r=(null==n?void 0:n.data)||{};Dn(O,{res:Gn(Gn({},r),E)},e,{resolve:t,reject:o})}).catch(function(e){S(e,O,o,P)}):Dn(O,{res:E},e,{resolve:t,reject:o})):b?Ln(e,{resolve:t,reject:o}):h?Bn(e,{resolve:t,reject:o}):y?Vn(e,{resolve:t,reject:o}):Mn(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ne,skip:v,getPlayer:oe,play:A,pause:x,detectBrowser:ae,rewind:f,loadVideo:a,seekToTimeStamp:W,isPlayerInitialised:C,load:R,authenticateLC:L,dispose:N,enableCaptions:ee,disableCaptions:$,getCaptions:Y,playSelectedResolution:te,getSource:l,setVolume:pe,getVolume:me,disableControls:m,setPlaybackSpeed:X,getEntitlementData:M,adsQueuePointManager:jn}}export{Qn as V,un as i,Tn as s};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m 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 j,z as T,A as I,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 V,N as U,O as B,P as H}from"./generic-76d748e7.js";import F from"@babel/runtime/helpers/defineProperty";import G from"@babel/runtime/helpers/asyncToGenerator";import Q from"@babel/runtime/regenerator";import K from"video.js";import{o as q,g as z,a as J,s as W,b as X}from"./util-80257541.js";import{g as Y,d as $,a as Z,e as ee}from"./captions-b7fd8308.js";import{g as ne}from"./renditions-6323832e.js";import{playSelectedResolution as te}from"./resolution-fcace655.js";import{g as oe,t as re,i as ie,a as le}from"./skin-58b9263c.js";import{d as ae}from"./browser-d4613b36.js";import{s as se}from"./localisation-0bf399a1.js";import ue from"@babel/runtime/helpers/typeof";import ce from"@babel/runtime/helpers/toConsumableArray";import de from"@babel/runtime/helpers/slicedToArray";var ve=function(e){return new Promise(function(n,t){if(fe(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)}})},fe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},pe=function(e,n,t){var o=oe(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,"'")})},me=function(e){var n=oe(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ye=function(){var e=G(Q.mark(function e(n){var t,o,r,i,l;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=oe(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,ve("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(K),e.finish(13);case 16:(l=K.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==ae()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),ge=function(e,n){var t=oe(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=K.dom.getPointerPosition(a,n).x;K.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 he=function(){var e=G(Q.mark(function e(){return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),ve("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)}}(),be=function(){var e=G(Q.mark(function e(){return Q.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){K.getPlugin("eme")||K.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),we=function(){var e=G(Q.mark(function e(){var n;return Q.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(K),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)}}(),ke=function(){var e=G(Q.mark(function e(){return Q.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)}}(),Se=function(){var e=G(Q.mark(function e(){return Q.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)}}(),Oe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){ve("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(K)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(K)})},loadAdsLibrary:he,loadEMELibrary:be,loadMuxPlugin:we,loadDvrSeekbar:ke,loadContribDash:Se});function je(e){return Te.apply(this,arguments)}function Te(){return(Te=G(Q.mark(function e(n){var t;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,he();case 3:t&&"Safari"==ae()&&Promise.resolve().then(function(){return Oe}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ie(e,n){return Pe.apply(this,arguments)}function Pe(){return(Pe=G(Q.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==ae()?be():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?Se():be():"Safari"!=ae()&&d?Se():null,ye(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function Ee(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 De(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ee(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ae=new Set,xe=null,Ce=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=Ue(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=Me(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[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=_e(n),v["c3.cm.genreList"]=Le(n),v["c3.cm.genre"]=Re(n),v["c3.cm.channel"]=Ne(n);var p=He(t(),n);return v=De(De({},v),p)},Re=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"},Le=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},Ne=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"},Me=function(e){return(null==e?void 0:e.contentType)||"null"},_e=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)},Ue=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Be,He=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.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},Fe=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Ge=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(Q.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=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=oe(n),"function"==typeof(v=i)){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=Fe(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;xe&&xe!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),Ae.clear(),xe=d.currentSrc();var o=Ge(d.currentType()),i=r(),s=Ce(i,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(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",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(){Ae.has(d.currentSrc())||(Ae.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){Ae.has(d.currentSrc())&&Ae.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==Ae||Ae.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Ke=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-265b0043.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-b121228d.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-ee56f7b5.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-4c7628cf.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-66fc3448.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&import("./skin-494c04d4.js").then(function(t){t.initialiseSkin(e,n)})};function qe(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 ze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qe(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Je=[],We=0,Xe=null;function Ye(e,n,t){var o,l,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===(l=n.watchHistory)||void 0===l?void 0:l.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),i=$e(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return ze(ze({},e),{},F({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Be});c<0?i.push(ze(ze({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=ze(ze(ze({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,n.siteOwner):(h=ze(ze({videoId:Be,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},Xe&&{seriesId:Xe}),p&&{originalObjectId:p}),i(h).then(function(e){}).catch(function(e){})),We=v+t}function $e(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Ze(e,n,t){var o=$e(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 en=!1,nn=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)&&!en){var i=tn(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),en=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function tn(e,n,t){if(Array.isArray(e))return e.map(function(e){return tn(e,n,t)});if(null!==e&&"object"===ue(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]=tn(e[r],n,t)}),o}return e}function on(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 rn(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)?rn(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 rn(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 ln(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 an(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ln(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ln(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var sn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=oe(e),y=(null==f?void 0:f.contentType)||"video",g=(null==f?void 0:f[y].drmEnabled)||!1,h=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadstart",function(){h?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(an({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=Y(e);if(null==l||l.map(function(n){return $(e,n.id)}),b&&"Safari"===ae())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&pe(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=an(an({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(Xe=null==n||null===(r=n.series)||void 0===r?void 0:r.id),Je=[],We=0,Be=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=oe(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Je.includes(We)||(e==We?(Je.push(e),Ye(a,n,l)):e>We&&(We=e+l))}}),a.one("ended",function(){Ye(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,g,h,w,k,S=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),O=null==S?void 0:S.gist,j={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==O?void 0:O.id,video_title:null==O?void 0:O.title,video_series:null==S||null===(h=S.series)||void 0===h?void 0:h.title,video_stream_type:null!=S&&null!==(w=S.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:j})}}),m.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];m.trigger("subtitlechanged",n)}),m.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)}}),m.tech_.on("retryplaylist",function(){h&&nn(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?nn(f,e):(c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e,t,o,i,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,s,u,c=null===(a=r())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,v=d(),f=(null==v?void 0:v.get(c))||{t:0,p:0},p=f.t,y=f.p;p&&y<95&&setTimeout(function(){m.currentTime(p)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==ue(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=on(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=on(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;("Chrome"==ae()||"Edge"==ae()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!g))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1")?m.audioTracks().removeTrack(p):"main"==p.kind?p.enabled=!0:p.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};function un(e,n){var t,o,r,i=oe(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,p,m,y;if(dn.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||f(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!==(p=d.app_data)&&void 0!==p&&null!==(m=p.appcmsMain)&&void 0!==m&&null!==(y=m.adsConfig)&&void 0!==y&&y.vodAdClientSideTracking)return;h||v(e,10)}}},!0)}var cn,dn=(cn=!0,{enable:function(){cn=!0},disable:function(){cn=!1},get enabled(){return cn}});function vn(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 fn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?vn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vn(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 mn(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)?mn(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 mn(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 yn,gn,hn=(yn="",{set:function(e){e&&(yn=e)},get:function(){return yn}}),bn=(gn=null,{set:function(e){gn=e},get position(){return gn}});function wn(e,n){return kn.apply(this,arguments)}function kn(){return(kn=G(Q.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,g,h;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return oe(n),o=l(t,n),r=o.src,i=r.replace("/dash/","/session/").replace("master","session"),i=p(i,n,t),a=Sn(i),s=de(a,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=de(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:fn({},u)})});case 11:return d=e.sent,e.next=14,d.json();case 14:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,g=f+m,h=f+y,hn.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]])}))).apply(this,arguments)}function Sn(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=de(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=de(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 On,jn=(On=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),On=Array.isArray(e)?ce(e):On},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",On),ce(On)}});function Tn(e,n){return In.apply(this,arguments)}function In(){return In=G(Q.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,f,p,m,y,g,h,b,w;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:w=function(e,t,o,r,i,l){var a=oe(n);if(!a.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(a.currentTime());var s,u=pn(o);try{var c=function(){var n,o,u,c=s.value,d=c.eventType,v=c.beaconUrls,f=c.startTimeInSeconds,p=c.startTime,m=c.durationInSeconds,y=f||0,g=v,w=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(u=o.ads)||void 0===u?void 0:u.adEventHandler)||null,k="".concat(y,"_").concat(d),S=h.get("pod-".concat(i))||[];if(console.warn(e,y,"map:",d,"condition1:",e>=y,"map:",h),e>=y&&!S.includes(k)){S.push(k),h.set("pod-".concat(i),S);try{b(d,t,g,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,d,t)}if("breakEnd"==d){var O=bn.position;bn.set(null),setTimeout(function(){null!=O&&(a.currentTime(O),l())},500)}if("function"==typeof w)try{var j;w({adsData:{eventType:d,startTimeInSeconds:f,startTime:p,durationInSeconds:m,ad:null==t||null===(j=t.ads)||void 0===j?void 0:j[r],adIndex:r}})}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"))},bn.set(t),a=hn.get(),(s=oe(n)).one("loadeddata",function(){a&&y(a)}),u=new Map,c=new Map,d=-1,f=(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(Q.mark(function e(o){var r,i,l,a,s,y,h,b,k,S,O,j,T,I,P,E,D;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return T=function(e){document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",T),0===e.button&&S()},j=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=oe(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),jn.setQueuePoints(y),window.adsQueueList=y),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",re(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&&!c.has(r)&&!h.seeking()&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&"Safari"==ae()&&0!=r&&(console.log("jfc"),h.currentTime(0),setTimeout(function(){h.currentTime(r+.4)},50),c.set(r,!0)),e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&u.set(r,!0),dn.disable(),f&&f.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,v=0,k=0;k<l.length;k++){var S,j=null==l||null===(S=l[k])||void 0===S?void 0:S.durationInSeconds;if(s<d+j){v=k;break}d+=j}l[v];var T=Math.max(0,i-s),P=Math.round(T);I.style.display="block",D.textContent="".concat(v+1," of ").concat(l.length," • ").concat(g(P));var E=[];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)});E.push.apply(E,ce(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),w(e,t,E,v,o,O),"break"}c.delete(r)},o=0;o<y.length;o++){if("break"===t())break}n||(I.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")),f&&f.classList.remove("vjs-hidden"),dn.enable())}},1e3)),null===(r=document)||void 0===r||r.addEventListener("keydown",function(e){dn.enabled&&"ArrowRight"==e.key&&(S(),v(n,10),e.stopPropagation())}),b.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",T))}),(I=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",I.append(P),I.append(D),h.el().appendChild(I);case 40: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)})),In.apply(this,arguments)}function Pn(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 En(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Dn=function(e,n,t,o){var r,i,s,u,d,v,f,p,b,w,k,S,O,j,T,I,P,E,D,A,x,C,R,L,N,M,_,V,U,B,H,q,z,J,W,X=n.res,Y=void 0===X?null:X,$=n.sres,ee=void 0===$?null:$,ne=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(r=Y)||void 0===r?void 0:r.contentType)||"video",re=ie(null===(i=Y)||void 0===i||null===(s=i[te])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||ie(null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),le=(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.liveDetails)||void 0===k?void 0:k.isDvrEnabled)||!1,se=(null===(S=Y)||void 0===S||null===(O=S[te])||void 0===O||null===(j=O.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,ue=(null===(T=Y)||void 0===T||null===(I=T.ads)||void 0===I||null===(P=I.preRoll)||void 0===P||null===(E=P.adTags)||void 0===E||null===(D=E.web)||void 0===D?void 0:D.active)&&(null===(A=Y)||void 0===A||null===(x=A.ads)||void 0===x||null===(C=x.preRoll)||void 0===C||null===(R=C.adTags)||void 0===R||null===(L=R.web)||void 0===L?void 0:L.url);Y=En(En({},Y),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ce="MEDIA_TAILOR"==(null===(N=window)||void 0===N||null===(M=N.app_data)||void 0===M||null===(_=M.appcmsMain)||void 0===_||null===(V=_.adsConfig)||void 0===V?void 0:V.vodAdSticherProvider)||!1,de=(null==t?void 0:t.latency)||6,ve=(W={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==t.skin,liveui:le},F(W,"autoplay",null==t?void 0:t.autoplay),F(W,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!ue),F(W,"loop",(null==t?void 0:t.loop)||!1),F(W,"audioPosterMode",null==t?void 0:t.audioPosterMode),F(W,"html5",En(En({dash:En(En(En({},!K.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(U=t.debugConfig)||void 0===U?void 0:U.enable)&&{debug:!0,logLevel:null!=t&&null!==(B=t.debugConfig)&&void 0!==B&&B.logLevel?null==t||null===(H=t.debugConfig)||void 0===H?void 0:H.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:de},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:En(En({liveRangeSafeTimeDelta:de,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(q=t.customData)||void 0===q?void 0:q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==ae()},0==(null==t||null===(z=t.customData)||void 0===z?void 0:z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(J=t.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),F(W,"poster",re),F(W,"techOrder",ne),F(W,"chromecast",{requestCustomDataFn:function(n){var t=oe(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return 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,j=(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=j;var T=(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=T}var I=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=I;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}(Y,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=oe(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=Y)||void 0===t||null===(o=t[te])||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")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),W);if(!K.getPlayers()[e]){K.log.level("debug");var fe=K(e,ve,function(){var n=G(Q.mark(function n(){var r,i,s,u,d,v,f,p,b,w,k,S,O,j,T,I,P,E,D,A;return Q.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(fe),console.log(K.VERSION),console.log(K.getPlugins()),n.next=5,Ie(t,Y);case 5:if(S=null===(r=Y)||void 0===r||null===(i=r[te])||void 0===i||null===(s=i.liveDetails)||void 0===s?void 0:s.startOverTime,se&&o.resolve(En({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Y}:{response:Y})),y(e,null==t?void 0:t.analyticsCb),Qe(e,t),/Android/i.test(navigator.userAgent)&&(K.options.vhs.overrideNative=!0),le&&ge(e,S),!ue||null!=t&&null!==(u=t.customData)&&void 0!==u&&u.disableAds||g(e,ue,Y),O=l(Y,e),console.log(O),null!=t&&t.nearestClusterUrl&&(O=h(O,t.nearestClusterUrl)),!ce){n.next=19;break}return n.next=18,wn(e,Y);case 18:O=n.sent;case 19:O?a(e,O):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:Y}),c(e,"Incompatible / Missing Source")),((null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.contentDetails)||void 0===f||null===(p=f.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.closedCaptions)||void 0===k?void 0:k.length)>0)&&(A=(null===(T=Y)||void 0===T||null===(I=T[te])||void 0===I||null===(P=I.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null===(E=Y)||void 0===E||null===(D=E[te])||void 0===D?void 0:D.closedCaptions),j=A.filter(function(e){return"VTT"===e.format}),Z(e,j)),null!=t&&t.disableControls?m(e):Ke(e,En(En(En({},t),ve),{},{liveVideo:se,isDvrEnabled:le,res:Y,sres:ee})),sn(e,En(En(En({},t),ve),{},{liveVideo:se}),o,{res:Y,sres:ee});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},An={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function xn(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?xn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Rn,Ln=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Nn(e);Dn(r,{res:i},e,{resolve:t,reject:o})},Nn=function(e){var n,t,o=null==e?void 0:e.streamingInfo,r=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,i=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,l=null==e?void 0:e.token,a=b(l),s=null==a?void 0:a.site;return Cn(Cn({id:null==An?void 0:An[s]},!i&&{directPlaybackUrl:null==r?void 0:r.url}),{},{video:{drmEnabled:i,streamingInfo:{videoAssets:{widevine:null==r?void 0:r.widevine,fairPlay:null==r?void 0:r.fairPlay,playReady:null==r?void 0:r.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Mn(e,n){return _n.apply(this,arguments)}function _n(){return(_n=G(Q.mark(function e(n,t){var o,r,i,l,a,u;return Q.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,O();case 6:u=e.sent,w(i,u).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,s(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=Ze((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",Dn(l,{res:p},n,{resolve:o,reject:r})}else k(i,u).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(){Dn(l,{res:p},n,{resolve:o,reject:r})});else Dn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){S(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Vn(e,n){return Un.apply(this,arguments)}function Un(){return(Un=G(Q.mark(function e(n,t){var o,r,i,l,a;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,O();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,Dn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){S(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Bn(e,n){return Hn.apply(this,arguments)}function Hn(){return(Hn=G(Q.mark(function e(n,t){var o,r,i,l,a,u,c;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,O();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,P.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,T(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;E(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);I(c,l),w(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,s(e.data),Dn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){S(e,a,i,videoId)})}).catch(function(e){S(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Fn(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 Gn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Qn(){return{loadVideoInstantly:D,onTimeUpdate:q,getVideoDuration:z,onVideoEnded:J,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=G(Q.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,k,O,j,T,I,P,E;return Q.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!C(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,k=null==e?void 0:e.token,!V(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",k),U().set(null==e?void 0:e.refreshToken),k&&!B(k)){n.next=16;break}return o({status:!1,msg:"".concat(k?"Token is expired !":"Missing Authorization Token"),response:{token:k}}),n.abrupt("return");case 16:Rn=JSON.parse(atob(k.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=Rn)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=Rn)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=Rn)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=Rn)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,O=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,j=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,se(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),_.set(e.apiBaseUrl),null!=e&&e.skin&&!le(e.skin)||(e.skin="VL_ONE"),n.next=33,je(e);case 33:j&&ve("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then(function(){return H(j)}).catch(function(e){}),(I=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(O)))&&I.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(E={directPlaybackUrl:p,id:P="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?w(P,k).then(function(n){var r=(null==n?void 0:n.data)||{};Dn(O,{res:Gn(Gn({},r),E)},e,{resolve:t,reject:o})}).catch(function(e){S(e,O,o,P)}):Dn(O,{res:E},e,{resolve:t,reject:o})):b?Ln(e,{resolve:t,reject:o}):h?Bn(e,{resolve:t,reject:o}):y?Vn(e,{resolve:t,reject:o}):Mn(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ne,skip:v,getPlayer:oe,play:A,pause:x,detectBrowser:ae,rewind:f,loadVideo:a,seekToTimeStamp:W,isPlayerInitialised:C,load:R,authenticateLC:L,dispose:N,enableCaptions:ee,disableCaptions:$,getCaptions:Y,playSelectedResolution:te,getSource:l,setVolume:pe,getVolume:me,disableControls:m,setPlaybackSpeed:X,getEntitlementData:M,adsQueuePointManager:jn}}export{Qn as V,un as i,Tn as s};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import"./generic-76d748e7.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";export{V as default}from"./index-
|
|
1
|
+
import"video.js/dist/video-js.min.css";import"./generic-76d748e7.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";export{V as default}from"./index-327acdc3.js";import"./util-80257541.js";import"./captions-b7fd8308.js";import"./renditions-6323832e.js";import"./resolution-fcace655.js";import"./skin-58b9263c.js";import"./browser-d4613b36.js";import"./localisation-0bf399a1.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t,c as s,d as i,e as o}from"./features-031a5a79.js";import{i as r}from"./index-
|
|
1
|
+
import{a as e,b as t,c as s,d as i,e as o}from"./features-031a5a79.js";import{i as r}from"./index-327acdc3.js";import{S as n,M as l,a,N as m,b as d,R as p}from"./icons-0676e9c7.js";import{g as u,b as c}from"./skin-58b9263c.js";import{d as b}from"./generic-76d748e7.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"video.js";import"./renditions-6323832e.js";import"./localisation-0bf399a1.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"./util-80257541.js";import"./captions-b7fd8308.js";import"./resolution-fcace655.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./browser-d4613b36.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"ua-parser-js";function v(v,h){u(v).addClass("skin_default"),r(v,h),import("./skin-71be210e.js").then(function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)}),function(e,t){0==t.liveVideo&&0==t.liveui&&i(e,"default",d());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&o(e,"default",p())}(v,h),function(i,o){var r=u(i),l=(null==o?void 0:o.sres)||null;r.on("loadeddata",function(){e(i,"default",n()),l&&import("./nextEpisodeButton-df6e9d73.js").then(function(e){e.initaliseFunctionality(o.sres.seasons,b())})}),r.one("loadedmetadata",function(){var e;l&&(t(i,null==o||null===(e=o.sres)||void 0===e?void 0:e.seasons,o),s(o.sres,o.res,i))})}(v,h),function(e,t){var s,i,o,r,n=u(e),d=document.getElementsByClassName("vjs-current-time")[0],p=document.getElementsByClassName("vjs-duration")[0],b=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(d&&(d.style.display="none"),p&&(p.style.display="none"),b&&(b.style.display="none"));null===(s=n.controlBar.getChild("FullscreenToggle"))||void 0===s||null===(i=s.el())||void 0===i||i.appendChild(c(l(window.controlsColor))),null===(o=n.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(r=o.el())||void 0===r||r.appendChild(c(a(window.controlsColor)));var v=n.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(c(m()));var h=document.createElement("div");h.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(h,v.querySelector(".vjs-menu-item"))}(v,h)}export{v as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as o,o as l,p as i,q as e}from"./features-031a5a79.js";import{g as r}from"./skin-58b9263c.js";import{a as n,b as a}from"./index-810dc03a.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import"videojs-contrib-quality-menu";import t from"video.js";import{i as s,s as d}from"./index-
|
|
1
|
+
import{h as o,o as l,p as i,q as e}from"./features-031a5a79.js";import{g as r}from"./skin-58b9263c.js";import{a as n,b as a}from"./index-810dc03a.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import"videojs-contrib-quality-menu";import t from"video.js";import{i as s,s as d}from"./index-327acdc3.js";import{e as u,d as p,j as v}from"./generic-76d748e7.js";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"./renditions-6323832e.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-613b5bf9.js";import"./util-80257541.js";import"./icons-0676e9c7.js";import"@babel/runtime/helpers/typeof";import"video.js/dist/video-js.min.css";import"./captions-b7fd8308.js";import"./resolution-fcace655.js";import"@babel/runtime/helpers/assertThisInitialized";import"./browser-d4613b36.js";import"axios";import"js-cookie";import"ua-parser-js";function m(l,i){var e=r(l);e&&(e.on("loadeddata",function(){var o,e,a,t,s;!function(o){var l=r(o);l&&(null==l||l.qualityMenu,l.qualityMenu({useResolutionLabels:!0}))}(l),!(null!=i&&null!==(o=i.series)&&void 0!==o&&o.enable||null!==(e=window)&&void 0!==e&&null!==(a=e.app_data)&&void 0!==a&&null!==(t=a.appcmsMain)&&void 0!==t&&null!==(s=t.features)&&void 0!==s&&s.auto_play)||null!=i&&i.liveVideo||n(l,i)}),e.one("play",function(){var i,e,r,n;null!==(i=window)&&void 0!==i&&null!==(e=i.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(l,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}function c(o,n){r(o).addClass("skin_vlone"),m(o,n),function(o,r){var n,t,m,c,b,y,g,f,h,j,C,w,B=u(null==r?void 0:r.res,o)||{};B.src,(null==r||null===(n=r.relatedVideos)||void 0===n||null===(t=n.content)||void 0===t?void 0:t.length)>0&&l(o,null==r?void 0:r.relatedVideos);null!=r&&null!==(m=r.series)&&void 0!==m&&m.enable&&i(o,r);(null==r||null===(c=r.streams)||void 0===c?void 0:c.length)>1&&e(o,null==r?void 0:r.streams);if(a(o,r),s(o,r),"MEDIA_TAILOR"==(null===(b=window)||void 0===b||null===(y=b.app_data)||void 0===y||null===(g=y.appcmsMain)||void 0===g||null===(f=g.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)&&null!==(h=window)&&void 0!==h&&null!==(j=h.app_data)&&void 0!==j&&null!==(C=j.appcmsMain)&&void 0!==C&&null!==(w=C.adsConfig)&&void 0!==w&&w.vodAdClientSideTracking){var k,M=null;if(null!=r&&null!==(k=r.series)&&void 0!==k&&k.enable){var T,_,A,R=null===(T=p())||void 0===T||null===(_=T.video)||void 0===_||null===(A=_.gist)||void 0===A?void 0:A.id,q=v(),x=(null==q?void 0:q.get(R))||{t:0,p:0},P=x.t;x.p<95&&(M=P)}else{var O=r.watchHistoryResumeTime;r.watchedPercentage<95&&(M=O)}d(o,M)}}(o,n),b(o,n)}var b=function(o,l){var i,e,n,a,s,d,u,p,v,m,c,b,y=r(o),g=(null==l?void 0:l.theme)||{},f=t.dom.$(".vjs-play-progress"),h=t.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===(s=a.cta)||void 0===s||null===(d=s.primary)||void 0===d?void 0:d.backgroundColor)),f&&(f.style.background="".concat(null===(u=window)||void 0===u||null===(p=u.app_data)||void 0===p||null===(v=p.appcmsMain)||void 0===v||null===(m=v.brand)||void 0===m||null===(c=m.cta)||void 0===c||null===(b=c.primary)||void 0===b?void 0:b.backgroundColor));var j=y.getChild("BigPlayButton")||null;(null==g?void 0:g.progressBarColor)&&f&&(f.style.background=g.progressBarColor),(null==g?void 0:g.playButtonBackgroundColor)&&j&&(j.el().style.background=g.playButtonBackgroundColor),(null==g?void 0:g.playButtonColor)&&h&&(h.style.color=g.playButtonColor),(null==g?void 0:g.playButtonType)&&("square"==(null==g?void 0:g.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};export{c as initialiseSkin};
|