@viewlift/player-backup 2.0.94-smartTv-test16 → 2.0.94-smartTv-test17

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.
Files changed (53) hide show
  1. package/cjs/{autoNextVideo-1d9e1d67.js → autoNextVideo-232138a2.js} +1 -1
  2. package/cjs/bundle.css +7 -7
  3. package/cjs/{caption-settings-7f7ed041.js → caption-settings-b106c21c.js} +1 -1
  4. package/cjs/captions-2e9b778d.js +1 -0
  5. package/cjs/{features-5728feb1.js → features-487f2f70.js} +1 -1
  6. package/cjs/{generic-b7ac0749.js → generic-98b587ca.js} +1 -1
  7. package/cjs/{index-eec746f5.js → index-9f518b0d.js} +1 -1
  8. package/cjs/{index-d134346b.js → index-ec86fee8.js} +1 -1
  9. package/cjs/index.js +1 -1
  10. package/cjs/{multicamv2-6a910577.js → multicamv2-769c2c95.js} +1 -1
  11. package/cjs/{multicamv2-958643d7.js → multicamv2-b3aa2f91.js} +1 -1
  12. package/cjs/{nextEpisodeButton-17689cde.js → nextEpisodeButton-c53e52cd.js} +1 -1
  13. package/cjs/{playlist-a1346414.js → playlist-353ff6f4.js} +1 -1
  14. package/cjs/{series-7bee3e94.js → series-0d824108.js} +1 -1
  15. package/cjs/{series-v2-8bd5c3b5.js → series-v2-74566e2c.js} +1 -1
  16. package/cjs/{series-v2-ee3b1449.js → series-v2-9dab4996.js} +1 -1
  17. package/cjs/{skin-c246ffe7.js → skin-031d24cb.js} +1 -1
  18. package/cjs/{skin-36d03546.js → skin-47404199.js} +1 -1
  19. package/cjs/{skin-02df6e67.js → skin-5c7f8c59.js} +1 -1
  20. package/cjs/{skin-a1125538.js → skin-8d39caba.js} +1 -1
  21. package/cjs/{skin-7d8919dc.js → skin-ddfac3a7.js} +1 -1
  22. package/cjs/{skin-b011797c.js → skin-e8685b7f.js} +1 -1
  23. package/cjs/{skin-04b4a474.js → skin-ed3b1b84.js} +1 -1
  24. package/cjs/{videoSelector-037b0823.js → videoSelector-53e5b095.js} +1 -1
  25. package/cjs/{videoSelector-2979f748.js → videoSelector-ed70a711.js} +1 -1
  26. package/esm/{autoNextVideo-992b0b4f.js → autoNextVideo-0fd03cf5.js} +1 -1
  27. package/esm/bundle.css +7 -7
  28. package/esm/{caption-settings-76bbd9ca.js → caption-settings-74d10593.js} +1 -1
  29. package/esm/captions-574216b7.js +1 -0
  30. package/esm/{features-4e862099.js → features-dca5371a.js} +1 -1
  31. package/esm/{generic-c886e8be.js → generic-f4535b47.js} +1 -1
  32. package/esm/{index-79fa027b.js → index-0b00e4ab.js} +1 -1
  33. package/esm/{index-9b509600.js → index-ab059015.js} +1 -1
  34. package/esm/index.js +1 -1
  35. package/esm/{multicamv2-758c7daa.js → multicamv2-27ef941c.js} +1 -1
  36. package/esm/{multicamv2-cde31c4d.js → multicamv2-e778bd19.js} +1 -1
  37. package/esm/{nextEpisodeButton-a64d3c78.js → nextEpisodeButton-eb177a2a.js} +1 -1
  38. package/esm/{playlist-37a905ea.js → playlist-523c14e7.js} +1 -1
  39. package/esm/{series-5ebeefa4.js → series-41d8b169.js} +1 -1
  40. package/esm/{series-v2-5f6f33e1.js → series-v2-439de835.js} +1 -1
  41. package/esm/{series-v2-53eb0826.js → series-v2-f3d71d58.js} +1 -1
  42. package/esm/{skin-ce2bdc96.js → skin-1b667fe4.js} +1 -1
  43. package/esm/{skin-c0394a77.js → skin-36c3c848.js} +1 -1
  44. package/esm/{skin-6de0a213.js → skin-4b018857.js} +1 -1
  45. package/esm/{skin-f2780731.js → skin-564334a9.js} +1 -1
  46. package/esm/{skin-f0e2f2ba.js → skin-6ea6835b.js} +1 -1
  47. package/esm/{skin-87f79ac1.js → skin-975a850a.js} +1 -1
  48. package/esm/{skin-7089d1ac.js → skin-b44039c5.js} +1 -1
  49. package/esm/{videoSelector-d7cd1ab1.js → videoSelector-15d08642.js} +1 -1
  50. package/esm/{videoSelector-347c23d8.js → videoSelector-71450810.js} +1 -1
  51. package/package.json +1 -1
  52. package/cjs/captions-afd38b2e.js +0 -1
  53. package/esm/captions-0280b028.js +0 -1
@@ -1 +1 @@
1
- "use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-b7ac0749.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("./util-47af43d1.js"),l=require("./captions-afd38b2e.js"),a=require("./skin-f87e1c22.js"),s=require("./renditions-7fe52e97.js"),u=require("./resolution-5e1f1897.js"),d=require("./browser-38ff3331.js"),c=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof"),f=require("@babel/runtime/helpers/toConsumableArray"),p=require("@babel/runtime/helpers/slicedToArray"),m=function(e){return new Promise(function(n,t){if(y(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},y=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},g=function(e){var n,t=a.getPlayer(e);return(null==t||null===(n=t.audioTracks())||void 0===n?void 0:n.tracks_)||[]||[]},h=function(e,n){for(var t=a.getPlayer(e).audioTracks().tracks_||[],r=0;r<t.length;r++){var o=t[r];o.id==n?o.enabled=!0:o.enabled=!1}},b=function(e,n,t){var r=a.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},w=function(e){var n=a.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},k=function(){var e=t(r.mark(function e(n){var t,i,l,s,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return s=e.sent,e.prev=5,e.next=8,m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,s.default(o),e.finish(13);case 16:(u=o.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==d.detectBrowser()?null==i||i.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),S=function(e,n){var t=a.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,i,l,a,s=this.el(),u=o.dom.getPointerPosition(s,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*u,v.seek()}})};var T=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),m("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),O=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),P=function(){var e=t(r.mark(function e(){var n;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(o),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),j=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),I=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-0c89add5.js")});case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),E=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:T,loadEMELibrary:O,loadMuxPlugin:P,loadDvrSeekbar:j,loadContribDash:I});function C(e){return D.apply(this,arguments)}function D(){return(D=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,T();case 3:t&&"Safari"==d.detectBrowser()&&Promise.resolve().then(function(){return E}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function A(e,n){return x.apply(this,arguments)}function x(){return(x=t(r.mark(function e(n,t){var o,i,l,a,s,u,c,v,f,p;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[c])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[c])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[c])||void 0===a||null===(s=a.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==d.detectBrowser()?O():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?I():O():"Safari"!=d.detectBrowser()&&f?I():null,k(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var N=new Set,V=null,M=function(n,t,r){var o,i,l,a,s,u,d,c={},v=(null==n?void 0:n.contentType)||"video";c["c3.cm.id"]=(null===(o=n[v])||void 0===o?void 0:o.id)||"Null",c["c3.cm.contentType"]=W(n),c[null==r||null===(i=r.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==n||!n.linearchannel),c[null==r||null===(l=r.Constants)||void 0===l?void 0:l.STREAM_URL]=t.currentSrc(),c[null==r||null===(a=r.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),c["c3.cm.categoryType"]=H(n),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===(s=n[v])||void 0===s?void 0:s.drmEnabled)||"None",c.DAIStream=null!==(u=n[v])&&void 0!==u&&null!==(d=u.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",c[r.Constants.DEFAULT_RESOURCE]="AKAMAI",c["c3.cm.brand"]="NULL",c.CDVREnabled=q(n),c["c3.cm.genreList"]=B(n),c["c3.cm.genre"]=_(n),c["c3.cm.channel"]=U(n);var f=G(e.getCurrentSeries(),n);return c=R(R({},c),f)},_=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},B=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},U=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},H=function(e){return(null==e?void 0:e.contentType)||"null"},q=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},F=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},W=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Q,G=function(n,t){var r,o,i,l,a,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return s;var u=e.getSeasonNumber(),d=e.getEpisodeNumber();return s["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(o=r.series)||void 0===o?void 0:o.title)||"Null",s["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",s["c3.cm.showTitle"]=(null==n||null===(i=n[u-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",s["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",s},K=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"}},z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},J=function(){var n=t(r.mark(function n(t,o){var i,l,s,u,d,c,v,f,p,m;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},l=i.trackConvivaPlayerEvent,s=i.paymentHandler,u=i.tveProvider,d=i.enable,c=i.appName,v=(o||{}).token,d){n.next=4;break}return n.abrupt("return");case 4:if(f=a.getPlayer(t),"function"==typeof(p=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,p("getConvivaObject");case 10:if(m=n.sent){n.next=13;break}return n.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=K(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;V&&V!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),N.clear(),V=f.currentSrc();var r=z(f.currentType()),i=e.getCurrentVideo(),l=M(i,f,m);l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.PLAYER_NAME]=c||"WEB",l[null==m||null===(t=m.Constants)||void 0===t?void 0:t.ASSET_NAME]=F(i,o),l.authToken=v||"NULL",l.streamType=r,l.D2CType=s||"NONE",l.subscriberType=u||(s?"D2C":"FREE"),l["c3.cm.affiliate"]=u||"NULL",p("contentInfo",l)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),f.on("play",function(){N.has(f.currentSrc())||(N.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){N.has(f.currentSrc())&&N.delete(f.currentSrc()),p("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==N||N.clear(),p("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),X=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-02df6e67.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-a1125538.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-36d03546.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-7d8919dc.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-b011797c.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-04b4a474.js")}).then(function(t){t.initialiseSkin(e,n)}):"VL_SmartTV"==t&&Promise.resolve().then(function(){return require("./skin-c246ffe7.js")}).then(function(t){t.initialiseSkin(e,n)})};function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function $(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Z=[],ee=0,ne=null;function te(t,r,o){var i,l,a,s,u,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(i=r.watchHistory)||void 0===i||i.apiVersion;var c=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(s=r.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==r||null===(u=r.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(t.currentTime()),g=d?100:Math.floor(v/f*100),h={};m?function(t,r,o){var i=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(o),l=re(i),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return $($({},e),{},n({},t,u[t]))},{}),c=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Q});c<0?l.push($($({content:d},t),{},{addedDate:a,updateDate:a})):l[c]=$($($({},l[c]),t),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:d,watchedTime:y,watchedPercentage:g},c,r.siteOwner):(h=$($({videoId:Q,watchedTime:y,watchedPercentage:g,doneWatching:d,profileId:c},ne&&{seriesId:ne}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then(function(e){}).catch(function(e){})),ee=v+o}function re(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function oe(e,n,t){var r=re(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return r&&Array.isArray(r)&&(o=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var ie=!1,le=function(n,t){var r,o,i=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[i])||void 0===r||null===(o=r.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!ie){var l=ae(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),ie=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ae(e,n,t){if(Array.isArray(e))return e.map(function(e){return ae(e,n,t)});if(null!==e&&"object"===v(e)){var r={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=ae(e[o],n,t)}),r}return e}function se(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return ue(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ue(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ve=function(n,t,r,o){var i,s,u,c,f=o.res,p=o.sres,m=a.getPlayer(n),y=(null==f?void 0:f.contentType)||"video",g=(null==f?void 0:f[y].drmEnabled)||!1,h=(null==f||null===(i=f[y])||void 0===i||null===(s=i.streamingInfo)||void 0===s?void 0:s.isLiveStream)||!1,w=(null==f||null===(u=f[y])||void 0===u||null===(c=u.liveDetails)||void 0===c?void 0:c.isDvrEnabled)||!1;e.setCurrentVideo(f),m&&(m.on("loadstart",function(){h?r.resolve({status:!0,msg:"Video Loaded",response:f}):r.resolve(ce({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var r,o,i,s=l.getCaptions(n);if(null==s||s.map(function(e){return l.disableCaptions(n,e.id)}),w&&"Safari"===d.detectBrowser())try{var u;null==m||null===(u=m.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&b(n,sessionStorage.getItem("volume")||"100");var c=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var v,p,y=ce(ce({},t),f);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(ne=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Z=[],ee=0,Q=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,s=a.getPlayer(e);s&&(s.on("timeupdate",function(){if(!s.seeking()){var e=Math.floor(s.currentTime());Z.includes(ee)||(e==ee?(Z.push(e),te(s,n,l)):e>ee&&(ee=e+l))}}),s.one("ended",function(){te(s,n,l,!0)}))}(n,y,null==c||null===(v=c.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var g,h,k,S,T,O,P=(null===(g=e.getCurrentVideo())||void 0===g?void 0:g.video)||(null==f?void 0:f.video),j=null==P?void 0:P.gist,I={env_key:null==t||null===(h=t.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(k=window)||void 0===k?void 0:k.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(T=P.streamingInfo)&&void 0!==T&&T.isLiveStream?"live":"video",viewer_user_id:null==t||null===(O=t.analytics)||void 0===O?void 0:O.userId};m.mux({debug:!1,data:I})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,r,o,i,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){h&&le(f,n)}),m.on("error",function(){var t,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?le(f,n):(e.handleError(n,(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var n,r,o,i,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(o=r.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,s,u,d=null===(a=e.getCurrentVideo())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&setTimeout(function(){m.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==v(m.dash)){var t,r,o,i=null==m||null===(t=m.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=se(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=se(n);try{for(c.s();!(u=c.n()).done;){var f,p,y,h=u.value;("Chrome"==d.detectBrowser()||"Edge"==d.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(p=f.userAgent)&&void 0!==p&&p.includes("Macintosh")||!g))&&null!=h&&null!==(y=h.label)&&void 0!==y&&y.includes("5.1")?m.audioTracks().removeTrack(h):"main"==h.kind?h.enabled=!0:h.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};var fe,pe=(fe=!0,{enable:function(){fe=!0},disable:function(){fe=!1},get enabled(){return fe}}),me="ssai-breakStart",ye="ssai-adImpression",ge="ssai-firstQuartile",he="ssai-midpoint",be="ssai-thirdQuartile",we="ssai-complete",ke="ssai-breakEnd",Se={breakStart:me,impression:ye,firstQuartile:ge,midpoint:he,thirdQuartile:be,complete:we,breakEnd:ke};function Te(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=a.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var r=n.eventType,o=Se[r];o&&t.trigger(o,n)}function Oe(e){var n=a.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{adBreakStart:function(e){return t(me,e)},adImpression:function(e){return t(ye,e)},adFirstQuartile:function(e){return t(ge,e)},adMidpoint:function(e){return t(he,e)},adThirdQuartile:function(e){return t(be,e)},adComplete:function(e){return t(we,e)},adBreakEnd:function(e){return t(ke,e)}}}function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(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 Ee(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)?Ee(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Ee(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var Ce,De,Ae=(Ce="",{set:function(e){e&&(Ce=e)},get:function(){return Ce}}),xe=(De=null,{set:function(e){De=e},get position(){return De}});function Le(e,n){return Re.apply(this,arguments)}function Re(){return(Re=t(r.mark(function n(t,o){var i,l,s,u,d,c,v,f,m,y,g,h,b,w;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a.getPlayer(t),i=e.getSource(o,t),l=i.src,s=l.replace("/dash/","/session/").replace("master","session"),s=e.replaceMacros(s,t,o),u=Ne(s),d=p(u,2),c=d[0],v=d[1],s=new URL(s.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var n=p(e,2),t=n[0],r=n[1];s.searchParams.set(t,r)}),n.prev=8,n.next=11,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:je({},c)})});case 11:return f=n.sent,n.next=14,f.json();case 14:return m=n.sent,y="https://"+new URL(s).hostname,g=m.trackingUrl,h=m.manifestUrl,b=y+g,w=y+h,Ae.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),i.src=w,n.abrupt("return",i);case 26:return n.prev=26,n.t0=n.catch(8),n.abrupt("return",i);case 29:case"end":return n.stop()}},n,null,[[8,26]])}))).apply(this,arguments)}function Ne(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var r,o=Ie(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=p(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){o.e(e)}finally{o.f()}for(var u={},d={},c=0,v=Object.entries(n);c<v.length;c++){var f=p(v[c],2),m=f[0],y=f[1];if(m.startsWith("ads."))u[m.replace(/^ads\./,"")]=y;else d[m]=y}return[u,d]}function Ve(e,n){return Me.apply(this,arguments)}function Me(){return Me=t(r.mark(function n(o,i){var l,s,u,c,v,p,m,y,g,h,b,w,k,S,T,O,P;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:P=function(e,n,t,r,i,l){var s=a.getPlayer(o);if(!s.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(s.currentTime());var u,d=Ie(t);try{var c=function(){var t,a,d,c=u.value,v=c.eventType,f=c.beaconUrls,p=c.startTimeInSeconds,m=c.startTime,y=c.durationInSeconds,g=p||0,h=f,b=(null===(t=window)||void 0===t||null===(a=t.customData)||void 0===a||null===(d=a.ads)||void 0===d?void 0:d.adEventHandler)||null,w="".concat(g,"_").concat(v),k=T.get("pod-".concat(i))||[];if(e>=g&&!k.includes(w)){var S;k.push(w),T.set("pod-".concat(i),k);try{O(v,n,h,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var P=xe.position;xe.set(null),setTimeout(function(){null!=P&&(s.currentTime(P),l())},500)}if("function"==typeof b&&null!=n&&null!==(S=n.ads)&&void 0!==S&&S[r])try{var j,I={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:y,ad:null==n||null===(j=n.ads)||void 0===j?void 0:j[r],adIndex:r};b({adsData:I}),Te(o,I)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(u=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},O=function(e,n,t,r){null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},S=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},xe.set(i),v=Ae.get(),(p=a.getPlayer(o)).one("loadeddata",function(){v&&k(v)}),m=new Map,y=new Map,g=-1,h=(null===(l=document)||void 0===l||null===(s=l.getElementsByClassName("tvProviderImage"))||void 0===s?void 0:s[0])||null,b=(null==p||null===(u=p.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,w=(null==p||null===(c=p.controlBar)||void 0===c?void 0:c.getChild("seriesV2"))||null,k=function(){var n=t(r.mark(function n(t){var l,s,u,c,v,p,k,T,O,j,I,E,C,D,A,x,L;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return C=function(e){document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",C),0===e.button&&j()},E=function(e){},I=function(){var e,n=k.currentTime(),t=null,r=Ie(p);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=(o.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,m.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){k.currentTime(t+2.2)},100))},j=function(){var e,n=k.currentTime(),t=null,r=Ie(p);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=o.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!m.has(i)||n>=i&&n<=s)&&(t=i,m.set(i,!0),y.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){k.currentTime(t+.4)},100))},s=!1,n.next=7,fetch(t);case 7:return u=n.sent,n.next=10,u.json();case 10:c=n.sent,v=c.avails,p=[],k=a.getPlayer(o),T=k.controlBar.progressControl,O=T.seekBar.el(),v.map(function(e,n){var t,r,o;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(s=!0),p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(r=e.adBreakTrackingEvents)||void 0===r||null===(o=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===o?void 0:o[0])||[]})}),!s&&i&&(k.currentTime(i),I()),null!=p&&p.length&&(window.adsQueueList=p),console.log(p,"data"),p.forEach(function(e){var n,t,r=e.markerPositionInSeconds,o=e.ads,i=k.duration();if(!(r>i||Array.isArray(o)&&0==(null==o?void 0:o.length))){var l=r/i*100,a=document.createElement("div");a.className="vjs-seekbar-marker",a.style.left="".concat(l,"%"),a.style.position="absolute",a.style.top="0",a.style.bottom="0",a.style.width="2px",a.style.backgroundColor="#fecc09",a.style.left="".concat(l,"%"),a.style.pointerEvents="none",O.appendChild(a),null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableControls&&(O.style.display="none")}}),k.on("timeupdate",a.throttle(function(){var e=k.currentTime();if(e!==g){g=e;for(var n=!1,t=function(){var t=p[r],o=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=o+i;if(e>=o-1.2&&e<=a+1.2){e>=o&&!y.has(o)&&!k.seeking()&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&"Safari"==d.detectBrowser()&&0!=o&&(console.log("jfc"),k.currentTime(0),setTimeout(function(){k.currentTime(o+.4)},50),y.set(o,!0)),e>=o&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&m.set(o,!0),pe.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),T.el().style.visibility="hidden";for(var s=e-o,u=0,c=0,v=0;v<l.length;v++){var g,O=null==l||null===(g=l[v])||void 0===g?void 0:g.durationInSeconds;if(s<u+O){c=v;break}u+=O}l[c];var j=Math.max(0,i-s),E=Math.round(j);D.style.display="block",L.textContent="".concat(c+1," of ").concat(l.length," • ").concat(S(E));var C=[];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)});C.push.apply(C,f(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&C.push(null==t?void 0:t.podSlotImpressionBeacon),P(e,t,C,c,r,I),"break"}y.delete(o)},r=0;r<p.length;r++){if("break"===t())break}n||(D.style.display="none",T.el().style.visibility="visible",b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),pe.enable())}},1e3)),null===(l=document)||void 0===l||l.addEventListener("keydown",function(n){pe.enabled&&"ArrowRight"==n.key&&(j(),e.skip(o,10),n.stopPropagation())}),T.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",E),document.addEventListener("pointerup",C))}),(D=document.createElement("div")).className="ssai-ad-container",(A=document.createElement("div")).className="sponsored-adbox",(x=document.createElement("div")).className="sponsored-text",x.textContent="Sponsored Ad",A.append(x),(L=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",D.append(A),D.append(L),k.el().appendChild(D);case 40:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}(),T=new Map;case 16:case"end":return n.stop()}},n)})),Me.apply(this,arguments)}function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ue=function(i,s,u,c){var v,f,p,m,y,g,h,b,w,k,T,O,P,j,I,E,C,D,x,L,R,N,V,M,_,B,U,H,q,F=s.res,W=void 0===F?null:F,Q=s.sres,G=void 0===Q?null:Q,K=null!=u&&u.chromecastReceiverId?["chromecast","html5"]:["html5"],z=(null===(v=W)||void 0===v?void 0:v.contentType)||"video",Y=a.impolicy16x9(null===(f=W)||void 0===f||null===(p=f[z])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.videoImageUrl)||a.impolicy16x9(null===(y=W)||void 0===y||null===(g=y[z])||void 0===g||null===(h=g.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),$=(null===(w=W)||void 0===w||null===(k=w[z])||void 0===k||null===(T=k.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,Z=(null===(O=W)||void 0===O||null===(P=O[z])||void 0===P||null===(j=P.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,ee=e.getAdsURL(W);W=Be(Be({},W),{},{audioAssetSource:null==u?void 0:u.audioAssetSource});var ne="MEDIA_TAILOR"==(null===(I=window)||void 0===I||null===(E=I.app_data)||void 0===E||null===(C=E.appcmsMain)||void 0===C||null===(D=C.adsConfig)||void 0===D?void 0:D.vodAdSticherProvider)||"MEDIA_TAILOR"==(null===(x=window)||void 0===x||null===(L=x.customData)||void 0===L||null===(R=L.ads)||void 0===R?void 0:R.vodAdSticherProvider)||!1,te=(null==u?void 0:u.latency)||6,re=(H={enableSmoothSeeking:!0,controls:0!=(null==u?void 0:u.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==u?void 0:u.muted)||!1,autoplay:(null==u?void 0:u.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==u.skin,liveui:$},n(H,"autoplay",null==u?void 0:u.autoplay),n(H,"normalizeAutoplay",(null==u?void 0:u.autoplay)&&!ee),n(H,"loop",(null==u?void 0:u.loop)||!1),n(H,"audioPosterMode",null==u?void 0:u.audioPosterMode),n(H,"html5",Be(Be({dash:Be(Be(Be({},!o.browser.IS_SAFARI&&{useTTML:!0}),(null==u?void 0:u.debugConfig)&&(null==u||null===(N=u.debugConfig)||void 0===N?void 0:N.enable)&&{debug:!0,logLevel:null!=u&&null!==(V=u.debugConfig)&&void 0!==V&&V.logLevel?null==u||null===(M=u.debugConfig)||void 0===M?void 0:M.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:te},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Be({},"IE"==d.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Be(Be({liveRangeSafeTimeDelta:te,useDevicePixelRatio:!0,experimentalLLHLS:(null==u?void 0:u.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==u||null===(_=u.customData)||void 0===_?void 0:_.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),nativeTextTracks:"Safari"==d.detectBrowser()},0==(null==u||null===(B=u.customData)||void 0===B?void 0:B.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==u||null===(U=u.customData)||void 0===U?void 0:U.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(H,"poster",Y),n(H,"techOrder",K),n(H,"chromecast",{requestCustomDataFn:function(e){var n=a.getPlayer(i),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var r,o,i,l,a,s,u,d,c,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,O=(null==T?void 0:T.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=O;var P=(null==T?void 0:T.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=P}var j=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=j;var I=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=I;var E=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=E;var C=null==e||null===(u=e[f])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=C,p.subTitles=t,p.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(W,e,t)},modifyLoadRequestFn:function(e){var n,t,r,o,l,s=a.getPlayer(i),u=(null==s?void 0:s.currentSource())||{};!(null===(n=W)||void 0===n||null===(t=n[z])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(o=r.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),H);if(!o.getPlayers()[i]){null===(q=window)||void 0===q||!q.customData.isSmartTV||null!=u&&u.disableControls||(re.spatialNavigation={enabled:!0,horizontalSeek:!0});try{o.log.level("off")}catch(e){}var oe=o(i,re,function(){var n=t(r.mark(function n(){var t,a,s,d,v,f,p,m,y,g,h,b,w,k,T,O,P,j,I,E,C,D,x,L,R,N,V,M,_,B,U,H,q,F,Q,K,Y,te,ie;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:try{oe.log.level("off")}catch(e){}return console.log(oe),console.log(o.VERSION),console.log(o.getPlugins()),n.next=6,A(u,W);case 6:try{null===(M=window)||void 0===M||!M.customData.isSmartTV||null!=u&&u.disableControls||oe.spatialNavigation.start()}catch(e){}if(_=null===(t=W)||void 0===t||null===(a=t[z])||void 0===a||null===(s=a.liveDetails)||void 0===s?void 0:s.startOverTime,Z&&c.resolve(Be({status:!0,msg:"Player Initialised"},G?{seriesResponse:G,response:W}:{response:W})),e.inititateBeacon(i,null==u?void 0:u.analyticsCb),J(i,u),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),$&&S(i,_),!ee||null!=u&&null!==(d=u.customData)&&void 0!==d&&d.disableAds||e.initialiseAdvertisement(i,ee,W),B=e.getSource(W,i),console.log(B),null!=u&&u.nearestClusterUrl&&(B=e.getUpdatedClusterSource(B,u.nearestClusterUrl)),!ne||null===(v=W)||void 0===v||null===(f=v.video)||void 0===f||!f.isSSAIEnabled){n.next=21;break}return n.next=20,Le(i,W);case 20:B=n.sent;case 21:B?e.loadVideo(i,B):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:W}),e.handleError(i,"Incompatible / Missing Source")),((null===(p=W)||void 0===p||null===(m=p[z])||void 0===m||null===(y=m.contentDetails)||void 0===y||null===(g=y.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=W)||void 0===h||null===(b=h[z])||void 0===b||null===(w=b.closedCaptions)||void 0===w?void 0:w.length)>0)&&(Y=(null===(H=W)||void 0===H||null===(q=H[z])||void 0===q||null===(F=q.contentDetails)||void 0===F?void 0:F.closedCaptions)||(null===(Q=W)||void 0===Q||null===(K=Q[z])||void 0===K?void 0:K.closedCaptions),U=Y.filter(function(e){return"VTT"===e.format}),l.addCaptions(i,U)),null!=u&&u.disableControls&&e.disableControls(i),"MEDIA_TAILOR"==(null===(k=window)||void 0===k||null===(T=k.app_data)||void 0===T||null===(O=T.appcmsMain)||void 0===O||null===(P=O.adsConfig)||void 0===P?void 0:P.vodAdSticherProvider)&&null!==(j=window)&&void 0!==j&&null!==(I=j.app_data)&&void 0!==I&&null!==(E=I.appcmsMain)&&void 0!==E&&null!==(C=E.adsConfig)&&void 0!==C&&C.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(D=window)||void 0===D||null===(x=D.customData)||void 0===x||null===(L=x.ads)||void 0===L?void 0:L.vodAdSticherProvider)&&null!==(R=window)&&void 0!==R&&null!==(N=R.customData)&&void 0!==N&&null!==(V=N.ads)&&void 0!==V&&V.vodAdClientSideTracking?(u.customData.disableControls=!0,te=e.getSource(null==re?void 0:re.res,i)||{},ie=te.src,Ve(i,ie)):X(i,Be(Be(Be({},u),re),{},{liveVideo:Z,isDvrEnabled:$,res:W,sres:G})),ve(i,Be(Be(Be({},u),re),{},{liveVideo:Z}),c,{res:W,sres:G});case 26:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},He={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var We,Qe=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=Ge(e);Ue(o,{res:i},e,{resolve:t,reject:r})},Ge=function(n){var t,r,o=null==n?void 0:n.streamingInfo,i=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,l=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,a=null==n?void 0:n.token,s=e.getDecodedToken(a),u=null==s?void 0:s.site;return Fe(Fe({id:null==He?void 0:He[u]},!l&&{directPlaybackUrl:null==i?void 0:i.url}),{},{video:{drmEnabled:l,streamingInfo:{videoAssets:{widevine:null==i?void 0:i.widevine,fairPlay:null==i?void 0:i.fairPlay,playReady:null==i?void 0:i.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Ke(e,n){return ze.apply(this,arguments)}function ze(){return(ze=t(r.mark(function n(t,o){var i,l,a,s,u,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,a=null==t?void 0:t.videoId,s=null==t?void 0:t.playerId,u=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:d=n.sent,e.getVideoDetails(a,d).then(function(n){var r,o,c,v;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(c=o.gist)||void 0===c?void 0:c.contentType,e.setCurrentVideo(null==n?void 0:n.data);var f,p=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(v=t.watchHistory)&&void 0!==v&&v.enable&&!u)if((null===(f=t.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=oe((null===(m=t.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==t?void 0:t.siteOwner);if(h&&h.length)t.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,t.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",Ue(s,{res:p},t,{resolve:i,reject:l})}else e.getVideoInfo(a,d).then(function(e){var n,r,o,i,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,r,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(e))}).finally(function(){Ue(s,{res:p},t,{resolve:i,reject:l})});else Ue(s,{res:p},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,s,l,a)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Je(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=t(r.mark(function n(t,o){var i,l,a,s,u;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,n.next=3,e.getToken();case 3:a=n.sent,s=null==t?void 0:t.playerId,u=null==t?void 0:t.epg,e.getLinearChannelDetails(u,a).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==u?void 0:u.channelId,Ue(s,{res:n},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,s,l,videoId)});case 7:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ye(e,n){return $e.apply(this,arguments)}function $e(){return($e=t(r.mark(function n(t,o){var i,l,a,s,u,d,c;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:s=n.sent,u=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(i=t.series)||void 0===i?void 0:i.id,e.getSeriesDetails(c,s).then(function(n){var r,o,i,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(o=r.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);e.createSeriesWatchMap(c,s),e.getVideoDetails(f,s).then(function(n){var r,o,i;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,e.setCurrentVideo(n.data),Ue(u,{res:null==n?void 0:n.data,sres:d},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,u,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,u,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function en(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:i.onTimeUpdate,getVideoDuration:i.getVideoDuration,getVideoCurrentTime:i.getVideoCurrentTime,onVideoEnded:i.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(r.mark(function t(o,i){var l,s,u,d,v,f,p,y,g,h,b,w,k,S,T,O,P,j,I,E,D,A,x;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(b=(null==n?void 0:n.videoSourceUrl)||!1,w=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,S=null==n?void 0:n.videoId,T=(null==n||null===(s=n.series)||void 0===s?void 0:s.enable)||!1,O=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,P=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",P),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),P&&!e.isTokenExpired(P)){t.next=16;break}return i({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}}),t.abrupt("return");case 16:We=JSON.parse(atob(P.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(u=We)||void 0===u||!u.anonymousId),n.siteOwner=(null===(d=We)||void 0===d?void 0:d.site)||null,n.userId=(null===(v=We)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=We)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,j=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable?null:null==n?void 0:n.chromecastReceiverId,I=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(E=null==n?void 0:n.errors)&&(window.customErrors=E),window.customData=null==n?void 0:n.customData,c.setLocalisation(null==n||null===(g=n.customData)||void 0===g?void 0:g.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!a.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,C(n);case 33:I&&m("https://www.googletagmanager.com/gtag/js?id=".concat(I)).then(function(){return e.runGtag(I)}).catch(function(e){}),(D=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(j)))&&D.addEventListener("contextmenu",function(e){return e.preventDefault()}),b?(x={directPlaybackUrl:b,id:A="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(A,P).then(function(e){var t=(null==e?void 0:e.data)||{};Ue(j,{res:en(en({},t),x)},n,{resolve:o,reject:i})}).catch(function(n){e.initiateErrorHandling(n,j,i,A)}):Ue(j,{res:x},n,{resolve:o,reject:i})):O?Qe(n,{resolve:o,reject:i}):T?Ye(n,{resolve:o,reject:i}):k?Je(n,{resolve:o,reject:i}):Ke(n,{resolve:o,reject:i});case 37:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:s.getRenditions,getSelectedRendition:s.getSelectedRendition,skip:e.skip,getPlayer:a.getPlayer,play:e.play,pause:e.pause,isPaused:e.isPaused,detectBrowser:d.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:i.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,getAudioTracks:g,enableAudioTrack:h,playSelectedResolution:u.playSelectedResolution,getSource:e.getSource,setVolume:b,getVolume:w,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:Oe,getPlayerVersion:function(){return window.vl_player_version},getTextTracksWithCuesDetails:l.getTextTracksWithCuesDetails}},exports.initialiseKeyboardEvents=function(n,t){var r,o,i,l=a.getPlayer(n),s=null==l||null===(r=l.controlBar)||void 0===r||null===(o=r.playToggle)||void 0===o?void 0:o.el_,u=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(r){var o,i,a,d,c,v,f,p,m;if(pe.enabled&&"input"!=r.target.localName){var y=r.key,g=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(y)&&(r.preventDefault(),null==u||u.focus()),y){case" ":null==s||s.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===t.liveui||e.rewind(n,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(d=a.appcmsMain)||void 0===d||null===(c=d.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(v=window)&&void 0!==v&&null!==(f=v.app_data)&&void 0!==f&&null!==(p=f.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||e.skip(n,10)}}},!0)},exports.setupAdvertisementMarkers=Ve;
1
+ "use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-98b587ca.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("./util-47af43d1.js"),l=require("./captions-2e9b778d.js"),a=require("./skin-f87e1c22.js"),s=require("./renditions-7fe52e97.js"),u=require("./resolution-5e1f1897.js"),d=require("./browser-38ff3331.js"),c=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof"),f=require("@babel/runtime/helpers/toConsumableArray"),p=require("@babel/runtime/helpers/slicedToArray"),m=function(e){return new Promise(function(n,t){if(y(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},y=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},g=function(e){var n,t=a.getPlayer(e);return(null==t||null===(n=t.audioTracks())||void 0===n?void 0:n.tracks_)||[]||[]},h=function(e,n){for(var t=a.getPlayer(e).audioTracks().tracks_||[],r=0;r<t.length;r++){var o=t[r];o.id==n?o.enabled=!0:o.enabled=!1}},b=function(e,n,t){var r=a.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},w=function(e){var n=a.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},k=function(){var e=t(r.mark(function e(n){var t,i,l,s,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return s=e.sent,e.prev=5,e.next=8,m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,s.default(o),e.finish(13);case 16:(u=o.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==d.detectBrowser()?null==i||i.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),S=function(e,n){var t=a.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,i,l,a,s=this.el(),u=o.dom.getPointerPosition(s,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*u,v.seek()}})};var T=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),m("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),O=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),P=function(){var e=t(r.mark(function e(){var n;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(o),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),j=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),I=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-0c89add5.js")});case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),E=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:T,loadEMELibrary:O,loadMuxPlugin:P,loadDvrSeekbar:j,loadContribDash:I});function C(e){return D.apply(this,arguments)}function D(){return(D=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,T();case 3:t&&"Safari"==d.detectBrowser()&&Promise.resolve().then(function(){return E}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function A(e,n){return x.apply(this,arguments)}function x(){return(x=t(r.mark(function e(n,t){var o,i,l,a,s,u,c,v,f,p;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[c])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[c])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[c])||void 0===a||null===(s=a.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==d.detectBrowser()?O():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?I():O():"Safari"!=d.detectBrowser()&&f?I():null,k(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var N=new Set,V=null,M=function(n,t,r){var o,i,l,a,s,u,d,c={},v=(null==n?void 0:n.contentType)||"video";c["c3.cm.id"]=(null===(o=n[v])||void 0===o?void 0:o.id)||"Null",c["c3.cm.contentType"]=W(n),c[null==r||null===(i=r.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==n||!n.linearchannel),c[null==r||null===(l=r.Constants)||void 0===l?void 0:l.STREAM_URL]=t.currentSrc(),c[null==r||null===(a=r.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),c["c3.cm.categoryType"]=H(n),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===(s=n[v])||void 0===s?void 0:s.drmEnabled)||"None",c.DAIStream=null!==(u=n[v])&&void 0!==u&&null!==(d=u.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",c[r.Constants.DEFAULT_RESOURCE]="AKAMAI",c["c3.cm.brand"]="NULL",c.CDVREnabled=q(n),c["c3.cm.genreList"]=B(n),c["c3.cm.genre"]=_(n),c["c3.cm.channel"]=U(n);var f=G(e.getCurrentSeries(),n);return c=R(R({},c),f)},_=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},B=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},U=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},H=function(e){return(null==e?void 0:e.contentType)||"null"},q=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},F=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},W=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Q,G=function(n,t){var r,o,i,l,a,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return s;var u=e.getSeasonNumber(),d=e.getEpisodeNumber();return s["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(o=r.series)||void 0===o?void 0:o.title)||"Null",s["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",s["c3.cm.showTitle"]=(null==n||null===(i=n[u-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",s["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",s},K=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"}},z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},J=function(){var n=t(r.mark(function n(t,o){var i,l,s,u,d,c,v,f,p,m;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},l=i.trackConvivaPlayerEvent,s=i.paymentHandler,u=i.tveProvider,d=i.enable,c=i.appName,v=(o||{}).token,d){n.next=4;break}return n.abrupt("return");case 4:if(f=a.getPlayer(t),"function"==typeof(p=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,p("getConvivaObject");case 10:if(m=n.sent){n.next=13;break}return n.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=K(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;V&&V!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),N.clear(),V=f.currentSrc();var r=z(f.currentType()),i=e.getCurrentVideo(),l=M(i,f,m);l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.PLAYER_NAME]=c||"WEB",l[null==m||null===(t=m.Constants)||void 0===t?void 0:t.ASSET_NAME]=F(i,o),l.authToken=v||"NULL",l.streamType=r,l.D2CType=s||"NONE",l.subscriberType=u||(s?"D2C":"FREE"),l["c3.cm.affiliate"]=u||"NULL",p("contentInfo",l)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),f.on("play",function(){N.has(f.currentSrc())||(N.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){N.has(f.currentSrc())&&N.delete(f.currentSrc()),p("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==N||N.clear(),p("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),X=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-5c7f8c59.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-8d39caba.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-47404199.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-ddfac3a7.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-e8685b7f.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-ed3b1b84.js")}).then(function(t){t.initialiseSkin(e,n)}):"VL_SmartTV"==t&&Promise.resolve().then(function(){return require("./skin-031d24cb.js")}).then(function(t){t.initialiseSkin(e,n)})};function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function $(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Z=[],ee=0,ne=null;function te(t,r,o){var i,l,a,s,u,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(i=r.watchHistory)||void 0===i||i.apiVersion;var c=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(s=r.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==r||null===(u=r.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(t.currentTime()),g=d?100:Math.floor(v/f*100),h={};m?function(t,r,o){var i=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(o),l=re(i),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return $($({},e),{},n({},t,u[t]))},{}),c=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Q});c<0?l.push($($({content:d},t),{},{addedDate:a,updateDate:a})):l[c]=$($($({},l[c]),t),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:d,watchedTime:y,watchedPercentage:g},c,r.siteOwner):(h=$($({videoId:Q,watchedTime:y,watchedPercentage:g,doneWatching:d,profileId:c},ne&&{seriesId:ne}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then(function(e){}).catch(function(e){})),ee=v+o}function re(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function oe(e,n,t){var r=re(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return r&&Array.isArray(r)&&(o=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var ie=!1,le=function(n,t){var r,o,i=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[i])||void 0===r||null===(o=r.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!ie){var l=ae(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),ie=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ae(e,n,t){if(Array.isArray(e))return e.map(function(e){return ae(e,n,t)});if(null!==e&&"object"===v(e)){var r={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=ae(e[o],n,t)}),r}return e}function se(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return ue(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ue(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ve=function(n,t,r,o){var i,s,u,c,f=o.res,p=o.sres,m=a.getPlayer(n),y=(null==f?void 0:f.contentType)||"video",g=(null==f?void 0:f[y].drmEnabled)||!1,h=(null==f||null===(i=f[y])||void 0===i||null===(s=i.streamingInfo)||void 0===s?void 0:s.isLiveStream)||!1,w=(null==f||null===(u=f[y])||void 0===u||null===(c=u.liveDetails)||void 0===c?void 0:c.isDvrEnabled)||!1;e.setCurrentVideo(f),m&&(m.on("loadstart",function(){h?r.resolve({status:!0,msg:"Video Loaded",response:f}):r.resolve(ce({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var r,o,i,s=l.getCaptions(n);if(null==s||s.map(function(e){return l.disableCaptions(n,e.id)}),w&&"Safari"===d.detectBrowser())try{var u;null==m||null===(u=m.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&b(n,sessionStorage.getItem("volume")||"100");var c=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var v,p,y=ce(ce({},t),f);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(ne=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Z=[],ee=0,Q=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,s=a.getPlayer(e);s&&(s.on("timeupdate",function(){if(!s.seeking()){var e=Math.floor(s.currentTime());Z.includes(ee)||(e==ee?(Z.push(e),te(s,n,l)):e>ee&&(ee=e+l))}}),s.one("ended",function(){te(s,n,l,!0)}))}(n,y,null==c||null===(v=c.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var g,h,k,S,T,O,P=(null===(g=e.getCurrentVideo())||void 0===g?void 0:g.video)||(null==f?void 0:f.video),j=null==P?void 0:P.gist,I={env_key:null==t||null===(h=t.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(k=window)||void 0===k?void 0:k.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(T=P.streamingInfo)&&void 0!==T&&T.isLiveStream?"live":"video",viewer_user_id:null==t||null===(O=t.analytics)||void 0===O?void 0:O.userId};m.mux({debug:!1,data:I})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,r,o,i,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){h&&le(f,n)}),m.on("error",function(){var t,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?le(f,n):(e.handleError(n,(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var n,r,o,i,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(o=r.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,s,u,d=null===(a=e.getCurrentVideo())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&setTimeout(function(){m.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==v(m.dash)){var t,r,o,i=null==m||null===(t=m.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=se(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=se(n);try{for(c.s();!(u=c.n()).done;){var f,p,y,h=u.value;("Chrome"==d.detectBrowser()||"Edge"==d.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(p=f.userAgent)&&void 0!==p&&p.includes("Macintosh")||!g))&&null!=h&&null!==(y=h.label)&&void 0!==y&&y.includes("5.1")?m.audioTracks().removeTrack(h):"main"==h.kind?h.enabled=!0:h.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};var fe,pe=(fe=!0,{enable:function(){fe=!0},disable:function(){fe=!1},get enabled(){return fe}}),me="ssai-breakStart",ye="ssai-adImpression",ge="ssai-firstQuartile",he="ssai-midpoint",be="ssai-thirdQuartile",we="ssai-complete",ke="ssai-breakEnd",Se={breakStart:me,impression:ye,firstQuartile:ge,midpoint:he,thirdQuartile:be,complete:we,breakEnd:ke};function Te(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=a.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var r=n.eventType,o=Se[r];o&&t.trigger(o,n)}function Oe(e){var n=a.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{adBreakStart:function(e){return t(me,e)},adImpression:function(e){return t(ye,e)},adFirstQuartile:function(e){return t(ge,e)},adMidpoint:function(e){return t(he,e)},adThirdQuartile:function(e){return t(be,e)},adComplete:function(e){return t(we,e)},adBreakEnd:function(e){return t(ke,e)}}}function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(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 Ee(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)?Ee(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Ee(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var Ce,De,Ae=(Ce="",{set:function(e){e&&(Ce=e)},get:function(){return Ce}}),xe=(De=null,{set:function(e){De=e},get position(){return De}});function Le(e,n){return Re.apply(this,arguments)}function Re(){return(Re=t(r.mark(function n(t,o){var i,l,s,u,d,c,v,f,m,y,g,h,b,w;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a.getPlayer(t),i=e.getSource(o,t),l=i.src,s=l.replace("/dash/","/session/").replace("master","session"),s=e.replaceMacros(s,t,o),u=Ne(s),d=p(u,2),c=d[0],v=d[1],s=new URL(s.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var n=p(e,2),t=n[0],r=n[1];s.searchParams.set(t,r)}),n.prev=8,n.next=11,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:je({},c)})});case 11:return f=n.sent,n.next=14,f.json();case 14:return m=n.sent,y="https://"+new URL(s).hostname,g=m.trackingUrl,h=m.manifestUrl,b=y+g,w=y+h,Ae.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),i.src=w,n.abrupt("return",i);case 26:return n.prev=26,n.t0=n.catch(8),n.abrupt("return",i);case 29:case"end":return n.stop()}},n,null,[[8,26]])}))).apply(this,arguments)}function Ne(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var r,o=Ie(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=p(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){o.e(e)}finally{o.f()}for(var u={},d={},c=0,v=Object.entries(n);c<v.length;c++){var f=p(v[c],2),m=f[0],y=f[1];if(m.startsWith("ads."))u[m.replace(/^ads\./,"")]=y;else d[m]=y}return[u,d]}function Ve(e,n){return Me.apply(this,arguments)}function Me(){return Me=t(r.mark(function n(o,i){var l,s,u,c,v,p,m,y,g,h,b,w,k,S,T,O,P;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:P=function(e,n,t,r,i,l){var s=a.getPlayer(o);if(!s.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(s.currentTime());var u,d=Ie(t);try{var c=function(){var t,a,d,c=u.value,v=c.eventType,f=c.beaconUrls,p=c.startTimeInSeconds,m=c.startTime,y=c.durationInSeconds,g=p||0,h=f,b=(null===(t=window)||void 0===t||null===(a=t.customData)||void 0===a||null===(d=a.ads)||void 0===d?void 0:d.adEventHandler)||null,w="".concat(g,"_").concat(v),k=T.get("pod-".concat(i))||[];if(e>=g&&!k.includes(w)){var S;k.push(w),T.set("pod-".concat(i),k);try{O(v,n,h,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var P=xe.position;xe.set(null),setTimeout(function(){null!=P&&(s.currentTime(P),l())},500)}if("function"==typeof b&&null!=n&&null!==(S=n.ads)&&void 0!==S&&S[r])try{var j,I={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:y,ad:null==n||null===(j=n.ads)||void 0===j?void 0:j[r],adIndex:r};b({adsData:I}),Te(o,I)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(u=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},O=function(e,n,t,r){null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},S=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},xe.set(i),v=Ae.get(),(p=a.getPlayer(o)).one("loadeddata",function(){v&&k(v)}),m=new Map,y=new Map,g=-1,h=(null===(l=document)||void 0===l||null===(s=l.getElementsByClassName("tvProviderImage"))||void 0===s?void 0:s[0])||null,b=(null==p||null===(u=p.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,w=(null==p||null===(c=p.controlBar)||void 0===c?void 0:c.getChild("seriesV2"))||null,k=function(){var n=t(r.mark(function n(t){var l,s,u,c,v,p,k,T,O,j,I,E,C,D,A,x,L;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return C=function(e){document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",C),0===e.button&&j()},E=function(e){},I=function(){var e,n=k.currentTime(),t=null,r=Ie(p);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=(o.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,m.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){k.currentTime(t+2.2)},100))},j=function(){var e,n=k.currentTime(),t=null,r=Ie(p);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=o.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!m.has(i)||n>=i&&n<=s)&&(t=i,m.set(i,!0),y.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){k.currentTime(t+.4)},100))},s=!1,n.next=7,fetch(t);case 7:return u=n.sent,n.next=10,u.json();case 10:c=n.sent,v=c.avails,p=[],k=a.getPlayer(o),T=k.controlBar.progressControl,O=T.seekBar.el(),v.map(function(e,n){var t,r,o;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(s=!0),p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(r=e.adBreakTrackingEvents)||void 0===r||null===(o=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===o?void 0:o[0])||[]})}),!s&&i&&(k.currentTime(i),I()),null!=p&&p.length&&(window.adsQueueList=p),console.log(p,"data"),p.forEach(function(e){var n,t,r=e.markerPositionInSeconds,o=e.ads,i=k.duration();if(!(r>i||Array.isArray(o)&&0==(null==o?void 0:o.length))){var l=r/i*100,a=document.createElement("div");a.className="vjs-seekbar-marker",a.style.left="".concat(l,"%"),a.style.position="absolute",a.style.top="0",a.style.bottom="0",a.style.width="2px",a.style.backgroundColor="#fecc09",a.style.left="".concat(l,"%"),a.style.pointerEvents="none",O.appendChild(a),null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableControls&&(O.style.display="none")}}),k.on("timeupdate",a.throttle(function(){var e=k.currentTime();if(e!==g){g=e;for(var n=!1,t=function(){var t=p[r],o=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=o+i;if(e>=o-1.2&&e<=a+1.2){e>=o&&!y.has(o)&&!k.seeking()&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&"Safari"==d.detectBrowser()&&0!=o&&(console.log("jfc"),k.currentTime(0),setTimeout(function(){k.currentTime(o+.4)},50),y.set(o,!0)),e>=o&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&m.set(o,!0),pe.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),T.el().style.visibility="hidden";for(var s=e-o,u=0,c=0,v=0;v<l.length;v++){var g,O=null==l||null===(g=l[v])||void 0===g?void 0:g.durationInSeconds;if(s<u+O){c=v;break}u+=O}l[c];var j=Math.max(0,i-s),E=Math.round(j);D.style.display="block",L.textContent="".concat(c+1," of ").concat(l.length," • ").concat(S(E));var C=[];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)});C.push.apply(C,f(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&C.push(null==t?void 0:t.podSlotImpressionBeacon),P(e,t,C,c,r,I),"break"}y.delete(o)},r=0;r<p.length;r++){if("break"===t())break}n||(D.style.display="none",T.el().style.visibility="visible",b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),pe.enable())}},1e3)),null===(l=document)||void 0===l||l.addEventListener("keydown",function(n){pe.enabled&&"ArrowRight"==n.key&&(j(),e.skip(o,10),n.stopPropagation())}),T.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",E),document.addEventListener("pointerup",C))}),(D=document.createElement("div")).className="ssai-ad-container",(A=document.createElement("div")).className="sponsored-adbox",(x=document.createElement("div")).className="sponsored-text",x.textContent="Sponsored Ad",A.append(x),(L=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",D.append(A),D.append(L),k.el().appendChild(D);case 40:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}(),T=new Map;case 16:case"end":return n.stop()}},n)})),Me.apply(this,arguments)}function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ue=function(i,s,u,c){var v,f,p,m,y,g,h,b,w,k,T,O,P,j,I,E,C,D,x,L,R,N,V,M,_,B,U,H,q,F=s.res,W=void 0===F?null:F,Q=s.sres,G=void 0===Q?null:Q,K=null!=u&&u.chromecastReceiverId?["chromecast","html5"]:["html5"],z=(null===(v=W)||void 0===v?void 0:v.contentType)||"video",Y=a.impolicy16x9(null===(f=W)||void 0===f||null===(p=f[z])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.videoImageUrl)||a.impolicy16x9(null===(y=W)||void 0===y||null===(g=y[z])||void 0===g||null===(h=g.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),$=(null===(w=W)||void 0===w||null===(k=w[z])||void 0===k||null===(T=k.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,Z=(null===(O=W)||void 0===O||null===(P=O[z])||void 0===P||null===(j=P.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,ee=e.getAdsURL(W);W=Be(Be({},W),{},{audioAssetSource:null==u?void 0:u.audioAssetSource});var ne="MEDIA_TAILOR"==(null===(I=window)||void 0===I||null===(E=I.app_data)||void 0===E||null===(C=E.appcmsMain)||void 0===C||null===(D=C.adsConfig)||void 0===D?void 0:D.vodAdSticherProvider)||"MEDIA_TAILOR"==(null===(x=window)||void 0===x||null===(L=x.customData)||void 0===L||null===(R=L.ads)||void 0===R?void 0:R.vodAdSticherProvider)||!1,te=(null==u?void 0:u.latency)||6,re=(H={enableSmoothSeeking:!0,controls:0!=(null==u?void 0:u.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==u?void 0:u.muted)||!1,autoplay:(null==u?void 0:u.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==u.skin,liveui:$},n(H,"autoplay",null==u?void 0:u.autoplay),n(H,"normalizeAutoplay",(null==u?void 0:u.autoplay)&&!ee),n(H,"loop",(null==u?void 0:u.loop)||!1),n(H,"audioPosterMode",null==u?void 0:u.audioPosterMode),n(H,"html5",Be(Be({dash:Be(Be(Be({},!o.browser.IS_SAFARI&&{useTTML:!0}),(null==u?void 0:u.debugConfig)&&(null==u||null===(N=u.debugConfig)||void 0===N?void 0:N.enable)&&{debug:!0,logLevel:null!=u&&null!==(V=u.debugConfig)&&void 0!==V&&V.logLevel?null==u||null===(M=u.debugConfig)||void 0===M?void 0:M.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:te},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Be({},"IE"==d.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Be(Be({liveRangeSafeTimeDelta:te,useDevicePixelRatio:!0,experimentalLLHLS:(null==u?void 0:u.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==u||null===(_=u.customData)||void 0===_?void 0:_.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),nativeTextTracks:"Safari"==d.detectBrowser()},0==(null==u||null===(B=u.customData)||void 0===B?void 0:B.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==u||null===(U=u.customData)||void 0===U?void 0:U.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(H,"poster",Y),n(H,"techOrder",K),n(H,"chromecast",{requestCustomDataFn:function(e){var n=a.getPlayer(i),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var r,o,i,l,a,s,u,d,c,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,O=(null==T?void 0:T.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=O;var P=(null==T?void 0:T.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=P}var j=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=j;var I=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=I;var E=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=E;var C=null==e||null===(u=e[f])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=C,p.subTitles=t,p.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(W,e,t)},modifyLoadRequestFn:function(e){var n,t,r,o,l,s=a.getPlayer(i),u=(null==s?void 0:s.currentSource())||{};!(null===(n=W)||void 0===n||null===(t=n[z])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(o=r.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),H);if(!o.getPlayers()[i]){null===(q=window)||void 0===q||!q.customData.isSmartTV||null!=u&&u.disableControls||(re.spatialNavigation={enabled:!0,horizontalSeek:!0});try{o.log.level("off")}catch(e){}var oe=o(i,re,function(){var n=t(r.mark(function n(){var t,a,s,d,v,f,p,m,y,g,h,b,w,k,T,O,P,j,I,E,C,D,x,L,R,N,V,M,_,B,U,H,q,F,Q,K,Y,te,ie;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:try{oe.log.level("off")}catch(e){}return console.log(oe),console.log(o.VERSION),console.log(o.getPlugins()),n.next=6,A(u,W);case 6:try{null===(M=window)||void 0===M||!M.customData.isSmartTV||null!=u&&u.disableControls||oe.spatialNavigation.start()}catch(e){}if(_=null===(t=W)||void 0===t||null===(a=t[z])||void 0===a||null===(s=a.liveDetails)||void 0===s?void 0:s.startOverTime,Z&&c.resolve(Be({status:!0,msg:"Player Initialised"},G?{seriesResponse:G,response:W}:{response:W})),e.inititateBeacon(i,null==u?void 0:u.analyticsCb),J(i,u),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),$&&S(i,_),!ee||null!=u&&null!==(d=u.customData)&&void 0!==d&&d.disableAds||e.initialiseAdvertisement(i,ee,W),B=e.getSource(W,i),console.log(B),null!=u&&u.nearestClusterUrl&&(B=e.getUpdatedClusterSource(B,u.nearestClusterUrl)),!ne||null===(v=W)||void 0===v||null===(f=v.video)||void 0===f||!f.isSSAIEnabled){n.next=21;break}return n.next=20,Le(i,W);case 20:B=n.sent;case 21:B?e.loadVideo(i,B):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:W}),e.handleError(i,"Incompatible / Missing Source")),((null===(p=W)||void 0===p||null===(m=p[z])||void 0===m||null===(y=m.contentDetails)||void 0===y||null===(g=y.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=W)||void 0===h||null===(b=h[z])||void 0===b||null===(w=b.closedCaptions)||void 0===w?void 0:w.length)>0)&&(Y=(null===(H=W)||void 0===H||null===(q=H[z])||void 0===q||null===(F=q.contentDetails)||void 0===F?void 0:F.closedCaptions)||(null===(Q=W)||void 0===Q||null===(K=Q[z])||void 0===K?void 0:K.closedCaptions),U=Y.filter(function(e){return"VTT"===e.format}),l.addCaptions(i,U)),null!=u&&u.disableControls&&e.disableControls(i),"MEDIA_TAILOR"==(null===(k=window)||void 0===k||null===(T=k.app_data)||void 0===T||null===(O=T.appcmsMain)||void 0===O||null===(P=O.adsConfig)||void 0===P?void 0:P.vodAdSticherProvider)&&null!==(j=window)&&void 0!==j&&null!==(I=j.app_data)&&void 0!==I&&null!==(E=I.appcmsMain)&&void 0!==E&&null!==(C=E.adsConfig)&&void 0!==C&&C.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(D=window)||void 0===D||null===(x=D.customData)||void 0===x||null===(L=x.ads)||void 0===L?void 0:L.vodAdSticherProvider)&&null!==(R=window)&&void 0!==R&&null!==(N=R.customData)&&void 0!==N&&null!==(V=N.ads)&&void 0!==V&&V.vodAdClientSideTracking?(u.customData.disableControls=!0,te=e.getSource(null==re?void 0:re.res,i)||{},ie=te.src,Ve(i,ie)):X(i,Be(Be(Be({},u),re),{},{liveVideo:Z,isDvrEnabled:$,res:W,sres:G})),ve(i,Be(Be(Be({},u),re),{},{liveVideo:Z}),c,{res:W,sres:G});case 26:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},He={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var We,Qe=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=Ge(e);Ue(o,{res:i},e,{resolve:t,reject:r})},Ge=function(n){var t,r,o=null==n?void 0:n.streamingInfo,i=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,l=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,a=null==n?void 0:n.token,s=e.getDecodedToken(a),u=null==s?void 0:s.site;return Fe(Fe({id:null==He?void 0:He[u]},!l&&{directPlaybackUrl:null==i?void 0:i.url}),{},{video:{drmEnabled:l,streamingInfo:{videoAssets:{widevine:null==i?void 0:i.widevine,fairPlay:null==i?void 0:i.fairPlay,playReady:null==i?void 0:i.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Ke(e,n){return ze.apply(this,arguments)}function ze(){return(ze=t(r.mark(function n(t,o){var i,l,a,s,u,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,a=null==t?void 0:t.videoId,s=null==t?void 0:t.playerId,u=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:d=n.sent,e.getVideoDetails(a,d).then(function(n){var r,o,c,v;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(c=o.gist)||void 0===c?void 0:c.contentType,e.setCurrentVideo(null==n?void 0:n.data);var f,p=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(v=t.watchHistory)&&void 0!==v&&v.enable&&!u)if((null===(f=t.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=oe((null===(m=t.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==t?void 0:t.siteOwner);if(h&&h.length)t.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,t.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",Ue(s,{res:p},t,{resolve:i,reject:l})}else e.getVideoInfo(a,d).then(function(e){var n,r,o,i,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,r,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(e))}).finally(function(){Ue(s,{res:p},t,{resolve:i,reject:l})});else Ue(s,{res:p},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,s,l,a)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Je(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=t(r.mark(function n(t,o){var i,l,a,s,u;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,n.next=3,e.getToken();case 3:a=n.sent,s=null==t?void 0:t.playerId,u=null==t?void 0:t.epg,e.getLinearChannelDetails(u,a).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==u?void 0:u.channelId,Ue(s,{res:n},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,s,l,videoId)});case 7:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ye(e,n){return $e.apply(this,arguments)}function $e(){return($e=t(r.mark(function n(t,o){var i,l,a,s,u,d,c;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:s=n.sent,u=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(i=t.series)||void 0===i?void 0:i.id,e.getSeriesDetails(c,s).then(function(n){var r,o,i,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(o=r.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);e.createSeriesWatchMap(c,s),e.getVideoDetails(f,s).then(function(n){var r,o,i;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,e.setCurrentVideo(n.data),Ue(u,{res:null==n?void 0:n.data,sres:d},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,u,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,u,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function en(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:i.onTimeUpdate,getVideoDuration:i.getVideoDuration,getVideoCurrentTime:i.getVideoCurrentTime,onVideoEnded:i.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(r.mark(function t(o,i){var l,s,u,d,v,f,p,y,g,h,b,w,k,S,T,O,P,j,I,E,D,A,x;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(b=(null==n?void 0:n.videoSourceUrl)||!1,w=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,S=null==n?void 0:n.videoId,T=(null==n||null===(s=n.series)||void 0===s?void 0:s.enable)||!1,O=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,P=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",P),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),P&&!e.isTokenExpired(P)){t.next=16;break}return i({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}}),t.abrupt("return");case 16:We=JSON.parse(atob(P.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(u=We)||void 0===u||!u.anonymousId),n.siteOwner=(null===(d=We)||void 0===d?void 0:d.site)||null,n.userId=(null===(v=We)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=We)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,j=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable?null:null==n?void 0:n.chromecastReceiverId,I=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(E=null==n?void 0:n.errors)&&(window.customErrors=E),window.customData=null==n?void 0:n.customData,c.setLocalisation(null==n||null===(g=n.customData)||void 0===g?void 0:g.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!a.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,C(n);case 33:I&&m("https://www.googletagmanager.com/gtag/js?id=".concat(I)).then(function(){return e.runGtag(I)}).catch(function(e){}),(D=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(j)))&&D.addEventListener("contextmenu",function(e){return e.preventDefault()}),b?(x={directPlaybackUrl:b,id:A="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(A,P).then(function(e){var t=(null==e?void 0:e.data)||{};Ue(j,{res:en(en({},t),x)},n,{resolve:o,reject:i})}).catch(function(n){e.initiateErrorHandling(n,j,i,A)}):Ue(j,{res:x},n,{resolve:o,reject:i})):O?Qe(n,{resolve:o,reject:i}):T?Ye(n,{resolve:o,reject:i}):k?Je(n,{resolve:o,reject:i}):Ke(n,{resolve:o,reject:i});case 37:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:s.getRenditions,getSelectedRendition:s.getSelectedRendition,skip:e.skip,getPlayer:a.getPlayer,play:e.play,pause:e.pause,isPaused:e.isPaused,detectBrowser:d.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:i.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,getAudioTracks:g,enableAudioTrack:h,playSelectedResolution:u.playSelectedResolution,getSource:e.getSource,setVolume:b,getVolume:w,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:Oe,getPlayerVersion:function(){return window.vl_player_version},getTextTracksWithCuesDetails:l.getTextTracksWithCuesDetails}},exports.initialiseKeyboardEvents=function(n,t){var r,o,i,l=a.getPlayer(n),s=null==l||null===(r=l.controlBar)||void 0===r||null===(o=r.playToggle)||void 0===o?void 0:o.el_,u=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(r){var o,i,a,d,c,v,f,p,m;if(pe.enabled&&"input"!=r.target.localName){var y=r.key,g=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(y)&&(r.preventDefault(),null==u||u.focus()),y){case" ":null==s||s.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===t.liveui||e.rewind(n,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(d=a.appcmsMain)||void 0===d||null===(c=d.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(v=window)&&void 0!==v&&null!==(f=v.app_data)&&void 0!==f&&null!==(p=f.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||e.skip(n,10)}}},!0)},exports.setupAdvertisementMarkers=Ve;
@@ -1 +1 @@
1
- "use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),a=require("./skin-f87e1c22.js"),o=require("./generic-b7ac0749.js"),l=require("./autoNextVideo-1d9e1d67.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=require("@babel/runtime/helpers/asyncToGenerator"),d=require("@babel/runtime/regenerator"),p=require("@babel/runtime/helpers/defineProperty"),v=require("@babel/runtime/helpers/slicedToArray"),m=[],f=function(e,t){var n=a.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=o.getVideoIdx();l.switchToNext(i,e,m)}};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===u(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",function(i){var a,o,l,u,s,c,d,p,v,m;if(u=t({},e,i),c=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=c.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",s=document.createElement("img"),l.appendChild(s),s.src=u[0].src,s.className="vjs-thumbnail",t(s.style,u[0].style),s.style.left||s.style.right||(s.onload=function(){s.style.left=-s.naturalWidth/2+"px"}),p=c.duration(),c.on("durationchange",function(e){p=c.duration()}),c.on("loadedmetadata",function(e){p=c.duration()}),(d=c.controlBar.progressControl).el().appendChild(l),v=function(e){var i,a,o,c,v,m,f,g,h,b;for(a in o=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((b=r(d.el()).getBoundingClientRect()).width||b.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),c=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c-=r(d.el()).getBoundingClientRect().left+h,i=Math.floor((c-d.el().offsetLeft)/d.width()*p),u)i>a&&(o=Math.max(o,a));(v=u[o]).src&&s.src!=v.src&&(s.src=v.src),v.style&&s.style!=v.style&&t(s.style,v.style),c+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(s,v.width||u[0].width)/2)>f?c-=c+g-f:c<g&&(c=g),l.style.left=c+"px"},null!==(a=window)&&void 0!==a&&null!==(o=a.customData)&&void 0!==o&&o.isSmartTV){var f=function(){var e,t,n=0,r=(null===(e=d.el_.children[0].children[2])||void 0===e?void 0:e.offsetWidth)||5;r<65?r=5:r>=c.el().offsetWidth-180?r=c.el().offsetWidth-240:r-=58;var i=c.currentTime();for(t in u)i>t&&(n=Math.max(n,t));var a=u[n];a.uri&&""!=a.uri&&s.src!=a.uri?(s.src=a.uri,l.style.left=r+"px",s.style.opacity="1"):(l.style.left="-1000px",s.style.opacity="0")},g=null;d.el_.children[0].onfocus=function(){f(),g=setInterval(function(){f()},250)},d.el_.children[0].addEventListener("blur",function(){try{l.style.left="-1000px",s.style.opacity="0",g&&(clearInterval(g),g=null)}catch(e){}})}else d.on("mousemove",v),d.on("touchmove",v);function h(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",h),m()}d.on("pointerdown",function(e){document.addEventListener("pointermove",v),document.addEventListener("pointerup",h)}),m=function(e){l.style.left="-1000px"},d.on("mouseout",m),d.on("touchcancel",m),d.on("touchend",m),c.on("userinactive",m)});var b="my-player";function y(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function x(){return(x=c(d.mark(function e(t){var n,r,i,a,o,l,u,s,c,p,m,f,g,h,b,y,x,w,E,A,N,k,j,T;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),o=v(a,2),l=o[0],u=o[1],s=i.width/u,c=i.height/l,p=[],m=0;m<l;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,m*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),p.push({uri:h,duration:t.duration}),t._tiles=p;return e.abrupt("return",p);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=v(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(T=j.images)||void 0===T?void 0:T.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function w(e,t){return E.apply(this,arguments)}function E(){return(E=c(d.mark(function e(t,n){var r,i;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return b=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",y(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function A(e,t,n){var r=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),i=a.getPlayer(b);if(r&&i){var o=r.getBoundingClientRect(),l=(e.clientX-o.left)/o.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var o=Math.floor((i+a)/2),l=t[o];if(l===e)return l;l<e?i=o+1:a=o-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*i.duration()),n),s=t[u];s&&!s.loading&&(s.loading=!0,function(e){return x.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function N(e){return k.apply(this,arguments)}function k(){return(k=c(d.mark(function e(t){var n,r,i,o;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=v(r,2),a=i[0]*i[1],o=e.duration,l=0;l<a;l++){var u,s=Math.round((t*a+l)*o);n[s]=h(h({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},p(u,"left","-60px"),p(u,"border","1px solid transparent"),p(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",a.throttle(function(e){return A(e,n,r)},500)),null==(o=document.querySelector(".vjs-progress-control.vjs-control"))||o.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",a.throttle(function(e){return A(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var j=function(){var e=c(d.mark(function e(t,n){var r,i,a,o,l,u,s,c;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),o=[],l=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),n=v(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,o.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function T(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function C(e,t){return I.apply(this,arguments)}function I(){return(I=c(d.mark(function e(t,n){var r,i,l,u,s,c,p,m,f,g,h,y,x,w,E,A,N,k,j,C,I,L,B,S,M,R,q,D,$,X,V,_,F,U,W,G,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,oe,le,ue,se,ce,de,pe,ve,me;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return b=n,r=a.getPlayer(n),i=t.split("/"),l=i.findIndex(function(e){return"dash"===e.toLowerCase()}),u=T(-1!==l?i.slice(0,l+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return m=e.sent,e.next=11,m.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),y=(null==r?void 0:r.duration())||(null===(s=o.getCurrentVideo())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),x=(null==h||null===(p=h.querySelector("MPD > BaseURL"))||void 0===p?void 0:p.textContent)||u+"/",w=h.getElementsByTagName("AdaptationSet"),E=0;case 18:if(!(E<w.length)){e.next=72;break}if(("image"!==(A=w[E]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(k=A.getElementsByTagName("SegmentTemplate")[0],j=null===(N=k.getElementsByTagName("SegmentTimeline"))||void 0===N?void 0:N[0],!k||!j){e.next=48;break}if(L=j.getElementsByTagName("S"),B=parseInt(null===(C=L[0])||void 0===C?void 0:C.getAttribute("t")),S=parseInt(null===(I=L[0])||void 0===I?void 0:I.getAttribute("d")),M=A.getElementsByTagName("Representation")[0],R=M.getElementsByTagName("EssentialProperty")[0],q=R.getAttribute("value"),D=null==q?void 0:q.split("x"),$=v(D,2),X=$[0],V=$[1],!k){e.next=46;break}if(k.getAttribute("media"),_=k.getAttribute("timescale"),F=(_?S/_:S)/(X*V),U=M.getAttribute("id"),W=Math.round(y/F),G=Math.ceil(W/(X*V)),z=k.getAttribute("media"),parseInt(k.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],E=0;E<G;E++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:F,layout:q,uri:Y+Q.replace("$Time$",B+E*S).replace("$RepresentationID$",U)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=A.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=v(ee,2),ne=te[0],re=te[1],!k){e.next=69;break}if(k.getAttribute("media"),ie=k.getAttribute("duration"),ae=k.getAttribute("timescale"),oe=(ae?ie/ae:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(y/oe),se=Math.ceil(ue/(ne*re)),ce=k.getAttribute("media"),de=parseInt(k.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],ve=P(ce),E=0;E<se;E++)me=ve?O(ve,E+de):ce,pe.push({duration:oe,layout:Z,uri:x+me.replace("$Number$",E+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:E++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function P(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function O(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function L(){return(L=c(d.mark(function e(t){var n,r,i,o,l,u,s,c,p,v,m,f,g,h,b,y;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=a.getPlayer(t),s=u.currentSource(),c=s.src,c=null!==(n=c)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(i=r.player)||void 0===i?void 0:i.getSource():c,null===(o=c)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,w(c,t);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,j(f,m);case 12:return g=e.sent,e.next=15,N(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,C(c,t);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,N(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;m=[];var l=o.getCurrentSeries();null==l||l.map(function(e){var t;return(t=m).push.apply(t,i(e.episodes))}),null==t||null===(r=t.series)||void 0===r||r.cb}else{var u,s;m=(null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content)||[],null==t||null===(s=t.relatedVideos)||void 0===s||s.cb}var c=a.getPlayer(e);c.on("timeupdate",function(){var e,t,n=Math.floor(c.currentTime()),r=c.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&o.getVideoIdx()<=(null===(t=m)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")});var d,p=m.filter(function(e,t){return t==o.getVideoIdx()});if((null==p?void 0:p.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,g,h,b,y,x,w,E,A,N,k,j;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var T=null===(g=document.getElementsByClassName("next-ep-title"))||void 0===g?void 0:g[0],C=null===(h=document.getElementsByClassName("next-ep-img"))||void 0===h?void 0:h[0],I=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],P=null===(y=p[0])||void 0===y?void 0:y.title;(null===(x=P)||void 0===x?void 0:x.length)>60&&(P=P.substr(0,60)+"..."),T.textContent="".concat(P),C.src=(null===(w=p[0])||void 0===w||null===(E=w.gist)||void 0===E||null===(A=E.imageGist)||void 0===A?void 0:A.r16x9)||(null==p||null===(N=p[0])||void 0===N?void 0:N.img)||(null===(k=window)||void 0===k||null===(j=k.customData)||void 0===j?void 0:j.fallbackImage),I.onclick=function(){return f(e)}}else{var O,L,B,S,M,R,q,D,$=document.createElement("div");$.className="next-ep-preview",$.style.visibility="hidden",document.getElementById(e).append($);var X=document.createElement("div");X.className="next-ep-header",X.textContent="Next up";var V=null===(O=p[0])||void 0===O?void 0:O.title,_=document.createElement("img");_.className="next-ep-img",_.src=(null===(L=p[0])||void 0===L||null===(B=L.gist)||void 0===B||null===(S=B.imageGist)||void 0===S?void 0:S.r16x9)||(null==p||null===(M=p[0])||void 0===M?void 0:M.img)||(null===(R=window)||void 0===R||null===(q=R.customData)||void 0===q?void 0:q.fallbackImage);var F=document.createElement("div");F.className="next-ep-title",(null===(D=V)||void 0===D?void 0:D.length)>60&&(V=V.substr(0,60)+"..."),F.textContent="".concat(V);var U=document.createElement("div");U.className="next-ep-content",U.append(_),U.append(F),U.onclick=function(){return f(e)},$.append(X),$.append(U)}},exports.addTVProviderImage=function(e,t){var n=a.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(r),o.alt="Provider Image",i.append(o),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}},exports.initiateTrickplay=function(e){return L.apply(this,arguments)};
1
+ "use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),a=require("./skin-f87e1c22.js"),o=require("./generic-98b587ca.js"),l=require("./autoNextVideo-232138a2.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=require("@babel/runtime/helpers/asyncToGenerator"),d=require("@babel/runtime/regenerator"),p=require("@babel/runtime/helpers/defineProperty"),v=require("@babel/runtime/helpers/slicedToArray"),m=[],f=function(e,t){var n=a.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=o.getVideoIdx();l.switchToNext(i,e,m)}};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===u(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",function(i){var a,o,l,u,s,c,d,p,v,m;if(u=t({},e,i),c=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=c.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",s=document.createElement("img"),l.appendChild(s),s.src=u[0].src,s.className="vjs-thumbnail",t(s.style,u[0].style),s.style.left||s.style.right||(s.onload=function(){s.style.left=-s.naturalWidth/2+"px"}),p=c.duration(),c.on("durationchange",function(e){p=c.duration()}),c.on("loadedmetadata",function(e){p=c.duration()}),(d=c.controlBar.progressControl).el().appendChild(l),v=function(e){var i,a,o,c,v,m,f,g,h,b;for(a in o=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((b=r(d.el()).getBoundingClientRect()).width||b.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),c=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c-=r(d.el()).getBoundingClientRect().left+h,i=Math.floor((c-d.el().offsetLeft)/d.width()*p),u)i>a&&(o=Math.max(o,a));(v=u[o]).src&&s.src!=v.src&&(s.src=v.src),v.style&&s.style!=v.style&&t(s.style,v.style),c+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(s,v.width||u[0].width)/2)>f?c-=c+g-f:c<g&&(c=g),l.style.left=c+"px"},null!==(a=window)&&void 0!==a&&null!==(o=a.customData)&&void 0!==o&&o.isSmartTV){var f=function(){var e,t,n=0,r=(null===(e=d.el_.children[0].children[2])||void 0===e?void 0:e.offsetWidth)||5;r<65?r=5:r>=c.el().offsetWidth-180?r=c.el().offsetWidth-240:r-=58;var i=c.currentTime();for(t in u)i>t&&(n=Math.max(n,t));var a=u[n];a.uri&&""!=a.uri&&s.src!=a.uri?(s.src=a.uri,l.style.left=r+"px",s.style.opacity="1"):(l.style.left="-1000px",s.style.opacity="0")},g=null;d.el_.children[0].onfocus=function(){f(),g=setInterval(function(){f()},250)},d.el_.children[0].addEventListener("blur",function(){try{l.style.left="-1000px",s.style.opacity="0",g&&(clearInterval(g),g=null)}catch(e){}})}else d.on("mousemove",v),d.on("touchmove",v);function h(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",h),m()}d.on("pointerdown",function(e){document.addEventListener("pointermove",v),document.addEventListener("pointerup",h)}),m=function(e){l.style.left="-1000px"},d.on("mouseout",m),d.on("touchcancel",m),d.on("touchend",m),c.on("userinactive",m)});var b="my-player";function y(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function x(){return(x=c(d.mark(function e(t){var n,r,i,a,o,l,u,s,c,p,m,f,g,h,b,y,x,w,E,A,N,k,j,T;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),o=v(a,2),l=o[0],u=o[1],s=i.width/u,c=i.height/l,p=[],m=0;m<l;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,m*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),p.push({uri:h,duration:t.duration}),t._tiles=p;return e.abrupt("return",p);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=v(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(T=j.images)||void 0===T?void 0:T.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function w(e,t){return E.apply(this,arguments)}function E(){return(E=c(d.mark(function e(t,n){var r,i;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return b=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",y(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function A(e,t,n){var r=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),i=a.getPlayer(b);if(r&&i){var o=r.getBoundingClientRect(),l=(e.clientX-o.left)/o.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var o=Math.floor((i+a)/2),l=t[o];if(l===e)return l;l<e?i=o+1:a=o-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*i.duration()),n),s=t[u];s&&!s.loading&&(s.loading=!0,function(e){return x.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function N(e){return k.apply(this,arguments)}function k(){return(k=c(d.mark(function e(t){var n,r,i,o;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=v(r,2),a=i[0]*i[1],o=e.duration,l=0;l<a;l++){var u,s=Math.round((t*a+l)*o);n[s]=h(h({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},p(u,"left","-60px"),p(u,"border","1px solid transparent"),p(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",a.throttle(function(e){return A(e,n,r)},500)),null==(o=document.querySelector(".vjs-progress-control.vjs-control"))||o.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",a.throttle(function(e){return A(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var j=function(){var e=c(d.mark(function e(t,n){var r,i,a,o,l,u,s,c;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),o=[],l=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),n=v(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,o.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function T(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function C(e,t){return I.apply(this,arguments)}function I(){return(I=c(d.mark(function e(t,n){var r,i,l,u,s,c,p,m,f,g,h,y,x,w,E,A,N,k,j,C,I,L,B,S,M,R,q,D,$,X,V,_,F,U,W,G,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,oe,le,ue,se,ce,de,pe,ve,me;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return b=n,r=a.getPlayer(n),i=t.split("/"),l=i.findIndex(function(e){return"dash"===e.toLowerCase()}),u=T(-1!==l?i.slice(0,l+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return m=e.sent,e.next=11,m.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),y=(null==r?void 0:r.duration())||(null===(s=o.getCurrentVideo())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),x=(null==h||null===(p=h.querySelector("MPD > BaseURL"))||void 0===p?void 0:p.textContent)||u+"/",w=h.getElementsByTagName("AdaptationSet"),E=0;case 18:if(!(E<w.length)){e.next=72;break}if(("image"!==(A=w[E]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(k=A.getElementsByTagName("SegmentTemplate")[0],j=null===(N=k.getElementsByTagName("SegmentTimeline"))||void 0===N?void 0:N[0],!k||!j){e.next=48;break}if(L=j.getElementsByTagName("S"),B=parseInt(null===(C=L[0])||void 0===C?void 0:C.getAttribute("t")),S=parseInt(null===(I=L[0])||void 0===I?void 0:I.getAttribute("d")),M=A.getElementsByTagName("Representation")[0],R=M.getElementsByTagName("EssentialProperty")[0],q=R.getAttribute("value"),D=null==q?void 0:q.split("x"),$=v(D,2),X=$[0],V=$[1],!k){e.next=46;break}if(k.getAttribute("media"),_=k.getAttribute("timescale"),F=(_?S/_:S)/(X*V),U=M.getAttribute("id"),W=Math.round(y/F),G=Math.ceil(W/(X*V)),z=k.getAttribute("media"),parseInt(k.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],E=0;E<G;E++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:F,layout:q,uri:Y+Q.replace("$Time$",B+E*S).replace("$RepresentationID$",U)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=A.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=v(ee,2),ne=te[0],re=te[1],!k){e.next=69;break}if(k.getAttribute("media"),ie=k.getAttribute("duration"),ae=k.getAttribute("timescale"),oe=(ae?ie/ae:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(y/oe),se=Math.ceil(ue/(ne*re)),ce=k.getAttribute("media"),de=parseInt(k.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],ve=P(ce),E=0;E<se;E++)me=ve?O(ve,E+de):ce,pe.push({duration:oe,layout:Z,uri:x+me.replace("$Number$",E+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:E++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function P(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function O(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function L(){return(L=c(d.mark(function e(t){var n,r,i,o,l,u,s,c,p,v,m,f,g,h,b,y;return d.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=a.getPlayer(t),s=u.currentSource(),c=s.src,c=null!==(n=c)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(i=r.player)||void 0===i?void 0:i.getSource():c,null===(o=c)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,w(c,t);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,j(f,m);case 12:return g=e.sent,e.next=15,N(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,C(c,t);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,N(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;m=[];var l=o.getCurrentSeries();null==l||l.map(function(e){var t;return(t=m).push.apply(t,i(e.episodes))}),null==t||null===(r=t.series)||void 0===r||r.cb}else{var u,s;m=(null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content)||[],null==t||null===(s=t.relatedVideos)||void 0===s||s.cb}var c=a.getPlayer(e);c.on("timeupdate",function(){var e,t,n=Math.floor(c.currentTime()),r=c.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&o.getVideoIdx()<=(null===(t=m)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")});var d,p=m.filter(function(e,t){return t==o.getVideoIdx()});if((null==p?void 0:p.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,g,h,b,y,x,w,E,A,N,k,j;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var T=null===(g=document.getElementsByClassName("next-ep-title"))||void 0===g?void 0:g[0],C=null===(h=document.getElementsByClassName("next-ep-img"))||void 0===h?void 0:h[0],I=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],P=null===(y=p[0])||void 0===y?void 0:y.title;(null===(x=P)||void 0===x?void 0:x.length)>60&&(P=P.substr(0,60)+"..."),T.textContent="".concat(P),C.src=(null===(w=p[0])||void 0===w||null===(E=w.gist)||void 0===E||null===(A=E.imageGist)||void 0===A?void 0:A.r16x9)||(null==p||null===(N=p[0])||void 0===N?void 0:N.img)||(null===(k=window)||void 0===k||null===(j=k.customData)||void 0===j?void 0:j.fallbackImage),I.onclick=function(){return f(e)}}else{var O,L,B,S,M,R,q,D,$=document.createElement("div");$.className="next-ep-preview",$.style.visibility="hidden",document.getElementById(e).append($);var X=document.createElement("div");X.className="next-ep-header",X.textContent="Next up";var V=null===(O=p[0])||void 0===O?void 0:O.title,_=document.createElement("img");_.className="next-ep-img",_.src=(null===(L=p[0])||void 0===L||null===(B=L.gist)||void 0===B||null===(S=B.imageGist)||void 0===S?void 0:S.r16x9)||(null==p||null===(M=p[0])||void 0===M?void 0:M.img)||(null===(R=window)||void 0===R||null===(q=R.customData)||void 0===q?void 0:q.fallbackImage);var F=document.createElement("div");F.className="next-ep-title",(null===(D=V)||void 0===D?void 0:D.length)>60&&(V=V.substr(0,60)+"..."),F.textContent="".concat(V);var U=document.createElement("div");U.className="next-ep-content",U.append(_),U.append(F),U.onclick=function(){return f(e)},$.append(X),$.append(U)}},exports.addTVProviderImage=function(e,t){var n=a.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(r),o.alt="Provider Image",i.append(o),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}},exports.initiateTrickplay=function(e){return L.apply(this,arguments)};
package/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";require("video.js/dist/video-js.min.css"),require("./generic-b7ac0749.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js");var e=require("./index-eec746f5.js");require("./util-47af43d1.js"),require("./captions-afd38b2e.js"),require("./renditions-7fe52e97.js"),require("./resolution-5e1f1897.js"),require("./skin-f87e1c22.js"),require("./browser-38ff3331.js"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),module.exports=e.VLPlayerCore;
1
+ "use strict";require("video.js/dist/video-js.min.css"),require("./generic-98b587ca.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js");var e=require("./index-9f518b0d.js");require("./util-47af43d1.js"),require("./captions-2e9b778d.js"),require("./renditions-7fe52e97.js"),require("./resolution-5e1f1897.js"),require("./skin-f87e1c22.js"),require("./browser-38ff3331.js"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),module.exports=e.VLPlayerCore;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-0ea2e662.js"),i=require("./generic-b7ac0749.js"),l=require("./skin-f87e1c22.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-afd38b2e.js"),require("@babel/runtime/helpers/toConsumableArray");var d=s.getComponent("Component"),u=function(){r(v,d);var u,m,p=(u=v,m=c(),function(){var e,t=n(u);if(m){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(r=p.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(v,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-1efdbdb9.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=r.classList)&&void 0!==a&&a.contains("hidden")?(l.closeOpenDrawers(),r.classList.remove("hidden"),t.classList.add("open"),l.setUpdatedElHeight(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var a=document.getElementById(this.playerId);if(a){var n=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(n,"px"),a.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=s.dom.createEl("div",{className:"stream-selector-head"}),n=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,a,n,l=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(l.classList.add("selected"),l.style.border="2px solid #D2393B"),l.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");l.classList.add("selected"),l.style.border="2px solid #D2393B",i.load(t.playerId,t.streams[e].id).then(function(e){i.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},l.style.backgroundImage="url(".concat(t.streams[e].img,")");var c=document.createElement("img");c.className="stream-thumbnail-image",c.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(a=window)||void 0===a||null===(n=a.customData)||void 0===n?void 0:n.fallbackImage)),l.append(c),s.dom.appendContent(u,l),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(a,n),s.dom.appendContent(a,c),s.dom.appendContent(e,a),s.dom.appendContent(e,d),l.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=u;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-0ea2e662.js"),i=require("./generic-98b587ca.js"),l=require("./skin-f87e1c22.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-2e9b778d.js"),require("@babel/runtime/helpers/toConsumableArray");var d=s.getComponent("Component"),u=function(){r(v,d);var u,m,p=(u=v,m=c(),function(){var e,t=n(u);if(m){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(r=p.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(v,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-1efdbdb9.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=r.classList)&&void 0!==a&&a.contains("hidden")?(l.closeOpenDrawers(),r.classList.remove("hidden"),t.classList.add("open"),l.setUpdatedElHeight(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var a=document.getElementById(this.playerId);if(a){var n=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(n,"px"),a.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=s.dom.createEl("div",{className:"stream-selector-head"}),n=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,a,n,l=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(l.classList.add("selected"),l.style.border="2px solid #D2393B"),l.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");l.classList.add("selected"),l.style.border="2px solid #D2393B",i.load(t.playerId,t.streams[e].id).then(function(e){i.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},l.style.backgroundImage="url(".concat(t.streams[e].img,")");var c=document.createElement("img");c.className="stream-thumbnail-image",c.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(a=window)||void 0===a||null===(n=a.customData)||void 0===n?void 0:n.fallbackImage)),l.append(c),s.dom.appendContent(u,l),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(a,n),s.dom.appendContent(a,c),s.dom.appendContent(e,a),s.dom.appendContent(e,d),l.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=u;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-0ea2e662.js"),l=require("./generic-b7ac0749.js"),i=require("./skin-f87e1c22.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-afd38b2e.js"),require("@babel/runtime/helpers/toConsumableArray");var d=s.getComponent("Component"),u=function(){r(h,d);var u,m,p=(u=h,m=c(),function(){var e,t=a(u);if(m){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return n(this,e)});function h(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=p.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(h,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-7a86b517.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(i.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var n=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",l.load(t.playerId,t.streams[e].id).then(function(e){l.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",n.append(a),s.dom.appendContent(u,n),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(n,a),s.dom.appendContent(n,c),s.dom.appendContent(e,n),s.dom.appendContent(e,d),i.getPlayer(this.playerId).on("fullscreenchange",function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")})}}]),h}();exports.default=u;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-0ea2e662.js"),l=require("./generic-98b587ca.js"),i=require("./skin-f87e1c22.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-2e9b778d.js"),require("@babel/runtime/helpers/toConsumableArray");var d=s.getComponent("Component"),u=function(){r(h,d);var u,m,p=(u=h,m=c(),function(){var e,t=a(u);if(m){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return n(this,e)});function h(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=p.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(h,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-7a86b517.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(i.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var n=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",l.load(t.playerId,t.streams[e].id).then(function(e){l.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",n.append(a),s.dom.appendContent(u,n),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(n,a),s.dom.appendContent(n,c),s.dom.appendContent(e,n),s.dom.appendContent(e,d),i.getPlayer(this.playerId).on("fullscreenchange",function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")})}}]),h}();exports.default=u;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-0ea2e662.js"),s=require("./generic-b7ac0749.js"),a=require("./skin-f87e1c22.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-afd38b2e.js"),require("@babel/runtime/helpers/toConsumableArray");var u=o.getComponent("Component"),c=function(){t(p,u);var s,a,c=(s=p,a=d(),function(){var e,n=i(s);if(a){var t=i(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return r(this,e)});function p(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(t=c.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(p,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./nextEpisodeButton-b6e6586f.js")}).then(function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)})}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,l),o.dom.appendContent(n,t),o.dom.appendContent(n,r),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),n.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")}),n.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")})}}]),p}(),p=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach(function(e,r){e.gist.id===n&&(t=r)}),t):null},h=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then(function(e){s.setCurrentVideo(e.response)})};var r=o.dom.$(".next-eps-image"),i=a.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==r||r.append(l);for(var d=o.dom.$(".next-eps-description"),u=a.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=u&&u.firstChild;)null==d||d.appendChild(u.firstChild)};exports.default=c,exports.initaliseFunctionality=function(e,n){var t=p(e,n.video.gist.id),r=m(e[t],n.video.gist.id),i=v(e[t],r);h(i.nextEp)};
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-0ea2e662.js"),s=require("./generic-98b587ca.js"),a=require("./skin-f87e1c22.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-2e9b778d.js"),require("@babel/runtime/helpers/toConsumableArray");var u=o.getComponent("Component"),c=function(){t(p,u);var s,a,c=(s=p,a=d(),function(){var e,n=i(s);if(a){var t=i(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return r(this,e)});function p(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(t=c.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(p,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./nextEpisodeButton-b6e6586f.js")}).then(function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)})}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,l),o.dom.appendContent(n,t),o.dom.appendContent(n,r),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),n.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")}),n.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")})}}]),p}(),p=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach(function(e,r){e.gist.id===n&&(t=r)}),t):null},h=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then(function(e){s.setCurrentVideo(e.response)})};var r=o.dom.$(".next-eps-image"),i=a.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==r||r.append(l);for(var d=o.dom.$(".next-eps-description"),u=a.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=u&&u.firstChild;)null==d||d.appendChild(u.firstChild)};exports.default=c,exports.initaliseFunctionality=function(e,n){var t=p(e,n.video.gist.id),r=m(e[t],n.video.gist.id),i=v(e[t],r);h(i.nextEp)};
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-0ea2e662.js"),r=require("./generic-b7ac0749.js"),c=require("./autoNextVideo-1d9e1d67.js"),d=require("./skin-f87e1c22.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-afd38b2e.js"),require("./util-47af43d1.js");var p=o.getComponent("Component"),m=function(){l(h,p);var m,v,y=(m=h,v=u(),function(){var e,t=a(m);if(v){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function h(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(a=y.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&c.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./playlist-df87ca90.js")}).then(function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(s.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),u=o.dom.createEl("div",{className:"playlist-selector-content"}),p=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),s=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),d=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(s,c),o.dom.appendContent(s,d),o.dom.appendContent(a,s),o.dom.appendContent(u,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=o.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,v),o.dom.appendContent(p,m),o.dom.appendContent(a,p),o.dom.appendContent(u,a),p.onclick=function(e){e.stopPropagation(),r.setVideoIdx(t+1),r.load(n.playerId,n.videos[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})},s.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(i=s.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},m=0;m<this.videos.length;m++)p(m);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,u),d.getPlayer(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}})}}]),h}();exports.default=m;
1
+ "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-0ea2e662.js"),r=require("./generic-98b587ca.js"),c=require("./autoNextVideo-232138a2.js"),d=require("./skin-f87e1c22.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-2e9b778d.js"),require("./util-47af43d1.js");var p=o.getComponent("Component"),m=function(){l(h,p);var m,v,y=(m=h,v=u(),function(){var e,t=a(m);if(v){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function h(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(a=y.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&c.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./playlist-df87ca90.js")}).then(function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(s.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),u=o.dom.createEl("div",{className:"playlist-selector-content"}),p=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),s=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),d=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(s,c),o.dom.appendContent(s,d),o.dom.appendContent(a,s),o.dom.appendContent(u,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=o.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,v),o.dom.appendContent(p,m),o.dom.appendContent(a,p),o.dom.appendContent(u,a),p.onclick=function(e){e.stopPropagation(),r.setVideoIdx(t+1),r.load(n.playerId,n.videos[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})},s.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(i=s.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},m=0;m<this.videos.length;m++)p(m);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,u),d.getPlayer(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}})}}]),h}();exports.default=m;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-b7ac0749.js"),u=require("./icons-0ea2e662.js"),p=require("./skin-f87e1c22.js");require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-afd38b2e.js"),require("@babel/runtime/helpers/toConsumableArray");var v=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var f,m=c.getComponent("Component"),g=function(){n(d,m);var e,l,c=(e=d,l=h(),function(){var i,t=a(e);if(l){var s=a(this).constructor;i=Reflect.construct(t,arguments,s)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,n),o(s(t),"seriesData",[]),t.seriesData=n.seriesData,f=n.playerId,y(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-9c237975.js")}).then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}]),d}();function b(){return(b=e(l.mark(function e(i,t,s,n){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(f),v(f),d.load(f,t).then(function(e){d.setCurrentVideo(e.response),d.play(f)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function y(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var s=p.parseHtmlString(t);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}exports.customSeasonList=y,exports.handleSeasonChange=function(e,i,t,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map(function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")}).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=p.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),h=document.querySelector("#episodes-back-btn"),f=e.id,m=e.episodes;h.addEventListener("click",function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(n,r)});for(var g=function(i){c[i].addEventListener("click",function(){return function(e,i,t){var s=i.querySelector(".meta-details");i.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),t.forEach(function(i,s){s!==e&&(t[s].classList.remove("episode-active"),t[s].querySelector(".meta-details").classList.remove("metadetails-active"))})}(i,u[i],u)}),v[i].addEventListener("click",function(){return function(e,i,t,s){return b.apply(this,arguments)}(i,m[i].id,t,u)}),e.episodes[i].id==f&&u[i].classList.add("highlight-active-eps")},y=0;y<c.length;y++)g(y)},exports.seriesModule=g;
1
+ "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-98b587ca.js"),u=require("./icons-0ea2e662.js"),p=require("./skin-f87e1c22.js");require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-2e9b778d.js"),require("@babel/runtime/helpers/toConsumableArray");var v=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var f,m=c.getComponent("Component"),g=function(){n(d,m);var e,l,c=(e=d,l=h(),function(){var i,t=a(e);if(l){var s=a(this).constructor;i=Reflect.construct(t,arguments,s)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,n),o(s(t),"seriesData",[]),t.seriesData=n.seriesData,f=n.playerId,y(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-9c237975.js")}).then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}]),d}();function b(){return(b=e(l.mark(function e(i,t,s,n){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(f),v(f),d.load(f,t).then(function(e){d.setCurrentVideo(e.response),d.play(f)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function y(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var s=p.parseHtmlString(t);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}exports.customSeasonList=y,exports.handleSeasonChange=function(e,i,t,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map(function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")}).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=p.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),h=document.querySelector("#episodes-back-btn"),f=e.id,m=e.episodes;h.addEventListener("click",function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(n,r)});for(var g=function(i){c[i].addEventListener("click",function(){return function(e,i,t){var s=i.querySelector(".meta-details");i.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),t.forEach(function(i,s){s!==e&&(t[s].classList.remove("episode-active"),t[s].querySelector(".meta-details").classList.remove("metadetails-active"))})}(i,u[i],u)}),v[i].addEventListener("click",function(){return function(e,i,t,s){return b.apply(this,arguments)}(i,m[i].id,t,u)}),e.episodes[i].id==f&&u[i].classList.add("highlight-active-eps")},y=0;y<c.length;y++)g(y)},exports.seriesModule=g;