@viewlift/player-backup 2.0.258-backup → 2.0.259-backup

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/cjs/autoNextVideo-e42fc428.js +1 -0
  2. package/cjs/autoNextVideo-ff0d1de3.js +1 -0
  3. package/cjs/bundle.css +953 -953
  4. package/cjs/features-16937305.js +1 -0
  5. package/cjs/features-cd48b2b6.js +1 -0
  6. package/cjs/generic-29417780.js +1 -0
  7. package/cjs/generic-f04cb45e.js +1 -0
  8. package/cjs/index-10d97ab9.js +1 -0
  9. package/cjs/index-1736603c.js +1 -0
  10. package/cjs/index-5bdf1cfd.js +1 -0
  11. package/cjs/index-5c93e8c6.js +1 -0
  12. package/cjs/index-6593cb6f.js +1 -0
  13. package/cjs/index-6bc2d039.js +1 -0
  14. package/cjs/index.js +1 -1
  15. package/cjs/multicamv2-25acee8c.js +1 -0
  16. package/cjs/multicamv2-4d7833f1.js +1 -0
  17. package/cjs/multicamv2-825cb17d.js +1 -0
  18. package/cjs/multicamv2-ec232dbd.js +1 -0
  19. package/cjs/nextEpisodeButton-056dd4d9.js +1 -0
  20. package/cjs/nextEpisodeButton-ee1f4e87.js +1 -0
  21. package/cjs/playlist-4932e799.js +1 -0
  22. package/cjs/playlist-8b12d044.js +1 -0
  23. package/cjs/series-8bd07d22.js +1 -0
  24. package/cjs/series-c3a14f61.js +1 -0
  25. package/cjs/series-v2-1d193d93.js +1 -0
  26. package/cjs/series-v2-57b1c5b8.js +1 -0
  27. package/cjs/series-v2-7d183e67.js +1 -0
  28. package/cjs/series-v2-a532b003.js +1 -0
  29. package/cjs/skin-3481c5cb.js +1 -0
  30. package/cjs/skin-3ea04cef.js +1 -0
  31. package/cjs/skin-572a65a9.js +1 -0
  32. package/cjs/skin-585353b3.js +1 -0
  33. package/cjs/skin-77549792.js +1 -0
  34. package/cjs/skin-7afabe4c.js +1 -0
  35. package/cjs/skin-7f58ba4c.js +1 -0
  36. package/cjs/skin-80fd2d0c.js +1 -0
  37. package/cjs/skin-91814213.js +1 -0
  38. package/cjs/skin-969cc371.js +1 -0
  39. package/cjs/skin-999521e6.js +1 -0
  40. package/cjs/skin-add44dae.js +1 -0
  41. package/cjs/skin-c1af6004.js +1 -0
  42. package/cjs/skin-cfc775a4.js +1 -0
  43. package/cjs/skin-e54f3fd3.js +1 -0
  44. package/cjs/skin-ed83fbaa.js +1 -0
  45. package/cjs/skin-f0486679.js +1 -0
  46. package/cjs/util-7186e89f.js +1 -0
  47. package/cjs/videoSelector-239532a4.js +1 -0
  48. package/cjs/videoSelector-5f1cf380.js +1 -0
  49. package/cjs/videoSelector-642f00ed.js +1 -0
  50. package/cjs/videoSelector-810471f8.js +1 -0
  51. package/esm/autoNextVideo-3d6570ee.js +1 -0
  52. package/esm/autoNextVideo-7323cf5f.js +1 -0
  53. package/esm/bundle.css +953 -953
  54. package/esm/features-3fc61a30.js +1 -0
  55. package/esm/features-f634dd8c.js +1 -0
  56. package/esm/generic-7505da7f.js +1 -0
  57. package/esm/generic-79a719c8.js +1 -0
  58. package/esm/helpers/secondary-switching.d.ts +1 -1
  59. package/esm/index-02ed8ded.js +1 -0
  60. package/esm/index-04f28499.js +1 -0
  61. package/esm/index-0ce0e085.js +1 -0
  62. package/esm/index-0ffc31e8.js +1 -0
  63. package/esm/index-4a04166e.js +1 -0
  64. package/esm/index-aee2840d.js +1 -0
  65. package/esm/index.js +1 -1
  66. package/esm/multicamv2-2f2829fb.js +1 -0
  67. package/esm/multicamv2-b2a07ed1.js +1 -0
  68. package/esm/multicamv2-bed3a0bc.js +1 -0
  69. package/esm/multicamv2-d19801a7.js +1 -0
  70. package/esm/nextEpisodeButton-29cc11c2.js +1 -0
  71. package/esm/nextEpisodeButton-38661562.js +1 -0
  72. package/esm/playlist-2b356158.js +1 -0
  73. package/esm/playlist-c13c7244.js +1 -0
  74. package/esm/series-97434a7c.js +1 -0
  75. package/esm/series-dee1a2af.js +1 -0
  76. package/esm/series-v2-04e9add7.js +1 -0
  77. package/esm/series-v2-a1083c40.js +1 -0
  78. package/esm/series-v2-b13de828.js +1 -0
  79. package/esm/series-v2-f7307228.js +1 -0
  80. package/esm/skin-2a1e18f9.js +1 -0
  81. package/esm/skin-30567c73.js +1 -0
  82. package/esm/skin-3ae22d7d.js +1 -0
  83. package/esm/skin-482bc56f.js +1 -0
  84. package/esm/skin-55857acc.js +1 -0
  85. package/esm/skin-61229ce9.js +1 -0
  86. package/esm/skin-6cf385ed.js +1 -0
  87. package/esm/skin-8ceddbe1.js +1 -0
  88. package/esm/skin-8db4ed62.js +1 -0
  89. package/esm/skin-a2b5e469.js +1 -0
  90. package/esm/skin-a2bc9871.js +1 -0
  91. package/esm/skin-aeae977d.js +1 -0
  92. package/esm/skin-b3357b0d.js +1 -0
  93. package/esm/skin-b83f4022.js +1 -0
  94. package/esm/skin-d656e076.js +1 -0
  95. package/esm/skin-f21ef5ec.js +1 -0
  96. package/esm/skin-fdb749ad.js +1 -0
  97. package/esm/util-a420b997.js +1 -0
  98. package/esm/utilities/managers.d.ts +4 -0
  99. package/esm/videoSelector-0bea276f.js +1 -0
  100. package/esm/videoSelector-3ebdf49e.js +1 -0
  101. package/esm/videoSelector-40c30c18.js +1 -0
  102. package/esm/videoSelector-47ad19c9.js +1 -0
  103. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ import"video.js/dist/video-js.min.css";import{d as e,c as n,g as t,a as o,b as i,s as l,e as r,f as a,h as s,i as u,l as d,j as c,k as v,m as p,n as f,o as m,p as g,q as h,r as y,t as b,u as w,v as k,w as S,x as I,y as E,z as O,A as D,B as T,C as j,D as C,E as P,F as x,G as A,H as R,I as N,J as M,K as L,L as _,M as B,N as V,O as U,P as H,Q as F,R as G}from"./generic-7505da7f.js";import q from"@babel/runtime/helpers/defineProperty";import K from"@babel/runtime/helpers/asyncToGenerator";import J from"@babel/runtime/regenerator";import W from"video.js";import{o as Y,g as z,a as X,s as Q,b as $,p as Z,c as ee}from"./util-a420b997.js";import{g as ne,d as te,a as oe,e as ie}from"./captions-78bd2908.js";import{g as le,p as re}from"./resolution-62be852a.js";import{i as ae,a as se}from"./skin-65765793.js";import{g as ue}from"./player_instance-34118a5b.js";import{g as de,s as ce}from"./localisation-0bf399a1.js";import{g as ve,a as pe,b as fe,s as me,v as ge,c as he,d as ye,e as be,f as we}from"./currentVideoInfo-0b234e55.js";import ke from"@babel/runtime/helpers/typeof";import{s as Se,w as Ie}from"./icons-37daa6b3.js";import{c as Ee,p as Oe,a as De,h as Te,r as je,g as Ce,b as Pe,d as xe,s as Ae,e as Re,f as Ne}from"./helper-d52dff3c.js";import Me from"@babel/runtime/helpers/toConsumableArray";import Le from"@babel/runtime/helpers/slicedToArray";import{createSSETransport as _e}from"@viewlift/sse";var Be=function(e){return new Promise(function(n,t){if(Ve(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},Ve=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},Ue=function(e,n,t){var o=ue(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},He=function(e){var n=ue(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Fe=function(){var n=K(J.mark(function n(t){var o,i,l,r,a;return J.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l=ue(null==t?void 0:t.playerId),null!=t&&null!==(o=t.series)&&void 0!==o&&o.enable||!(null!=t&&t.chromecastReceiverId||null!=t&&t.airplay)){n.next=10;break}return n.prev=2,n.next=5,Be("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(2),console.log("Error",n.t0);case 10:if(null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable||null==t||!t.chromecastReceiverId){n.next=21;break}return n.next=13,import("@silvermine/videojs-chromecast");case 13:n.sent.default(W),(a=W.getTech("chromecast"))&&!a.prototype.seeking&&(a.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=t&&t.airplay&&"Safari"==e()?null==l||l.airPlay({addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return n.stop()}},n,null,[[2,7]])}));return function(e){return n.apply(this,arguments)}}(),Ge=function(e,n){var t=ue(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,i,l,r,a=this.el(),s=W.dom.getPointerPosition(a,n).x;W.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(u),u&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,c.seek()}})};var qe=function(){var e=K(J.mark(function e(){return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),Be("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)}}(),Ke=function(){var e=K(J.mark(function e(){return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("@viewlift/comscore/index.js").then(function(e){n.set(e)});case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Je=function(){var e=K(J.mark(function e(){return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){W.getPlugin("eme")||W.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),We=function(){var e=K(J.mark(function e(){var n;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(W),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),Ye=function(){var e=K(J.mark(function e(){return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),ze=function(){var e=K(J.mark(function e(){return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-1a1bf509.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)}}(),Xe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){Be("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(W)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(W)})},loadAdsLibrary:qe,loadEMELibrary:Je,loadMuxPlugin:We,loadDvrSeekbar:Ye,loadContribDash:ze,loadComscorePlugin:Ke});function Qe(e){return $e.apply(this,arguments)}function $e(){return($e=K(J.mark(function n(t){var o,i,l;return J.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o=(null==t?void 0:t.airplay)||!1,n.next=3,qe();case 3:o&&"Safari"==e()?Promise.resolve().then(function(){return Xe}).then(function(e){e.importAirplay()}):(l=(null===(i=document)||void 0===i?void 0:i.getElementById(null==t?void 0:t.playerId))||null)&&l.setAttribute("x-webkit-airplay","deny");case 4:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ze(e){return en.apply(this,arguments)}function en(){return(en=K(J.mark(function e(n){var t,o,i,l,r,a,s,u;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=ue(n.playerId),e.next=3,Ke();case 3:u.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(i=n.comscore)||void 0===i?void 0:i.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.implementationId,projectId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=K(J.mark(function n(t,o){var i,l,r,a,s,u,d,c,v,p,f,m,g,h;return J.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return v=(null==o?void 0:o.contentType)||"video",p=null==o||null===(i=o[v])||void 0===i?void 0:i.drmEnabled,null==o||null===(l=o[v])||void 0===l||null===(r=l.liveDetails)||void 0===r||r.isDvrEnabled,null==t||t.showPositiveSeekbar,f=(null==o||null===(a=o[v])||void 0===a||null===(s=a.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.dash)||null,m=(null==t||null===(d=t.comscore)||void 0===d?void 0:d.enable)||!1,g=!(null==t||null===(c=t.analytics)||void 0===c||!c.muxKey),n.prev=7,n.next=10,Promise.allSettled([p?"Safari"==e()?Je():"caliente"!=(null===(h=window)||void 0===h?void 0:h.siteName)?ze():Je():"Safari"!=e()&&f?ze():null,m?Ze(t):null,g?We():null,Fe(t)]);case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(7),console.log("Error",n.t0);case 15:case"end":return n.stop()}},n,null,[[7,12]])}))).apply(this,arguments)}function on(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ln(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?on(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):on(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var rn=new Set,an=null,sn=function(e,n,o,i){var l,r,a,s,u,d,c,v={},p=(null==e?void 0:e.contentType)||"video";v["c3.cm.id"]=(null===(l=e[p])||void 0===l?void 0:l.id)||"Null",v["c3.cm.contentType"]=mn(e),v[null==o||null===(r=o.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==e||!e.linearchannel),v[null==o||null===(a=o.Constants)||void 0===a?void 0:a.STREAM_URL]=n.currentSrc(),v[null==o||null===(s=o.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===t()?"NULL":t(),v["c3.cm.categoryType"]=vn(e),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=e[p])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(d=e[p])&&void 0!==d&&null!==(c=d.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",v[o.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=pn(e),v["c3.cm.genreList"]=dn(e),v["c3.cm.genre"]=un(e),v["c3.cm.channel"]=cn(e,i);var f=yn(ve(),e);return v=ln(ln({},v),f)},un=function(e){var n,t,o,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},dn=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"},cn=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(o=((null==e||null===(t=e[i])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===o?void 0:o.title)||"NULL"},vn=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},pn=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},fn=function(e,n){var t,o,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(r)},mn=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var gn,hn,yn=function(e,n){var t,l,r,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var d=i(),c=o();return u["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(l=t.series)||void 0===l?void 0:l.title)||"Null",u["c3.cm.seasonNumber"]=(null==d?void 0:d.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(r=e[d-1])||void 0===r||null===(a=r.episodes)||void 0===a||null===(s=a[c-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},bn=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"}},wn=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},kn=function(){var e=K(J.mark(function e(n,t){var o,i,l,r,a,s,u,d,c,v,p,f;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,r=o.tveProvider,a=o.enable,s=o.appName,d=(u=t||{}).token,c=u.epg,a){e.next=4;break}return e.abrupt("return");case 4:if(v=ue(n),"function"==typeof(p=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,p("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:v.ready(function(){var e=v.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=bn(t.keySystem);p("contentInfo",{DRMEnabled:o})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),v.on("loadstart",function(){var e,n;an&&an!==v.currentSrc()&&p("playbackEnded"),p("setPlayer",v),rn.clear(),an=v.currentSrc();var o=wn(v.currentType()),i=pe(),a=sn(i,v,f,c);a[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",a[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=fn(i,t),a.authToken=d||"NULL",a.streamType=o,a.D2CType=l||"NONE",a.subscriberType=r?"MVPD":"FREE"!==l?"D2C":"FREE",a["c3.cm.affiliate"]=r||"NULL",Sn.setData(a),p("contentInfo",a)}),v.on("loadedmetadata",function(){var e,n=v.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),v.on("play",function(){rn.has(v.currentSrc())||(rn.add(v.currentSrc()),p("playbackStarted",null))}),v.on("ended",function(){rn.has(v.currentSrc())&&rn.delete(v.currentSrc()),p("playbackEnded")}),v.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:v,adsLoader:null==e?void 0:e.adsLoader})}),v.on("dispose",function(){null==rn||rn.clear(),p("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Sn=(gn={},{setData:function(e){gn=ln(ln({},gn),e)},getData:function(){return gn}}),In=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-f21ef5ec.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-61229ce9.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-aeae977d.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-a2b5e469.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-b3357b0d.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-482bc56f.js").then(function(t){t.initialiseSkin(e,n)}):"news"==t?import("./skin-d656e076.js").then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?import("./skin-8db4ed62.js").then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&import("./skin-6cf385ed.js").then(function(t){t.initialiseSkin(e,n)})};function En(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function On(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?En(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):En(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Dn=[],Tn=0,jn=null;function Cn(){console.log("Cleaning up watch history data"),hn=null,Dn=[],Tn=0,jn=null}function Pn(e,n,t){var o,i,r,a,s,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.profileId,c=Math.floor(e.currentTime()),v=Math.floor(e.duration());null==n||null===(r=n.watchHistory)||void 0===r||r.xapiKey;var p=(null==n||null===(a=n.video)||void 0===a?void 0:a.originalObjectId)||null,f=(null==n||null===(s=n.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,m=Math.floor(e.currentTime()),g=u?100:Math.floor(c/v*100),h={};f?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=xn(o),l=(new Date).getTime(),r=pe(),a=(null==r?void 0:r.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return On(On({},e),{},q({},n,a[n]))},{}),u=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===hn});u<0?i.push(On(On({content:s},e),{},{addedDate:l,updateDate:l})):i[u]=On(On(On({},i[u]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(h={completed:u,watchedTime:m,watchedPercentage:g},d,n.siteOwner):(h=On(On({videoId:hn,watchedTime:m,watchedPercentage:g,doneWatching:u,profileId:d},jn&&{seriesId:jn}),p&&{originalObjectId:p}),l(h).then(function(e){}).catch(function(e){})),Tn=c+t}function xn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function An(e,n,t){var o=xn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}function Rn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Nn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Rn(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Rn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Mn,Ln=(Mn={},{setConfig:function(e){Mn=Nn(Nn({},Mn),e)},getConfig:function(){return Mn}}),_n=!1,Bn=function(){var e=K(J.mark(function e(n,t){var o,i,l,s,u,c,v,p,f,m;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=(null==n?void 0:n.contentType)||"video",!((null==n||null===(o=n[l])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)||_n){e.next=19;break}if(c=Ln.getConfig(),v=(null==c||null===(s=c.customData)||void 0===s?void 0:s.ads)||{},p=(null==n||null===(u=n[l])||void 0===u?void 0:u.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==v?void 0:v.vodAdSticherProvider)||!1,f=Un(n,"videoAssets","secondaryVideoAssets"),m=r(f,t),!p){e.next=12;break}return e.next=11,a(t,f);case 11:m=e.sent;case 12:return m&&d(t,m),_n=!0,console.log("switching to secondary source"),Vn(t,f,c),e.abrupt("return",!0);case 19:return console.log("secondary source is either corrupted / not available"),e.abrupt("return",!1);case 21:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}();function Vn(e,n,t){var o,i,l,r,a=(null==t||null===(o=t.customData)||void 0===o?void 0:o.ads)||{},d=(null==n?void 0:n.contentType)||"video",c=(null==n||null===(i=n[d])||void 0===i?void 0:i.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==a?void 0:a.vodAdSticherProvider)||!1,v=(null==n||null===(l=n[d])||void 0===l||null===(r=l.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;if("MEDIA_TAILOR"==(null==a?void 0:a.vodAdSticherProvider)&&null!=a&&a.vodAdClientSideTracking&&c)if(v)s(e);else{var p,f=null;if(null!=t&&null!==(p=t.series)&&void 0!==p&&p.enable){var m,g,h,y,b,w=null===(m=pe())||void 0===m||null===(g=m.video)||void 0===g||null===(h=g.gist)||void 0===h?void 0:h.id,k=fe(),S=(null==k?void 0:k.get(w))||{t:0,p:0},I=S.t,E=S.p;"function"==typeof(null===(y=window)||void 0===y||null===(b=y.watchHistory)||void 0===b?void 0:b.cb)&&window.watchHistory.cb({watchedTime:I}),E<95&&(f=I)}else{var O=options,D=O.watchHistoryResumeTime;O.watchedPercentage<95&&(f=D)}u(e,f)}}function Un(e,n,t){if(Array.isArray(e))return e.map(function(e){return Un(e,n,t)});if(null!==e&&"object"===ke(e)){var o={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=Un(e[i],n,t)}),o}return e}function Hn(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 Fn(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)?Fn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Fn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function Gn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function qn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gn(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Kn=function(n,t,o,i){var l,r,a,s,u,d=i.res,f=i.sres,m=ue(n),g=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(l=d[g])||void 0===l?void 0:l.drmEnabled)||!1,y=(null==d||null===(r=d[g])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,b=(null==d||null===(s=d[g])||void 0===s||null===(u=s.liveDetails)||void 0===u?void 0:u.isDvrEnabled)||!1;me(d),ge.set(d),m&&(m.on("loadstart",function(){y?o.resolve({status:!0,msg:"Video Loaded",response:d}):o.resolve(qn({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:d}:{response:d}))}),m.on("loadeddata",function(){var o,i,l,r=ne(n);if(null==r||r.map(function(e){return te(n,e.id)}),b&&"Safari"===e())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&Ue(n,sessionStorage.getItem("volume")||"100");var s=pe();if(c(t),v(),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.saveOffline)){var u,p,f=qn(qn({},t),d);!function(e,n,t){var o,i,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(jn=null==n||null===(i=n.series)||void 0===i?void 0:i.id),Dn=[],Tn=0,hn=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=ue(e);a&&(a.on("dispose",Cn),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Dn.includes(Tn)||(e!=Tn||e<r?e>Tn&&(Tn=e+r):(Dn.push(e),Pn(a,n,r)))}}),a.one("ended",function(){Pn(a,n,r,!0)}))}(n,f,null==s||null===(u=s.video)||void 0===u||null===(p=u.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=m&&m.mux){var g,h,y,w,k,S,I=(null===(g=pe())||void 0===g?void 0:g.video)||(null==d?void 0:d.video),E=null==I?void 0:I.gist,O={env_key:null==t||null===(h=t.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(y=window)||void 0===y?void 0:y.vl_player_version,video_id:null==E?void 0:E.id,video_title:null==E?void 0:E.title,video_series:null==I||null===(w=I.series)||void 0===w?void 0:w.title,video_stream_type:null!=I&&null!==(k=I.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==t||null===(S=t.analytics)||void 0===S?void 0:S.userId};m.mux({debug:!1,data:O})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,o,i,l,r,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,f=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"===p){var m,g=f.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){y&&Bn(d,n)}),m.on("error",function(){var e,t;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&y)?Bn(d,n):(p(n,(null==m||null===(e=m.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured",response:d}))}),m.one("play",function(){var e,n,o,i,l;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(o=n.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 r,a,s,u=null===(r=pe())||void 0===r||null===(a=r.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.id,d=fe(),c=(null==d?void 0:d.get(u))||{t:0,p:0},v=c.t,p=c.p;v&&p<95&&setTimeout(function(){m.currentTime(v)},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(y){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var n,t=(null==m||null===(n=m.audioTracks())||void 0===n?void 0:n.tracks_)||null;if(t)if(t.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==ke(m.dash)){var o,i,l,r=null==m||null===(o=m.dash)||void 0===o||null===(i=o.mediaPlayer)||void 0===i?void 0:i.getTracksFor("audio"),a=null==r?void 0:r.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),s=Hn(t);try{for(s.s();!(l=s.n()).done;){var u=l.value;if(a&&(null==u?void 0:u.id)=="dash-audio-".concat(a.index)){u.enabled=!0;break}}}catch(e){s.e(e)}finally{s.f()}}else{var d,c=Hn(t);try{for(c.s();!(d=c.n()).done;){var v,p,f,g=d.value;if(("Chrome"==e()||"Edge"==e()&&(null!==(v=navigator)&&void 0!==v&&null!==(p=v.userAgent)&&void 0!==p&&p.includes("Macintosh")||!h))&&null!=g&&null!==(f=g.label)&&void 0!==f&&f.includes("5.1"))m.audioTracks().removeTrack(g);else{if("main"==g.kind){g.enabled=!0;break}g.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};function Jn(e){var n=ue(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var i=t.start(0),l=t.end(t.length-1)-i;Yn(),zn(l).forEach(function(e){var n=e.id,t=e.title,i=e.time,r=Wn(n,t,Math.min(i/l*100,99.5));o.appendChild(r)})}}function Wn(e,n,t){var o=document.createElement("div");return o.className="vjs-seekbar-program-marker",o.id=e,o.style.title=n,o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="4px",o.style.backgroundColor="#000000",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",o}function Yn(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach(function(e){e.remove()})}function zn(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return(he()||[]).filter(function(e){var o=new Date(e.formatted_startdate).getTime();return o>=t&&o<=n}).map(function(e){var n=new Date(e.formatted_startdate).getTime()-t;return{title:e.title,time:n/1e3,id:e.programme_id}})}function Xn(e,n){var t=ue(e);if(t){var o=n.dvrConfig,i=void 0===o?{}:o,l=n.videoId;n.epg;var r=i.playLive,a=i.playFromBegining,s=i.programs;ye(s),t.on("loadeddata",function(){Ee(n)?a?Oe(t,n):r?De(t,l):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,i=n.videoId,l=n.epg,r=o.buttonConfig,a=void 0===r?{}:r,s=a.watchLive;a.resume;var u=a.startFromBegining,d=i;if(l&&null!=l&&l.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));d="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!Ce(d),p=document.querySelector(".vjs-dvr-btn-overlay");p||((p=document.createElement("div")).className="vjs-dvr-btn-overlay");var f=Pe(n);f&&(p.style.backgroundImage="url(".concat(f,")"),p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="cover");p.innerHTML=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,i=t.resume,l=t.startFromBegining,r=n?(null==i?void 0:i.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(Ie()," ").concat(r,"</button>"),s='<button id="watch-begining-btn">'.concat(Se()," ").concat((null==l?void 0:l.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(s,"</div>")}(o,v),p.style.display="flex",e.el().appendChild(p),xe(e),Qn("watch-live-resume-btn",s,function(){Ne(e,p),De(e,d)}),Qn("watch-begining-btn",u,function(){Ne(e,p),Oe(e,n)})}(t,n),Te({player:t,showWatchLive:!0,showStartOver:!0})):je(t)}),t.one("loadedmetadata",function(){sessionStorage.setItem("program_switched",!0),function(e,n){var t=n.videoId,o=e.currentTime(),i=!1,l=e.seekable(),r=l.start(0),a=l.end(l.length-1)-r,s=JSON.parse(sessionStorage.getItem("epgConfig")),u=t,d=!0;if(s&&null!=s&&s.enable){var c;d=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==s?void 0:s.programId),u=null==s?void 0:s.programId}e.on("seeking",function(){i=!0}),e.on("seeked",function(){i=!1,o=e.currentTime();var t=JSON.parse(sessionStorage.getItem("epgConfig"));if(t&&null!=t&&t.enable){if(!d||sessionStorage.getItem("program_switched"))return;u="".concat(null==t?void 0:t.programId,"-").concat(null==t?void 0:t.channelId)}Ae(u,o),Re(e,n),Te({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})}),e.on("timeupdate",function(){if(!i){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!d||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");u="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var t=e.currentTime();Math.abs(t-o)>=20&&(Ae(u,t),o=t,function(e,n){zn(n).forEach(function(t){var o=t.id,i=t.title,l=t.time,r=document.getElementById(o);if(r){var a=Math.min(l/n*100,99.5);r.style.left="".concat(a,"%")}else{var s=e.controlBar.progressControl.seekBar.el(),u=Wn(o,i,Math.min(l/n*100,99.5));s.appendChild(u)}})}(e,a))}})}(t,n)})}else console.warn("Player instance is required to initialize start over.")}function Qn(e,n,t){var o,i,l=document.getElementById(e);l&&(i=n,(o=l)&&(o.style.color="".concat((null==i?void 0:i.textColor)||"#000"),o.style.backgroundColor="".concat((null==i?void 0:i.backGroundColor)||"#DCF95B")),l.addEventListener("click",t))}function $n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Zn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$n(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var et=function(n,t,o,i){var l,s,u,c,v,y,b,w,k,S,I,E,O,D,T,j,C,P,x,A,R,N,M,L,_,B,V,U,H,F,G,Y,z,X,Q,$,Z,ee=t.res,ne=void 0===ee?null:ee,te=t.sres,ie=void 0===te?null:te,le=null!=o&&o.chromecastReceiverId?["chromecast","html5"]:["html5"],re=(null===(l=ne)||void 0===l?void 0:l.contentType)||"video",se=ae(null===(s=ne)||void 0===s||null===(u=s[re])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl)||ae(null===(v=ne)||void 0===v||null===(y=v[re])||void 0===y||null===(b=y.gist)||void 0===b||null===(w=b.imageGist)||void 0===w?void 0:w.r16x9),de=(null===(k=ne)||void 0===k||null===(S=k[re])||void 0===S||null===(I=S.liveDetails)||void 0===I?void 0:I.isDvrEnabled)||!1,ce=(null===(E=ne)||void 0===E||null===(O=E[re])||void 0===O||null===(D=O.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!1,ve=(null===(T=ne)||void 0===T||null===(j=T.ads)||void 0===j||null===(C=j.preRoll)||void 0===C||null===(P=C.adTags)||void 0===P||null===(x=P.web)||void 0===x?void 0:x.active)&&(null===(A=ne)||void 0===A||null===(R=A.ads)||void 0===R||null===(N=R.preRoll)||void 0===N||null===(M=N.adTags)||void 0===M||null===(L=M.web)||void 0===L?void 0:L.url);ne=Zn(Zn({},ne),{},{audioAssetSource:null==o?void 0:o.audioAssetSource});var pe=(null==o||null===(_=o.customData)||void 0===_?void 0:_.ads)||{},fe=(null===(B=ne)||void 0===B||null===(V=B[re])||void 0===V?void 0:V.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==pe?void 0:pe.vodAdSticherProvider)||!1,me=(null==o?void 0:o.latency)||6,ge=(null==o?void 0:o.skin_settings)||{};null==o||o.dvrConfig;var he=($={enableSmoothSeeking:!0,controls:0!=(null==o?void 0:o.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==o?void 0:o.muted)||!1,autoplay:(null==o?void 0:o.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ge?void 0:ge.pictureInPictureToggle)||!1},playbackRates:null!=ge&&ge.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==o.skin,liveui:de},q($,"autoplay",null==o?void 0:o.autoplay),q($,"normalizeAutoplay",(null==o?void 0:o.autoplay)&&!ve),q($,"loop",(null==o?void 0:o.loop)||!1),q($,"audioPosterMode",null==o?void 0:o.audioPosterMode),q($,"html5",Zn(Zn({dash:Zn(Zn(Zn({},!W.browser.IS_SAFARI&&{useTTML:!0}),(null==o?void 0:o.debugConfig)&&(null==o||null===(U=o.debugConfig)||void 0===U?void 0:U.enable)&&{debug:!0,logLevel:null!=o&&null!==(H=o.debugConfig)&&void 0!==H&&H.logLevel?null==o||null===(F=o.debugConfig)||void 0===F?void 0:F.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:Zn(Zn({},(null==o?void 0:o.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==o?void 0:o.initialBandwidth)/1e3}}),{},{autoSwitchBitrate:{video:!0,audio:!0},additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}})}}}),vhs:Zn(Zn(Zn({},(null==o?void 0:o.initialBandwidth)&&{bandwidth:o.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==o?void 0:o.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==o||!o.initialBandwidth},(null==o||null===(G=o.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(Y=null==o?void 0:o.enableLowInitialPlaylist)&&void 0!==Y&&Y}),debug:(null==o?void 0:o.debugConfig)&&(null==o||null===(z=o.debugConfig)||void 0===z?void 0:z.enable)||!1,nativeTextTracks:"Safari"==e()},0==(null==o||null===(X=o.customData)||void 0===X?void 0:X.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==o||null===(Q=o.customData)||void 0===Q?void 0:Q.nativeVideoTracks)&&{nativeVideoTracks:!1})),q($,"poster",se),q($,"techOrder",le),q($,"chromecast",{requestCustomDataFn:function(e){var t,i,l=ue(n),r=((null==l?void 0:l.textTracksJson_)||l.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var o,i,l,r,a,s,u,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,h,y,b,w,k,S;f.isDrmEnabled=!0;var I=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,E=(null==I?void 0:I.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);f.licenseUrl=E;var O=(null==I?void 0:I.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"]);f.licenseToken=O}var D=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";f.contentType=D;var T=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=T;var j=null==e||null===(a=e[p])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;f.mediaTitle=j;var C=null==e||null===(u=e[p])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=C,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(ne,e,r);return Zn(Zn({},a),{},{convivaMetaData:Zn({customerKey:(null==o||null===(t=o.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==o||null===(i=o.convivaConfig)||void 0===i?void 0:i.debug)||!1},Sn.getData())})},modifyLoadRequestFn:function(e){var t,o,i,l,r,a=ue(n),s=(null==a?void 0:a.currentSource())||{};!(null===(t=ne)||void 0===t||null===(o=t[re])||void 0===o||null===(i=o.streamingInfo)||void 0===i||null===(l=i.videoAssets)||void 0===l?void 0:l.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(r=s.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!W.getPlayers()[n]){null!=o&&o.debugConfig&&null!=o&&null!==(Z=o.debugConfig)&&void 0!==Z&&Z.enable&&W.log.level("debug");var ye=W(n,he,function(){var e=K(J.mark(function e(){var t,l,s,u,c,v,y,b,w,k,S,I,E,O,D,T,j,C,P,x,A;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(ye),console.log(W.VERSION),console.log(W.getPlugins()),e.next=5,nn(o,ne);case 5:if(E=null===(t=ne)||void 0===t||null===(l=t[re])||void 0===l||null===(s=l.liveDetails)||void 0===s?void 0:s.startOverTime,ce&&i.resolve(Zn({status:!0,msg:"Player Initialised"},ie?{seriesResponse:ie,response:ne}:{response:ne})),de&&null!=o&&null!==(u=o.dvrConfig)&&void 0!==u&&u.enable&&Xn(n,Zn(Zn({},o),{},{isDvrEnabled:de})),m(n,null==o?void 0:o.analyticsCb,null==o?void 0:o.analyticsEventParams),kn(n,o),/Android/i.test(navigator.userAgent)&&(W.options.vhs.overrideNative=!0),de&&Ge(n,E),!ve||null!=o&&null!==(c=o.customData)&&void 0!==c&&c.disableAds||g(n,ve,ne),O=r(ne,n),console.log(O),null!=o&&o.nearestClusterUrl&&(O=h(O,o.nearestClusterUrl)),!fe){e.next=21;break}return e.next=20,a(n,ne);case 20:O=e.sent;case 21:O?d(n,O):(i.reject({status:!1,msg:"Incompatible / Missing Source",response:ne}),p(n,"Incompatible / Missing Source")),((null===(v=ne)||void 0===v||null===(y=v[re])||void 0===y||null===(b=y.contentDetails)||void 0===b||null===(w=b.closedCaptions)||void 0===w?void 0:w.length)>0||(null===(k=ne)||void 0===k||null===(S=k[re])||void 0===S||null===(I=S.closedCaptions)||void 0===I?void 0:I.length)>0)&&(A=(null===(T=ne)||void 0===T||null===(j=T[re])||void 0===j||null===(C=j.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null===(P=ne)||void 0===P||null===(x=P[re])||void 0===x?void 0:x.closedCaptions),D=A.filter(function(e){return"VTT"===e.format||"WEBVTT"===e.format}),oe(n,D)),null!=o&&o.disableControls?f(n):In(n,Zn(Zn(Zn({},o),he),{},{liveVideo:ce,isDvrEnabled:de,res:ne,sres:ie})),Kn(n,Zn(Zn(Zn({},o),he),{},{liveVideo:ce}),i,{res:ne,sres:ie});case 25:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}};function nt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function tt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nt(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var ot,it=function(e,n){var t=n.resolve,o=n.reject,i=null==e?void 0:e.playerId,l=lt(e);et(i,{res:l},e,{resolve:t,reject:o})},lt=function(e){var n,t,o,i,l,r,a,s,u,d,c,v,p,f=null==e?void 0:e.streamingInfo,m=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,g=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,h=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,b=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,w=(null==e||null===(r=e.streamingInfo)||void 0===r?void 0:r.subtitles)||[],k=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.drmProvider)||null,S=(null==e||null===(u=e.streamingInfo)||void 0===u?void 0:u.macroMap)||[],I=(null==e||null===(d=e.customData)||void 0===d||null===(c=d.ads)||void 0===c?void 0:c.isSSAIEnabled)||!1,E=null==e?void 0:e.token,O=y(E);null==O||O.site;var D=null==O?void 0:O.siteId,T=(null==e||null===(v=e.customData)||void 0===v||null===(p=v.comscore)||void 0===p?void 0:p.video)||null,j=tt(tt({id:"".concat(D,"_external")},!g&&{directPlaybackUrl:null==m?void 0:m.url}),{},{video:tt(tt(tt(tt(tt({drmEnabled:g,streamingInfo:tt(tt({videoAssets:tt(tt({},k&&{drmProvider:k}),{},{widevine:null==m?void 0:m.widevine,fairPlay:null==m?void 0:m.fairPlay,playReady:null==m?void 0:m.playReady})},(null==f?void 0:f.isDvrEnabled)&&{isLiveStream:!0}),(null==T?void 0:T.isLiveStream)&&{isLiveStream:null==T?void 0:T.isLiveStream})},I&&{isSSAIEnabled:I}),{},{metadata:S,liveDetails:{isDvrEnabled:null==f?void 0:f.isDvrEnabled},gist:tt(tt(tt({},b&&{videoImageUrl:b}),(null==T?void 0:T.videoId)&&{id:null==T?void 0:T.videoId}),(null==T?void 0:T.videoTitle)&&{title:null==T?void 0:T.videoTitle}),contentDetails:tt({},(null==w?void 0:w.length)>0&&{closedCaptions:Me(w)})},(null==T?void 0:T.runtime)&&{runtime:null==T?void 0:T.runtime}),(null==T?void 0:T.publishDate)&&{publishDate:null==T?void 0:T.publishDate}),(null==T?void 0:T.platform)&&{platform:null==T?void 0:T.platform}),(null==T?void 0:T.series)&&{series:null==T?void 0:T.series}),ads:{preRoll:{adTags:{web:tt(tt({},h&&{active:!0}),h&&{url:h})}}}});return T&&(null!=T&&T.isDvrEnabled&&(j.video.liveDetails=tt(tt({},j.video.liveDetails),{},{isDvrEnabled:null==T?void 0:T.isDvrEnabled})),null!=T&&T.metadata&&(j.video.metadata=[].concat(Me(j.video.metadata),Me(null==T?void 0:T.metadata)))),j},rt=null,at=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),o=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),i=o>0&&t>4?o:0,l=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),o=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(o-=1),o<0&&(t-=1),t}(new Date,new Date(n));return[l>0&&i>0?l:0,i,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},st=function(e){var n,t=Le(e,8),o=t[0],i=t[1],l=t[2],r=t[3],a=t[4],s=t[5],u=t[6],d=t[7];n=o>=1?" ".concat(o," Year"):i>=1?" ".concat(i," month"):l>=1?" ".concat(l," week"):r>=1?" ".concat(r," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(s," minutes ").concat(u," seconds"):s>0?"".concat(s," minutes ").concat(u," seconds"):"".concat(u," seconds"),d.textContent="".concat(n)},ut=(ot={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return ot},set:function(e){ot={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function dt(e,n,t,o){if(e){var i=function(){var e,i,r=null===(e=ut.get())||void 0===e?void 0:e.scheduleStartTimeMs,a=null===(i=ut.get())||void 0===i?void 0:i.scheduleEndTimeMs,s=Date.now();if(s-a>0){var u=document.getElementsByClassName("error-message")[0];return u&&(u.textContent=de("eventEnded")||"Game has ended",o.textContent=""),clearInterval(l),void(null==t||t())}var d=r-s;if(d/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var c=at(d,r);null==n||n([].concat(Me(c),[o]))};i();var l=setInterval(i,1e3);return l}}var ct=function(e,n,t){var o,i,l,r,a,s,u,d,c=null==n||null===(o=n.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.errorMessage)||(null==n?void 0:n.message)||null;ut.set({startDateTime:null==n||null===(a=n.response)||void 0===a||null===(s=a.data)||void 0===s?void 0:s.scheduleStartDate,endDateTime:null==n||null===(u=n.response)||void 0===u||null===(d=u.data)||void 0===d?void 0:d.scheduleEndDate}),function(e,n,t,o){var i,l,r=Date.now(),a=null===(i=ut.get())||void 0===i?void 0:i.scheduleStartTimeMs,s=null===(l=ut.get())||void 0===l?void 0:l.scheduleEndTimeMs,u=function(e,n,t,o){var i;e<0?i=de("eventNotStarted")||o||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(i=de("eventEnded")||o||"Game has ended");return i||o}(r-a,r-s,n,t);if(document.getElementsByClassName("error-container")[0]){var d=document.getElementsByClassName("error-message")[0];d&&(d.textContent="".concat(u));var c=document.getElementsByClassName("error-timer-message")[0];c&&dt(Math.abs(a),st,o,c)}else{var v=document.getElementById(e).parentElement;if(v){var p=document.createElement("div");p.className="error-container";var f=document.createElement("div");f.className="error-message";var m=document.createElement("div");m.className="error-timer-message",f.textContent="".concat(u),p.appendChild(f),p.appendChild(m),v.append(p),dt(Math.abs(a),st,o,m)}}}(e,c,v,t)};function vt(e,n){var t=n.scheduleEndDate,o=n.scheduleStartDate;ut.set({startDateTime:o,endDateTime:t}),rt&&clearInterval(rt),rt=setInterval(function(){var n,t=Date.now(),o=null===(n=ut.get())||void 0===n?void 0:n.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",o),o&&t>o){var i;console.log("Game ended");var l=ue(e);if(b(e)&&l){var r;l.dispose(),console.log("Player disposed");var a=null===(r=document.getElementsByClassName("vl-container"))||void 0===r?void 0:r[0],s=document.createElement("video");s.id=e,s.className="video-js",s.style.width="100%",s.style.height="100%",a&&a.appendChild(s)}var u=de("eventEnded")||"Game has ended",d=null===(i=document.getElementsByClassName("error-container"))||void 0===i?void 0:i[0];if(d){var c=d.querySelector(".error-message");c&&(c.textContent=u)}else{var v=document.getElementById(e),p=null==v?void 0:v.parentElement;if(p){(d=document.createElement("div")).className="error-container";var f=document.createElement("div");f.className="error-message",f.textContent=u,d.appendChild(f),p.append(d)}}clearInterval(rt)}},1e3)}function pt(e,n){return ft.apply(this,arguments)}function ft(){return ft=K(J.mark(function e(n,t){var o,i,l,r,a,s,u,d,c;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,a=null==n?void 0:n.videoId,s=null==n?void 0:n.playerId,u=!(null==n||!n.anonymousId),e.next=6,I();case 6:d=e.sent,c=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),w(a,d,c).then(function(e){var t,o,i,c,v,p,f,m,g,h;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,me(null==e?void 0:e.data);var y=null==e||null===(c=e.data)||void 0===c||null===(v=c.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.scheduleEndDate,b=null==e||null===(f=e.data)||void 0===f||null===(m=f.video)||void 0===m||null===(g=m.gist)||void 0===g?void 0:g.scheduleStartDate;vt(s,{scheduleEndDate:y,scheduleStartDate:b});var w,S=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(h=n.watchHistory)&&void 0!==h&&h.enable&&!u)if((null===(w=n.watchHistory)||void 0===w?void 0:w.saveOffline)||!1){var I,E,O,D=An((null===(I=n.watchHistory)||void 0===I?void 0:I.profileId)||"",a,null==n?void 0:n.siteOwner);if(D&&D.length)n.watchHistoryResumeTime=(null===(E=D[0])||void 0===E?void 0:E.watchedTime)||null,n.watchedPercentage=(null===(O=D[0])||void 0===O?void 0:O.watchedPercentage)||null;S.contentType="video",et(s,{res:S},n,{resolve:l,reject:r})}else k(a,d).then(function(e){var t,o,i,l,r,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(l=i.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}).finally(function(){et(s,{res:S},n,{resolve:l,reject:r})});else et(s,{res:S},n,{resolve:l,reject:r})}).catch(function(e){var t,o,i=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,l=(null==n||null===(o=n.event)||void 0===o?void 0:o.onCountdownComplete)||null;i&&ct(s,e,l),S(e,s,r,a)});case 9:case"end":return e.stop()}},e)})),ft.apply(this,arguments)}function mt(e,n){return gt.apply(this,arguments)}function gt(){return gt=K(J.mark(function e(n,t){var o,i,l,r,a,s,u,d;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,e.next=3,I();case 3:a=e.sent,s=null==n?void 0:n.playerId,u=null==n?void 0:n.epg,d=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),E(u,a,d).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==u?void 0:u.channelId,et(s,{res:t},n,{resolve:l,reject:r})}).catch(function(e){S(e,s,r,videoId)});case 8:case"end":return e.stop()}},e)})),gt.apply(this,arguments)}function ht(e,n){return yt.apply(this,arguments)}function yt(){return yt=K(J.mark(function e(n,t){var o,i,l,r,a,s,u;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.resolve,l=t.reject,e.next=3,I();case 3:r=e.sent,a=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,be.set(parseInt(s)),u=null==n||null===(o=n.series)||void 0===o?void 0:o.id,O(u,r).then(function(e){var t,o,s,d=e.data,c=e.data.seasons;we(c);var v=videoId||(null==c||null===(t=c[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.id);D(u,r),w(v,r).then(function(e){var t,o,r;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,me(e.data),et(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:i,reject:l})}).catch(function(e){S(e,a,l,videoId)})}).catch(function(e){S(e,a,l)});case 9:case"end":return e.stop()}},e)})),yt.apply(this,arguments)}var bt,wt=function(e){var n=e.enable,t=e.site,o=e.sseBaseUrl,i=e.sseEndpoint;if(n){var l=function(e){var n=e.site,t=e.sseBaseUrl,o=e.sseEndpoint;return _e({site:n,sseBaseUrl:t,getToken:I,sseEndpoint:o,onOpen:function(e){var n=e.userId,t=e.endpoint;console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,o,i,l,r,a,s,u,d;if(console.log("SSE Message:",e),(null===(n=pe())||void 0===n||null===(t=n.video)||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.id)===(null==e||null===(i=e.payload)||void 0===i?void 0:i.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var c=1e3*(null==e||null===(l=e.payload)||void 0===l||null===(r=l.states)||void 0===r||null===(a=r.live)||void 0===a?void 0:a.startDateTime),v=1e3*(null==e||null===(s=e.payload)||void 0===s||null===(u=s.states)||void 0===u||null===(d=u.end)||void 0===d?void 0:d.endDateTime);c&&v&&(console.log("Setting schedule timer",c,v),ut.set({startDateTime:c,endDateTime:v}))}},onReconnectAttempt:function(e){console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){console.error("SSE Error:",e,n)},onClose:function(){console.log("SSE Closed")}})}({site:t,sseBaseUrl:o,sseEndpoint:i});return l._sseBaseUrl=o,l._site=t,l._sseEndpoint=i,l}};function kt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function St(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kt(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function It(){return{loadVideoInstantly:T,onTimeUpdate:Y,getVideoDuration:z,onVideoEnded:X,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=K(J.mark(function n(t,o){var i,l,r,a,s,u,d,c,v,p,f,m,g,h,y,k,I,E,O,D,T,j,C,P,x,A,R,N,M,L;return J.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!b(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(I=(null==e?void 0:e.videoSourceUrl)||!1,E=null==e?void 0:e.asat,O=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,D=null==e?void 0:e.videoId,T=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,j=(null==e?void 0:e.streamingInfo)||!1,window.videoId=D,C=null==e?void 0:e.token,!U(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",C),H().set(null==e?void 0:e.refreshToken),C&&!F(C)){n.next=16;break}return o({status:!1,msg:"".concat(C?"Token is expired !":"Missing Authorization Token"),response:{token:C}}),n.abrupt("return");case 16:bt=JSON.parse(atob(C.split(".")[1]));case 17:return window.siteName=null===(r=bt)||void 0===r?void 0:r.site,window.siteId=null===(a=bt)||void 0===a?void 0:a.siteId,e.isAnonymousUser=!(null===(s=bt)||void 0===s||!s.anonymousId),e.siteOwner=(null===(u=bt)||void 0===u?void 0:u.site)||null,e.userId=(null===(d=bt)||void 0===d?void 0:d.userId)||null,window.sessionStorage.setItem("uid",null===(c=bt)||void 0===c?void 0:c.userId),window.watchHistory=e.watchHistory||null,P=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(v=e.series)&&void 0!==v&&v.enable?null:null==e?void 0:e.chromecastReceiverId,x=(null==e||null===(p=e.analytics)||void 0===p?void 0:p.gaId)||null,(A=null==e?void 0:e.errors)&&(window.customErrors=A),window.customData=null==e?void 0:e.customData,ce(null==e||null===(f=e.customData)||void 0===f?void 0:f.localisation),V.set(e.apiBaseUrl),null!=e&&e.skin&&!se(e.skin)||(e.skin="VL_ONE"),n.next=35,Qe(e);case 35:Ln.setConfig(e),x&&Be("https://www.googletagmanager.com/gtag/js?id=".concat(x)).then(function(){return G(x)}).catch(function(e){}),(R=null===(m=document)||void 0===m?void 0:m.getElementById("".concat(P)))&&R.addEventListener("contextmenu",function(e){return e.preventDefault()}),(N=wt({enable:null==e||null===(g=e.sse)||void 0===g?void 0:g.enable,site:null==e||null===(h=e.sse)||void 0===h?void 0:h.siteName,sseBaseUrl:null==e||null===(y=e.sse)||void 0===y?void 0:y.sseBaseUrl,sseEndpoint:null==e||null===(k=e.sse)||void 0===k?void 0:k.sseEndpoint}))&&!N.isConnectionActive()&&N.connect(),I?(L={directPlaybackUrl:I,id:M="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},E?w(M,C).then(function(n){var i=(null==n?void 0:n.data)||{};et(P,{res:St(St({},i),L)},e,{resolve:t,reject:o})}).catch(function(e){S(e,P,o,M)}):et(P,{res:L},e,{resolve:t,reject:o})):j?it(e,{resolve:t,reject:o}):T?ht(e,{resolve:t,reject:o}):O?mt(e,{resolve:t,reject:o}):pt(e,{resolve:t,reject:o});case 42:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:le,skip:j,getPlayer:ue,play:C,pause:P,detectBrowser:e,rewind:x,loadVideo:d,seekToTimeStamp:Q,isPlayerInitialised:b,load:A,authenticateLC:R,dispose:N,enableCaptions:ie,disableCaptions:te,getCaptions:ne,playSelectedResolution:re,getSource:r,setVolume:Ue,getVolume:He,disableControls:f,setPlaybackSpeed:$,getEntitlementData:M,adsQueuePointManager:L,getSsaiEvents:_,playerEvents:Z,onReplay:ee,isBehindLive:B}}export{It as V,Jn as i,Yn as r};
@@ -0,0 +1 @@
1
+ import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m as p,n as m,o as y,p as h,q as g,t as b,u as w,v as k,w as O,x as j,y as S,z as T,A as I,B as E,C as P,D,E as x,F as A,G as C,H as R,I as L,J as N,K as M,L as _,M as V,N as U,O as B,P as H}from"./generic-79a719c8.js";import F from"@babel/runtime/helpers/defineProperty";import q from"@babel/runtime/helpers/asyncToGenerator";import G from"@babel/runtime/regenerator";import K from"video.js";import{o as z,g as J,a as W,s as Q,b as X}from"./util-80257541.js";import{g as Y,d as $,a as Z,e as ee}from"./captions-b7fd8308.js";import{g as ne}from"./renditions-4c09c626.js";import{playSelectedResolution as te}from"./resolution-920515d1.js";import{g as oe,t as re,p as ie,i as le,a as ae}from"./skin-58b9263c.js";import{d as se}from"./browser-d4613b36.js";import{s as ue}from"./localisation-0bf399a1.js";import ce from"@babel/runtime/helpers/typeof";import de from"@babel/runtime/helpers/toConsumableArray";import ve from"@babel/runtime/helpers/slicedToArray";import{I as fe}from"./icons-3bd3bd8f.js";var pe=function(e){return new Promise(function(n,t){if(me(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},me=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ye=function(e,n,t){var o=oe(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},he=function(e){var n=oe(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ge=function(){var e=q(G.mark(function e(n){var t,o,r,i,l;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=oe(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(K),e.finish(13);case 16:(l=K.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==se()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),be=function(e,n){var t=oe(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=K.dom.getPointerPosition(a,n).x;K.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var we=function(){var e=q(G.mark(function e(){return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),pe("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)}}(),ke=function(){var e=q(G.mark(function e(){return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){K.getPlugin("eme")||K.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=q(G.mark(function e(){var n;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(K),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),je=function(){var e=q(G.mark(function e(){return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=q(G.mark(function e(){return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs_contrib_dash-f7d94714.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)}}(),Te=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(K)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(K)})},loadAdsLibrary:we,loadEMELibrary:ke,loadMuxPlugin:Oe,loadDvrSeekbar:je,loadContribDash:Se});function Ie(e){return Ee.apply(this,arguments)}function Ee(){return(Ee=q(G.mark(function e(n){var t;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,we();case 3:t&&"Safari"==se()&&Promise.resolve().then(function(){return Te}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Pe(e,n){return De.apply(this,arguments)}function De(){return(De=q(G.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==se()?ke():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?Se():ke():"Safari"!=se()&&d?Se():null,ge(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 xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ce=new Set,Re=null,Le=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=He(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=Ve(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=Ue(n),v["c3.cm.genreList"]=Me(n),v["c3.cm.genre"]=Ne(n),v["c3.cm.channel"]=_e(n);var p=qe(t(),n);return v=Ae(Ae({},v),p)},Ne=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Me=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"},_e=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},Ve=function(e){return(null==e?void 0:e.contentType)||"null"},Ue=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Be=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},He=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Fe,qe=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Ge=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Ke=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ze=function(){var e=q(G.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=oe(n),"function"==typeof(v=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Ge(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Re&&Re!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),Ce.clear(),Re=d.currentSrc();var o=Ke(d.currentType()),i=r(),s=Le(i,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=Be(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){Ce.has(d.currentSrc())||(Ce.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){Ce.has(d.currentSrc())&&Ce.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==Ce||Ce.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Je=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-a2bc9871.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-55857acc.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-8ceddbe1.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-2a1e18f9.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-3ae22d7d.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&import("./skin-fdb749ad.js").then(function(t){t.initialiseSkin(e,n)})};function We(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Qe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?We(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):We(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Xe=[],Ye=0,$e=null;function Ze(e,n,t){var o,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),h=c?100:Math.floor(v/f*100),g={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=en(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return Qe(Qe({},e),{},F({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Fe});c<0?i.push(Qe(Qe({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=Qe(Qe(Qe({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(g={completed:c,watchedTime:y,watchedPercentage:h},d,n.siteOwner):(g=Qe(Qe({videoId:Fe,watchedTime:y,watchedPercentage:h,doneWatching:c,profileId:d},$e&&{seriesId:$e}),p&&{originalObjectId:p}),i(g).then(function(e){}).catch(function(e){})),Ye=v+t}function en(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function nn(e,n,t){var o=en(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var tn=!1,on=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!tn){var i=rn(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),tn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function rn(e,n,t){if(Array.isArray(e))return e.map(function(e){return rn(e,n,t)});if(null!==e&&"object"===ce(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=rn(e[r],n,t)}),o}return e}function ln(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 an(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)?an(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function an(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function sn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function un(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var cn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=oe(e),y=(null==f?void 0:f.contentType)||"video",h=(null==f?void 0:f[y].drmEnabled)||!1,g=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadstart",function(){g?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(un({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=Y(e);if(null==l||l.map(function(n){return $(e,n.id)}),b&&"Safari"===se())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&ye(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=un(un({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&($e=null==n||null===(r=n.series)||void 0===r?void 0:r.id),Xe=[],Ye=0,Fe=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=oe(e);a&&(a.on("timeupdate",function(){var e=Math.floor(a.currentTime());Xe.includes(Ye)||(e==Ye?(Xe.push(e),Ze(a,n,l)):e>Ye&&(Ye=e+l))}),a.one("ended",function(){Ze(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,h,g,w,k,O=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),j=null==O?void 0:O.gist,S={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==O||null===(g=O.series)||void 0===g?void 0:g.title,video_stream_type:null!=O&&null!==(w=O.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:S})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),h=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){g&&on(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&g)?on(f,e):(c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var t,o,i,l=null===(t=r())||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id,a=d(),s=(null==a?void 0:a.get(l))||{t:0,p:0},u=s.t,c=s.p;u&&c<95&&setTimeout(function(){m.currentTime(u)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(g){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"==ce(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=ln(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=ln(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;("Chrome"==se()||"Edge"==se()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1")?m.audioTracks().removeTrack(p):"main"==p.kind?p.enabled=!0:p.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};function dn(e,n){var t,o,r,i=oe(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o;if(fn.enabled&&"input"!=t.target.localName){var r=t.key,s=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(r)&&(t.preventDefault(),null==a||a.focus()),r){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":s&&!1===n.liveui||f(e,10);break;case"ArrowRight":s||v(e,10)}}},!0)}var vn,fn=(vn=!0,{enable:function(){vn=!0},disable:function(){vn=!1},get enabled(){return vn}});function pn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function mn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function yn(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 hn(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)?hn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function hn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var gn,bn=(gn="",{set:function(e){e&&(gn=e)},get:function(){return gn}});function wn(e,n){return kn.apply(this,arguments)}function kn(){return(kn=q(G.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,h,g;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return oe(n),o=l(t,n),r=o.src,i=r.replace("dash","session").replace("master","session"),i=p(i,n,{}),a=On(i),s=ve(a,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=ve(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.next=10,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:mn({},u)})});case 10:return d=e.sent,e.next=13,d.json();case 13:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,h=f+m,g=f+y,bn.set(h),console.log("%c TRACKING URL","background: #bdf369; color: #000",h),o.src=g,e.abrupt("return",o);case 23:case"end":return e.stop()}},e)}))).apply(this,arguments)}function On(e){var n={},t=e.split("?")[1];if(!t)return n;var o,r=yn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=ve(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=ve(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}function jn(e,n){return Sn.apply(this,arguments)}function Sn(){return Sn=q(G.mark(function e(n,t){var o,r,i,l,a,s,u,c;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:c=function(e,t,o,r,i,l){var c=l.redirectEl,d=l.redirectUrl,v=oe(n);if(!v.seeking()){var f=t.startTimeInSeconds,p=t.durationInSeconds,m=Math.floor(v.currentTime()),y=Math.floor(f+p);m>=f&&m<=y&&d?(c.style.display="block",a(c,d)):c.style.display="none";var h,g=yn(o);try{for(g.s();!(h=g.n()).done;){var b,w,k,O=h.value,j=O.eventType,S=O.beaconUrls,T=O.startTimeInSeconds,I=(O.startTime,O.durationInSeconds,T||0),E=S,P=(null===(b=window)||void 0===b||null===(w=b.customData)||void 0===w||null===(k=w.ads)||void 0===k||k.adEventHandler,"".concat(I,"_").concat(j)),D=s.get("pod-".concat(i))||[];if(console.warn(e,I,"map:",j,"condition1:",e>=I,"map:",s),e>=I&&!D.includes(P)){D.push(P),s.set("pod-".concat(i),D);try{u(j,t,E,v)}catch(e){console.error("Error when calling triggerAdBeacon:",e,j,t)}}}}catch(e){g.e(e)}finally{g.f()}}},u=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){navigator.sendBeacon(e)})},a=function(e,n){l&&e.removeEventListener("click",l),l=function(){return window.open(n,"_blank")},e.addEventListener("click",l)},i=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},o=bn.get(),oe(n).one("loadeddata",function(){o&&r(o)}),r=function(){var e=q(G.mark(function e(t){var o,r,l,a,u,d,v,f,p,m,y,h,g,b,w,k,O,j,S,T,I,E,P,D;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return O=function(e){document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",O),0===e.button&&w()},k=function(e){},w=function(){var e,n=f.currentTime(),t=null,o=yn(v);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!y.has(i)||n>=i&&n<=s)&&(t=i,y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){f.currentTime(t+.4)},100))},e.next=5,fetch(t);case 5:return a=e.sent,e.next=8,a.json();case 8:u=e.sent,d=u.avails,v=[],f=oe(n),p=f.controlBar.progressControl,m=p.seekBar.el(),d.map(function(e){var n,t;v.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===(n=e.adBreakTrackingEvents)||void 0===n||null===(t=n.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===t?void 0:t[0])||[]})}),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",m.appendChild(i)}}),y=new Map,h=-1,g=(null==f||null===(o=f.controlBar)||void 0===o?void 0:o.getChild("videoSelector"))||null,b=(null==f||null===(r=f.controlBar)||void 0===r?void 0:r.getChild("seriesV2"))||null,f.on("timeupdate",re(function(){var e=f.currentTime();if(e!==h){h=e;for(var n=!1,t=function(){var t=v[o],r=t.startTimeInSeconds,l=t.durationInSeconds,a=t.ads,u=r+l;if(e>=r-2.5&&e<=u+2.5){var d,f,m,h;e<=u&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>u&&y.set(r,!0),fn.disable(),g&&(g.el().style.pointerEvents="none",g.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),p.el().style.visibility="hidden";for(var w=e-r,k=0,O=0,S=0;S<a.length;S++){var T,I=null==a||null===(T=a[S])||void 0===T?void 0:T.durationInSeconds;if(w<k+I){O=S;break}k+=I}var E=a[O],x=w-k,A=Math.max(0,(null==E?void 0:E.durationInSeconds)-x),C=Math.round(A);j.style.display="block",P.textContent="".concat(O+1," of ").concat(a.length," • ").concat(i(C));var R=[];null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});R.push.apply(R,de(n))}),Array.isArray(a)&&0==(null==a?void 0:a.length)&&R.push(null==t?void 0:t.podSlotImpressionBeacon);var L=(null==E||null===(d=E.trackingEvents)||void 0===d||null===(f=d.filter(function(e){var n;return null===(n=["clickThrough"])||void 0===n?void 0:n.includes(e.eventType)}))||void 0===f||null===(m=f[0])||void 0===m||null===(h=m.beaconUrls)||void 0===h?void 0:h[0])||null;return c(e,t,R,0,o,{redirectEl:D,redirectUrl:L}),"break"}s.delete("pod-".concat(o))},o=0;o<v.length;o++){if("break"===t())break}n||(j.style.display="none",p.el().style.visibility="visible",g&&(g.el().style.pointerEvents="auto",g.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),fn.enable())}},1e3)),p.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",O))}),(j=document.createElement("div")).className="ssai-ad-container",(S=document.createElement("div")).className="sponsored-adbox",(T=document.createElement("div")).className="sponsored-text",T.textContent="Sponsored Ad",(I=document.createElement("div")).className="ad-info-icon",E=ie(fe()),I.appendChild(E),S.append(T),S.append(I),(P=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(D=document.createElement("div")).className="ad-visit-advertiser",D.textContent="Visit Advertiser",(null===(l=document.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])&&(D.style.right="8.6rem"),j.append(S),j.append(P),j.append(D),f.el().appendChild(j);case 49:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),s=new Map;case 10:case"end":return e.stop()}},e)})),Sn.apply(this,arguments)}function Tn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function In(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var En=function(e,n,t,o){var r,i,s,u,d,v,f,p,b,w,k,O,j,S,T,I,E,P,D,x,A,C,R,L,N,M,_,V,U,B,H,z,J,W,Q,X=n.res,Y=void 0===X?null:X,$=n.sres,ee=void 0===$?null:$,ne=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(r=Y)||void 0===r?void 0:r.contentType)||"video",re=le(null===(i=Y)||void 0===i||null===(s=i[te])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||le(null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),ie=(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.liveDetails)||void 0===k?void 0:k.isDvrEnabled)||!1,ae=(null===(O=Y)||void 0===O||null===(j=O[te])||void 0===j||null===(S=j.streamingInfo)||void 0===S?void 0:S.isLiveStream)||!1,ue=(null===(T=Y)||void 0===T||null===(I=T.ads)||void 0===I||null===(E=I.preRoll)||void 0===E||null===(P=E.adTags)||void 0===P||null===(D=P.web)||void 0===D?void 0:D.active)&&(null===(x=Y)||void 0===x||null===(A=x.ads)||void 0===A||null===(C=A.preRoll)||void 0===C||null===(R=C.adTags)||void 0===R||null===(L=R.web)||void 0===L?void 0:L.url);Y=In(In({},Y),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ce="MEDIA_TAILOR"==(null===(N=window)||void 0===N||null===(M=N.app_data)||void 0===M||null===(_=M.appcmsMain)||void 0===_||null===(V=_.adsConfig)||void 0===V?void 0:V.vodAdSticherProvider)||!1,de=(null==t?void 0:t.latency)||6,ve=(Q={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==t.skin,liveui:ie},F(Q,"autoplay",null==t?void 0:t.autoplay),F(Q,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!ue),F(Q,"loop",(null==t?void 0:t.loop)||!1),F(Q,"audioPosterMode",null==t?void 0:t.audioPosterMode),F(Q,"html5",In(In({dash:In(In(In({},!K.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(U=t.debugConfig)||void 0===U?void 0:U.enable)&&{debug:!0,logLevel:null!=t&&null!==(B=t.debugConfig)&&void 0!==B&&B.logLevel?null==t||null===(H=t.debugConfig)||void 0===H?void 0:H.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:de},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{useDefaultABRRules:!0,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:In(In({liveRangeSafeTimeDelta:de,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(z=t.customData)||void 0===z?void 0:z.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==se()},0==(null==t||null===(J=t.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(W=t.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),F(Q,"poster",re),F(Q,"techOrder",ne),F(Q,"chromecast",{requestCustomDataFn:function(n){var t=oe(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,h,g,b,w,k,O;p.isDrmEnabled=!0;var j=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,S=(null==j?void 0:j.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(h=y[0])||void 0===h||null===(g=h.options)||void 0===g?void 0:g.serverURL);p.licenseUrl=S;var T=(null==j?void 0:j.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===(O=k.httpRequestHeaders)||void 0===O?void 0:O["X-AxDRM-Message"]);p.licenseToken=T}var I=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=I;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Y,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=oe(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=Y)||void 0===t||null===(o=t[te])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),Q);if(!K.getPlayers()[e]){K.log.level("debug");var fe=K(e,ve,function(){var n=q(G.mark(function n(){var r,i,s,u,d,v,f,p,b,w,k,O,j,S,T,I,E,P,D,x;return G.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(fe),console.log(K.VERSION),console.log(K.getPlugins()),n.next=5,Pe(t,Y);case 5:if(O=null===(r=Y)||void 0===r||null===(i=r[te])||void 0===i||null===(s=i.liveDetails)||void 0===s?void 0:s.startOverTime,ae&&o.resolve(In({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Y}:{response:Y})),y(e,null==t?void 0:t.analyticsCb),ze(e,t),/Android/i.test(navigator.userAgent)&&(K.options.vhs.overrideNative=!0),ie&&be(e,O),!ue||null!=t&&null!==(u=t.customData)&&void 0!==u&&u.disableAds||h(e,ue,Y),j=l(Y,e),console.log(j),null!=t&&t.nearestClusterUrl&&(j=g(j,t.nearestClusterUrl)),!ce){n.next=19;break}return n.next=18,wn(e,Y);case 18:j=n.sent;case 19:j?a(e,j):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:Y}),c(e,"Incompatible / Missing Source")),((null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.contentDetails)||void 0===f||null===(p=f.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.closedCaptions)||void 0===k?void 0:k.length)>0)&&(x=(null===(T=Y)||void 0===T||null===(I=T[te])||void 0===I||null===(E=I.contentDetails)||void 0===E?void 0:E.closedCaptions)||(null===(P=Y)||void 0===P||null===(D=P[te])||void 0===D?void 0:D.closedCaptions),S=x.filter(function(e){return"VTT"===e.format}),Z(e,S)),null!=t&&t.disableControls?m(e):Je(e,In(In(In({},t),ve),{},{liveVideo:ae,isDvrEnabled:ie,res:Y,sres:ee})),cn(e,In(In(In({},t),ve),{},{liveVideo:ae}),o,{res:Y,sres:ee});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Pn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Dn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function xn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var An,Cn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Rn(e);En(r,{res:i},e,{resolve:t,reject:o})},Rn=function(e){var n,t,o=null==e?void 0:e.streamingInfo,r=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,i=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,l=null==e?void 0:e.token,a=b(l),s=null==a?void 0:a.site;return xn(xn({id:null==Pn?void 0:Pn[s]},!i&&{directPlaybackUrl:null==r?void 0:r.url}),{},{video:{drmEnabled:i,streamingInfo:{videoAssets:{widevine:null==r?void 0:r.widevine,fairPlay:null==r?void 0:r.fairPlay,playReady:null==r?void 0:r.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Ln(e,n){return Nn.apply(this,arguments)}function Nn(){return(Nn=q(G.mark(function e(n,t){var o,r,i,l,a,u;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,j();case 6:u=e.sent,w(i,u).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,s(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,h,g=nn((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(g&&g.length)n.watchHistoryResumeTime=(null===(y=g[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(h=g[0])||void 0===h?void 0:h.watchedPercentage)||null;p.contentType="video",En(l,{res:p},n,{resolve:o,reject:r})}else k(i,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){En(l,{res:p},n,{resolve:o,reject:r})});else En(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Mn(e,n){return _n.apply(this,arguments)}function _n(){return(_n=q(G.mark(function e(n,t){var o,r,i,l,a;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,j();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,S(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,En(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Vn(e,n){return Un.apply(this,arguments)}function Un(){return(Un=q(G.mark(function e(n,t){var o,r,i,l,a,u,c;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,j();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,E.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,T(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;P(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);I(c,l),w(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,s(e.data),En(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){O(e,a,i,videoId)})}).catch(function(e){O(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Bn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Hn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Bn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Bn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Fn(){return{loadVideoInstantly:D,onTimeUpdate:z,getVideoDuration:J,onVideoEnded:W,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=q(G.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,h,g,b,k,j,S,T,I,E,P;return G.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!C(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,h=null==e?void 0:e.videoId,g=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=h,k=null==e?void 0:e.token,!V(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",k),U().set(null==e?void 0:e.refreshToken),k&&!B(k)){n.next=16;break}return o({status:!1,msg:"".concat(k?"Token is expired !":"Missing Authorization Token"),response:{token:k}}),n.abrupt("return");case 16:An=JSON.parse(atob(k.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=An)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=An)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=An)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=An)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,j=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,S=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,ue(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),_.set(e.apiBaseUrl),null!=e&&e.skin&&!ae(e.skin)||(e.skin="VL_ONE"),n.next=33,Ie(e);case 33:S&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(S)).then(function(){return H(S)}).catch(function(e){}),(I=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(j)))&&I.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(P={directPlaybackUrl:p,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?w(E,k).then(function(n){var r=(null==n?void 0:n.data)||{};En(j,{res:Hn(Hn({},r),P)},e,{resolve:t,reject:o})}).catch(function(e){O(e,j,o,E)}):En(j,{res:P},e,{resolve:t,reject:o})):b?Cn(e,{resolve:t,reject:o}):g?Vn(e,{resolve:t,reject:o}):y?Mn(e,{resolve:t,reject:o}):Ln(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ne,skip:v,getPlayer:oe,play:x,pause:A,detectBrowser:se,rewind:f,loadVideo:a,seekToTimeStamp:Q,isPlayerInitialised:C,load:R,authenticateLC:L,dispose:N,enableCaptions:ee,disableCaptions:$,getCaptions:Y,playSelectedResolution:te,getSource:l,setVolume:ye,getVolume:he,disableControls:m,setPlaybackSpeed:X,getEntitlementData:M}}export{Fn as V,dn as i,jn as s};
@@ -0,0 +1 @@
1
+ import"./index-04f28499.js";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{g as r}from"./player_instance-34118a5b.js";import n from"@babel/runtime/helpers/defineProperty";import i from"@babel/runtime/helpers/slicedToArray";import{a}from"./currentVideoInfo-0b234e55.js";import{t as u}from"./skin-65765793.js";function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l="my-player";function c(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function p(){return(p=e(t.mark(function e(r){var n,a,u,o,s,l,c,p,d,m,f,b,g,v,h,x,y,w,k,j,E,N,A,I;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return a=e.sent,e.next=11,createImageBitmap(a);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=i(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,m=[],f=0;f<l;f++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,f*d,p,d,0,0,p,d),v=g.toDataURL("image/png"),m.push({uri:v,duration:r.duration}),r._tiles=m;return e.abrupt("return",m);case 20:for(e.prev=20,e.t0=e.catch(2),h=r.layout.split("x").map(Number),x=i(h,2),y=x[0],w=x[1],k=[],j=0;j<y*w;j++)k.push({uri:null===(E=window)||void 0===E||null===(N=E.app_data)||void 0===N||null===(A=N.appcmsMain)||void 0===A||null===(I=A.images)||void 0===I?void 0:I.placeholderCover,duration:r.duration});return e.abrupt("return",k);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function d(e,t){return m.apply(this,arguments)}function m(){return(m=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",c(a));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 f(e,t,n){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=r(l);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,s=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),n),c=t[s];c&&!c.loading&&(c.loading=!0,function(e){return p.apply(this,arguments)}(c).then(function(e){var t=e[c.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),c.loading=!1,c.src=t.uri}))}}function b(e){return g.apply(this,arguments)}function g(){return(g=e(t.mark(function e(r){var a,o,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={},r.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),u=i(r,2),o=u[0]*u[1],l=e.duration,c=0;c<o;c++){var p,d=Math.round((t*o+c)*l);a[d]=s(s({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},n(p,"left","-60px"),n(p,"border","1px solid transparent"),n(p,"borderRadius","4px"),p)})}}),o=Object.keys(a).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",u(function(e){return f(e,a,o)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",u(function(e){return f(e,a,o)},500))}),e.abrupt("return",a);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var v=function(){var r=e(t.mark(function e(r,n){var a,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return a=e.sent,e.next=5,a.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=i(t,2),n=r[0],a=r[1];n&&a&&(l[n.trim().toLowerCase()]=a.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function x(e,t){return y.apply(this,arguments)}function y(){return(y=e(t.mark(function e(n,u){var o,s,c,p,d,m,f,b,g,v,x,y,j,E,N,A,I,T,O,S,M,P,R,$,B,L,D,U,C,X,_,q,F,W,z,G,V,H,J,K,Q,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,me,fe;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=u,o=r(u),s=n.split("/"),c=s.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?s.slice(0,c+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),y=(null==o?void 0:o.duration())||(null===(d=a())||void 0===d||null===(m=d.video)||void 0===m?void 0:m.runtime),j=(null==x||null===(f=x.querySelector("MPD > BaseURL"))||void 0===f?void 0:f.textContent)||p+"/",E=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<E.length)){e.next=72;break}if(("image"!==(A=E[N]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(T=A.getElementsByTagName("SegmentTemplate")[0],O=null===(I=T.getElementsByTagName("SegmentTimeline"))||void 0===I?void 0:I[0],!T||!O){e.next=48;break}if(P=O.getElementsByTagName("S"),R=parseInt(null===(S=P[0])||void 0===S?void 0:S.getAttribute("t")),$=parseInt(null===(M=P[0])||void 0===M?void 0:M.getAttribute("d")),B=A.getElementsByTagName("Representation")[0],L=B.getElementsByTagName("EssentialProperty")[0],D=L.getAttribute("value"),U=null==D?void 0:D.split("x"),C=i(U,2),X=C[0],_=C[1],!T){e.next=46;break}if(T.getAttribute("media"),q=T.getAttribute("timescale"),F=(q?$/q:$)/(X*_),W=B.getAttribute("id"),z=Math.round(y/F),G=Math.ceil(z/(X*_)),V=T.getAttribute("media"),parseInt(T.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],N=0;N<G;N++)K="/"==(J=V)[0]?new URL(p).origin:p+"/",H.push({duration:F,layout:D,uri:K+J.replace("$Time$",R+N*$).replace("$RepresentationID$",W)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=A.getElementsByTagName("Representation")[0],Y=Q.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=i(ee,2),re=te[0],ne=te[1],!T){e.next=69;break}if(T.getAttribute("media"),ie=T.getAttribute("duration"),ae=T.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=Q.getAttribute("id"),se=Math.round(y/ue),le=Math.ceil(se/(re*ne)),ce=T.getAttribute("media"),pe=parseInt(T.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],me=w(ce),N=0;N<le;N++)fe=me?k(me,N+pe):ce,de.push({duration:ue,layout:Z,uri:j+fe.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,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 w(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function j(e){return E.apply(this,arguments)}function E(){return(E=e(t.mark(function e(n){var i,a,u,o,s,l,c,p,m,f,g,h,y,w,k,j;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=r(n),c=l.currentSource(),p=c.src,p=null!==(i=p)&&void 0!==i&&i.includes("blob")?null===(a=window)||void 0===a||null===(u=a.player)||void 0===u?void 0:u.getSource():p,null===(o=p)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,d(p,n);case 6:if(!((null==(m=e.sent)?void 0:m.length)>0)){e.next=17;break}return f=(null==m?void 0:m[0])||null,g=f.uri,h=p.substring(0,p.lastIndexOf("/"))+"/",e.next=12,v(h,g);case 12:return y=e.sent,e.next=15,b(y);case 15:w=e.sent,l.thumbnails(w);case 17:e.next=28;break;case 19:if(null===(s=p)||void 0===s||!s.includes("mpd")){e.next=28;break}return e.next=22,x(p,n);case 22:if(!((null==(k=e.sent)?void 0:k.length)>0)){e.next=28;break}return e.next=26,b(k);case 26:j=e.sent,l.thumbnails(j);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}export{j as i};
package/esm/index.js CHANGED
@@ -1 +1 @@
1
- import"video.js/dist/video-js.min.css";import"./generic-2f9efcf1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";export{V as default}from"./index-62e1ef44.js";import"./util-90b9fbc3.js";import"./captions-78bd2908.js";import"./resolution-62be852a.js";import"./skin-65765793.js";import"./localisation-0bf399a1.js";import"./player_instance-34118a5b.js";import"axios";import"md5";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./icons-37daa6b3.js";import"./helper-d52dff3c.js";import"@viewlift/sse";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";
1
+ import"video.js/dist/video-js.min.css";import"./generic-7505da7f.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";export{V as default}from"./index-0ffc31e8.js";import"./util-a420b997.js";import"./captions-78bd2908.js";import"./resolution-62be852a.js";import"./skin-65765793.js";import"./localisation-0bf399a1.js";import"./player_instance-34118a5b.js";import"axios";import"md5";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./icons-37daa6b3.js";import"./helper-d52dff3c.js";import"@viewlift/sse";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{h as s,f as i,i as l}from"./icons-3bd3bd8f.js";import{H as c,E as m}from"./generic-79a719c8.js";import{e as d,g as p}from"./skin-58b9263c.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-b7fd8308.js";import"@babel/runtime/helpers/toConsumableArray";function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}var h=n.getComponent("Component"),v=function(){r(g,h);var v,f,y=(v=g,f=u(),function(){var e,t=o(v);if(f){var r=o(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function g(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(r=y.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(g,[{key:"createEl",value:function(){var e=n.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=n.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return n.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-1fb5149a.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=n.dom.createEl("div",{className:"stream-container hidden"});n.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(d(),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 a=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),r.style.overflow="hidden",n.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=n.dom.createEl("div",{className:"stream-selector-head"}),o=n.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});o.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var s=n.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=n.dom.createEl("div",{className:"stream-selector-content"}),u=n.dom.createEl("div",{className:"stream-tray"}),h=function(e){var r,a=n.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(a.classList.add("selected"),a.style.border="4px solid #D2393B"),a.onclick=function(){for(var r=n.dom.$$(".stream"),o=0;o<r.length;o++)r[o].style.border="none",r[o].classList.remove("selected");a.classList.add("selected"),a.style.border="4px solid #D2393B",c(t.playerId,t.streams[e].id).then(function(e){m(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},a.style.backgroundImage="url(".concat(t.streams[e].img,")");var o=document.createElement("img");o.className="stream-thumbnail-image",o.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),o.alt="No Thumbnail Available",a.append(o),n.dom.appendContent(u,a),n.dom.appendContent(d,u)},v=0;v<this.streams.length;v++)h(v);n.dom.appendContent(a,o),n.dom.appendContent(a,s),n.dom.appendContent(e,a),n.dom.appendContent(e,d),p(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")})}}]),g}();export{v as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{i as n,e as i,j as l}from"./icons-37daa6b3.js";import{G as c,D as m}from"./generic-7505da7f.js";import{g as d,s as p,k as u}from"./skin-65765793.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"md5";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"./captions-78bd2908.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var h=s.getComponent("Component"),f=function(){r(g,h);var f,y,b=(f=g,y=v(),function(){var e,t=a(f);if(y){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function g(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(r=b.call(this,t,o)).playerId=o.playerId,r.seriesData=o.sres,r.streams=o.streams,r.currentVideoData=o.res,r.initialiseStructure(),r.loadCSS(),r}return t(g,[{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(n())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-b7cec0cf.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 o;null!==(o=r.classList)&&void 0!==o&&o.contains("hidden")?(d(),r.classList.remove("hidden"),t.classList.add("open"),p(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var a=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(a,"px"),o.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),o=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var n=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),p=s.dom.createEl("div",{className:"stream-tray"}),v=parseInt(sessionStorage.getItem("selectedStreamIndex")||0),h=function(e){var r,o,a,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});v==e&&(n.classList.add("selected"),n.style.border="2px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),o=0;o<r.length;o++)r[o].style.border="none",r[o].classList.remove("selected");n.classList.add("selected"),n.style.border="2px solid #D2393B",c(t.playerId,t.streams[e].id).then(function(e){m(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var i=document.createElement("img");i.className="stream-thumbnail-image",i.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),n.append(i),s.dom.appendContent(p,n),s.dom.appendContent(d,p)},f=0;f<this.streams.length;f++)h(f);s.dom.appendContent(o,a),s.dom.appendContent(o,n),s.dom.appendContent(e,o),s.dom.appendContent(e,d),u(this.playerId,e)}}]),g}();export{f as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{h as n,f as i,i as l}from"./icons-3bd3bd8f.js";import{H as c,E as m}from"./generic-79a719c8.js";import{e as d,s as p,j as u}from"./skin-58b9263c.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-b7fd8308.js";import"@babel/runtime/helpers/toConsumableArray";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var h=s.getComponent("Component"),f=function(){a(g,h);var f,y,b=(f=g,y=v(),function(){var e,t=o(f);if(y){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return r(this,e)});function g(t){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(a=b.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.streams=r.streams,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a}return t(g,[{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(n())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-b7cec0cf.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(),a=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=a.classList)&&void 0!==r&&r.contains("hidden")?(d(),a.classList.remove("hidden"),t.classList.add("open"),p(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"))};var r=document.getElementById(this.playerId);if(r){var o=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);a.style.height="".concat(o,"px"),r.style.overflow="hidden",s.dom.appendContent(t,a),this.addFunctionality(a)}}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),r=s.dom.createEl("div",{className:"stream-selector-head"}),o=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});o.onclick=function(){e.classList.add("hidden"),a.classList.remove("open")};for(var n=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),p=s.dom.createEl("div",{className:"stream-tray"}),v=function(e){var a,r,o,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(n.classList.add("selected"),n.style.border="2px solid #D2393B"),n.onclick=function(){for(var a=s.dom.$$(".stream"),r=0;r<a.length;r++)a[r].style.border="none",a[r].classList.remove("selected");n.classList.add("selected"),n.style.border="2px solid #D2393B",c(t.playerId,t.streams[e].id).then(function(e){m(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var i=document.createElement("img");i.className="stream-thumbnail-image",i.src="".concat((null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img)||(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o?void 0:o.fallbackImage)),n.append(i),s.dom.appendContent(p,n),s.dom.appendContent(d,p)},h=0;h<this.streams.length;h++)v(h);s.dom.appendContent(r,o),s.dom.appendContent(r,n),s.dom.appendContent(e,r),s.dom.appendContent(e,d),u(this.playerId,e)}}]),g}();export{f as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{i as s,e as i,j as l}from"./icons-37daa6b3.js";import{G as c,D as m}from"./generic-7505da7f.js";import{g as d}from"./skin-65765793.js";import{g as p}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"md5";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"./captions-78bd2908.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}var h=n.getComponent("Component"),v=function(){r(b,h);var v,f,y=(v=b,f=u(),function(){var e,t=a(v);if(f){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function b(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,b),(r=y.call(this,t,o)).playerId=o.playerId,r.seriesData=o.sres,r.streams=o.streams,r.currentVideoData=o.res,r.initialiseStructure(),r.loadCSS(),r}return t(b,[{key:"createEl",value:function(){var e=n.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=n.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return n.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-1fb5149a.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=n.dom.createEl("div",{className:"stream-container hidden"});n.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(d(),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 o=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),r.style.overflow="hidden",n.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),o=n.dom.createEl("div",{className:"stream-selector-head"}),a=n.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var s=n.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=n.dom.createEl("div",{className:"stream-selector-content"}),u=n.dom.createEl("div",{className:"stream-tray"}),h=function(e){var r,o=n.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(o.classList.add("selected"),o.style.border="4px solid #D2393B"),o.onclick=function(){for(var r=n.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");o.classList.add("selected"),o.style.border="4px solid #D2393B",c(t.playerId,t.streams[e].id).then(function(e){m(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},o.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",o.append(a),n.dom.appendContent(u,o),n.dom.appendContent(d,u)},v=0;v<this.streams.length;v++)h(v);n.dom.appendContent(o,a),n.dom.appendContent(o,s),n.dom.appendContent(e,o),n.dom.appendContent(e,d),p(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")})}}]),b}();export{v as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-37daa6b3.js";import{G as s}from"./generic-7505da7f.js";import{s as a}from"./currentVideoInfo-0b234e55.js";import{f as d}from"./skin-65765793.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"md5";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var m=r.getComponent("Component"),c=function(){n(c,m);var s,a,d=(s=c,a=p(),function(){var e,t=i(s);if(a){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function c(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,c),(n=d.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(c,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then(function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",function(){r.dom.removeClass(t,"nextepisode-hidden")}),t.addEventListener("mouseover",function(){r.dom.removeClass(t,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){r.dom.addClass(t,"nextepisode-hidden")}),t.addEventListener("mouseout",function(){r.dom.addClass(t,"nextepisode-hidden")})}}]),c}(),u=function(e,t){var n=v(e,t.video.gist.id),o=h(e[n],t.video.gist.id),i=f(e[n],o);x(i.nextEp)},v=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach(function(e,o){e.gist.id===t&&(n=o)}),n):null},x=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t;s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).then(function(e){a(e.response)})};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),m=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=m&&m.firstChild;)null==p||p.appendChild(m.firstChild)};export{c as default,u as initaliseFunctionality};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-3bd3bd8f.js";import{H as s,f as a}from"./generic-79a719c8.js";import{d}from"./skin-58b9263c.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-b7fd8308.js";import"@babel/runtime/helpers/toConsumableArray";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var u=r.getComponent("Component"),c=function(){n(c,u);var s,a,d=(s=c,a=p(),function(){var e,t=i(s);if(a){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function c(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,c),(n=d.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(c,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then(function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",function(){r.dom.removeClass(t,"nextepisode-hidden")}),t.addEventListener("mouseover",function(){r.dom.removeClass(t,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){r.dom.addClass(t,"nextepisode-hidden")}),t.addEventListener("mouseout",function(){r.dom.addClass(t,"nextepisode-hidden")})}}]),c}(),m=function(e,t){var n=v(e,t.video.gist.id),o=h(e[n],t.video.gist.id),i=f(e[n],o);x(i.nextEp)},v=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach(function(e,o){e.gist.id===t&&(n=o)}),n):null},x=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t;s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).then(function(e){a(e.response)})};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),u=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=u&&u.firstChild;)null==p||p.appendChild(u.firstChild)};export{c as default,m as initaliseFunctionality};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-37daa6b3.js";import{G as c}from"./generic-7505da7f.js";import{k as d}from"./currentVideoInfo-0b234e55.js";import{a as p}from"./autoNextVideo-7323cf5f.js";import{g as m}from"./skin-65765793.js";import{g as u}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"md5";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-a420b997.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var y=a.getComponent("Component"),h=function(){n(g,y);var h,f,b=(h=g,f=v(),function(){var e,t=i(h);if(f){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return l(this,e)});function g(e){var o,n,l,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),(i=b.call(this,e,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=null==a||null===(o=a.playlist)||void 0===o?void 0:o.content,i.cb=(null==a||null===(n=a.playlist)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==a||null===(l=a.playlist)||void 0===l?void 0:l.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&p({playerId:i.playerId,content:i.videos,cb:i.cb}),i}return o(g,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.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=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(m(),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 o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),a.dom.appendContent(e,t),o.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var o=this,n=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var n,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(n=o.videos[t])||void 0===n?void 0:n.title)||"")}),m=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(o.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,m),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=o.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(o.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(p,i),u.onclick=function(e){e.stopPropagation(),d(t+1),c(o.playerId,o.videos[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})},s.onclick=function(t){var o,n,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(o=s.classList)&&void 0!==o&&o.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(n=s.classList)||void 0===n||n.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),u(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(o.playerId);if(e){var n=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px")}})}}]),g}();export{h as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,f as r}from"./icons-3bd3bd8f.js";import{H as c,S as d}from"./generic-79a719c8.js";import{a as p}from"./autoNextVideo-3d6570ee.js";import{e as m,g as u}from"./skin-58b9263c.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-b7fd8308.js";import"./util-80257541.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var y=a.getComponent("Component"),h=function(){o(g,y);var h,f,b=(h=g,f=v(),function(){var e,t=i(h);if(f){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return l(this,e)});function g(e){var n,o,l,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),(i=b.call(this,e,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=null==a||null===(n=a.playlist)||void 0===n?void 0:n.content,i.cb=(null==a||null===(o=a.playlist)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(l=a.playlist)||void 0===l?void 0:l.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&p({playerId:i.playerId,content:i.videos,cb:i.cb}),i}return n(g,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.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=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(m(),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 o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),a.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,o=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),o.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var o,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.title)||"")}),m=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,m),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(p,i),u.onclick=function(e){e.stopPropagation(),d(t+1),c(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,o,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(o=s.classList)||void 0===o||o.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),u(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(n.playerId);if(e){var o=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px")}})}}]),g}();export{h as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import o from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{T as d,F as p,H as u,f as v,E as m}from"./generic-79a719c8.js";import{E as f}from"./icons-3bd3bd8f.js";import{d as h}from"./skin-58b9263c.js";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-b7fd8308.js";import"@babel/runtime/helpers/toConsumableArray";var g=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var y,C=c.getComponent("Component"),w=function(){s(d,C);var e,l,c=(e=d,l=b(),function(){var t,i=a(e);if(l){var n=a(this).constructor;t=Reflect.construct(i,arguments,n)}else t=i.apply(this,arguments);return r(this,t)});function d(e){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,d),i=c.call(this,e,s),o(n(i),"seriesData",[]),i.seriesData=s.seriesData,y=s.playerId,E(i.el(),i.seriesData),i.loadCSS(),i}return i(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then(function(e){var t=document.createElement("style");t.id="series",t.append("".concat(e.default)),document.head.appendChild(t)})}}]),d}();function L(){return(L=e(l.mark(function e(t,i,n,s){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:p(y),g(y),u(y,i).then(function(e){v(e.response),m(y)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function k(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map(function(e,t){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(t+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=h(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d(e).then(function(e){var t=e.data,i=document.querySelectorAll("#progress-div");i&&t.map(function(e,t){e&&e.watchedPercentage&&i[t]&&(i[t].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(s,r)});for(var g=function(t){c[t].addEventListener("click",function(){return function(e,t,i){var n=t.querySelector(".meta-details");t.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),i.forEach(function(t,n){n!==e&&(i[n].classList.remove("episode-active"),i[n].querySelector(".meta-details").classList.remove("metadetails-active"))})}(t,p[t],p)}),u[t].addEventListener("click",function(){return function(e,t,i,n){return L.apply(this,arguments)}(t,f[t].id,i,p)}),e.episodes[t].id==m&&p[t].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function E(e,t){for(var i='<div class="hover-div"></div>\n '.concat(f(),'\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,t){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("")}(t),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=h(i);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{E as customSeasonList,k as handleSeasonChange,w as seriesModule};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{W as d,E as p,G as u,D as m}from"./generic-7505da7f.js";import{E as v}from"./icons-37daa6b3.js";import{s as f}from"./currentVideoInfo-0b234e55.js";import{f as h}from"./skin-65765793.js";import"axios";import"./player_instance-34118a5b.js";import"md5";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";var g=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var y,C=c.getComponent("Component"),w=function(){s(d,C);var e,l,c=(e=d,l=b(),function(){var i,t=o(e);if(l){var n=o(this).constructor;i=Reflect.construct(t,arguments,n)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,s),a(n(t),"seriesData",[]),t.seriesData=s.seriesData,y=s.playerId,j(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(){import("./series-041152aa.js").then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}]),d}();function L(){return(L=e(l.mark(function e(i,t,n,s){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:p(y),g(y),u(y,t).then(function(e){f(e.response),m(y)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function k(e,i,t,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;for(var a=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!=o&&o.firstChild;)o.removeChild(o.firstChild);for(var l=h(a);null!=l&&l.firstChild;)o.appendChild(l.firstChild);!function(e){d(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),m=document.querySelector("#episodes-back-btn"),v=e.id,f=e.episodes;m.addEventListener("click",function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(s,r)});for(var g=function(i){c[i].addEventListener("click",function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach(function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))})}(i,p[i],p)}),u[i].addEventListener("click",function(){return function(e,i,t,n){return L.apply(this,arguments)}(i,f[i].id,t,p)}),e.episodes[i].id==v&&p[i].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function j(e,i){for(var t='<div class="hover-div"></div>\n '.concat(v(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=h(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{j as customSeasonList,k as handleSeasonChange,w as seriesModule};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import i from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{e as r,f as d,B as c}from"./icons-3bd3bd8f.js";import{j as u,U as m,V as v,b as p,B as h,H as f}from"./generic-79a719c8.js";import{e as C,s as b,p as g,j as y,g as N,i as E}from"./skin-58b9263c.js";import{a as k}from"./autoNextVideo-3d6570ee.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-b7fd8308.js";import"./util-80257541.js";function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}var L=a.getComponent("Component"),j=function(){i(I,L);var j,x,w=(j=I,x=S(),function(){var e,t=l(j);if(x){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return n(this,e)});function I(s){var i,n,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,I),(d=w.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(i=c.sres)||void 0===i?void 0:i.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(n=c.series)||void 0===n?void 0:n.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var p,h,f,C,b=null==c||null===(p=c.sres)||void 0===p?void 0:p.seasons,g=[];b.map(function(t){g.push.apply(g,e(t.episodes))}),m(g),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),k({playerId:d.playerId,content:g,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(I,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-8a8b6f0c.js").then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),s.classList.add("open"),b(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(s)};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(i,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),i=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),s.classList.remove("open");else if("series-selector-back-icon"===i.className){var o=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=t.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var l=g(d());i.appendChild(l)}};var n=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(o,i),a.dom.appendContent(o,n),a.dom.appendContent(e,o),a.dom.appendContent(e,l),y(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;N(this.playerId);for(var t=p(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var i,n=document.createElement("label");n.className="season-holder",n.setAttribute("for","season-".concat(o));var l=document.createElement("div");l.className="season - ".concat(o),l.textContent=null===(i=t[o])||void 0===i?void 0:i.title;var r=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==o&&(r.checked=!0),r.onclick=function(t){h.set(o),e.showSeasonDetails(o)},a.dom.appendContent(n,r),a.dom.appendContent(n,l),a.dom.appendContent(s,n)},i=0;i<t.length;i++)o(i);return s}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map(function(e){var t,s,i,n,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(i=s.imageGist)||void 0===i?void 0:i.r16x9)||(null===(n=window)||void 0===n||null===(l=n.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var i=function(i){var n,l,r,d,c,u=a.dom.createEl("div",{className:"series-container"}),m=a.dom.createEl("div",{className:"series-section-data",index:i,innerHTML:"".concat((null===(n=t[i])||void 0===n?void 0:n.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[i])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var p=a.dom.createEl("div",{className:"series-section-image"}),h=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(d=h)||void 0===d?void 0:d.length)>170&&(h=h.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(h||"")});var C=a.dom.createEl("img",{className:"series-image"});C.src="".concat(E(null===(c=t[i])||void 0===c?void 0:c.img)),C.alt="Episode ".concat(i+1),a.dom.appendContent(p,C),a.dom.appendContent(u,p),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){var s;e.stopPropagation(),v(null===(s=t[i])||void 0===s?void 0:s.id),f(o.playerId,t[i].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})},m.onclick=function(t){var s,o,i,n=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(n=e(n))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(i=l.classList)||void 0===i||i.add("hidden"),u.style.backgroundColor="unset")}},n=0;n<t.length;n++)i(n);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=p()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var i=g(c());o.appendChild(i),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),I}();export{j as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,f as d,B as c}from"./icons-3bd3bd8f.js";import{j as u,U as m,V as p,b as v,B as h,H as f}from"./generic-79a719c8.js";import{e as C,p as g,g as y}from"./skin-58b9263c.js";import{a as b}from"./autoNextVideo-3d6570ee.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-b7fd8308.js";import"./util-80257541.js";function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}var E=a.getComponent("Component"),k=function(){n(L,E);var k,S,x=(k=L,S=N(),function(){var e,t=l(k);if(S){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function L(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,L),(d=x.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var v,h,f,C,g=null==c||null===(v=c.sres)||void 0===v?void 0:v.seasons,y=[];g.map(function(t){y.push.apply(y,e(t.episodes))}),m(y),p(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),b({playerId:d.playerId,content:y,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(L,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-87343239.js").then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),s.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),s.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(s)};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){if("series-selector-cross-icon"===n.className)e.classList.add("hidden"),s.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===n.className){var o=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),n.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(o,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var l=g(d());n.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,l),y(this.playerId).on("fullscreenchange",function(){var s=document.getElementById(t.playerId);if(s){var o=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(o,"px")}})}},{key:"createSeasonLister",value:function(){var e=this;y(this.playerId);for(var t=v(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(o));var l=document.createElement("div");l.className="season - ".concat(o),l.textContent=null===(n=t[o])||void 0===n?void 0:n.title;var r=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==o&&(r.checked=!0),r.onclick=function(t){h.set(o),e.showSeasonDetails(o)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(s,i)},n=0;n<t.length;n++)o(n);return s}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map(function(e){var t,s,n,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9,watchedPercentage:(null==o||null===(i=o.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}});for(var n=function(n){var i,l,r,d,c,u,m,v=a.dom.createEl("div",{className:"series-container"}),h=a.dom.createEl("div",{className:"series-section",index:n}),C=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")}),g=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(h,C),a.dom.appendContent(h,g),a.dom.appendContent(v,h),a.dom.appendContent(s,v);var y=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[n])||void 0===l?void 0:l.description)||"";(null===(r=b)||void 0===r?void 0:r.length)>170&&(b=b.substr(0,170)+"...");var N=a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=a.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[n])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(u=c.customData)||void 0===u?void 0:u.fallbackImage)),E.alt="".concat(null===(m=t[n])||void 0===m?void 0:m.title),a.dom.appendContent(y,E),a.dom.appendContent(y,N),a.dom.appendContent(v,y),a.dom.appendContent(s,v),y.onclick=function(e){var s;e.stopPropagation(),p(null===(s=t[n])||void 0===s?void 0:s.id),f(o.playerId,t[n].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})},h.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=v()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=g(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),L}();export{k as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{E as a,e as d,B as c}from"./icons-37daa6b3.js";import{G as m}from"./generic-7505da7f.js";import{b as u,l as p,i as v,g as h,e as f}from"./currentVideoInfo-0b234e55.js";import{g as C,p as y}from"./skin-65765793.js";import{a as g}from"./autoNextVideo-7323cf5f.js";import{g as b}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"md5";import"js-cookie";import"./captions-78bd2908.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-a420b997.js";function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}var E=r.getComponent("Component"),k=function(){n(L,E);var k,S,x=(k=L,S=N(),function(){var e,t=l(k);if(S){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function L(o){var n,i,l,r,a,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,L),(d=x.call(this,o,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(r=s(d))&&void 0!==r&&r.autoPlayNext&&null!=c&&null!==(a=c.series)&&void 0!==a&&a.enable){var m,h,f,C,y=null==c||null===(m=c.sres)||void 0===m?void 0:m.seasons,b=[];y.map(function(t){b.push.apply(b,e(t.episodes))}),p(b),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),g({playerId:d.playerId,content:b,cb:d.cb,series:null==c?void 0:c.sres})}return d}return o(L,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-87343239.js").then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,o=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),o.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=r.dom.createEl("div",{className:"series-selection-container hidden"});r.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(o)};var s=document.getElementById(this.playerId);if(s){var n=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);o.style.height="".concat(n,"px"),r.dom.appendContent(t,o),s.style.overflow="hidden",this.addFunctionality(o)}}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),s=r.dom.createEl("div",{className:"series-selector-head"}),n=r.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){if("series-selector-cross-icon"===n.className)e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===n.className){var s=r.dom.$(".series-selector-content",t.el());for(r.dom.$(".series-selector-cross-icon",t.el()),n.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=t.createSeasonLister();for(r.dom.appendContent(s,i),r.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var l=y(d());n.appendChild(l)}};var i=r.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=r.dom.createEl("div",{className:"series-selector-content"}),a=this.createSeasonLister();r.dom.appendContent(l,a),r.dom.appendContent(s,n),r.dom.appendContent(s,i),r.dom.appendContent(e,s),r.dom.appendContent(e,l),b(this.playerId).on("fullscreenchange",function(){var o=document.getElementById(t.playerId);if(o){var s=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}})}},{key:"createSeasonLister",value:function(){var e=this;b(this.playerId);for(var t=h(),o=r.dom.createEl("div",{className:"season-container"}),s=function(s){var n,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(s));var l=document.createElement("div");l.className="season - ".concat(s),l.textContent=null===(n=t[s])||void 0===n?void 0:n.title;var a=r.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){f.set(s),e.showSeasonDetails(s)},r.dom.appendContent(i,a),r.dom.appendContent(i,l),r.dom.appendContent(o,i)},n=0;n<t.length;n++)s(n);return o}},{key:"getSeasonDetailsContainer",value:function(t,o){var s=this;t=t.map(function(e){var t,o,n,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(o=e.gist)||void 0===o||null===(n=o.imageGist)||void 0===n?void 0:n.r16x9,watchedPercentage:(null==s||null===(i=s.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}});for(var n=function(n){var i,l,a,d,c,u,p,h=r.dom.createEl("div",{className:"series-container"}),f=r.dom.createEl("div",{className:"series-section",index:n}),C=r.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")}),y=r.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});r.dom.appendContent(f,C),r.dom.appendContent(f,y),r.dom.appendContent(h,f),r.dom.appendContent(o,h);var g=r.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[n])||void 0===l?void 0:l.description)||"";(null===(a=b)||void 0===a?void 0:a.length)>170&&(b=b.substr(0,170)+"...");var N=r.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=r.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[n])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(u=c.customData)||void 0===u?void 0:u.fallbackImage)),E.alt="".concat(null===(p=t[n])||void 0===p?void 0:p.title),r.dom.appendContent(g,E),r.dom.appendContent(g,N),r.dom.appendContent(h,g),r.dom.appendContent(o,h),g.onclick=function(e){var o;e.stopPropagation(),v(null===(o=t[n])||void 0===o?void 0:o.id),m(s.playerId,t[n].id).then(function(e){null!=s&&s.cb&&s.cb(e)}).catch(function(e){null!=s&&s.cb&&s.cb(e)})},f.onclick=function(t){var o,s,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(o=l.classList)&&void 0!==o&&o.contains("hidden")?(h.style.backgroundColor="#0000007d",null==l||null===(s=l.classList)||void 0===s||s.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),h.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=r.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var o=h()[e].episodes;this.getSeasonDetailsContainer(o,t);var s=r.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var n=y(c());s.appendChild(n),r.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),L}();export{k as default};