@viewlift/player-backup 2.0.242-backup → 2.0.243-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-34d5bfff.js +1 -0
  2. package/cjs/bundle.css +83 -83
  3. package/cjs/caption-settings-25cabfc0.js +1 -0
  4. package/cjs/captions-68e263dd.js +1 -0
  5. package/cjs/currentVideoInfo-5802821b.js +1 -0
  6. package/cjs/features-713288be.js +1 -0
  7. package/cjs/generic-3dec4e29.js +1 -0
  8. package/cjs/helper-dbf2fb22.js +1 -0
  9. package/cjs/index-2cd2820c.js +1 -0
  10. package/cjs/index-316419d1.js +1 -0
  11. package/cjs/index-7ae433c7.js +1 -0
  12. package/cjs/index-80599385.js +1 -0
  13. package/cjs/index-84cce26a.js +1 -0
  14. package/cjs/index.js +1 -1
  15. package/cjs/multicamv2-2fdc45a2.js +1 -0
  16. package/cjs/multicamv2-ff4a9ce9.js +1 -0
  17. package/cjs/nextEpisodeButton-89431f38.js +1 -0
  18. package/cjs/playlist-07a703ff.js +1 -0
  19. package/cjs/resolution-9c4872ec.js +1 -0
  20. package/cjs/resolution-v2-50cbd77b.js +1 -0
  21. package/cjs/series-f308634c.js +1 -0
  22. package/cjs/series-v2-50625842.js +1 -0
  23. package/cjs/series-v2-82f80fb1.js +1 -0
  24. package/cjs/settings-icon-a419af57.js +1 -0
  25. package/cjs/skin-489d1b11.js +1 -0
  26. package/cjs/skin-65dc497e.js +1 -0
  27. package/cjs/skin-864b08d1.js +1 -0
  28. package/cjs/skin-8721cf2f.js +1 -0
  29. package/cjs/skin-877d44f4.js +1 -0
  30. package/cjs/skin-9b50070d.js +1 -0
  31. package/cjs/skin-a41f515c.js +1 -0
  32. package/cjs/skin-ada9e090.js +1 -0
  33. package/cjs/skin-d230db0f.js +1 -0
  34. package/cjs/skin-eeec7a85.js +1 -0
  35. package/cjs/start-begin-btn-5adfa5b7.js +1 -0
  36. package/cjs/util-d17e0a43.js +1 -0
  37. package/cjs/videoSelector-11206443.js +1 -0
  38. package/cjs/videoSelector-a6ffa2ad.js +1 -0
  39. package/cjs/videojs-dash5.es-f9629f7f.js +1 -0
  40. package/cjs/watch-live-btn-1c5d2e69.js +1 -0
  41. package/esm/autoNextVideo-10833d14.js +1 -0
  42. package/esm/bundle.css +83 -83
  43. package/esm/caption-settings-3a5e2e2d.js +1 -0
  44. package/esm/{captions-f507e8ee.js → captions-78bd2908.js} +1 -1
  45. package/esm/{currentVideoInfo-a8a254c2.js → currentVideoInfo-0b234e55.js} +1 -1
  46. package/esm/features-bd974ef1.js +1 -0
  47. package/esm/generic-cab4cba0.js +1 -0
  48. package/esm/helper-d52dff3c.js +1 -0
  49. package/esm/index-02294ca3.js +1 -0
  50. package/esm/index-23b9dfb4.js +1 -0
  51. package/esm/index-2ab55f4b.js +1 -0
  52. package/esm/index-5d92eaa3.js +1 -0
  53. package/esm/index-ef3bbe81.js +1 -0
  54. package/esm/index.js +1 -1
  55. package/esm/multicamv2-28f5d0a2.js +1 -0
  56. package/esm/multicamv2-e251ab1b.js +1 -0
  57. package/esm/nextEpisodeButton-44f1ba55.js +1 -0
  58. package/esm/playlist-3134720c.js +1 -0
  59. package/esm/resolution-62be852a.js +1 -0
  60. package/esm/resolution-v2-6446fe47.js +1 -0
  61. package/esm/series-42cacd14.js +1 -0
  62. package/esm/series-v2-f7f421aa.js +1 -0
  63. package/esm/series-v2-fca0c115.js +1 -0
  64. package/esm/settings-icon-7d9e5221.js +1 -0
  65. package/esm/skin-0cf7db04.js +1 -0
  66. package/esm/skin-144bb018.js +1 -0
  67. package/esm/skin-20540ac1.js +1 -0
  68. package/esm/skin-453d57ce.js +1 -0
  69. package/esm/skin-4b5cdee1.js +1 -0
  70. package/esm/skin-65765793.js +1 -0
  71. package/esm/skin-6ea84e49.js +1 -0
  72. package/esm/skin-8d57b8d5.js +1 -0
  73. package/esm/skin-b62e373b.js +1 -0
  74. package/esm/skin-fefd11d4.js +1 -0
  75. package/esm/start-begin-btn-16534825.js +1 -0
  76. package/esm/util-55f86fb6.js +1 -0
  77. package/esm/videoSelector-04ed35af.js +1 -0
  78. package/esm/videoSelector-8e18b08f.js +1 -0
  79. package/esm/videojs-dash5.es-bc6f319d.js +1 -0
  80. package/esm/watch-live-btn-ddcfab89.js +1 -0
  81. package/package.json +2 -2
  82. package/cjs/autoNextVideo-fa25e36c.js +0 -1
  83. package/cjs/caption-settings-d1eb3bf6.js +0 -1
  84. package/cjs/captions-dbc83a75.js +0 -1
  85. package/cjs/currentVideoInfo-31d70bec.js +0 -1
  86. package/cjs/features-9d595ecd.js +0 -1
  87. package/cjs/generic-247ee476.js +0 -1
  88. package/cjs/helper-a50a8ffc.js +0 -1
  89. package/cjs/index-3f0e537b.js +0 -1
  90. package/cjs/index-4905764c.js +0 -1
  91. package/cjs/index-a0c54c57.js +0 -1
  92. package/cjs/index-b5245fb0.js +0 -1
  93. package/cjs/index-f8cb99fc.js +0 -1
  94. package/cjs/multicamv2-41b6300c.js +0 -1
  95. package/cjs/multicamv2-80a70fe1.js +0 -1
  96. package/cjs/nextEpisodeButton-b2003b41.js +0 -1
  97. package/cjs/playlist-2da32614.js +0 -1
  98. package/cjs/resolution-f9dcc1b4.js +0 -1
  99. package/cjs/resolution-v2-e42e0101.js +0 -1
  100. package/cjs/series-9e02fa24.js +0 -1
  101. package/cjs/series-v2-0d6b2ed5.js +0 -1
  102. package/cjs/series-v2-c74340cd.js +0 -1
  103. package/cjs/settings-icon-b43f4406.js +0 -1
  104. package/cjs/skin-0edcebc6.js +0 -1
  105. package/cjs/skin-10f659ae.js +0 -1
  106. package/cjs/skin-5c8601cd.js +0 -1
  107. package/cjs/skin-6a5ff9b3.js +0 -1
  108. package/cjs/skin-76b830fa.js +0 -1
  109. package/cjs/skin-a59d5fce.js +0 -1
  110. package/cjs/skin-aad2cdf9.js +0 -1
  111. package/cjs/skin-b20205e1.js +0 -1
  112. package/cjs/skin-e6846b88.js +0 -1
  113. package/cjs/skin-f5e18b89.js +0 -1
  114. package/cjs/start-begin-btn-5739a6c0.js +0 -1
  115. package/cjs/util-dfb4690b.js +0 -1
  116. package/cjs/videoSelector-9fbef43b.js +0 -1
  117. package/cjs/videoSelector-c93d578e.js +0 -1
  118. package/cjs/videojs-dash5.es-ec94e5f4.js +0 -1
  119. package/cjs/watch-live-btn-822534d1.js +0 -1
  120. package/esm/autoNextVideo-6665cb5d.js +0 -1
  121. package/esm/caption-settings-6001af40.js +0 -1
  122. package/esm/features-4d9dadd2.js +0 -1
  123. package/esm/generic-55f5ab62.js +0 -1
  124. package/esm/helper-349e076f.js +0 -1
  125. package/esm/index-4bae6ced.js +0 -1
  126. package/esm/index-4cc8ac6f.js +0 -1
  127. package/esm/index-8e3eab6d.js +0 -1
  128. package/esm/index-96f340db.js +0 -1
  129. package/esm/index-9cdd702f.js +0 -1
  130. package/esm/multicamv2-95376416.js +0 -1
  131. package/esm/multicamv2-979d3f2d.js +0 -1
  132. package/esm/nextEpisodeButton-b1437651.js +0 -1
  133. package/esm/playlist-68518b08.js +0 -1
  134. package/esm/resolution-1c59b0f3.js +0 -1
  135. package/esm/resolution-v2-705ae275.js +0 -1
  136. package/esm/series-34dc376f.js +0 -1
  137. package/esm/series-v2-1051863c.js +0 -1
  138. package/esm/series-v2-2dda1334.js +0 -1
  139. package/esm/settings-icon-1e7b0951.js +0 -1
  140. package/esm/skin-12828f94.js +0 -1
  141. package/esm/skin-1ae76a5a.js +0 -1
  142. package/esm/skin-20255c93.js +0 -1
  143. package/esm/skin-3dcba1b2.js +0 -1
  144. package/esm/skin-52b2f4cb.js +0 -1
  145. package/esm/skin-917a0e13.js +0 -1
  146. package/esm/skin-a5f3acf1.js +0 -1
  147. package/esm/skin-ad9414e7.js +0 -1
  148. package/esm/skin-f7ba3e13.js +0 -1
  149. package/esm/skin-f7f65061.js +0 -1
  150. package/esm/start-begin-btn-1e096fec.js +0 -1
  151. package/esm/util-04403c7d.js +0 -1
  152. package/esm/videoSelector-890252dc.js +0 -1
  153. package/esm/videoSelector-c76d989d.js +0 -1
  154. package/esm/videojs-dash5.es-390dd922.js +0 -1
  155. package/esm/watch-live-btn-5419f3a7.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),u=require("video.js"),l=require("./icons-2609dbe4.js"),o=require("./helper-dbf2fb22.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("./currentVideoInfo-5802821b.js");var s=u.getComponent("Component"),a=function(){t(b,s);var a,h,v=(a=b,h=c(),function(){var e,r=i(a);if(h){var t=i(this).constructor;e=Reflect.construct(r,arguments,t)}else e=r.apply(this,arguments);return n(this,e)});function b(r,t){var n;return e(this,b),n=v.call(this,r,t),t.userId,t.siteOwner,n.el().innerHTML=l.watchLiveIcon(),n.on("click",function(){o.playLiveHandler(r)}),n}return r(b,[{key:"createEl",value:function(){return u.dom.createEl("button",{className:"vjs-control vjs-button dvr-watch-live-btn",role:"button",tabIndex:0,title:"Watch Live"})}}]),b}();exports.default=a;
@@ -0,0 +1 @@
1
+ import{s as n,j as t,k as o}from"./currentVideoInfo-0b234e55.js";import{E as i,T as e}from"./generic-cab4cba0.js";import{a as r}from"./util-55f86fb6.js";import{h as s}from"./skin-65765793.js";import{g as a}from"./player_instance-34118a5b.js";var c,u=0,f=0,m=function(m){clearTimeout(u);var d=null==m?void 0:m.content;c=null==m?void 0:m.cb;var h=m.playerId;r(h,function(){var r=a(h);0!==(null==r?void 0:r.currentTime())&&((f=t())>d.length-1||(o(f+1),i(h,d[f].id).then(function(t){s(f,h),n(t.response),f++,p(t)}).catch(function(n){p(n),s(f,h),f++,u=setTimeout(function(){e(h)&&l(f,h,d)},5e3)})))})},l=function n(t,e,r,a){f=t,t>r.length-1||(o(f+1),i(e,r[t].id).then(function(n){s(f,e),f++,p(n)}).catch(function(t){p(t),setTimeout(function(){s(f,e),f++,n(f,e,r)},5e3)}))},p=function(n){c&&c(n)};export{m as a,l as s};
package/esm/bundle.css CHANGED
@@ -3,7 +3,6 @@
3
3
 
4
4
 
5
5
 
6
-
7
6
  .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
8
7
  height: 0.7em;
9
8
  position: absolute;
@@ -742,6 +741,7 @@ iframe{
742
741
 
743
742
 
744
743
 
744
+
745
745
  .video-js.skin_mini .vjs-button>.vjs-icon-placeholder:before {
746
746
  font-size: 2.2em;
747
747
  line-height: 2.6;
@@ -1921,6 +1921,56 @@ iframe{
1921
1921
 
1922
1922
 
1923
1923
 
1924
+
1925
+ .vjs-custom-big-mute.vjs-control{
1926
+ position: absolute;
1927
+ align-items: center;
1928
+ background: #fcb700;
1929
+ border: 0;
1930
+ display: flex;
1931
+ align-items: center;
1932
+ height: 44px;
1933
+ justify-content: center;
1934
+ padding: 0;
1935
+ width: 44px;
1936
+ z-index: 1;
1937
+ outline: none;
1938
+ text-shadow:none !important;
1939
+ cursor: pointer;
1940
+ }
1941
+ .video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control {
1942
+ display: flex;
1943
+ top: 50px;
1944
+ height: 50px;
1945
+ width: 50px;
1946
+ }
1947
+ .video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control >svg {
1948
+ height: 28px;
1949
+ width: 28px;
1950
+ }
1951
+ .vjs-custom-big-mute.vjs-control:hover{
1952
+ filter: none;
1953
+ }
1954
+
1955
+
1956
+ .vjs-custom-big-mute.vjs-control.tl{
1957
+ top: 0;
1958
+ left: 0;
1959
+ margin: 15px 0 0 15px;
1960
+ }
1961
+
1962
+ .vjs-custom-big-mute.vjs-control.hide{
1963
+ display: none !important;
1964
+
1965
+ }
1966
+
1967
+ .vjs-custom-big-mute.vjs-control > svg {
1968
+ color: #071d39;
1969
+ height: 22px;
1970
+ width: 22px;
1971
+ }
1972
+
1973
+
1924
1974
  .video-js .multicamera-parent.default{
1925
1975
  height: 345px;
1926
1976
  position: absolute;
@@ -2000,56 +2050,6 @@ iframe{
2000
2050
  }
2001
2051
 
2002
2052
 
2003
-
2004
-
2005
- .vjs-custom-big-mute.vjs-control{
2006
- position: absolute;
2007
- align-items: center;
2008
- background: #fcb700;
2009
- border: 0;
2010
- display: flex;
2011
- align-items: center;
2012
- height: 44px;
2013
- justify-content: center;
2014
- padding: 0;
2015
- width: 44px;
2016
- z-index: 1;
2017
- outline: none;
2018
- text-shadow:none !important;
2019
- cursor: pointer;
2020
- }
2021
- .video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control {
2022
- display: flex;
2023
- top: 50px;
2024
- height: 50px;
2025
- width: 50px;
2026
- }
2027
- .video-js.vjs-fullscreen .vjs-custom-big-mute.vjs-control >svg {
2028
- height: 28px;
2029
- width: 28px;
2030
- }
2031
- .vjs-custom-big-mute.vjs-control:hover{
2032
- filter: none;
2033
- }
2034
-
2035
-
2036
- .vjs-custom-big-mute.vjs-control.tl{
2037
- top: 0;
2038
- left: 0;
2039
- margin: 15px 0 0 15px;
2040
- }
2041
-
2042
- .vjs-custom-big-mute.vjs-control.hide{
2043
- display: none !important;
2044
-
2045
- }
2046
-
2047
- .vjs-custom-big-mute.vjs-control > svg {
2048
- color: #071d39;
2049
- height: 22px;
2050
- width: 22px;
2051
- }
2052
-
2053
2053
  /* nextep */
2054
2054
  .next-ep-preview{
2055
2055
  position: absolute;
@@ -2125,38 +2125,6 @@ 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
-
2160
2128
  .video-js.vjs-quality-menu {
2161
2129
  display: block;
2162
2130
  }
@@ -2227,6 +2195,38 @@ iframe{
2227
2195
  -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
2228
2196
  animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
2229
2197
  }
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
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as r,e as c}from"./icons-37daa6b3.js";import{g as l,d as s,e as d}from"./captions-78bd2908.js";import{g as p,s as m,j as u,k as v}from"./skin-65765793.js";import"./player_instance-34118a5b.js";import"@babel/runtime/helpers/toConsumableArray";function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var h=i.getComponent("Component"),y=function(){n(E,h);var y,g,C=(y=E,g=f(),function(){var e,t=o(y);if(g){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function E(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,E),(i=C.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important"),i}return t(E,[{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())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./caption-settings-cb47408f.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=l(this.playerId);null==t||t.map(function(t){return s(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")?(p(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",m(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),u(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(c())});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"}),r=i.dom.createEl("div",{className:"caption-selector-content"}),l=i.dom.createEl("div",{className:"caption-container"}),s=this.createLanguageContanier();i.dom.appendContent(l,s),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,r),i.dom.appendContent(r,l),v(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")),l(e.playerId).map(function(t){return s(e.playerId,t.id)})},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var c=l(this.playerId),p=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==c||null===(a=c[n])||void 0===a?void 0:a.label;var l=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});l.onchange=function(t){d(e.playerId,c[n].id)},l.setAttribute("type","radio"),i.dom.appendContent(o,l),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},m=0;m<c.length;m++)p(m);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}}]),E}();export{y as default};
@@ -1 +1 @@
1
- import{g as t}from"./player_instance-34118a5b.js";var e=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(e).textTracks(),i=0;i<l.length;i++){var o=l[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},n=function(e,n){for(var a=t(e).textTracks(),r=0;r<a.length;r++){var s=a[r];"subtitles"!==s.kind&&"captions"!==s.kind||s.id!==n||(s.mode="hidden")}},a=function(e){var n,a=t(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})))||[]},r=function(e){var n=t(e);n.remoteTextTracks().tracks_.map((function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)}))},s=function(e,n){var a=t(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)})}))};export{s as a,n as d,e,a as g,r};
1
+ import{g as t}from"./player_instance-34118a5b.js";var e=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(e).textTracks(),i=0;i<l.length;i++){var o=l[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},n=function(e,n){for(var a=t(e).textTracks(),r=0;r<a.length;r++){var s=a[r];"subtitles"!==s.kind&&"captions"!==s.kind||s.id!==n||(s.mode="hidden")}},a=function(e){var n,a=t(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}))||[]},r=function(e){var n=t(e);n.remoteTextTracks().tracks_.map(function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)})},s=function(e,n){var a=t(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)})})};export{s as a,n as d,e,a as g,r};
@@ -1 +1 @@
1
- var n,t,u,i,a,e,o,c=[],f=function(n){t=n},r=(e=new Map,{set:function(n){var t,u=(null==n||null===(t=n.video)||void 0===t?void 0:t.id)||n||null;e.set(u,(e.get(u)||0)+1)},get:function(n){return e.get(n)},clear:function(){e.clear()}}),s=function(){return t},l=function(t){n=t},v=function(){return n},d=function(){return u},g=function(n){u=n},p=function(n){a=n},w=function(){return a},M=function(n){i=new Map,n.map((function(n,t){i.set(n.id,t)}))},b=function(n){if(i){var t=i.get(n);g(t+1)}},h=(o=0,{set:function(n){n>=0&&(o=n)},get:function(){return o}}),j=function(n){c=n},k=function(){return c};export{s as a,w as b,k as c,j as d,h as e,l as f,v as g,p as h,b as i,d as j,g as k,M as l,f as s,r as v};
1
+ var n,t,u,i,a,e,o,c=[],f=function(n){t=n},r=(e=new Map,{set:function(n){var t,u=(null==n||null===(t=n.video)||void 0===t?void 0:t.id)||n||null;e.set(u,(e.get(u)||0)+1)},get:function(n){return e.get(n)},clear:function(){e.clear()}}),s=function(){return t},l=function(t){n=t},v=function(){return n},d=function(){return u},g=function(n){u=n},p=function(n){a=n},w=function(){return a},M=function(n){i=new Map,n.map(function(n,t){i.set(n.id,t)})},b=function(n){if(i){var t=i.get(n);g(t+1)}},h=(o=0,{set:function(n){n>=0&&(o=n)},get:function(){return o}}),j=function(n){c=n},k=function(){return c};export{s as a,w as b,k as c,j as d,h as e,l as f,v as g,p as h,b as i,d as j,g as k,M as l,f as s,r as v};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as a,z as s}from"./generic-cab4cba0.js";import{g as c}from"./resolution-62be852a.js";import{p as d}from"./skin-65765793.js";import{g as u}from"./localisation-0bf399a1.js";import{g as p}from"./player_instance-34118a5b.js";function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?m(Object(r),!0).forEach(function(n){e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var g=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u("slowMoText")||"Slow Mo",r}return n(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)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=d(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=d(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-v2-6446fe47.js").then(function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=p(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))})},b=function(e,t,n){import("./nextEpisodeButton-44f1ba55.js").then(function(r){var o=r.default,l=p(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)})},j=function(e,t,n){import("./series-42cacd14.js").then(function(r){var o=r.seriesModule,l=p(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]&&r.handleSeasonChange(t[e],e,l,n)})},c=0;c<a.length;c++)s(c)})},k=function(e,t){import("./videoSelector-8e18b08f.js").then(function(n){var r=n.default,o=p(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},I=function(e,t){import("./caption-settings-3a5e2e2d.js").then(function(n){var r,o,l,a,s=n.default,c=p(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.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(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},S=function(e,t){import("./settings-icon-7d9e5221.js").then(function(n){var r,o,l,a,s=n.default,c=p(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.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(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},w=function(e,t){import("./playlist-3134720c.js").then(function(n){var r=n.default,o=p(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},E=function(e,t){import("./series-v2-fca0c115.js").then(function(n){var r=n.default,o=p(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},O=function(e,t){import("./multicamv2-e251ab1b.js").then(function(n){var r=n.default,o=p(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},M=function(e,t){var n=p(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=p(e).el(),n=0,r=p(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e}),window._multiplayer_dbTapHandler=o},x=function(e,t){import("./videoSelector-04ed35af.js").then(function(n){var r=n.default,o=p(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},L=function(e,t){import("./series-v2-f7f421aa.js").then(function(n){var r=n.default,o=p(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},_=function(e,t){import("./multicamv2-28f5d0a2.js").then(function(n){var r=n.default,o=p(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},D=function(e,t){import("./index-2ab55f4b.js").then(function(n){var r=n.default,o=p(e);i.registerComponent("MuteButton",r),o.addChild("MuteButton",h({playerId:e},t))})},N=function(e,t){import("./start-begin-btn-16534825.js").then(function(n){var r=n.default,o=p(e);i.registerComponent("startFromBeginingButton",r);var l=o.getChild("controlBar").addChild("startFromBeginingButton",h({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_}));o.startFromBeginningButton=l})},T=function(e,t){import("./watch-live-btn-ddcfab89.js").then(function(n){var r=n.default,o=p(e);i.registerComponent("watchLiveButton",r);var l=o.getChild("controlBar").addChild("watchLiveButton",h({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_})+1);o.watchLiveButton=l})};export{B as a,j as b,b as c,y as d,C as e,S as f,I as g,M as h,g as i,x as j,_ as k,w as l,L as m,P as n,k as o,E as p,O as q,N as r,T as s,D as t};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r}from"./player_instance-34118a5b.js";import l from"js-cookie";import{a,e as d,g as u,h as s,s as c,i as v,d as m}from"./currentVideoInfo-0b234e55.js";import{a as f,r as p}from"./captions-78bd2908.js";import g from"@babel/runtime/helpers/typeof";import{t as h,c as w}from"./skin-65765793.js";import I from"@babel/runtime/helpers/toConsumableArray";import E from"@babel/runtime/helpers/slicedToArray";import{destroyComscoreTag as y,formulateComscorePayload as T,createComscoreStreamingTag as b,setComscorePlayerInstance as _}from"@viewlift/comscore/index.js";function S(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function O(e){window.dataLayer=window.dataLayer||[],S("js",new Date),S("config",e)}function A(e,n){S("event",e,n)}var D={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 L(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 P(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?L(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):L(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var k={name:"@viewlift/player",version:"2.1.20",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/comscore":"^1.0.5",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=k.version;var F,C=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":U.get()+"".concat(null==D?void 0:D.getVideoDetails)},R=function(e,n){var t,o,r,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})}):i({url:C(),params:P({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":k.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})},j=function(e,n){var t,o,r,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})}):i({url:U.get()+D.getLinearChannelDetails,params:P(P(P(P(P({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===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},N=function(e,n){var t,o,r=K(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):i({url:U.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},V=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,z();case 2:return o=e.sent,e.abrupt("return",i({url:U.get()+"".concat(null==D?void 0:D.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:P({},n),params:P({},(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)}}(),W=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:U.get()+"".concat(null==D?void 0:D.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},B=function(e){var n=e.videoId;return i({method:"GET",url:U.get()+"".concat(null==D?void 0:D.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},U=(F=null==D?void 0:D.apiBaseUrl,{set:function(e){e&&(F=e)},get:function(){return F}}),M=function(e,n,t,o){var r,l;return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},x=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},H=null;function G(){return{set:function(e){e&&(H=e)},get:function(){return H}}}var Q=function(){var e=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=G().get(),o=U.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),Y=null,z=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"))||!x(n)){e.next=6;break}return Y||(Y=Q().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&G().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){Y=null})),e.abrupt("return",Y);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),q=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},K=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function X(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 J(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?X(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):X(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var $=function(){var e,n,t,o,i,r,l,d=a();return"linearchannel"===((null==d?void 0:d.contentType)||"video")?null==d||null===(e=d.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==d?void 0:d.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==d||null===(i=d.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==d||null===(l=d.video)||void 0===l?void 0:l.id)||(null==d?void 0:d.id)};function Z(){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 ee(){return ne.apply(this,arguments)}function ne(){return(ne=n(t.mark(function e(){var n,o,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z();case 2:if(n=e.sent,o=K(n),!(i=null==o?void 0:o.userId)){e.next=9;break}return e.abrupt("return",i);case 9:return i=Z(),window.sessionStorage.setItem("uid",i),e.abrupt("return",i);case 12:case"end":return e.stop()}},e)}))).apply(this,arguments)}function te(){return oe.apply(this,arguments)}function oe(){return(oe=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,z();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ie(e){return e?String(e):""}window.initialise=function(e){window.sid=Z(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,o,i,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,A(r?"FAILED_TO_START":"DROPPED_STREAM",J({pfm:window.platform,uid:ee(),vid:$(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n){e.one("play",tryCatch(function(){var t,o,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),A("PLAY",J({pfm:window.platform,uid:ee(),vid:$(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":$(),watchTime:Math.floor(e.currentTime())})}))},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 i,r,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")&&bufferingFireCount<4)bufferingFireCount++,A("BUFFERING",J({pfm:window.platform,uid:ee(),vid:$(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.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,A("FIRST_FRAME",J({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ee(),vid:$()},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,i,r,l;A("AD_REQUEST",J({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ee(),vid:$(),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}),A("AD_IMPRESSION",J({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ee(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:$()},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.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)&&(bufferingFireCount=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(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(re(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var re=function(e,n,t){return e>=n&&e<=t},le=function(){var e,n=a(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};function ae(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var o,r,l,a,d,u,s,c,v,m,f,p,g,h,w,I,E,y,T,b,_;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z();case 2:return E=e.sent,y=K(E),T=null==y?void 0:y.site,b=null==y?void 0:y.siteId,e.t0=J,e.t1=J,e.t2=J({aid:T,cid:b,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.next=12,ee();case 12:return e.t4=e.sent,e.t5=$(),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?ie(n.adPosition):"",e.next=28,te();case 28:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=le())&&void 0!==m?m:null,e.t28=null!=T?T: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===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t33=(0,e.t0)(e.t31,e.t32),_=[e.t33],i({url:(null===(h=window)||void 0===h||null===(w=h.customData)||void 0===w||null===(I=w.beacon)||void 0===I?void 0:I.url)||U.get()+D.getBeaconUrl,method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:_}).catch(function(e){console.error(e)});case 46:case"end":return e.stop()}},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 de=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"},ue=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},se=function(e,n){var t=new Map;B({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),s(t)}).catch(function(e){return console.log(e)})},ce=function(){var e=d.get();return e>=0?e+1:1},ve=function(){var e,n,t,o=u(),i=a(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=d.get(),s=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return s>=0?s+1:1};function me(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(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?me(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):me(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ge=function(e){var n=he(e,"video.tags",[]),t=he(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},he=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},we=function(){var n,t,o,i,a,d,u,s,c,v,m,f,p,g,h,w,I,E,y,T,b,_,S,O,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",D=arguments.length>1?arguments[1]:void 0,L=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return A;var P=(null==L?void 0:L.siteName)||(null==L?void 0:L.site)||"",k=(null==L?void 0:L.contentType)||"video",F=(null==L||null===(o=L[k])||void 0===o?void 0:o.metadata)||(null==L||null===(i=L[k])||void 0===i||null===(a=i.gist)||void 0===a?void 0:a.metadata),C=r(D);if(!A.includes("VIEWLIFT_"))return A;var R,j=window.getComputedStyle(document.getElementById(D),null),N=Math.trunc(j.getPropertyValue("height").slice(0,-2)),V=Math.trunc(j.getPropertyValue("width").slice(0,-2)),W="linearchannel"===k?null==L||null===(d=L.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==L?void 0:L.channelId)}))||void 0===s||null===(c=s.content)||void 0===c?void 0:c.id:he(L,"video.gist.id",""),B="linearchannel"===k?null==L||null===(v=L.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==L?void 0:L.channelId)}))||void 0===f?void 0:f.title:he(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,M=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){U=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]}));var x=fe(fe({},Ie(F)),{},(_={VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:N,VIEWLIFT_SIZE:pe(V,N),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(p=window)||void 0===p?void 0:p.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:he(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:he(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:he(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==C||null===(g=C.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==C||null===(h=C.options_)||void 0===h?void 0:h.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==P||"usanetwork"==P?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ge(L),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(he(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+he(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:he(null===(w=window)||void 0===w||null===(I=w.app_data)||void 0===I||null===(E=I.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==P||"usanetwork"==P?"":he(null===(y=window)||void 0===y||null===(T=y.app_data)||void 0===T||null===(b=T.site)||void 0===b?void 0:b.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*he(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:he(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:B,VIEWLIFT_CONTENT_SERIES_TITLE:he(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:he(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ve(),VIEWLIFT_SEASON_NUMBER:ce(),VIEWLIFT_CONTENT_TAGS:ge(L),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(_,"VIEWLIFT_LAT",""),e(_,"VIEWLIFT_APP_BUNDLE",""),e(_,"VIEWLIFT_ATT_CONSENT",""),_),null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var H in x){var G=new RegExp(H,"g");A=A.replace(G,x[H])}return A},Ie=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)}));var 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===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return u||s?(ue()?u?a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):s&&(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=ue()?fe(fe({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):fe(fe({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=ue()?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=fe(fe({},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")||""})},Ee=function(e,n){var t,o,i,r,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===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,w=null==e||null===(r=e[p])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,I=(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 E=(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!=w&&w.hls)return Te(w);if(g){var y=be(h,n);return y.src=we(y.src,n,e),y}if("Safari"!==de()&&E)return ye(h);if(I){var T=Te(h);return T.src=we(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=we(b.src,n,e),b}return null},ye=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Te=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},be=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=de();if(r(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 i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(i);return _e(n),u}var s,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(_e(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 _e=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==de()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Se=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},Oe=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},Ae=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var De=!1,Le=function(e,n,t){var o=we(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima&&"object"!==g(i.ima))return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){De=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),De&&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===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};function Pe(e,n){var t,o,i,l=r(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,r,u,s,c,v,m,f;if(Fe.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||An(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(u=r.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||On(e,10)}}},!0)}var ke,Fe=(ke=!0,{enable:function(){ke=!0},disable:function(){ke=!1},get enabled(){return ke}}),Ce="ssai-breakStart",Re="ssai-adImpression",je="ssai-firstQuartile",Ne="ssai-midpoint",Ve="ssai-thirdQuartile",We="ssai-complete",Be="ssai-breakEnd",Ue={breakStart:Ce,impression:Re,firstQuartile:je,midpoint:Ne,thirdQuartile:Ve,complete:We,breakEnd:Be};function Me(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=Ue[o];i&&t.trigger(i,n)}function xe(e){var n=r(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Ce,e)},adImpression:function(e){return t(Re,e)},adFirstQuartile:function(e){return t(je,e)},adMidpoint:function(e){return t(Ne,e)},adThirdQuartile:function(e){return t(Ve,e)},adComplete:function(e){return t(We,e)},adBreakEnd:function(e){return t(Be,e)}}}function He(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 Ge(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?He(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):He(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Qe,Ye=(Qe=null,{get:function(){return Qe},set:function(e){Qe=e}});function ze(e,n){var t,o,i,l,d,u,s,c,v,m,f,p,g,h,w,I,E=null==e?void 0:e.playerId,S=r(E);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var O=a(),A=(null==O||null===(o=O.video)||void 0===o?void 0:o.metadata)||[],D=(null==A?void 0:A.length)&&A.filter(function(e){return"advertisingGenre"===e.name});if(null!==(i=D)&&void 0!==i&&i.length){var L=D.map(function(e){return e.value});D=null==L?void 0:L.join(",")}y();var P,k,F,C=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,R=Array.isArray(null==C?void 0:C.category)?null==C||null===(d=C.category)||void 0===d?void 0:d.join(","):(null==C?void 0:C.category)||null,j=Ge(Ge(Ge({},null==O?void 0:O.video),null==O?void 0:O.linearchannel),{},{programId:(null==C?void 0:C.videotmsid)||null,programTitle:(null==C?void 0:C.lcProgrammeName)||null,episodeId:(null==C?void 0:C.videotmsid)||null,seasonNumber:(null==O||null===(u=O.video)||void 0===u||null===(s=u.series)||void 0===s?void 0:s.seasonNumber)||(null==C||null===(c=C.seriesDetails)||void 0===c?void 0:c.season)||null,episodeNumber:(null==O||null===(v=O.video)||void 0===v||null===(m=v.series)||void 0===m?void 0:m.episodeNumber)||(null==C||null===(f=C.seriesDetails)||void 0===f?void 0:f.episode)||null,episodeTitle:(null==C?void 0:C.lcSubTitle)||null,isCompleteEpisode:!!(null!=O&&null!==(p=O.video)&&void 0!==p&&p.series||null!=C&&null!==(g=C.seriesDetails)&&void 0!==g&&g.episode),genre:D||R,comscoreConfig:{implementationId:(null==e||null===(h=e.comscore)||void 0===h?void 0:h.implementationId)||null,projectId:(null==e||null===(w=e.comscore)||void 0===w?void 0:w.projectId)||null}});if(null!=j&&null!==(I=j.streamingInfo)&&void 0!==I&&I.isLiveStream?j.contentType="LIVE":j.contentType="LONG_FORM_ON_DEMAND",null==j||!j.network){var N,V=(null==j?void 0:j.metadata)||[],W=null==V||null===(N=V.find(function(e){return"network"===e.name}))||void 0===N?void 0:N.value;j.network=W||null}j.siteName=null==j?void 0:j.network,null!=j&&j.network&&null!=j&&j.genre&&(j.customGenre="".concat(j.network,"_").concat((null==j?void 0:j.programTitle)||(P=j,null!=P&&P.series?null==P||null===(F=P.series)||void 0===F?void 0:F.title:null==P||null===(k=P.gist)||void 0===k?void 0:k.title),"_").concat(j.genre)),null!=C&&C.airDate&&(j.publishDate=C.airDate),null!=j&&j.runtime&&(j.runtime=1e3*((null==j?void 0:j.runtime)||0));var B=T(j,S);console.log("comscoreOptions player data",B),b(Ge({playerName:"Video.js"},B)),_(S)}}function qe(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 Ke(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):qe(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function Xe(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,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 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 $e,Ze=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),en=($e=null,{set:function(e){$e=e},get position(){return $e}});function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=n(t.mark(function e(n,o){var i,l,a,d,u,s,c,v,m,f,p,g,h,w,I,y,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r(n),a=Ee(o,n),d=a.src,u=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[u])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,s=d.replace("/dash/","/session/").replace("/master/","/session/"),s=we(s,n,o),c=rn(s),v=E(c,2),m=v[0],f=v[1],p=on(f)||{},s=new URL(s.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=E(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(Ke({adsParams:Ke({},m)},p))});case 14:return g=e.sent,e.next=17,g.json();case 17:return h=e.sent,w="https://"+new URL(s).hostname,I=h.trackingUrl,y=h.manifestUrl,T=w+I,b=w+y,Ze.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 on(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=E(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function rn(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Xe((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=E(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},u={},s=0,c=Object.entries(n);s<c.length;s++){var v=E(c[s],2),m=v[0],f=v[1];if(m.startsWith("ads."))d[m.replace(/^ads\./,"")]=f;else u[m]=f}return[d,u]}var ln,an,dn,un,sn=(ln=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),ln=Array.isArray(e)?I(e):ln},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",ln),I(ln)}}),cn=new Map;function vn(e,n){return mn.apply(this,arguments)}function mn(){return mn=n(t.mark(function e(o,i){var l,a,d,u,s,c,v,m,f,p,g,w,E,y,T,b,_,S,O,A,D,L,P,k,F,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,i,l,a){var d,u,s=r(o);if(!s.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds;var v=(null==n||null===(d=n.ads)||void 0===d||null===(u=d[i])||void 0===u?void 0:u.adId)||c;e<k&&P.clear(),k=e,Math.floor(s.currentTime());var m,f=Xe(t);try{var p=function(){var t,r,l,d=m.value,u=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,g=d.startTime,h=d.durationInSeconds,w=p||c,I=f,E=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(l=r.ads)||void 0===l?void 0:l.adEventHandler)||null,y="".concat(v,"_").concat(u),T="pod-".concat(c);cn.has(T)||cn.set(T,new Set);var b=cn.get(T);if(console.warn(e,w,"map:",u,"condition1:",e>=w,"map:",cn),e>=w&&e<=w+L){if(!b.has(y)){b.add(y);try{F(u,n,I,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,u,n)}if("breakEnd"==u){var _=en.position;en.set(null),setTimeout(function(){null!=_&&(s.currentTime(_),a())},500)}if("function"==typeof E)try{var S,O={eventType:u,startTimeInSeconds:p,startTime:g,durationInSeconds:h,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[i],pod:n,adIndex:i};E({adsData:O}),Me(o,O)}catch(e){console.error("Error when calling ads callback:",e)}}var A=Ye.get();if(A&&0!==Object.keys(A).length){var D=A.formulateComscoreAdPayload,k=A.startComscoreAdTracking,C=A.finishComscoreAdTracking,R=A.endComscoreAdTracking,j="".concat(c,"_").concat(v,"_").concat(u);if(!P.has(j))if(P.set(j,!0),"impression"===u){var N,V=Ze.get();k(D(Ke(Ke({},null==n||null===(N=n.ads)||void 0===N?void 0:N[i]),{},{trackingUrl:V})))}else"complete"===u?C():"breakEnd"===u&&R()}}};for(f.s();!(m=f.n()).done;)p()}catch(e){f.e(e)}finally{f.f()}}},F=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)})})},D=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},cn.clear(),en.set(i),f=Ze.get(),(p=r(o)).one("loadeddata",function(){f&&A(f)}),g=new Map,w=new Map,E=-1,y=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,T=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,b=(null==p||null===(u=p.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,_=(null==p||null===(s=p.el())||void 0===s||null===(c=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,S=(null==p||null===(v=p.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[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 I(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),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 Ke(Ke({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&i.push(null==s?void 0:s[0])}return i},A=function(){var e=n(t.mark(function e(n){var l,a,d,u,s,c,v,m,f,p,A,L,P,k,F,R,j,N,V,W,B,U,M,x;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",W),0===e.button&&j()},V=function(e){},N=function(){var e,n=p.currentTime(),t=null,o=Xe(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,g.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){p.currentTime(t+2.2)},100))},j=function(){var e,n=p.currentTime(),t=null,o=Xe(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!g.has(r)||n>=r&&n<=d)&&(t=r,g.set(r,!0),w.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){p.currentTime(t-.4)},100))},s=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),m=v.avails,f=[],p=r(o),A=p.controlBar.progressControl,L=A.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),m.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),f.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!s&&i&&(p.currentTime(i),N()),null!=f&&f.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),window.adsQueueList=f,"function"==typeof(R=(null===(P=window)||void 0===P||null===(k=P.customData)||void 0===k||null===(F=k.ads)||void 0===F?void 0:F.onAdBreaksLoaded)||null)&&(null==f?void 0:f.length)>0&&R(f)),console.log(f,"data"),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=p.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",L.appendChild(r)}}),p._timeUpdateHandler&&p.off("timeupdate",p._timeUpdateHandler),p._timeUpdateHandler=h(function(){var e=p.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=f[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-4&&e<=a+4){var d;e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&g.set(i,!0),Fe.disable(),y&&y.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),A.el().classList.add("hide-progress-bar");for(var u=e-i,s=0,c=0,v=0;v<l.length;v++){var m,p=null==l||null===(m=l[v])||void 0===m?void 0:m.durationInSeconds;if(u<s+p){c=v;break}s+=p}l[c];var h=Math.max(0,r-u),E=Math.round(h);B.style.display="block",x.textContent="".concat(c+1," of ").concat(l.length," • ").concat(D(E));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,I(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&O.push.apply(O,I(null==t?void 0:t.podSlotImpressionBeacon)),C(e,t,O,c,0,N),"break"}w.delete(i)},o=0;o<f.length;o++){if("break"===t())break}n||(B.style.display="none",A.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")),y&&y.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Fe.enable())}},1e3),p.on("timeupdate",p._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){Fe.enabled&&"ArrowRight"==e.key&&(j(),On(o,10),e.stopPropagation())}),A.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",W))}),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()}),(B=document.createElement("div")).className="ssai-ad-container",(U=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",U.append(M),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",B.append(U),B.append(x),p.el().appendChild(B);case 45:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=1.5,P=new Map,k=-1;case 21:case"end":return e.stop()}},e)})),mn.apply(this,arguments)}function fn(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 pn(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)?pn(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 pn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function gn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function hn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?gn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):gn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var wn={},In=(null===(an=window)||void 0===an||null===(dn=an.location)||void 0===dn||null===(un=dn.search)||void 0===un?void 0:un.includes("debug=true"))||!1,En=null;function yn(e){return Tn.apply(this,arguments)}function Tn(){return Tn=n(t.mark(function e(o){var i,l,a,d,u,s,c,v,m,f,p,g,w,E,y,T,b,_,S,O,A,D,L,P,k,F,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,i,l){var a,d,u=r(o);if(!u.seeking()){var s=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[i])||void 0===d?void 0:d.adId)||s;Math.floor(u.currentTime());var v,m=fn(t);try{for(m.s();!(v=m.n()).done;){var f,p,g,h=v.value,w=h.eventType,I=h.beaconUrls,E=h.startTimeInSeconds,y=h.startTime,T=h.durationInSeconds,b=(h.eventId,E||s),_=I,S=(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(w),A="pod-".concat(s);P.has(A)||P.set(A,new Set);var D=P.get(A);if(In&&console.warn(e,b,"map:",w,"condition1:",e>=b,"map:",P),e>=b&&e<=b+k&&!D.has(O)){D.add(O);try{F(w,n,_,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,w,n)}if("function"==typeof S)try{var L,C={eventType:w,startTimeInSeconds:E,startTime:y,durationInSeconds:T,ad:null==n||null===(L=n.ads)||void 0===L?void 0:L[i],pod:n,adIndex:i};S({adsData:C}),Me(o,C)}catch(e){console.error("Error when calling ads callback:",e)}var R=Ye.get();if(R&&0!==Object.keys(R).length){var j=R.formulateComscoreAdPayload,N=R.startComscoreAdTracking,V=R.finishComscoreAdTracking,W=R.endComscoreAdTracking;if("impression"===w){var B,U=Ze.get();N(j(hn(hn({},null==n||null===(B=n.ads)||void 0===B?void 0:B[i]),{},{trackingUrl:U})))}else"complete"===w?V():"breakEnd"===w&&W()}}}}catch(e){m.e(e)}finally{m.f()}}},F=function(e,n,t,o){var i,r,l;"breakEnd"===e&&(null===(i=wn)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=wn)||void 0===r?void 0:r.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(In&&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)})}))},p=function(){En&&clearInterval(En)},m=Ze.get(),(f=r(o)).one("loadeddata",function(){p(),En=setInterval(function(){m&&!f.paused()&&L(m)},2e3)}),f.on("dispose",function(){p()}),g=new Map,w=new Map,E=-1,y=null,T=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==f||null===(a=f.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,_=(null==f||null===(d=f.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==f||null===(u=f.el())||void 0===u||null===(s=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===s?void 0:s[0])||null,O=(null==f||null===(c=f.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===v?void 0:v[0])||null,A=!1,D=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 I(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),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 hn(hn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&i.push(null==s?void 0:s[0])}return i},L=function(){var e=n(t.mark(function e(n){var i,l,a,d,u,s,c,v,m,f,p,L,P,k;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),y&&l.searchParams.append("nextToken",y),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,u=d.avails,s=d.nextToken||null,y=s,c=[],v=r(o),m=v.controlBar.progressControl,f=m.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),u.map(function(e,n){c.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:D(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),In&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",c),null!=c&&c.length&&(window.adsQueueList=c,"function"==typeof(k=(null===(p=window)||void 0===p||null===(L=p.customData)||void 0===L||null===(P=L.ads)||void 0===P?void 0:P.onAdBreaksLoaded)||null)&&(null==c?void 0:c.length)>0&&k(c)),c.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=v.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",f.appendChild(r)}}),v._timeUpdateHandler&&v.off("timeupdate",v._timeUpdateHandler),v._timeUpdateHandler=h(function(){var e=v.currentTime();if(e!==E){E=e;for(var n=function(){var n=c[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;A=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&g.set(o,!0),Fe.disable(),T&&T.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.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")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),m.el().classList.add("hide-progress-bar");for(var d=e-o,u=0,s=0,v=0;v<r.length;v++){var f,p=null==r||null===(f=r[v])||void 0===f?void 0:f.durationInSeconds;if(d<u+p){s=v;break}u+=p}setTimeout(function(){wn.totalAds=null==r?void 0:r.length,wn.currentAdIndex=s},1e3);var h=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});h.push.apply(h,I(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&h.push.apply(h,I(null==n?void 0:n.podSlotImpressionBeacon)),C(e,n,h,s),"break"}w.delete(o)},t=0;t<c.length;t++){if("break"===n())break}A||(wn={},m.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),Fe.enable())}},1e3),v.on("timeupdate",v._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,k=2.5;case 22:case"end":return e.stop()}},e)})),Tn.apply(this,arguments)}function bn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}var _n=function(e){o(e).play()},Sn=function(e){o(e).pause()},On=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},An=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Dn=function(e){return!!o.getPlayer("".concat(e))},Ln=function(e){return o(e).paused()},Pn=function(){var e=n(t.mark(function e(o,i){var l,a,d,u=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=u.length>2&&void 0!==u[2]&&u[2],e.next=3,z();case 3:return a=e.sent,d=r(o),e.abrupt("return",new Promise(function(e,r){var u=(null==i?void 0:i.programs)||[];null==i||delete i.programs,j(i,a).then(function(){var r=n(t.mark(function n(r){var a,s,v,f,p,g,h,w;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a=null==r?void 0:r.data,window.sid=Z(),a.contentType="linearchannel",a.channelId=null==i?void 0:i.channelId,c(a),m(u),!l){n.next=16;break}if(h=(null==a||null===(s=a.linearchannel)||void 0===s?void 0:s.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(v=window)||void 0===v||null===(f=v.app_data)||void 0===f||null===(p=f.appcmsMain)||void 0===p||null===(g=p.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,w=Ee(a,o),!h){n.next=13;break}return n.next=12,nn(o,a);case 12:w=n.sent;case 13:w&&(jn(o,w),h&&yn(o),d.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 r.apply(this,arguments)}}()).catch(function(e){r({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),kn=function(){var e=n(t.mark(function e(o,i,l){var a,d,s,m,g,h,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z();case 2:return m=e.sent,(u()||null)&&v(i),g=0,h=0,w=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(s=d.watchHistory)&&void 0!==s&&s.enable&&W(i,m).then(function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),g=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(h=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(w=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,l){R(i,m).then(function(){var i=n(t.mark(function n(i){var a,d,u,s,v,m,I,E,y,T,b,_,S,O,A,D,L,P,k,F,C,R,j,N,V,W,B,U,M,x,H,G,Q,Y,z,q,K,X;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(D=null==i?void 0:i.data,L=(null==D?void 0:D.contentType)||"video",P=(null==D||null===(a=D[L])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(s=u.appcmsMain)||void 0===s||null===(v=s.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,k=(null==D||null===(m=D.video)||void 0===m||null===(I=m.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,c(i.data),(F=(null==D||null===(E=D.ads)||void 0===E||null===(y=E.preRoll)||void 0===y||null===(T=y.adTags)||void 0===T||null===(b=T.web)||void 0===b?void 0:b.active)&&(null==D||null===(_=D.ads)||void 0===_||null===(S=_.preRoll)||void 0===S||null===(O=S.adTags)||void 0===O||null===(A=O.web)||void 0===A?void 0:A.url))&&Le(o,F,D),C=Ee(D,o),!P){n.next=12;break}return n.next=11,nn(o,D);case 11:C=n.sent;case 12:C?(G=(null==D||null===(R=D.video)||void 0===R||null===(j=R.gist)||void 0===j?void 0:j.videoImageUrl)||(null==D||null===(N=D.video)||void 0===N||null===(V=N.gist)||void 0===V||null===(W=V.imageGist)||void 0===W?void 0:W.r16x9),(Q=r(o)).poster(G),jn(o,C),P&&vn(o,w),Q.on("loadstart",function(){k&&e({status:!0,msg:"Video Loaded",response:D})}),Q.on("loadeddata",function(){Ae(),e({status:!0,msg:"Video Loaded",response:D})}),Q.one("play",function(){g&&!P&&h<95&&setTimeout(function(){Q.currentTime(g)},0)}),Q.one("error",function(){var e;l({status:!1,msg:(null==Q||null===(e=Q.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==D||null===(B=D.video)||void 0===B||null===(U=B.contentDetails)||void 0===U||null===(M=U.closedCaptions)||void 0===M?void 0:M.length)>0||(null==D||null===(x=D.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(X=(null==D||null===(z=D.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==D||null===(K=D.video)||void 0===K?void 0:K.closedCaptions),Y=X.filter(function(e){return"VTT"===e.format}),f(o,Y)):p(o)):(Oe(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){Nn(e,o,l,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),Fn=function(e,n,t){var o=r(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Cn=function(e){var n=(Ye.get()||{}).destroyComscoreTag,t=r(e);if(Rn(),"function"==typeof n&&n(),w(),window.onresize=null,t)t.dispose();else{var o=document.getElementById(e);o&&o.remove()}},Rn=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()},jn=function(e,n){var t=r(e);t&&t.src(n)},Nn=function(n,t,o,i){var r,l,a,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Dn(t)&&Oe(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?bn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):bn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Vn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},Wn=function(e){var n,t=r(e);return!(null!=t&&null!==(n=t.liveTracker)&&void 0!==n&&n.atLiveEdge())||null};export{_n as A,Sn as B,An as C,Dn as D,kn as E,Pn as F,Cn as G,M as H,sn as I,xe as J,Wn as K,U as L,q as M,G as N,x as O,O as P,cn as Q,Pe as R,ue as S,Ln as T,yn as U,vn as V,B as W,ve as a,ce as b,Ye as c,de as d,Ee as e,Ae as f,ee as g,Oe as h,ze as i,Vn as j,ae as k,jn as l,Le as m,Se as n,nn as o,K as p,R as q,W as r,V as s,Nn as t,z as u,j as v,N as w,se as x,Fn as y,On as z};
@@ -0,0 +1 @@
1
+ import{c as e}from"./currentVideoInfo-0b234e55.js";function t(e){var t=e||{},n=t.dvrConfig,a=t.epg;return!(!t.isDvrEnabled||null==n||!n.enable)&&(null==a||!a.enable||c(a))}function n(e,t){var n=e.seekable();if(n&&n.length>0){var a=d(e,t);e.currentTime(a),e.play(),v({player:e,showWatchLive:!0,showStartOver:!0})}}function a(e){e&&e.seekable()&&(e.currentTime(e.seekable().end(0)),e.play(),v({player:e,showWatchLive:!1,showStartOver:!0}))}function l(e,t){var n=s(t);n?function(e,t){if(e&&e.seekable()){var n=Math.min(t,e.seekable().end(0));e.currentTime(n),e.play(),v({player:e,showWatchLive:!0,showStartOver:!0})}}(e,n):a(e)}function r(e,t){e.bigPlayButton.show(),e.controlBar.show(),t&&(t.style.display="none")}function o(e){var t,n;r(e,document.querySelector(".vjs-dvr-btn-overlay")),null==e||null===(t=e.startFromBeginningButton)||void 0===t||t.hide(),null==e||null===(n=e.watchLiveButton)||void 0===n||n.hide()}function i(e){e.pause(),e.bigPlayButton.hide(),e.controlBar.hide()}function u(e,t){sessionStorage.setItem("lastWatchedPosition-".concat(e),t.toFixed(2))}function s(e){return parseFloat(sessionStorage.getItem("lastWatchedPosition-".concat(e))||"0")}function d(t,n){var a=n||{},l=a.dvrConfig,r=a.epg,o=e()||[],i=null==l?void 0:l.startOverTime,u=0;if(i&&(u=i),null!=r&&r.enable&&c(r)&&null!=o&&o.length){var s=new Date,d=o.find(function(e){var t=new Date(e.formatted_startdate),n=new Date(e.formatted_enddate);return s>=t&&s<n}),v=t.seekable();if(v&&v.length>0){var h=v.start(0);if(u=h,null!=d&&d.formatted_startdate){var f=v.end(v.length-1)-h;u=h+(new Date(d.formatted_startdate).getTime()-new Date(s-1e3*f).getTime())/1e3}}}return u}var v=function(e){var t=e.player,n=e.showWatchLive,a=void 0===n||n,l=e.showStartOver,r=void 0===l||l;if(t.liveTracker){var o,i,u,s,d=t.liveTracker.atLiveEdge(),v=t.controlBar.getChild("SeekToLive");if(d?null==v||v.show():null==v||v.hide(),a)null==t||null===(o=t.watchLiveButton)||void 0===o||o.show();else null==t||null===(i=t.watchLiveButton)||void 0===i||i.hide();if(r)null==t||null===(u=t.startFromBeginningButton)||void 0===u||u.show();else null==t||null===(s=t.startFromBeginningButton)||void 0===s||s.hide()}},c=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=JSON.parse(sessionStorage.getItem("epgConfig"))||n;return(null==a||null===(e=a.contentType)||void 0===e?void 0:e.includes("game"))&&"LIVE"===(null==a||null===(t=a.programSubType)||void 0===t?void 0:t.toUpperCase())};function h(t){var n=(t||{}).epg,a=e()||[],l="";if(null!=n&&n.enable&&c(n)&&null!=a&&a.length){var r=new Date,o=a.find(function(e){var t=new Date(e.formatted_startdate),n=new Date(e.formatted_enddate);return r>=t&&r<n});l=null!=o&&o.thumbnail?null==o?void 0:o.thumbnail:""}return l}export{l as a,h as b,t as c,i as d,d as e,r as f,s as g,v as h,a as i,n as p,o as r,u as s};
@@ -0,0 +1 @@
1
+ import"video.js/dist/video-js.min.css";import{d as e,c as n,g as t,a as o,b as i,s as l,e as r,l as a,i as u,f as s,h as d,j as c,k as v,m as p,n as f,o as m,p as g,q as y,r as h,t as b,u as w,v as k,w as I,x as S,y as O,z as D,A as j,B as T,C as E,D as P,E as C,F as x,G as A,H as R,I as L,J as N,K as M,L as _,M as B,N as V,O as F,P as H}from"./generic-cab4cba0.js";import U from"@babel/runtime/helpers/defineProperty";import G from"@babel/runtime/helpers/asyncToGenerator";import K from"@babel/runtime/regenerator";import q from"video.js";import{o as J,g as W,a as Y,s as z,b as X,p as Q,c as $}from"./util-55f86fb6.js";import{g as Z,d as ee,a as ne,e as te}from"./captions-78bd2908.js";import{g as oe,p as ie}from"./resolution-62be852a.js";import{i as le,a as re}from"./skin-65765793.js";import{g as ae}from"./player_instance-34118a5b.js";import{g as ue,s as se}from"./localisation-0bf399a1.js";import{g as de,a as ce,s as ve,v as pe,b as fe,c as me,d as ge,e as ye,f as he}from"./currentVideoInfo-0b234e55.js";import be from"@babel/runtime/helpers/typeof";import{s as we,w as ke}from"./icons-37daa6b3.js";import{c as Ie,p as Se,a as Oe,h as De,r as je,g as Te,b as Ee,d as Pe,s as Ce,e as xe,f as Ae}from"./helper-d52dff3c.js";import Re from"@babel/runtime/helpers/toConsumableArray";import Le from"@babel/runtime/helpers/slicedToArray";var Ne=function(e){return new Promise(function(n,t){if(Me(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},Me=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},_e=function(e,n,t){var o=ae(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,"'")})},Be=function(e){var n=ae(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Ve=function(){var n=G(K.mark(function n(t){var o,i,l,r,a;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l=ae(null==t?void 0:t.playerId),null!=t&&null!==(o=t.series)&&void 0!==o&&o.enable||!(null!=t&&t.chromecastReceiverId||null!=t&&t.airplay)){n.next=10;break}return n.prev=2,n.next=5,Ne("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(2),console.log("Error",n.t0);case 10:if(null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable||null==t||!t.chromecastReceiverId){n.next=21;break}return n.next=13,import("@silvermine/videojs-chromecast");case 13:n.sent.default(q),(a=q.getTech("chromecast"))&&!a.prototype.seeking&&(a.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=t&&t.airplay&&"Safari"==e()?null==l||l.airPlay({addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return n.stop()}},n,null,[[2,7]])}));return function(e){return n.apply(this,arguments)}}(),Fe=function(e,n){var t=ae(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,i,l,r,a=this.el(),u=q.dom.getPointerPosition(a,n).x;q.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var s=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(s),s&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*u,c.seek()}})};var He=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),Ne("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)}}(),Ue=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("@viewlift/comscore/index.js").then(function(e){n.set(e)});case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ge=function(){var e=G(K.mark(function e(){return K.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){q.getPlugin("eme")||q.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ke=function(){var e=G(K.mark(function e(){var n;return K.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(q),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)}}(),qe=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),Je=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-bc6f319d.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)}}(),We=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){Ne("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(q)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(q)})},loadAdsLibrary:He,loadEMELibrary:Ge,loadMuxPlugin:Ke,loadDvrSeekbar:qe,loadContribDash:Je,loadComscorePlugin:Ue});function Ye(e){return ze.apply(this,arguments)}function ze(){return(ze=G(K.mark(function n(t){var o,i,l;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o=(null==t?void 0:t.airplay)||!1,n.next=3,He();case 3:o&&"Safari"==e()?Promise.resolve().then(function(){return We}).then(function(e){e.importAirplay()}):(l=(null===(i=document)||void 0===i?void 0:i.getElementById(null==t?void 0:t.playerId))||null)&&l.setAttribute("x-webkit-airplay","deny");case 4:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Xe(e){return Qe.apply(this,arguments)}function Qe(){return(Qe=G(K.mark(function e(n){var t,o,i,l,r,a;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=ae(n.playerId),e.next=3,Ue();case 3:a.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,implementationId:null==n||null===(i=n.comscore)||void 0===i?void 0:i.implementationId,projectId:null==n||null===(l=n.comscore)||void 0===l?void 0:l.projectId,debug:(null==n||null===(r=n.comscore)||void 0===r?void 0:r.debug)||!1});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $e(e,n){return Ze.apply(this,arguments)}function Ze(){return(Ze=G(K.mark(function n(t,o){var i,l,r,a,u,s,d,c,v,p,f,m,g,y;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return v=(null==o?void 0:o.contentType)||"video",p=null==o||null===(i=o[v])||void 0===i?void 0:i.drmEnabled,null==o||null===(l=o[v])||void 0===l||null===(r=l.liveDetails)||void 0===r||r.isDvrEnabled,null==t||t.showPositiveSeekbar,f=(null==o||null===(a=o[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==t||null===(d=t.comscore)||void 0===d?void 0:d.enable)||!1,g=!(null==t||null===(c=t.analytics)||void 0===c||!c.muxKey),n.prev=7,n.next=10,Promise.allSettled([p?"Safari"==e()?Ge():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?Je():Ge():"Safari"!=e()&&f?Je():null,m?Xe(t):null,g?Ke():null,Ve(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 en(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function nn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?en(Object(t),!0).forEach(function(n){U(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):en(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var tn=new Set,on=null,ln=function(e,n,o,i){var l,r,a,u,s,d,c,v={},p=(null==e?void 0:e.contentType)||"video";v["c3.cm.id"]=(null===(l=e[p])||void 0===l?void 0:l.id)||"Null",v["c3.cm.contentType"]=vn(e),v[null==o||null===(r=o.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==e||!e.linearchannel),v[null==o||null===(a=o.Constants)||void 0===a?void 0:a.STREAM_URL]=n.currentSrc(),v[null==o||null===(u=o.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===t()?"NULL":t(),v["c3.cm.categoryType"]=sn(e),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(s=e[p])||void 0===s?void 0:s.drmEnabled)||"None",v.DAIStream=null!==(d=e[p])&&void 0!==d&&null!==(c=d.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",v[o.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=dn(e),v["c3.cm.genreList"]=an(e),v["c3.cm.genre"]=rn(e),v["c3.cm.channel"]=un(e,i);var f=mn(de(),e);return v=nn(nn({},v),f)},rn=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"},an=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"},un=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"},sn=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"},dn=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"},cn=function(e,n){var t,o,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(r)},vn=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var pn,fn,mn=function(e,n){var t,l,r,a,u,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return s;var d=i(),c=o();return s["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(l=t.series)||void 0===l?void 0:l.title)||"Null",s["c3.cm.seasonNumber"]=(null==d?void 0:d.toString())||"Null",s["c3.cm.showTitle"]=(null==e||null===(r=e[d-1])||void 0===r||null===(a=r.episodes)||void 0===a||null===(u=a[c-1])||void 0===u?void 0:u.title)||"Null",s["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",s},gn=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"}},yn=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},hn=function(){var e=G(K.mark(function e(n,t){var o,i,l,r,a,u,s,d,c,v,p,f;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,r=o.tveProvider,a=o.enable,u=o.appName,d=(s=t||{}).token,c=s.epg,a){e.next=4;break}return e.abrupt("return");case 4:if(v=ae(n),"function"==typeof(p=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,p("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:v.ready(function(){var e=v.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=gn(t.keySystem);p("contentInfo",{DRMEnabled:o})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),v.on("loadstart",function(){var e,n;on&&on!==v.currentSrc()&&p("playbackEnded"),p("setPlayer",v),tn.clear(),on=v.currentSrc();var o=yn(v.currentType()),i=ce(),a=ln(i,v,f,c);a[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",a[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=cn(i,t),a.authToken=d||"NULL",a.streamType=o,a.D2CType=l||"NONE",a.subscriberType=r?"MVPD":"FREE"!==l?"D2C":"FREE",a["c3.cm.affiliate"]=r||"NULL",bn.setData(a),p("contentInfo",a)}),v.on("loadedmetadata",function(){var e,n=v.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),v.on("play",function(){tn.has(v.currentSrc())||(tn.add(v.currentSrc()),p("playbackStarted",null))}),v.on("ended",function(){tn.has(v.currentSrc())&&tn.delete(v.currentSrc()),p("playbackEnded")}),v.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:v,adsLoader:null==e?void 0:e.adsLoader})}),v.on("dispose",function(){null==tn||tn.clear(),p("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),bn=(pn={},{setData:function(e){pn=nn(nn({},pn),e)},getData:function(){return pn}}),wn=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-144bb018.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-20540ac1.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-8d57b8d5.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-0cf7db04.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-fefd11d4.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-6ea84e49.js").then(function(t){t.initialiseSkin(e,n)}):"news"==t?import("./skin-b62e373b.js").then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?import("./skin-453d57ce.js").then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&import("./skin-4b5cdee1.js").then(function(t){t.initialiseSkin(e,n)})};function kn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function In(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kn(Object(t),!0).forEach(function(n){U(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Sn=[],On=0,Dn=null;function jn(){console.log("Cleaning up watch history data"),fn=null,Sn=[],On=0,Dn=null}function Tn(e,n,t){var o,i,r,a,u,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.profileId,c=Math.floor(e.currentTime()),v=Math.floor(e.duration());null==n||null===(r=n.watchHistory)||void 0===r||r.xapiKey;var p=(null==n||null===(a=n.video)||void 0===a?void 0:a.originalObjectId)||null,f=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,m=Math.floor(e.currentTime()),g=s?100:Math.floor(c/v*100),y={};f?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=En(o),l=(new Date).getTime(),r=ce(),a=(null==r?void 0:r.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return In(In({},e),{},U({},n,a[n]))},{}),s=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===fn});s<0?i.push(In(In({content:u},e),{},{addedDate:l,updateDate:l})):i[s]=In(In(In({},i[s]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(y={completed:s,watchedTime:m,watchedPercentage:g},d,n.siteOwner):(y=In(In({videoId:fn,watchedTime:m,watchedPercentage:g,doneWatching:s,profileId:d},Dn&&{seriesId:Dn}),p&&{originalObjectId:p}),l(y).then(function(e){}).catch(function(e){})),On=c+t}function En(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Pn(e,n,t){var o=En(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}var Cn=!1,xn=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!Cn){var l=An(e,"videoAssets","secondaryVideoAssets"),u=r(l,n);return u&&a(n,u),Cn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function An(e,n,t){if(Array.isArray(e))return e.map(function(e){return An(e,n,t)});if(null!==e&&"object"===be(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]=An(e[i],n,t)}),o}return e}function Rn(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 Ln(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)?Ln(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Ln(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 Nn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Mn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Nn(Object(t),!0).forEach(function(n){U(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Nn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var _n=function(n,t,o,i){var l,r,a,c,v,p=i.res,f=i.sres,m=ae(n),g=(null==p?void 0:p.contentType)||"video",y=(null==p||null===(l=p[g])||void 0===l?void 0:l.drmEnabled)||!1,h=(null==p||null===(r=p[g])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,b=(null==p||null===(c=p[g])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;ve(p),pe.set(p),m&&(m.on("loadstart",function(){h?o.resolve({status:!0,msg:"Video Loaded",response:p}):o.resolve(Mn({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:p}:{response:p}))}),m.on("loadeddata",function(){var o,i,l,r=Z(n);if(null==r||r.map(function(e){return ee(n,e.id)}),b&&"Safari"===e())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&_e(n,sessionStorage.getItem("volume")||"100");var d=ce();if(u(t),s(),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 c,v,f=Mn(Mn({},t),p);!function(e,n,t){var o,i,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(Dn=null==n||null===(i=n.series)||void 0===i?void 0:i.id),Sn=[],On=0,fn=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=ae(e);a&&(a.on("dispose",jn),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Sn.includes(On)||(e!=On||e<r?e>On&&(On=e+r):(Sn.push(e),Tn(a,n,r)))}}),a.one("ended",function(){Tn(a,n,r,!0)}))}(n,f,null==d||null===(c=d.video)||void 0===c||null===(v=c.gist)||void 0===v?void 0:v.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=m&&m.mux){var g,y,h,w,k,I,S=(null===(g=ce())||void 0===g?void 0:g.video)||(null==p?void 0:p.video),O=null==S?void 0:S.gist,D={env_key:null==t||null===(y=t.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==O?void 0:O.id,video_title:null==O?void 0:O.title,video_series:null==S||null===(w=S.series)||void 0===w?void 0:w.title,video_stream_type:null!=S&&null!==(k=S.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==t||null===(I=t.analytics)||void 0===I?void 0:I.userId};m.mux({debug:!1,data:D})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,o,i,l,r,a,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===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,f=null===(a=window)||void 0===a||null===(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(),y=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){h&&xn(p,n)}),m.on("error",function(){var e,t;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?xn(p,n):(d(n,(null==m||null===(e=m.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured",response:p}))}),m.one("play",function(){var e,n,o,i,l;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var r,a,u,s=null===(r=ce())||void 0===r||null===(a=r.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=fe(),c=(null==d?void 0:d.get(s))||{t:0,p:0},v=c.t,p=c.p;v&&p<95&&setTimeout(function(){m.currentTime(v)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var n,t=(null==m||null===(n=m.audioTracks())||void 0===n?void 0:n.tracks_)||null;if(t)if(t.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==be(m.dash)){var o,i,l,r=null==m||null===(o=m.dash)||void 0===o||null===(i=o.mediaPlayer)||void 0===i?void 0:i.getTracksFor("audio"),a=null==r?void 0:r.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),u=Rn(t);try{for(u.s();!(l=u.n()).done;){var s=l.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=Rn(t);try{for(c.s();!(d=c.n()).done;){var v,p,f,g=d.value;if(("Chrome"==e()||"Edge"==e()&&(null!==(v=navigator)&&void 0!==v&&null!==(p=v.userAgent)&&void 0!==p&&p.includes("Macintosh")||!y))&&null!=g&&null!==(f=g.label)&&void 0!==f&&f.includes("5.1"))m.audioTracks().removeTrack(g);else{if("main"==g.kind){g.enabled=!0;break}g.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};function Bn(e){var n=ae(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var i=t.start(0),l=t.end(t.length-1)-i;Fn(),Hn(l).forEach(function(e){var n=e.id,t=e.title,i=e.time,r=Vn(n,t,Math.min(i/l*100,99.5));o.appendChild(r)})}}function Vn(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 Fn(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach(function(e){e.remove()})}function Hn(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return(me()||[]).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 Un(e,n){var t=ae(e);if(t){var o=n.dvrConfig,i=void 0===o?{}:o,l=n.videoId;n.epg;var r=i.playLive,a=i.playFromBegining,u=i.programs;ge(u),t.on("loadeddata",function(){Ie(n)?a?Se(t,n):r?Oe(t,l):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,i=n.videoId,l=n.epg,r=o.buttonConfig,a=void 0===r?{}:r,u=a.watchLive;a.resume;var s=a.startFromBegining,d=i;if(l&&null!=l&&l.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));d="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!Te(d),p=document.querySelector(".vjs-dvr-btn-overlay");p||((p=document.createElement("div")).className="vjs-dvr-btn-overlay");var f=Ee(n);f&&(p.style.backgroundImage="url(".concat(f,")"),p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="cover");p.innerHTML=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,i=t.resume,l=t.startFromBegining,r=n?(null==i?void 0:i.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(ke()," ").concat(r,"</button>"),u='<button id="watch-begining-btn">'.concat(we()," ").concat((null==l?void 0:l.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(u,"</div>")}(o,v),p.style.display="flex",e.el().appendChild(p),Pe(e),Gn("watch-live-resume-btn",u,function(){Ae(e,p),Oe(e,d)}),Gn("watch-begining-btn",s,function(){Ae(e,p),Se(e,n)})}(t,n),De({player:t,showWatchLive:!0,showStartOver:!0})):je(t)}),t.one("loadedmetadata",function(){sessionStorage.setItem("program_switched",!0),function(e,n){var t=n.videoId,o=e.currentTime(),i=!1,l=e.seekable(),r=l.start(0),a=l.end(l.length-1)-r,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)}Ce(s,o),xe(e,n),De({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&&(Ce(s,t),o=t,function(e,n){Hn(n).forEach(function(t){var o=t.id,i=t.title,l=t.time,r=document.getElementById(o);if(r){var a=Math.min(l/n*100,99.5);r.style.left="".concat(a,"%")}else{var u=e.controlBar.progressControl.seekBar.el(),s=Vn(o,i,Math.min(l/n*100,99.5));u.appendChild(s)}})}(e,a))}})}(t,n)})}else console.warn("Player instance is required to initialize start over.")}function Gn(e,n,t){var o,i,l=document.getElementById(e);l&&(i=n,(o=l)&&(o.style.color="".concat((null==i?void 0:i.textColor)||"#000"),o.style.backgroundColor="".concat((null==i?void 0:i.backGroundColor)||"#DCF95B")),l.addEventListener("click",t))}function Kn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function qn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Kn(Object(t),!0).forEach(function(n){U(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Kn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Jn=function(n,t,o,i){var l,u,s,g,y,h,b,w,k,I,S,O,D,j,T,E,P,C,x,A,R,L,N,M,_,B,V,F,H,J,W,Y,z,X,Q,$,Z,ee=t.res,te=void 0===ee?null:ee,oe=t.sres,ie=void 0===oe?null:oe,re=null!=o&&o.chromecastReceiverId?["chromecast","html5"]:["html5"],ue=(null===(l=te)||void 0===l?void 0:l.contentType)||"video",se=le(null===(u=te)||void 0===u||null===(s=u[ue])||void 0===s||null===(g=s.gist)||void 0===g?void 0:g.videoImageUrl)||le(null===(y=te)||void 0===y||null===(h=y[ue])||void 0===h||null===(b=h.gist)||void 0===b||null===(w=b.imageGist)||void 0===w?void 0:w.r16x9),de=(null===(k=te)||void 0===k||null===(I=k[ue])||void 0===I||null===(S=I.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,ce=(null===(O=te)||void 0===O||null===(D=O[ue])||void 0===D||null===(j=D.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,ve=(null===(T=te)||void 0===T||null===(E=T.ads)||void 0===E||null===(P=E.preRoll)||void 0===P||null===(C=P.adTags)||void 0===C||null===(x=C.web)||void 0===x?void 0:x.active)&&(null===(A=te)||void 0===A||null===(R=A.ads)||void 0===R||null===(L=R.preRoll)||void 0===L||null===(N=L.adTags)||void 0===N||null===(M=N.web)||void 0===M?void 0:M.url);te=qn(qn({},te),{},{audioAssetSource:null==o?void 0:o.audioAssetSource});var pe=(null==o||null===(_=o.customData)||void 0===_?void 0:_.ads)||{},fe=(null===(B=te)||void 0===B||null===(V=B[ue])||void 0===V?void 0:V.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==pe?void 0:pe.vodAdSticherProvider)||!1,me=(null==o?void 0:o.latency)||6,ge=(null==o?void 0:o.skin_settings)||{};null==o||o.dvrConfig;var ye=($={enableSmoothSeeking:!0,controls:0!=(null==o?void 0:o.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==o?void 0:o.muted)||!1,autoplay:(null==o?void 0:o.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ge?void 0:ge.pictureInPictureToggle)||!1},playbackRates:null!=ge&&ge.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==o.skin,liveui:de},U($,"autoplay",null==o?void 0:o.autoplay),U($,"normalizeAutoplay",(null==o?void 0:o.autoplay)&&!ve),U($,"loop",(null==o?void 0:o.loop)||!1),U($,"audioPosterMode",null==o?void 0:o.audioPosterMode),U($,"html5",qn(qn({dash:qn(qn(qn({},!q.browser.IS_SAFARI&&{useTTML:!0}),(null==o?void 0:o.debugConfig)&&(null==o||null===(F=o.debugConfig)||void 0===F?void 0:F.enable)&&{debug:!0,logLevel:null!=o&&null!==(H=o.debugConfig)&&void 0!==H&&H.logLevel?null==o||null===(J=o.debugConfig)||void 0===J?void 0:J.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:qn(qn({},(null==o?void 0:o.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==o?void 0:o.initialBandwidth)/1e3}}),{},{autoSwitchBitrate:{video:!0,audio:!0},additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}})}}}),vhs:qn(qn(qn({},(null==o?void 0:o.initialBandwidth)&&{bandwidth:o.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==o?void 0:o.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==o||!o.initialBandwidth},(null==o||null===(W=o.customData)||void 0===W?void 0:W.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(Y=null==o?void 0:o.enableLowInitialPlaylist)&&void 0!==Y&&Y}),debug:(null==o?void 0:o.debugConfig)&&(null==o||null===(z=o.debugConfig)||void 0===z?void 0:z.enable)||!1,nativeTextTracks:"Safari"==e()},0==(null==o||null===(X=o.customData)||void 0===X?void 0:X.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==o||null===(Q=o.customData)||void 0===Q?void 0:Q.nativeVideoTracks)&&{nativeVideoTracks:!1})),U($,"poster",se),U($,"techOrder",re),U($,"chromecast",{requestCustomDataFn:function(e){var t,i,l=ae(n),r=((null==l?void 0:l.textTracksJson_)||l.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var o,i,l,r,a,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,y,h,b,w,k,I;f.isDrmEnabled=!0;var S=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,O=(null==S?void 0:S.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(y=g[0])||void 0===y||null===(h=y.options)||void 0===h?void 0:h.serverURL);f.licenseUrl=O;var D=(null==S?void 0:S.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===(I=k.httpRequestHeaders)||void 0===I?void 0:I["X-AxDRM-Message"]);f.licenseToken=D}var j=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";f.contentType=j;var T=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=T;var E=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=E;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}(te,e,r);return qn(qn({},a),{},{convivaMetaData:qn({customerKey:(null==o||null===(t=o.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==o||null===(i=o.convivaConfig)||void 0===i?void 0:i.debug)||!1},bn.getData())})},modifyLoadRequestFn:function(e){var t,o,i,l,r,a=ae(n),u=(null==a?void 0:a.currentSource())||{};!(null===(t=te)||void 0===t||null===(o=t[ue])||void 0===o||null===(i=o.streamingInfo)||void 0===i||null===(l=i.videoAssets)||void 0===l?void 0:l.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(r=u.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!q.getPlayers()[n]){null!=o&&o.debugConfig&&null!=o&&null!==(Z=o.debugConfig)&&void 0!==Z&&Z.enable&&q.log.level("debug");var he=q(n,ye,function(){var e=G(K.mark(function e(){var t,l,u,s,g,y,h,b,w,k,I,S,O,D,j,T,E,P,C,x,A;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(he),console.log(q.VERSION),console.log(q.getPlugins()),e.next=5,$e(o,te);case 5:if(O=null===(t=te)||void 0===t||null===(l=t[ue])||void 0===l||null===(u=l.liveDetails)||void 0===u?void 0:u.startOverTime,ce&&i.resolve(qn({status:!0,msg:"Player Initialised"},ie?{seriesResponse:ie,response:te}:{response:te})),de&&null!=o&&null!==(s=o.dvrConfig)&&void 0!==s&&s.enable&&Un(n,qn(qn({},o),{},{isDvrEnabled:de})),v(n,null==o?void 0:o.analyticsCb,null==o?void 0:o.customData),hn(n,o),/Android/i.test(navigator.userAgent)&&(q.options.vhs.overrideNative=!0),de&&Fe(n,O),!ve||null!=o&&null!==(g=o.customData)&&void 0!==g&&g.disableAds||p(n,ve,te),D=r(te,n),console.log(D),null!=o&&o.nearestClusterUrl&&(D=f(D,o.nearestClusterUrl)),!fe){e.next=21;break}return e.next=20,m(n,te);case 20:D=e.sent;case 21:D?a(n,D):(i.reject({status:!1,msg:"Incompatible / Missing Source",response:te}),d(n,"Incompatible / Missing Source")),((null===(y=te)||void 0===y||null===(h=y[ue])||void 0===h||null===(b=h.contentDetails)||void 0===b||null===(w=b.closedCaptions)||void 0===w?void 0:w.length)>0||(null===(k=te)||void 0===k||null===(I=k[ue])||void 0===I||null===(S=I.closedCaptions)||void 0===S?void 0:S.length)>0)&&(A=(null===(T=te)||void 0===T||null===(E=T[ue])||void 0===E||null===(P=E.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null===(C=te)||void 0===C||null===(x=C[ue])||void 0===x?void 0:x.closedCaptions),j=A.filter(function(e){return"VTT"===e.format||"WEBVTT"===e.format}),ne(n,j)),null!=o&&o.disableControls?c(n):wn(n,qn(qn(qn({},o),ye),{},{liveVideo:ce,isDvrEnabled:de,res:te,sres:ie})),_n(n,qn(qn(qn({},o),ye),{},{liveVideo:ce}),i,{res:te,sres:ie});case 25:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}};function Wn(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 Yn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Wn(Object(t),!0).forEach(function(n){U(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Wn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var zn=function(e,n){var t=n.resolve,o=n.reject,i=null==e?void 0:e.playerId,l=Xn(e);Jn(i,{res:l},e,{resolve:t,reject:o})},Xn=function(e){var n,t,o,i,l,r,a,u,s,d,c,v,p,f=null==e?void 0:e.streamingInfo,m=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,y=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,h=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,b=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,w=(null==e||null===(r=e.streamingInfo)||void 0===r?void 0:r.subtitles)||[],k=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,I=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],S=(null==e||null===(d=e.customData)||void 0===d||null===(c=d.ads)||void 0===c?void 0:c.isSSAIEnabled)||!1,O=null==e?void 0:e.token,D=g(O);null==D||D.site;var j=null==D?void 0:D.siteId,T=(null==e||null===(v=e.customData)||void 0===v||null===(p=v.comscore)||void 0===p?void 0:p.video)||null,E=Yn(Yn({id:"".concat(j,"_external")},!y&&{directPlaybackUrl:null==m?void 0:m.url}),{},{video:Yn(Yn(Yn(Yn(Yn({drmEnabled:y,streamingInfo:Yn(Yn({videoAssets:Yn(Yn({},k&&{drmProvider:k}),{},{widevine:null==m?void 0:m.widevine,fairPlay:null==m?void 0:m.fairPlay,playReady:null==m?void 0:m.playReady})},(null==f?void 0:f.isDvrEnabled)&&{isLiveStream:!0}),(null==T?void 0:T.isLiveStream)&&{isLiveStream:null==T?void 0:T.isLiveStream})},S&&{isSSAIEnabled:S}),{},{metadata:I,liveDetails:{isDvrEnabled:null==f?void 0:f.isDvrEnabled},gist:Yn(Yn(Yn({},b&&{videoImageUrl:b}),(null==T?void 0:T.videoId)&&{id:null==T?void 0:T.videoId}),(null==T?void 0:T.videoTitle)&&{title:null==T?void 0:T.videoTitle}),contentDetails:Yn({},(null==w?void 0:w.length)>0&&{closedCaptions:Re(w)})},(null==T?void 0:T.runtime)&&{runtime:null==T?void 0:T.runtime}),(null==T?void 0:T.publishDate)&&{publishDate:null==T?void 0:T.publishDate}),(null==T?void 0:T.platform)&&{platform:null==T?void 0:T.platform}),(null==T?void 0:T.series)&&{series:null==T?void 0:T.series}),ads:{preRoll:{adTags:{web:Yn(Yn({},h&&{active:!0}),h&&{url:h})}}}});return T&&(null!=T&&T.isDvrEnabled&&(E.video.liveDetails=Yn(Yn({},E.video.liveDetails),{},{isDvrEnabled:null==T?void 0:T.isDvrEnabled})),null!=T&&T.metadata&&(E.video.metadata=[].concat(Re(E.video.metadata),Re(null==T?void 0:T.metadata)))),E},Qn=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),o=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),i=o>0&&t>4?o:0,l=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),o=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(o-=1),o<0&&(t-=1),t}(new Date,new Date(n));return[l>0&&i>0?l:0,i,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},$n=function(e){var n,t=Le(e,8),o=t[0],i=t[1],l=t[2],r=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"):l>=1?" ".concat(l," week"):r>=1?" ".concat(r," 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),console.log("Time left:",n)};function Zn(e,n,t,o){if(e){var i=function(){var i=e-Date.now();if(i/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var r=Qn(i,e);null==n||n([].concat(Re(r),[o]))};i();var l=setInterval(i,1e3);return l}}var et,nt=function(e,n,t){var o,i,l,r,a,u,s,d,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===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.errorMessage)||(null==n?void 0:n.message)||null,f=Date.now(),m=null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,g=f-(null==n||null===(s=n.response)||void 0===s||null===(d=s.data)||void 0===d?void 0:d.scheduleEndDate);if(f-m<0?c=ue("eventNotStarted")||p||"Game starts in":(g>0||"VIDEO_NOT_EXISTS"==v)&&(c=ue("eventEnded")||p||"Game has ended"),document.getElementsByClassName("error-container")[0]){var y=document.getElementsByClassName("error-message")[0];y&&(y.textContent="".concat(c));var h=document.getElementsByClassName("error-timer-message")[0];h&&Zn(Math.abs(m),$n,t,h)}else{var b=document.getElementById(e).parentElement;if(b){var w=document.createElement("div");w.className="error-container";var k=document.createElement("div");k.className="error-message";var I=document.createElement("div");I.className="error-timer-message",k.textContent="".concat(c),w.appendChild(k),w.appendChild(I),b.append(w),Zn(Math.abs(m),$n,t,I)}}};function tt(e,n){return ot.apply(this,arguments)}function ot(){return(ot=G(K.mark(function e(n,t){var o,i,l,r,a,u,s,d,c;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,a=null==n?void 0:n.videoId,u=null==n?void 0:n.playerId,s=!(null==n||!n.anonymousId),e.next=6,w();case 6:d=e.sent,c=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),y(a,d,c).then(function(e){var t,o,i,c;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,ve(null==e?void 0:e.data);var v,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(c=n.watchHistory)&&void 0!==c&&c.enable&&!s)if((null===(v=n.watchHistory)||void 0===v?void 0:v.saveOffline)||!1){var f,m,g,y=Pn((null===(f=n.watchHistory)||void 0===f?void 0:f.profileId)||"",a,null==n?void 0:n.siteOwner);if(y&&y.length)n.watchHistoryResumeTime=(null===(m=y[0])||void 0===m?void 0:m.watchedTime)||null,n.watchedPercentage=(null===(g=y[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",Jn(u,{res:p},n,{resolve:l,reject:r})}else h(a,d).then(function(e){var t,o,i,l,r,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(l=i.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}).finally(function(){Jn(u,{res:p},n,{resolve:l,reject:r})});else Jn(u,{res:p},n,{resolve:l,reject:r})}).catch(function(e){var t,o,i=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,l=(null==n||null===(o=n.event)||void 0===o?void 0:o.onCountdownComplete)||null;i&&nt(u,e,l),b(e,u,r,a)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function it(e,n){return lt.apply(this,arguments)}function lt(){return(lt=G(K.mark(function e(n,t){var o,i,l,r,a,u,s,d;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,e.next=3,w();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,d=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),k(s,a,d).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,Jn(u,{res:t},n,{resolve:l,reject:r})}).catch(function(e){b(e,u,r,videoId)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function rt(e,n){return at.apply(this,arguments)}function at(){return(at=G(K.mark(function e(n,t){var o,i,l,r,a,u,s;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.resolve,l=t.reject,e.next=3,w();case 3:r=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,ye.set(parseInt(u)),s=null==n||null===(o=n.series)||void 0===o?void 0:o.id,I(s,r).then(function(e){var t,o,u,d=e.data,c=e.data.seasons;he(c);var v=videoId||(null==c||null===(t=c[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);S(s,r),y(v,r).then(function(e){var t,o,r;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,ve(e.data),Jn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:i,reject:l})}).catch(function(e){b(e,a,l,videoId)})}).catch(function(e){b(e,a,l)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ut(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function st(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ut(Object(t),!0).forEach(function(n){U(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ut(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function dt(){return{loadVideoInstantly:O,onTimeUpdate:J,getVideoDuration:W,onVideoEnded:Y,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=G(K.mark(function n(t,o){var i,l,r,a,u,s,d,c,v,p,f,m,g,h,w,k,I,S,O,D,j,T,E,C,x;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!P(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(g=(null==e?void 0:e.videoSourceUrl)||!1,h=null==e?void 0:e.asat,w=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,k=null==e?void 0:e.videoId,I=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,S=(null==e?void 0:e.streamingInfo)||!1,window.videoId=k,O=null==e?void 0:e.token,!B(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",O),V().set(null==e?void 0:e.refreshToken),O&&!F(O)){n.next=16;break}return o({status:!1,msg:"".concat(O?"Token is expired !":"Missing Authorization Token"),response:{token:O}}),n.abrupt("return");case 16:et=JSON.parse(atob(O.split(".")[1]));case 17:return window.siteName=null===(r=et)||void 0===r?void 0:r.site,window.siteId=null===(a=et)||void 0===a?void 0:a.siteId,e.isAnonymousUser=!(null===(u=et)||void 0===u||!u.anonymousId),e.siteOwner=(null===(s=et)||void 0===s?void 0:s.site)||null,e.userId=(null===(d=et)||void 0===d?void 0:d.userId)||null,window.sessionStorage.setItem("uid",null===(c=et)||void 0===c?void 0:c.userId),window.watchHistory=e.watchHistory||null,D=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(v=e.series)&&void 0!==v&&v.enable?null:null==e?void 0:e.chromecastReceiverId,j=(null==e||null===(p=e.analytics)||void 0===p?void 0:p.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,se(null==e||null===(f=e.customData)||void 0===f?void 0:f.localisation),_.set(e.apiBaseUrl),null!=e&&e.skin&&!re(e.skin)||(e.skin="VL_ONE"),n.next=35,Ye(e);case 35:j&&Ne("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then(function(){return H(j)}).catch(function(e){}),(E=null===(m=document)||void 0===m?void 0:m.getElementById("".concat(D)))&&E.addEventListener("contextmenu",function(e){return e.preventDefault()}),g?(x={directPlaybackUrl:g,id:C="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},h?y(C,O).then(function(n){var i=(null==n?void 0:n.data)||{};Jn(D,{res:st(st({},i),x)},e,{resolve:t,reject:o})}).catch(function(e){b(e,D,o,C)}):Jn(D,{res:x},e,{resolve:t,reject:o})):S?zn(e,{resolve:t,reject:o}):I?rt(e,{resolve:t,reject:o}):w?it(e,{resolve:t,reject:o}):tt(e,{resolve:t,reject:o});case 39:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:oe,skip:D,getPlayer:ae,play:j,pause:T,detectBrowser:e,rewind:E,loadVideo:a,seekToTimeStamp:z,isPlayerInitialised:P,load:C,authenticateLC:x,dispose:A,enableCaptions:te,disableCaptions:ee,getCaptions:Z,playSelectedResolution:ie,getSource:r,setVolume:_e,getVolume:Be,disableControls:c,setPlaybackSpeed:X,getEntitlementData:R,adsQueuePointManager:L,getSsaiEvents:N,playerEvents:Q,onReplay:$,isBehindLive:M}}export{dt as V,Bn as i,Fn as r};