@viewlift/player-backup 2.0.197-backup → 2.0.198-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/autoNextVideo-abfb351d.js +1 -0
- package/cjs/bundle.css +3 -3
- package/cjs/caption-settings-1efe9982.js +1 -0
- package/cjs/features-4a76e215.js +1 -0
- package/cjs/index-03969150.js +1 -0
- package/cjs/index-432bc006.js +1 -0
- package/cjs/index-96485ab1.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-33dab9a2.js +1 -0
- package/cjs/multicamv2-85130e99.js +1 -0
- package/cjs/nextEpisodeButton-44390768.js +1 -0
- package/cjs/playlist-da81e011.js +1 -0
- package/cjs/resolution-v2-c71c8680.js +1 -0
- package/cjs/series-ae935129.js +1 -0
- package/cjs/series-v2-c88c6f27.js +1 -0
- package/cjs/series-v2-d67041bc.js +1 -0
- package/cjs/settings-icon-c1ac2e37.js +1 -0
- package/cjs/skin-476afafd.js +1 -0
- package/cjs/skin-478ea1b8.js +1 -0
- package/cjs/skin-73a196b3.js +1 -0
- package/cjs/skin-9d949da3.js +1 -0
- package/cjs/skin-c3d3212b.js +1 -0
- package/cjs/skin-cd95e0c1.js +1 -0
- package/cjs/skin-fd24aa07.js +1 -0
- package/cjs/start-begin-btn-c46e6492.js +1 -0
- package/cjs/videoSelector-a55ad576.js +1 -0
- package/cjs/videoSelector-cb16ae18.js +1 -0
- package/cjs/videojs-dash5.es-5173354f.js +1 -0
- package/cjs/watch-live-btn-2964f64b.js +1 -0
- package/esm/autoNextVideo-8f8a9f2e.js +1 -0
- package/esm/bundle.css +3 -3
- package/esm/caption-settings-49e8a9bf.js +1 -0
- package/esm/features-e537df14.js +1 -0
- package/esm/index-2d6bcfdb.js +1 -0
- package/esm/index-6ecf4a3a.js +1 -0
- package/esm/index-dc66c193.js +1 -0
- package/esm/index.js +1 -1
- package/esm/multicamv2-245bd15e.js +1 -0
- package/esm/multicamv2-b3defa42.js +1 -0
- package/esm/nextEpisodeButton-f4543db8.js +1 -0
- package/esm/playlist-f02f8163.js +1 -0
- package/esm/resolution-v2-f5a28786.js +1 -0
- package/esm/series-b4613e56.js +1 -0
- package/esm/series-v2-1e202238.js +1 -0
- package/esm/series-v2-ca516b3f.js +1 -0
- package/esm/settings-icon-3a13d886.js +1 -0
- package/esm/skin-101ab011.js +1 -0
- package/esm/skin-46a6a576.js +1 -0
- package/esm/skin-64ccbdf1.js +1 -0
- package/esm/skin-82447ac5.js +1 -0
- package/esm/skin-943037f3.js +1 -0
- package/esm/skin-9b36936b.js +1 -0
- package/esm/skin-b772b20b.js +1 -0
- package/esm/start-begin-btn-ec5e405a.js +1 -0
- package/esm/utilities/beacon.d.ts +1 -1
- package/esm/videoSelector-1847f653.js +1 -0
- package/esm/videoSelector-cd1e2c31.js +1 -0
- package/esm/videojs-dash5.es-9868b8c7.js +1 -0
- package/esm/watch-live-btn-f6f937bd.js +1 -0
- package/package.json +1 -1
- package/cjs/autoNextVideo-1960dcfe.js +0 -1
- package/cjs/caption-settings-4ca6c759.js +0 -1
- package/cjs/captions-dbc83a75.js +0 -1
- package/cjs/currentVideoInfo-31d70bec.js +0 -1
- package/cjs/features-4d58ca45.js +0 -1
- package/cjs/generic-dc7b4a94.js +0 -1
- package/cjs/helper-a50a8ffc.js +0 -1
- package/cjs/icons-2609dbe4.js +0 -1
- package/cjs/index-3f0e537b.js +0 -1
- package/cjs/index-6c94ecac.js +0 -1
- package/cjs/index-b9ba3a36.js +0 -1
- package/cjs/localisation-56e0a999.js +0 -1
- package/cjs/multicamv2-04e76144.js +0 -1
- package/cjs/multicamv2-b2a65fa7.js +0 -1
- package/cjs/nextEpisodeButton-9a47204f.js +0 -1
- package/cjs/player_instance-fcf6a8fb.js +0 -1
- package/cjs/playlist-bb316da9.js +0 -1
- package/cjs/resolution-f9dcc1b4.js +0 -1
- package/cjs/resolution-v2-e42e0101.js +0 -1
- package/cjs/series-1ff14ed6.js +0 -1
- package/cjs/series-v2-95e80c30.js +0 -1
- package/cjs/series-v2-ebbf0c5c.js +0 -1
- package/cjs/settings-icon-a8ec6794.js +0 -1
- package/cjs/skin-07e3b037.js +0 -1
- package/cjs/skin-32ffda5a.js +0 -1
- package/cjs/skin-36ecc705.js +0 -1
- package/cjs/skin-516012d7.js +0 -1
- package/cjs/skin-85e9a926.js +0 -1
- package/cjs/skin-9be02be9.js +0 -1
- package/cjs/skin-b08b92d0.js +0 -1
- package/cjs/skin-b8dd131f.js +0 -1
- package/cjs/start-begin-btn-5739a6c0.js +0 -1
- package/cjs/util-7a0f40d6.js +0 -1
- package/cjs/videoSelector-66d23051.js +0 -1
- package/cjs/videoSelector-76e5c7e0.js +0 -1
- package/cjs/videojs-dash5.es-3854764f.js +0 -1
- package/cjs/watch-live-btn-822534d1.js +0 -1
- package/esm/autoNextVideo-5cb3369b.js +0 -1
- package/esm/caption-settings-34414f59.js +0 -1
- package/esm/captions-f507e8ee.js +0 -1
- package/esm/currentVideoInfo-a8a254c2.js +0 -1
- package/esm/features-0fea54ae.js +0 -1
- package/esm/generic-227dd92b.js +0 -1
- package/esm/helper-349e076f.js +0 -1
- package/esm/icons-37daa6b3.js +0 -1
- package/esm/index-750c848d.js +0 -1
- package/esm/index-8e3eab6d.js +0 -1
- package/esm/index-e35f4fab.js +0 -1
- package/esm/localisation-0bf399a1.js +0 -1
- package/esm/multicamv2-639eca43.js +0 -1
- package/esm/multicamv2-aa44307e.js +0 -1
- package/esm/nextEpisodeButton-dd84dbe6.js +0 -1
- package/esm/player_instance-34118a5b.js +0 -1
- package/esm/playlist-8df3fa8d.js +0 -1
- package/esm/resolution-1c59b0f3.js +0 -1
- package/esm/resolution-v2-9ed4268f.js +0 -1
- package/esm/series-dbecfcea.js +0 -1
- package/esm/series-v2-0cf3db2f.js +0 -1
- package/esm/series-v2-d70956b1.js +0 -1
- package/esm/settings-icon-4708c41d.js +0 -1
- package/esm/skin-020b5e86.js +0 -1
- package/esm/skin-0913004f.js +0 -1
- package/esm/skin-1c262d06.js +0 -1
- package/esm/skin-71d399f6.js +0 -1
- package/esm/skin-ace1d4fa.js +0 -1
- package/esm/skin-c303da65.js +0 -1
- package/esm/skin-d5091b86.js +0 -1
- package/esm/skin-f877008d.js +0 -1
- package/esm/start-begin-btn-1e096fec.js +0 -1
- package/esm/util-aeb59632.js +0 -1
- package/esm/videoSelector-5554968e.js +0 -1
- package/esm/videoSelector-9ce6077a.js +0 -1
- package/esm/videojs-dash5.es-08c7635e.js +0 -1
- package/esm/watch-live-btn-5419f3a7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t=require("./index-432bc006.js"),i=0,n=0,o=function e(i,o,u,c){n=i,i>u.length-1||(t.setVideoIdx(n+1),t.load(o,u[i].id).then(function(e){t.highlightVideo(n,o),n++,d(e)}).catch(function(i){d(i),setTimeout(function(){t.highlightVideo(n,o),n++,e(n,o,u)},5e3)}))},d=function(t){e&&e(t)};exports.autoPlayNext=function(u){clearTimeout(i);var c=null==u?void 0:u.content;e=null==u?void 0:u.cb;var h=u.playerId;t.onVideoEnded(h,function(){var e=t.getPlayer(h);0!==(null==e?void 0:e.currentTime())&&((n=t.getVideoIdx())>c.length-1||(t.setVideoIdx(n+1),t.load(h,c[n].id).then(function(e){t.highlightVideo(n,h),t.setCurrentVideo(e.response),n++,d(e)}).catch(function(e){d(e),t.highlightVideo(n,h),n++,i=setTimeout(function(){t.isPaused(h)&&o(n,h,c)},5e3)})))})},exports.switchToNext=o;
|
package/cjs/bundle.css
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
7
6
|
height: 0.7em;
|
|
8
7
|
position: absolute;
|
|
@@ -224,6 +223,7 @@
|
|
|
224
223
|
|
|
225
224
|
|
|
226
225
|
|
|
226
|
+
|
|
227
227
|
/* CSS for videojs-dvr-seekbar */
|
|
228
228
|
|
|
229
229
|
.video-js.vjs-dvr-seekbar {
|
|
@@ -397,8 +397,6 @@
|
|
|
397
397
|
|
|
398
398
|
|
|
399
399
|
|
|
400
|
-
|
|
401
|
-
|
|
402
400
|
.video-js .multicamera-parent.default{
|
|
403
401
|
height: 345px;
|
|
404
402
|
position: absolute;
|
|
@@ -480,6 +478,8 @@
|
|
|
480
478
|
|
|
481
479
|
|
|
482
480
|
|
|
481
|
+
|
|
482
|
+
|
|
483
483
|
/* nextep */
|
|
484
484
|
.next-ep-preview{
|
|
485
485
|
position: absolute;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),r=require("./index-432bc006.js");function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/assertThisInitialized");var c=i.getComponent("Component"),s=function(){n(p,c);var s,d,u=(s=p,d=l(),function(){var e,t=o(s);if(d){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function p(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(i=u.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important"),i}return t(p,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r.CaptionsSvgV2())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./caption-settings-34ca0188.js")}).then(function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=r.getCaptions(this.playerId);null==t||t.map(function(t){return r.disableCaptions(e.playerId,t.id)});var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(r.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",r.setUpdatedElHeight(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var l=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(l),i.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),r.detectOrientationChange(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),l=i.dom.createEl("div",{className:"caption-selector-content"}),c=i.dom.createEl("div",{className:"caption-container"}),s=this.createLanguageContanier();i.dom.appendContent(c,s),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,l),i.dom.appendContent(l,c),r.handleDrawerResizing(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var l=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});l.setAttribute("type","radio"),l.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),r.getCaptions(e.playerId).map(function(t){return r.disableCaptions(e.playerId,t.id)})},i.dom.appendContent(a,l),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var c=r.getCaptions(this.playerId),s=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var l=document.createElement("div");l.className="caption - ".concat(n),l.textContent=null==c||null===(a=c[n])||void 0===a?void 0:a.label;var s=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});s.onchange=function(t){r.enableCaptions(e.playerId,c[n].id)},s.setAttribute("type","radio"),i.dom.appendContent(o,s),i.dom.appendContent(o,l),i.dom.appendContent(t,o)},d=0;d<c.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var l=document.createElement("div");l.className="fontsize - ".concat(a),l.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var c=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});c.setAttribute("type","radio"),c.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,c),i.dom.appendContent(r,l),i.dom.appendContent(e,r)}return e}}]),p}();exports.default=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./index-432bc006.js");function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?s(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function c(e){var t=u();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-1efe9982.js")}).then(function(r){var n,o,l,s,d=r.default,c=a.getPlayer(e);i.registerComponent("captionSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=a.getPlayer(e).el(),r=0,n=a.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-33dab9a2.js")}).then(function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-85130e99.js")}).then(function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-44390768.js")}).then(function(n){var o=n.default,l=a.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=a.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-da81e011.js")}).then(function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-v2-c71c8680.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a.getPlayer(e),s=a.getRenditions(e);(null==s?void 0:s.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:s},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=c(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var d=a.parseSvgString(l);return o.append(d),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-ae935129.js")}).then(function(n){var o=n.seriesModule,l=a.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),d=function(e){s[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)})},c=0;c<s.length;c++)d(c)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-d67041bc.js")}).then(function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",d({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-c88c6f27.js")}).then(function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",d({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-c1ac2e37.js")}).then(function(r){var n,o,l,s,d=r.default,c=a.getPlayer(e);i.registerComponent("settingsSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=c(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var d=a.parseSvgString(l);return o.append(d),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=c(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=a.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addStartFromBeginningButton=function(e,t){Promise.resolve().then(function(){return require("./start-begin-btn-c46e6492.js")}).then(function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",d({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_}));o.startFromBeginningButton=l})},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-a55ad576.js")}).then(function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-cb16ae18.js")}).then(function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addWatchLiveButton=function(e,t){Promise.resolve().then(function(){return require("./watch-live-btn-2964f64b.js")}).then(function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",d({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_})+1);o.watchLiveButton=l})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),a=require("./index-432bc006.js"),o=require("./autoNextVideo-abfb351d.js"),l=require("@babel/runtime/helpers/typeof"),u=require("video.js"),s=require("@babel/runtime/helpers/asyncToGenerator"),c=require("@babel/runtime/regenerator"),d=require("@babel/runtime/helpers/defineProperty"),p=require("@babel/runtime/helpers/slicedToArray"),v=[],m=!1,f=function(e,t){var n=a.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=a.getVideoIdx();o.switchToNext(i,e,v)}};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===l(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},u.registerPlugin("thumbnails",function(i){var a,o,l,u,s,c,d,p;function v(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",v),p()}o=t({},e,i),u=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=u.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(a=document.createElement("div")).className="vjs-thumbnail-holder",l=document.createElement("img"),a.appendChild(l),l.src=o[0].src,l.className="vjs-thumbnail",t(l.style,o[0].style),l.style.left||l.style.right||(l.onload=function(){l.style.left=-l.naturalWidth/2+"px"}),c=u.duration(),u.on("durationchange",function(e){c=u.duration()}),u.on("loadedmetadata",function(e){c=u.duration()}),(s=u.controlBar.progressControl).el().appendChild(a),d=function(e){var i,u,d,p,v,m,f,g,h,b;for(u in d=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((b=r(s.el()).getBoundingClientRect()).width||b.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),p=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,p-=r(s.el()).getBoundingClientRect().left+h,i=Math.floor((p-s.el().offsetLeft)/s.width()*c),o)i>u&&(d=Math.max(d,u));(v=o[d]).src&&l.src!=v.src&&(l.src=v.src),v.style&&l.style!=v.style&&t(l.style,v.style),p+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(l,v.width||o[0].width)/2)>f?p-=p+g-f:p<g&&(p=g),a.style.left=p+"px"},s.on("mousemove",d),s.on("touchmove",d),s.on("pointerdown",function(e){document.addEventListener("pointermove",d),document.addEventListener("pointerup",v)}),p=function(e){a.style.left="-1000px"},s.on("mouseout",p),s.on("touchcancel",p),s.on("touchend",p),u.on("userinactive",p)});var b="my-player";function y(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function x(){return(x=s(c.mark(function e(t){var n,r,i,a,o,l,u,s,d,v,m,f,g,h,b,y,x,w,E,A,N,k,j,C;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),o=p(a,2),l=o[0],u=o[1],s=i.width/u,d=i.height/l,v=[],m=0;m<l;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=d,g.getContext("2d").drawImage(i,f*s,m*d,s,d,0,0,s,d),h=g.toDataURL("image/png"),v.push({uri:h,duration:t.duration}),t._tiles=v;return e.abrupt("return",v);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=p(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(C=j.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function w(e,t){return E.apply(this,arguments)}function E(){return(E=s(c.mark(function e(t,n){var r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return b=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",y(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function A(e,t,n){var r=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),i=a.getPlayer(b);if(r&&i){var o=r.getBoundingClientRect(),l=(e.clientX-o.left)/o.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var o=Math.floor((i+a)/2),l=t[o];if(l===e)return l;l<e?i=o+1:a=o-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*i.duration()),n),s=t[u];s&&!s.loading&&(s.loading=!0,function(e){return x.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function N(e){return k.apply(this,arguments)}function k(){return(k=s(c.mark(function e(t){var n,r,i,o;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=p(r,2),a=i[0]*i[1],o=e.duration,l=0;l<a;l++){var u,s=Math.round((t*a+l)*o);n[s]=h(h({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},d(u,"left","-60px"),d(u,"border","1px solid transparent"),d(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",a.throttle(function(e){return A(e,n,r)},500)),null==(o=document.querySelector(".vjs-progress-control.vjs-control"))||o.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",a.throttle(function(e){return A(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var j=function(){var e=s(c.mark(function e(t,n){var r,i,a,o,l,u,s,d;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),o=[],l=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=s.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),n=p(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,o.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function C(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function I(e,t){return T.apply(this,arguments)}function T(){return(T=s(c.mark(function e(t,n){var r,i,o,l,u,s,d,v,m,f,g,h,y,x,w,E,A,N,k,j,I,T,S,B,L,M,R,q,D,$,X,F,U,V,_,G,W,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,oe,le,ue,se,ce,de,pe,ve;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return b=n,r=a.getPlayer(n),i=t.split("/"),o=i.findIndex(function(e){return"dash"===e.toLowerCase()}),l=C(-1!==o?i.slice(0,o+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return v=e.sent,e.next=11,v.text();case 11:m=e.sent,f=new DOMParser,g=f.parseFromString(m,"application/xml"),h=(null==r?void 0:r.duration())||(null===(u=a.getCurrentVideo())||void 0===u||null===(s=u.video)||void 0===s?void 0:s.runtime),y=(null==g||null===(d=g.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||l+"/",x=g.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(N=E.getElementsByTagName("SegmentTemplate")[0],k=null===(A=N.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!N||!k){e.next=48;break}if(T=k.getElementsByTagName("S"),S=parseInt(null===(j=T[0])||void 0===j?void 0:j.getAttribute("t")),B=parseInt(null===(I=T[0])||void 0===I?void 0:I.getAttribute("d")),L=E.getElementsByTagName("Representation")[0],M=L.getElementsByTagName("EssentialProperty")[0],R=M.getAttribute("value"),q=null==R?void 0:R.split("x"),D=p(q,2),$=D[0],X=D[1],!N){e.next=46;break}if(N.getAttribute("media"),F=N.getAttribute("timescale"),U=(F?B/F:B)/($*X),V=L.getAttribute("id"),_=Math.round(h/U),G=Math.ceil(_/($*X)),W=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(z=[],w=0;w<G;w++)Q="/"==(H=W)[0]?new URL(l).origin:l+"/",z.push({duration:U,layout:R,uri:Q+H.replace("$Time$",S+w*B).replace("$RepresentationID$",V)});return e.abrupt("return",z);case 46:e.next=69;break;case 48:if(Y=E.getElementsByTagName("Representation")[0],J=Y.getElementsByTagName("EssentialProperty")[0],K=J.getAttribute("value"),Z=null==K?void 0:K.split("x"),ee=p(Z,2),te=ee[0],ne=ee[1],!N){e.next=69;break}if(N.getAttribute("media"),re=N.getAttribute("duration"),ie=N.getAttribute("timescale"),ae=(ie?re/ie:re)/(te*ne),oe=Y.getAttribute("id"),le=Math.round(h/ae),ue=Math.ceil(le/(te*ne)),se=N.getAttribute("media"),ce=parseInt(N.getAttribute("startNumber"))||0,!isNaN(parseInt(ue))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],pe=P(se),w=0;w<ue;w++)ve=pe?O(pe,w+ce):se,de.push({duration:ae,layout:K,uri:y+ve.replace("$Number$",w+ce).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:w++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function P(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function O(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function S(){return(S=s(c.mark(function e(t){var n,r,i,o,l,u,s,d,p,v,m,f,g,h,b,y;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=a.getPlayer(t),s=u.currentSource(),d=s.src,d=null!==(n=d)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(i=r.player)||void 0===i?void 0:i.getSource():d,null===(o=d)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,w(d,t);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=d.substring(0,d.lastIndexOf("/"))+"/",e.next=12,j(f,m);case 12:return g=e.sent,e.next=15,N(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=d)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,I(d,t);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,N(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(m=!1,null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;v=[];var o=a.getCurrentSeries();null==o||o.map(function(e){var t;return(t=v).push.apply(t,i(e.episodes))}),null==t||null===(r=t.series)||void 0===r||r.cb}else{var l,u;v=(null==t||null===(l=t.relatedVideos)||void 0===l?void 0:l.content)||[],null==t||null===(u=t.relatedVideos)||void 0===u||u.cb}var s=a.getPlayer(e);s.on("timeupdate",function(){var e,t;if(!m){var n=Math.floor(s.currentTime()),r=s.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&a.getVideoIdx()<=(null===(t=v)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}});var c,d=v.filter(function(e,t){return t==a.getVideoIdx()});if((null==d?void 0:d.length)>0)if(null!==(c=document.getElementsByClassName("next-ep-preview"))&&void 0!==c&&c[0]){var p,g,h,b,y,x,w,E,A,N,k,j;(null===(p=document.getElementsByClassName("next-ep-preview"))||void 0===p?void 0:p[0]).style.visibility="hidden";var C=null===(g=document.getElementsByClassName("next-ep-title"))||void 0===g?void 0:g[0],I=null===(h=document.getElementsByClassName("next-ep-img"))||void 0===h?void 0:h[0],T=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],P=null===(y=d[0])||void 0===y?void 0:y.title;(null===(x=P)||void 0===x?void 0:x.length)>60&&(P=P.substr(0,60)+"..."),C.textContent="".concat(P),I.src=(null===(w=d[0])||void 0===w||null===(E=w.gist)||void 0===E||null===(A=E.imageGist)||void 0===A?void 0:A.r16x9)||(null==d||null===(N=d[0])||void 0===N?void 0:N.img)||(null===(k=window)||void 0===k||null===(j=k.customData)||void 0===j?void 0:j.fallbackImage),T.onclick=function(){return f(e)}}else{var O,S,B,L,M,R,q,D,$=document.createElement("div");$.className="next-ep-preview",$.style.visibility="hidden",document.getElementById(e).append($);var X=document.createElement("div");X.className="next-heading-wrapper";var F=document.createElement("div");F.className="next-ep-header",F.textContent="Next up";var U=document.createElement("div");U.className="next-ep-close",U.onclick=function(){$.style.visibility="hidden",m=!0},U.appendChild(a.parseSvgString(a.crossIconSvg())),X.append(F),X.append(U);var V=null===(O=d[0])||void 0===O?void 0:O.title,_=document.createElement("img");_.className="next-ep-img",_.src=(null===(S=d[0])||void 0===S||null===(B=S.gist)||void 0===B||null===(L=B.imageGist)||void 0===L?void 0:L.r16x9)||(null==d||null===(M=d[0])||void 0===M?void 0:M.img)||(null===(R=window)||void 0===R||null===(q=R.customData)||void 0===q?void 0:q.fallbackImage);var G=document.createElement("div");G.className="next-ep-title",(null===(D=V)||void 0===D?void 0:D.length)>60&&(V=V.substr(0,60)+"..."),G.textContent="".concat(V);var W=document.createElement("div");W.className="next-ep-content",W.append(_),W.append(G),W.onclick=a.debounce(function(){null==$||$.remove(),m=!0,f(e)},400),$.append(X),$.append(W)}},exports.addTVProviderImage=function(e,t){var n=a.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(r),o.alt="Provider Image",i.append(o),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}},exports.initiateTrickplay=function(e){return S.apply(this,arguments)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("axios"),i=require("video.js"),r=require("js-cookie"),l=require("@babel/runtime/helpers/toConsumableArray"),a=require("@babel/runtime/helpers/slicedToArray"),u=require("@viewlift/comscore/index.js"),s=require("@babel/runtime/helpers/typeof");function d(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function c(e,n){d("event",e,n)}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");var v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function p(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 f(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var m={name:"@viewlift/player",version:"2.0.61",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/comscore":"^0.0.4",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=m.version;var g,h=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":T.get()+"".concat(null==v?void 0:v.getVideoDetails)},w=function(e,n){var t,i,r,l;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):o({url:h(),params:f({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":m.version,"x-player-name":"videojs"},withCredentials:!0})},y=function(e,n){var t,i,r,l;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):o({url:T.get()+v.getLinearChannelDetails,params:f(f(f(f(f({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},b=function(e,n){var t,i,r=F(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):o({url:T.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},I=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:return i=e.sent,e.abrupt("return",o({url:T.get()+"".concat(null==v?void 0:v.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:f({},n),params:f({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),C=function(e,n){var t,i,r=window.contentType;return o({method:"GET",url:T.get()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},E=function(e){var n=e.videoId;return o({method:"GET",url:T.get()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},T=(g=null==v?void 0:v.apiBaseUrl,{set:function(e){e&&(g=e)},get:function(){return g}}),k=function(e,n,t,i){return o({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},S=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},O=null;function L(){return{set:function(e){e&&(O=e)},get:function(){return O}}}var x,P,_,D,j,A,V,R=function(){var e=n(t.mark(function e(){var n,i,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),i=T.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),M=null,N=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!S(n)){e.next=6;break}return M||(M=R().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&L().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){M=null})),e.abrupt("return",M);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),B=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},F=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},W=[],U=function(e){P=e},q=(A=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;A.set(t,(A.get(t)||0)+1)},get:function(e){return A.get(e)},clear:function(){A.clear()}}),Z=function(){return P},G=function(e){x=e},z=function(){return x},Y=function(e){_=e},Q=function(){return j},K=function(e){if(D){var n=D.get(e);Y(n+1)}},J=(V=0,{set:function(e){e>=0&&(V=e)},get:function(){return V}}),X=function(e){W=e},$=function(){return W};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 ne(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ee(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var te=function(){var e,n,t,o,i,r,l,a=Z();return"linearchannel"===((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function oe(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function ie(){return re.apply(this,arguments)}function re(){return re=n(t.mark(function e(){var n,o,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:if(n=e.sent,o=F(n),!(i=null==o?void 0:o.userId)){e.next=9;break}return e.abrupt("return",i);case 9:return i=oe(),window.sessionStorage.setItem("uid",i),e.abrupt("return",i);case 12:case"end":return e.stop()}},e)})),re.apply(this,arguments)}function le(){return ae.apply(this,arguments)}function ae(){return ae=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}},e)})),ae.apply(this,arguments)}function ue(e){return e?String(e):""}var se=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function de(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&function(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=oe(),a="WEBSITE",u=null,s=0,d=null,p=0,f=0,m=!1,g=[],h=H(e);if(h){var w,y,b,I,C=se(function(){for(var e=h.currentTime(),n=h.buffered(),t=0;t<n.length;t++){var o=n.start(t),i=n.end(t);if(e>=o&&e<=i)return Math.round(i-e)}return 0}),E=function(){var e,n=Z(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null},k=function(){var e=n(t.mark(function e(n){var i,u,s,d,c,p,f,m,g,h,w,y;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:return h=e.sent,w=F(h),e.t0=ne,e.t1=ne,e.t2=null==w?void 0:w.site,e.t3=null==w?void 0:w.siteId,e.t4=a,e.t5=ie(),e.t6=te(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(i=n.videoPosition)&&void 0!==i?i:null,e.t11="production",e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?ue(n.adPosition):"",e.next=25,le();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=l,e.t23=null!==(u=n.ttFirstFrame)&&void 0!==u?u:null,e.t24=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t25=null!==(d=n.resHeight)&&void 0!==d?d:null,e.t26=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t27=null!==(p=n.bufferHealth)&&void 0!==p?p:null,e.t28=null!==(f=E())&&void 0!==f?f:null,e.t29=siteName,e.t30={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27,networkname:e.t28,brandname:e.t29},e.t31=(null==n?void 0:n.duration)&&{duration:n.duration},e.t32=(0,e.t1)(e.t30,e.t31),e.t33=null==r||null===(m=r.beacon)||void 0===m?void 0:m.params,e.t34=(0,e.t0)(e.t32,e.t33),y=[e.t34],o({url:(null==r||null===(g=r.beacon)||void 0===g?void 0:g.url)||T.get()+v.getBeaconUrl,method:"post",headers:{Authorization:h},contentType:"application/x-www-form-urlencoded",dataType:"text",data:y}).catch(function(e){return console.error(e)});case 43:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),S=function(e){if(!h.paused()&&h.readyState()>2)return clearInterval(u),clearInterval(d),e;var n,t=e+.1;return+t.toFixed(2)>=5&&f<4&&m?(f++,c("BUFFERING",ne({pfm:a,uid:ie(),vid:te(),videoPosition:Math.floor(h.currentTime)},null==r||null===(n=r.beacon)||void 0===n?void 0:n.params)),k({eventName:"BUFFERING",videoPosition:Math.floor(h.currentTime),isAdEvent:!1}),0):t};w=Math.floor(h.currentTime),h.on("error",function(){var e,n=Math.floor(h.currentTime);clearInterval(u);var t=w===n?"FAILED_TO_START":"DROPPED_STREAM";c(t,ne({pfm:a,uid:ie(),vid:te(),videoPosition:n},null==r||null===(e=r.beacon)||void 0===e?void 0:e.params)),k({eventName:t,videoPosition:n,isAdEvent:!1})}),y=!1,h.on("waiting",se(function(){m&&(y=!0,clearInterval(u),u=setInterval(function(){y&&!h.paused()?p=S(p):clearInterval(u)},100))})),h.on("playing",se(function(){y=!1,clearInterval(u)})),b=function(e){var n,t,o,i=ne({videoPosition:Math.floor(h.currentTime),isAdEvent:!0,bufferHealth:C(),pfm:a,uid:ie(),vid:te(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==r||null===(o=r.beacon)||void 0===o?void 0:o.params);c(e,ne({},i)),k(ne({eventName:e,adPosition:1},i))},h.on("adstart",function(){b("AD_REQUEST"),b("AD_IMPRESSION")}),h.on("adskip",function(){s=0}),h.on("adend",function(){s=0}),h.on("timeupdate",function(){var e,n,t,o,i=Math.floor(h.currentTime());if(i>=30&&i%30==0&&!g.includes(i)){var r,l=null===(r=h.el().getElementsByTagName("video"))||void 0===r?void 0:r[0];f=0,g.push(i),k({eventName:"PING",videoPosition:i,isAdEvent:!1,duration:30,resHeight:(null==l?void 0:l.videoHeight)||null,resWidth:(null==l?void 0:l.videoWidth)||null,bufferHealth:C(),bitrate:Math.round((null==h||null===(e=h.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)})}}),I=se(function(){var e;s=0,d=setInterval(function(){s=S(s)},100),c("PLAY",ne({pfm:a,uid:ie(),vid:te(),videoPosition:Math.floor(h.currentTime)},null==r||null===(e=r.beacon)||void 0===e?void 0:e.params)),k({eventName:"PLAY",videoPosition:Math.floor(h.currentTime),isAdEvent:!1}),i&&i("started_video_playback",{"Video ID":te(),watchTime:Math.floor(h.currentTime)})}),h.one("play",I),h.on("loadeddata",function(){h.one("timeupdate",function(){var e;clearInterval(d),clearInterval(u),p=s||0,c("FIRST_FRAME",ne({pfm:a,uid:ie(),vid:te(),videoPosition:Math.floor(h.currentTime),ttFirstFrame:s,bufferHealth:C()},null==r||null===(e=r.beacon)||void 0===e?void 0:e.params)),k({eventName:"FIRST_FRAME",videoPosition:Math.floor(h.currentTime),isAdEvent:!1,ttFirstFrame:s,bufferHealth:C()}),m=!0,s=0})})}else console.error("Videojs: Player instance not found.")}(e,i,r)}var ce=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},ve=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},pe=function(e,n){var t=new Map;E({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),j=t}).catch(function(e){return console.log(e)})},fe=function(){var e=J.get();return e>=0?e+1:1},me=function(){var e,n,t,o=z(),i=Z(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=J.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function ge(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 he(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ge(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var we=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ye=function(e){var n=be(e,"video.tags",[]),t=be(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},be=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},Ie=function(){var n,t,o,i,l,a,u,s,d,c,v,p,f,m,g,h,w,y,b,I,C,E,T,k,S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",O=arguments.length>1?arguments[1]:void 0,L=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return S;var x=(null==L?void 0:L.siteName)||(null==L?void 0:L.site)||"",P=(null==L?void 0:L.contentType)||"video",_=(null==L||null===(o=L[P])||void 0===o?void 0:o.metadata)||(null==L||null===(i=L[P])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.metadata),D=H(O);if(!S.includes("VIEWLIFT_"))return S;var j,A=window.getComputedStyle(document.getElementById(O),null),V=Math.trunc(A.getPropertyValue("height").slice(0,-2)),R=Math.trunc(A.getPropertyValue("width").slice(0,-2)),M="linearchannel"===P?null==L||null===(a=L.linearchannel)||void 0===a||null===(u=a.channels)||void 0===u||null===(s=u.find(function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)}))||void 0===s||null===(d=s.content)||void 0===d?void 0:d.id:be(L,"video.gist.id",""),N="linearchannel"===P?null==L||null===(c=L.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(p=v.find(function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)}))||void 0===p?void 0:p.title:be(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),B=null,F=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",function(e){B=null==e?void 0:e.gppString,F=null==e?void 0:e.sectionList[0]}));var W=he(he({},Ce(_)),{},(E={VIEWLIFT_WIDTH:R,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:we(R,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(f=window)||void 0===f?void 0:f.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:be(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:be(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:be(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==D||null===(m=D.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==D||null===(g=D.options_)||void 0===g?void 0:g.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==x||"usanetwork"==x?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ye(L),VIEWLIFT_MEDIA_ID:M,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(be(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:M,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+be(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:r.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:be(null===(h=window)||void 0===h||null===(w=h.app_data)||void 0===w||null===(y=w.site)||void 0===y?void 0:y.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==x||"usanetwork"==x?"":be(null===(b=window)||void 0===b||null===(I=b.app_data)||void 0===I||null===(C=I.site)||void 0===C?void 0:C.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*be(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:be(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:M,VIEWLIFT_CONTENT_TITLE:N,VIEWLIFT_CONTENT_SERIES_TITLE:be(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:be(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:me(),VIEWLIFT_SEASON_NUMBER:fe(),VIEWLIFT_CONTENT_TAGS:ye(L),VIEWLIFT_GPP_SID:F||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:B||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(E,"VIEWLIFT_LAT",""),e(E,"VIEWLIFT_APP_BUNDLE",""),e(E,"VIEWLIFT_ATT_CONSENT",""),E),null===(T=window)||void 0===T||null===(k=T.customData)||void 0===k?void 0:k.macros);for(var U in W){var q=new RegExp(U,"g");S=S.replace(q,W[U])}return S},Ce=function(e){var n,t,o,i,r,l,a={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,d=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||d?(ve()?s?a=he(he({},a),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):d&&(a=he(he({},a),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?a=he(he({},a),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):d&&(a=he(he({},a),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?a=he(he({},a),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):d&&(a=he(he({},a),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),a=ve()?he(he({},a),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):he(he({},a),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(a=he(he({},a),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),a=ve()?he(he({},a),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):he(he({},a),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),a=he(he({},a),{},{VIEWLIFT_AFID:u.get("afid"),VIEWLIFT_NIELSEN_APP_ID:u.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:u.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:u.get("VIEWLIFT_GRACE_NOTE_ID")||""})},Ee=function(e,n){var t,o,i,r,l,a,u,s,d,c,v,p,f,m=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[m])||void 0===t?void 0:t.drmEnabled,h=null==e||null===(o=e[m])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,w=null==e||null===(r=e[m])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[m])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(d=e[m])||void 0===d||null===(c=d.liveDetails)||void 0===c||c.isDvrEnabled;var b=(null==e||null===(v=e[m])||void 0===v||null===(p=v.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=w&&w.hls)return ke(w);if(g){var I=Se(h,n);return I.src=Ie(I.src,n,e),I}if("Safari"!==ce()&&b)return Te(h);if(y){var C=ke(h);return C.src=Ie(C.src,n,e),C}if(null!=h&&h.mpeg){var E=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(h);return E.src=Ie(E.src,n,e),E}return null},Te=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ke=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},Se=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,o=e.fairPlayCmaf||e.fairPlay,r=e.widevine,l=e.playReady,a=ce();if(H(n),"Safari"===a){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(o);return Oe(n),u}var s,d={src:r.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(Oe(n),d.keySystems={"com.widevine.alpha":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(d.keySystemOptions=[],d.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),d.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(d.keySystemOptions=[],d.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),d.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),d};var Oe=function(e){var n=H(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==ce()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Le=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},xe=function(e){return new Promise(function(n,t){if(Pe(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},Pe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},_e=function(e,n){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},De=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var je=function(e,n){var t,o,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(t=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===t||null===(o=t[0])||void 0===o||null===(i=o.style)||void 0===i||i.setProperty("display","flex"));for(var r=H(e).textTracks(),l=0;l<r.length;l++){var a=r[l];"subtitles"!==a.kind&&"captions"!==a.kind||a.id!=n||(a.mode="showing")}},Ae=function(e,n){for(var t=H(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},Ve=function(e){var n,t=H(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter(function(e){return"subtitles"==e.kind||"captions"===e.kind}))||[]},Re=function(e){var n=H(e);n.remoteTextTracks().tracks_.map(function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)})},Me=function(e,n){var t=H(e);t.remoteTextTracks().tracks_.map(function(e){t.removeRemoteTextTrack(e)}),n.map(function(e){t.addRemoteTextTrack({src:e.url,srclang:e.srclang,label:e.label||(null==e?void 0:e.language)})})},Ne=!1,Be=function(e,n,t){var o=Ie(n,e,t),i=H(e);if(n&&window.google){if("function"!=typeof i.ima)return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r=H(e);if(null!==r.el_){Ne=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),Ne&&null!==r.el_&&("function"==typeof r.ima?r.ima(l):setTimeout(function(){r.ima.setContentWithAdTag(null,n,!0),r.ima.requestAds()},1e3));var a=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&a.hasAttribute("controls")&&a.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),r.one(u,function(){s&&r.ima.initializeAdDisplayContainer()});var d=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",function(){d&&d({status:"STARTED",msg:"Advertisement Started"})}),r.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){d&&d({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){d&&d({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),r.on("adserror",function(e){d&&d({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}},Fe=["live","carousel","V2","defaultV2","multiplayer","minimalist","VL_ONE","news"],He=function(e){return!Fe.includes(e)},We=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},Ue="http://www.w3.org/2000/svg";var qe=function(e){l(document.querySelectorAll("[video-idx]")).map(function(n){var t=n.getAttribute("video-idx");n.style.border=t==e?"2px solid white":"none"})},Ze=function(e){return e&&!e.includes("?impolicy")?e+"?impolicy=resize&w=1920&h=1080":null},Ge="",ze=function(e,n){var t;if(n){var o=document.getElementById(e),i=null===(t=window.getComputedStyle(o,null))||void 0===t?void 0:t.height;n.style.height!==i&&(n.style.height="".concat(i))}};function Ye(e,n){var t=null,o=null;return function(){for(var i=this,r=arguments.length,l=new Array(r),a=0;a<r;a++)l[a]=arguments[a];o?(clearTimeout(t),t=setTimeout(function(){Date.now()-o>=n&&(e.apply(i,l),o=Date.now())},n-(Date.now()-o))):(e.apply(this,l),o=Date.now())}}var Qe=function(){return'<svg width="16" height="16" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.04907e-06 -1.22392e-06L2 -1.04907e-06L2.00098 12L0 12L1.04907e-06 -1.22392e-06ZM14 11.6553C14 11.8026 13.8355 11.8903 13.7129 11.8086L5.23047 6.15332C5.12096 6.08031 5.12096 5.91968 5.23047 5.84668L13.7129 0.191406C13.8355 0.109694 14 0.197416 14 0.344727L14 11.6553Z" fill="white"/></svg>'};var Ke,Je=(Ke=!0,{enable:function(){Ke=!0},disable:function(){Ke=!1},get enabled(){return Ke}}),Xe="ssai-breakStart",$e="ssai-adImpression",en="ssai-firstQuartile",nn="ssai-midpoint",tn="ssai-thirdQuartile",on="ssai-complete",rn="ssai-breakEnd",ln={breakStart:Xe,impression:$e,firstQuartile:en,midpoint:nn,thirdQuartile:tn,complete:on,breakEnd:rn};function an(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=H(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=ln[o];i&&t.trigger(i,n)}function un(e){var n=H(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Xe,e)},adImpression:function(e){return t($e,e)},adFirstQuartile:function(e){return t(en,e)},adMidpoint:function(e){return t(nn,e)},adThirdQuartile:function(e){return t(tn,e)},adComplete:function(e){return t(on,e)},adBreakEnd:function(e){return t(rn,e)}}}function sn(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 dn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?sn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):sn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var cn,vn=(cn=null,{get:function(){return cn},set:function(e){cn=e}});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 fn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?pn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):pn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function mn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return gn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?gn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,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,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function gn(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 hn,wn=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),yn=(hn=null,{set:function(e){hn=e},get position(){return hn}});function bn(e,n){return In.apply(this,arguments)}function In(){return(In=n(t.mark(function e(n,o){var i,r,l,u,s,d,c,v,p,f,m,g,h,w,y,b,I,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return H(n),l=Ee(o,n),u=l.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(r=i.streamingInfo)||void 0===r||r.isLiveStream,d=u.replace("/dash/","/session/").replace("/master/","/session/"),d=Ie(d,n,o),c=En(d),v=a(c,2),p=v[0],f=v[1],m=Cn(f)||{},d=new URL(d.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=a(e,2),t=n[0],o=n[1];d.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(fn({adsParams:fn({},p)},m))});case 14:return g=e.sent,e.next=17,g.json();case 17:return h=e.sent,w="https://"+new URL(d).hostname,y=h.trackingUrl,b=h.manifestUrl,I=w+y,C=w+b,wn.set(I),console.log("%c TRACKING URL","background: #bdf369; color: #000",I),l.src=C,e.abrupt("return",l);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",l);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function Cn(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=a(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function En(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=mn((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=a(t.value,2),l=r[0],u=r[1];n[decodeURIComponent(l)]=decodeURIComponent(u||"")}}catch(e){i.e(e)}finally{i.f()}for(var s={},d={},c=0,v=Object.entries(n);c<v.length;c++){var p=a(v[c],2),f=p[0],m=p[1];if(f.startsWith("ads."))s[f.replace(/^ads\./,"")]=m;else d[f]=m}return[s,d]}var Tn,kn,Sn,On,Ln=(Tn=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Tn=Array.isArray(e)?l(e):Tn},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Tn),l(Tn)}}),xn=new Map;function Pn(e,n){return _n.apply(this,arguments)}function _n(){return _n=n(t.mark(function e(o,i){var r,a,u,s,d,c,v,p,f,m,g,h,w,y,b,I,C,E,T,k,S,O;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:O=function(e,n,t,i,r,l){var a=H(o);if(!a.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(a.currentTime());var u,s=mn(t);try{var d=function(){var t,s,d,c=u.value,v=c.eventType,p=c.beaconUrls,f=c.startTimeInSeconds,m=c.startTime,g=c.durationInSeconds,h=f||0,w=p,y=(null===(t=window)||void 0===t||null===(s=t.customData)||void 0===s||null===(d=s.ads)||void 0===d?void 0:d.adEventHandler)||null,b="".concat(h,"_").concat(v),I=xn.get("pod-".concat(r))||[];if(console.warn(e,h,"map:",v,"condition1:",e>=h,"map:",xn),e>=h&&!I.includes(b)){I.push(b),xn.set("pod-".concat(r),I);try{S(v,n,w,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var C=yn.position;yn.set(null),setTimeout(function(){null!=C&&(a.currentTime(C),l())},500)}if("function"==typeof y)try{var E,T={eventType:v,startTimeInSeconds:f,startTime:m,durationInSeconds:g,ad:null==n||null===(E=n.ads)||void 0===E?void 0:E[i],pod:n,adIndex:i};y({adsData:T}),an(o,T)}catch(e){console.error("Error when calling ads callback:",e)}var k=vn.get();if(k&&0!==Object.keys(k).length){var O=k||{},L=O.formulateComscoreAdPayload,x=O.startComscoreAdTracking,P=O.finishComscoreAdTracking,_=O.endComscoreAdTracking;if("impression"===v){var D,j=wn.get();x(L(fn(fn({},null==n||null===(D=n.ads)||void 0===D?void 0:D[i]),{},{trackingUrl:j})))}else"complete"===v?P():"breakEnd"===v&&_()}}};for(s.s();!(u=s.n()).done;)d()}catch(e){s.e(e)}finally{s.f()}}},S=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)})})},k=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},xn.clear(),yn.set(i),f=wn.get(),(m=H(o)).one("loadeddata",function(){f&&T(f)}),g=new Map,h=new Map,w=-1,y=(null===(r=document)||void 0===r||null===(a=r.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,b=(null==m||null===(u=m.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,I=(null==m||null===(s=m.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,C=(null==m||null===(d=m.el())||void 0===d||null===(c=d.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,E=(null==m||null===(v=m.el())||void 0===v||null===(p=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,T=function(){var e=n(t.mark(function e(n){var r,a,u,s,d,c,v,p,f,m,T,S,L,x,P,_,D,j,A,V,R,M,N,B;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return V=function(e){document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",V),0===e.button&&D()},A=function(e){},j=function(){var e,n=m.currentTime(),t=null,o=mn(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,g.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){m.currentTime(t+2.2)},100))},D=function(){var e,n=m.currentTime(),t=null,o=mn(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,u=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>u||n>r)&&!g.has(r)||n>=r&&n<=u)&&(t=r,g.set(r,!0),h.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){m.currentTime(t+.4)},100))},d=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),p=v.avails,f=[],m=H(o),T=m.controlBar.progressControl,S=T.seekBar.el(),null===(r=document)||void 0===r||r.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,n){var t,o,i;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(d=!0),f.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===(i=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===i?void 0:i[0])||[]})}),!d&&i&&(m.currentTime(i),j()),null!=f&&f.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),window.adsQueueList=f,"function"==typeof(_=(null===(L=window)||void 0===L||null===(x=L.customData)||void 0===x||null===(P=x.ads)||void 0===P?void 0:P.onAdBreaksLoaded)||null)&&(null==f?void 0:f.length)>0&&_(f)),console.log(f,"data"),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",S.appendChild(r)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=Ye(function(){var e=m.currentTime();if(e!==w){w=e;for(var n=!1,t=function(){var t=f[o],i=t.startTimeInSeconds,r=t.durationInSeconds,a=t.ads,u=i+r;if(e>=i-1.2&&e<=u+1.2){e>=i&&e<=u&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>u&&g.set(i,!0),Je.disable(),y&&y.classList.add("vjs-hidden"),C&&(C.style.pointerEvents="none",C.classList.add("vjs-hidden")),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),T.el().classList.add("hide-progress-bar");for(var s=e-i,d=0,c=0,v=0;v<a.length;v++){var p,m=null==a||null===(p=a[v])||void 0===p?void 0:p.durationInSeconds;if(s<d+m){c=v;break}d+=m}a[c];var w=Math.max(0,r-s),S=Math.round(w);R.style.display="block",B.textContent="".concat(c+1," of ").concat(a.length," • ").concat(k(S));var L=[];return null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});L.push.apply(L,l(n))}),Array.isArray(a)&&0==(null==a?void 0:a.length)&&L.push(null==t?void 0:t.podSlotImpressionBeacon),O(e,t,L,c,o,j),"break"}h.delete(i)},o=0;o<f.length;o++){if("break"===t())break}n||(R.style.display="none",T.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),y&&y.classList.remove("vjs-hidden"),C&&(C.style.pointerEvents="auto",C.classList.remove("vjs-hidden")),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),Je.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){Je.enabled&&"ArrowRight"==e.key&&(D(),qn(o,10),e.stopPropagation())}),T.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",V))}),null===(u=document)||void 0===u||null===(s=u.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach(function(e){return null==e?void 0:e.remove()}),(R=document.createElement("div")).className="ssai-ad-container",(M=document.createElement("div")).className="sponsored-adbox",(N=document.createElement("div")).className="sponsored-text",N.textContent="Sponsored Ad",M.append(N),(B=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",R.append(M),R.append(B),m.el().appendChild(R);case 45:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}},e)})),_n.apply(this,arguments)}function Dn(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 jn(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)?jn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,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,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function jn(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 An(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 Vn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?An(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):An(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Rn={},Mn=(null===(kn=window)||void 0===kn||null===(Sn=kn.location)||void 0===Sn||null===(On=Sn.search)||void 0===On?void 0:On.includes("debug=true"))||!1,Nn=null;function Bn(e){return Fn.apply(this,arguments)}function Fn(){return Fn=n(t.mark(function e(o){var i,r,a,u,s,d,c,v,p,f,m,g,h,w,y,b,I,C,E,T,k,S,O,L,x,P,_;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:_=function(e,n,t,i,r){var l,a,u=null==n||null===(l=n.ads)||void 0===l||null===(a=l[i])||void 0===a?void 0:a.adId,s=H(o);if(!s.seeking()){var d=n.startTimeInSeconds;n.durationInSeconds,Math.floor(s.currentTime());var c,v=Dn(t);try{for(v.s();!(c=v.n()).done;){var p,f,m,g=c.value,h=g.eventType,w=g.beaconUrls,y=g.startTimeInSeconds,b=g.startTime,I=g.durationInSeconds,C=(g.eventId,y||0),E=w,T=(null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(m=f.ads)||void 0===m?void 0:m.adEventHandler)||null,k="".concat(u,"_").concat(h),S="pod-".concat(d);L.has(S)||L.set(S,new Set);var O=L.get(S);if(Mn&&console.warn(e,C,"map:",h,"condition1:",e>=C,"map:",L),e>=C&&e<=C+x&&!O.has(k)){O.add(k);try{P(h,n,E,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,h,n)}if("function"==typeof T)try{var _,D={eventType:h,startTimeInSeconds:y,startTime:b,durationInSeconds:I,ad:null==n||null===(_=n.ads)||void 0===_?void 0:_[i],pod:n,adIndex:i};T({adsData:D}),an(o,D)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){v.e(e)}finally{v.f()}}},P=function(e,n,t,o){var i,r;"breakEnd"===e&&(null===(i=Rn)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=Rn)||void 0===r?void 0:r.totalAds)||(Mn&&(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)})}))},m=function(){Nn&&clearInterval(Nn)},p=wn.get(),(f=H(o)).one("loadeddata",function(){m(),Nn=setInterval(function(){p&&!f.paused()&&O(p)},2e3)}),f.on("dispose",function(){m()}),g=new Map,h=new Map,w=-1,y=null,b=(null===(i=document)||void 0===i||null===(r=i.getElementsByClassName("tvProviderImage"))||void 0===r?void 0:r[0])||null,I=(null==f||null===(a=f.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,C=(null==f||null===(u=f.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,E=(null==f||null===(s=f.el())||void 0===s||null===(d=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===d?void 0:d[0])||null,T=(null==f||null===(c=f.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===v?void 0:v[0])||null,k=!1,S=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return l(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,u=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],s=null==u||null===(n=u.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var c=null==s?void 0:s.map(function(e){return Vn(Vn({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=c&&c[0]&&i.push(null==c?void 0:c[0])}return i},O=function(){var e=n(t.mark(function e(n){var i,r,a,u,s,d,c,v,p,f,m,O,L,x;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=new URL(n),y&&r.searchParams.append("nextToken",y),e.next=4,fetch(r.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:u=e.sent,s=u.avails,d=u.nextToken||null,y=d,c=[],v=H(o),p=v.controlBar.progressControl,f=p.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),s.map(function(e,n){c.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:S(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),Mn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",c),null!=c&&c.length&&(window.adsQueueList=c,"function"==typeof(x=(null===(m=window)||void 0===m||null===(O=m.customData)||void 0===O||null===(L=O.ads)||void 0===L?void 0:L.onAdBreaksLoaded)||null)&&(null==c?void 0:c.length)>0&&x(c)),c.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=v.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",f.appendChild(r)}}),v._timeUpdateHandler&&v.off("timeupdate",v._timeUpdateHandler),v._timeUpdateHandler=Ye(function(){var e=v.currentTime();if(e!==w){w=e;for(var n=function(){var n=c[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,a=o+i;if(e>=o-1.2&&e<=a+1.2){var u;k=!!(e>=o&&e<=a&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>a&&g.set(o,!0),Je.disable(),b&&b.classList.add("vjs-hidden"),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),T&&(T.style.pointerEvents="none",T.classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),C&&(C.el().style.pointerEvents="none",C.el().classList.add("vjs-hidden")),p.el().classList.add("hide-progress-bar");for(var s=e-o,d=0,v=0,f=0;f<r.length;f++){var m,w=null==r||null===(m=r[f])||void 0===m?void 0:m.durationInSeconds;if(s<d+w){v=f;break}d+=w}setTimeout(function(){Rn.totalAds=null==r?void 0:r.length,Rn.currentAdIndex=v},1e3);var y=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});y.push.apply(y,l(n))}),(null==n||null===(u=n.podSlotImpressionBeacon)||void 0===u?void 0:u.length)>0&&y.push.apply(y,l(null==n?void 0:n.podSlotImpressionBeacon)),_(e,n,y,v),"break"}h.delete(o)},t=0;t<c.length;t++){if("break"===n())break}k||(Rn={},p.el().classList.remove("hide-progress-bar"),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),C&&(C.el().style.pointerEvents="auto",C.el().classList.remove("vjs-hidden")),b&&b.classList.remove("vjs-hidden"),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),T&&(T.style.pointerEvents="auto",T.classList.remove("vjs-hidden")),Je.enable())}},1e3),v.on("timeupdate",v._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,x=2.5;case 22:case"end":return e.stop()}},e)})),Fn.apply(this,arguments)}function Hn(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}var Wn=function(e){i(e).play()},Un=function(e){i(e).pause()},qn=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},Zn=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},Gn=function(e){return!!i.getPlayer("".concat(e))},zn=function(){var e=n(t.mark(function e(o,i){var r,l,a,u=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]&&u[2],e.next=3,N();case 3:return l=e.sent,a=H(o),e.abrupt("return",new Promise(function(e,u){var s=(null==i?void 0:i.programs)||[];null==i||delete i.programs,y(i,l).then(function(){var l=n(t.mark(function n(l){var u,d,c,v,p,f,m,g;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(f=null==l?void 0:l.data,window.sid=oe(),f.contentType="linearchannel",f.channelId=null==i?void 0:i.channelId,m=(null==f||null===(u=f.linearchannel)||void 0===u?void 0:u.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(c=d.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(p=v.adsConfig)||void 0===p?void 0:p.vodAdSticherProvider)||!1,g=Ee(f,o),!m){n.next=11;break}return n.next=9,bn(o,f);case 9:g=n.sent,r=!0;case 11:U(f),X(s),sessionStorage.setItem("program_switched",!0),g&&r?(Xn(o,g),m&&Bn(o),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:f})})):e({status:!0,msg:"Feed authenticated",response:f});case 15:case"end":return n.stop()}},n)}));return function(e){return l.apply(this,arguments)}}()).catch(function(e){u({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Yn=function(){var e=n(t.mark(function e(o,i,r){var l,a,u,s,d,c,v;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:return s=e.sent,(z()||null)&&K(i),d=0,c=0,v=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(u=a.watchHistory)&&void 0!==u&&u.enable&&C(i,s).then(function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),d=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(c=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(v=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,r){w(i,s).then(function(){var i=n(t.mark(function n(i){var l,a,u,s,p,f,m,g,h,w,y,b,I,C,E,T,k,S,O,L,x,P,_,D,j,A,V,R,M,N,B,F,W,q,Z,G,z,Y;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(T=null==i?void 0:i.data,k=(null==T?void 0:T.contentType)||"video",S=(null==T||null===(l=T[k])||void 0===l?void 0:l.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(a=window)||void 0===a||null===(u=a.app_data)||void 0===u||null===(s=u.appcmsMain)||void 0===s||null===(p=s.adsConfig)||void 0===p?void 0:p.vodAdSticherProvider)||!1,O=(null==T||null===(f=T.video)||void 0===f||null===(m=f.streamingInfo)||void 0===m?void 0:m.isLiveStream)||!1,U(i.data),(L=(null==T||null===(g=T.ads)||void 0===g||null===(h=g.preRoll)||void 0===h||null===(w=h.adTags)||void 0===w||null===(y=w.web)||void 0===y?void 0:y.active)&&(null==T||null===(b=T.ads)||void 0===b||null===(I=b.preRoll)||void 0===I||null===(C=I.adTags)||void 0===C||null===(E=C.web)||void 0===E?void 0:E.url))&&Be(o,L,T),x=Ee(T,o),!S){n.next=12;break}return n.next=11,bn(o,T);case 11:x=n.sent;case 12:x?(F=(null==T||null===(P=T.video)||void 0===P||null===(_=P.gist)||void 0===_?void 0:_.videoImageUrl)||(null==T||null===(D=T.video)||void 0===D||null===(j=D.gist)||void 0===j||null===(A=j.imageGist)||void 0===A?void 0:A.r16x9),(W=H(o)).poster(F),Xn(o,x),S&&Pn(o,v),W.on("loadstart",function(){O&&e({status:!0,msg:"Video Loaded",response:T})}),W.on("loadeddata",function(){De(),e({status:!0,msg:"Video Loaded",response:T})}),W.one("play",function(){d&&!S&&c<95&&setTimeout(function(){W.currentTime(d)},0)}),W.one("error",function(){var e;r({status:!1,msg:(null==W||null===(e=W.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==T||null===(V=T.video)||void 0===V||null===(R=V.contentDetails)||void 0===R||null===(M=R.closedCaptions)||void 0===M?void 0:M.length)>0||(null==T||null===(N=T.video)||void 0===N||null===(B=N.closedCaptions)||void 0===B?void 0:B.length)>0?(Y=(null==T||null===(Z=T.video)||void 0===Z||null===(G=Z.contentDetails)||void 0===G?void 0:G.closedCaptions)||(null==T||null===(z=T.video)||void 0===z?void 0:z.closedCaptions),q=Y.filter(function(e){return"VTT"===e.format}),Me(o,q)):Re(o)):(_e(o,"Incompatible Source, only hls,mp4,drm content is allowed"),r("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){$n(e,o,r,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),Qn=function(e,n,t){var o=H(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Kn=function(e){var n=(vn.get()||{}).destroyComscoreTag,t=H(e);if(Jn(),"function"==typeof n&&n(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,t)t.dispose();else{var o=document.getElementById(e);o&&o.remove()}},Jn=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Xn=function(e,n){var t=H(e);t&&t.src(n)},$n=function(n,t,o,i){var r,l,a,u,s,d,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.errorMessage)||(null==n?void 0:n.message);Gn(t)&&_e(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(d=window)||void 0===d?void 0:d.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Hn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},et=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},nt=function(e){var n,t=H(e);return!(null!=t&&null!==(n=t.liveTracker)&&void 0!==n&&n.atLiveEdge())||null},tt=!1,ot=function(e,n,t){var o=H(e);o?n>=0&&n<=o.duration()?(t({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),o.currentTime(n)):t({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):t("Cannot find player with id: '".concat(e,"'"))},it=function(e,n){var t=H(e);t?(t.on("ended",function(){return tt=!0}),t.on("timeupdate",function(){if(!t.paused()&&tt){var e,o,i=null===(e=Z())||void 0===e||null===(o=e.video)||void 0===o?void 0:o.id;q.get(i)?(q.clear(),xn.clear(),n(),q.set(i)):(q.clear(),q.set(i)),tt=!1}})):n("Cannot find player with id: '".concat(e,"'"))},rt=function(e,n){var t=H(e);if(!t)return"Cannot find player with id: '".concat(e,"'");try{return t.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(e){return"Error: ".concat(e)}},lt=function(e,n){var t=H(e);t?t.on("timeupdate",function(){return n(t.currentTime())}):n("Cannot find player with id: '".concat(e,"'"))},at=function(e,n){var t=H(e);t?t.on("ended",function(){return n(!0)}):n("Cannot find player with id: '".concat(e,"'"))},ut=function(e){var n=H(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")};function st(){var e=function(e,n){var t=H(e);if(!t)throw"Cannot find player with id: '".concat(e,"'");if("function"!=typeof n)throw"Callback function (cb) is missing or not a function";return t};return{onPlay:function(n,t){e(n,t).on("play",function(){return t()})},onPause:function(n,t){e(n,t).on("pause",function(){return t()})},onMute:function(n,t){var o=e(n,t);o.on("volumechange",function(){o.muted()?t({muted:!0}):t({muted:!1})})},onPictureInPictureChange:function(n,t){var o=e(n,t);o.on("enterpictureinpicture",function(){t({pip:!0})}),o.on("leavepictureinpicture",function(){t({pip:!1})})},onFullScreenChange:function(n,t){var o=e(n,t);o.on("fullscreenchange",function(e){o.isFullscreen_?t({isFullscreen:!0}):t({isFullscreen:!1})})},onSetVolume:function(n,t){var o=e(n,t);o.on("volumechange",function(){var e=100*o.volume().toFixed(2);o.muted()?t({vol:0}):t({vol:e})})},onSeeked:function(n,t){var o=e(n,t);o.on("seeked",function(){t({seeked:o.currentTime()})})},onSubtitleEnable:function(n,t){var o=e(n,t);o.textTracks().on("change",function(e){console.log(o.textTracks());var n=o.textTracks().tracks_.filter(function(e){return("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode});n.length>0&&t({enabled:n[0]})})},onDisableSubtitles:function(n,t){var o=e(n,t);o.textTracks().on("change",function(e){var n,i;console.log(o.textTracks()),(null==o||null===(n=o.textTracks())||void 0===n||null===(i=n.tracks_)||void 0===i?void 0:i.every(function(e){return"showing"!=e.mode}))&&t({captions_disabled:!0})})},onSubtitleCueChange:function(n,t){var o=e(n,t);o.on("loadeddata",function(){var e,n,i,r,l,a=o.textTracks();"object"==s(o.dash)&&null!=o.dash&&o.dash.mediaPlayer.on(null===(n=window)||void 0===n||null===(i=n.dashjs)||void 0===i||null===(r=i.MediaPlayer)||void 0===r||null===(l=r.events)||void 0===l?void 0:l.CAPTION_RENDERED,function(e){t(e)});for(var u=0;u<a.length;u++){var d=a[u];"metadata"===d.kind&&(d.mode="hidden",e=d)}e&&e.addEventListener("cuechange",function(){var n=e.activeCues;if(n&&n.length>0)for(var o=0;o<n.length;o++){var i=n[o];t(i)}else console.log("no active cue at this moment")})})},onError:function(n,t){var o=e(n,t);o.on("error",function(){var e,n;t({error:null==o||null===(e=o.error())||void 0===e?void 0:e.code,msg:null==o||null===(n=o.error())||void 0===n?void 0:n.message})})}}}var dt=function(e){var n,t=H(e),o=[];if((null==t||null===(n=t.tech_)||void 0===n?void 0:n.vhs)||!1){var i,r,l=null==t||null===(i=t.tech_)||void 0===i||null===(r=i.vhs)||void 0===r?void 0:r.representations();(null==l?void 0:l.length)>0&&(o=null==l?void 0:l.sort(function(e,n){return(null==e?void 0:e.height)==(null==n?void 0:n.height)?(null==n?void 0:n.bandwidth)-(null==e?void 0:e.bandwidth):(null==n?void 0:n.height)-(null==e?void 0:e.height)}))}else{var a,u,s=null==t||null===(a=t.dash)||void 0===a||null===(u=a.mediaPlayer)||void 0===u?void 0:u.getRepresentationsByType("video");(null==s?void 0:s.length)>0&&(o=null==s?void 0:s.sort(function(e,n){return n.height-e.height}))}return o};i.getComponent("Component");var ct=function(e,n,t){var o,r=H(e),l=null==n?void 0:n.bandwidth;if((null==r||null===(o=r.tech_)||void 0===o?void 0:o.vhs)||!1){r.tech_.vhs.representations().forEach(function(e){t||e.bandwidth===l?e.enabled(!0):e.enabled(!1)}),r.handleTechPlaying_();var a=r.currentTime();r.currentTime(0),setTimeout(function(){r.currentTime(a)},100);var u=i.dom.$(".content");u&&i.dom.addClass(u,"resolution_hidden")}else{var s=null==n?void 0:n.qualityIndex;if(t){var d,c;null==r||null===(d=r.dash)||void 0===d||null===(c=d.mediaPlayer)||void 0===c||c.resetSettings()}else{var v,p,f,m;null==r||null===(v=r.dash)||void 0===v||null===(p=v.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==r||null===(f=r.dash)||void 0===f||null===(m=f.mediaPlayer)||void 0===m||m.setRepresentationForTypeByIndex("video",s,!0);var g=r.currentTime();r.currentTime(0),setTimeout(function(){r.currentTime(g)},100);var h=i.dom.$(".content");h&&i.dom.addClass(h,"resolution_hidden")}}},vt=function(e,n,t){var o=H(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},pt=function(e){var n=H(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ft={},mt=function(e){ft=e},gt=function(){var e=n(t.mark(function e(n){var o,r,l,a,u;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=H(null==n?void 0:n.playerId),null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable||!(null!=n&&n.chromecastReceiverId||null!=n&&n.airplay)){e.next=10;break}return e.prev=2,e.next=5,xe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),console.log("Error",e.t0);case 10:if(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null==n||!n.chromecastReceiverId){e.next=21;break}return e.next=13,import("@silvermine/videojs-chromecast");case 13:e.sent.default(i),(u=i.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(a=window)&&void 0!==a&&a.cast?null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=n&&n.airplay&&"Safari"==ce()?null==l||l.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return e.stop()}},e,null,[[2,7]])}));return function(n){return e.apply(this,arguments)}}(),ht=function(e,n){var t=H(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}})};var wt=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),xe("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)}}(),yt=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("@viewlift/comscore/index.js").then(function(e){vn.set(e)});case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),bt=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){i.getPlugin("eme")||i.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),It=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(i),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)}}(),Ct=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-96485ab1.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)}}(),Et=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-5173354f.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)}}(),Tt=Object.freeze({__proto__:null,importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(i)})},importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){xe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(i)}).catch(function(e){console.log(e)})})},loadAdsLibrary:wt,loadComscorePlugin:yt,loadContribDash:Et,loadDvrSeekbar:Ct,loadEMELibrary:bt,loadMuxPlugin:It});function kt(e){return St.apply(this,arguments)}function St(){return(St=n(t.mark(function e(n){var o,i,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=(null==n?void 0:n.airplay)||!1,e.next=3,wt();case 3:o&&"Safari"==ce()?Promise.resolve().then(function(){return Tt}).then(function(e){e.importAirplay()}):(r=(null===(i=document)||void 0===i?void 0:i.getElementById(null==n?void 0:n.playerId))||null)&&r.setAttribute("x-webkit-airplay","deny");case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ot(e){return Lt.apply(this,arguments)}function Lt(){return(Lt=n(t.mark(function e(n){var o,i,r,l,a,u;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=H(n.playerId),e.next=3,yt();case 3:u.comscore({publisherId:null==n||null===(o=n.comscore)||void 0===o?void 0:o.publishedId,endpoint:null==n||null===(i=n.comscore)||void 0===i?void 0:i.endpoint,implementationId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.implementationId,projectId:null==n||null===(l=n.comscore)||void 0===l?void 0:l.projectId,debug:(null==n||null===(a=n.comscore)||void 0===a?void 0:a.debug)||!1});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function xt(e,n){return Pt.apply(this,arguments)}function Pt(){return Pt=n(t.mark(function e(n,o){var i,r,l,a,u,s,d,c,v,p,f,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=(null==o?void 0:o.contentType)||"video",v=null==o||null===(i=o[c])||void 0===i?void 0:i.drmEnabled,null==o||null===(r=o[c])||void 0===r||null===(l=r.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==o||null===(a=o[c])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,f=(null==n||null===(d=n.comscore)||void 0===d?void 0:d.enable)||!1,e.prev=6,e.next=9,Promise.allSettled([v?"Safari"==ce()?bt():"caliente"!=(null===(m=window)||void 0===m?void 0:m.siteName)?Et():bt():"Safari"!=ce()&&p?Et():null,f?Ot(n):null,gt(n)]);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),console.log("Error",e.t0);case 14:case"end":return e.stop()}},e,null,[[6,11]])})),Pt.apply(this,arguments)}function _t(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 Dt(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):_t(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var jt=new Set,At=null,Vt=function(e,n,t){var o,i,r,l,a,u,s,d={},c=(null==e?void 0:e.contentType)||"video";d["c3.cm.id"]=(null===(o=e[c])||void 0===o?void 0:o.id)||"Null",d["c3.cm.contentType"]=Wt(e),d[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),d[null==t||null===(r=t.Constants)||void 0===r?void 0:r.STREAM_URL]=n.currentSrc(),d[null==t||null===(l=t.Constants)||void 0===l?void 0:l.VIEWER_ID]="undefined"===ie()?"NULL":ie(),d["c3.cm.categoryType"]=Bt(e),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===(a=e[c])||void 0===a?void 0:a.drmEnabled)||"None",d.DAIStream=null!==(u=e[c])&&void 0!==u&&null!==(s=u.gist)&&void 0!==s&&s.isSSAIEnabled?"YES":"NO",d[t.Constants.DEFAULT_RESOURCE]="AKAMAI",d["c3.cm.brand"]="NULL",d.CDVREnabled=Ft(e),d["c3.cm.genreList"]=Mt(e),d["c3.cm.genre"]=Rt(e),d["c3.cm.channel"]=Nt(e);var v=Zt(z(),e);return d=Dt(Dt({},d),v)},Rt=function(e){var n,t,o,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Mt=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"},Nt=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"},Bt=function(e){return(null==e?void 0:e.contentType)||"null"},Ft=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},Ht=function(e,n){var t,o,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var r=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[r])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},Wt=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Ut,qt,Zt=function(e,n){var t,o,i,r,l,a={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return a;var u=fe(),s=me();return a["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(o=t.series)||void 0===o?void 0:o.title)||"Null",a["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",a["c3.cm.showTitle"]=(null==e||null===(i=e[u-1])||void 0===i||null===(r=i.episodes)||void 0===r||null===(l=r[s-1])||void 0===l?void 0:l.title)||"Null",a["c3.cm.episodeNumber"]=(null==s?void 0:s.toString())||"Null",a},Gt=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"}},zt=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Yt=function(){var e=n(t.mark(function e(n,o){var i,r,l,a,u,s,d,c,v,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},r=i.trackConvivaPlayerEvent,l=i.paymentHandler,a=i.tveProvider,u=i.enable,s=i.appName,d=(o||{}).token,u){e.next=4;break}return e.abrupt("return");case 4:if(c=H(n),"function"==typeof(v=r)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(p=e.sent){e.next=13;break}return e.abrupt("return");case 13:c.ready(function(){var e=c.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Gt(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),c.on("loadstart",function(){var e,n;At&&At!==c.currentSrc()&&v("playbackEnded"),v("setPlayer",c),jt.clear(),At=c.currentSrc();var t=zt(c.currentType()),i=Z(),r=Vt(i,c,p);r[null==p||null===(e=p.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",r[null==p||null===(n=p.Constants)||void 0===n?void 0:n.ASSET_NAME]=Ht(i,o),r.authToken=d||"NULL",r.streamType=t,r.D2CType=l||"NONE",r.subscriberType=a||(l?"D2C":"FREE"),r["c3.cm.affiliate"]=a||"NULL",Qt.setData(r),v("contentInfo",r)}),c.on("loadedmetadata",function(){var e,n=c.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),c.on("play",function(){jt.has(c.currentSrc())||(jt.add(c.currentSrc()),v("playbackStarted",null))}),c.on("ended",function(){jt.has(c.currentSrc())&&jt.delete(c.currentSrc()),v("playbackEnded")}),c.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:c,adsLoader:null==e?void 0:e.adsLoader})}),c.on("dispose",function(){null==jt||jt.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Qt=(Ut={},{setData:function(e){Ut=Dt(Dt({},Ut),e)},getData:function(){return Ut}}),Kt=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-478ea1b8.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-fd24aa07.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-9d949da3.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-73a196b3.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-c3d3212b.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-cd95e0c1.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t&&Promise.resolve().then(function(){return require("./skin-476afafd.js")}).then(function(t){t.initialiseSkin(e,n)})};function Jt(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 Xt(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Jt(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var $t=[],eo=0,no=null;function to(){console.log("Cleaning up watch history data"),qt=null,$t=[],eo=0,no=null}function oo(n,t,o){var i,r,l,a,u,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==t||null===(i=t.watchHistory)||void 0===i||i.apiVersion;var d=null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.profileId,c=Math.floor(n.currentTime()),v=Math.floor(n.duration());null==t||null===(l=t.watchHistory)||void 0===l||l.xapiKey;var p=(null==t||null===(a=t.video)||void 0===a?void 0:a.originalObjectId)||null,f=(null==t||null===(u=t.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,m=Math.floor(n.currentTime()),g=s?100:Math.floor(c/v*100),h={};f?function(n,t,o){var i=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),r=io(i),l=(new Date).getTime(),a=Z(),u=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(n,t){return Xt(Xt({},n),{},e({},t,u[t]))},{}),d=r.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===qt});d<0?r.push(Xt(Xt({content:s},n),{},{addedDate:l,updateDate:l})):r[d]=Xt(Xt(Xt({},r[d]),n),{},{updateDate:l});localStorage.setItem("".concat(i),JSON.stringify(r))}(h={completed:s,watchedTime:m,watchedPercentage:g},d,t.siteOwner):(h=Xt(Xt({videoId:qt,watchedTime:m,watchedPercentage:g,doneWatching:s,profileId:d},no&&{seriesId:no}),p&&{originalObjectId:p}),I(h).then(function(e){}).catch(function(e){})),eo=c+o}function io(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function ro(e,n,t){var o=io(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}var lo=!1,ao=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!lo){var r=uo(e,"videoAssets","secondaryVideoAssets"),l=Ee(r,n);return l&&Xn(n,l),lo=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function uo(e,n,t){if(Array.isArray(e))return e.map(function(e){return uo(e,n,t)});if(null!==e&&"object"===s(e)){var o={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=uo(e[i],n,t)}),o}return e}function so(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 co(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)?co(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,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,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function co(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 vo(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 po(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?vo(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):vo(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var fo=function(e,n,t,o){var i,r,l,a,d,c=o.res,v=o.sres,p=H(e),f=(null==c?void 0:c.contentType)||"video",m=(null==c||null===(i=c[f])||void 0===i?void 0:i.drmEnabled)||!1,g=(null==c||null===(r=c[f])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,h=(null==c||null===(a=c[f])||void 0===a||null===(d=a.liveDetails)||void 0===d?void 0:d.isDvrEnabled)||!1;U(c),q.set(c),p&&(p.on("loadstart",function(){g?t.resolve({status:!0,msg:"Video Loaded",response:c}):t.resolve(po({status:!0,msg:"Player Initialised"},v?{seriesResponse:v,response:c}:{response:c}))}),p.on("loadeddata",function(){var t,o,i,r=Ve(e);if(null==r||r.map(function(n){return Ae(e,n.id)}),h&&"Safari"===ce())try{var l;null==p||null===(l=p.liveTracker)||void 0===l||l.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==p||!p.muted())&&vt(e,sessionStorage.getItem("volume")||"100");var a=Z();if(function(e,n){var t,o,i,r,l,a,s,d,c,v,p,f,m=null==e?void 0:e.playerId,g=H(m),h=null==n?void 0:n.siteName;if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var w=Z(),y=(null==w||null===(o=w.video)||void 0===o?void 0:o.metadata)||[],b=(null==y?void 0:y.length)&&y.filter(function(e){return"advertisingGenre"===e.name});if(null!==(i=b)&&void 0!==i&&i.length){var I=b.map(function(e){return e.value});b=null==I?void 0:I.join(",")}u.destroyComscoreTag();var C,E,T,k=null===(r=window)||void 0===r?void 0:r.lcProgrammeDetails,S=Array.isArray(null==k?void 0:k.category)?null==k||null===(l=k.category)||void 0===l?void 0:l.join(","):(null==k?void 0:k.category)||null,O=dn(dn(dn({},null==w?void 0:w.video),null==w?void 0:w.linearchannel),{},{siteName:h,programId:(null==k?void 0:k.videotmsid)||null,programTitle:(null==k?void 0:k.lcProgrammeName)||null,episodeId:(null==k?void 0:k.videotmsid)||null,seasonNumber:(null==k||null===(a=k.seriesDetails)||void 0===a?void 0:a.season)||null,episodeNumber:(null==k||null===(s=k.seriesDetails)||void 0===s?void 0:s.episode)||null,isCompleteEpisode:!!(null!=w&&null!==(d=w.video)&&void 0!==d&&d.series||null!=k&&null!==(c=k.seriesDetails)&&void 0!==c&&c.episode),genre:b||S,comscoreConfig:{implementationId:(null==e||null===(v=e.comscore)||void 0===v?void 0:v.implementationId)||null,projectId:(null==e||null===(p=e.comscore)||void 0===p?void 0:p.projectId)||null}});if(null!=O&&null!==(f=O.streamingInfo)&&void 0!==f&&f.isLiveStream&&(O.contentType="LIVE"),null==O||!O.network){var L,x=(null==O?void 0:O.metadata)||[],P=null==x||null===(L=x.find(function(e){return"network"===e.name}))||void 0===L?void 0:L.value;O.network=P||null}null!=O&&O.network&&null!=O&&O.genre&&(O.customGenre="".concat(O.network,"_").concat((null==O?void 0:O.programTitle)||(C=O,null!=C&&C.series?null==C||null===(T=C.series)||void 0===T?void 0:T.title:null==C||null===(E=C.gist)||void 0===E?void 0:E.title),"_").concat(O.genre)),null!=k&&k.airDate&&(O.publishDate=k.airDate);var _=u.formulateComscorePayload(O,g);console.log("comscoreOptions player data",_),u.createComscoreStreamingTag(dn({playerName:"Video.js"},_)),u.setComscorePlayerInstance(g)}}(n,c),De(),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 s,d,v=po(po({},n),c);!function(e,n,t){var o,i,r;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(no=null==n||null===(i=n.series)||void 0===i?void 0:i.id),$t=[],eo=0,qt=t;var l=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.interval)||30,a=H(e);a&&(a.on("dispose",to),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());$t.includes(eo)||(e!=eo||e<l?e>eo&&(eo=e+l):($t.push(e),oo(a,n,l)))}}),a.one("ended",function(){oo(a,n,l,!0)}))}(e,v,null==a||null===(s=a.video)||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=p&&p.mux){var f,m,g,w,y,b,I=(null===(f=Z())||void 0===f?void 0:f.video)||(null==c?void 0:c.video),C=null==I?void 0:I.gist,E={env_key:null==n||null===(m=n.analytics)||void 0===m?void 0:m.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==C?void 0:C.id,video_title:null==C?void 0:C.title,video_series:null==I||null===(w=I.series)||void 0===w?void 0:w.title,video_stream_type:null!=I&&null!==(y=I.streamingInfo)&&void 0!==y&&y.isLiveStream?"live":"video",viewer_user_id:null==n||null===(b=n.analytics)||void 0===b?void 0:b.userId};p.mux({debug:!1,data:E})}}),p.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];p.trigger("subtitlechanged",n)}),p.on("subtitlechanged",function(e,n){var t,o,i,r,l,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),p.tech_.on("retryplaylist",function(){g&&ao(c,e)}),p.on("error",function(){var n,o;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&g)?ao(c,e):(_e(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==p||null===(o=p.error())||void 0===o?void 0:o.message)||"Some error occured",response:c}))}),p.one("play",function(){var e,t,o,i,r;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!==(r=n.series)&&void 0!==r&&r.enable){var l,a,u,s=null===(l=Z())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=Q(),c=(null==d?void 0:d.get(s))||{t:0,p:0},v=c.t,f=c.p;v&&f<95&&setTimeout(function(){p.currentTime(v)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){p.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=p&&p.dvrSeekbar)try{p.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),p.on("volumechange",function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),p.on("chromecastDisconnected",function(){if(g){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}}),p.one("loadeddata",function(){var e,n=(null==p||null===(e=p.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==s(p.dash)){var t,o,i,r=null==p||null===(t=p.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==r?void 0:r.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=so(n);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var d,c=so(n);try{for(c.s();!(d=c.n()).done;){var v,f,g,h=d.value;if(("Chrome"==ce()||"Edge"==ce()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!m))&&null!=h&&null!==(g=h.label)&&void 0!==g&&g.includes("5.1"))p.audioTracks().removeTrack(h);else{if("main"==h.kind){h.enabled=!0;break}h.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};function mo(e){var n=e||{},t=n.dvrConfig,o=n.epg;return!(!n.isDvrEnabled||null==t||!t.enable)&&(null==o||!o.enable||To(o))}function go(e,n){var t=e.seekable();if(t&&t.length>0){var o=Co(e,n);e.currentTime(o),e.play(),Eo({player:e,showWatchLive:!0,showStartOver:!0})}}function ho(e){e&&e.seekable()&&(e.currentTime(e.seekable().end(0)),e.play(),Eo({player:e,showWatchLive:!1,showStartOver:!0}))}function wo(e,n){var t=Io(n);t?function(e,n){if(e&&e.seekable()){var t=Math.min(n,e.seekable().end(0));e.currentTime(t),e.play(),Eo({player:e,showWatchLive:!0,showStartOver:!0})}}(e,t):ho(e)}function yo(e,n){e.bigPlayButton.show(),e.controlBar.show(),n&&(n.style.display="none")}function bo(e,n){sessionStorage.setItem("lastWatchedPosition-".concat(e),n.toFixed(2))}function Io(e){return parseFloat(sessionStorage.getItem("lastWatchedPosition-".concat(e))||"0")}function Co(e,n){var t=n||{},o=t.dvrConfig,i=t.epg,r=$()||[],l=null==o?void 0:o.startOverTime,a=0;if(l&&(a=l),null!=i&&i.enable&&To(i)&&null!=r&&r.length){var u=new Date,s=r.find(function(e){var n=new Date(e.formatted_startdate),t=new Date(e.formatted_enddate);return u>=n&&u<t}),d=e.seekable();if(d&&d.length>0){var c=d.start(0);if(a=c,null!=s&&s.formatted_startdate){var v=d.end(d.length-1)-c;a=c+(new Date(s.formatted_startdate).getTime()-new Date(u-1e3*v).getTime())/1e3}}}return a}var Eo=function(e){var n=e.player,t=e.showWatchLive,o=void 0===t||t,i=e.showStartOver,r=void 0===i||i;if(n.liveTracker){var l,a,u,s,d=n.liveTracker.atLiveEdge(),c=n.controlBar.getChild("SeekToLive");if(d?null==c||c.show():null==c||c.hide(),o)null==n||null===(l=n.watchLiveButton)||void 0===l||l.show();else null==n||null===(a=n.watchLiveButton)||void 0===a||a.hide();if(r)null==n||null===(u=n.startFromBeginningButton)||void 0===u||u.show();else null==n||null===(s=n.startFromBeginningButton)||void 0===s||s.hide()}},To=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=JSON.parse(sessionStorage.getItem("epgConfig"))||t;return(null==o||null===(e=o.contentType)||void 0===e?void 0:e.includes("game"))&&"LIVE"===(null==o||null===(n=o.programSubType)||void 0===n?void 0:n.toUpperCase())};function ko(e,n,t){var o=document.createElement("div");return o.className="vjs-seekbar-program-marker",o.id=e,o.style.title=n,o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="4px",o.style.backgroundColor="#000000",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",o}function So(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach(function(e){e.remove()})}function Oo(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return($()||[]).filter(function(e){var o=new Date(e.formatted_startdate).getTime();return o>=t&&o<=n}).map(function(e){var n=new Date(e.formatted_startdate).getTime()-t;return{title:e.title,time:n/1e3,id:e.programme_id}})}function Lo(e,n){var t=H(e);if(t){var o=n.dvrConfig,i=void 0===o?{}:o,r=n.videoId;n.epg;var l=i.playLive,a=i.playFromBegining,u=i.programs;X(u),t.on("loadeddata",function(){mo(n)?a?go(t,n):l?wo(t,r):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,i=n.videoId,r=n.epg,l=o.buttonConfig,a=void 0===l?{}:l,u=a.watchLive;a.resume;var s=a.startFromBegining,d=i;if(r&&null!=r&&r.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));d="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!Io(d),p=document.querySelector(".vjs-dvr-btn-overlay");p||((p=document.createElement("div")).className="vjs-dvr-btn-overlay");var f=function(e){var n=(e||{}).epg,t=$()||[],o="";if(null!=n&&n.enable&&To(n)&&null!=t&&t.length){var i=new Date,r=t.find(function(e){var n=new Date(e.formatted_startdate),t=new Date(e.formatted_enddate);return i>=n&&i<t});o=null!=r&&r.thumbnail?null==r?void 0:r.thumbnail:""}return o}(n);f&&(p.style.backgroundImage="url(".concat(f,")"),p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="cover");p.innerHTML=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,i=t.resume,r=t.startFromBegining,l=n?(null==i?void 0:i.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat('<svg width="14" height="21" viewBox="0 0 14 21" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M-6.26643e-08 0.858398C-3.64345e-08 0.708381 0.169567 0.621119 0.29164 0.708315L13.7899 10.3499C13.8929 10.4235 13.8929 10.5765 13.7899 10.6501L0.291637 20.2917C0.169563 20.3789 -3.46048e-06 20.2916 -3.43425e-06 20.1416L-6.26643e-08 0.858398Z" fill="white"/>\n</svg>\n'," ").concat(l,"</button>"),u='<button id="watch-begining-btn">'.concat('<svg width="16" height="16" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.04907e-06 -1.22392e-06L2 -1.04907e-06L2.00098 12L0 12L1.04907e-06 -1.22392e-06ZM14 11.6553C14 11.8026 13.8355 11.8903 13.7129 11.8086L5.23047 6.15332C5.12096 6.08031 5.12096 5.91968 5.23047 5.84668L13.7129 0.191406C13.8355 0.109694 14 0.197416 14 0.344727L14 11.6553Z" fill="white"/></svg>'," ").concat((null==r?void 0:r.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(u,"</div>")}(o,v),p.style.display="flex",e.el().appendChild(p),function(e){e.pause(),e.bigPlayButton.hide(),e.controlBar.hide()}(e),xo("watch-live-resume-btn",u,function(){yo(e,p),wo(e,d)}),xo("watch-begining-btn",s,function(){yo(e,p),go(e,n)})}(t,n),Eo({player:t,showWatchLive:!0,showStartOver:!0})):function(e){var n,t;yo(e,document.querySelector(".vjs-dvr-btn-overlay")),null==e||null===(n=e.startFromBeginningButton)||void 0===n||n.hide(),null==e||null===(t=e.watchLiveButton)||void 0===t||t.hide()}(t)}),t.one("loadedmetadata",function(){sessionStorage.setItem("program_switched",!0),function(e,n){var t=n.videoId,o=e.currentTime(),i=!1,r=e.seekable(),l=r.start(0),a=r.end(r.length-1)-l,u=JSON.parse(sessionStorage.getItem("epgConfig")),s=t,d=!0;if(u&&null!=u&&u.enable){var c;d=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==u?void 0:u.programId),s=null==u?void 0:u.programId}e.on("seeking",function(){i=!0}),e.on("seeked",function(){i=!1,o=e.currentTime();var t=JSON.parse(sessionStorage.getItem("epgConfig"));if(t&&null!=t&&t.enable){if(!d||sessionStorage.getItem("program_switched"))return;s="".concat(null==t?void 0:t.programId,"-").concat(null==t?void 0:t.channelId)}bo(s,o),Co(e,n),Eo({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})}),e.on("timeupdate",function(){if(!i){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!d||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");s="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var t=e.currentTime();Math.abs(t-o)>=20&&(bo(s,t),o=t,function(e,n){Oo(n).forEach(function(t){var o=t.id,i=t.title,r=t.time,l=document.getElementById(o);if(l){var a=Math.min(r/n*100,99.5);l.style.left="".concat(a,"%")}else{var u=e.controlBar.progressControl.seekBar.el(),s=ko(o,i,Math.min(r/n*100,99.5));u.appendChild(s)}})}(e,a))}})}(t,n)})}else console.warn("Player instance is required to initialize start over.")}function xo(e,n,t){var o,i,r=document.getElementById(e);r&&(i=n,(o=r)&&(o.style.color="".concat((null==i?void 0:i.textColor)||"#000"),o.style.backgroundColor="".concat((null==i?void 0:i.backGroundColor)||"#DCF95B")),r.addEventListener("click",t))}function Po(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 _o(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Po(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Po(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Do=function(o,r,l,a){var u,s,d,c,v,p,f,m,g,h,w,y,b,I,C,E,T,k,S,O,L,x,P,_,D,j,A,V,R,M,N,B,F,W,U,q,Z,G,z,Y,Q=r.res,K=void 0===Q?null:Q,J=r.sres,X=void 0===J?null:J,$=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],ee=(null===(u=K)||void 0===u?void 0:u.contentType)||"video",ne=Ze(null===(s=K)||void 0===s||null===(d=s[ee])||void 0===d||null===(c=d.gist)||void 0===c?void 0:c.videoImageUrl)||Ze(null===(v=K)||void 0===v||null===(p=v[ee])||void 0===p||null===(f=p.gist)||void 0===f||null===(m=f.imageGist)||void 0===m?void 0:m.r16x9),te=(null===(g=K)||void 0===g||null===(h=g[ee])||void 0===h||null===(w=h.liveDetails)||void 0===w?void 0:w.isDvrEnabled)||!1,oe=(null===(y=K)||void 0===y||null===(b=y[ee])||void 0===b||null===(I=b.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,ie=(null===(C=K)||void 0===C||null===(E=C.ads)||void 0===E||null===(T=E.preRoll)||void 0===T||null===(k=T.adTags)||void 0===k||null===(S=k.web)||void 0===S?void 0:S.active)&&(null===(O=K)||void 0===O||null===(L=O.ads)||void 0===L||null===(x=L.preRoll)||void 0===x||null===(P=x.adTags)||void 0===P||null===(_=P.web)||void 0===_?void 0:_.url),re=(null===(D=K=_o(_o({},K),{},{audioAssetSource:null==l?void 0:l.audioAssetSource}))||void 0===D||null===(j=D[ee])||void 0===j?void 0:j.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(A=window)||void 0===A||null===(V=A.app_data)||void 0===V||null===(R=V.appcmsMain)||void 0===R||null===(M=R.adsConfig)||void 0===M?void 0:M.vodAdSticherProvider)||!1,le=(null==l?void 0:l.latency)||6,ae=(null==l?void 0:l.skin_settings)||{};null==l||l.dvrConfig;var ue=(z={enableSmoothSeeking:!0,controls:0!=(null==l?void 0:l.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==l?void 0:l.muted)||!1,autoplay:(null==l?void 0:l.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ae?void 0:ae.pictureInPictureToggle)||!1},playbackRates:null!=ae&&ae.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==l.skin,liveui:te},e(z,"autoplay",null==l?void 0:l.autoplay),e(z,"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!ie),e(z,"loop",(null==l?void 0:l.loop)||!1),e(z,"audioPosterMode",null==l?void 0:l.audioPosterMode),e(z,"html5",_o(_o({dash:_o(_o(_o({},!i.browser.IS_SAFARI&&{useTTML:!0}),(null==l?void 0:l.debugConfig)&&(null==l||null===(N=l.debugConfig)||void 0===N?void 0:N.enable)&&{debug:!0,logLevel:null!=l&&null!==(B=l.debugConfig)&&void 0!==B&&B.logLevel?null==l||null===(F=l.debugConfig)||void 0===F?void 0:F.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:le},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:_o(_o({liveRangeSafeTimeDelta:le,useDevicePixelRatio:!0,experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==l||null===(W=l.customData)||void 0===W?void 0:W.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(U=null==l?void 0:l.enableLowInitialPlaylist)||void 0===U||U}),debug:(null==l?void 0:l.debugConfig)&&(null==l||null===(q=l.debugConfig)||void 0===q?void 0:q.enable)||!1,nativeTextTracks:"Safari"==ce()},0==(null==l||null===(Z=l.customData)||void 0===Z?void 0:Z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(G=l.customData)||void 0===G?void 0:G.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(z,"poster",ne),e(z,"techOrder",$),e(z,"chromecast",{requestCustomDataFn:function(e){var n,t,i=H(o),r=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var o,i,r,l,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,h,w,y,b,I,C;f.isDrmEnabled=!0;var E=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,T=(null==E?void 0:E.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(w=h.options)||void 0===w?void 0:w.serverURL);f.licenseUrl=T;var k=(null==E?void 0:E.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(b=y[0])||void 0===b||null===(I=b.options)||void 0===I||null===(C=I.httpRequestHeaders)||void 0===C?void 0:C["X-AxDRM-Message"]);f.licenseToken=k}var S=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";f.contentType=S;var O=null==e||null===(r=e[p])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;f.duration=O;var L=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=L;var x=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=x,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(K,e,r);return _o(_o({},a),{},{convivaMetaData:_o({customerKey:(null==l||null===(n=l.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==l||null===(t=l.convivaConfig)||void 0===t?void 0:t.debug)||!1},Qt.getData())})},modifyLoadRequestFn:function(e){var n,t,i,r,l,a=H(o),u=(null==a?void 0:a.currentSource())||{};!(null===(n=K)||void 0===n||null===(t=n[ee])||void 0===t||null===(i=t.streamingInfo)||void 0===i||null===(r=i.videoAssets)||void 0===r?void 0:r.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}}),z);if(!i.getPlayers()[o]){null!=l&&l.debugConfig&&null!=l&&null!==(Y=l.debugConfig)&&void 0!==Y&&Y.enable&&i.log.level("debug");var se=i(o,ue,function(){var e=n(t.mark(function e(){var n,r,u,s,d,c,v,p,f,m,g,h,w,y,b,I,C,E,T,k,S;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(se),console.log(i.VERSION),console.log(i.getPlugins()),e.next=5,xt(l,K);case 5:if(w=null===(n=K)||void 0===n||null===(r=n[ee])||void 0===r||null===(u=r.liveDetails)||void 0===u?void 0:u.startOverTime,oe&&a.resolve(_o({status:!0,msg:"Player Initialised"},X?{seriesResponse:X,response:K}:{response:K})),te&&null!=l&&null!==(s=l.dvrConfig)&&void 0!==s&&s.enable&&Lo(o,_o(_o({},l),{},{isDvrEnabled:te})),de(o,null==l?void 0:l.analyticsCb,null==l?void 0:l.customData),Yt(o,l),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),te&&ht(o,w),!ie||null!=l&&null!==(d=l.customData)&&void 0!==d&&d.disableAds||Be(o,ie,K),y=Ee(K,o),console.log(y),null!=l&&l.nearestClusterUrl&&(y=Le(y,l.nearestClusterUrl)),!re){e.next=21;break}return e.next=20,bn(o,K);case 20:y=e.sent;case 21:y?Xn(o,y):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:K}),_e(o,"Incompatible / Missing Source")),((null===(c=K)||void 0===c||null===(v=c[ee])||void 0===v||null===(p=v.contentDetails)||void 0===p||null===(f=p.closedCaptions)||void 0===f?void 0:f.length)>0||(null===(m=K)||void 0===m||null===(g=m[ee])||void 0===g||null===(h=g.closedCaptions)||void 0===h?void 0:h.length)>0)&&(S=(null===(I=K)||void 0===I||null===(C=I[ee])||void 0===C||null===(E=C.contentDetails)||void 0===E?void 0:E.closedCaptions)||(null===(T=K)||void 0===T||null===(k=T[ee])||void 0===k?void 0:k.closedCaptions),b=S.filter(function(e){return"VTT"===e.format||"WEBVTT"===e.format}),Me(o,b)),null!=l&&l.disableControls?et(o):Kt(o,_o(_o(_o({},l),ue),{},{liveVideo:oe,isDvrEnabled:te,res:K,sres:X})),fo(o,_o(_o(_o({},l),ue),{},{liveVideo:oe}),a,{res:K,sres:X});case 25:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}};function jo(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 Ao(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?jo(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):jo(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Vo,Ro=function(e,n){var t=n.resolve,o=n.reject,i=null==e?void 0:e.playerId,r=Mo(e);Do(i,{res:r},e,{resolve:t,reject:o})},Mo=function(e){var n,t,o,i,r,a,u,s,d=null==e?void 0:e.streamingInfo,c=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,v=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,p=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,f=(null==e||null===(r=e.streamingInfo)||void 0===r?void 0:r.posterUrl)||null,m=(null==e||null===(a=e.streamingInfo)||void 0===a?void 0:a.subtitles)||[],g=(null==e||null===(u=e.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,h=null==e?void 0:e.token,w=F(h);null==w||w.site;var y=null==w?void 0:w.siteId;return Ao(Ao({id:"".concat(y,"_external")},!v&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:v,streamingInfo:{videoAssets:Ao(Ao({},g&&{drmProvider:g}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==d?void 0:d.isDvrEnabled},gist:Ao({},f&&{videoImageUrl:f}),contentDetails:Ao({},(null==m?void 0:m.length)>0&&{closedCaptions:l(m)})},ads:{preRoll:{adTags:{web:Ao(Ao({},p&&{active:!0}),p&&{url:p})}}}})};function No(e,n){return Bo.apply(this,arguments)}function Bo(){return Bo=n(t.mark(function e(n,o){var i,r,l,a,u,s;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.resolve,r=o.reject,l=null==n?void 0:n.videoId,a=null==n?void 0:n.playerId,u=!(null==n||!n.anonymousId),e.next=6,N();case 6:s=e.sent,w(l,s).then(function(e){var t,o,d,c;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(d=o.gist)||void 0===d?void 0:d.contentType,U(null==e?void 0:e.data);var v,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(c=n.watchHistory)&&void 0!==c&&c.enable&&!u)if((null===(v=n.watchHistory)||void 0===v?void 0:v.saveOffline)||!1){var f,m,g,h=ro((null===(f=n.watchHistory)||void 0===f?void 0:f.profileId)||"",l,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(m=h[0])||void 0===m?void 0:m.watchedTime)||null,n.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",Do(a,{res:p},n,{resolve:i,reject:r})}else C(l,s).then(function(e){var t,o,i,r,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.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,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}).finally(function(){Do(a,{res:p},n,{resolve:i,reject:r})});else Do(a,{res:p},n,{resolve:i,reject:r})}).catch(function(e){$n(e,a,r,l)});case 8:case"end":return e.stop()}},e)})),Bo.apply(this,arguments)}function Fo(e,n){return Ho.apply(this,arguments)}function Ho(){return(Ho=n(t.mark(function e(n,o){var i,r,l,a,u;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.resolve,r=o.reject,e.next=3,N();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=null==n?void 0:n.epg,y(u,l).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==u?void 0:u.channelId,Do(a,{res:t},n,{resolve:i,reject:r})}).catch(function(e){$n(e,a,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Wo(e,n){return Uo.apply(this,arguments)}function Uo(){return(Uo=n(t.mark(function e(n,o){var i,r,l,a,u,s,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.resolve,l=o.reject,e.next=3,N();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,J.set(parseInt(s)),d=null==n||null===(i=n.series)||void 0===i?void 0:i.id,b(d,a).then(function(e){var t,o,i,s=e.data,c=e.data.seasons;G(c);var v=videoId||(null==c||null===(t=c[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);pe(d,a),w(v,a).then(function(e){var t,o,i;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,U(e.data),Do(u,{res:null==e?void 0:e.data,sres:s},n,{resolve:r,reject:l})}).catch(function(e){$n(e,u,l,videoId)})}).catch(function(e){$n(e,u,l)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function qo(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 Zo(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?qo(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):qo(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}exports.BackIcon=function(){return'<svg width="13" height="13" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6169 0.418212C11.0883 0.933084 11.1247 1.74341 10.726 2.30391L10.6173 2.43852L3.69866 10.0029L10.6169 17.5611C11.0883 18.0759 11.1247 18.8863 10.726 19.4468L10.6173 19.5814C10.1461 20.0965 9.40458 20.1362 8.89165 19.7006L8.76847 19.5818L0 10.0039L8.76809 0.418626C9.27852 -0.13938 10.1063 -0.139565 10.6169 0.418212Z" fill="white"/>\n </svg>\n '},exports.BroadcastIcon=function(){return'<svg width="22" height="20" viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.01316 12.1667L0.25 10.5V15.5L3.01316 14.25V18H15.25V8H3.01316V12.1667ZM7.67057 10.7216C7.53806 10.6283 7.35547 10.7231 7.35547 10.8852V15.1146C7.35547 15.2766 7.53806 15.3714 7.67057 15.2781L10.6757 13.1634C10.7889 13.0838 10.7889 12.916 10.6757 12.8363L7.67057 10.7216Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.25 2H20.25H21.25V3V10H20.25V3H7.25V2ZM17.25 5H4.25V6H17.25V13H18.25V6V5H17.25Z" fill="white"/>\n </svg>\n '},exports.CaptionsSvgV2=function(){return'<svg width="21" height="18" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.4541 15.8369V2H0.454102V15.8369H11.992L17.7874 18V15.8369H20.4541ZM2.4541 4H18.4541V13.8614H15.9182L15.9179 15L11.9664 13.8614H2.4541V4Z" fill="white"/>\n <rect x="3.4541" y="6" width="9" height="2" fill="white"/>\n <rect x="14.4541" y="6" width="3" height="2" fill="white"/>\n <rect x="8.4541" y="10" width="9" height="2" fill="white"/>\n <rect x="3.4541" y="10" width="3" height="2" fill="white"/>\n </svg>\n '},exports.EpisodesSvg=function(){return'<svg class=\'icon icon-episodes\' width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1 11.7368C1 11.3299 1.32989 11 1.73684 11H16.2632C16.6701 11 17 11.3299 17 11.7368V21.2632C17 21.6701 16.6701 22 16.2632 22H1.73684C1.3299 22 1 21.6701 1 21.2632V11.7368Z" fill="white"/>\n <path d="M5 8H19.2632C19.6701 8 20 8.3299 20 8.73684V18" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M8 4H22.2632C22.6701 4 23 4.3299 23 4.73684V13" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},exports.MaximizeSvg=function(e){return"<svg fill='".concat(e||"white","'\n class='icon icon-maximize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(e||"white","' d='M43.369 45.938h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.004 9.004z' />\n <path fill='").concat(e||"white","' d='M21.969 18.834h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.003-9.003z' />\n </svg>")},exports.MinimizeSvg=function(e){return"<svg fill='".concat(e||"white","'\n class='icon icon-minimize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(e||"white","' d='M40.397 37.511h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.004-9.004z' />\n <path fill='").concat(e||"white","' d='M24.443 26.763h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.003 9.004z' />\n </svg>")},exports.NewCaptionsSvg=function(){return'<svg width="18" height="16" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M5 6.5H10M5 10H13M7.68375 16H14.2C15.8802 16 16.7202 16 17.362 15.673C17.9265 15.3854 18.3854 14.9265 18.673 14.362C19 13.7202 19 12.8802 19 11.2V5.8C19 4.11984 19 3.27976 18.673 2.63803C18.3854 2.07354 17.9265 1.6146 17.362 1.32698C16.7202 1 15.8802 1 14.2 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V18.3355C1 18.8684 1 19.1348 1.10923 19.2716C1.20422 19.3906 1.34827 19.4599 1.50054 19.4597C1.67563 19.4595 1.88367 19.2931 2.29976 18.9602L4.68521 17.0518C5.17252 16.662 5.41617 16.4671 5.68749 16.3285C5.9282 16.2055 6.18443 16.1156 6.44921 16.0613C6.74767 16 7.0597 16 7.68375 16Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},exports.PlayNextEpisodeSvg=function(e){return'<svg className=\'icon-play-next\' width="16" height="16" viewBox="0 0 25 25" fill='.concat(e,' xmlns="http://www.w3.org/2000/svg">\n <path d="M14.8837 9.99984L0 0V20L14.8837 9.99984Z" fill=').concat(e,' />\n <rect x="18" width="2" height="20" fill=').concat(e," />\n </svg>")},exports.PlaylistIcon=function(){return'<svg version="1.0" xmlns="http://www.w3.org/2000/svg"\n width="17" height="17" viewBox="0 0 512.000000 512.000000"\n preserveAspectRatio="xMidYMid meet">\n \n <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"\n fill="white" stroke="none">\n <path d="M340 4674 c-46 -20 -77 -50 -103 -99 -22 -40 -22 -45 -25 -754 -3\n -813 -5 -788 72 -859 69 -64 158 -77 238 -36 17 9 232 177 478 374 492 394\n 490 392 490 499 0 60 -23 112 -72 158 -62 60 -863 695 -900 714 -45 23 -128\n 25 -178 3z"/>\n <path d="M2045 4673 c-164 -86 -166 -300 -3 -384 37 -19 73 -19 1382 -17\n l1344 3 44 30 c138 97 118 306 -34 370 -33 13 -189 15 -1370 15 -1195 -1\n -1336 -2 -1363 -17z"/>\n <path d="M2045 3393 c-164 -86 -166 -300 -3 -384 37 -19 73 -19 1382 -17\n l1344 3 44 30 c138 97 118 306 -34 370 -33 13 -189 15 -1370 15 -1195 -1\n -1336 -2 -1363 -17z"/>\n <path d="M340 2114 c-173 -75 -161 -342 18 -394 26 -8 692 -10 2224 -8 l2186\n 3 44 30 c138 97 118 306 -34 370 -33 13 -272 15 -2220 15 -1927 -1 -2187 -3\n -2218 -16z"/>\n <path d="M340 834 c-173 -75 -161 -342 18 -394 26 -8 692 -10 2224 -8 l2186 3\n 44 30 c138 97 118 306 -34 370 -33 13 -272 15 -2220 15 -1927 -1 -2187 -3\n -2218 -16z"/>\n </g>\n </svg>'},exports.RewindSvg=function(e){return'<svg style="width:16px" class=\'rewindbtn\' viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.88817 16.9913L7.72176 18.5762C9.58746 18.8613 11.4677 18.5376 13.1023 17.6161C17.1941 15.3094 18.4803 9.98978 15.9732 5.74243C13.47 1.50156 8.13865 -0.0590307 4.03665 2.25351C3.35173 2.64307 2.7379 3.12124 2.20384 3.67698L3.34087 4.82569C3.77642 4.37247 4.27773 3.98196 4.83679 3.66398C8.20452 1.76539 12.5901 3.04913 14.644 6.5288C16.6894 9.99402 15.6429 14.3223 12.3046 16.2043C10.9636 16.9602 9.42195 17.2257 7.88817 16.9913Z" fill=\''.concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.10742 0.462205L0.56205 5.24366L6.06202 5.79492L3.10742 0.462205Z" fill=\'').concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.80172 14.1769C10.1682 14.1769 10.5096 14.1082 10.8258 13.9708C11.142 13.8333 11.416 13.6241 11.6479 13.343C11.8798 13.0619 12.0615 12.7059 12.1928 12.275C12.3242 11.8441 12.3898 11.3368 12.3898 10.753C12.3898 10.1661 12.3242 9.65803 12.1928 9.22868C12.0615 8.79934 11.8798 8.44413 11.6479 8.16305C11.416 7.88197 11.142 7.6727 10.8258 7.53525C10.5096 7.3978 10.1682 7.32907 9.80172 7.32907C9.43524 7.32907 9.09551 7.3978 8.78254 7.53525C8.46956 7.6727 8.19794 7.88197 7.96767 8.16305C7.7374 8.44413 7.5574 8.79934 7.42767 9.22868C7.29794 9.65803 7.23308 10.1661 7.23308 10.753C7.23308 11.3368 7.29794 11.8441 7.42767 12.275C7.5574 12.7059 7.7374 13.0619 7.96767 13.343C8.19794 13.6241 8.46956 13.8333 8.78254 13.9708C9.09551 14.1082 9.43524 14.1769 9.80172 14.1769ZM6.54713 14.1028V13.2457H5.28226V7.39394H4.2947L2.14929 9.13139L2.52875 9.62714C2.5547 9.66112 2.59443 9.69123 2.64794 9.71749C2.70145 9.74374 2.76064 9.75687 2.82551 9.75687C2.86767 9.75687 2.91064 9.75069 2.95443 9.73834C2.99821 9.72598 3.04118 9.70282 3.08335 9.66884L4.09524 8.86266C4.08551 9.02946 4.08064 9.18853 4.08064 9.33988V13.2457H2.65524V14.1028H6.54713ZM9.30308 13.1136C9.46362 13.1893 9.62983 13.2271 9.80172 13.2271C9.97686 13.2271 10.1455 13.1893 10.3077 13.1136C10.4698 13.038 10.6133 12.9059 10.7382 12.7175C10.8631 12.5291 10.9628 12.2758 11.0374 11.9576C11.112 11.6395 11.1493 11.238 11.1493 10.753C11.1493 10.2681 11.112 9.86652 11.0374 9.54838C10.9628 9.23023 10.8631 8.97695 10.7382 8.78853C10.6133 8.60011 10.4698 8.46807 10.3077 8.39239C10.1455 8.31672 9.97686 8.27888 9.80172 8.27888C9.62983 8.27888 9.46362 8.31672 9.30308 8.39239C9.14254 8.46807 9.00064 8.60011 8.8774 8.78853C8.75416 8.97695 8.65605 9.23023 8.58308 9.54838C8.5101 9.86652 8.47362 10.2681 8.47362 10.753C8.47362 11.238 8.5101 11.6395 8.58308 11.9576C8.65605 12.2758 8.75416 12.5291 8.8774 12.7175C9.00064 12.9059 9.14254 13.038 9.30308 13.1136Z" fill=\'').concat(window.color||"white","' />\n </svg>")},exports.RewindSvgV2=function(){return'<svg class=\'rewindbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.22363 9.43675L3.152 11.3434L5.08151 9.43675M2.91616 10.8667C2.88115 10.5537 2.86319 10.2356 2.86319 9.91341C2.86319 5.17486 6.74945 1.3335 11.5434 1.3335C16.3374 1.3335 20.2236 5.17486 20.2236 9.91341C20.2236 14.652 16.3374 18.4933 11.5434 18.4933C8.8166 18.4933 6.38346 17.2505 4.79212 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M9.92694 13.0831V6.80067H8.94318C8.58633 7.20106 7.97871 7.53473 7.37109 7.64912V8.66918C7.68937 8.64058 8.22947 8.52618 8.51881 8.39272V13.0831H9.92694Z" fill="white"/>\n <path d="M13.6545 6.6958C11.8316 6.6958 11.1951 8.23065 11.1951 9.94664C11.1951 11.6817 11.7641 13.1975 13.6255 13.1975C15.5159 13.1975 16.0656 11.634 16.0656 9.9085C16.0656 8.12579 15.4291 6.6958 13.6545 6.6958ZM13.6545 7.78259C14.4839 7.78259 14.6382 8.69778 14.6382 9.91804C14.6382 11.1478 14.5225 12.1107 13.6448 12.1107C12.7479 12.1107 12.6128 11.0811 12.6128 9.92757C12.6128 8.57385 12.8443 7.78259 13.6545 7.78259Z" fill="white"/>\n </svg>'},exports.RewindSvgV3=function(){return'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11.3206 14.3155C11.1375 14.0052 10.8796 13.7456 10.5704 13.5604C10.2613 13.3753 9.91067 13.2705 9.55061 13.2555C9.19055 13.2705 8.83996 13.3753 8.5308 13.5604C8.22163 13.7456 7.96373 14.0052 7.78061 14.3155C7.35864 15.014 7.1356 15.8145 7.1356 16.6305C7.1356 17.4466 7.35864 18.2471 7.78061 18.9455C7.96373 19.2559 8.22163 19.5155 8.5308 19.7007C8.83996 19.8858 9.19055 19.9906 9.55061 20.0055C9.91067 19.9906 10.2613 19.8858 10.5704 19.7007C10.8796 19.5155 11.1375 19.2559 11.3206 18.9455C11.7426 18.2471 11.9656 17.4466 11.9656 16.6305C11.9656 15.8145 11.7426 15.014 11.3206 14.3155V14.3155ZM9.55061 19.0355C8.77061 19.0355 8.11061 17.9355 8.11061 16.6255C8.11061 15.3155 8.77061 14.2155 9.55061 14.2155C10.3306 14.2155 10.9906 15.3155 10.9906 16.6255C10.9906 17.9355 10.3406 19.0355 9.55061 19.0355V19.0355ZM5.21061 20.0055V14.9055L4.73061 15.3855L4.05061 14.7055L5.35061 13.4055C5.41774 13.3382 5.50338 13.2923 5.59664 13.2737C5.68991 13.255 5.78661 13.2645 5.87446 13.301C5.96231 13.3374 6.03737 13.3991 6.09009 13.4783C6.14282 13.5574 6.17084 13.6504 6.17061 13.7455V20.0155L5.21061 20.0055V20.0055ZM21.4106 6.98555V19.5155C21.4089 19.6423 21.3577 19.7634 21.2681 19.853C21.1785 19.9427 21.0574 19.9938 20.9306 19.9955H14.6606V18.0655H19.4806V8.42555H7.91061V10.3555C7.91061 10.8855 7.55061 11.0755 7.11061 10.7855L2.93061 7.99555C2.78952 7.92442 2.68211 7.80061 2.63158 7.65091C2.58105 7.5012 2.59148 7.33762 2.66061 7.19555C2.71811 7.07805 2.81311 6.98305 2.93061 6.92555L7.11061 4.13555C7.55061 3.84555 7.91061 4.03555 7.91061 4.56555V6.49555H20.9206C21.05 6.49746 21.1735 6.54969 21.265 6.64118C21.3565 6.73266 21.4087 6.85618 21.4106 6.98555V6.98555Z" fill="white"/>\n </svg>'},exports.SelectedStream=function(){return'<svg class=\'selected-stream\' width="25" height="25" viewBox="0 0 35 33" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_319_60943)">\n <path d="M0 0H35V33H0V0Z" fill="#D2393B"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M15.8689 17.6541L22.3039 11.2898C22.6966 10.9014 23.3372 10.9054 23.7299 11.2937C24.1225 11.6821 24.1265 12.3157 23.7338 12.704L16.6345 19.7253C16.6189 19.743 16.6026 19.7604 16.5856 19.7772C16.5158 19.8463 16.4381 19.9032 16.3554 19.9479C15.9716 20.1587 15.4758 20.1009 15.1503 19.779C15.126 19.755 15.1032 19.73 15.0819 19.7042L12.2919 16.9449C11.8992 16.5565 11.9032 15.9229 12.2958 15.5346C12.6885 15.1462 13.3291 15.1423 13.7218 15.5306L15.8689 17.6541Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_319_60943">\n <path d="M0 0H35V33H8C3.58172 33 0 29.4183 0 25V0Z" fill="white"/>\n </clipPath>\n </defs>\n </svg>\n '},exports.SettingsSvg=function(){return'<svg width="16" height="16" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11 14C12.6569 14 14 12.6569 14 11C14 9.34315 12.6569 8 11 8C9.34315 8 8 9.34315 8 11C8 12.6569 9.34315 14 11 14Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M17.7273 13.7273C17.6063 14.0015 17.5702 14.3056 17.6236 14.6005C17.6771 14.8954 17.8177 15.1676 18.0273 15.3818L18.0818 15.4364C18.2509 15.6052 18.385 15.8057 18.4765 16.0265C18.568 16.2472 18.6151 16.4838 18.6151 16.7227C18.6151 16.9617 18.568 17.1983 18.4765 17.419C18.385 17.6397 18.2509 17.8402 18.0818 18.0091C17.913 18.1781 17.7124 18.3122 17.4917 18.4037C17.271 18.4952 17.0344 18.5423 16.7955 18.5423C16.5565 18.5423 16.3199 18.4952 16.0992 18.4037C15.8785 18.3122 15.678 18.1781 15.5091 18.0091L15.4545 17.9545C15.2403 17.745 14.9682 17.6044 14.6733 17.5509C14.3784 17.4974 14.0742 17.5335 13.8 17.6545C13.5311 17.7698 13.3018 17.9611 13.1403 18.205C12.9788 18.4489 12.8921 18.7347 12.8909 19.0273V19.1818C12.8909 19.664 12.6994 20.1265 12.3584 20.4675C12.0174 20.8084 11.5549 21 11.0727 21C10.5905 21 10.1281 20.8084 9.78708 20.4675C9.4461 20.1265 9.25455 19.664 9.25455 19.1818V19.1C9.24751 18.7991 9.15011 18.5073 8.97501 18.2625C8.79991 18.0176 8.55521 17.8312 8.27273 17.7273C7.99853 17.6063 7.69437 17.5702 7.39947 17.6236C7.10456 17.6771 6.83244 17.8177 6.61818 18.0273L6.56364 18.0818C6.39478 18.2509 6.19425 18.385 5.97353 18.4765C5.7528 18.568 5.51621 18.6151 5.27727 18.6151C5.03834 18.6151 4.80174 18.568 4.58102 18.4765C4.36029 18.385 4.15977 18.2509 3.99091 18.0818C3.82186 17.913 3.68775 17.7124 3.59626 17.4917C3.50476 17.271 3.45766 17.0344 3.45766 16.7955C3.45766 16.5565 3.50476 16.3199 3.59626 16.0992C3.68775 15.8785 3.82186 15.678 3.99091 15.5091L4.04545 15.4545C4.25503 15.2403 4.39562 14.9682 4.4491 14.6733C4.50257 14.3784 4.46647 14.0742 4.34545 13.8C4.23022 13.5311 4.03887 13.3018 3.79497 13.1403C3.55107 12.9788 3.26526 12.8921 2.97273 12.8909H2.81818C2.33597 12.8909 1.87351 12.6994 1.53253 12.3584C1.19156 12.0174 1 11.5549 1 11.0727C1 10.5905 1.19156 10.1281 1.53253 9.78708C1.87351 9.4461 2.33597 9.25455 2.81818 9.25455H2.9C3.2009 9.24751 3.49273 9.15011 3.73754 8.97501C3.98236 8.79991 4.16883 8.55521 4.27273 8.27273C4.39374 7.99853 4.42984 7.69437 4.37637 7.39947C4.3229 7.10456 4.18231 6.83244 3.97273 6.61818L3.91818 6.56364C3.74913 6.39478 3.61503 6.19425 3.52353 5.97353C3.43203 5.7528 3.38493 5.51621 3.38493 5.27727C3.38493 5.03834 3.43203 4.80174 3.52353 4.58102C3.61503 4.36029 3.74913 4.15977 3.91818 3.99091C4.08704 3.82186 4.28757 3.68775 4.50829 3.59626C4.72901 3.50476 4.96561 3.45766 5.20455 3.45766C5.44348 3.45766 5.68008 3.50476 5.9008 3.59626C6.12152 3.68775 6.32205 3.82186 6.49091 3.99091L6.54545 4.04545C6.75971 4.25503 7.03183 4.39562 7.32674 4.4491C7.62164 4.50257 7.9258 4.46647 8.2 4.34545H8.27273C8.54161 4.23022 8.77093 4.03887 8.93245 3.79497C9.09397 3.55107 9.18065 3.26526 9.18182 2.97273V2.81818C9.18182 2.33597 9.37338 1.87351 9.71435 1.53253C10.0553 1.19156 10.5178 1 11 1C11.4822 1 11.9447 1.19156 12.2856 1.53253C12.6266 1.87351 12.8182 2.33597 12.8182 2.81818V2.9C12.8193 3.19253 12.906 3.47834 13.0676 3.72224C13.2291 3.96614 13.4584 4.15749 13.7273 4.27273C14.0015 4.39374 14.3056 4.42984 14.6005 4.37637C14.8954 4.3229 15.1676 4.18231 15.3818 3.97273L15.4364 3.91818C15.6052 3.74913 15.8057 3.61503 16.0265 3.52353C16.2472 3.43203 16.4838 3.38493 16.7227 3.38493C16.9617 3.38493 17.1983 3.43203 17.419 3.52353C17.6397 3.61503 17.8402 3.74913 18.0091 3.91818C18.1781 4.08704 18.3122 4.28757 18.4037 4.50829C18.4952 4.72901 18.5423 4.96561 18.5423 5.20455C18.5423 5.44348 18.4952 5.68008 18.4037 5.9008C18.3122 6.12152 18.1781 6.32205 18.0091 6.49091L17.9545 6.54545C17.745 6.75971 17.6044 7.03183 17.5509 7.32674C17.4974 7.62164 17.5335 7.9258 17.6545 8.2V8.27273C17.7698 8.54161 17.9611 8.77093 18.205 8.93245C18.4489 9.09397 18.7347 9.18065 19.0273 9.18182H19.1818C19.664 9.18182 20.1265 9.37338 20.4675 9.71435C20.8084 10.0553 21 10.5178 21 11C21 11.4822 20.8084 11.9447 20.4675 12.2856C20.1265 12.6266 19.664 12.8182 19.1818 12.8182H19.1C18.8075 12.8193 18.5217 12.906 18.2778 13.0676C18.0339 13.2291 17.8425 13.4584 17.7273 13.7273Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},exports.SettingsSvgV2=function(){return'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.7275 8.7189V11.2811L18.0174 11.7913C17.8497 12.5312 17.558 13.2374 17.1546 13.88L18.71 16.1626L16.8874 17.9721L14.6149 16.43C13.9694 16.8283 13.2636 17.1194 12.5249 17.2919L12.0143 20H9.43828L8.92846 17.2919C8.18971 17.1194 7.48385 16.8284 6.8384 16.43L4.56591 17.9721L2.74302 16.1626L4.28649 13.88C3.88787 13.2349 3.5965 12.5296 3.42371 11.7913L0.727539 11.2811V8.7189L3.42371 8.1968C3.59774 7.4568 3.89356 6.75083 4.29909 6.10771L2.74337 3.837L4.56626 2.02785L6.83875 3.57C7.48173 3.16673 8.18841 2.8752 8.92881 2.70777L9.43863 0H12.0147L12.5252 2.70777C13.2656 2.87529 13.9723 3.16682 14.6153 3.57L16.8878 2.02785L18.7103 3.837L17.1549 6.11996C17.5582 6.75838 17.85 7.46066 18.0177 8.1968L20.7275 8.7189ZM5.19864 10.0057C5.2018 13.0538 7.67684 15.5222 10.7268 15.5191C12.1916 15.5176 13.5957 14.9347 14.6304 13.8985C15.665 12.8624 16.2454 11.4579 16.2438 9.99405C16.2405 6.94597 13.7654 4.47766 10.7154 4.48088C7.6654 4.4841 5.19548 6.95764 5.19864 10.0057Z" fill="white"/>\n </svg>'},exports.SkipSvg=function(e){return'<svg style="width:16px" class=\'skipbtn\' viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.99586 16.9937L10.1623 18.5786C8.29657 18.8638 6.41631 18.54 4.78178 17.6185C0.689955 15.3118 -0.596286 9.9922 1.9108 5.74486C4.41407 1.50398 9.74539 -0.0566045 13.8474 2.25594C14.5323 2.64549 15.1461 3.12366 15.6802 3.6794L14.5432 4.82812C14.1076 4.3749 13.6063 3.98438 13.0472 3.66641C9.67952 1.76782 5.29397 3.05156 3.24002 6.53123C1.1946 9.99645 2.24115 14.3247 5.57947 16.2067C6.92039 16.9626 8.46208 17.2281 9.99586 16.9937Z" fill=\''.concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.7766 0.464616L17.322 5.24607L11.822 5.79733L14.7766 0.464616Z" fill=\'').concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M13.0245 14.115C13.391 14.115 13.7323 14.0463 14.0486 13.9088C14.3648 13.7714 14.6388 13.5621 14.8707 13.281C15.1026 13 15.2842 12.644 15.4156 12.2131C15.5469 11.7822 15.6126 11.2749 15.6126 10.6911C15.6126 10.1042 15.5469 9.59609 15.4156 9.16675C15.2842 8.73741 15.1026 8.38219 14.8707 8.10111C14.6388 7.82003 14.3648 7.61076 14.0486 7.47331C13.7323 7.33586 13.391 7.26714 13.0245 7.26714C12.658 7.26714 12.3183 7.33586 12.0053 7.47331C11.6923 7.61076 11.4207 7.82003 11.1904 8.10111C10.9602 8.38219 10.7802 8.73741 10.6504 9.16675C10.5207 9.59609 10.4559 10.1042 10.4559 10.6911C10.4559 11.2749 10.5207 11.7822 10.6504 12.2131C10.7802 12.644 10.9602 13 11.1904 13.281C11.4207 13.5621 11.6923 13.7714 12.0053 13.9088C12.3183 14.0463 12.658 14.115 13.0245 14.115ZM9.76991 14.0409V13.1837H8.50504V7.332H7.51748L5.37207 9.06945L5.75153 9.56521C5.77748 9.59918 5.81721 9.6293 5.87072 9.65555C5.92423 9.68181 5.98342 9.69493 6.04829 9.69493C6.09045 9.69493 6.13342 9.68876 6.17721 9.6764C6.22099 9.66405 6.26396 9.64088 6.30612 9.6069L7.31802 8.80073C7.30829 8.96752 7.30342 9.1266 7.30342 9.27795V13.1837H5.87802V14.0409H9.76991ZM12.5259 13.0517C12.6864 13.1274 12.8526 13.1652 13.0245 13.1652C13.1996 13.1652 13.3683 13.1274 13.5304 13.0517C13.6926 12.976 13.8361 12.844 13.961 12.6556C14.0859 12.4671 14.1856 12.2139 14.2602 11.8957C14.3348 11.5776 14.3721 11.176 14.3721 10.6911C14.3721 10.2061 14.3348 9.80459 14.2602 9.48644C14.1856 9.16829 14.0859 8.91501 13.961 8.7266C13.8361 8.53818 13.6926 8.40613 13.5304 8.33046C13.3683 8.25478 13.1996 8.21694 13.0245 8.21694C12.8526 8.21694 12.6864 8.25478 12.5259 8.33046C12.3653 8.40613 12.2234 8.53818 12.1002 8.7266C11.9769 8.91501 11.8788 9.16829 11.8059 9.48644C11.7329 9.80459 11.6964 10.2061 11.6964 10.6911C11.6964 11.176 11.7329 11.5776 11.8059 11.8957C11.8788 12.2139 11.9769 12.4671 12.1002 12.6556C12.2234 12.844 12.3653 12.976 12.5259 13.0517Z" fill=\'').concat(window.color?window.color:"white","' />\n </svg>")},exports.SkipSvgV2=function(){return'<svg class=\'skipbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M19.7236 9.43675L17.7953 11.3434L15.8658 9.43675M18.0311 10.8667C18.0661 10.5537 18.0841 10.2356 18.0841 9.91341C18.0841 5.17486 14.1978 1.3335 9.40386 1.3335C4.6099 1.3335 0.723633 5.17486 0.723633 9.91341C0.723633 14.652 4.6099 18.4933 9.40386 18.4933C12.1307 18.4933 14.5638 17.2505 16.1551 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M7.80584 13.0831V6.80067H6.82209C6.46523 7.20106 5.85762 7.53473 5.25 7.64912V8.66918C5.56828 8.64058 6.10838 8.52618 6.39772 8.39272V13.0831H7.80584Z" fill="white"/>\n <path d="M11.5334 6.6958C9.71052 6.6958 9.07397 8.23065 9.07397 9.94664C9.07397 11.6817 9.64301 13.1975 11.5044 13.1975C13.3948 13.1975 13.9445 11.634 13.9445 9.9085C13.9445 8.12579 13.308 6.6958 11.5334 6.6958ZM11.5334 7.78259C12.3628 7.78259 12.5171 8.69778 12.5171 9.91804C12.5171 11.1478 12.4014 12.1107 11.5237 12.1107C10.6268 12.1107 10.4917 11.0811 10.4917 9.92757C10.4917 8.57385 10.7232 7.78259 11.5334 7.78259Z" fill="white"/>\n </svg>'},exports.TickMarkIcon=function(){return'<svg width="28" height="28" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28">\n <path d="M21 10L11 20L7 16" stroke="white" stroke-width="2" fill="none"/>\n </svg>'},exports.VLPlayerCore=function(){return{loadVideoInstantly:Qn,onTimeUpdate:lt,getVideoDuration:ut,onVideoEnded:at,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=n(t.mark(function n(o,i){var r,l,a,u,s,c,v,p,f,m,g,h,y,b,I,C,E,k,O,x,P,_,D,j,A;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!Gn(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(y=(null==e?void 0:e.videoSourceUrl)||!1,b=null==e?void 0:e.asat,I=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,C=null==e?void 0:e.videoId,E=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,k=(null==e?void 0:e.streamingInfo)||!1,window.videoId=C,O=null==e?void 0:e.token,!B(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",O),L().set(null==e?void 0:e.refreshToken),O&&!S(O)){n.next=16;break}return i({status:!1,msg:"".concat(O?"Token is expired !":"Missing Authorization Token"),response:{token:O}}),n.abrupt("return");case 16:Vo=JSON.parse(atob(O.split(".")[1]));case 17:return window.siteName=null===(a=Vo)||void 0===a?void 0:a.site,window.siteId=null===(u=Vo)||void 0===u?void 0:u.siteId,e.isAnonymousUser=!(null===(s=Vo)||void 0===s||!s.anonymousId),e.siteOwner=(null===(c=Vo)||void 0===c?void 0:c.site)||null,e.userId=(null===(v=Vo)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(p=Vo)||void 0===p?void 0:p.userId),window.watchHistory=e.watchHistory||null,x=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable?null:null==e?void 0:e.chromecastReceiverId,P=(null==e||null===(m=e.analytics)||void 0===m?void 0:m.gaId)||null,(_=null==e?void 0:e.errors)&&(window.customErrors=_),window.customData=null==e?void 0:e.customData,mt(null==e||null===(g=e.customData)||void 0===g?void 0:g.localisation),T.set(e.apiBaseUrl),null!=e&&e.skin&&!He(e.skin)||(e.skin="VL_ONE"),n.next=35,kt(e);case 35:P&&xe("https://www.googletagmanager.com/gtag/js?id=".concat(P)).then(function(){return e=P,window.dataLayer=window.dataLayer||[],d("js",new Date),void d("config",e);var e}).catch(function(e){}),(D=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(x)))&&D.addEventListener("contextmenu",function(e){return e.preventDefault()}),y?(A={directPlaybackUrl:y,id:j="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},b?w(j,O).then(function(n){var t=(null==n?void 0:n.data)||{};Do(x,{res:Zo(Zo({},t),A)},e,{resolve:o,reject:i})}).catch(function(e){$n(e,x,i,j)}):Do(x,{res:A},e,{resolve:o,reject:i})):k?Ro(e,{resolve:o,reject:i}):E?Wo(e,{resolve:o,reject:i}):I?Fo(e,{resolve:o,reject:i}):No(e,{resolve:o,reject:i});case 39:case"end":return n.stop()}},n)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:dt,skip:qn,getPlayer:H,play:Wn,pause:Un,detectBrowser:ce,rewind:Zn,loadVideo:Xn,seekToTimeStamp:ot,isPlayerInitialised:Gn,load:Yn,authenticateLC:zn,dispose:Kn,enableCaptions:je,disableCaptions:Ae,getCaptions:Ve,playSelectedResolution:ct,getSource:Ee,setVolume:vt,getVolume:pt,disableControls:et,setPlaybackSpeed:rt,getEntitlementData:k,adsQueuePointManager:Ln,getSsaiEvents:un,playerEvents:st,onReplay:it,isBehindLive:nt}},exports.checkDvrStartOverEnabled=mo,exports.closeOpenDrawers=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map(function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()})},exports.createIconMarkup=function(e){return We(e)},exports.createIdxMapping=function(e){D=new Map,e.map(function(e,n){D.set(e.id,n)})},exports.crossIconSvg=function(){return'<svg width="13" height="13" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.273985 2.30391C-0.124672 1.74341 -0.0882695 0.933084 0.383092 0.418212C0.893733 -0.139565 1.72148 -0.13938 2.23191 0.418626L9.25 8.09082L16.2681 0.418626C16.7785 -0.13938 17.6063 -0.139565 18.1169 0.418212C18.5883 0.933084 18.6247 1.74341 18.226 2.30391L18.1173 2.43852L11.1987 10.0029L18.1169 17.5611C18.5883 18.0759 18.6247 18.8863 18.226 19.4468L18.1173 19.5814C17.6461 20.0965 16.9046 20.1362 16.3916 19.7006L16.2685 19.5818L9.25 11.9155L2.23153 19.5818L2.10835 19.7006C1.59542 20.1362 0.853882 20.0965 0.382714 19.5814L0.273985 19.4468C-0.124672 18.8863 -0.0882694 18.0759 0.383092 17.5611L7.30134 10.0029L0.382714 2.43852L0.273985 2.30391Z" fill="white"/>\n </svg>\n \n '},exports.debounce=function(e,n){var t;return function(){for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];var l=this;clearTimeout(t),t=setTimeout(function(){e.apply(l,i)},n)}},exports.detectBrowser=ce,exports.detectOrientationChange=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",o=document.getElementById(e);if(o&&Ge!==t){var i=window.getComputedStyle(o,null).getPropertyValue("height");n&&(n.style.height="".concat(i)),Ge=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",function(){clearTimeout(t),t=setTimeout(function(){o()},100)})},exports.disableCaptions=Ae,exports.enableCaptions=je,exports.getCaptions=Ve,exports.getCurrentEpgPrograms=$,exports.getCurrentSeries=z,exports.getCurrentVideo=Z,exports.getLocalisation=function(e){var n;return(null===(n=ft)||void 0===n?void 0:n[e])||""},exports.getPlayer=H,exports.getRenditions=dt,exports.getSeriesWatchHistory=E,exports.getSeriesWatchMap=Q,exports.getSource=Ee,exports.getVideoIdx=function(){return _},exports.handleDrawerResizing=function(e,n){var t,o=H(e),i=H(e).el(),r=new ResizeObserver(function(){var o;null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")||(t&&clearTimeout(t),t=setTimeout(function(){ze(e,n)},300))});r.observe(i),o.on("dispose",function(){r.disconnect()}),o.on("fullscreenchange",function(){setTimeout(function(){ze(e,n)},50)})},exports.highlightVideo=function(e,n){if(n){var t,o,i=H(n);if(i&&"function"==typeof i.el&&null!=i&&null!==(t=i.el())&&void 0!==t&&null!==(o=t.classList)&&void 0!==o&&o.contains("skin_defaultv2"))return void qe(e)}var r=l(document.querySelectorAll("[video-idx]"));console.log(r),r.map(function(n){var t=n.parentNode,o=n.getAttribute("video-idx");t.style.background=o==e?"gray":"none"})},exports.highlightVideo_DEFAULTV2_TEMP=qe,exports.impolicy16x9=Ze,exports.initialiseKeyboardEvents=function(e,n){var t,o,i,r=H(e),l=null==r||null===(t=r.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,u,s,d,c,v,p,f;if(Je.enabled&&"input"!=t.target.localName){var m=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(t.preventDefault(),null==a||a.focus()),m){case" ":null==l||l.click();break;case"m":case"M":r.muted(!r.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||Zn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(u=i.app_data)||void 0===u||null===(s=u.appcmsMain)||void 0===s||null===(d=s.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(p=v.appcmsMain)&&void 0!==p&&null!==(f=p.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||qn(e,10)}}},!0)},exports.initiateMarker=function(e){var n=H(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var i=t.start(0),r=t.end(t.length-1)-i;So(),Oo(r).forEach(function(e){var n=e.id,t=e.title,i=e.time,l=ko(n,t,Math.min(i/r*100,99.5));o.appendChild(l)})}},exports.injectSVG=function(e,n){if(!e)return null;e.classList.add("vjs-svg-icon");var t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0 0 48 48",t=document.createElementNS(Ue,"svg");t.setAttribute("viewBox",n),t.setAttribute("preserveAspectRatio","xMidYMid meet");var o=document.createElementNS(Ue,"use");return o.setAttributeNS(null,"href",e),t.appendChild(o),{svg:t,use:o}}(n),o=t.svg,i=t.use;return e.appendChild(o),i},exports.isMobile=ve,exports.isPaused=function(e){return i(e).paused()},exports.load=Yn,exports.onVideoEnded=at,exports.parseHtmlString=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},exports.parseSvgString=We,exports.pause=Un,exports.play=Wn,exports.playFromBeginningHandler=go,exports.playLiveHandler=ho,exports.playSelectedResolution=ct,exports.removeCaptions=Re,exports.removeMarkers=So,exports.rewind=Zn,exports.seasonIdxManager=J,exports.setCurrentVideo=U,exports.setUpdatedElHeight=ze,exports.setVideoIdx=Y,exports.setVideoIdxById=K,exports.setupAdvertisementMarkers=Pn,exports.setupAdvertisementMarkersForLinear=Bn,exports.skip=qn,exports.startLiveIcon=Qe,exports.throttle=Ye,exports.watchLiveIcon=function(){return'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M17 16L15 16L14.999 4L17 4L17 16ZM3 4.34473C3 4.19742 3.16454 4.10969 3.28711 4.19141L11.7695 9.84668C11.879 9.91969 11.879 10.0803 11.7695 10.1533L3.28711 15.8086C3.16454 15.8903 3 15.8026 3 15.6553L3 4.34473Z" fill="white"/>\n</svg>'};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/get"),a=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var l={startTime:0,timeLive:3600},u=0,c=l.timeLive,p=o.getComponent("Button"),h=o.getComponent("Component"),d=o.getComponent("ProgressControl"),v=d.getComponent("SeekBar"),m=d.getComponent("PlayProgressBar"),f=d.getComponent("LoadProgressBar"),_=o.getComponent("MouseTimeDisplay");f.prototype.update=function(e){var t=this.player_.buffered(),r=this.player_.duration(),a=this.player_.bufferedEnd(),n=this.partEls_,i=function(e,t){var r=e/t||0;return 100*(r>=1?1:r)+"%"};0!==i(a,r)&&(this.el_.style.width=i(a,r));for(var o=0;o<t.length;o++){var s=t.start(o),l=t.end(o),u=n[o];u||(u=this.el_.appendChild(document.createElement("div")),n[o]=u),0!==i(s,a)&&(u.style.left=i(s,a)),0!==i(l-s,a)&&(u.style.width=i(l-s,a))}for(var c=n.length;c>t.length;c--)this.el_.removeChild(n[c-1]);n.length=t.length},v.prototype.update_=function(e,t){var r=this.player_.duration(),a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),r!==Number.POSITIVE_INFINITY&&this.el_.setAttribute("aria-valuetext","-".concat(o.formatTime(r-a,r))),this.bar.update(o.dom.getBoundingClientRect(this.el_),t)},v.prototype.handleMouseMove=function(e){var t=1-this.calculateDistance(e),r=this.player_.seekable().end(0)-t*c;r===this.player_.duration()&&(r-=.1),this.player_.currentTime(r),this.update()},m.prototype.update=function(e,t){var r=this,a=this.player_.duration();this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var n=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),i=o.formatTime(a-n,a);0!==t&&a!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(i))})},_.prototype.update=function(e,t){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var a=o.formatTime(c-t*c,c);r.el_.style.left="".concat(e.width*t,"px"),0!==t&&r.player_.duration()!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(a))})};var y=function(e){var t=this;e||(e=l),this.on("timeupdate",function(e){var r,a;(a=(r=t).seekable())&&a.length&&(a.end(0)-r.currentTime()<20?r.controlBar.liveButton.addClass("onair"):r.controlBar.liveButton.removeClass("onair"),r.duration(r.seekable().end(0)),u||(u=c=r.seekable().end(0)))}),this.on("pause",function(e){t.controlBar.liveButton.removeClass("onair")}),this.ready(function(){var r;r=t,o.mergeOptions(l,e),r.addClass("vjs-dvr-seekbar"),r.controlBar.addClass("vjs-dvr-control-bar"),r.controlBar.progressControl.seekBar.__proto__.__proto__.update=function(){if(this.el_){var e;e="VolumeBar"===this.name_?this.getPercent():1-(this.player_.duration()-this.player_.currentTime())/c;var t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0),e>1&&(e=1);var r=(100*e).toFixed(2)+"%",a=t.el().style;return 0!==e&&(this.vertical()?a.height=r:a.width=r),e}}},r.controlBar.progressControl&&r.controlBar.progressControl.addClass("vjs-dvr-progress-control"),r.controlBar.liveButton=r.controlBar.addChild("liveButton"),r.controlBar.el().insertBefore(r.controlBar.liveButton.el(),r.controlBar.progressControl.el())})},C=function(){a(c,p);var o,l,u=(o=c,l=s(),function(){var e,t=i(o);if(l){var r=i(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return n(this,e)});function c(t,r){var a;return e(this,c),(a=u.call(this,t,r)).el().innerHTML='<span class="liveCircle"></span><span class="liveText">LIVE</span>',t.paused()||a.addClass("onair"),a}return t(c,[{key:"buildCSSClass",value:function(){return"vjs-live-button ".concat(r(i(c.prototype),"buildCSSClass",this).call(this))}},{key:"handleClick",value:function(e){var t=this.player_.seekable().end(0);this.player_.currentTime(t),this.player_.play()}}]),c}();h.registerComponent("LiveButton",C),(o.registerPlugin||o.plugin)("dvrSeekbar",y),exports.default=y;
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios")
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios");var e=require("./index-432bc006.js");require("video.js"),require("js-cookie"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("@babel/runtime/helpers/typeof"),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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./index-432bc006.js");function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o=function(){return!!e})()}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/assertThisInitialized");var l=s.getComponent("Component"),c=function(){r(m,l);var c,d,u=(c=m,d=o(),function(){var e,t=n(c);if(d){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function m(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(r=u.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(m,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(i.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-1efdbdb9.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=r.classList)&&void 0!==a&&a.contains("hidden")?(i.closeOpenDrawers(),r.classList.remove("hidden"),t.classList.add("open"),i.setUpdatedElHeight(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var a=document.getElementById(this.playerId);if(a){var n=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(n,"px"),a.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=s.dom.createEl("div",{className:"stream-selector-head"}),n=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var o=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),l=s.dom.createEl("div",{className:"stream-selector-content"}),c=s.dom.createEl("div",{className:"stream-tray"}),d=parseInt(sessionStorage.getItem("selectedStreamIndex")||0),u=function(e){var r,a,n,o=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i.SelectedStream())});d==e&&(o.classList.add("selected"),o.style.border="2px solid #D2393B"),o.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");o.classList.add("selected"),o.style.border="2px solid #D2393B",i.load(t.playerId,t.streams[e].id).then(function(e){i.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},o.style.backgroundImage="url(".concat(t.streams[e].img,")");var u=document.createElement("img");u.className="stream-thumbnail-image",u.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(a=window)||void 0===a||null===(n=a.customData)||void 0===n?void 0:n.fallbackImage)),o.append(u),s.dom.appendContent(c,o),s.dom.appendContent(l,c)},m=0;m<this.streams.length;m++)u(m);s.dom.appendContent(a,n),s.dom.appendContent(a,o),s.dom.appendContent(e,a),s.dom.appendContent(e,l),i.handleDrawerResizing(this.playerId,e)}}]),m}();exports.default=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./index-432bc006.js");function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/assertThisInitialized");var o=s.getComponent("Component"),c=function(){r(m,o);var c,d,u=(c=m,d=l(),function(){var e,t=a(c);if(d){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return n(this,e)});function m(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(r=u.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(m,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(i.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-7a86b517.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(i.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var n=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var l=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),o=s.dom.createEl("div",{className:"stream-selector-content"}),c=s.dom.createEl("div",{className:"stream-tray"}),d=function(e){var r,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i.SelectedStream())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",i.load(t.playerId,t.streams[e].id).then(function(e){i.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",n.append(a),s.dom.appendContent(c,n),s.dom.appendContent(o,c)},u=0;u<this.streams.length;u++)d(u);s.dom.appendContent(n,a),s.dom.appendContent(n,l),s.dom.appendContent(e,n),s.dom.appendContent(e,o),i.getPlayer(this.playerId).on("fullscreenchange",function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")})}}]),m}();exports.default=c;
|