@viewlift/player-backup 2.0.261-backup → 2.0.262-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 (155) hide show
  1. package/cjs/autoNextVideo-f25b83b7.js +1 -0
  2. package/cjs/bundle.css +35 -35
  3. package/cjs/caption-settings-d1eb3bf6.js +1 -0
  4. package/cjs/captions-dbc83a75.js +1 -0
  5. package/cjs/currentVideoInfo-31d70bec.js +1 -0
  6. package/cjs/features-e124228b.js +1 -0
  7. package/cjs/generic-9c38d746.js +1 -0
  8. package/cjs/helper-a50a8ffc.js +1 -0
  9. package/cjs/index-3e6dc5e2.js +1 -0
  10. package/cjs/index-3f0e537b.js +1 -0
  11. package/cjs/index-449b54d6.js +1 -0
  12. package/cjs/index-4905764c.js +1 -0
  13. package/cjs/index-ef1ba89c.js +1 -0
  14. package/cjs/index.js +1 -1
  15. package/cjs/multicamv2-2749d481.js +1 -0
  16. package/cjs/multicamv2-f8f0f4dc.js +1 -0
  17. package/cjs/nextEpisodeButton-db3ccc2e.js +1 -0
  18. package/cjs/playlist-36e39c60.js +1 -0
  19. package/cjs/resolution-f9dcc1b4.js +1 -0
  20. package/cjs/resolution-v2-e42e0101.js +1 -0
  21. package/cjs/series-47e431e6.js +1 -0
  22. package/cjs/series-v2-1e51295c.js +1 -0
  23. package/cjs/series-v2-d01ae047.js +1 -0
  24. package/cjs/settings-icon-b43f4406.js +1 -0
  25. package/cjs/{skin-3ea04cef.js → skin-4b59dbca.js} +1 -1
  26. package/cjs/skin-5ac45888.js +1 -0
  27. package/cjs/skin-9ecfd417.js +1 -0
  28. package/cjs/skin-c742f011.js +1 -0
  29. package/cjs/skin-d4a41771.js +1 -0
  30. package/cjs/skin-da0f0794.js +1 -0
  31. package/cjs/skin-db3ac243.js +1 -0
  32. package/cjs/skin-e4d7b69d.js +1 -0
  33. package/cjs/skin-e6dc154d.js +1 -0
  34. package/cjs/skin-f5e18b89.js +1 -0
  35. package/cjs/start-begin-btn-5739a6c0.js +1 -0
  36. package/cjs/util-5b1c1844.js +1 -0
  37. package/cjs/videoSelector-1e445b08.js +1 -0
  38. package/cjs/videoSelector-c09cc79c.js +1 -0
  39. package/cjs/videojs-dash5.es-78624126.js +1 -0
  40. package/cjs/watch-live-btn-822534d1.js +1 -0
  41. package/esm/autoNextVideo-5fb58d99.js +1 -0
  42. package/esm/bundle.css +35 -35
  43. package/esm/caption-settings-6001af40.js +1 -0
  44. package/esm/{captions-78bd2908.js → captions-f507e8ee.js} +1 -1
  45. package/esm/{currentVideoInfo-0b234e55.js → currentVideoInfo-a8a254c2.js} +1 -1
  46. package/esm/features-3e10d66c.js +1 -0
  47. package/esm/generic-61db4ca3.js +1 -0
  48. package/esm/helper-349e076f.js +1 -0
  49. package/esm/index-277411a6.js +1 -0
  50. package/esm/index-2b305c0c.js +1 -0
  51. package/esm/index-34f977e4.js +1 -0
  52. package/esm/index-4cc8ac6f.js +1 -0
  53. package/esm/index-8e3eab6d.js +1 -0
  54. package/esm/index.js +1 -1
  55. package/esm/multicamv2-ac12df30.js +1 -0
  56. package/esm/multicamv2-fea6877d.js +1 -0
  57. package/esm/nextEpisodeButton-a3603966.js +1 -0
  58. package/esm/playlist-b8ece53c.js +1 -0
  59. package/esm/resolution-1c59b0f3.js +1 -0
  60. package/esm/resolution-v2-705ae275.js +1 -0
  61. package/esm/series-32cff646.js +1 -0
  62. package/esm/series-v2-71223649.js +1 -0
  63. package/esm/series-v2-a17e161b.js +1 -0
  64. package/esm/settings-icon-1e7b0951.js +1 -0
  65. package/esm/skin-0289d02e.js +1 -0
  66. package/esm/skin-0ac4a40b.js +1 -0
  67. package/esm/skin-362b56cd.js +1 -0
  68. package/esm/skin-3dcba1b2.js +1 -0
  69. package/esm/skin-3fc1c3fb.js +1 -0
  70. package/esm/skin-5754db93.js +1 -0
  71. package/esm/skin-5a791719.js +1 -0
  72. package/esm/skin-b24977d3.js +1 -0
  73. package/esm/skin-e8ec3aa7.js +1 -0
  74. package/esm/skin-f6e31ce5.js +1 -0
  75. package/esm/start-begin-btn-1e096fec.js +1 -0
  76. package/esm/util-14c993a4.js +1 -0
  77. package/esm/utilities/beacon.d.ts +2 -2
  78. package/esm/videoSelector-191d20c6.js +1 -0
  79. package/esm/videoSelector-91c3d768.js +1 -0
  80. package/esm/videojs-dash5.es-defc33ab.js +1 -0
  81. package/esm/watch-live-btn-5419f3a7.js +1 -0
  82. package/package.json +1 -1
  83. package/cjs/autoNextVideo-e42fc428.js +0 -1
  84. package/cjs/caption-settings-25cabfc0.js +0 -1
  85. package/cjs/captions-68e263dd.js +0 -1
  86. package/cjs/currentVideoInfo-5802821b.js +0 -1
  87. package/cjs/features-cd48b2b6.js +0 -1
  88. package/cjs/generic-f04cb45e.js +0 -1
  89. package/cjs/helper-dbf2fb22.js +0 -1
  90. package/cjs/index-1736603c.js +0 -1
  91. package/cjs/index-5bdf1cfd.js +0 -1
  92. package/cjs/index-7ae433c7.js +0 -1
  93. package/cjs/index-84cce26a.js +0 -1
  94. package/cjs/index-eafb9077.js +0 -1
  95. package/cjs/multicamv2-4d7833f1.js +0 -1
  96. package/cjs/multicamv2-825cb17d.js +0 -1
  97. package/cjs/nextEpisodeButton-056dd4d9.js +0 -1
  98. package/cjs/playlist-4932e799.js +0 -1
  99. package/cjs/resolution-9c4872ec.js +0 -1
  100. package/cjs/resolution-v2-50cbd77b.js +0 -1
  101. package/cjs/series-c3a14f61.js +0 -1
  102. package/cjs/series-v2-1d193d93.js +0 -1
  103. package/cjs/series-v2-57b1c5b8.js +0 -1
  104. package/cjs/settings-icon-a419af57.js +0 -1
  105. package/cjs/skin-066dceed.js +0 -1
  106. package/cjs/skin-77549792.js +0 -1
  107. package/cjs/skin-80fd2d0c.js +0 -1
  108. package/cjs/skin-969cc371.js +0 -1
  109. package/cjs/skin-add44dae.js +0 -1
  110. package/cjs/skin-c1af6004.js +0 -1
  111. package/cjs/skin-cfc775a4.js +0 -1
  112. package/cjs/skin-e54f3fd3.js +0 -1
  113. package/cjs/skin-eeec7a85.js +0 -1
  114. package/cjs/start-begin-btn-5adfa5b7.js +0 -1
  115. package/cjs/util-7186e89f.js +0 -1
  116. package/cjs/videoSelector-5f1cf380.js +0 -1
  117. package/cjs/videoSelector-810471f8.js +0 -1
  118. package/cjs/videojs-dash5.es-75637b78.js +0 -1
  119. package/cjs/watch-live-btn-1c5d2e69.js +0 -1
  120. package/esm/autoNextVideo-7323cf5f.js +0 -1
  121. package/esm/caption-settings-3a5e2e2d.js +0 -1
  122. package/esm/features-f634dd8c.js +0 -1
  123. package/esm/generic-7505da7f.js +0 -1
  124. package/esm/helper-d52dff3c.js +0 -1
  125. package/esm/index-04f28499.js +0 -1
  126. package/esm/index-2ab55f4b.js +0 -1
  127. package/esm/index-3860a02a.js +0 -1
  128. package/esm/index-5d92eaa3.js +0 -1
  129. package/esm/index-aee2840d.js +0 -1
  130. package/esm/multicamv2-b2a07ed1.js +0 -1
  131. package/esm/multicamv2-d19801a7.js +0 -1
  132. package/esm/nextEpisodeButton-29cc11c2.js +0 -1
  133. package/esm/playlist-2b356158.js +0 -1
  134. package/esm/resolution-62be852a.js +0 -1
  135. package/esm/resolution-v2-6446fe47.js +0 -1
  136. package/esm/series-dee1a2af.js +0 -1
  137. package/esm/series-v2-b13de828.js +0 -1
  138. package/esm/series-v2-f7307228.js +0 -1
  139. package/esm/settings-icon-7d9e5221.js +0 -1
  140. package/esm/skin-5a424471.js +0 -1
  141. package/esm/skin-61229ce9.js +0 -1
  142. package/esm/skin-65765793.js +0 -1
  143. package/esm/skin-6cf385ed.js +0 -1
  144. package/esm/skin-8db4ed62.js +0 -1
  145. package/esm/skin-a2b5e469.js +0 -1
  146. package/esm/skin-aeae977d.js +0 -1
  147. package/esm/skin-b3357b0d.js +0 -1
  148. package/esm/skin-d656e076.js +0 -1
  149. package/esm/skin-f21ef5ec.js +0 -1
  150. package/esm/start-begin-btn-16534825.js +0 -1
  151. package/esm/util-a420b997.js +0 -1
  152. package/esm/videoSelector-0bea276f.js +0 -1
  153. package/esm/videoSelector-40c30c18.js +0 -1
  154. package/esm/videojs-dash5.es-1a1bf509.js +0 -1
  155. package/esm/watch-live-btn-ddcfab89.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";var e,i=require("./currentVideoInfo-31d70bec.js"),t=require("./generic-9c38d746.js"),n=require("./util-5b1c1844.js"),o=require("./skin-f5e18b89.js"),r=require("./player_instance-fcf6a8fb.js"),u=0,d=0,c=function e(n,r,u,c){d=n,n>u.length-1||(i.setVideoIdx(d+1),t.load(r,u[n].id).then((function(e){o.highlightVideo(d,r),d++,s(e)})).catch((function(i){s(i),setTimeout((function(){o.highlightVideo(d,r),d++,e(d,r,u)}),5e3)})))},s=function(i){e&&e(i)};exports.autoPlayNext=function(h){clearTimeout(u);var l=null==h?void 0:h.content;e=null==h?void 0:h.cb;var a=h.playerId;n.onVideoEnded(a,(function(){var e=r.getPlayer(a);0!==(null==e?void 0:e.currentTime())&&((d=i.getVideoIdx())>l.length-1||(i.setVideoIdx(d+1),t.load(a,l[d].id).then((function(e){o.highlightVideo(d,a),i.setCurrentVideo(e.response),d++,s(e)})).catch((function(e){s(e),o.highlightVideo(d,a),d++,u=setTimeout((function(){t.isPaused(a)&&c(d,a,l)}),5e3)}))))}))},exports.switchToNext=c;
package/cjs/bundle.css CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
 
4
4
 
5
+
5
6
  .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
6
7
  height: 0.7em;
7
8
  position: absolute;
@@ -767,7 +768,6 @@ iframe{
767
768
 
768
769
 
769
770
 
770
-
771
771
  .video-js.skin_news_live .vjs-button>.vjs-icon-placeholder:before {
772
772
  font-size: 2.2em;
773
773
  line-height: 2.6;
@@ -1919,7 +1919,6 @@ iframe{
1919
1919
 
1920
1920
 
1921
1921
 
1922
-
1923
1922
  .video-js .multicamera-parent.default{
1924
1923
  height: 345px;
1925
1924
  position: absolute;
@@ -2001,6 +2000,8 @@ iframe{
2001
2000
 
2002
2001
 
2003
2002
 
2003
+
2004
+
2004
2005
  .vjs-custom-big-mute.vjs-control{
2005
2006
  position: absolute;
2006
2007
  align-items: center;
@@ -2049,7 +2050,6 @@ iframe{
2049
2050
  width: 22px;
2050
2051
  }
2051
2052
 
2052
-
2053
2053
  /* nextep */
2054
2054
  .next-ep-preview{
2055
2055
  position: absolute;
@@ -2125,6 +2125,38 @@ iframe{
2125
2125
  margin-left: 8px;
2126
2126
  }
2127
2127
  }
2128
+ /* a wrapper element that tracks the mouse vertically */
2129
+ .vjs-thumbnail-holder {
2130
+ position: absolute;
2131
+ left: -1000px;
2132
+ }
2133
+
2134
+ /* the thumbnail image itself */
2135
+ .vjs-thumbnail {
2136
+ position: absolute;
2137
+ left: 0;
2138
+ bottom: 1.3em;
2139
+ opacity: 0;
2140
+ transition: opacity .2s ease;
2141
+ -webkit-transition: opacity .2s ease;
2142
+ -moz-transition: opacity .2s ease;
2143
+ -mz-transition: opacity .2s ease;
2144
+ }
2145
+
2146
+ /* fade in the thumbnail when hovering over the progress bar */
2147
+ /* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
2148
+ .vjs-progress-control:hover .vjs-thumbnail,
2149
+ .vjs-progress-control.fake-active .vjs-thumbnail,
2150
+ .vjs-progress-control:active .vjs-thumbnail {
2151
+ opacity: 1;
2152
+ }
2153
+
2154
+ /* ... but hide the thumbnail when hovering directly over it */
2155
+ .vjs-progress-control:hover .vjs-thumbnail:hover,
2156
+ .vjs-progress-control:active .vjs-thumbnail:active {
2157
+ opacity: 0;
2158
+ }
2159
+
2128
2160
  .video-js.vjs-quality-menu {
2129
2161
  display: block;
2130
2162
  }
@@ -2195,38 +2227,6 @@ iframe{
2195
2227
  -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
2196
2228
  animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
2197
2229
  }
2198
- /* a wrapper element that tracks the mouse vertically */
2199
- .vjs-thumbnail-holder {
2200
- position: absolute;
2201
- left: -1000px;
2202
- }
2203
-
2204
- /* the thumbnail image itself */
2205
- .vjs-thumbnail {
2206
- position: absolute;
2207
- left: 0;
2208
- bottom: 1.3em;
2209
- opacity: 0;
2210
- transition: opacity .2s ease;
2211
- -webkit-transition: opacity .2s ease;
2212
- -moz-transition: opacity .2s ease;
2213
- -mz-transition: opacity .2s ease;
2214
- }
2215
-
2216
- /* fade in the thumbnail when hovering over the progress bar */
2217
- /* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
2218
- .vjs-progress-control:hover .vjs-thumbnail,
2219
- .vjs-progress-control.fake-active .vjs-thumbnail,
2220
- .vjs-progress-control:active .vjs-thumbnail {
2221
- opacity: 1;
2222
- }
2223
-
2224
- /* ... but hide the thumbnail when hovering directly over it */
2225
- .vjs-progress-control:hover .vjs-thumbnail:hover,
2226
- .vjs-progress-control:active .vjs-thumbnail:active {
2227
- opacity: 0;
2228
- }
2229
-
2230
2230
  .vjs-poster {
2231
2231
  display: inline-block;
2232
2232
  vertical-align: middle;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),r=require("./icons-2609dbe4.js"),c=require("./captions-dbc83a75.js"),l=require("./skin-f5e18b89.js");function s(e){var t=d();return function(){var n,i=o(e);if(t){var r=o(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return a(this,n)}}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}require("./player_instance-fcf6a8fb.js"),require("@babel/runtime/helpers/toConsumableArray");var p=i.getComponent("Component"),u=function(a){n(d,p);var o=s(d);function d(t){var n,a,i,r,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),(r=o.call(this,t,c)).playerId=c.playerId,r.seriesData=c.sres,r.currentVideoData=c.res,r.initialiseStructure(),r.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(i=a.style)||void 0===i||i.setProperty("display","none","important"),r}return t(d,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r.CaptionsSvgV2())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./caption-settings-34ca0188.js")})).then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=c.getCaptions(this.playerId);null==t||t.map((function(t){return c.disableCaptions(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(l.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",l.setUpdatedElHeight(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var r=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(r),i.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),l.detectOrientationChange(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),c=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,c),i.dom.appendContent(c,s),l.handleDrawerResizing(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),c.getCaptions(e.playerId).map((function(t){return c.disableCaptions(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var l=c.getCaptions(this.playerId),s=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});s.onchange=function(t){c.enableCaptions(e.playerId,l[n].id)},s.setAttribute("type","radio"),i.dom.appendContent(o,s),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),d}();exports.default=u;
@@ -0,0 +1 @@
1
+ "use strict";var t=require("./player_instance-fcf6a8fb.js");exports.addCaptions=function(e,n){var a=t.getPlayer(e);a.remoteTextTracks().tracks_.map((function(t){a.removeRemoteTextTrack(t)})),n.map((function(t){a.addRemoteTextTrack({src:t.url,srclang:t.srclang,label:t.label||(null==t?void 0:t.language)})}))},exports.disableCaptions=function(e,n){for(var a=t.getPlayer(e).textTracks(),r=0;r<a.length;r++){var s=a[r];"subtitles"!==s.kind&&"captions"!==s.kind||s.id!==n||(s.mode="hidden")}},exports.enableCaptions=function(e,n){var a,r,s;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(r=a[0])||void 0===r||null===(s=r.style)||void 0===s||s.setProperty("display","flex"));for(var l=t.getPlayer(e).textTracks(),i=0;i<l.length;i++){var o=l[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},exports.getCaptions=function(e){var n,a=t.getPlayer(e);return(null==a||null===(n=a.textTracks())||void 0===n?void 0:n.tracks_.filter((function(t){return"subtitles"==t.kind||"captions"===t.kind})))||[]},exports.removeCaptions=function(e){var n=t.getPlayer(e);n.remoteTextTracks().tracks_.map((function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)}))};
@@ -0,0 +1 @@
1
+ "use strict";var e,t,r,n,o,i,u,s=[],c=(i=new Map,{set:function(e){var t,r=(null==e||null===(t=e.video)||void 0===t?void 0:t.id)||e||null;i.set(r,(i.get(r)||0)+1)},get:function(e){return i.get(e)},clear:function(){i.clear()}}),p=function(e){r=e},a=(u=0,{set:function(e){e>=0&&(u=e)},get:function(){return u}});exports.createIdxMapping=function(e){n=new Map,e.map((function(e,t){n.set(e.id,t)}))},exports.getCurrentEpgPrograms=function(){return s},exports.getCurrentSeries=function(){return e},exports.getCurrentVideo=function(){return t},exports.getSeriesWatchMap=function(){return o},exports.getVideoIdx=function(){return r},exports.seasonIdxManager=a,exports.setCurrentEpgPrograms=function(e){s=e},exports.setCurrentSeries=function(t){e=t},exports.setCurrentVideo=function(e){t=e},exports.setSeriesWatchMap=function(e){o=e},exports.setVideoIdx=p,exports.setVideoIdxById=function(e){if(n){var t=n.get(e);p(t+1)}},exports.videoReplayTracker=c;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-9c38d746.js"),s=require("./resolution-f9dcc1b4.js"),u=require("./skin-f5e18b89.js"),d=require("./localisation-56e0a999.js"),c=require("./player_instance-fcf6a8fb.js");function h(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 g(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}exports.addBigMuteButton=function(e,t){Promise.resolve().then((function(){return require("./index-4905764c.js")})).then((function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("MuteButton",n),o.addChild("MuteButton",g({playerId:e},t))}))},exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-d1eb3bf6.js")})).then((function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=c.getPlayer(e).el(),r=0,n=c.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-2749d481.js")})).then((function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-f8f0f4dc.js")})).then((function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-db3ccc2e.js")})).then((function(n){var o=n.default,l=c.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=c.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-36e39c60.js")})).then((function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-v2-e42e0101.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=c.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-47e431e6.js")})).then((function(n){var o=n.seriesModule,l=c.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},u=0;u<a.length;u++)s(u)}))},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then((function(){return require("./series-v2-d01ae047.js")})).then((function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./series-v2-1e51295c.js")})).then((function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-b43f4406.js")})).then((function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addStartFromBeginningButton=function(e,t){Promise.resolve().then((function(){return require("./start-begin-btn-5739a6c0.js")})).then((function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",g({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_})));o.startFromBeginningButton=l}))},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-1e445b08.js")})).then((function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-c09cc79c.js")})).then((function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addWatchLiveButton=function(e,t){Promise.resolve().then((function(){return require("./watch-live-btn-822534d1.js")})).then((function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",g({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_}))+1);o.watchLiveButton=l}))};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("axios"),i=require("./player_instance-fcf6a8fb.js"),l=require("md5"),a=require("js-cookie"),d=require("./currentVideoInfo-31d70bec.js"),u=require("./captions-dbc83a75.js"),s=require("@babel/runtime/helpers/typeof"),c=require("./skin-f5e18b89.js"),v=require("@babel/runtime/helpers/toConsumableArray"),m=require("@babel/runtime/helpers/slicedToArray"),f=require("@viewlift/comscore/index.js");function p(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function g(e,n){p("event",e,n)}var h={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function y(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 E(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?y(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):y(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var w={name:"@viewlift/player",version:"2.1.29",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/sse":"^0.0.3","@viewlift/comscore":"^1.0.9",axios:"^1.2.3",md5:"^2.3.0","broadcast-channel":"^7.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","jwt-decode":"^4.0.0","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=w.version;var I,T=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":A.get()+"".concat(null==h?void 0:h.getVideoDetails)},b=function(e,n){var t,o,i,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:T(),params:E({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":w.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},S=function(e,n){var t,o,i,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:A.get()+h.getLinearChannelDetails,params:E(E(E(E(E({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},_=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:return o=e.sent,e.abrupt("return",r({url:A.get()+"".concat(null==h?void 0:h.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:E({},n),params:E({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:A.get()+"".concat(null==h?void 0:h.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},P=function(e){var n=e.videoId;return r({method:"GET",url:A.get()+"".concat(null==h?void 0:h.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},A=(I=null==h?void 0:h.apiBaseUrl,{set:function(e){e&&(I=e)},get:function(){return I}}),D=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},L=null;function k(){return{set:function(e){e&&(L=e)},get:function(){return L}}}var C=function(){var e=n(t.mark((function e(){var n,o,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=k().get(),o=A.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),R=null,F=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!D(n)){e.next=6;break}return R||(R=C().then((function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&k().set(i),r||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){R=null}))),e.abrupt("return",R);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function V(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 N(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?V(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var x=0,W=null,M=null,U=!1,B=function(){var e,n,t,o,r,i,l,a=d.getCurrentVideo();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find((function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(r=a.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function H(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function G(){return W||window.sessionStorage.getItem("uid")}function q(){return Q.apply(this,arguments)}function Q(){return(Q=n(t.mark((function e(){var n,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=H(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e),Y(e),z(e)};var Y=function(e){e.on("play",(function(){"pause"!==M||e.scrubbing()||(M="play",g("RESUME",{pfm:window.platform,uid:G(),vid:B(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"RESUME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))})),e.on("pause",(function(){setTimeout((function(){U||(M="pause",g("PAUSE",{pfm:window.platform,uid:G(),vid:B(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"PAUSE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))}),50)}))},z=function(e){if(e){var n=0,t=0,o=0,r=0;e.on("timeupdate",i),e.on("seeking",(function(){if(U)return;U=!0,e.off("timeupdate",i),e.one("seeked",l)})),e.on("seeked",l)}function i(){n=t,t=Math.floor(e.currentTime()),n<t&&(r=n,n=t)}function l(){var n,t;o=Math.floor(e.currentTime());var l=Math.floor(o-r);if(0!==l&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")){var a=l>0?"SEEK_FORWARD":"SEEK_BACKWARD";g(a,{pfm:window.platform,uid:G(),vid:B(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:a,videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}r=Math.floor(e.currentTime()),setTimeout((function(){U=!1}),50),e.on("timeupdate",i)}};window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",(function(){var t,o,r,i=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,g(i?"FAILED_TO_START":"DROPPED_STREAM",N({pfm:window.platform,uid:G(),vid:B(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:n===i?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e,n,t){e.one("play",tryCatch((function(){var o,r,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null}),100),M="play",g("PLAY",N({pfm:window.platform,uid:G(),vid:B(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(i=r.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",N({"Video ID":B(),watchTime:Math.floor(e.currentTime())},t))})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,n){var t,o;if(n.el_){var r,i,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(o=t.className)&&void 0!==o&&o.includes("vjs-waiting")&&x<4)x++,g("BUFFERING",N({pfm:window.platform,uid:G(),vid:B(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,g("FIRST_FRAME",N({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:G(),vid:B()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var n,t,o,r,i,l;g("AD_REQUEST",N({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:G(),vid:B(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),g("AD_IMPRESSION",N({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:G(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:B()},null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var n=[];e.on("timeupdate",(function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(x=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var n=e.currentTime(),t=e.duration(),o=e.buffered(),r=0;r<o.length;r++){var i=o.start(r),l=o.end(r);if(K(n,i,l)){var a=Math.round(t-l);if(isFinite(a))return a}}}))()};var K=function(e,n,t){return e>=n&&e<=t};window.fireEvent=function(){var e=n(t.mark((function e(n){var o,i,l,a,u,s,c,v,m,f,p,g,y,E,w,I,T,b,S,_,O;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:return T=e.sent,b=j(T),S=null==b?void 0:b.site,_=null==b?void 0:b.siteId,e.t0=N,e.t1=N,e.t2=N({aid:S,cid:_,pfm:window.platform},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.params),e.t3={},e.next=12,G();case 12:return e.t4=e.sent,e.t5=B(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?(L=n.adPosition)?String(L):"":"",e.next=28,q();case 28:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(u=n.ttFirstFrame)&&void 0!==u?u:null,e.t23=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t24=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t25=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t26=null!==(m=n.bufferHealth)&&void 0!==m?m:null,e.t27=null!==(t=void 0,P=void 0,D=void 0,P=d.getCurrentVideo(),D=(null==P?void 0:P.contentType)||"video",f=(null==P||null===(t=P[D])||void 0===t?void 0:t.network)||null)&&void 0!==f?f:null,e.t28=null!=S?S:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(g=p.customData)||void 0===g||null===(y=g.beacon)||void 0===y?void 0:y.params,e.t33=(0,e.t0)(e.t31,e.t32),O=[e.t33],r({url:(null===(E=window)||void 0===E||null===(w=E.customData)||void 0===w||null===(I=w.beacon)||void 0===I?void 0:I.url)||A.get()+h.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:O}).catch((function(e){console.error(e)}));case 46:case"end":return e.stop()}var t,P,D,L}),e)})));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var X=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},J=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},$=function(){var e=d.seasonIdxManager.get();return e>=0?e+1:1},Z=function(){var e,n,t,o=d.getCurrentSeries(),r=d.getCurrentVideo(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,l=d.seasonIdxManager.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===i}));return a>=0?a+1:1};function ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function ne(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ee(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var te=l,oe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},re=function(e){var n=ie(e,"video.tags",[]),t=ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},ie=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},le=function(){var n,t,o,r,l,d,u,s,c,v,m,f,p,g,h,y,E,w,I,T,b,S,_,O,P,A,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",L=arguments.length>1?arguments[1]:void 0,k=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return D;var C=(null==k?void 0:k.siteName)||(null==k?void 0:k.site)||"",R=(null==k?void 0:k.contentType)||"video",F=(null==k||null===(o=k[R])||void 0===o?void 0:o.metadata)||(null==k||null===(r=k[R])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),j=i.getPlayer(L);if(!D.includes("VIEWLIFT_"))return D;var V,N=window.getComputedStyle(document.getElementById(L),null),x=Math.trunc(N.getPropertyValue("height").slice(0,-2)),W=Math.trunc(N.getPropertyValue("width").slice(0,-2)),M="linearchannel"===R?null==k||null===(d=k.linearchannel)||void 0===d||null===(u=d.channels)||void 0===u||null===(s=u.find((function(e){return(null==e?void 0:e.id)===(null==k?void 0:k.channelId)})))||void 0===s||null===(c=s.content)||void 0===c?void 0:c.id:ie(k,"video.gist.id",""),U="linearchannel"===R?null==k||null===(v=k.linearchannel)||void 0===v||null===(m=v.channels)||void 0===m||null===(f=m.find((function(e){return(null==e?void 0:e.id)===(null==k?void 0:k.channelId)})))||void 0===f?void 0:f.title:ie(k,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),B=null,H=null;"function"==typeof window.__gpp&&(null===(V=window)||void 0===V||V.__gpp("ping",(function(e){B=null==e?void 0:e.gppString,H=null==e?void 0:e.sectionList[0]})));var G=a.get("us_privacy")||a.get("usprivacy"),q=void 0!==G?G:"1YNN",Q=null!==(p=null===(g=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===g?void 0:g.fwIdentifier)&&void 0!==p?p:null,Y=ne(ne({},ae(F)),{},(O={VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:x,VIEWLIFT_SIZE:oe(W,x),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(h=window)||void 0===h?void 0:h.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ie(k,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ie(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ie(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==j||null===(y=j.options_)||void 0===y?void 0:y.autoplay)||1,VIEWLIFT_MUTE:(null==j||null===(E=j.options_)||void 0===E?void 0:E.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==C||"usanetwork"==C?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:re(k),VIEWLIFT_MEDIA_ID:M,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ie(k,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:M,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ie(k,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ie(null===(w=window)||void 0===w||null===(I=w.app_data)||void 0===I||null===(T=I.site)||void 0===T?void 0:T.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==C||"usanetwork"==C?"":ie(null===(b=window)||void 0===b||null===(S=b.app_data)||void 0===S||null===(_=S.site)||void 0===_?void 0:_.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:q,VIEWLIFT_TVE_PROVIDER:Q?te(Q):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*ie(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ie(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:M,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:ie(k,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ie(k,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Z(),VIEWLIFT_SEASON_NUMBER:$(),VIEWLIFT_CONTENT_TAGS:re(k),VIEWLIFT_GPP_SID:H||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:B||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(O,"VIEWLIFT_LAT",""),e(O,"VIEWLIFT_APP_BUNDLE",""),e(O,"VIEWLIFT_ATT_CONSENT",""),O),null===(P=window)||void 0===P||null===(A=P.customData)||void 0===A?void 0:A.macros);for(var z in Y){var K=new RegExp(z,"g");D=D.replace(K,Y[z])}return D},ae=function(e){var n,t,o,r,i,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,s=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.subscription)||void 0===l?void 0:l.TVE)||!1;return u||s?(J()?u?a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):s&&(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=J()?ne(ne({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):ne(ne({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=J()?ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=ne(ne({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:d.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},de=function(e,n){var t,o,r,i,l,a,d,u,s,c,v,m,f,p=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,h=null==e||null===(o=e[p])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,y=null==e||null===(i=e[p])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.audioAssets,E=(null==e||null===(a=e[p])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[p])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var w=(null==e||null===(v=e[p])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(f=m.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return se(y);if(g){var I=ce(h,n);return I.src=le(I.src,n,e),I}if("Safari"!==X()&&w)return ue(h);if(E){var T=se(h);return T.src=le(T.src,n,e),T}if(null!=h&&h.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(h);return b.src=le(b.src,n,e),b}return null},ue=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},se=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},ce=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=X();if(i.getPlayer(n),"Safari"===d){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&i(e),i(null,t)}))}}}}}(r);return ve(n),u}var s,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(ve(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ve=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==X()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},me=function(e,n){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},fe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var pe=!1,ge=function(e,n,t){var o=le(n,e,t),r=i.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima&&"object"!==s(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,l=i.getPlayer(e);if(null!==l.el_){pe=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),pe&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout((function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,(function(){s&&l.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;l.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),l.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),l.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};var he,ye=(he=!0,{enable:function(){he=!0},disable:function(){he=!1},get enabled(){return he}}),Ee="ssai-breakStart",we="ssai-adImpression",Ie="ssai-firstQuartile",Te="ssai-midpoint",be="ssai-thirdQuartile",Se="ssai-complete",_e="ssai-breakEnd",Oe={breakStart:Ee,impression:we,firstQuartile:Ie,midpoint:Te,thirdQuartile:be,complete:Se,breakEnd:_e};function Pe(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Oe[o];r&&t.trigger(r,n)}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function De(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ae(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Le,ke=(Le=null,{get:function(){return Le},set:function(e){Le=e}});function Ce(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 Re(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ce(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Fe(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 je(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)?je(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 je(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 Ve,Ne=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),xe=(Ve=null,{set:function(e){Ve=e},get position(){return Ve}});function We(e,n){return Me.apply(this,arguments)}function Me(){return(Me=n(t.mark((function e(n,o){var r,l,a,d,u,s,c,v,f,p,g,h,y,E,w,I,T,b;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),a=de(o,n),d=a.src,u=(null==o?void 0:o.contentType)||"video",null==o||null===(r=o[u])||void 0===r||null===(l=r.streamingInfo)||void 0===l||l.isLiveStream,s=d.replace("/dash/","/session/").replace("/master/","/session/"),s=le(s,n,o),c=Be(s),v=m(c,2),f=v[0],p=v[1],g=Ue(p)||{},s=new URL(s.split("?")[0]),Object.keys(p).length>0&&Object.entries(p).forEach((function(e){var n=m(e,2),t=n[0],o=n[1];s.searchParams.set(t,o)})),e.prev=11,e.next=14,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Re({adsParams:Re({},f)},g))});case 14:return h=e.sent,e.next=17,h.json();case 17:return y=e.sent,E="https://"+new URL(s).hostname,w=y.trackingUrl,I=y.manifestUrl,T=E+w,b=E+I,Ne.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}}),e,null,[[11,29]])})))).apply(this,arguments)}function Ue(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map((function(e){var n=m(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]})))||{}}function Be(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=Fe((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=m(t.value,2),l=i[0],a=i[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){r.e(e)}finally{r.f()}for(var d={},u={},s=0,c=Object.entries(n);s<c.length;s++){var v=m(c[s],2),f=v[0],p=v[1];if(f.startsWith("ads."))d[f.replace(/^ads\./,"")]=p;else u[f]=p}return[d,u]}var He,Ge,qe,Qe,Ye=(He=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),He=Array.isArray(e)?v(e):He},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",He),v(He)}}),ze=new Map;function Ke(e,n){return Xe.apply(this,arguments)}function Xe(){return Xe=n(t.mark((function e(o,r){var l,a,d,u,s,m,f,p,g,h,y,E,w,I,T,b,S,_,O,P,A,D,L,k,C,R;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:R=function(e,n,t,r,l,a){var d,u,s=i.getPlayer(o);if(!s.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds;var v=(null==n||null===(d=n.ads)||void 0===d||null===(u=d[r])||void 0===u?void 0:u.adId)||c;e<k&&L.clear(),k=e,Math.floor(s.currentTime());var m,f=Fe(t);try{var p=function(){var t,i,l,d=m.value,u=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,g=d.startTime,h=d.durationInSeconds,y=p||c,E=f,w=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(l=i.ads)||void 0===l?void 0:l.adEventHandler)||null,I="".concat(v,"_").concat(u),T="pod-".concat(c);ze.has(T)||ze.set(T,new Set);var b=ze.get(T);if(console.warn(e,y,"map:",u,"condition1:",e>=y,"map:",ze),e>=y&&e<=y+D){if(!b.has(I)){b.add(I);try{C(u,n,E,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,u,n)}if("breakEnd"==u){var S=xe.position;xe.set(null),setTimeout((function(){null!=S&&(s.currentTime(S),a())}),500)}if("function"==typeof w)try{var _,O={eventType:u,startTimeInSeconds:p,startTime:g,durationInSeconds:h,ad:null==n||null===(_=n.ads)||void 0===_?void 0:_[r],pod:n,adIndex:r};w({adsData:O}),Pe(o,O)}catch(e){console.error("Error when calling ads callback:",e)}}var P=ke.get();if(P&&0!==Object.keys(P).length){var A=P.formulateComscoreAdPayload,k=P.startComscoreAdTracking,R=P.finishComscoreAdTracking,F=P.endComscoreAdTracking,j="".concat(y,"_").concat(v,"_").concat(u);if(!L.has(j))if(L.set(j,!0),"impression"===u){var V,N=Ne.get();k(A(Re(Re({},null==n||null===(V=n.ads)||void 0===V?void 0:V[r]),{},{trackingUrl:N})))}else"complete"===u?R():"breakEnd"===u&&F()}}};for(f.s();!(m=f.n()).done;)p()}catch(e){f.e(e)}finally{f.f()}}},C=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},ze.clear(),xe.set(r),g=Ne.get(),(h=i.getPlayer(o)).one("loadeddata",(function(){g&&P(g)})),y=new Map,E=new Map,w=-1,I=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,T=(null==h||null===(d=h.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,b=(null==h||null===(u=h.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,S=(null==h||null===(s=h.el())||void 0===s||null===(m=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===m?void 0:m[0])||null,_=(null==h||null===(f=h.el())||void 0===f||null===(p=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,O=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return v(o);var r=[],i=null==o?void 0:o.find((function(e){return"breakEnd"===(null==e?void 0:e.eventType)})),l=(null==i||null===(e=i.beaconUrls)||void 0===e?void 0:e.find((function(e){return e.includes("videoView")})))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter((function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)})),u=(null==d?void 0:d.some((function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some((function(e){return e.includes("videoView")}))})))||!1;if(!u&&l){var s=null==d?void 0:d.map((function(e){return Re(Re({},e),{},{eventType:"videoView",beaconUrls:[l]})}));null!=s&&s[0]&&r.push(null==s?void 0:s[0])}return r},P=function(){var e=n(t.mark((function e(n){var l,a,d,u,s,m,f,p,g,h,P,D,L,k,C,F,j,V,N,x,W,M,U,B;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x=function(e){document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",x),0===e.button&&j()},N=function(e){},V=function(){var e,n=h.currentTime(),t=null,o=Fe(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){h.currentTime(t+2.2)}),100))},j=function(){var e,n=h.currentTime(),t=null,o=Fe(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,d=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>i)&&!y.has(i)||n>=i&&n<=d)&&(t=i,y.set(i,!0),E.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){h.currentTime(t-.4)}),100))},s=!1,e.next=7,fetch(n);case 7:return m=e.sent,e.next=10,m.json();case 10:f=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",f),p=f.avails,g=[],h=i.getPlayer(o),P=h.controlBar.progressControl,D=P.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),p.map((function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(s=!0),g.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:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),!s&&r&&(h.currentTime(r),V()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g,"function"==typeof(F=(null===(L=window)||void 0===L||null===(k=L.customData)||void 0===k||null===(C=k.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&(null==g?void 0:g.length)>0&&F(g)),console.log(g,"data"),g.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=h.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",D.appendChild(i)}})),h._timeUpdateHandler&&h.off("timeupdate",h._timeUpdateHandler),h._timeUpdateHandler=c.throttle((function(){var e=h.currentTime();if(e!==w){w=e;for(var n=!1,t=function(){var t=g[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-4&&e<=a+4){var d;e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&y.set(r,!0),ye.disable(),I&&I.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),P.el().classList.add("hide-progress-bar");for(var u=e-r,s=0,c=0,m=0;m<l.length;m++){var f,p=null==l||null===(f=l[m])||void 0===f?void 0:f.durationInSeconds;if(u<s+p){c=m;break}s+=p}l[c];var h=Math.max(0,i-u),w=Math.round(h);W.style.display="block",B.textContent="".concat(c+1," of ").concat(l.length," • ").concat(A(w));var O=[];return null==l||l.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));O.push.apply(O,v(n))})),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&O.push.apply(O,v(null==t?void 0:t.podSlotImpressionBeacon)),R(e,t,O,c,0,V),"break"}E.delete(r)},o=0;o<g.length;o++){if("break"===t())break}n||(W.style.display="none",P.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),I&&I.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),ye.enable())}}),1e3),h.on("timeupdate",h._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",(function(e){ye.enabled&&"ArrowRight"==e.key&&(j(),dn(o,10),e.stopPropagation())})),P.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",x))})),null===(d=document)||void 0===d||null===(u=d.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach((function(e){return null==e?void 0:e.remove()})),(W=document.createElement("div")).className="ssai-ad-container",(M=document.createElement("div")).className="sponsored-adbox",(U=document.createElement("div")).className="sponsored-text",U.textContent="Sponsored Ad",M.append(U),(B=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",W.append(M),W.append(B),h.el().appendChild(W);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),D=1.5,L=new Map,k=-1;case 21:case"end":return e.stop()}}),e)}))),Xe.apply(this,arguments)}function Je(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 $e(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)?$e(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 $e(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 Ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function en(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ze(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var nn={},tn=(null===(Ge=window)||void 0===Ge||null===(qe=Ge.location)||void 0===qe||null===(Qe=qe.search)||void 0===Qe?void 0:Qe.includes("debug=true"))||!1,on=null;function rn(e){return ln.apply(this,arguments)}function ln(){return ln=n(t.mark((function e(o){var r,l,a,d,u,s,m,f,p,g,h,y,E,w,I,T,b,S,_,O,P,A,D,L,k,C,R;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:R=function(e,n,t,r,l){var a,d,u=i.getPlayer(o);if(!u.seeking()){var s=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[r])||void 0===d?void 0:d.adId)||s;Math.floor(u.currentTime());var v,m=Je(t);try{for(m.s();!(v=m.n()).done;){var f,p,g,h=v.value,y=h.eventType,E=h.beaconUrls,w=h.startTimeInSeconds,I=h.startTime,T=h.durationInSeconds,b=(h.eventId,w||s),S=E,_=(null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(y),P="pod-".concat(s);L.has(P)||L.set(P,new Set);var A=L.get(P);if(tn&&console.warn(e,b,"map:",y,"condition1:",e>=b,"map:",L),e>=b&&e<=b+k&&!A.has(O)){A.add(O);try{C(y,n,S,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,n)}if("function"==typeof _)try{var D,R={eventType:y,startTimeInSeconds:w,startTime:I,durationInSeconds:T,ad:null==n||null===(D=n.ads)||void 0===D?void 0:D[r],pod:n,adIndex:r};_({adsData:R}),Pe(o,R)}catch(e){console.error("Error when calling ads callback:",e)}var F=ke.get();if(F&&0!==Object.keys(F).length){var j=F.formulateComscoreAdPayload,V=F.startComscoreAdTracking,N=F.finishComscoreAdTracking,x=F.endComscoreAdTracking;if("impression"===y){var W,M=Ne.get();V(j(en(en({},null==n||null===(W=n.ads)||void 0===W?void 0:W[r]),{},{trackingUrl:M})))}else"complete"===y?N():"breakEnd"===y&&x()}}}}catch(e){m.e(e)}finally{m.f()}}},C=function(e,n,t,o){var r,i,l;"breakEnd"===e&&(null===(r=nn)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(i=nn)||void 0===i?void 0:i.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(tn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))})))},h=function(){on&&clearInterval(on)},p=Ne.get(),(g=i.getPlayer(o)).one("loadeddata",(function(){h(),on=setInterval((function(){p&&!g.paused()&&D(p)}),2e3)})),g.on("dispose",(function(){h()})),y=new Map,E=new Map,w=-1,I=null,T=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==g||null===(a=g.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,S=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,_=(null==g||null===(u=g.el())||void 0===u||null===(s=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===s?void 0:s[0])||null,O=(null==g||null===(m=g.el())||void 0===m||null===(f=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,P=!1,A=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return v(o);var r=[],i=null==o?void 0:o.find((function(e){return"breakEnd"===(null==e?void 0:e.eventType)})),l=(null==i||null===(e=i.beaconUrls)||void 0===e?void 0:e.find((function(e){return e.includes("videoView")})))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter((function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)})),u=(null==d?void 0:d.some((function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some((function(e){return e.includes("videoView")}))})))||!1;if(!u&&l){var s=null==d?void 0:d.map((function(e){return en(en({},e),{},{eventType:"videoView",beaconUrls:[l]})}));null!=s&&s[0]&&r.push(null==s?void 0:s[0])}return r},D=function(){var e=n(t.mark((function e(n){var r,l,a,d,u,s,m,f,p,g,h,D,L,k,C,F;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d=new URL(n),I&&d.searchParams.append("nextToken",I),e.next=4,fetch(d.toString(),{method:"GET"});case 4:return u=e.sent,e.next=7,u.json();case 7:s=e.sent,m=s.avails,f=s.nextToken||null,I=f,p=[],g=i.getPlayer(o),h=null==g||null===(r=g.controlBar)||void 0===r?void 0:r.progressControl,D=null==h||null===(l=h.seekBar)||void 0===l?void 0:l.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),m.map((function(e,n){p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),tn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p,"function"==typeof(F=(null===(L=window)||void 0===L||null===(k=L.customData)||void 0===k||null===(C=k.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&(null==p?void 0:p.length)>0&&F(p)),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=g.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",D.appendChild(i)}})),g._timeUpdateHandler&&g.off("timeupdate",null==g?void 0:g._timeUpdateHandler),g._timeUpdateHandler=c.throttle((function(){if(sn(o)){var e=null==g?void 0:g.currentTime();if(e!==w){w=e;for(var n=function(){var n=p[t],o=n.startTimeInSeconds,r=n.durationInSeconds,i=n.ads,l=o+r;if(e>=o-1.2&&e<=l+1.2){var a;P=!!(e>=o&&e<=l&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>l&&y.set(o,!0),ye.disable(),T&&T.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),S&&(S.el().style.pointerEvents="none",S.el().classList.add("vjs-hidden")),h.el().classList.add("hide-progress-bar");for(var d=e-o,u=0,s=0,c=0;c<i.length;c++){var m,f=null==i||null===(m=i[c])||void 0===m?void 0:m.durationInSeconds;if(d<u+f){s=c;break}u+=f}setTimeout((function(){nn.totalAds=null==i?void 0:i.length,nn.currentAdIndex=s}),1e3);var g=[];return null==i||i.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));g.push.apply(g,v(n))})),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&g.push.apply(g,v(null==n?void 0:n.podSlotImpressionBeacon)),R(e,n,g,s),"break"}E.delete(o)},t=0;t<p.length;t++){if("break"===n())break}P||(nn={},h.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),S&&(S.el().style.pointerEvents="auto",S.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),ye.enable())}}}),1e3),g.on("timeupdate",g._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),L=new Map,k=2.5;case 22:case"end":return e.stop()}}),e)}))),ln.apply(this,arguments)}function an(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var dn=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},un=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},sn=function(e){return!!o.getPlayer("".concat(e))},cn=function(){var e=n(t.mark((function e(o,r){var l,a,u,s=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,F();case 3:return a=e.sent,u=i.getPlayer(o),e.abrupt("return",new Promise((function(e,i){var s=(null==r?void 0:r.programs)||[];null==r||delete r.programs,S(r,a).then(function(){var i=n(t.mark((function n(i){var a,c,v,m,f,p,g,h;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=null==i?void 0:i.data,window.sid=H(),a.contentType="linearchannel",a.channelId=null==r?void 0:r.channelId,d.setCurrentVideo(a),d.setCurrentEpgPrograms(s),!l){n.next=16;break}if(g=(null==a||null===(c=a.linearchannel)||void 0===c?void 0:c.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(v=window)||void 0===v||null===(m=v.app_data)||void 0===m||null===(f=m.appcmsMain)||void 0===f||null===(p=f.adsConfig)||void 0===p?void 0:p.vodAdSticherProvider)||!1,h=de(a,o),!g){n.next=13;break}return n.next=12,We(o,a);case 12:h=n.sent;case 13:h&&(fn(o,h),g&&rn(o),u.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:a})}))),n.next=17;break;case 16:e({status:!0,msg:"Feed authenticated",response:a});case 17:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){i({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),vn=function(){var e=n(t.mark((function e(o,r,l){var a,s,c,v,m,f,p;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:return v=e.sent,(d.getCurrentSeries()||null)&&d.setVideoIdxById(r),m=0,f=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(c=s.watchHistory)&&void 0!==c&&c.enable&&O(r,v).then((function(e){var n,t,o,r,i,l,a;(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(null==e?void 0:e.data)),m=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(f=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)})).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))})),e.abrupt("return",new Promise((function(e,l){b(r,v).then(function(){var r=n(t.mark((function n(r){var a,s,c,v,g,h,y,E,w,I,T,b,S,_,O,P,A,D,L,k,C,R,F,j,V,N,x,W,M,U,B,H,G,q,Q,Y,z,K;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(P=null==r?void 0:r.data,A=(null==P?void 0:P.contentType)||"video",D=(null==P||null===(a=P[A])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(g=v.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,L=(null==P||null===(h=P.video)||void 0===h||null===(y=h.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,d.setCurrentVideo(r.data),(k=(null==P||null===(E=P.ads)||void 0===E||null===(w=E.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(T=I.web)||void 0===T?void 0:T.active)&&(null==P||null===(b=P.ads)||void 0===b||null===(S=b.preRoll)||void 0===S||null===(_=S.adTags)||void 0===_||null===(O=_.web)||void 0===O?void 0:O.url))&&ge(o,k,P),C=de(P,o),!D){n.next=12;break}return n.next=11,We(o,P);case 11:C=n.sent;case 12:C?(H=(null==P||null===(R=P.video)||void 0===R||null===(F=R.gist)||void 0===F?void 0:F.videoImageUrl)||(null==P||null===(j=P.video)||void 0===j||null===(V=j.gist)||void 0===V||null===(N=V.imageGist)||void 0===N?void 0:N.r16x9),(G=i.getPlayer(o)).poster(H),fn(o,C),D&&Ke(o,p),G.on("loadstart",(function(){L&&e({status:!0,msg:"Video Loaded",response:P})})),G.on("loadeddata",(function(){fe(),e({status:!0,msg:"Video Loaded",response:P})})),G.one("play",(function(){m&&!D&&f<95&&setTimeout((function(){G.currentTime(m)}),0)})),G.one("error",(function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==P||null===(x=P.video)||void 0===x||null===(W=x.contentDetails)||void 0===W||null===(M=W.closedCaptions)||void 0===M?void 0:M.length)>0||(null==P||null===(U=P.video)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==P||null===(Q=P.video)||void 0===Q||null===(Y=Q.contentDetails)||void 0===Y?void 0:Y.closedCaptions)||(null==P||null===(z=P.video)||void 0===z?void 0:z.closedCaptions),q=K.filter((function(e){return"VTT"===e.format})),u.addCaptions(o,q)):u.removeCaptions(o)):(me(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){pn(e,o,l,r)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),mn=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},fn=function(e,n){var t=i.getPlayer(e);t&&t.src(n)},pn=function(n,t,o,r){var i,l,a,d,u,s,c=null==n||null===(i=n.response)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);sn(t)&&me(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?an(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):an(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))};exports.adsQueuePointManager=Ye,exports.authenticateLC=cn,exports.baseUrlManager=A,exports.clearError=fe,exports.comscoreInstanceManager=ke,exports.createSeriesWatchMap=function(e,n){var t=new Map;P({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),d.setSeriesWatchMap(t)})).catch((function(e){return console.log(e)}))},exports.detectBrowser=X,exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){var n=(ke.get()||{}).destroyComscoreTag,t=i.getPlayer(e);if(mn(),"function"==typeof n&&n(),c.clearEventListeners(),window.onresize=null,t)t.dispose();else{var o=document.getElementById(e);o&&o.remove()}},exports.getDecodedToken=j,exports.getEntitlementData=function(e,n,t,o){var i,l;return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=Z,exports.getLinearChannelDetails=S,exports.getSGAIEnabledSource=We,exports.getSeasonNumber=$,exports.getSeriesDetails=function(e,n){var t,o,i=j(n),l=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):r({url:A.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=P,exports.getSource=de,exports.getSsaiEvents=function(e){var n=i.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Ee,e)},adImpression:function(e){return t(we,e)},adFirstQuartile:function(e){return t(Ie,e)},adMidpoint:function(e){return t(Te,e)},adThirdQuartile:function(e){return t(be,e)},adComplete:function(e){return t(Se,e)},adBreakEnd:function(e){return t(_e,e)}}},exports.getToken=F,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},exports.getUserId=G,exports.getVideoDetails=b,exports.getVideoInfo=O,exports.handleError=me,exports.initialiseAdvertisement=ge,exports.initialiseComscoreStreamingTracking=function(e,n){var t,o,r,l,a,u,s,c,v,m,p,g,h,y,E,w,I=null==e?void 0:e.playerId,T=i.getPlayer(I);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var b=d.getCurrentVideo(),S=(null==b||null===(o=b.video)||void 0===o?void 0:o.metadata)||[],_=(null==S?void 0:S.length)&&S.filter((function(e){return"advertisingGenre"===e.name}));if(null!==(r=_)&&void 0!==r&&r.length){var O=_.map((function(e){return e.value}));_=null==O?void 0:O.join(",")}f.destroyComscoreTag();var P,A,D,L=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,k=Array.isArray(null==L?void 0:L.category)?null==L||null===(a=L.category)||void 0===a?void 0:a.join(","):(null==L?void 0:L.category)||null,C=De(De(De({},null==b?void 0:b.video),null==b?void 0:b.linearchannel),{},{siteName:(null==b?void 0:b.site)||null,programId:(null==L?void 0:L.videotmsid)||null,programTitle:(null==L?void 0:L.lcProgrammeName)||null,episodeId:(null==L?void 0:L.videotmsid)||null,seasonNumber:(null==b||null===(u=b.video)||void 0===u||null===(s=u.series)||void 0===s?void 0:s.seasonNumber)||(null==L||null===(c=L.seriesDetails)||void 0===c?void 0:c.season)||null,episodeNumber:(null==b||null===(v=b.video)||void 0===v||null===(m=v.series)||void 0===m?void 0:m.episodeNumber)||(null==L||null===(p=L.seriesDetails)||void 0===p?void 0:p.episode)||null,episodeTitle:(null==L?void 0:L.lcSubTitle)||null,isCompleteEpisode:!!(null!=b&&null!==(g=b.video)&&void 0!==g&&g.series||null!=L&&null!==(h=L.seriesDetails)&&void 0!==h&&h.episode),genre:_||k,comscoreConfig:{implementationId:(null==e||null===(y=e.comscore)||void 0===y?void 0:y.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}});if(null!=C&&null!==(w=C.streamingInfo)&&void 0!==w&&w.isLiveStream?C.contentType="LIVE":C.contentType="LONG_FORM_ON_DEMAND",null==C||!C.network){var R,F=(null==C?void 0:C.metadata)||[],j=null==F||null===(R=F.find((function(e){return"network"===e.name})))||void 0===R?void 0:R.value;C.network=j||null}null!=C&&C.network&&null!=C&&C.genre&&(C.customGenre="".concat(C.network,"_").concat((null==C?void 0:C.programTitle)||(P=C,null!=P&&P.series?null==P||null===(D=P.series)||void 0===D?void 0:D.title:null==P||null===(A=P.gist)||void 0===A?void 0:A.title),"_").concat(C.genre)),null!=L&&L.airDate&&(C.publishDate=L.airDate),null!=C&&C.runtime&&(C.runtime=1e3*((null==C?void 0:C.runtime)||0));var V=f.formulateComscorePayload(C,T);console.log("comscoreOptions player data",V),f.createComscoreStreamingTag(De({playerName:"Video.js"},V)),f.setComscorePlayerInstance(T)}},exports.initialiseKeyboardEvents=function(e,n){var t,o,r,l=i.getPlayer(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",(function(t){var o,r,i,u,s,c,v,m,f;if(ye.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||un(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(u=i.appcmsMain)||void 0===u||null===(s=u.adsConfig)||void 0===s?void 0:s.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(f=m.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||dn(e,10)}}}),!0)},exports.initiateErrorHandling=pn,exports.inititateBeacon=function(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){null!=n&&n.userId&&(W=n.userId);var t=i.getPlayer(e);window.initialise(t,null==n?void 0:n.analyticsCb),window.firstFrame(t,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),t.on("loadedmetadata",(function(){window.endFirstFrame(t)}))}},exports.isBehindLive=function(e){var n,t=i.getPlayer(e);return!(null!=t&&null!==(n=t.liveTracker)&&void 0!==n&&n.atLiveEdge())||null},exports.isMobile=J,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=sn,exports.isTokenExpired=D,exports.load=vn,exports.loadVideo=fn,exports.loadVideoInstantly=function(e,n,t){var o=i.getPlayer(e);return o.src(n),new Promise((function(e,n){var r=0;o.one("loadedmetadata",(function(){clearTimeout(r),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){r=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=k,exports.rewind=un,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],p("js",new Date),p("config",e)},exports.saveWatchHistory=_,exports.setupAdvertisementMarkers=Ke,exports.setupAdvertisementMarkersForLinear=rn,exports.skip=dn,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackMap=ze;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./currentVideoInfo-31d70bec.js");function t(e){e&&e.seekable()&&(e.currentTime(e.seekable().end(0)),e.play(),o({player:e,showWatchLive:!1,showStartOver:!0}))}function n(e,t){e.bigPlayButton.show(),e.controlBar.show(),t&&(t.style.display="none")}function r(e){return parseFloat(sessionStorage.getItem("lastWatchedPosition-".concat(e))||"0")}function a(t,n){var r=n||{},a=r.dvrConfig,o=r.epg,i=e.getCurrentEpgPrograms()||[],u=null==a?void 0:a.startOverTime,s=0;if(u&&(s=u),null!=o&&o.enable&&l(o)&&null!=i&&i.length){var v=new Date,d=i.find((function(e){var t=new Date(e.formatted_startdate),n=new Date(e.formatted_enddate);return v>=t&&v<n})),c=t.seekable();if(c&&c.length>0){var g=c.start(0);if(s=g,null!=d&&d.formatted_startdate){var h=c.end(c.length-1)-g;s=g+(new Date(d.formatted_startdate).getTime()-new Date(v-1e3*h).getTime())/1e3}}}return s}var o=function(e){var t=e.player,n=e.showWatchLive,r=void 0===n||n,a=e.showStartOver,o=void 0===a||a;if(t.liveTracker){var l,i,u,s,v=t.liveTracker.atLiveEdge(),d=t.controlBar.getChild("SeekToLive");if(v?null==d||d.show():null==d||d.hide(),r)null==t||null===(l=t.watchLiveButton)||void 0===l||l.show();else null==t||null===(i=t.watchLiveButton)||void 0===i||i.hide();if(o)null==t||null===(u=t.startFromBeginningButton)||void 0===u||u.show();else null==t||null===(s=t.startFromBeginningButton)||void 0===s||s.hide()}},l=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=JSON.parse(sessionStorage.getItem("epgConfig"))||n;return(null==r||null===(e=r.contentType)||void 0===e?void 0:e.includes("game"))&&"LIVE"===(null==r||null===(t=r.programSubType)||void 0===t?void 0:t.toUpperCase())};exports.checkDvrStartOverEnabled=function(e){var t=e||{},n=t.dvrConfig,r=t.epg;return!(!t.isDvrEnabled||null==n||!n.enable)&&(null==r||!r.enable||l(r))},exports.getCurrentProgramThumbnail=function(t){var n=(t||{}).epg,r=e.getCurrentEpgPrograms()||[],a="";if(null!=n&&n.enable&&l(n)&&null!=r&&r.length){var o=new Date,i=r.find((function(e){var t=new Date(e.formatted_startdate),n=new Date(e.formatted_enddate);return o>=t&&o<n}));a=null!=i&&i.thumbnail?null==i?void 0:i.thumbnail:""}return a},exports.getProgramStartTime=a,exports.getWatchedTime=r,exports.handleLiveStartOverBtn=o,exports.pauseAndHideControl=function(e){e.pause(),e.bigPlayButton.hide(),e.controlBar.hide()},exports.playFromBeginningHandler=function(e,t){var n=e.seekable();if(n&&n.length>0){var r=a(e,t);e.currentTime(r),e.play(),o({player:e,showWatchLive:!0,showStartOver:!0})}},exports.playLiveHandler=t,exports.playLiveOrResumeHandler=function(e,n){var a=r(n);a?function(e,t){if(e&&e.seekable()){var n=Math.min(t,e.seekable().end(0));e.currentTime(n),e.play(),o({player:e,showWatchLive:!0,showStartOver:!0})}}(e,a):t(e)},exports.removeDvrStartOver=function(e){var t,r;n(e,document.querySelector(".vjs-dvr-btn-overlay")),null==e||null===(t=e.startFromBeginningButton)||void 0===t||t.hide(),null==e||null===(r=e.watchLiveButton)||void 0===r||r.hide()},exports.saveWatchedTime=function(e,t){sessionStorage.setItem("lastWatchedPosition-".concat(e),t.toFixed(2))},exports.showControl=n;
@@ -0,0 +1 @@
1
+ "use strict";var e,t,n,o,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./player_instance-fcf6a8fb.js"),r=require("./currentVideoInfo-31d70bec.js"),a=require("./autoNextVideo-f25b83b7.js"),d=require("./icons-2609dbe4.js"),s=require("./skin-f5e18b89.js"),u=require("@babel/runtime/helpers/typeof"),c=require("video.js"),v=[],m=!1,p=function(e,t){var n=l.getPlayer(e),o=Math.floor(n.currentTime());if(Math.floor(n.duration())!=o){n.pause(e);var i=r.getVideoIdx();a.switchToNext(i,e,v)}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===u(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},o=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},c.registerPlugin("thumbnails",(function(i){var l,r,a,d,s,u,c,v;function m(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",m),v()}r=t({},e,i),d=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",a=document.createElement("img"),l.appendChild(a),a.src=r[0].src,a.className="vjs-thumbnail",t(a.style,r[0].style),a.style.left||a.style.right||(a.onload=function(){a.style.left=-a.naturalWidth/2+"px"}),u=d.duration(),d.on("durationchange",(function(e){u=d.duration()})),d.on("loadedmetadata",(function(e){u=d.duration()})),(s=d.controlBar.progressControl).el().appendChild(l),c=function(e){var i,d,c,v,m,p,f,g,h,y;for(d in c=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=o(s.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),v=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,v-=o(s.el()).getBoundingClientRect().left+h,i=Math.floor((v-s.el().offsetLeft)/s.width()*u),r)i>d&&(c=Math.max(c,d));(m=r[c]).src&&a.src!=m.src&&(a.src=m.src),m.style&&a.style!=m.style&&t(a.style,m.style),v+(g=function(e,t){var o;return t?parseFloat(t):"auto"!==(o=n(e)("clip"))&&"inherit"!==o&&4===(o=o.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(o[1])-parseFloat(o[3]):0}(a,m.width||r[0].width)/2)>f?v-=v+g-f:v<g&&(v=g),l.style.left=v+"px"},s.on("mousemove",c),s.on("touchmove",c),s.on("pointerdown",(function(e){document.addEventListener("pointermove",c),document.addEventListener("pointerup",m)})),v=function(e){l.style.left="-1000px"},s.on("mouseout",v),s.on("touchcancel",v),s.on("touchend",v),d.on("userinactive",v)})),exports.addNextEpPreview=function(e,t){var n;if(m=!1,null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var o;v=[];var a=r.getCurrentSeries();null==a||a.map((function(e){var t;return(t=v).push.apply(t,i(e.episodes))})),null==t||null===(o=t.series)||void 0===o||o.cb}else{var u,c;v=(null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content)||[],null==t||null===(c=t.relatedVideos)||void 0===c||c.cb}var f=l.getPlayer(e);f.on("timeupdate",(function(){var e,t;if(!m){var n=Math.floor(f.currentTime()),o=f.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&r.getVideoIdx()<=(null===(t=v)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}}));var g,h=v.filter((function(e,t){return t==r.getVideoIdx()}));if((null==h?void 0:h.length)>0)if(null!==(g=document.getElementsByClassName("next-ep-preview"))&&void 0!==g&&g[0]){var y,x,A,w,E,C,b,N,B,L,P,I;(null===(y=document.getElementsByClassName("next-ep-preview"))||void 0===y?void 0:y[0]).style.visibility="hidden";var j=null===(x=document.getElementsByClassName("next-ep-title"))||void 0===x?void 0:x[0],k=null===(A=document.getElementsByClassName("next-ep-img"))||void 0===A?void 0:A[0],q=null===(w=document.getElementsByClassName("next-ep-content"))||void 0===w?void 0:w[0],T=null===(E=h[0])||void 0===E?void 0:E.title;(null===(C=T)||void 0===C?void 0:C.length)>60&&(T=T.substr(0,60)+"..."),j.textContent="".concat(T),k.src=(null===(b=h[0])||void 0===b||null===(N=b.gist)||void 0===N||null===(B=N.imageGist)||void 0===B?void 0:B.r16x9)||(null==h||null===(L=h[0])||void 0===L?void 0:L.img)||(null===(P=window)||void 0===P||null===(I=P.customData)||void 0===I?void 0:I.fallbackImage),q.onclick=function(){return p(e)}}else{var V,O,S,M,X,F,R,D,G=document.createElement("div");G.className="next-ep-preview",G.style.visibility="hidden",document.getElementById(e).append(G);var H=document.createElement("div");H.className="next-heading-wrapper";var _=document.createElement("div");_.className="next-ep-header",_.textContent="Next up";var K=document.createElement("div");K.className="next-ep-close",K.onclick=function(){G.style.visibility="hidden",m=!0},K.appendChild(s.parseSvgString(d.crossIconSvg())),H.append(_),H.append(K);var Q=null===(V=h[0])||void 0===V?void 0:V.title,U=document.createElement("img");U.className="next-ep-img",U.src=(null===(O=h[0])||void 0===O||null===(S=O.gist)||void 0===S||null===(M=S.imageGist)||void 0===M?void 0:M.r16x9)||(null==h||null===(X=h[0])||void 0===X?void 0:X.img)||(null===(F=window)||void 0===F||null===(R=F.customData)||void 0===R?void 0:R.fallbackImage);var W=document.createElement("div");W.className="next-ep-title",(null===(D=Q)||void 0===D?void 0:D.length)>60&&(Q=Q.substr(0,60)+"..."),W.textContent="".concat(Q);var Y=document.createElement("div");Y.className="next-ep-content",Y.append(U),Y.append(W),Y.onclick=s.debounce((function(){null==G||G.remove(),m=!0,p(e)}),400),G.append(H),G.append(Y)}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),o=null==t?void 0:t.tvProviderLogoUrl;if(o){var i=document.createElement("div");i.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(o),r.alt="Provider Image",i.append(r),n.el().appendChild(i),n.on("useractive",(function(){i.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||i.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/get"),a=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js");function s(e){var t=l();return function(){var r,a=i(e);if(t){var o=i(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return n(this,r)}}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}var u={startTime:0,timeLive:3600},c=0,p=u.timeLive,h=o.getComponent("Button"),d=o.getComponent("Component"),v=o.getComponent("ProgressControl"),m=v.getComponent("SeekBar"),f=v.getComponent("PlayProgressBar"),_=v.getComponent("LoadProgressBar"),y=o.getComponent("MouseTimeDisplay");_.prototype.update=function(e){var t=this.player_.buffered(),r=this.player_.duration(),a=this.player_.bufferedEnd(),n=this.partEls_,i=function(e,t){var r=e/t||0;return 100*(r>=1?1:r)+"%"};0!==i(a,r)&&(this.el_.style.width=i(a,r));for(var o=0;o<t.length;o++){var s=t.start(o),l=t.end(o),u=n[o];u||(u=this.el_.appendChild(document.createElement("div")),n[o]=u),0!==i(s,a)&&(u.style.left=i(s,a)),0!==i(l-s,a)&&(u.style.width=i(l-s,a))}for(var c=n.length;c>t.length;c--)this.el_.removeChild(n[c-1]);n.length=t.length},m.prototype.update_=function(e,t){var r=this.player_.duration(),a=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),r!==Number.POSITIVE_INFINITY&&this.el_.setAttribute("aria-valuetext","-".concat(o.formatTime(r-a,r))),this.bar.update(o.dom.getBoundingClientRect(this.el_),t)},m.prototype.handleMouseMove=function(e){var t=1-this.calculateDistance(e),r=this.player_.seekable().end(0)-t*p;r===this.player_.duration()&&(r-=.1),this.player_.currentTime(r),this.update()},f.prototype.update=function(e,t){var r=this,a=this.player_.duration();this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),i=o.formatTime(a-n,a);0!==t&&a!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(i))}))},y.prototype.update=function(e,t){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var a=o.formatTime(p-t*p,p);r.el_.style.left="".concat(e.width*t,"px"),0!==t&&r.player_.duration()!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(a))}))};var C=function(e){var t=this;e||(e=u),this.on("timeupdate",(function(e){var r,a;(a=(r=t).seekable())&&a.length&&(a.end(0)-r.currentTime()<20?r.controlBar.liveButton.addClass("onair"):r.controlBar.liveButton.removeClass("onair"),r.duration(r.seekable().end(0)),c||(c=p=r.seekable().end(0)))})),this.on("pause",(function(e){t.controlBar.liveButton.removeClass("onair")})),this.ready((function(){var r;r=t,o.mergeOptions(u,e),r.addClass("vjs-dvr-seekbar"),r.controlBar.addClass("vjs-dvr-control-bar"),r.controlBar.progressControl.seekBar.__proto__.__proto__.update=function(){if(this.el_){var e;e="VolumeBar"===this.name_?this.getPercent():1-(this.player_.duration()-this.player_.currentTime())/p;var t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0),e>1&&(e=1);var r=(100*e).toFixed(2)+"%",a=t.el().style;return 0!==e&&(this.vertical()?a.height=r:a.width=r),e}}},r.controlBar.progressControl&&r.controlBar.progressControl.addClass("vjs-dvr-progress-control"),r.controlBar.liveButton=r.controlBar.addChild("liveButton"),r.controlBar.el().insertBefore(r.controlBar.liveButton.el(),r.controlBar.progressControl.el())}))},b=function(n){a(l,h);var o=s(l);function l(t,r){var a;return e(this,l),(a=o.call(this,t,r)).el().innerHTML='<span class="liveCircle"></span><span class="liveText">LIVE</span>',t.paused()||a.addClass("onair"),a}return t(l,[{key:"buildCSSClass",value:function(){return"vjs-live-button ".concat(r(i(l.prototype),"buildCSSClass",this).call(this))}},{key:"handleClick",value:function(e){var t=this.player_.seekable().end(0);this.player_.currentTime(t),this.player_.play()}}]),l}();d.registerComponent("LiveButton",b),(o.registerPlugin||o.plugin)("dvrSeekbar",C),exports.default=C;
@@ -0,0 +1 @@
1
+ "use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-9c38d746.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),i=require("video.js"),r=require("./util-5b1c1844.js"),l=require("./captions-dbc83a75.js"),a=require("./resolution-f9dcc1b4.js"),u=require("./skin-f5e18b89.js"),s=require("./player_instance-fcf6a8fb.js"),d=require("./localisation-56e0a999.js"),c=require("./currentVideoInfo-31d70bec.js"),v=require("@babel/runtime/helpers/typeof"),p=require("./icons-2609dbe4.js"),f=require("./helper-a50a8ffc.js"),m=require("@babel/runtime/helpers/toConsumableArray"),g=require("@babel/runtime/helpers/slicedToArray"),h=require("@viewlift/sse"),y=function(e){return new Promise((function(n,t){if(b(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)}}))},b=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},w=function(e,n,t){var o=s.getPlayer(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,"'")})},k=function(e){var n=s.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},S=function(){var n=t(o.mark((function n(t){var r,l,a,u,d;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=s.getPlayer(null==t?void 0:t.playerId),null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable||!(null!=t&&t.chromecastReceiverId||null!=t&&t.airplay)){n.next=10;break}return n.prev=2,n.next=5,y("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!==(l=t.series)&&void 0!==l&&l.enable||null==t||!t.chromecastReceiverId){n.next=21;break}return n.next=13,import("@silvermine/videojs-chromecast");case 13:n.sent.default(i),(d=i.getTech("chromecast"))&&!d.prototype.seeking&&(d.prototype.seeking=function(){}),null!==(u=window)&&void 0!==u&&u.cast?null==a||a.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==a||a.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.detectBrowser()?null==a||a.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)}}(),I=function(e,n){var t=s.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,r,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}}))};var E=function(){var e=t(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),y("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)}}(),T=function(){var n=t(o.mark((function n(){return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then((function(n){e.comscoreInstanceManager.set(n)}));case 2:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),D=function(){var e=t(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then((function(e){i.getPlugin("eme")||i.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=t(o.mark((function e(){var n;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(i),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=t(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./index-3f0e537b.js")}));case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=t(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./videojs-dash5.es-78624126.js")}));case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),j=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){y("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(i)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},loadAdsLibrary:E,loadEMELibrary:D,loadMuxPlugin:O,loadDvrSeekbar:C,loadContribDash:P,loadComscorePlugin:T});function x(e){return A.apply(this,arguments)}function A(){return(A=t(o.mark((function n(t){var i,r,l;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=(null==t?void 0:t.airplay)||!1,n.next=3,E();case 3:i&&"Safari"==e.detectBrowser()?Promise.resolve().then((function(){return j})).then((function(e){e.importAirplay()})):(l=(null===(r=document)||void 0===r?void 0:r.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 L(e){return M.apply(this,arguments)}function M(){return(M=t(o.mark((function e(n){var t,i,r,l,a,u,d,c,v;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=s.getPlayer(n.playerId),e.next=3,T();case 3:v.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(i=n.comscore)||void 0===i?void 0:i.endpoint,applicationName:(null==n||null===(r=n.comscore)||void 0===r?void 0:r.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.debug)||!1,persistentLabels:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.persistentLabels)||{}});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e,n){return N.apply(this,arguments)}function N(){return(N=t(o.mark((function n(t,i){var r,l,a,u,s,d,c,v,p,f,m,g,h,y;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return p=(null==i?void 0:i.contentType)||"video",f=null==i||null===(r=i[p])||void 0===r?void 0:r.drmEnabled,null==i||null===(l=i[p])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==t||t.showPositiveSeekbar,m=(null==i||null===(u=i[p])||void 0===u||null===(s=u.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.dash)||null,g=(null==t||null===(c=t.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==t||null===(v=t.analytics)||void 0===v||!v.muxKey),n.prev=7,n.next=10,Promise.allSettled([f?"Safari"==e.detectBrowser()?D():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?P():D():"Safari"!=e.detectBrowser()&&m?P():null,g?L(t):null,h?O():null,S(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 B(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function _(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?B(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):B(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var V=new Set,H=null,U=function(n,t,o,i){var r,l,a,u,s,d,v,p={},f=(null==n?void 0:n.contentType)||"video";p["c3.cm.id"]=(null===(r=n[f])||void 0===r?void 0:r.id)||"Null",p["c3.cm.contentType"]=J(n),p[null==o||null===(l=o.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),p[null==o||null===(a=o.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),p[null==o||null===(u=o.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),p["c3.cm.categoryType"]=W(n),p["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"}}(),p.DRMEnabled=(null===(s=n[f])||void 0===s?void 0:s.drmEnabled)||"None",p.DAIStream=null!==(d=n[f])&&void 0!==d&&null!==(v=d.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",p[o.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NULL",p.CDVREnabled=K(n),p["c3.cm.genreList"]=F(n),p["c3.cm.genre"]=q(n),p["c3.cm.channel"]=G(n,i);var m=Q(c.getCurrentSeries(),n);return p=_(_({},p),m)},q=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"},F=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"},G=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"},W=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"},K=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"},Y=function(e,n){var t,o,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var r=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[r])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},J=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var z,X,Q=function(n,t){var o,i,r,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(o=t.video)||void 0===o||null===(i=o.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(r=n[s-1])||void 0===r||null===(l=r.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},$=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ee=function(){var e=t(o.mark((function e(n,t){var i,r,l,a,u,d,v,p,f,m,g,h;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null==t?void 0:t.convivaConfig)||{},r=i.trackConvivaPlayerEvent,l=i.paymentHandler,a=i.tveProvider,u=i.enable,d=i.appName,p=(v=t||{}).token,f=v.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(m=s.getPlayer(n),"function"==typeof(g=r)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,g("getConvivaObject");case 10:if(h=e.sent){e.next=13;break}return e.abrupt("return");case 13:m.ready((function(){var e=m.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=$(t.keySystem);g("contentInfo",{DRMEnabled:o})}else g("contentInfo",{DRMEnabled:"None"})})),n||g("contentInfo",{DRMEnabled:"None"})})),m.on("loadstart",(function(){var e,n;H&&H!==m.currentSrc()&&g("playbackEnded"),g("setPlayer",m),V.clear(),H=m.currentSrc();var o=Z(m.currentType()),i=c.getCurrentVideo(),r=U(i,m,h,f);r[null==h||null===(e=h.Constants)||void 0===e?void 0:e.PLAYER_NAME]=d||"WEB",r[null==h||null===(n=h.Constants)||void 0===n?void 0:n.ASSET_NAME]=Y(i,t),r.authToken=p||"NULL",r.streamType=o,r.D2CType=l||"NONE",r.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",r["c3.cm.affiliate"]=a||"NULL",ne.setData(r),g("contentInfo",r)})),m.on("loadedmetadata",(function(){var e,n=m.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})})),m.on("play",(function(){V.has(m.currentSrc())||(V.add(m.currentSrc()),g("playbackStarted",null))})),m.on("ended",(function(){V.has(m.currentSrc())&&V.delete(m.currentSrc()),g("playbackEnded")})),m.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:m,adsLoader:null==e?void 0:e.adsLoader})})),m.on("dispose",(function(){null==V||V.clear(),g("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ne=(z={},{setData:function(e){z=_(_({},z),e)},getData:function(){return z}}),te=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-5ac45888.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-db3ac243.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-e6dc154d.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-9ecfd417.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-4b59dbca.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t?Promise.resolve().then((function(){return require("./skin-da0f0794.js")})).then((function(t){t.initialiseSkin(e,n)})):"news"==t?Promise.resolve().then((function(){return require("./skin-c742f011.js")})).then((function(t){t.initialiseSkin(e,n)})):"news_live"==t?Promise.resolve().then((function(){return require("./skin-e4d7b69d.js")})).then((function(t){t.initialiseSkin(e,n)})):"mini"==t&&Promise.resolve().then((function(){return require("./skin-d4a41771.js")})).then((function(t){t.initialiseSkin(e,n)}))};function oe(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 ie(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):oe(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var re=[],le=0,ae=null;function ue(){console.log("Cleaning up watch history data"),X=null,re=[],le=0,ae=null}function se(n,t,o){var i,r,l,a,u,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==t||null===(i=t.watchHistory)||void 0===i||i.apiVersion;var d=null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.profileId,c=Math.floor(n.currentTime()),v=Math.floor(n.duration());null==t||null===(l=t.watchHistory)||void 0===l||l.xapiKey;var p=(null==t||null===(a=t.video)||void 0===a?void 0:a.originalObjectId)||null,f=(null==t||null===(u=t.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,m=Math.floor(n.currentTime()),g=s?100:Math.floor(c/v*100),h={};f?ce(h={completed:s,watchedTime:m,watchedPercentage:g},d,t.siteOwner):(h=ie(ie({videoId:X,watchedTime:m,watchedPercentage:g,doneWatching:s,profileId:d},ae&&{seriesId:ae}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then((function(e){})).catch((function(e){}))),le=c+o}function de(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function ce(e,t,o){var i=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),r=de(i),l=(new Date).getTime(),a=c.getCurrentVideo(),u=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,t){return ie(ie({},e),{},n({},t,u[t]))}),{}),d=r.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===X}));d<0?r.push(ie(ie({content:s},e),{},{addedDate:l,updateDate:l})):r[d]=ie(ie(ie({},r[d]),e),{},{updateDate:l}),localStorage.setItem("".concat(i),JSON.stringify(r))}function ve(e,n,t){var o=de(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 pe(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 fe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):pe(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var me,ge=(me={},{setConfig:function(e){me=fe(fe({},me),e)},getConfig:function(){return me}}),he=!1,ye=function(){var n=t(o.mark((function n(t,i){var r,l,a,u,s,d,c,v,p,f;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(null==t?void 0:t.contentType)||"video",!((null==t||null===(r=t[a])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.secondaryVideoAssets)||null)||he){n.next=19;break}if(d=ge.getConfig(),c=(null==d||null===(u=d.customData)||void 0===u?void 0:u.ads)||{},v=(null==t||null===(s=t[a])||void 0===s?void 0:s.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==c?void 0:c.vodAdSticherProvider)||!1,p=we(t,"videoAssets","secondaryVideoAssets"),f=e.getSource(p,i),!v){n.next=12;break}return n.next=11,e.getSGAIEnabledSource(i,p);case 11:f=n.sent;case 12:return f&&e.loadVideo(i,f),he=!0,console.log("switching to secondary source"),be(i,p,d),n.abrupt("return",!0);case 19:return console.log("secondary source is either corrupted / not available"),n.abrupt("return",!1);case 21:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}();function be(n,t,o){var i,r,l,a,u=(null==o||null===(i=o.customData)||void 0===i?void 0:i.ads)||{},s=(null==t?void 0:t.contentType)||"video",d=(null==t||null===(r=t[s])||void 0===r?void 0:r.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==u?void 0:u.vodAdSticherProvider)||!1,v=(null==t||null===(l=t[s])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;if("MEDIA_TAILOR"==(null==u?void 0:u.vodAdSticherProvider)&&null!=u&&u.vodAdClientSideTracking&&d)if(v)e.setupAdvertisementMarkersForLinear(n);else{var p,f=null;if(null!=o&&null!==(p=o.series)&&void 0!==p&&p.enable){var m,g,h,y,b,w=null===(m=c.getCurrentVideo())||void 0===m||null===(g=m.video)||void 0===g||null===(h=g.gist)||void 0===h?void 0:h.id,k=c.getSeriesWatchMap(),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 T=options,D=T.watchHistoryResumeTime;T.watchedPercentage<95&&(f=D)}e.setupAdvertisementMarkers(n,f)}}function we(e,n,t){if(Array.isArray(e))return e.map((function(e){return we(e,n,t)}));if(null!==e&&"object"===v(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]=we(e[i],n,t)})),o}return e}function ke(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 Se(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)?Se(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function Se(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 Ie(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 Ee(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ie(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var Te=function(n,t,o,i){var r,a,u,d,p,f=i.res,m=i.sres,g=s.getPlayer(n),h=(null==f?void 0:f.contentType)||"video",y=(null==f||null===(r=f[h])||void 0===r?void 0:r.drmEnabled)||!1,b=(null==f||null===(a=f[h])||void 0===a||null===(u=a.streamingInfo)||void 0===u?void 0:u.isLiveStream)||!1,k=(null==f||null===(d=f[h])||void 0===d||null===(p=d.liveDetails)||void 0===p?void 0:p.isDvrEnabled)||!1;c.setCurrentVideo(f),c.videoReplayTracker.set(f),g&&(g.on("loadstart",(function(){b?o.resolve({status:!0,msg:"Video Loaded",response:f}):o.resolve(Ee({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:f}:{response:f}))})),g.on("loadeddata",(function(){var o,i,r,a=l.getCaptions(n);if(null==a||a.map((function(e){return l.disableCaptions(n,e.id)})),k&&"Safari"===e.detectBrowser())try{var u;null==g||null===(u=g.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==g||!g.muted())&&w(n,sessionStorage.getItem("volume")||"100");var d=c.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),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 v,p,m=Ee(Ee({},t),f);!function(e,n,t){var o,i,r;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(ae=null==n||null===(i=n.series)||void 0===i?void 0:i.id),re=[],le=0,X=t;var l=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.interval)||30,a=s.getPlayer(e);a&&(a.on("dispose",ue),a.on("timeupdate",(function(){if(!a.seeking()){var e=Math.floor(a.currentTime());re.includes(le)||(e!=le||e<l?e>le&&(le=e+l):(re.push(e),se(a,n,l)))}})),a.one("ended",(function(){se(a,n,l,!0)})))}(n,m,null==d||null===(v=d.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(r=t.analytics)&&void 0!==r&&r.muxKey&&null!=g&&g.mux){var h,y,b,S,I,E,T=(null===(h=c.getCurrentVideo())||void 0===h?void 0:h.video)||(null==f?void 0:f.video),D=null==T?void 0:T.gist,O={env_key:null==t||null===(y=t.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(b=window)||void 0===b?void 0:b.vl_player_version,video_id:null==D?void 0:D.id,video_title:null==D?void 0:D.title,video_series:null==T||null===(S=T.series)||void 0===S?void 0:S.title,video_stream_type:null!=T&&null!==(I=T.streamingInfo)&&void 0!==I&&I.isLiveStream?"live":"video",viewer_user_id:null==t||null===(E=t.analytics)||void 0===E?void 0:E.userId};g.mux({debug:!1,data:O})}})),g.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];g.trigger("subtitlechanged",n)})),g.on("subtitlechanged",(function(e,n){var t,o,i,r,l,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),h=g.media.tracks.filter((function(e){return"TEXT"==e.type}));m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}})),g.tech_.on("retryplaylist",(function(){b&&ye(f,n)})),g.on("error",(function(){var t,i;(console.log("ERROR",g.error(),g.error().code),4===g.error().code&&b)?ye(f,n):(e.handleError(n,(null==g||null===(t=g.error())||void 0===t?void 0:t.message)||"Some error occured"),o.reject({status:!1,msg:(null==g||null===(i=g.error())||void 0===i?void 0:i.message)||"Some error occured",response:f}))})),g.one("play",(function(){var e,n,o,i,r;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!==(r=t.series)&&void 0!==r&&r.enable){var l,a,u,s=null===(l=c.getCurrentVideo())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=c.getSeriesWatchMap(),v=(null==d?void 0:d.get(s))||{t:0,p:0},p=v.t,f=v.p;p&&f<95&&setTimeout((function(){g.currentTime(p)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){g.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0);if(null!=g&&g.dvrSeekbar)try{g.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}})),g.on("volumechange",(function(){var e=100*g.volume().toFixed(2);g.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),g.on("chromecastDisconnected",(function(){if(b){g.currentSource();for(var e=g.textTracks(),n=e.length-1;n>=0;n--)g.removeRemoteTextTrack(e[n])}})),g.one("loadeddata",(function(){var n,t=(null==g||null===(n=g.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"==v(g.dash)){var o,i,r,l=null==g||null===(o=g.dash)||void 0===o||null===(i=o.mediaPlayer)||void 0===i?void 0:i.getTracksFor("audio"),a=null==l?void 0:l.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),u=ke(t);try{for(u.s();!(r=u.n()).done;){var s=r.value;if(a&&(null==s?void 0:s.id)=="dash-audio-".concat(a.index)){s.enabled=!0;break}}}catch(e){u.e(e)}finally{u.f()}}else{var d,c=ke(t);try{for(c.s();!(d=c.n()).done;){var p,f,m,h=d.value;if(("Chrome"==e.detectBrowser()||"Edge"==e.detectBrowser()&&(null!==(p=navigator)&&void 0!==p&&null!==(f=p.userAgent)&&void 0!==f&&f.includes("Macintosh")||!y))&&null!=h&&null!==(m=h.label)&&void 0!==m&&m.includes("5.1"))g.audioTracks().removeTrack(h);else{if("main"==h.kind){h.enabled=!0;break}h.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}})))};function De(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 Oe(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach((function(e){e.remove()}))}function Ce(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return(c.getCurrentEpgPrograms()||[]).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 Pe(e,n){var t=s.getPlayer(e);if(t){var o=n.dvrConfig,i=void 0===o?{}:o,r=n.videoId;n.epg;var l=i.playLive,a=i.playFromBegining,u=i.programs;c.setCurrentEpgPrograms(u),t.on("loadeddata",(function(){f.checkDvrStartOverEnabled(n)?a?f.playFromBeginningHandler(t,n):l?f.playLiveOrResumeHandler(t,r):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,i=n.videoId,r=n.epg,l=o.buttonConfig,a=void 0===l?{}:l,u=a.watchLive;a.resume;var s=a.startFromBegining,d=i;if(r&&null!=r&&r.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));d="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!f.getWatchedTime(d),p=document.querySelector(".vjs-dvr-btn-overlay");p||((p=document.createElement("div")).className="vjs-dvr-btn-overlay");var m=f.getCurrentProgramThumbnail(n);m&&(p.style.backgroundImage="url(".concat(m,")"),p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="cover");p.innerHTML=xe(o,v),p.style.display="flex",e.el().appendChild(p),f.pauseAndHideControl(e),je("watch-live-resume-btn",u,(function(){f.showControl(e,p),f.playLiveOrResumeHandler(e,d)})),je("watch-begining-btn",s,(function(){f.showControl(e,p),f.playFromBeginningHandler(e,n)}))}(t,n),f.handleLiveStartOverBtn({player:t,showWatchLive:!0,showStartOver:!0})):f.removeDvrStartOver(t)})),t.one("loadedmetadata",(function(){sessionStorage.setItem("program_switched",!0),function(e,n){var t=n.videoId,o=e.currentTime(),i=!1,r=e.seekable(),l=r.start(0),a=r.end(r.length-1)-l,u=JSON.parse(sessionStorage.getItem("epgConfig")),s=t,d=!0;if(u&&null!=u&&u.enable){var c;d=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==u?void 0:u.programId),s=null==u?void 0:u.programId}e.on("seeking",(function(){i=!0})),e.on("seeked",(function(){i=!1,o=e.currentTime();var t=JSON.parse(sessionStorage.getItem("epgConfig"));if(t&&null!=t&&t.enable){if(!d||sessionStorage.getItem("program_switched"))return;s="".concat(null==t?void 0:t.programId,"-").concat(null==t?void 0:t.channelId)}f.saveWatchedTime(s,o),f.getProgramStartTime(e,n),f.handleLiveStartOverBtn({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})})),e.on("timeupdate",(function(){if(!i){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!d||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");s="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var t=e.currentTime();Math.abs(t-o)>=20&&(f.saveWatchedTime(s,t),o=t,function(e,n){Ce(n).forEach((function(t){var o=t.id,i=t.title,r=t.time,l=document.getElementById(o);if(l){var a=Math.min(r/n*100,99.5);l.style.left="".concat(a,"%")}else{var u=e.controlBar.progressControl.seekBar.el(),s=De(o,i,Math.min(r/n*100,99.5));u.appendChild(s)}}))}(e,a))}}))}(t,n)}))}else console.warn("Player instance is required to initialize start over.")}function je(e,n,t){var o,i,r=document.getElementById(e);r&&(i=n,(o=r)&&(o.style.color="".concat((null==i?void 0:i.textColor)||"#000"),o.style.backgroundColor="".concat((null==i?void 0:i.backGroundColor)||"#DCF95B")),r.addEventListener("click",t))}function xe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,i=t.resume,r=t.startFromBegining,l=n?(null==i?void 0:i.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(p.watchLiveIcon2()," ").concat(l,"</button>"),u='<button id="watch-begining-btn">'.concat(p.startLiveIcon()," ").concat((null==r?void 0:r.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(u,"</div>")}function Ae(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 Le(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ae(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var Me=function(r,a,d,c){var v,p,f,m,g,h,y,b,w,k,S,E,T,D,O,C,P,j,x,A,L,M,N,B,_,V,H,U,q,F,G,W,K,Y,J,z,X,Q=a.res,$=void 0===Q?null:Q,Z=a.sres,oe=void 0===Z?null:Z,ie=null!=d&&d.chromecastReceiverId?["chromecast","html5"]:["html5"],re=(null===(v=$)||void 0===v?void 0:v.contentType)||"video",le=u.impolicy16x9(null===(p=$)||void 0===p||null===(f=p[re])||void 0===f||null===(m=f.gist)||void 0===m?void 0:m.videoImageUrl)||u.impolicy16x9(null===(g=$)||void 0===g||null===(h=g[re])||void 0===h||null===(y=h.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),ae=(null===(w=$)||void 0===w||null===(k=w[re])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,ue=(null===(E=$)||void 0===E||null===(T=E[re])||void 0===T||null===(D=T.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!1,se=(null===(O=$)||void 0===O||null===(C=O.ads)||void 0===C||null===(P=C.preRoll)||void 0===P||null===(j=P.adTags)||void 0===j||null===(x=j.web)||void 0===x?void 0:x.active)&&(null===(A=$)||void 0===A||null===(L=A.ads)||void 0===L||null===(M=L.preRoll)||void 0===M||null===(N=M.adTags)||void 0===N||null===(B=N.web)||void 0===B?void 0:B.url);$=Le(Le({},$),{},{audioAssetSource:null==d?void 0:d.audioAssetSource});var de=(null==d||null===(_=d.customData)||void 0===_?void 0:_.ads)||{},ce=(null===(V=$)||void 0===V||null===(H=V[re])||void 0===H?void 0:H.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==de?void 0:de.vodAdSticherProvider)||!1,ve=(null==d?void 0:d.latency)||6,pe=(null==d?void 0:d.skin_settings)||{};null==d||d.dvrConfig;var fe=(z={enableSmoothSeeking:!0,controls:0!=(null==d?void 0:d.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==d?void 0:d.muted)||!1,autoplay:(null==d?void 0:d.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==pe?void 0:pe.pictureInPictureToggle)||!1},playbackRates:null!=pe&&pe.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==d.skin,liveui:ae},n(z,"autoplay",null==d?void 0:d.autoplay),n(z,"normalizeAutoplay",(null==d?void 0:d.autoplay)&&!se),n(z,"loop",(null==d?void 0:d.loop)||!1),n(z,"audioPosterMode",null==d?void 0:d.audioPosterMode),n(z,"html5",Le(Le({dash:Le(Le(Le({},!i.browser.IS_SAFARI&&{useTTML:!0}),(null==d?void 0:d.debugConfig)&&(null==d||null===(U=d.debugConfig)||void 0===U?void 0:U.enable)&&{debug:!0,logLevel:null!=d&&null!==(q=d.debugConfig)&&void 0!==q&&q.logLevel?null==d||null===(F=d.debugConfig)||void 0===F?void 0:F.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ve},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:Le(Le({},(null==d?void 0:d.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==d?void 0:d.initialBandwidth)/1e3}}),{},{autoSwitchBitrate:{video:!0,audio:!0},additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}})}}}),vhs:Le(Le(Le({},(null==d?void 0:d.initialBandwidth)&&{bandwidth:d.initialBandwidth}),{},{liveRangeSafeTimeDelta:ve,useDevicePixelRatio:!0,experimentalLLHLS:(null==d?void 0:d.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==d||!d.initialBandwidth},(null==d||null===(G=d.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(W=null==d?void 0:d.enableLowInitialPlaylist)&&void 0!==W&&W}),debug:(null==d?void 0:d.debugConfig)&&(null==d||null===(K=d.debugConfig)||void 0===K?void 0:K.enable)||!1,nativeTextTracks:"Safari"==e.detectBrowser()},0==(null==d||null===(Y=d.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==d||null===(J=d.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(z,"poster",le),n(z,"techOrder",ie),n(z,"chromecast",{requestCustomDataFn:function(e){var n,t,o=s.getPlayer(r),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),l=function(e,n,t){var o,i,r,l,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,h,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 T=(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=T}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 O=null==e||null===(r=e[p])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;f.duration=O;var C=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=C;var P=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=P,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}($,e,i);return Le(Le({},l),{},{convivaMetaData:Le({customerKey:(null==d||null===(n=d.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==d||null===(t=d.convivaConfig)||void 0===t?void 0:t.debug)||!1},ne.getData())})},modifyLoadRequestFn:function(e){var n,t,o,i,l,a=s.getPlayer(r),u=(null==a?void 0:a.currentSource())||{};!(null===(n=$)||void 0===n||null===(t=n[re])||void 0===t||null===(o=t.streamingInfo)||void 0===o||null===(i=o.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),z);if(!i.getPlayers()[r]){null!=d&&d.debugConfig&&null!=d&&null!==(X=d.debugConfig)&&void 0!==X&&X.enable&&i.log.level("debug");var me=i(r,fe,function(){var n=t(o.mark((function n(){var t,a,u,s,v,p,f,m,g,h,y,b,w,k,S,E,T,D,O,C,P;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(me),console.log(i.VERSION),console.log(i.getPlugins()),n.next=5,R(d,$);case 5:if(w=null===(t=$)||void 0===t||null===(a=t[re])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.startOverTime,ue&&c.resolve(Le({status:!0,msg:"Player Initialised"},oe?{seriesResponse:oe,response:$}:{response:$})),ae&&null!=d&&null!==(s=d.dvrConfig)&&void 0!==s&&s.enable&&Pe(r,Le(Le({},d),{},{isDvrEnabled:ae})),e.inititateBeacon(r,{analyticsCb:null==d?void 0:d.analyticsCb,analyticsEventParams:null==d?void 0:d.analyticsEventParams,userId:null==d?void 0:d.userId}),ee(r,d),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),ae&&I(r,w),!se||null!=d&&null!==(v=d.customData)&&void 0!==v&&v.disableAds||e.initialiseAdvertisement(r,se,$),k=e.getSource($,r),console.log(k),null!=d&&d.nearestClusterUrl&&(k=e.getUpdatedClusterSource(k,d.nearestClusterUrl)),!ce){n.next=21;break}return n.next=20,e.getSGAIEnabledSource(r,$);case 20:k=n.sent;case 21:k?e.loadVideo(r,k):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:$}),e.handleError(r,"Incompatible / Missing Source")),((null===(p=$)||void 0===p||null===(f=p[re])||void 0===f||null===(m=f.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=$)||void 0===h||null===(y=h[re])||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0)&&(P=(null===(E=$)||void 0===E||null===(T=E[re])||void 0===T||null===(D=T.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null===(O=$)||void 0===O||null===(C=O[re])||void 0===C?void 0:C.closedCaptions),S=P.filter((function(e){return"VTT"===e.format||"WEBVTT"===e.format})),l.addCaptions(r,S)),null!=d&&d.disableControls?e.disableControls(r):te(r,Le(Le(Le({},d),fe),{},{liveVideo:ue,isDvrEnabled:ae,res:$,sres:oe})),Te(r,Le(Le(Le({},d),fe),{},{liveVideo:ue}),c,{res:$,sres:oe});case 25:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}())}};function Re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Ne(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Re(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var Be,_e=function(e,n){var t=n.resolve,o=n.reject,i=null==e?void 0:e.playerId,r=Ve(e);Me(i,{res:r},e,{resolve:t,reject:o})},Ve=function(n){var t,o,i,r,l,a,u,s,d,c,v,p,f,g=null==n?void 0:n.streamingInfo,h=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,y=(null==n||null===(o=n.streamingInfo)||void 0===o?void 0:o.isDrmEnabled)||null,b=(null==n||null===(i=n.streamingInfo)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.url)||null,w=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,k=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],S=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,I=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],E=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,T=null==n?void 0:n.token,D=e.getDecodedToken(T);null==D||D.site;var O=null==D?void 0:D.siteId,C=(null==n||null===(p=n.customData)||void 0===p||null===(f=p.comscore)||void 0===f?void 0:f.video)||null,P=Ne(Ne({id:"".concat(O,"_external")},!y&&{directPlaybackUrl:null==h?void 0:h.url}),{},{video:Ne(Ne(Ne(Ne(Ne({drmEnabled:y,streamingInfo:Ne(Ne({videoAssets:Ne(Ne({},S&&{drmProvider:S}),{},{widevine:null==h?void 0:h.widevine,fairPlay:null==h?void 0:h.fairPlay,playReady:null==h?void 0:h.playReady})},(null==g?void 0:g.isDvrEnabled)&&{isLiveStream:!0}),(null==C?void 0:C.isLiveStream)&&{isLiveStream:null==C?void 0:C.isLiveStream})},E&&{isSSAIEnabled:E}),{},{metadata:I,liveDetails:{isDvrEnabled:null==g?void 0:g.isDvrEnabled},gist:Ne(Ne(Ne({},w&&{videoImageUrl:w}),(null==C?void 0:C.videoId)&&{id:null==C?void 0:C.videoId}),(null==C?void 0:C.videoTitle)&&{title:null==C?void 0:C.videoTitle}),contentDetails:Ne({},(null==k?void 0:k.length)>0&&{closedCaptions:m(k)})},(null==C?void 0:C.runtime)&&{runtime:null==C?void 0:C.runtime}),(null==C?void 0:C.publishDate)&&{publishDate:null==C?void 0:C.publishDate}),(null==C?void 0:C.platform)&&{platform:null==C?void 0:C.platform}),(null==C?void 0:C.series)&&{series:null==C?void 0:C.series}),ads:{preRoll:{adTags:{web:Ne(Ne({},b&&{active:!0}),b&&{url:b})}}}});return C&&(null!=C&&C.isDvrEnabled&&(P.video.liveDetails=Ne(Ne({},P.video.liveDetails),{},{isDvrEnabled:null==C?void 0:C.isDvrEnabled})),null!=C&&C.metadata&&(P.video.metadata=[].concat(m(P.video.metadata),m(null==C?void 0:C.metadata)))),P},He=null,Ue=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,r=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[r>0&&i>0?r:0,i,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},qe=function(e){var n,t=g(e,8),o=t[0],i=t[1],r=t[2],l=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=o>=1?" ".concat(o," Year"):i>=1?" ".concat(i," month"):r>=1?" ".concat(r," week"):l>=1?" ".concat(l," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(u," minutes ").concat(s," seconds"):u>0?"".concat(u," minutes ").concat(s," seconds"):"".concat(s," seconds"),d.textContent="".concat(n)},Fe=(Be={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return Be},set:function(e){Be={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function Ge(e,n,t,o){if(e){var i=function(){var e,i,l=null===(e=Fe.get())||void 0===e?void 0:e.scheduleStartTimeMs,a=null===(i=Fe.get())||void 0===i?void 0:i.scheduleEndTimeMs,u=Date.now();if(u-a>0){var s=document.getElementsByClassName("error-message")[0];return s&&(s.textContent=d.getLocalisation("eventEnded")||"Game has ended",o.textContent=""),clearInterval(r),void(null==t||t())}var c=l-u;if(c/1e3<=0)return clearInterval(r),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var v=Ue(c,l);null==n||n([].concat(m(v),[o]))};i();var r=setInterval(i,1e3);return r}}var We=function(e,n,t){var o,i,r,l,a,u,s,c,v=null==n||null===(o=n.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.errorCode,p=(null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorMessage)||(null==n?void 0:n.message)||null;Fe.set({startDateTime:null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,endDateTime:null==n||null===(s=n.response)||void 0===s||null===(c=s.data)||void 0===c?void 0:c.scheduleEndDate}),function(e,n,t,o){var i,r,l=Date.now(),a=null===(i=Fe.get())||void 0===i?void 0:i.scheduleStartTimeMs,u=null===(r=Fe.get())||void 0===r?void 0:r.scheduleEndTimeMs,s=function(e,n,t,o){var i;e<0?i=d.getLocalisation("eventNotStarted")||o||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(i=d.getLocalisation("eventEnded")||o||"Game has ended");return i||o}(l-a,l-u,n,t);if(document.getElementsByClassName("error-container")[0]){var c=document.getElementsByClassName("error-message")[0];c&&(c.textContent="".concat(s));var v=document.getElementsByClassName("error-timer-message")[0];v&&Ge(Math.abs(a),qe,o,v)}else{var p=document.getElementById(e).parentElement;if(p){var f=document.createElement("div");f.className="error-container";var m=document.createElement("div");m.className="error-message";var g=document.createElement("div");g.className="error-timer-message",m.textContent="".concat(s),f.appendChild(m),f.appendChild(g),p.append(f),Ge(Math.abs(a),qe,o,g)}}}(e,v,p,t)};function Ke(n,t){var o=t.scheduleEndDate,i=t.scheduleStartDate;Fe.set({startDateTime:i,endDateTime:o}),He&&clearInterval(He),He=setInterval((function(){var t,o=Date.now(),i=null===(t=Fe.get())||void 0===t?void 0:t.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",i),i&&o>i){var r;console.log("Game ended");var l=s.getPlayer(n);if(e.isPlayerInitialised(n)&&l){var a;l.dispose(),console.log("Player disposed");var u=null===(a=document.getElementsByClassName("vl-container"))||void 0===a?void 0:a[0],c=document.createElement("video");c.id=n,c.className="video-js",c.style.width="100%",c.style.height="100%",u&&u.appendChild(c)}var v=d.getLocalisation("eventEnded")||"Game has ended",p=null===(r=document.getElementsByClassName("error-container"))||void 0===r?void 0:r[0];if(p){var f=p.querySelector(".error-message");f&&(f.textContent=v)}else{var m=document.getElementById(n),g=null==m?void 0:m.parentElement;if(g){(p=document.createElement("div")).className="error-container";var h=document.createElement("div");h.className="error-message",h.textContent=v,p.appendChild(h),g.append(p)}}clearInterval(He)}}),1e3)}function Ye(e,n){return Je.apply(this,arguments)}function Je(){return Je=t(o.mark((function n(t,i){var r,l,a,u,s,d,v,p,f;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.resolve,u=i.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,v=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:p=n.sent,f=!1===(null==t||null===(r=t.customData)||void 0===r||null===(l=r.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getVideoDetails(s,p,f).then((function(n){var o,i,r,l,f,m,g,h,y,b;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(i=o.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.contentType,c.setCurrentVideo(null==n?void 0:n.data);var w=null==n||null===(l=n.data)||void 0===l||null===(f=l.video)||void 0===f||null===(m=f.gist)||void 0===m?void 0:m.scheduleEndDate,k=null==n||null===(g=n.data)||void 0===g||null===(h=g.video)||void 0===h||null===(y=h.gist)||void 0===y?void 0:y.scheduleStartDate;Ke(d,{scheduleEndDate:w,scheduleStartDate:k});var S,I=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(b=t.watchHistory)&&void 0!==b&&b.enable&&!v)if((null===(S=t.watchHistory)||void 0===S?void 0:S.saveOffline)||!1){var E,T,D,O=ve((null===(E=t.watchHistory)||void 0===E?void 0:E.profileId)||"",s,null==t?void 0:t.siteOwner);if(O&&O.length)t.watchHistoryResumeTime=(null===(T=O[0])||void 0===T?void 0:T.watchedTime)||null,t.watchedPercentage=(null===(D=O[0])||void 0===D?void 0:D.watchedPercentage)||null;I.contentType="video",Me(d,{res:I},t,{resolve:a,reject:u})}else e.getVideoInfo(s,p).then((function(e){var n,o,i,r,l,a;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,I.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(){Me(d,{res:I},t,{resolve:a,reject:u})}));else Me(d,{res:I},t,{resolve:a,reject:u})})).catch((function(n){var o,i,r=(null==t||null===(o=t.event)||void 0===o?void 0:o.showScheduleTimer)||!1,l=(null==t||null===(i=t.event)||void 0===i?void 0:i.onCountdownComplete)||null;r&&We(d,n,l),e.initiateErrorHandling(n,d,u,s)}));case 9:case"end":return n.stop()}}),n)}))),Je.apply(this,arguments)}function ze(e,n){return Xe.apply(this,arguments)}function Xe(){return Xe=t(o.mark((function n(t,i){var r,l,a,u,s,d,c,v;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.resolve,u=i.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(r=t.customData)||void 0===r||null===(l=r.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then((function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,Me(d,{res:n},t,{resolve:a,reject:u})})).catch((function(n){e.initiateErrorHandling(n,d,u,videoId)}));case 8:case"end":return n.stop()}}),n)}))),Xe.apply(this,arguments)}function Qe(e,n){return $e.apply(this,arguments)}function $e(){return $e=t(o.mark((function n(t,i){var r,l,a,u,s,d,v;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return l=i.resolve,a=i.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,c.seasonIdxManager.set(parseInt(d)),v=null==t||null===(r=t.series)||void 0===r?void 0:r.id,e.getSeriesDetails(v,u).then((function(n){var o,i,r,d=n.data,p=n.data.seasons;c.setCurrentSeries(p);var f=videoId||(null==p||null===(o=p[0])||void 0===o||null===(i=o.episodes)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.id);e.createSeriesWatchMap(v,u),e.getVideoDetails(f,u).then((function(e){var n,o,i;window.contentType=null==e||null===(n=e.data)||void 0===n||null===(o=n.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,c.setCurrentVideo(e.data),Me(s,{res:null==e?void 0:e.data,sres:d},t,{resolve:l,reject:a})})).catch((function(n){e.initiateErrorHandling(n,s,a,videoId)}))})).catch((function(n){e.initiateErrorHandling(n,s,a)}));case 9:case"end":return n.stop()}}),n)}))),$e.apply(this,arguments)}var Ze,en=function(n){var t=n.site,o=n.sseBaseUrl,i=n.sseEndpoint;return h.createSSETransport({site:t,sseBaseUrl:o,getToken:e.getToken,sseEndpoint:i,onOpen:function(e){var n=e.userId,t=e.endpoint;console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,o,i,r,l,a,u,s,d;if(console.log("SSE Message:",e),(null===(n=c.getCurrentVideo())||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 v=1e3*(null==e||null===(r=e.payload)||void 0===r||null===(l=r.states)||void 0===l||null===(a=l.live)||void 0===a?void 0:a.startDateTime),p=1e3*(null==e||null===(u=e.payload)||void 0===u||null===(s=u.states)||void 0===s||null===(d=s.end)||void 0===d?void 0:d.endDateTime);v&&p&&(console.log("Setting schedule timer",v,p),Fe.set({startDateTime:v,endDateTime:p}))}},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")}})},nn=function(e){var n=e.enable,t=e.site,o=e.sseBaseUrl,i=e.sseEndpoint;if(n){var r=en({site:t,sseBaseUrl:o,sseEndpoint:i});return r._sseBaseUrl=o,r._site=t,r._sseEndpoint=i,r}};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 on(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tn(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):tn(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:r.onTimeUpdate,getVideoDuration:r.getVideoDuration,onVideoEnded:r.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=t(o.mark((function t(i,r){var l,a,s,c,v,p,f,m,g,h,b,w,k,S,I,E,T,D,O,C,P,j,A,L,M,R,N,B,_,V;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(T=(null==n?void 0:n.videoSourceUrl)||!1,D=null==n?void 0:n.asat,O=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,C=null==n?void 0:n.videoId,P=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,j=(null==n?void 0:n.streamingInfo)||!1,window.videoId=C,A=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",A),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),A&&!e.isTokenExpired(A)){t.next=16;break}return r({status:!1,msg:"".concat(A?"Token is expired !":"Missing Authorization Token"),response:{token:A}}),t.abrupt("return");case 16:Ze=JSON.parse(atob(A.split(".")[1]));case 17:return window.siteName=null===(s=Ze)||void 0===s?void 0:s.site,window.siteId=null===(c=Ze)||void 0===c?void 0:c.siteId,n.isAnonymousUser=!(null===(v=Ze)||void 0===v||!v.anonymousId),n.siteOwner=(null===(p=Ze)||void 0===p?void 0:p.site)||null,n.userId=(null===(f=Ze)||void 0===f?void 0:f.userId)||null,window.sessionStorage.setItem("uid",null===(m=Ze)||void 0===m?void 0:m.userId),window.watchHistory=n.watchHistory||null,L=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,M=(null==n||null===(h=n.analytics)||void 0===h?void 0:h.gaId)||null,(R=null==n?void 0:n.errors)&&(window.customErrors=R),window.customData=null==n?void 0:n.customData,d.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!u.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=35,x(n);case 35:ge.setConfig(n),M&&y("https://www.googletagmanager.com/gtag/js?id=".concat(M)).then((function(){return e.runGtag(M)})).catch((function(e){})),(N=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(L)))&&N.addEventListener("contextmenu",(function(e){return e.preventDefault()})),(B=nn({enable:null==n||null===(k=n.sse)||void 0===k?void 0:k.enable,site:null==n||null===(S=n.sse)||void 0===S?void 0:S.siteName,sseBaseUrl:null==n||null===(I=n.sse)||void 0===I?void 0:I.sseBaseUrl,sseEndpoint:null==n||null===(E=n.sse)||void 0===E?void 0:E.sseEndpoint}))&&!B.isConnectionActive()&&B.connect(),T?(V={directPlaybackUrl:T,id:_="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},D?e.getVideoDetails(_,A).then((function(e){var t=(null==e?void 0:e.data)||{};Me(L,{res:on(on({},t),V)},n,{resolve:i,reject:r})})).catch((function(n){e.initiateErrorHandling(n,L,r,_)})):Me(L,{res:V},n,{resolve:i,reject:r})):j?_e(n,{resolve:i,reject:r}):P?Qe(n,{resolve:i,reject:r}):O?ze(n,{resolve:i,reject:r}):Ye(n,{resolve:i,reject:r});case 42:case"end":return t.stop()}}),t)})));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:s.getPlayer,play:e.play,pause:e.pause,detectBrowser:e.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:r.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,playSelectedResolution:a.playSelectedResolution,getSource:e.getSource,setVolume:w,getVolume:k,disableControls:e.disableControls,setPlaybackSpeed:r.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,adsQueuePointManager:e.adsQueuePointManager,getSsaiEvents:e.getSsaiEvents,playerEvents:r.playerEvents,onReplay:r.onReplay,isBehindLive:e.isBehindLive}},exports.initiateMarker=function(e){var n=s.getPlayer(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var i=t.start(0),r=t.end(t.length-1)-i;Oe(),Ce(r).forEach((function(e){var n=e.id,t=e.title,i=e.time,l=De(n,t,Math.min(i/r*100,99.5));o.appendChild(l)}))}},exports.removeMarkers=Oe;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),u=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),n=require("./skin-f5e18b89.js"),s=require("./player_instance-fcf6a8fb.js");function a(e){var t=o();return function(){var r,l=u(e);if(t){var n=u(this).constructor;r=Reflect.construct(l,arguments,n)}else r=l.apply(this,arguments);return i(this,r)}}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}require("@babel/runtime/helpers/toConsumableArray");var c=l.getComponent("Component"),h=function(i){r(o,c);var u=a(o);function o(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,o),(r=u.call(this,t,i)).playerId=i.playerId,r.mute_state=t.muted()||!1,r.initialiseStructure(),r}return t(o,[{key:"createEl",value:function(){return l.dom.createEl("div",{className:"vjs-custom-big-mute vjs-control ".concat(this.mute_state?"":"hide"," tl")})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.getPlayer(this.playerId);null!=this&&this.mute_state&&e.classList.toggle("hide"),n.injectSVG(e,"#vjs-icon-big-mute"),e.onclick=function(){var r=null==t?void 0:t.volume();e.classList.toggle("hide"),t.muted()&&t.muted(!1),t.volume(0==r?100:r)},t.on("volumechange",(function(){var r=t.volume();t.muted()?(e.classList.toggle("hide"),t.volume(r)):r>0?e.classList.add("hide"):0==r&&e.classList.remove("hide")}))}}]),o}();exports.default=h;