@viewlift/player-backup 2.0.187-backup → 2.0.189-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-22652dfa.js → autoNextVideo-41da3adf.js} +1 -1
- package/cjs/bundle.css +34 -34
- package/cjs/{features-9cfbe682.js → features-284139cb.js} +1 -1
- package/cjs/generic-3f615bbd.js +1 -0
- package/cjs/{index-03e2cd90.js → index-5ecb7b79.js} +1 -1
- package/cjs/index-a351a4af.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-8c346b54.js +1 -0
- package/cjs/multicamv2-b126168c.js +1 -0
- package/cjs/nextEpisodeButton-2aea8a15.js +1 -0
- package/cjs/playlist-46f67a06.js +1 -0
- package/cjs/series-332e15bd.js +1 -0
- package/cjs/series-v2-5781b71a.js +1 -0
- package/cjs/series-v2-76d68ef3.js +1 -0
- package/cjs/skin-0e3d2dae.js +1 -0
- package/cjs/skin-1276d8ca.js +1 -0
- package/cjs/skin-4a149a9d.js +1 -0
- package/cjs/skin-8cf82be0.js +1 -0
- package/cjs/skin-8e6bcb6e.js +1 -0
- package/cjs/skin-e2f59bb3.js +1 -0
- package/cjs/skin-ed9c145d.js +1 -0
- package/cjs/{util-d1548c88.js → util-f7cfcd68.js} +1 -1
- package/cjs/videoSelector-3e0e5f6d.js +1 -0
- package/cjs/videoSelector-adf04e66.js +1 -0
- package/esm/{autoNextVideo-371fc9f9.js → autoNextVideo-85755fc4.js} +1 -1
- package/esm/bundle.css +34 -34
- package/esm/{features-f1d3d118.js → features-2ce15d85.js} +1 -1
- package/esm/generic-e4c9d7b0.js +1 -0
- package/esm/{index-8a921112.js → index-262b4925.js} +1 -1
- package/esm/index-da58bd54.js +1 -0
- package/esm/index.js +1 -1
- package/esm/multicamv2-00f6316c.js +1 -0
- package/esm/multicamv2-078f2b28.js +1 -0
- package/esm/nextEpisodeButton-bd252447.js +1 -0
- package/esm/playlist-6202f8d9.js +1 -0
- package/esm/series-735c0487.js +1 -0
- package/esm/series-v2-9c335821.js +1 -0
- package/esm/series-v2-a70bbbc4.js +1 -0
- package/esm/skin-02150ba0.js +1 -0
- package/esm/skin-41ef2916.js +1 -0
- package/esm/skin-54602099.js +1 -0
- package/esm/skin-813694d1.js +1 -0
- package/esm/skin-9c1ff8cb.js +1 -0
- package/esm/skin-a8a8d569.js +1 -0
- package/esm/skin-c6f71ba5.js +1 -0
- package/esm/{util-a0bb1689.js → util-2fa0573e.js} +1 -1
- package/esm/utilities/comscore.d.ts +4 -0
- package/esm/videoSelector-4360ad52.js +1 -0
- package/esm/videoSelector-b8ec9374.js +1 -0
- package/package.json +2 -1
- package/cjs/generic-d35f6dee.js +0 -1
- package/cjs/index-20a8f9d3.js +0 -1
- package/cjs/multicamv2-10c8a198.js +0 -1
- package/cjs/multicamv2-909f6195.js +0 -1
- package/cjs/nextEpisodeButton-9d58d26a.js +0 -1
- package/cjs/playlist-3e63d87f.js +0 -1
- package/cjs/series-d40a41ed.js +0 -1
- package/cjs/series-v2-6d1eeea2.js +0 -1
- package/cjs/series-v2-c01faea8.js +0 -1
- package/cjs/skin-0c2336f4.js +0 -1
- package/cjs/skin-2ea7faaf.js +0 -1
- package/cjs/skin-5e2c1ffd.js +0 -1
- package/cjs/skin-8519f6ab.js +0 -1
- package/cjs/skin-e7711ae6.js +0 -1
- package/cjs/skin-e9d5b0e1.js +0 -1
- package/cjs/skin-f9b64c74.js +0 -1
- package/cjs/videoSelector-540fe935.js +0 -1
- package/cjs/videoSelector-9349e072.js +0 -1
- package/esm/generic-f1cad267.js +0 -1
- package/esm/index-8fdfd90c.js +0 -1
- package/esm/multicamv2-dbbab362.js +0 -1
- package/esm/multicamv2-ffe2f040.js +0 -1
- package/esm/nextEpisodeButton-30d09255.js +0 -1
- package/esm/playlist-a8634369.js +0 -1
- package/esm/plugins/comscore_dist/index.min.d.ts +0 -51
- package/esm/series-77060f82.js +0 -1
- package/esm/series-v2-4ab00b80.js +0 -1
- package/esm/series-v2-fef2fd81.js +0 -1
- package/esm/skin-02c6353e.js +0 -1
- package/esm/skin-096756f6.js +0 -1
- package/esm/skin-17b1ff2a.js +0 -1
- package/esm/skin-2e0eb419.js +0 -1
- package/esm/skin-3597ca56.js +0 -1
- package/esm/skin-45f73b69.js +0 -1
- package/esm/skin-801a41e9.js +0 -1
- package/esm/videoSelector-360a2631.js +0 -1
- package/esm/videoSelector-f362ee71.js +0 -1
package/cjs/series-d40a41ed.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-d35f6dee.js"),u=require("./icons-2609dbe4.js"),p=require("./currentVideoInfo-31d70bec.js"),v=require("./skin-516012d7.js");require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray");var h=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function f(e){var i=m();return function(){var t,n=a(e);if(i){var s=a(this).constructor;t=Reflect.construct(n,arguments,s)}else t=n.apply(this,arguments);return r(this,t)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var g,b=c.getComponent("Component"),y=function(e){s(a,b);var r=f(a);function a(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,a),t=r.call(this,e,s),o(n(t),"seriesData",[]),t.seriesData=s.seriesData,g=s.playerId;var l=t.el();return C(l,t.seriesData),t.loadCSS(),t}return t(a,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-9c237975.js")})).then((function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)}))}}]),a}();function q(){return(q=e(l.mark((function e(i,t,n,s){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(g),h(g),d.load(g,t).then((function(e){p.setCurrentVideo(e.response),d.play(g)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=v.parseHtmlString(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}exports.customSeasonList=C,exports.handleSeasonChange=function(e,i,t,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=v.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then((function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map((function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),p=document.querySelectorAll(".meta-details"),h=document.querySelector("#episodes-back-btn"),f=e.id,m=e.episodes;h.addEventListener("click",(function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(s,r)}));for(var g=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach((function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),p[i].addEventListener("click",(function(){return function(e,i,t,n){return q.apply(this,arguments)}(i,m[i].id,t,u)})),e.episodes[i].id==f&&u[i].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)},exports.seriesModule=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),o=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),r=require("./icons-2609dbe4.js"),d=require("./generic-d35f6dee.js"),c=require("./currentVideoInfo-31d70bec.js"),u=require("./skin-516012d7.js"),v=require("./autoNextVideo-22652dfa.js"),m=require("./player_instance-fcf6a8fb.js");function p(e){var t=h();return function(){var s,n=l(e);if(t){var o=l(this).constructor;s=Reflect.construct(n,arguments,o)}else s=n.apply(this,arguments);return i(this,s)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/slicedToArray"),require("./util-d1548c88.js"),require("@babel/runtime/helpers/typeof");var y=a.getComponent("Component"),g=function(i){o(h,y);var l=p(h);function h(s){var o,i,a,r,d,u,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,h),(u=l.call(this,s,m)).playerId=m.playerId,u.seriesData=m.sres,u.videos=null==m||null===(o=m.sres)||void 0===o?void 0:o.seasons,u.currentVideoData=m.res,u.initialiseStructure(),u.loadCSS(),u.selectedSeason=0,u.cb=null==m||null===(i=m.series)||void 0===i?void 0:i.cb,u.autoPlayNext=(null==m||null===(a=m.series)||void 0===a?void 0:a.autoPlayNext)||!1,sessionStorage.getItem("token"),u.watchMap=c.getSeriesWatchMap(),null!==(r=n(u))&&void 0!==r&&r.autoPlayNext&&null!=m&&null!==(d=m.series)&&void 0!==d&&d.enable){var p,y,g,b,f=null==m||null===(p=m.sres)||void 0===p?void 0:p.seasons,C=[];f.map((function(t){C.push.apply(C,e(t.episodes))})),c.createIdxMapping(C),c.setVideoIdxById(null===(y=u.options_)||void 0===y||null===(g=y.res)||void 0===g||null===(b=g.video)||void 0===b?void 0:b.id),v.autoPlayNext({playerId:u.playerId,content:C,cb:u.cb,series:null==m?void 0:m.sres})}return u}return s(h,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r.PlaylistIcon())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-v2-2105fd89.js")})).then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(u.closeOpenDrawers(),e.classList.remove("hidden"),s.classList.add("open"),u.setUpdatedElHeight(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout((function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()}),100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),a.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var n=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=this.createSeasonLister();for(a.dom.appendContent(n,o),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=u.parseSvgString(r.crossIconSvg());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=a.dom.createEl("div",{className:"series-selector-head"}),o=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(r.crossIconSvg()),tabIndex:-1});o.onclick=function(){t.handleSeriesCloseIcon(o,e,s)},o.onkeydown=function(n){"Enter"===n.key&&t.handleSeriesCloseIcon(o,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),d=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(n,l),a.dom.appendContent(d,c),a.dom.appendContent(n,o),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,d),u.handleDrawerResizing(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;m.getPlayer(this.playerId);for(var t=c.getCurrentSeries(),s=a.dom.createEl("div",{className:"season-container"}),n=function(n){var o,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(o=t[n])||void 0===o?void 0:o.title,d.role="button",d.type="button",d.setAttribute("aria-LabelledBy",null===(i=t[n])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(n));var u=document.createElement("div");u.className="season - ".concat(n),u.textContent=null===(l=t[n])||void 0===l?void 0:l.title,u.id=null===(r=t[n])||void 0===r?void 0:r.title;var v=a.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});v.setAttribute("type","radio"),e.selectedSeason==n&&(v.checked=!0),v.onclick=function(t){c.seasonIdxManager.set(n),e.showSeasonDetails(n)},d.onkeydown=function(t){"Enter"===t.key&&(c.seasonIdxManager.set(n),e.showSeasonDetails(n))},a.dom.appendContent(d,v),a.dom.appendContent(d,u),a.dom.appendContent(s,d)},o=0;o<t.length;o++)n(o);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,n=this;c.setVideoIdxById(null===(s=e[t])||void 0===s?void 0:s.id),d.load(this.playerId,e[t].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map((function(e){var t,s,o,i,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(o=s.imageGist)||void 0===o?void 0:o.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==n||null===(d=n.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}}));for(var o=function(o){var i,l,r,d,c,v=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:o,innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[o])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var p=a.dom.createEl("div",{className:"series-section-image"}),h=(null===(r=t[o])||void 0===r?void 0:r.description)||"";(null===(d=h)||void 0===d?void 0:d.length)>170&&(h=h.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(h||"")});var y=a.dom.createEl("img",{className:"series-image"});y.src="".concat(u.impolicy16x9(null===(c=t[o])||void 0===c?void 0:c.img)),y.alt="Episode ".concat(o+1),a.dom.appendContent(p,y),a.dom.appendContent(v,p),a.dom.appendContent(v,m),a.dom.appendContent(s,v),v.onclick=function(e){e.stopPropagation(),n.loadSeriesAssetById(t,o)},v.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),n.loadSeriesAssetById(t,o))},m.onclick=function(t){var s,n,o,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=c.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=a.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=u.parseSvgString(r.BackIcon());n.appendChild(o),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),h}();exports.default=g;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-2609dbe4.js"),d=require("./generic-d35f6dee.js"),c=require("./currentVideoInfo-31d70bec.js"),u=require("./skin-516012d7.js"),v=require("./autoNextVideo-22652dfa.js"),p=require("./player_instance-fcf6a8fb.js");function m(e){var t=h();return function(){var n,s=r(e);if(t){var i=r(this).constructor;n=Reflect.construct(s,arguments,i)}else n=s.apply(this,arguments);return o(this,n)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/slicedToArray"),require("./util-d1548c88.js"),require("@babel/runtime/helpers/typeof");var g=l.getComponent("Component"),f=function(o){i(h,g);var r=m(h);function h(n){var i,o,l,a,d,u,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,h),(u=r.call(this,n,p)).playerId=p.playerId,u.seriesData=p.sres,u.videos=null==p||null===(i=p.sres)||void 0===i?void 0:i.seasons,u.currentVideoData=p.res,u.initialiseStructure(),u.loadCSS(),u.selectedSeason=0,u.cb=null==p||null===(o=p.series)||void 0===o?void 0:o.cb,u.autoPlayNext=(null==p||null===(l=p.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),u.watchMap=c.getSeriesWatchMap(),null!==(a=s(u))&&void 0!==a&&a.autoPlayNext&&null!=p&&null!==(d=p.series)&&void 0!==d&&d.enable){var m,g,f,y,C=null==p||null===(m=p.sres)||void 0===m?void 0:m.seasons,b=[];C.map((function(t){b.push.apply(b,e(t.episodes))})),c.createIdxMapping(b),c.setVideoIdxById(null===(g=u.options_)||void 0===g||null===(f=g.res)||void 0===f||null===(y=f.video)||void 0===y?void 0:y.id),v.autoPlayNext({playerId:u.playerId,content:b,cb:u.cb,series:null==p?void 0:p.sres})}return u}return n(h,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-v2-e037e14e.js")})).then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(u.closeOpenDrawers(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=document.getElementById(this.playerId);if(s){var i=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(i,"px"),l.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(s,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=u.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),d=this.createSeasonLister();l.dom.appendContent(r,d),l.dom.appendContent(s,i),l.dom.appendContent(s,o),l.dom.appendContent(e,s),l.dom.appendContent(e,r),p.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=document.getElementById(t.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;p.getPlayer(this.playerId);for(var t=c.getCurrentSeries(),n=l.dom.createEl("div",{className:"season-container"}),s=function(s){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(s));var r=document.createElement("div");r.className="season - ".concat(s),r.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){c.seasonIdxManager.set(s),e.showSeasonDetails(s)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(n,o)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map((function(e){var t,n,i,o,r;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(n=e.gist)||void 0===n||null===(i=n.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==s||null===(o=s.watchMap)||void 0===o||null===(r=o.get(null==e?void 0:e.id))||void 0===r?void 0:r.p)||0}}));for(var i=function(i){var o,r,a,u,v,p,m,h=l.dom.createEl("div",{className:"series-container"}),g=l.dom.createEl("div",{className:"series-section",index:i}),f=l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),y=l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});l.dom.appendContent(g,f),l.dom.appendContent(g,y),l.dom.appendContent(h,g),l.dom.appendContent(n,h);var C=l.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(a=b)||void 0===a?void 0:a.length)>170&&(b=b.substr(0,170)+"...");var S=l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),N=l.dom.createEl("img",{className:"series-image"});N.src="".concat((null===(u=t[i])||void 0===u?void 0:u.img)||(null===(v=window)||void 0===v||null===(p=v.customData)||void 0===p?void 0:p.fallbackImage)),N.alt="".concat(null===(m=t[i])||void 0===m?void 0:m.title),l.dom.appendContent(C,N),l.dom.appendContent(C,S),l.dom.appendContent(h,C),l.dom.appendContent(n,h),C.onclick=function(e){var n;e.stopPropagation(),c.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),d.load(s.playerId,t[i].id).then((function(e){null!=s&&s.cb&&s.cb(e)})).catch((function(e){null!=s&&s.cb&&s.cb(e)}))},g.onclick=function(t){var n,s,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(h.style.backgroundColor="#0000007d",null==r||null===(s=r.classList)||void 0===s||s.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),h.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=c.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=l.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=u.parseSvgString(a.BackIcon());s.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),h}();exports.default=f;
|
package/cjs/skin-0c2336f4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-d35f6dee.js"),r=require("./player_instance-fcf6a8fb.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("./currentVideoInfo-31d70bec.js"),require("./captions-dbc83a75.js"),require("./skin-516012d7.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray");var i=function(i){var n=r.getPlayer(i),t=document.getElementById("".concat(i));t&&t.addEventListener("touchstart",(function(){n.paused()?e.play(i):e.pause(i)}))},n=function(e){var i=r.getPlayer(e);i.requestFullscreen=function(){},i.controlBar.hide()};exports.initaliseSkin=function(e){n(e),i(e)};
|
package/cjs/skin-2ea7faaf.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-9cfbe682.js"),l=require("./icons-2609dbe4.js"),i=require("./player_instance-fcf6a8fb.js"),r=require("./skin-516012d7.js"),n=require("./resolution-f9dcc1b4.js"),o=require("./captions-dbc83a75.js"),t=require("./index-03e2cd90.js"),d=require("./generic-d35f6dee.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./currentVideoInfo-31d70bec.js"),require("./autoNextVideo-22652dfa.js"),require("./util-d1548c88.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),exports.initialiseSkin=function(u,a){i.getPlayer(u).addClass("skin_defaultv2"),function(){"Chrome"==d.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)}));Promise.resolve().then((function(){return require("./skin-38de8257.js")})).then((function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)}))}(),function(l,r){var u=i.getPlayer(l);u&&(u.on("loadeddata",(function(){var i,u,a,s,v,c,p;(null===(i=n.getRenditions(l))||void 0===i?void 0:i.length)>0&&e.addSettingsButtonV2(l,r),(null===(u=o.getCaptions(l))||void 0===u?void 0:u.length)>0&&e.addCaptionButton(l,r),!(null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable||null!==(s=window)&&void 0!==s&&null!==(v=s.app_data)&&void 0!==v&&null!==(c=v.appcmsMain)&&void 0!==c&&null!==(p=c.features)&&void 0!==p&&p.auto_play)||null!=r&&r.liveVideo||t.addNextEpPreview(l,r),null!=r&&r.liveVideo||d.isMobile()||t.initiateTrickplay(l)})),u.one("play",(function(){var i,r,n,o;null!==(i=window)&&void 0!==i&&null!==(r=i.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(l,null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)})))}(u,a),function(e,n){var o,t,d,u,a,s,v,c,p,m,h,g,b,q=i.getPlayer(e);null===(o=q.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(t=q.controlBar)||void 0===t||t.addChild("VolumePanel",{inline:!1},1);var f=null===(d=q.controlBar)||void 0===d?void 0:d.getChild("ProgressControl"),y=null===(u=q.controlBar)||void 0===u?void 0:u.getChild("CurrentTimeDisplay"),C=null===(a=q.controlBar)||void 0===a?void 0:a.getChild("SeekToLive"),V=document.createElement("div");V.className="custom-spaced-progress-bar",f&&y&&C&&V.append(f.el(),y.el(),C.el());null===(s=q.controlBar)||void 0===s||null===(v=s.el())||void 0===v||v.append(V),null==q||null===(c=q.controlBar)||void 0===c||null===(p=c.getChild("FullscreenToggle"))||void 0===p||null===(m=p.el())||void 0===m||m.appendChild(r.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null==q||null===(h=q.controlBar)||void 0===h||null===(g=h.getChild("FullscreenToggle"))||void 0===g||null===(b=g.el())||void 0===b||b.appendChild(r.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var j=document.getElementsByClassName("vjs-time-control");n.liveVideo&&j[0]&&(j[0].style.display="none")}(u,a),function(i,r){var n,o,t,d,u,a,s=(null==r?void 0:r.skin_settings)||{},v=0!=(null==s?void 0:s.slowMoBtn);0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(i,"defaultV2",l.SkipSvgV2());(0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(i,"defaultV2",l.RewindSvgV2());!r.liveVideo&&v&&e.addSlowMotion(i);(null==r||null===(n=r.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.relatedVideos);(null==r||null===(t=r.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.streams);(null==r||null===(d=r.playlist)||void 0===d||null===(u=d.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(i,null==r?void 0:r.playlist);null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,r)}(u,a),t.addTVProviderImage(u,a)};
|
package/cjs/skin-5e2c1ffd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-9cfbe682.js"),l=require("./player_instance-fcf6a8fb.js"),i=require("./index-03e2cd90.js"),r=require("./generic-d35f6dee.js");require("videojs-contrib-quality-menu");var n=require("./index-20a8f9d3.js"),o=require("./helper-a50a8ffc.js"),t=require("./currentVideoInfo-31d70bec.js"),u=require("video.js"),a=require("./icons-2609dbe4.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./resolution-f9dcc1b4.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./skin-516012d7.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-22652dfa.js"),require("./util-d1548c88.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("./captions-dbc83a75.js"),require("video.js/dist/video-js.min.css");function d(u,a){var d=l.getPlayer(u);d&&(d.on("loadeddata",(function(){var e,s,v,c,p,b=o.checkDvrStartOverEnabled(a),m=t.getCurrentEpgPrograms();d.qualityLevels()&&d.qualityLevels().length&&function(e){var i=l.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(u),!(null!=a&&null!==(e=a.series)&&void 0!==e&&e.enable||null!==(s=window)&&void 0!==s&&null!==(v=s.app_data)&&void 0!==v&&null!==(c=v.appcmsMain)&&void 0!==c&&null!==(p=c.features)&&void 0!==p&&p.auto_play)||null!=a&&a.liveVideo||i.addNextEpPreview(u,a),null!=a&&a.liveVideo||r.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||i.initiateTrickplay(u),b&&m&&m.length?n.initiateMarker(u):n.removeMarkers()})),d.one("play",(function(){var l,i,r,n;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(u,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)})))}var s=function(e,i){var r,n,o,t,a,d,s,v,c,p,b,m,g=l.getPlayer(e),h=(null==i?void 0:i.theme)||{},y=u.dom.$(".vjs-play-progress"),f=u.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");f&&(f.style.color="".concat(null===(r=window)||void 0===r||null===(n=r.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(t=o.brand)||void 0===t||null===(a=t.cta)||void 0===a||null===(d=a.primary)||void 0===d?void 0:d.backgroundColor)),y&&(y.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(c=v.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(b=p.cta)||void 0===b||null===(m=b.primary)||void 0===m?void 0:m.backgroundColor));var q=g.getChild("BigPlayButton")||null;(null==h?void 0:h.progressBarColor)&&y&&(y.style.background=h.progressBarColor),(null==h?void 0:h.playButtonBackgroundColor)&&q&&(q.el().style.background=h.playButtonBackgroundColor),(null==h?void 0:h.playButtonColor)&&f&&(f.style.color=h.playButtonColor),(null==h?void 0:h.playButtonType)&&("square"==(null==h?void 0:h.playButtonType)?q.el().style.borderRadius=".3em":q.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(n,u){l.getPlayer(n).addClass("skin_vlone"),d(n,u),function(l,n){var u,d,s,v,c,p,b,m,g,h,y,f,q,j,w,k,C=(null==n?void 0:n.liveVideo)||!1,B=(null==n||null===(u=n.res)||void 0===u?void 0:u.contentType)||"video",M=(null==n||null===(d=n.res)||void 0===d||null===(s=d[B])||void 0===s?void 0:s.isSSAIEnabled)||!1,S=r.getSource(null==n?void 0:n.res,l)||{};S.src;var T=(null==n?void 0:n.skin_settings)||{};o.checkDvrStartOverEnabled(n),null!=T&&T.skipBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(l,"VL_ONE",a.SkipSvgV2());(null!=T&&T.rewindBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(l,"VL_ONE",a.RewindSvgV2());(null==n||null===(v=n.relatedVideos)||void 0===v||null===(c=v.content)||void 0===c?void 0:c.length)>0&&e.addVideoSelector(l,null==n?void 0:n.relatedVideos);null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable&&e.addSeriesSelectorV2(l,n);(null==n||null===(b=n.streams)||void 0===b?void 0:b.length)>1&&e.addMulticamSelector(l,null==n?void 0:n.streams);if(i.addTVProviderImage(l,n),r.initialiseKeyboardEvents(l,n),"MEDIA_TAILOR"==(null===(m=window)||void 0===m||null===(g=m.app_data)||void 0===g||null===(h=g.appcmsMain)||void 0===h||null===(y=h.adsConfig)||void 0===y?void 0:y.vodAdSticherProvider)&&null!==(f=window)&&void 0!==f&&null!==(q=f.app_data)&&void 0!==q&&null!==(j=q.appcmsMain)&&void 0!==j&&null!==(w=j.adsConfig)&&void 0!==w&&w.vodAdClientSideTracking&&M)if(C)r.setupAdvertisementMarkersForLinear(l);else{var V,L=null;if(null!=n&&null!==(V=n.series)&&void 0!==V&&V.enable){var E,P,_,A,O,x=null===(E=t.getCurrentVideo())||void 0===E||null===(P=E.video)||void 0===P||null===(_=P.gist)||void 0===_?void 0:_.id,R=t.getSeriesWatchMap(),D=(null==R?void 0:R.get(x))||{t:0,p:0},I=D.t,N=D.p;"function"==typeof(null===(A=window)||void 0===A||null===(O=A.watchHistory)||void 0===O?void 0:O.cb)&&window.watchHistory.cb({watchedTime:I}),N<95&&(L=I)}else{var F=n.watchHistoryResumeTime;n.watchedPercentage<95&&(L=F)}r.setupAdvertisementMarkers(l,L)}null!=n&&n.isDvrEnabled&&null!=n&&null!==(k=n.dvrConfig)&&void 0!==k&&k.enable&&(e.addStartFromBeginningButton(l,n),e.addWatchLiveButton(l,n))}(n,u),s(n,u),function(e){var i,r,n,o=l.getPlayer(e),t=null;if(!o)return;var u=o.controlBar.getChild("VolumePanel"),a=null===(i=u.getChild("MuteToggle"))||void 0===i?void 0:i.el(),d=null==u||null===(r=u.el())||void 0===r?void 0:r.querySelector(".vjs-volume-bar"),s=null==u||null===(n=u.el())||void 0===n?void 0:n.querySelector(".vjs-volume-level");if(!u||!d||!s)return;function v(e){e.preventDefault(),t&&(clearTimeout(t),t=null),p(b(e.touches[0]))}function c(e){e.preventDefault(),p(b(e.changedTouches[0])),t=setTimeout((function(){u.el().classList.remove("vjs-hover")}),2e3)}function p(e){var l=Math.min(Math.max(e,0),100);s.style.height=l+"%",d.setAttribute("aria-valuenow",l),d.setAttribute("aria-valuetext",l+"%"),o.volume(l/100)}function b(e){var l=d.getBoundingClientRect(),i=e.clientY-l.top,r=l.height;return 100-Math.min(Math.max(i/r*100,0),100)}a.addEventListener("touchend",(function(){null!=u&&u.el()&&(u.el().classList.toggle("vjs-hover"),o.muted(!1),t&&(clearTimeout(t),t=null),t=setTimeout((function(){u.el().classList.remove("vjs-hover")}),2e3))})),d.addEventListener("touchmove",v,{passive:!1}),d.addEventListener("touchstart",v,{passive:!1}),d.addEventListener("touchend",c,{passive:!1})}(n)};
|
package/cjs/skin-8519f6ab.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-9cfbe682.js"),l=require("./icons-2609dbe4.js"),i=require("./player_instance-fcf6a8fb.js"),n=require("./skin-516012d7.js"),t=require("./resolution-f9dcc1b4.js"),o=require("./index-03e2cd90.js"),r=require("./generic-d35f6dee.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./currentVideoInfo-31d70bec.js"),require("./autoNextVideo-22652dfa.js"),require("./util-d1548c88.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("./captions-dbc83a75.js"),exports.initialiseSkin=function(s,u){i.getPlayer(s).addClass("skin_news"),function(){"Chrome"==r.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)}));Promise.resolve().then((function(){return require("./skin-12248e27.js")})).then((function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)}))}(),function(l,n){var s=i.getPlayer(l);s&&s.on("loadeddata",(function(){var i,s,u,d,C,a;(null===(i=t.getRenditions(l))||void 0===i?void 0:i.length)>0&&e.addSettingsButtonV2(l,n),!(null!=n&&null!==(s=n.series)&&void 0!==s&&s.enable||null!==(u=window)&&void 0!==u&&null!==(d=u.app_data)&&void 0!==d&&null!==(C=d.appcmsMain)&&void 0!==C&&null!==(a=C.features)&&void 0!==a&&a.auto_play)||null!=n&&n.liveVideo||o.addNextEpPreview(l,n),null!=n&&n.liveVideo||r.isMobile()||o.initiateTrickplay(l)}))}(s,u),function(e,l){var t,o,r,s,u,d,C,a,v,c,h,p,f,m,b,B,y,L,j=i.getPlayer(e);null===(t=j.controlBar)||void 0===t||t.removeChild("VolumePanel"),null===(o=j.controlBar)||void 0===o||o.addChild("VolumePanel",{inline:!1},1);var g=null===(r=j.controlBar)||void 0===r?void 0:r.getChild("ProgressControl"),V=document.createElement("div");V.className="custom-spaced-progress-bar",g&&V.append(g.el());null===(s=j.controlBar)||void 0===s||null===(u=s.el())||void 0===u||u.append(V);var E='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>';j.el().insertBefore(n.parseSvgString(E),null!==(d=j.el().firstChild)&&void 0!==d?d:null);var w=(null==j||null===(C=j.controlBar)||void 0===C||null===(a=C.getChild("PlayToggle"))||void 0===a||null===(v=a.el())||void 0===v?void 0:v.firstChild)||null;if(w){w.style.height="24px",w.style.width="24px";var x=n.injectSVG(w,j.paused()?"#vjs-icon-play":"#vjs-icon-pause");j.on("pause",(function(){return x.setAttributeNS(null,"href","#vjs-icon-play")})),j.on("play",(function(){return x.setAttributeNS(null,"href","#vjs-icon-pause")}))}var S=(null==j||null===(c=j.controlBar)||void 0===c||null===(h=c.getChild("FullscreenToggle"))||void 0===h||null===(p=h.el())||void 0===p?void 0:p.firstChild)||null;if(S){S.style.height="24px",S.style.width="24px";var q=n.injectSVG(S,"#vjs-icon-fullscreen");j.on("fullscreenchange",(function(){var e=j.isFullscreen_;null==q||q.setAttributeNS(null,"href",e?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var M=(null==j||null===(f=j.controlBar)||void 0===f||null===(m=f.getChild("VolumePanel"))||void 0===m?void 0:m.el())||null;if(M){var k=M.querySelector(".vjs-mute-control .vjs-icon-placeholder");k.classList.add("vjs-svg-icon"),k.style.height="24px",k.style.width="24px";var P=n.injectSVG(k,j.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");j.on("volumechange",(function(e){var l=j.volume();console.log(l,j.muted()),0==l||j.muted()?P.setAttributeNS(null,"href","#vjs-icon-mute"):l>0&&l<=.3?P.setAttributeNS(null,"href","#vjs-icon-volume1"):l>=.3&&l<=.7?P.setAttributeNS(null,"href","#vjs-icon-volume2"):P.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var Z=(null==j||null===(b=j.controlBar)||void 0===b||null===(B=b.getChild("PictureInPictureToggle"))||void 0===B?void 0:B.el())||null;if(Z){var _=null==Z?void 0:Z.querySelector(".vjs-icon-placeholder");_.style.height="16px",_.style.width="25px";var A=n.injectSVG(_,"#vjs-icon-pip");j.on("enterpictureinpicture",(function(){A.setAttributeNS(null,"href","#vjs-icon-pip")}))}var N=(null==j||null===(y=j.controlBar)||void 0===y||null===(L=y.getChild("SubsCapsButton"))||void 0===L?void 0:L.el())||null;if(N){var T=N.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");T.classList.add("vjs-svg-icon"),T.style.height="16px",T.style.width="29px";var H=n.injectSVG(T,"#vjs-icon-caps");H.setAttributeNS(null,"href","#vjs-icon-captions-off"),j.textTracks().on("change",(function(e){for(var l=j.textTracks(),i=!1,n=0;n<l.length;n++){var t=l[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?H.setAttributeNS(null,"href","#vjs-icon-captions"):H.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}}(s),function(i,n){var t,o,r,s,u,d,C=(null==n?void 0:n.skin_settings)||{};null==C||C.slowMoBtn,null!=C&&C.skipBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(i,"VL_ONE",SkipSvgV2());(null!=C&&C.rewindBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(i,"VL_ONE",l.RewindSvgV3());(null==n||null===(t=n.relatedVideos)||void 0===t||null===(o=t.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==n?void 0:n.relatedVideos);(null==n||null===(r=n.streams)||void 0===r?void 0:r.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==n?void 0:n.streams);(null==n||null===(s=n.playlist)||void 0===s||null===(u=s.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(i,null==n?void 0:n.playlist);null!=n&&null!==(d=n.series)&&void 0!==d&&d.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,n)}(s,u),o.addTVProviderImage(s,u)};
|
package/cjs/skin-e7711ae6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./player_instance-fcf6a8fb.js"),r=require("./features-9cfbe682.js"),i=require("./resolution-f9dcc1b4.js"),n=require("./captions-dbc83a75.js");require("video.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./generic-d35f6dee.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("./currentVideoInfo-31d70bec.js"),require("./skin-516012d7.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/assertThisInitialized"),exports.initialiseSkin=function(t,s){Promise.resolve().then((function(){return require("./skin-fc1e7e52.js")})).then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,s){e.getPlayer(t).on("loadeddata",(function(){var e;(null===(e=i.getRenditions(t))||void 0===e?void 0:e.length)>0&&r.addSettingsButtonV2(t,s),null!=s&&s.disableCaptions&&n.removeCaptions(t)}))}(t,s),function(i,n){var t=e.getPlayer(i);t.controls(!1),r.addDBClickFullScreen(i)}(t)};
|
package/cjs/skin-e9d5b0e1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-9cfbe682.js"),r=require("./generic-d35f6dee.js"),i=require("./icons-2609dbe4.js"),n=require("./player_instance-fcf6a8fb.js"),t=require("./skin-516012d7.js"),s=require("./currentVideoInfo-31d70bec.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./resolution-f9dcc1b4.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/slicedToArray"),exports.initialiseSkin=function(l,o){n.getPlayer(l).addClass("skin_default"),r.initialiseKeyboardEvents(l,o),Promise.resolve().then((function(){return require("./skin-ba38afdb.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(l,o),function(r,t){var l=n.getPlayer(r),o=(null==t?void 0:t.sres)||null;l.on("loadeddata",(function(){e.addResolutionModule(r,"default",i.SettingsSvg()),o&&Promise.resolve().then((function(){return require("./nextEpisodeButton-9d58d26a.js")})).then((function(e){e.initaliseFunctionality(t.sres.seasons,s.getCurrentVideo())}))})),l.one("loadedmetadata",(function(){var i;o&&(e.addSeriesModule(r,null==t||null===(i=t.sres)||void 0===i?void 0:i.seasons,t),e.addNextEpisodeButton(t.sres,t.res,r))}))}(l,o),function(e,r){var s,l,o,a,u=n.getPlayer(e),d=document.getElementsByClassName("vjs-current-time")[0],c=document.getElementsByClassName("vjs-duration")[0],m=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(d&&(d.style.display="none"),c&&(c.style.display="none"),m&&(m.style.display="none"));null===(s=u.controlBar.getChild("FullscreenToggle"))||void 0===s||null===(l=s.el())||void 0===l||l.appendChild(t.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(o=u.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(a=o.el())||void 0===a||a.appendChild(t.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var p=u.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(t.createIconMarkup(i.NewCaptionsSvg()));var v=document.createElement("div");v.classList.add("caption-header"),p.querySelector(".vjs-menu-content").insertBefore(v,p.querySelector(".vjs-menu-item"))}(l,o)};
|
package/cjs/skin-f9b64c74.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-d35f6dee.js"),r=require("./player_instance-fcf6a8fb.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("./currentVideoInfo-31d70bec.js"),require("./captions-dbc83a75.js"),require("./skin-516012d7.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray");var i=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};exports.initaliseSkin=function(n){Promise.resolve().then((function(){return require("./skin-225252ff.js")})).then((function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)})),i(),function(i){var n=document.getElementById("".concat(i)),t=r.getPlayer(i);n&&n.addEventListener("touchstart",(function(){t.paused()?e.play(i):e.pause(i)}))}(n)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-2609dbe4.js"),l=require("./generic-d35f6dee.js"),d=require("./currentVideoInfo-31d70bec.js"),s=require("./skin-516012d7.js"),c=require("./autoNextVideo-22652dfa.js"),u=require("./localisation-56e0a999.js");function v(e){var t=m();return function(){var n,r=o(e);if(t){var a=o(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return i(this,n)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("./util-d1548c88.js"),require("@babel/runtime/helpers/typeof");var p=r.getComponent("Component"),h=function(i){n(m,p);var o=v(m);function m(t){var n,i,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(r=o.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,r.autoNext=(null==a||null===(i=a.related)||void 0===i?void 0:i.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:r.playerId,content:r.videos,cb:r.cb})),r}return t(m,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-fcdf11eb.js")})).then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var i;null!==(i=n.classList)&&void 0!==i&&i.contains("hidden")?(s.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",s.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var i=document.getElementById(this.playerId);if(i){var o=window.getComputedStyle(i,null).getPropertyValue("height");n.style.height="".concat(o),r.dom.appendContent(t,n),i.style.overflow="hidden",this.addFunctionality(n),s.detectOrientationChange(this.playerId,n)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),i=r.dom.createEl("div",{className:"video-selector-head"}),o=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var c=r.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),v=r.dom.createEl("div",{className:"video-selector-content"}),m=r.dom.createEl("div",{className:"video-container"}),p=function(e){var n,i,o,a,c,u=r.dom.createEl("div",{className:"video -".concat(e)}),p=r.dom.createEl("div",{className:"recommended -".concat(e)});p.setAttribute("video-idx",e),p.onclick=function(){d.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),i=0;i<n.length;i++)n[i].style.border="none";s.highlightVideo_DEFAULTV2_TEMP(e),l.load(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(i=n[e])||void 0===i?void 0:i.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),h.alt="No Thumbnail Available",p.append(h);var b=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(c=t.videos[e])||void 0===c?void 0:c.title)||"")});r.dom.appendContent(u,p),r.dom.appendContent(u,b),r.dom.appendContent(m,u),r.dom.appendContent(v,m)},h=0;h<this.videos.length;h++)p(h);r.dom.appendContent(i,o),r.dom.appendContent(i,c),r.dom.appendContent(e,i),r.dom.appendContent(e,v),s.handleDrawerResizing(this.playerId,e)}}]),m}();exports.default=h;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-2609dbe4.js"),r=require("./generic-d35f6dee.js"),d=require("./currentVideoInfo-31d70bec.js"),s=require("./skin-516012d7.js"),c=require("./autoNextVideo-22652dfa.js"),u=require("./localisation-56e0a999.js");function m(e){var t=v();return function(){var n,l=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("./util-d1548c88.js"),require("@babel/runtime/helpers/typeof");var p=l.getComponent("Component"),h=function(o){n(v,p);var i=m(v);function v(t){var n,o,l,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(l=i.call(this,t,a)).playerId=a.playerId,l.seriesData=a.sres,l.videos=a.related.content,l.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,l.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,l.currentVideoData=a.res,l.initialiseStructure(),l.loadCSS(),l.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:l.playerId,content:l.videos,cb:l.cb})),l}return t(v,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-b6e03076.js")})).then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(s.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),s.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),s.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;d.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";s.highlightVideo(e),r.load(this.playerId,this.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var r=l.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),d=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,r,u,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(s.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||s.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(r=a.appcmsMain)||void 0===r||null===(u=r.images)||void 0===u?void 0:u.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(c,p),l.dom.appendContent(d,c)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,r),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,d),s.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=h;
|
package/esm/generic-f1cad267.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r}from"./player_instance-34118a5b.js";import l from"js-cookie";import{a,e as d,g as s,h as u,s as c,i as v,d as f}from"./currentVideoInfo-a8a254c2.js";import{a as m,r as p}from"./captions-f507e8ee.js";import{t as g,c as I}from"./skin-d5091b86.js";import w from"@babel/runtime/helpers/toConsumableArray";import y from"@babel/runtime/helpers/slicedToArray";function E(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function h(e){window.dataLayer=window.dataLayer||[],E("js",new Date),E("config",e)}function _(e,n){E("event",e,n)}var T={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 b(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?b(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var S={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",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=S.version;var A,C=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":F.get()+"".concat(null==T?void 0:T.getVideoDetails)},L=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.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})})):i({url:C(),params:O({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":S.version,"x-player-name":"videojs"},withCredentials:!0})},P=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.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})})):i({url:F.get()+T.getLinearChannelDetails,params:O(O(O(O(O({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"}})},R=function(e,n){var t,o,r=G(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.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})})):i({url:F.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},D=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return o=e.sent,e.abrupt("return",i({url:F.get()+"".concat(null==T?void 0:T.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:O({},n),params:O({},(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)}}(),k=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:F.get()+"".concat(null==T?void 0:T.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},j=function(e){var n=e.videoId;return i({method:"GET",url:F.get()+"".concat(null==T?void 0:T.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(A=null==T?void 0:T.apiBaseUrl,{set:function(e){e&&(A=e)},get:function(){return A}}),V=function(e,n,t,o){return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},M=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},N=null;function W(){return{set:function(e){e&&(N=e)},get:function(){return N}}}var U=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=W().get(),o=F.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/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)}}(),B=null,x=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"))||!M(n)){e.next=6;break}return B||(B=U().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&&W().set(r),i||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){B=null}))),e.abrupt("return",B);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=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},G=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function Q(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 Y(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Q(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var z=100,q=function(){var e,n,t,o,i,r,l,d=a();return"linearchannel"===((null==d?void 0:d.contentType)||"video")?null==d||null===(e=d.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==d?void 0:d.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==d||null===(i=d.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==d||null===(l=d.video)||void 0===l?void 0:l.id)||(null==d?void 0:d.id)};function K(){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 X(){var e=window.sessionStorage.getItem("uid");return e||(e=K(),window.sessionStorage.setItem("uid",e),e)}function J(){return $.apply(this,arguments)}function $(){return($=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,x();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)})))).apply(this,arguments)}function Z(e){return e?String(e):""}var ee=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function ne(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=K(),d="production",s="WEBSITE",u=null,c=0,v=null,f=0,m=0,p=!1,g=[],I=r(e);if(I){var w=function(){var e,n,t,o;return Math.round((null==I||null===(e=I.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)},y=ee((function(){for(var e=I.currentTime(),n=I.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(t.mark((function e(n){var o,r,u,c,v,f,m,p,g,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return g=e.sent,I=G(g),e.t0=Y,e.t1=Y,e.t2=null==I?void 0:I.site,e.t3=null==I?void 0:I.siteId,e.t4=s,e.t5=X(),e.t6=q(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11=d,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?Z(n.adPosition):"",e.next=25,J();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=a,e.t23=null!==(r=n.ttFirstFrame)&&void 0!==r?r:null,e.t24=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t25=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t26=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t27=null!==(f=n.bufferHealth)&&void 0!==f?f:null,e.t28={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},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==l||null===(m=l.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),w=[e.t32],i({url:(null==l||null===(p=l.beacon)||void 0===p?void 0:p.url)||F.get()+T.getBeaconUrl,method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:w}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),h=function(e){if(!I.paused()&&I.readyState()>2)return clearInterval(u),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&m<4&&p?(m++,_("BUFFERING",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime)},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),E({eventName:"BUFFERING",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),0):t},b=function(){var e=Math.floor(I.currentTime);I.on("error",(function(){var n,t=Math.floor(I.currentTime);clearInterval(u);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";_(o,Y({pfm:s,uid:X(),vid:q(),videoPosition:t},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),E({eventName:o,videoPosition:t,isAdEvent:!1})}))},O=function(){var e=ee((function(){var e;c=0,v=setInterval((function(){c=h(c)}),z),_("PLAY",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime)},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),E({eventName:"PLAY",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":q(),watchTime:Math.floor(I.currentTime)})}));I.one("play",e)},S=function(){I.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(u),f=c||0,_("FIRST_FRAME",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime),ttFirstFrame:c,bufferHealth:y()},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),E({eventName:"FIRST_FRAME",videoPosition:Math.floor(I.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:y()}),p=!0,c=0}))},A=function(){var e=!1;I.on("waiting",ee((function(){p&&(e=!0,clearInterval(u),u=setInterval((function(){e&&!I.paused()?f=h(f):clearInterval(u)}),z))}))),I.on("playing",ee((function(){e=!1,clearInterval(u)})))},C=function(){var e=function(e){var n,t,o,i=Y({videoPosition:Math.floor(I.currentTime),isAdEvent:!0,bufferHealth:y(),pfm:s,uid:X(),vid:q(),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==l||null===(o=l.beacon)||void 0===o?void 0:o.params);_(e,Y({},i)),E(Y({eventName:e,adPosition:1},i))};I.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),I.on("adskip",(function(){c=0})),I.on("adend",(function(){c=0}))},L=function(){I.on("timeupdate",(function(){var e=Math.floor(I.currentTime());if(e>=30&&e%30==0&&!g.includes(e)){var n,t=null===(n=I.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];m=0,g.push(e),E({eventName:"PING",videoPosition:e,isAdEvent:!1,duration:30,resHeight:(null==t?void 0:t.videoHeight)||null,resWidth:(null==t?void 0:t.videoWidth)||null,bufferHealth:y(),bitrate:w()})}}))};b(),A(),C(),L(),O(),I.on("loadeddata",S)}else console.error("Videojs: Player instance not found.")}function te(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&ne(e,n,t)}var oe=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"},ie=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},re=function(e,n){var t=new Map;j({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),u(t)})).catch((function(e){return console.log(e)}))},le=function(){var e=d.get();return e>=0?e+1:1},ae=function(){var e,n,t,o=s(),i=a(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=d.get(),u=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 u>=0?u+1:1};function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function se(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?de(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):de(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var ue=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ce=function(e){var n=ve(e,"video.tags",[]),t=ve(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},ve=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},fe=function(){var n,t,o,i,a,d,s,u,c,v,f,m,p,g,I,w,y,E,h,_,T,b,O,S,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",C=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 A;var P=(null==L?void 0:L.siteName)||"",R=(null==L?void 0:L.contentType)||"video",D=(null==L||null===(o=L[R])||void 0===o?void 0:o.metadata)||(null==L||null===(i=L[R])||void 0===i||null===(a=i.gist)||void 0===a?void 0:a.metadata),k=r(C);if(!A.includes("VIEWLIFT_"))return A;var j,F=window.getComputedStyle(document.getElementById(C),null),V=Math.trunc(F.getPropertyValue("height").slice(0,-2)),M=Math.trunc(F.getPropertyValue("width").slice(0,-2)),N="linearchannel"===R?null==L||null===(d=L.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(u=s.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===u||null===(c=u.content)||void 0===c?void 0:c.id:ve(L,"video.gist.id",""),W="linearchannel"===R?null==L||null===(v=L.linearchannel)||void 0===v||null===(f=v.channels)||void 0===f||null===(m=f.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===m?void 0:m.title:ve(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,B=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",(function(e){U=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]})));var x=se(se({},me(D)),{},(b={VIEWLIFT_WIDTH:M,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ue(M,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===(p=window)||void 0===p?void 0:p.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ve(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(g=k.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==P||"usanetwork"==P?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ce(L),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ve(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ve(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ve(null===(w=window)||void 0===w||null===(y=w.app_data)||void 0===y||null===(E=y.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==P||"usanetwork"==P?"":ve(null===(h=window)||void 0===h||null===(_=h.app_data)||void 0===_||null===(T=_.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:ve(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ve(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ae(),VIEWLIFT_SEASON_NUMBER:le(),VIEWLIFT_CONTENT_TAGS:ce(L),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(b,"VIEWLIFT_LAT",""),e(b,"VIEWLIFT_APP_BUNDLE",""),e(b,"VIEWLIFT_ATT_CONSENT",""),b),null===(O=window)||void 0===O||null===(S=O.customData)||void 0===S?void 0:S.macros);for(var H in x){var G=new RegExp(H,"g");A=A.replace(G,x[H])}return A},me=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.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,u=(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||u?(ie()?s?a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=ie()?se(se({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):se(se({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=ie()?se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=se(se({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},pe=function(e,n){var t,o,i,r,l,a,d,s,u,c,v,f,m,p=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[p])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,w=null==e||null===(r=e[p])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[p])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[p])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[p])||void 0===v||null===(f=v.streamingInfo)||void 0===f||null===(m=f.videoAssets)||void 0===m?void 0:m.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 Ie(w);if(g){var h=we(I,n);return h.src=fe(h.src,n,e),h}if("Safari"!==oe()&&E)return ge(I);if(y){var _=Ie(I);return _.src=fe(_.src,n,e),_}if(null!=I&&I.mpeg){var T=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return T.src=fe(T.src,n,e),T}return null},ge=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Ie=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},we=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=oe();if(r(n),"Safari"===d){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(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,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(i);return ye(n),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(ye(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ye=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==oe()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ee=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}},he=function(e,n){if(import("./error-2395864b.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)}}},_e=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Te=!1,be=function(e,n,t){var o=fe(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima)return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){Te=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Te&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout((function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,(function(){u&&l.ima.initializeAdDisplayContainer()}));var c=(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;l.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),l.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),l.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};function Oe(e,n){var t,o,i,l=r(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",(function(t){var o,i,r,s,u,c,v,f,m;if(Ae.enabled&&"input"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||Tn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||_n(e,10)}}}),!0)}var Se,Ae=(Se=!0,{enable:function(){Se=!0},disable:function(){Se=!1},get enabled(){return Se}}),Ce="ssai-breakStart",Le="ssai-adImpression",Pe="ssai-firstQuartile",Re="ssai-midpoint",De="ssai-thirdQuartile",ke="ssai-complete",je="ssai-breakEnd",Fe={breakStart:Ce,impression:Le,firstQuartile:Pe,midpoint:Re,thirdQuartile:De,complete:ke,breakEnd:je};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=Fe[o];i&&t.trigger(i,n)}function Me(e){var n=r(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(Ce,e)},adImpression:function(e){return t(Le,e)},adFirstQuartile:function(e){return t(Pe,e)},adMidpoint:function(e){return t(Re,e)},adThirdQuartile:function(e){return t(De,e)},adComplete:function(e){return t(ke,e)},adBreakEnd:function(e){return t(je,e)}}}function Ne(e){var n,t,o,i,r=e.isLive,l=e.startTimeInSeconds;return r?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==l?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:l===("function"==typeof(null===(t=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===t?void 0:t.getDuration)&&(null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.comscorePlayerInstance)||void 0===i?void 0:i.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function We(){var e,n,t,o,i,r,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",function(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="ad"),d.notifyPause();var s=new a.StreamingAnalytics.AdvertisementMetadata;s.setMediaType(Ne({isLive:null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentOptions)||void 0===i?void 0:i.isLive,startTimeInSeconds:null==l?void 0:l.startTimeInSeconds})),s.setUniqueId(l.id||"ad-001"),s.setLength(1e3*parseInt(l.adDuration,10)||0),s.setTitle(l.title||"Advertisement"),s.setServerCampaignId(l.campaignId),s.setRelatedContentMetadata(null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r?void 0:r.contentMetadata),s.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),s.setPlacementId(l.placementId);var u={cs_ad_tu:null==l?void 0:l.trackingUrl,ns_st_ami:null==l?void 0:l.creativeId};s.addCustomLabels(u),d.setMetadata(s),d.notifyPlay(),console.log("[Comscore] Ad started:",l)}function Ue(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))}function Be(){var e,n,t,o,i;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var r=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;r.notifyPause(),r.notifyEnd(),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="content"),(null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentMetadata)&&(r.setMetadata(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata),r.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}}function xe(e,n){var t,o,i=null!==(o=null===(t=null==e?void 0:e.match(/campaignId=([^;]*)/))||void 0===t?void 0:t[1])&&void 0!==o?o:null;return(null==i?void 0:i.trim())||null}function He(e){var n,t,o,i;return{id:null==e?void 0:e.adId,adTitle:null==e?void 0:e.adTitle,adDuration:(null==e?void 0:e.durationInSeconds)||0,startTimeInSeconds:(null==e?void 0:e.startTimeInSeconds)||0,campaignId:xe(null===(t=null===(n=null==e?void 0:e.extensions)||void 0===n?void 0:n[0])||void 0===t?void 0:t.content),placementId:xe(null===(i=null===(o=null==e?void 0:e.extensions)||void 0===o?void 0:o[0])||void 0===i?void 0:i.content),trackingUrl:null==e?void 0:e.trackingUrl,creativeId:null==e?void 0:e.creativeId}}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 Qe(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}function Ye(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 ze(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)?ze(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 ze(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}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,comscorePlayerInstance:null,mode:"content",cleanupFns:[],contentOptions:null}),o.registerPlugin("comscore",(function(e){var n=e||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;new Promise((function(t,o){var i=document.createElement("script");i.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",i.async=!0,document.head.appendChild(i),i.onload=function(){!function(e){var n=e.publisherId,t=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var o=window.ns_.analytics;o.PlatformApi.setPlatformAPI(o.PlatformApi.PlatformApis.WebBrowser);var i=new o.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==t?void 0:t.userConsent)||"",cs_fpid:(null==t?void 0:t.userId)||""}});o.configuration.addClient(i),o.configuration.enableFirstPartyCookie(),o.configuration.enableImplementationValidationMode(),o.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=o}({publisherId:e||"40813950"})},i.onerror=function(e){o("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}));var qe,Ke=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Xe=(qe=null,{set:function(e){qe=e},get position(){return qe}});function Je(e,n){return $e.apply(this,arguments)}function $e(){return($e=n(t.mark((function e(n,o){var i,l,a,d,s,u,c,v,f,m,p,g,I,w,E,h,_,T;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(n),a=pe(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=fe(u,n,o),c=en(u),v=y(c,2),f=v[0],m=v[1],p=Ze(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach((function(e){var n=y(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)})),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe({adsParams:Qe({},f)},p))});case 14:return g=e.sent,e.next=17,g.json();case 17:return I=e.sent,w="https://"+new URL(u).hostname,E=I.trackingUrl,h=I.manifestUrl,_=w+E,T=w+h,Ke.set(_),console.log("%c TRACKING URL","background: #bdf369; color: #000",_),a.src=T,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}}),e,null,[[11,29]])})))).apply(this,arguments)}function Ze(e){var n,t=Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map((function(e){var n=y(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]})));return t||{}}function en(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Ye((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=y(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,c=Object.entries(n);u<c.length;u++){var v=y(c[u],2),f=v[0],m=v[1];if(f.startsWith("ads."))d[f.replace(/^ads\./,"")]=m;else s[f]=m}return[d,s]}var nn,tn,on,rn,ln=(nn=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),nn=Array.isArray(e)?w(e):nn},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",nn),w(nn)}}),an=new Map;function dn(e,n){return sn.apply(this,arguments)}function sn(){return sn=n(t.mark((function e(o,i){var l,a,d,s,u,c,v,f,m,p,I,y,E,h,_,T,b,O,S,A,C,L;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,n,t,i,l,a){var d=r(o);if(!d.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(d.currentTime());var s,u=Ye(t);try{var c=function(){var t,r,u,c=s.value,v=c.eventType,f=c.beaconUrls,m=c.startTimeInSeconds,p=c.startTime,g=c.durationInSeconds,I=m||0,w=f,y=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(u=r.ads)||void 0===u?void 0:u.adEventHandler)||null,E="".concat(I,"_").concat(v),h=an.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",an),e>=I&&!h.includes(E)){h.push(E),an.set("pod-".concat(l),h);try{C(v,n,w,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var _=Xe.position;Xe.set(null),setTimeout((function(){null!=_&&(d.currentTime(_),a())}),500)}if("function"==typeof y)try{var T,b={eventType:v,startTimeInSeconds:m,startTime:p,durationInSeconds:g,ad:null==n||null===(T=n.ads)||void 0===T?void 0:T[i],adIndex:i};y({adsData:b}),Ve(o,b)}catch(e){console.error("Error when calling ads callback:",e)}if("impression"===v){var O,S=Ke.get();We(He(Qe(Qe({},null==n||null===(O=n.ads)||void 0===O?void 0:O[i]),{},{trackingUrl:S})))}else"complete"===v?Ue():"breakEnd"===v&&Be()}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},C=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)}))}))},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},an.clear(),Xe.set(i),m=Ke.get(),(p=r(o)).one("loadeddata",(function(){m&&S(m)})),I=new Map,y=new Map,E=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,_=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==p||null===(s=p.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==p||null===(u=p.el())||void 0===u||null===(c=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,O=(null==p||null===(v=p.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,S=function(){var e=n(t.mark((function e(n){var l,a,d,s,u,c,v,f,m,p,S,C,P,R,D,k,j,F,V,M;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",k),0===e.button&&P()},D=function(e){},R=function(){var e,n=p.currentTime(),t=null,o=Ye(m);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,I.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(){p.currentTime(t+2.2)}),100))},P=function(){var e,n=p.currentTime(),t=null,o=Ye(m);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!I.has(r)||n>=r&&n<=d)&&(t=r,I.set(r,!0),y.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){p.currentTime(t+.4)}),100))},u=!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),f=v.avails,m=[],p=r(o),S=p.controlBar.progressControl,C=S.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),f.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&&(u=!0),m.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])||[]})})),!u&&i&&(p.currentTime(i),R()),null!=m&&m.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),window.adsQueueList=m),console.log(m,"data"),m.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=p.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",C.appendChild(r)}})),p._timeUpdateHandler&&p.off("timeupdate",p._timeUpdateHandler),p._timeUpdateHandler=g((function(){var e=p.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=m[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&I.set(i,!0),Ae.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),S.el().classList.add("hide-progress-bar");for(var d=e-i,s=0,u=0,c=0;c<l.length;c++){var v,f=null==l||null===(v=l[c])||void 0===v?void 0:v.durationInSeconds;if(d<s+f){u=c;break}s+=f}l[u];var p=Math.max(0,r-d),g=Math.round(p);j.style.display="block",M.textContent="".concat(u+1," of ").concat(l.length," • ").concat(A(g));var E=[];return null==l||l.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));E.push.apply(E,w(n))})),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),L(e,t,E,u,o,R),"break"}y.delete(i)},o=0;o<m.length;o++){if("break"===t())break}n||(j.style.display="none",S.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),Ae.enable())}}),1e3),p.on("timeupdate",p._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",(function(e){Ae.enabled&&"ArrowRight"==e.key&&(P(),_n(o,10),e.stopPropagation())})),S.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",D),document.addEventListener("pointerup",k))})),null===(d=document)||void 0===d||null===(s=d.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach((function(e){return null==e?void 0:e.remove()})),(j=document.createElement("div")).className="ssai-ad-container",(F=document.createElement("div")).className="sponsored-adbox",(V=document.createElement("div")).className="sponsored-text",V.textContent="Sponsored Ad",F.append(V),(M=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",j.append(F),j.append(M),p.el().appendChild(j);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),sn.apply(this,arguments)}function un(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 cn(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)?cn(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 cn(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 vn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function fn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?vn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):vn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var mn={},pn=(null===(tn=window)||void 0===tn||null===(on=tn.location)||void 0===on||null===(rn=on.search)||void 0===rn?void 0:rn.includes("debug=true"))||!1,gn=null;function In(e){return wn.apply(this,arguments)}function wn(){return wn=n(t.mark((function e(o){var i,l,a,d,s,u,c,v,f,m,p,I,y,E,h,_,T,b,O,S,A,C,L,P,R,D,k;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,i,l){var a=r(o);if(!a.seeking()){var d=n.startTimeInSeconds;n.durationInSeconds,Math.floor(a.currentTime());var s,u=un(t);try{for(u.s();!(s=u.n()).done;){var c,v,f,m=s.value,p=m.eventType,g=m.beaconUrls,I=m.startTimeInSeconds,w=m.startTime,y=m.durationInSeconds,E=m.eventId,h=I||0,_=g,T=(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(f=v.ads)||void 0===f?void 0:f.adEventHandler)||null,b="".concat(E,"_").concat(p),O="pod-".concat(d);P.has(O)||P.set(O,new Set);var S=P.get(O);if(pn&&console.warn(e,h,"map:",p,"condition1:",e>=h,"map:",P),e>=h&&e<=h+R&&!S.has(b)){S.add(b);try{D(p,n,_,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,p,n)}if("function"==typeof T)try{var A,C={eventType:p,startTimeInSeconds:I,startTime:w,durationInSeconds:y,ad:null==n||null===(A=n.ads)||void 0===A?void 0:A[i],adIndex:i};T({adsData:C}),Ve(o,C)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){u.e(e)}finally{u.f()}}},D=function(e,n,t,o){var i,r;"breakEnd"===e&&(null===(i=mn)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=mn)||void 0===r?void 0:r.totalAds)||(pn&&(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)}))})))},p=function(){gn&&clearInterval(gn)},f=Ke.get(),(m=r(o)).one("loadeddata",(function(){p(),gn=setInterval((function(){f&&!m.paused()&&L(f)}),2e3)})),m.on("dispose",(function(){p()})),I=new Map,y=new Map,E=-1,h=null,_=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==m||null===(a=m.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==m||null===(d=m.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,O=(null==m||null===(s=m.el())||void 0===s||null===(u=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,S=(null==m||null===(c=m.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===v?void 0:v[0])||null,A=!1,C=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 w(o);var i=[],r=null==o?void 0:o.find((function(e){return"breakEnd"===(null==e?void 0:e.eventType)})),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find((function(e){return e.includes("videoView")})))||null,a=(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],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter((function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)})),s=(null==d?void 0:d.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(!s&&l){var u=null==d?void 0:d.map((function(e){return fn(fn({},e),{},{eventType:"videoView",beaconUrls:[l]})}));null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},L=function(){var e=n(t.mark((function e(n){var i,l,a,d,s,u,c,v,f,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),h&&l.searchParams.append("nextToken",h),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,s=d.avails,u=d.nextToken||null,h=u,c=[],v=r(o),f=v.controlBar.progressControl,m=f.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:C(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),pn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",c),null!=c&&c.length&&(window.adsQueueList=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",m.appendChild(r)}})),v._timeUpdateHandler&&v.off("timeupdate",v._timeUpdateHandler),v._timeUpdateHandler=g((function(){var e=v.currentTime();if(e!==E){E=e;for(var n=function(){var n=c[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;A=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&I.set(o,!0),Ae.disable(),_&&_.classList.add("vjs-hidden"),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,u=0,v=0;v<r.length;v++){var m,p=null==r||null===(m=r[v])||void 0===m?void 0:m.durationInSeconds;if(d<s+p){u=v;break}s+=p}setTimeout((function(){mn.totalAds=null==r?void 0:r.length,mn.currentAdIndex=u}),1e3);var g=[];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)}));g.push.apply(g,w(n))})),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&g.push.apply(g,w(null==n?void 0:n.podSlotImpressionBeacon)),k(e,n,g,u),"break"}y.delete(o)},t=0;t<c.length;t++){if("break"===n())break}A||(mn={},f.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Ae.enable())}}),1e3),v.on("timeupdate",v._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=new Map,R=2.5;case 22:case"end":return e.stop()}}),e)}))),wn.apply(this,arguments)}function yn(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 En=function(e){o(e).play()},hn=function(e){o(e).pause()},_n=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Tn=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},bn=function(e){return!!o.getPlayer("".concat(e))},On=function(e){return o(e).paused()},Sn=function(){var e=n(t.mark((function e(o,i){var l,a,d,s=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,x();case 3:return a=e.sent,d=r(o),e.abrupt("return",new Promise((function(e,r){var s=(null==i?void 0:i.programs)||[];null==i||delete i.programs,P(i,a).then(function(){var r=n(t.mark((function n(r){var a,u,v,m,p,g,I,w;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(g=null==r?void 0:r.data,window.sid=K(),g.contentType="linearchannel",g.channelId=null==i?void 0:i.channelId,I=(null==g||null===(a=g.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(v=u.app_data)||void 0===v||null===(m=v.appcmsMain)||void 0===m||null===(p=m.adsConfig)||void 0===p?void 0:p.vodAdSticherProvider)||!1,w=pe(g,o),!I){n.next=11;break}return n.next=9,Je(o,g);case 9:w=n.sent,l=!0;case 11:c(g),f(s),sessionStorage.setItem("program_switched",!0),w&&l?(Rn(o,w),I&&In(o),d.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:g})}))):e({status:!0,msg:"Feed authenticated",response:g});case 15:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){r({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)}}(),An=function(){var e=n(t.mark((function e(o,i,l){var a,d,u,f,g,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return f=e.sent,(s()||null)&&v(i),g=0,I=0,w=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&k(i,f).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)),g=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(I=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(w=(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,l){L(i,f).then(function(){var i=n(t.mark((function n(i){var a,d,s,u,v,f,y,E,h,_,T,b,O,S,A,C,L,P,R,D,k,j,F,V,M,N,W,U,B,x,H,G,Q,Y,z,q,K,X;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(C=null==i?void 0:i.data,L=(null==C?void 0:C.contentType)||"video",P=(null==C||null===(a=C[L])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(v=u.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,R=(null==C||null===(f=C.video)||void 0===f||null===(y=f.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,c(i.data),(D=(null==C||null===(E=C.ads)||void 0===E||null===(h=E.preRoll)||void 0===h||null===(_=h.adTags)||void 0===_||null===(T=_.web)||void 0===T?void 0:T.active)&&(null==C||null===(b=C.ads)||void 0===b||null===(O=b.preRoll)||void 0===O||null===(S=O.adTags)||void 0===S||null===(A=S.web)||void 0===A?void 0:A.url))&&be(o,D,C),k=pe(C,o),!P){n.next=12;break}return n.next=11,Je(o,C);case 11:k=n.sent;case 12:k?(G=(null==C||null===(j=C.video)||void 0===j||null===(F=j.gist)||void 0===F?void 0:F.videoImageUrl)||(null==C||null===(V=C.video)||void 0===V||null===(M=V.gist)||void 0===M||null===(N=M.imageGist)||void 0===N?void 0:N.r16x9),(Q=r(o)).poster(G),Rn(o,k),P&&dn(o,w),Q.on("loadstart",(function(){R&&e({status:!0,msg:"Video Loaded",response:C})})),Q.on("loadeddata",(function(){_e(),e({status:!0,msg:"Video Loaded",response:C})})),Q.one("play",(function(){g&&!P&&I<95&&setTimeout((function(){Q.currentTime(g)}),0)})),Q.one("error",(function(){var e;l({status:!1,msg:(null==Q||null===(e=Q.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==C||null===(W=C.video)||void 0===W||null===(U=W.contentDetails)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0||(null==C||null===(x=C.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(X=(null==C||null===(z=C.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==C||null===(K=C.video)||void 0===K?void 0:K.closedCaptions),Y=X.filter((function(e){return"VTT"===e.format})),m(o,Y)):p(o)):(he(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("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){Dn(e,o,l,i)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),Cn=function(e,n,t){var o=r(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)}))}))},Ln=function(e){var n=r(e);if(Pn(),function(){var e,n,t,o,i,r,l,a,d,s;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.comscoreCleanupFns=[]),console.log("comscoreTag",null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef),null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.tagRef){try{null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r||r.tagRef.notifyEnd()}catch(e){}null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||(l.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(s=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===s||(s.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}(),I(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Pn=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()},Rn=function(e,n){var t=r(e);t&&t.src(n)},Dn=function(n,t,o,i){var r,l,a,d,s,u,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===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);bn(t)&&he(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.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?yn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):yn(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}))},kn=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")},jn=function(e){var n,t=r(e);return!(null!=t&&null!==(n=t.liveTracker)&&void 0!==n&&n.atLiveEdge())||null};export{Tn as A,bn as B,An as C,Sn as D,Ln as E,V as F,ln as G,Me as H,jn as I,F as J,H as K,W as L,M,h as N,an as O,Oe as P,ie as Q,On as R,In as S,dn as T,j as U,ae as a,le as b,pe as c,oe as d,_e as e,kn as f,X as g,he as h,te as i,be as j,Ee as k,Rn as l,Je as m,G as n,L as o,k as p,Dn as q,x as r,D as s,P as t,R as u,re as v,Cn as w,_n as x,En as y,hn as z};
|
package/esm/index-8fdfd90c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/regenerator";import"axios";import{d as i,g as t,a as l,b as r,s as a,c as d,l as u,e as s,h as c,f as v,i as f,j as p,k as m,m as w,n as g,o as y,p as b,q as h,r as O,t as _,u as C,v as S,w as I,x as k,y as E,z as T,A as P,B as D,C as j,D as R,E as A,F as M,G as x,H as N,I as L,J as V,K as B,L as F,M as U,N as H}from"./generic-f1cad267.js";import{g as G}from"./player_instance-34118a5b.js";import W from"video.js";import{o as z,g as q,a as K,s as J,b as Y,p as X,c as Q}from"./util-a0bb1689.js";import{g as $,d as Z,a as ee,e as ne}from"./captions-f507e8ee.js";import{g as oe,p as ie}from"./resolution-1c59b0f3.js";import{i as te,a as le}from"./skin-d5091b86.js";import{s as re}from"./localisation-0bf399a1.js";import{g as ae,a as de,s as ue,v as se,b as ce,c as ve,d as fe,e as pe,f as me}from"./currentVideoInfo-a8a254c2.js";import we from"@babel/runtime/helpers/typeof";import{s as ge,w as ye}from"./icons-37daa6b3.js";import{c as be,p as he,a as Oe,h as _e,r as Ce,g as Se,b as Ie,d as ke,s as Ee,e as Te,f as Pe}from"./helper-349e076f.js";import De from"@babel/runtime/helpers/toConsumableArray";var je=function(e){return new Promise((function(n,o){if(Re(e))o("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){n()},i.onerror=function(n){o("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(i)}}))},Re=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},Ae=function(e,n,o){var i=G(e);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var t=parseFloat(n)/100;i.volume(t),o&&o({status:!0,msg:"Volume set to ".concat(n,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Me=function(e){var n=G(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},xe=function(){var e=n(o.mark((function e(n){var t,l,r,a,d;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=G(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||!(null!=n&&n.chromecastReceiverId||null!=n&&n.airplay)){e.next=10;break}return e.prev=2,e.next=5,je("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!==(l=n.series)&&void 0!==l&&l.enable||null==n||!n.chromecastReceiverId){e.next=21;break}return e.next=13,import("@silvermine/videojs-chromecast");case 13:e.sent.default(W),(d=W.getTech("chromecast"))&&!d.prototype.seeking&&(d.prototype.seeking=function(){}),null!==(a=window)&&void 0!==a&&a.cast?null==r||r.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==r||r.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"==i()?null==r||r.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)}}(),Ne=function(e,n){var o=G(e);o&&n&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(n){var o,i,t,l,r,a=this.el(),d=W.dom.getPointerPosition(a,n).x;W.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,s=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(t=i.framework)||void 0===t||null===(l=t.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(u),u&&"CONNECTED"===s){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*d,c.seek()}}))};var Le=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),je("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)}}(),Ve=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){return zn}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Be=function(){var e=n(o.mark((function e(){return o.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){W.getPlugin("eme")||W.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Fe=function(){var e=n(o.mark((function e(){var n;return o.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(W),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)}}(),Ue=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-8e3eab6d.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)}}(),He=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-08c7635e.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)}}(),Ge=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){je("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(W)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(W)}))},loadAdsLibrary:Le,loadEMELibrary:Be,loadMuxPlugin:Fe,loadDvrSeekbar:Ue,loadContribDash:He,loadComscorePlugin:Ve});function We(e){return ze.apply(this,arguments)}function ze(){return(ze=n(o.mark((function e(n){var t;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,Le();case 3:t&&"Safari"==i()&&Promise.resolve().then((function(){return Ge})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qe(e){return Ke.apply(this,arguments)}function Ke(){return(Ke=n(o.mark((function e(n){var i,t,l,r,a,d;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d=G(n.playerId),e.next=3,Ve();case 3:d.comscore({publisherId:null==n||null===(i=n.comscore)||void 0===i?void 0:i.publishedId,endpoint:null==n||null===(t=n.comscore)||void 0===t?void 0:t.endpoint,implementationId:null==n||null===(l=n.comscore)||void 0===l?void 0:l.implementationId,projectId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.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 Je(e,n){return Ye.apply(this,arguments)}function Ye(){return(Ye=n(o.mark((function e(n,t){var l,r,a,d,u,s,c,v,f,p,m,w;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",f=null==t||null===(l=t[v])||void 0===l?void 0:l.drmEnabled,null==t||null===(r=t[v])||void 0===r||null===(a=r.liveDetails)||void 0===a||a.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==t||null===(d=t[v])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,e.prev=6,qe(n),e.next=10,Promise.allSettled([f?"Safari"==i()?Be():"caliente"!=(null===(w=window)||void 0===w?void 0:w.siteName)?He():Be():"Safari"!=i()&&p?He():null,m?xe(n):null,xe(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("Error",e.t0);case 15:case"end":return e.stop()}}),e,null,[[6,12]])})))).apply(this,arguments)}function Xe(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function Qe(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Xe(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Xe(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var $e=new Set,Ze=null,en=function(e,n,o){var i,l,r,a,d,u,s,c={},v=(null==e?void 0:e.contentType)||"video";c["c3.cm.id"]=(null===(i=e[v])||void 0===i?void 0:i.id)||"Null",c["c3.cm.contentType"]=dn(e),c[null==o||null===(l=o.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==e||!e.linearchannel),c[null==o||null===(r=o.Constants)||void 0===r?void 0:r.STREAM_URL]=n.currentSrc(),c[null==o||null===(a=o.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===t()?"NULL":t(),c["c3.cm.categoryType"]=ln(e),c["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"}}(),c.DRMEnabled=(null===(d=e[v])||void 0===d?void 0:d.drmEnabled)||"None",c.DAIStream=null!==(u=e[v])&&void 0!==u&&null!==(s=u.gist)&&void 0!==s&&s.isSSAIEnabled?"YES":"NO",c[o.Constants.DEFAULT_RESOURCE]="AKAMAI",c["c3.cm.brand"]="NULL",c.CDVREnabled=rn(e),c["c3.cm.genreList"]=on(e),c["c3.cm.genre"]=nn(e),c["c3.cm.channel"]=tn(e);var f=cn(ae(),e);return c=Qe(Qe({},c),f)},nn=function(e){var n,o,i,t=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[t])||void 0===n||null===(o=n.gist)||void 0===o||null===(i=o.primaryCategory)||void 0===i?void 0:i.title)||"Null"},on=function(e){var n,o=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[o])||void 0===n?void 0:n.categories)||[]).map((function(e){return null==e?void 0:e.title})).join(", ")||"Null"},tn=function(e){var n,o,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null==e||null===(n=e[i])||void 0===n||null===(o=n.channels[0])||void 0===o?void 0:o.title)||"NULL"},ln=function(e){return(null==e?void 0:e.contentType)||"null"},rn=function(e){var n,o,i=(null==e?void 0:e.contentType)||"video",t=(null==e||null===(n=e[i])||void 0===n||null===(o=n.liveDetails)||void 0===o?void 0:o.isDvrEnabled)||!1;return t?"YES":"NO"},an=function(e,n){var o,i,t=(n||{}).epg;if(t&&null!=t&&t.enable&&null!=t&&t.programTitle)return t.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(o=e[l])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.title)||"Null";return"".concat(r)},dn=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var un,sn,cn=function(e,n){var o,i,t,a,d,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var s=r(),c=l();return u["c3.cm.seriesName"]=(null==n||null===(o=n.video)||void 0===o||null===(i=o.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(t=e[s-1])||void 0===t||null===(a=t.episodes)||void 0===a||null===(d=a[c-1])||void 0===d?void 0:d.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},vn=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"}},fn=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},pn=function(){var e=n(o.mark((function e(n,i){var t,l,r,a,d,u,s,c,v,f;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(null==i?void 0:i.convivaConfig)||{},l=t.trackConvivaPlayerEvent,r=t.paymentHandler,a=t.tveProvider,d=t.enable,u=t.appName,s=(i||{}).token,d){e.next=4;break}return e.abrupt("return");case 4:if(c=G(n),"function"==typeof(v=l)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:c.ready((function(){var e=c.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var o=e.target;if(o&&o.keySystem){var i=vn(o.keySystem);v("contentInfo",{DRMEnabled:i})}else v("contentInfo",{DRMEnabled:"None"})})),n||v("contentInfo",{DRMEnabled:"None"})})),c.on("loadstart",(function(){var e,n;Ze&&Ze!==c.currentSrc()&&v("playbackEnded"),v("setPlayer",c),$e.clear(),Ze=c.currentSrc();var o=fn(c.currentType()),t=de(),l=en(t,c,f);l[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",l[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=an(t,i),l.authToken=s||"NULL",l.streamType=o,l.D2CType=r||"NONE",l.subscriberType=a||(r?"D2C":"FREE"),l["c3.cm.affiliate"]=a||"NULL",mn.setData(l),v("contentInfo",l)})),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(){$e.has(c.currentSrc())||($e.add(c.currentSrc()),v("playbackStarted",null))})),c.on("ended",(function(){$e.has(c.currentSrc())&&$e.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==$e||$e.clear(),v("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,o){return e.apply(this,arguments)}}(),mn=(un={},{setData:function(e){un=Qe(Qe({},un),e)},getData:function(){return un}}),wn=function(e,n){var o=null==n?void 0:n.skin;"default"==o?import("./skin-45f73b69.js").then((function(o){o.initialiseSkin(e,n)})):"carousel"==o?import("./skin-17b1ff2a.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==o?import("./skin-801a41e9.js").then((function(o){o.initialiseSkin(e,n)})):"multiplayer"==o?import("./skin-3597ca56.js").then((function(o){o.initialiseSkin(e,n)})):"minimalist"==o?import("./skin-02c6353e.js").then((function(o){o.initaliseSkin(e,n)})):"VL_ONE"==o?import("./skin-096756f6.js").then((function(o){o.initialiseSkin(e,n)})):"news"==o&&import("./skin-2e0eb419.js").then((function(o){o.initialiseSkin(e,n)}))};function gn(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function yn(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?gn(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):gn(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var bn=[],hn=0,On=null;function _n(){console.log("Cleaning up watch history data"),sn=null,bn=[],hn=0,On=null}function Cn(e,n,o){var i,t,l,r,d,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(i=n.watchHistory)||void 0===i||i.apiVersion;var s=null==n||null===(t=n.watchHistory)||void 0===t?void 0:t.profileId,c=Math.floor(e.currentTime()),v=Math.floor(e.duration());null==n||null===(l=n.watchHistory)||void 0===l||l.xapiKey;var f=(null==n||null===(r=n.video)||void 0===r?void 0:r.originalObjectId)||null,p=(null==n||null===(d=n.watchHistory)||void 0===d?void 0:d.saveOffline)||!1,m=Math.floor(e.currentTime()),w=u?100:Math.floor(c/v*100),g={};p?In(g={completed:u,watchedTime:m,watchedPercentage:w},s,n.siteOwner):(g=yn(yn({videoId:sn,watchedTime:m,watchedPercentage:w,doneWatching:u,profileId:s},On&&{seriesId:On}),f&&{originalObjectId:f}),a(g).then((function(e){})).catch((function(e){}))),hn=c+o}function Sn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function In(n,o,i){var t=o?"watchhistory-data-".concat(o):"watchhistory-data-guest-".concat(i),l=Sn(t),r=(new Date).getTime(),a=de(),d=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(n,o){return yn(yn({},n),{},e({},o,d[o]))}),{}),s=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===sn}));s<0?l.push(yn(yn({content:u},n),{},{addedDate:r,updateDate:r})):l[s]=yn(yn(yn({},l[s]),n),{},{updateDate:r}),localStorage.setItem("".concat(t),JSON.stringify(l))}function kn(e,n,o){var i=Sn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(o)),t=[];return i&&Array.isArray(i)&&(t=i.filter((function(e){var o;return(null==e||null===(o=e.content)||void 0===o?void 0:o.id)===n}))),t}var En=!1,Tn=function(e,n){var o,i,t=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(o=e[t])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!En){var l=Pn(e,"videoAssets","secondaryVideoAssets"),r=d(l,n);return r&&u(n,r),En=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function Pn(e,n,o){if(Array.isArray(e))return e.map((function(e){return Pn(e,n,o)}));if(null!==e&&"object"===we(e)){var i={};return Object.keys(e).forEach((function(t){t===n&&void 0!==e[o]?i[t]=e[o]:t===o&&void 0!==e[n]?i[t]=e[n]:i[t]=Pn(e[t],n,o)})),i}return e}function Dn(e){var n=e.publisherId,o=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var i=window.ns_.analytics;i.PlatformApi.setPlatformAPI(i.PlatformApi.PlatformApis.WebBrowser);var t=new i.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==o?void 0:o.userConsent)||"",cs_fpid:(null==o?void 0:o.userId)||""}});return i.configuration.addClient(t),i.configuration.enableFirstPartyCookie(),i.configuration.enableImplementationValidationMode(),i.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=i,i}function jn(){var e,n,o,i=null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscorePlayerInstance)||void 0===n?void 0:n.seekable().end(0),t=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.comscorePlayerInstance.currentTime();return Math.max(0,1e3*(i-t))}function Rn(){var e,n,o,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(window.analytics){var t=window.analytics,l=new t.StreamingAnalytics;null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e||(e.tagRef=l),null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n||(n.contentOptions=i),i.implementationId&&l.setImplementationId(i.implementationId),i.projectId&&l.setProjectId(i.projectId),l.setMediaPlayerName(i.playerName||"Video.js"),l.setMediaPlayerVersion(i.playerVersion||"8.x"),l.createPlaybackSession(),(null==i?void 0:i.isDvr)&&l.setDvrWindowLength((null==i?void 0:i.dvrWindowLength)||0);var r=new t.StreamingAnalytics.ContentMetadata;r.setMediaType(t.StreamingAnalytics.ContentMetadata.ContentType[i.contentType||"LONG_FORM_ON_DEMAND"]),r.setUniqueId(i.uniqueId),r.setLength((null==i?void 0:i.isLive)?0:i.duration||0),r.setStationTitle(i.stationTitle),r.setPublisherName(i.publisherName),r.setProgramTitle(i.programTitle),r.setDateOfDigitalAiring(i.digitalAirdate.year,i.digitalAirdate.month,i.digitalAirdate.day),r.setDateOfTvAiring(i.tvAiring.year,i.tvAiring.month,i.tvAiring.day),r.carryTvAdvertisementLoad(i.isDaiAds?"1":null),r.setEpisodeTitle(null==i?void 0:i.contentTitle),r.setEpisodeSeasonNumber(i.seasonNumber),r.setEpisodeNumber(i.episodeNumber),r.setProgramId(i.programId),r.setEpisodeId(i.episodeId),r.setGenreName(i.contentGenre),r.setDictionaryClassificationC3(i.brand||"null"),r.setDictionaryClassificationC4(i.platform||"null"),r.setDictionaryClassificationC6(i.genre||"null"),r.classifyAsCompleteEpisode(i.completeEpisode?"1":null);var a={ns_st_li:(null==i?void 0:i.isLive)?"1":"0"};return r.addCustomLabels(a),l.setMetadata(r),null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.contentMetadata=r),l.notifyPlay(),console.log("[Comscore] StreamingAnalytics initialized for:",i.programTitle),l}console.error("[Comscore] analytics SDK not found.")}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,comscorePlayerInstance:null,mode:"content",cleanupFns:[],contentOptions:null});var An=!1;function Mn(e){var n,o,i,t;if(e)if(null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef){var l=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef;null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i||(i.comscorePlayerInstance=e);var r=function(){var e,n,o;if("content"===(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.mode)&&l.notifyPlay(),null===(o=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.contentOptions)||void 0===o?void 0:o.isDvr){var i=jn();l.startFromDvrWindowOffset(i)}},a=function(){var e;return"content"===(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.mode)&&(null==l?void 0:l.notifyPause())},d=function(){var e;return"content"===(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.mode)&&(null==l?void 0:l.notifyEnd())},u=function(){var e,n;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.contentOptions)||void 0===n?void 0:n.isDvr){var o=jn();l.startFromDvrWindowOffset(o)}l.notifySeekStart()},s=function(){null==l||l.notifyBufferStart(),function(){var e,n;An||(An=!0,null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscorePlayerInstance)||void 0===n||n.any(["playing","timeupdate"],(function(){var e,n,o,i,t,l;An=!1,(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&"content"===(null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.mode)&&(null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef)||void 0===i||i.notifyBufferStop(),null===(l=null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t?void 0:t.tagRef)||void 0===l||l.notifyPlay())})))}()};e.on("play",r),e.on("pause",a),e.on("ended",d),e.on("seeking",u),e.on("waiting",s),e.on("timeupdate",(function(){var n,o;if(null===(o=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.contentOptions)||void 0===o?void 0:o.isLive)return l.startFromPosition(0);l.startFromPosition&&"function"==typeof e.currentTime&&l.startFromPosition(1e3*e.currentTime())})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||t.comscoreCleanupFns.push((function(){e.off("play",r),e.off("pause",a),e.off("ended",d),e.off("seeking",u),e.off("waiting",s)})),console.log("[Comscore] Player events attached.")}else console.warn("[Comscore] Tag not initialized. Call initializeComscoreTag() first.");else console.warn("[Comscore] No player instance provided.")}function xn(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}function Nn(e){var n,o,i,t,l=e.isLive,r=e.startTimeInSeconds;return l?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==r?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:r===("function"==typeof(null===(o=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===o?void 0:o.getDuration)&&(null===(t=null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.comscorePlayerInstance)||void 0===t?void 0:t.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function Ln(){var e,n,o,i,t,l,r,a,d,u;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.comscoreCleanupFns=[]),console.log("comscoreTag",null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.tagRef),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t?void 0:t.tagRef){try{null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||l.tagRef.notifyEnd()}catch(e){}null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r||(r.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(u=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===u||(u.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}function Vn(e,n){var o,i,t,l,r,a,d,u={contentType:(null==e?void 0:e.contentType)||"LONG_FORM_ON_DEMAND",uniqueId:null===(o=null==e?void 0:e.gist)||void 0===o?void 0:o.id,duration:(null==e?void 0:e.runtime)||0,stationTitle:null==e?void 0:e.siteName,publisherName:null==e?void 0:e.network,programTitle:(null==e?void 0:e.programTitle)||Un(e),programId:(null==e?void 0:e.programId)||Hn(e),episodeId:(null==e?void 0:e.episodeId)||(null===(i=null==e?void 0:e.gist)||void 0===i?void 0:i.id),contentTitle:null===(t=null==e?void 0:e.gist)||void 0===t?void 0:t.title,isLive:null===(l=null==e?void 0:e.streamingInfo)||void 0===l?void 0:l.isLiveStream,brand:null==e?void 0:e.network,seasonNumber:(null==e?void 0:e.seasonNumber)||Wn(null==e?void 0:e.episodeDisplayAttribute).season,episodeNumber:(null==e?void 0:e.episodeNumber)||Wn(null==e?void 0:e.episodeDisplayAttribute).episode,platform:(null==e?void 0:e.platform)||"browser",genre:(null==e?void 0:e.customGenre)||(null==e?void 0:e.genre)||"null",completeEpisode:(null==e?void 0:e.isCompleteEpisode)||!0,digitalAirdate:Gn(null==e?void 0:e.publishDate),tvAiring:Gn(null==e?void 0:e.publishDate),contentGenre:null==e?void 0:e.genre,isDaiAds:!!(null==e?void 0:e.isDaiAds),isDvr:(null===(r=null==e?void 0:e.liveDetails)||void 0===r?void 0:r.isDvrEnabled)||!1,dvrWindowLength:(null===(a=null==e?void 0:e.liveDetails)||void 0===a?void 0:a.isDvrEnabled)?Bn(n):0,implementationId:null===(d=null==e?void 0:e.comscoreConfig)||void 0===d?void 0:d.implementationId};return"LINEARCHANNEL"===(null==e?void 0:e.contentType)&&(u.ContentType="LIVE"),u}function Bn(e){var n=1e3*(e.seekable().end(0)-e.seekable().start(0));return console.log("dvrWindowMs",n),n}function Fn(e,n){var o,i,t=null!==(i=null===(o=null==e?void 0:e.match(/campaignId=([^;]*)/))||void 0===o?void 0:o[1])&&void 0!==i?i:null;return(null==t?void 0:t.trim())||null}function Un(e){var n,o;return(null==e?void 0:e.series)?null===(o=null==e?void 0:e.series)||void 0===o?void 0:o.title:null===(n=null==e?void 0:e.gist)||void 0===n?void 0:n.title}function Hn(e){var n,o;return(null==e?void 0:e.series)?null===(o=null==e?void 0:e.series)||void 0===o?void 0:o.id:null===(n=null==e?void 0:e.gist)||void 0===n?void 0:n.id}function Gn(e){var n;return{year:(n=isNaN(Number(e))?new Date(e):new Date(1e3*Number(e))).getFullYear(),month:n.getMonth()+1,day:n.getDate()}}function Wn(e){if(!e)return{season:null,episode:null};var n=e.match(/S(\d+)\s*E(\d+)/i);return n?{season:Number(n[1]),episode:Number(n[2])}:{season:null,episode:null}}!function(e){e.registerPlugin("comscore",(function(e){var n=e||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;new Promise((function(o,i){var t=document.createElement("script");t.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",t.async=!0,document.head.appendChild(t),t.onload=function(){Dn({publisherId:e||"40813950"})},t.onerror=function(e){i("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}))}(W);var zn=Object.freeze({__proto__:null,createComscoreStreamingTag:Rn,destroyComscoreTag:Ln,endComscoreAdTracking:function(){var e,n,o,i,t;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var l=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;l.notifyPause(),l.notifyEnd(),null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.mode="content"),(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata)&&(l.setMetadata(null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t?void 0:t.contentMetadata),l.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}},finishComscoreAdTracking:function(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))},formulateComscoreAdPayload:function(e){var n,o,i,t;return{id:null==e?void 0:e.adId,adTitle:null==e?void 0:e.adTitle,adDuration:(null==e?void 0:e.durationInSeconds)||0,startTimeInSeconds:(null==e?void 0:e.startTimeInSeconds)||0,campaignId:Fn(null===(o=null===(n=null==e?void 0:e.extensions)||void 0===n?void 0:n[0])||void 0===o?void 0:o.content),placementId:Fn(null===(t=null===(i=null==e?void 0:e.extensions)||void 0===i?void 0:i[0])||void 0===t?void 0:t.content),trackingUrl:null==e?void 0:e.trackingUrl,creativeId:null==e?void 0:e.creativeId}},formulateComscorePayload:Vn,getComscoreTagInstance:function(){var e;return null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef},setComscorePlayerInstance:Mn,startComscoreAdTracking:function(){var e,n,o,i,t,l,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",xn()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.mode="ad"),d.notifyPause();var u=new a.StreamingAnalytics.AdvertisementMetadata;u.setMediaType(Nn({isLive:null===(t=null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentOptions)||void 0===t?void 0:t.isLive,startTimeInSeconds:null==r?void 0:r.startTimeInSeconds})),u.setUniqueId(r.id||"ad-001"),u.setLength(1e3*parseInt(r.adDuration,10)||0),u.setTitle(r.title||"Advertisement"),u.setServerCampaignId(r.campaignId),u.setRelatedContentMetadata(null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l?void 0:l.contentMetadata),u.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),u.setPlacementId(r.placementId);var s={cs_ad_tu:null==r?void 0:r.trackingUrl,ns_st_ami:null==r?void 0:r.creativeId};u.addCustomLabels(s),d.setMetadata(u),d.notifyPlay(),console.log("[Comscore] Ad started:",r)}});function qn(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function Kn(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?qn(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):qn(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function Jn(e,n){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,n){if(e){if("string"==typeof e)return Yn(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Yn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){o&&(e=o);var i=0,t=function(){};return{s:t,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==o.return||o.return()}finally{if(a)throw l}}}}function Yn(e,n){(null==n||n>e.length)&&(n=e.length);for(var o=0,i=Array(n);o<n;o++)i[o]=e[o];return i}function Xn(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function Qn(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Xn(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Xn(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var $n=function(e,n,o,t){var l,r,a,d,u,v=t.res,f=t.sres,p=G(e),m=(null==v?void 0:v.contentType)||"video",w=(null==v||null===(l=v[m])||void 0===l?void 0:l.drmEnabled)||!1,g=(null==v||null===(r=v[m])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,y=(null==v||null===(d=v[m])||void 0===d||null===(u=d.liveDetails)||void 0===u?void 0:u.isDvrEnabled)||!1;ue(v),se.set(v),p&&(p.on("loadstart",(function(){g?o.resolve({status:!0,msg:"Video Loaded",response:v}):o.resolve(Qn({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:v}:{response:v}))})),p.on("loadeddata",(function(){var o,t,l,r=$(e);if(null==r||r.map((function(n){return Z(e,n.id)})),y&&"Safari"===i())try{var a;null==p||null===(a=p.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==p||!p.muted())&&Ae(e,sessionStorage.getItem("volume")||"100");var d=de();if(function(e,n){var o,i,t,l,r,a,d,u,s,c,v,f,p=null==e?void 0:e.playerId,m=G(p),w=null==n?void 0:n.siteName;if(null!=e&&null!==(o=e.comscore)&&void 0!==o&&o.enable){var g=de(),y=(null==g||null===(i=g.video)||void 0===i?void 0:i.metadata)||[],b=(null==y?void 0:y.length)&&y.filter((function(e){return"advertisingGenre"===e.name}));if(null!==(t=b)&&void 0!==t&&t.length){var h=b.map((function(e){return e.value}));b=null==h?void 0:h.join(",")}Ln();var O=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,_=Array.isArray(null==O?void 0:O.category)?null==O||null===(r=O.category)||void 0===r?void 0:r.join(","):(null==O?void 0:O.category)||null,C=Kn(Kn(Kn({},null==g?void 0:g.video),null==g?void 0:g.linearchannel),{},{siteName:w,programId:(null==O?void 0:O.videotmsid)||null,programTitle:(null==O?void 0:O.lcProgrammeName)||null,episodeId:(null==O?void 0:O.videotmsid)||null,seasonNumber:(null==O||null===(a=O.seriesDetails)||void 0===a?void 0:a.season)||null,episodeNumber:(null==O||null===(d=O.seriesDetails)||void 0===d?void 0:d.episode)||null,isCompleteEpisode:!!(null!=g&&null!==(u=g.video)&&void 0!==u&&u.series||null!=O&&null!==(s=O.seriesDetails)&&void 0!==s&&s.episode),genre:b||_,comscoreConfig:{implementationId:(null==e||null===(c=e.comscore)||void 0===c?void 0:c.implementationId)||null,projectId:(null==e||null===(v=e.comscore)||void 0===v?void 0:v.projectId)||null}});if(null!=C&&null!==(f=C.streamingInfo)&&void 0!==f&&f.isLiveStream&&(C.contentType="LIVE"),null==C||!C.network){var S,I=(null==C?void 0:C.metadata)||[],k=null==I||null===(S=I.find((function(e){return"network"===e.name})))||void 0===S?void 0:S.value;C.network=k||null}null!=C&&C.network&&null!=C&&C.genre&&(C.customGenre="".concat(C.network,"_").concat((null==C?void 0:C.programTitle)||function(e){var n,o;return null!=e&&e.series?null==e||null===(o=e.series)||void 0===o?void 0:o.title:null==e||null===(n=e.gist)||void 0===n?void 0:n.title}(C),"_").concat(C.genre)),null!=O&&O.airDate&&(C.publishDate=O.airDate);var E=Vn(C,m);console.log("comscoreOptions player data",E),Rn(Kn({playerName:"Video.js"},E)),Mn(m)}}(n,v),s(),null!=n&&n.watchHistory&&null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.enable&&(!n.isAnonymousUser||null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.saveOffline)){var u,c,f=Qn(Qn({},n),v);!function(e,n,o){var i,t,l;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(On=null==n||null===(t=n.series)||void 0===t?void 0:t.id),bn=[],hn=0,sn=o;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=G(e);a&&(a.on("dispose",_n),a.on("timeupdate",(function(){if(!a.seeking()){var e=Math.floor(a.currentTime());bn.includes(hn)||(e!=hn||e<r?e>hn&&(hn=e+r):(bn.push(e),Cn(a,n,r)))}})),a.one("ended",(function(){Cn(a,n,r,!0)})))}(e,f,null==d||null===(u=d.video)||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.id)}if(null!=n&&null!==(l=n.analytics)&&void 0!==l&&l.muxKey&&null!=p&&p.mux){var m,w,g,b,h,O,_=(null===(m=de())||void 0===m?void 0:m.video)||(null==v?void 0:v.video),C=null==_?void 0:_.gist,S={env_key:null==n||null===(w=n.analytics)||void 0===w?void 0:w.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==_||null===(b=_.series)||void 0===b?void 0:b.title,video_stream_type:null!=_&&null!==(h=_.streamingInfo)&&void 0!==h&&h.isLiveStream?"live":"video",viewer_user_id:null==n||null===(O=n.analytics)||void 0===O?void 0:O.userId};p.mux({debug:!1,data:S})}})),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 o,i,t,l,r,a,d,u,s,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(t=i.framework)||void 0===t||null===(l=t.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,p=null===(a=window)||void 0===a||null===(d=a.cast)||void 0===d||null===(u=d.framework)||void 0===u||null===(s=u.CastContext)||void 0===s||null===(c=s.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var m,w=p.getMediaSession(),g=w.media.tracks.filter((function(e){return"TEXT"==e.type}));m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(m)}})),p.tech_.on("retryplaylist",(function(){g&&Tn(v,e)})),p.on("error",(function(){var n,i;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&g)?Tn(v,e):(c(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),o.reject({status:!1,msg:(null==p||null===(i=p.error())||void 0===i?void 0:i.message)||"Some error occured",response:v}))})),p.one("play",(function(){var e,o,i,t,l;if(null===(e=window)||void 0===e||null===(o=e.app_data)||void 0===o||null===(i=o.appcmsMain)||void 0===i||null===(t=i.adsConfig)||void 0===t||!t.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var r,a,d,u=null===(r=de())||void 0===r||null===(a=r.video)||void 0===a||null===(d=a.gist)||void 0===d?void 0:d.id,s=ce(),c=(null==s?void 0:s.get(u))||{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 o=(e.language||e.language||"").toUpperCase(),i=(n.language||n.label||"").toUpperCase();return o<i?-1:o>i?1:0})),"object"==we(p.dash)){var o,t,l,r=null==p||null===(o=p.dash)||void 0===o||null===(t=o.mediaPlayer)||void 0===t?void 0:t.getTracksFor("audio"),a=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")})),d=Jn(n);try{for(d.s();!(l=d.n()).done;){var u=l.value;if(a&&(null==u?void 0:u.id)=="dash-audio-".concat(a.index)){u.enabled=!0;break}}}catch(e){d.e(e)}finally{d.f()}}else{var s,c=Jn(n);try{for(c.s();!(s=c.n()).done;){var v,f,m,g=s.value;if(("Chrome"==i()||"Edge"==i()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!w))&&null!=g&&null!==(m=g.label)&&void 0!==m&&m.includes("5.1"))p.audioTracks().removeTrack(g);else{if("main"==g.kind){g.enabled=!0;break}g.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}})))};function Zn(e){var n=G(e),o=n.seekable(),i=n.controlBar.progressControl.seekBar.el();if(o&&o.length>0){var t=o.start(0),l=o.end(o.length-1)-t;no(),oo(l).forEach((function(e){var n=e.id,o=e.title,t=e.time,r=eo(n,o,Math.min(t/l*100,99.5));i.appendChild(r)}))}}function eo(e,n,o){var i=document.createElement("div");return i.className="vjs-seekbar-program-marker",i.id=e,i.style.title=n,i.style.left="".concat(o,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="4px",i.style.backgroundColor="#000000",i.style.left="".concat(o,"%"),i.style.pointerEvents="none",i}function no(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach((function(e){e.remove()}))}function oo(e){var n=(new Date).getTime(),o=new Date(n-1e3*e).getTime();return(ve()||[]).filter((function(e){var i=new Date(e.formatted_startdate).getTime();return i>=o&&i<=n})).map((function(e){var n=new Date(e.formatted_startdate).getTime()-o;return{title:e.title,time:n/1e3,id:e.programme_id}}))}function io(e,n){var o=G(e);if(o){var i=n.dvrConfig,t=void 0===i?{}:i,l=n.videoId;n.epg;var r=t.playLive,a=t.playFromBegining,d=t.programs;fe(d),o.on("loadeddata",(function(){be(n)?a?he(o,n):r?Oe(o,l):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.dvrConfig,i=void 0===o?{}:o,t=n.videoId,l=n.epg,r=i.buttonConfig,a=void 0===r?{}:r,d=a.watchLive;a.resume;var u=a.startFromBegining,s=t;if(l&&null!=l&&l.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));s="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!Se(s),f=document.querySelector(".vjs-dvr-btn-overlay");f||((f=document.createElement("div")).className="vjs-dvr-btn-overlay");var p=Ie(n);p&&(f.style.backgroundImage="url(".concat(p,")"),f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="cover");f.innerHTML=lo(i,v),f.style.display="flex",e.el().appendChild(f),ke(e),to("watch-live-resume-btn",d,(function(){Pe(e,f),Oe(e,s)})),to("watch-begining-btn",u,(function(){Pe(e,f),he(e,n)}))}(o,n),_e({player:o,showWatchLive:!0,showStartOver:!0})):Ce(o)})),o.one("loadedmetadata",(function(){sessionStorage.setItem("program_switched",!0),function(e,n){var o=n.videoId,i=e.currentTime(),t=!1,l=e.seekable(),r=l.start(0),a=l.end(l.length-1)-r,d=JSON.parse(sessionStorage.getItem("epgConfig")),u=o,s=!0;if(d&&null!=d&&d.enable){var c;s=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==d?void 0:d.programId),u=null==d?void 0:d.programId}e.on("seeking",(function(){t=!0})),e.on("seeked",(function(){t=!1,i=e.currentTime();var o=JSON.parse(sessionStorage.getItem("epgConfig"));if(o&&null!=o&&o.enable){if(!s||sessionStorage.getItem("program_switched"))return;u="".concat(null==o?void 0:o.programId,"-").concat(null==o?void 0:o.channelId)}Ee(u,i),Te(e,n),_e({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})})),e.on("timeupdate",(function(){if(!t){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!s||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");u="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var o=e.currentTime();Math.abs(o-i)>=20&&(Ee(u,o),i=o,function(e,n){oo(n).forEach((function(o){var i=o.id,t=o.title,l=o.time,r=document.getElementById(i);if(r){var a=Math.min(l/n*100,99.5);r.style.left="".concat(a,"%")}else{var d=e.controlBar.progressControl.seekBar.el(),u=eo(i,t,Math.min(l/n*100,99.5));d.appendChild(u)}}))}(e,a))}}))}(o,n)}))}else console.warn("Player instance is required to initialize start over.")}function to(e,n,o){var i,t,l=document.getElementById(e);l&&(t=n,(i=l)&&(i.style.color="".concat((null==t?void 0:t.textColor)||"#000"),i.style.backgroundColor="".concat((null==t?void 0:t.backGroundColor)||"#DCF95B")),l.addEventListener("click",o))}function lo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(null==e?void 0:e.buttonConfig)||{},i=o.watchLive,t=o.resume,l=o.startFromBegining,r=n?(null==t?void 0:t.text)||"Resume":(null==i?void 0:i.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(ye()," ").concat(r,"</button>"),d='<button id="watch-begining-btn">'.concat(ge()," ").concat((null==l?void 0:l.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(d,"</div>")}function ro(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function ao(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ro(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ro(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var uo=function(t,l,r,a){var s,g,y,b,h,O,_,C,S,I,k,E,T,P,D,j,R,A,M,x,N,L,V,B,F,U,H,z,q,K,J,Y,X,Q,$,Z,ne,oe,ie,le,re=l.res,ae=void 0===re?null:re,de=l.sres,ue=void 0===de?null:de,se=null!=r&&r.chromecastReceiverId?["chromecast","html5"]:["html5"],ce=(null===(s=ae)||void 0===s?void 0:s.contentType)||"video",ve=te(null===(g=ae)||void 0===g||null===(y=g[ce])||void 0===y||null===(b=y.gist)||void 0===b?void 0:b.videoImageUrl)||te(null===(h=ae)||void 0===h||null===(O=h[ce])||void 0===O||null===(_=O.gist)||void 0===_||null===(C=_.imageGist)||void 0===C?void 0:C.r16x9),fe=(null===(S=ae)||void 0===S||null===(I=S[ce])||void 0===I||null===(k=I.liveDetails)||void 0===k?void 0:k.isDvrEnabled)||!1,pe=(null===(E=ae)||void 0===E||null===(T=E[ce])||void 0===T||null===(P=T.streamingInfo)||void 0===P?void 0:P.isLiveStream)||!1,me=(null===(D=ae)||void 0===D||null===(j=D.ads)||void 0===j||null===(R=j.preRoll)||void 0===R||null===(A=R.adTags)||void 0===A||null===(M=A.web)||void 0===M?void 0:M.active)&&(null===(x=ae)||void 0===x||null===(N=x.ads)||void 0===N||null===(L=N.preRoll)||void 0===L||null===(V=L.adTags)||void 0===V||null===(B=V.web)||void 0===B?void 0:B.url),we=(null===(F=ae=ao(ao({},ae),{},{audioAssetSource:null==r?void 0:r.audioAssetSource}))||void 0===F||null===(U=F[ce])||void 0===U?void 0:U.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(H=window)||void 0===H||null===(z=H.app_data)||void 0===z||null===(q=z.appcmsMain)||void 0===q||null===(K=q.adsConfig)||void 0===K?void 0:K.vodAdSticherProvider)||!1,ge=(null==r?void 0:r.latency)||6,ye=(null==r?void 0:r.skin_settings)||{};null==r||r.dvrConfig;var be=(ie={enableSmoothSeeking:!0,controls:0!=(null==r?void 0:r.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==r?void 0:r.muted)||!1,autoplay:(null==r?void 0:r.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ye?void 0:ye.pictureInPictureToggle)||!1},playbackRates:null!=ye&&ye.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==r.skin,liveui:fe},e(ie,"autoplay",null==r?void 0:r.autoplay),e(ie,"normalizeAutoplay",(null==r?void 0:r.autoplay)&&!me),e(ie,"loop",(null==r?void 0:r.loop)||!1),e(ie,"audioPosterMode",null==r?void 0:r.audioPosterMode),e(ie,"html5",ao(ao({dash:ao(ao(ao({},!W.browser.IS_SAFARI&&{useTTML:!0}),(null==r?void 0:r.debugConfig)&&(null==r||null===(J=r.debugConfig)||void 0===J?void 0:J.enable)&&{debug:!0,logLevel:null!=r&&null!==(Y=r.debugConfig)&&void 0!==Y&&Y.logLevel?null==r||null===(X=r.debugConfig)||void 0===X?void 0:X.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ge},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:ao(ao({liveRangeSafeTimeDelta:ge,useDevicePixelRatio:!0,experimentalLLHLS:(null==r?void 0:r.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==r||null===(Q=r.customData)||void 0===Q?void 0:Q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===($=null==r?void 0:r.enableLowInitialPlaylist)||void 0===$||$}),debug:(null==r?void 0:r.debugConfig)&&(null==r||null===(Z=r.debugConfig)||void 0===Z?void 0:Z.enable)||!1,nativeTextTracks:"Safari"==i()},0==(null==r||null===(ne=r.customData)||void 0===ne?void 0:ne.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==r||null===(oe=r.customData)||void 0===oe?void 0:oe.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ie,"poster",ve),e(ie,"techOrder",se),e(ie,"chromecast",{requestCustomDataFn:function(e){var n,o,i=G(t),l=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),a=function(e,n,o){var i,t,l,r,a,d,u,s,c,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,w,g,y,b,h,O,_;p.isDrmEnabled=!0;var C=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,S=(null==C?void 0:C.url)||(null==n||null===(w=n.keySystemOptions)||void 0===w||null===(g=w[0])||void 0===g||null===(y=g.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=S;var I=(null==C?void 0:C.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(h=b[0])||void 0===h||null===(O=h.options)||void 0===O||null===(_=O.httpRequestHeaders)||void 0===_?void 0:_["X-AxDRM-Message"]);p.licenseToken=I}var k=(null==e||null===(i=e[f])||void 0===i||null===(t=i.gist)||void 0===t?void 0:t.contentType)||"VIDEO";p.contentType=k;var E=null==e||null===(l=e[f])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;p.duration=E;var T=null==e||null===(a=e[f])||void 0===a||null===(d=a.gist)||void 0===d?void 0:d.title;p.mediaTitle=T;var P=null==e||null===(u=e[f])||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.videoImageUrl;return p.mediaImage=P,p.subTitles=o,p.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(ae,e,l);return ao(ao({},a),{},{convivaMetaData:ao({customerKey:(null==r||null===(n=r.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==r||null===(o=r.convivaConfig)||void 0===o?void 0:o.debug)||!1},mn.getData())})},modifyLoadRequestFn:function(e){var n,o,i,l,r,a=G(t),d=(null==a?void 0:a.currentSource())||{};!(null===(n=ae)||void 0===n||null===(o=n[ce])||void 0===o||null===(i=o.streamingInfo)||void 0===i||null===(l=i.videoAssets)||void 0===l?void 0:l.is4K)&&1||null!=d&&d.src&&null!=d&&null!==(r=d.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ie);if(!W.getPlayers()[t]){null!=r&&r.debugConfig&&null!=r&&null!==(le=r.debugConfig)&&void 0!==le&&le.enable&&W.log.level("debug");var he=W(t,be,function(){var e=n(o.mark((function e(){var n,i,l,s,g,y,b,h,O,_,C,S,I,k,E,T,P,D,j,R,A;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(he),console.log(W.VERSION),console.log(W.getPlugins()),e.next=5,Je(r,ae);case 5:if(I=null===(n=ae)||void 0===n||null===(i=n[ce])||void 0===i||null===(l=i.liveDetails)||void 0===l?void 0:l.startOverTime,pe&&a.resolve(ao({status:!0,msg:"Player Initialised"},ue?{seriesResponse:ue,response:ae}:{response:ae})),fe&&null!=r&&null!==(s=r.dvrConfig)&&void 0!==s&&s.enable&&io(t,ao(ao({},r),{},{isDvrEnabled:fe})),f(t,null==r?void 0:r.analyticsCb,null==r?void 0:r.customData),pn(t,r),/Android/i.test(navigator.userAgent)&&(W.options.vhs.overrideNative=!0),fe&&Ne(t,I),!me||null!=r&&null!==(g=r.customData)&&void 0!==g&&g.disableAds||p(t,me,ae),k=d(ae,t),console.log(k),null!=r&&r.nearestClusterUrl&&(k=m(k,r.nearestClusterUrl)),!we){e.next=21;break}return e.next=20,w(t,ae);case 20:k=e.sent;case 21:k?u(t,k):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:ae}),c(t,"Incompatible / Missing Source")),((null===(y=ae)||void 0===y||null===(b=y[ce])||void 0===b||null===(h=b.contentDetails)||void 0===h||null===(O=h.closedCaptions)||void 0===O?void 0:O.length)>0||(null===(_=ae)||void 0===_||null===(C=_[ce])||void 0===C||null===(S=C.closedCaptions)||void 0===S?void 0:S.length)>0)&&(A=(null===(T=ae)||void 0===T||null===(P=T[ce])||void 0===P||null===(D=P.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null===(j=ae)||void 0===j||null===(R=j[ce])||void 0===R?void 0:R.closedCaptions),E=A.filter((function(e){return"VTT"===e.format||"WEBVTT"===e.format})),ee(t,E)),null!=r&&r.disableControls?v(t):wn(t,ao(ao(ao({},r),be),{},{liveVideo:pe,isDvrEnabled:fe,res:ae,sres:ue})),$n(t,ao(ao(ao({},r),be),{},{liveVideo:pe}),a,{res:ae,sres:ue});case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}},so={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function co(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function vo(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?co(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):co(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var fo,po=function(e,n){var o=n.resolve,i=n.reject,t=null==e?void 0:e.playerId,l=mo(e);uo(t,{res:l},e,{resolve:o,reject:i})},mo=function(e){var n,o,i,t,l,r,a,d,u=null==e?void 0:e.streamingInfo,s=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,c=(null==e||null===(o=e.streamingInfo)||void 0===o?void 0:o.isDrmEnabled)||null,v=(null==e||null===(i=e.streamingInfo)||void 0===i||null===(t=i.ads)||void 0===t?void 0:t.url)||null,f=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,p=(null==e||null===(r=e.streamingInfo)||void 0===r?void 0:r.subtitles)||[],m=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(d=a.videoAssets)||void 0===d?void 0:d.drmProvider)||null,w=null==e?void 0:e.token,y=g(w),b=null==y?void 0:y.site;return vo(vo({id:null==so?void 0:so[b]},!c&&{directPlaybackUrl:null==s?void 0:s.url}),{},{video:{drmEnabled:c,streamingInfo:{videoAssets:vo(vo({},m&&{drmProvider:m}),{},{widevine:null==s?void 0:s.widevine,fairPlay:null==s?void 0:s.fairPlay,playReady:null==s?void 0:s.playReady})},liveDetails:{isDvrEnabled:null==u?void 0:u.isDvrEnabled},gist:vo({},f&&{videoImageUrl:f}),contentDetails:vo({},(null==p?void 0:p.length)>0&&{closedCaptions:De(p)})},ads:{preRoll:{adTags:{web:vo(vo({},v&&{active:!0}),v&&{url:v})}}}})};function wo(e,n){return go.apply(this,arguments)}function go(){return(go=n(o.mark((function e(n,i){var t,l,r,a,d,u;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.resolve,l=i.reject,r=null==n?void 0:n.videoId,a=null==n?void 0:n.playerId,d=!(null==n||!n.anonymousId),e.next=6,O();case 6:u=e.sent,y(r,u).then((function(e){var o,i,s,c;window.contentType=null==e||null===(o=e.data)||void 0===o||null===(i=o.video)||void 0===i||null===(s=i.gist)||void 0===s?void 0:s.contentType,ue(null==e?void 0:e.data);var v,f=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(c=n.watchHistory)&&void 0!==c&&c.enable&&!d)if((null===(v=n.watchHistory)||void 0===v?void 0:v.saveOffline)||!1){var p,m,w,g=kn((null===(p=n.watchHistory)||void 0===p?void 0:p.profileId)||"",r,null==n?void 0:n.siteOwner);if(g&&g.length)n.watchHistoryResumeTime=(null===(m=g[0])||void 0===m?void 0:m.watchedTime)||null,n.watchedPercentage=(null===(w=g[0])||void 0===w?void 0:w.watchedPercentage)||null;f.contentType="video",uo(a,{res:f},n,{resolve:t,reject:l})}else b(r,u).then((function(e){var o,i,t,l,r,a;null!==(o=window)&&void 0!==o&&null!==(i=o.watchHistory)&&void 0!==i&&i.cb&&(null===(t=window)||void 0===t||null===(l=t.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,f.contentType="video"})).catch((function(e){var n,o,i,t;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(t=i.watchHistory)||void 0===t||t.cb(e))})).finally((function(){uo(a,{res:f},n,{resolve:t,reject:l})}));else uo(a,{res:f},n,{resolve:t,reject:l})})).catch((function(e){h(e,a,l,r)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yo(e,n){return bo.apply(this,arguments)}function bo(){return(bo=n(o.mark((function e(n,i){var t,l,r,a,d;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.resolve,l=i.reject,e.next=3,O();case 3:r=e.sent,a=null==n?void 0:n.playerId,d=null==n?void 0:n.epg,_(d,r).then((function(e){var o=null==e?void 0:e.data;o.contentType="linearchannel",o.channelId=null==d?void 0:d.channelId,uo(a,{res:o},n,{resolve:t,reject:l})})).catch((function(e){h(e,a,l,videoId)}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ho(e,n){return Oo.apply(this,arguments)}function Oo(){return(Oo=n(o.mark((function e(n,i){var t,l,r,a,d,u,s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=i.resolve,r=i.reject,e.next=3,O();case 3:a=e.sent,d=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,pe.set(parseInt(u)),s=null==n||null===(t=n.series)||void 0===t?void 0:t.id,C(s,a).then((function(e){var o,i,t,u=e.data,c=e.data.seasons;me(c);var v=videoId||(null==c||null===(o=c[0])||void 0===o||null===(i=o.episodes)||void 0===i||null===(t=i[0])||void 0===t?void 0:t.id);S(s,a),y(v,a).then((function(e){var o,i,t;window.contentType=null==e||null===(o=e.data)||void 0===o||null===(i=o.video)||void 0===i||null===(t=i.gist)||void 0===t?void 0:t.contentType,ue(e.data),uo(d,{res:null==e?void 0:e.data,sres:u},n,{resolve:l,reject:r})})).catch((function(e){h(e,d,r,videoId)}))})).catch((function(e){h(e,d,r)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _o(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function Co(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?_o(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):_o(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function So(){return{loadVideoInstantly:I,onTimeUpdate:z,getVideoDuration:q,onVideoEnded:K,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=n(o.mark((function n(i,t){var l,r,a,d,u,s,c,v,f,p,m,w,g,b,O,_,C,S,I,k,E,T,P,j,R;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!D(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(g=(null==e?void 0:e.videoSourceUrl)||!1,b=null==e?void 0:e.asat,O=(null==e||null===(l=e.epg)||void 0===l?void 0:l.enable)||!1,_=null==e?void 0:e.videoId,C=(null==e||null===(r=e.series)||void 0===r?void 0:r.enable)||!1,S=(null==e?void 0:e.streamingInfo)||!1,window.videoId=_,I=null==e?void 0:e.token,!B(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",I),F().set(null==e?void 0:e.refreshToken),I&&!U(I)){n.next=16;break}return t({status:!1,msg:"".concat(I?"Token is expired !":"Missing Authorization Token"),response:{token:I}}),n.abrupt("return");case 16:fo=JSON.parse(atob(I.split(".")[1]));case 17:return window.siteName=null===(a=fo)||void 0===a?void 0:a.site,window.siteId=null===(d=fo)||void 0===d?void 0:d.siteId,e.isAnonymousUser=!(null===(u=fo)||void 0===u||!u.anonymousId),e.siteOwner=(null===(s=fo)||void 0===s?void 0:s.site)||null,e.userId=(null===(c=fo)||void 0===c?void 0:c.userId)||null,window.sessionStorage.setItem("uid",null===(v=fo)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,k=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,E=(null==e||null===(p=e.analytics)||void 0===p?void 0:p.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,re(null==e||null===(m=e.customData)||void 0===m?void 0:m.localisation),V.set(e.apiBaseUrl),null!=e&&e.skin&&!le(e.skin)||(e.skin="VL_ONE"),n.next=35,We(e);case 35:E&&je("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then((function(){return H(E)})).catch((function(e){})),(P=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(k)))&&P.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g?(R={directPlaybackUrl:g,id:j="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},b?y(j,I).then((function(n){var o=(null==n?void 0:n.data)||{};uo(k,{res:Co(Co({},o),R)},e,{resolve:i,reject:t})})).catch((function(e){h(e,k,t,j)})):uo(k,{res:R},e,{resolve:i,reject:t})):S?po(e,{resolve:i,reject:t}):C?ho(e,{resolve:i,reject:t}):O?yo(e,{resolve:i,reject:t}):wo(e,{resolve:i,reject:t});case 39:case"end":return n.stop()}}),n)})));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:oe,skip:k,getPlayer:G,play:E,pause:T,detectBrowser:i,rewind:P,loadVideo:u,seekToTimeStamp:J,isPlayerInitialised:D,load:j,authenticateLC:R,dispose:A,enableCaptions:ne,disableCaptions:Z,getCaptions:$,playSelectedResolution:ie,getSource:d,setVolume:Ae,getVolume:Me,disableControls:v,setPlaybackSpeed:Y,getEntitlementData:M,adsQueuePointManager:x,getSsaiEvents:N,playerEvents:X,onReplay:Q,isBehindLive:L}}export{So as V,Zn as i,no as r};
|