@viewlift/player-backup 2.0.97-smartTv → 2.0.98-smarttv

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 (112) hide show
  1. package/cjs/{autoNextVideo-a5bd03c7.js → autoNextVideo-a4480b32.js} +1 -1
  2. package/cjs/bundle.css +73 -58
  3. package/cjs/{caption-settings-d31caa42.js → caption-settings-a0565b31.js} +1 -1
  4. package/cjs/{captions-bc814903.js → captions-d914af7e.js} +1 -1
  5. package/cjs/{features-20aea890.js → features-6b4d864a.js} +1 -1
  6. package/cjs/generic-c55478de.js +1 -0
  7. package/cjs/icons-eb807ef0.js +1 -0
  8. package/cjs/{index-d2b3653c.js → index-7e34ed5f.js} +1 -1
  9. package/cjs/index.js +1 -1
  10. package/cjs/multicamv2-dbfc28ef.js +1 -0
  11. package/cjs/multicamv2-e17c45da.js +1 -0
  12. package/cjs/nextEpisodeButton-ca7cf6aa.js +1 -0
  13. package/cjs/playlist-3a355641.js +1 -0
  14. package/cjs/renditions-1dce5a4b.js +1 -0
  15. package/cjs/{resolution-0a6680be.js → resolution-5cef7eef.js} +1 -1
  16. package/cjs/series-56aa269f.js +1 -0
  17. package/cjs/series-v2-36ffd0f4.js +1 -0
  18. package/cjs/series-v2-477104dc.js +1 -0
  19. package/cjs/{settings-icon-772875ec.js → settings-icon-c792cbf8.js} +1 -1
  20. package/cjs/skin-12248e27.js +1 -0
  21. package/cjs/skin-1bef1989.js +1 -0
  22. package/cjs/skin-1d44d919.js +1 -0
  23. package/cjs/skin-2d2dcc4d.js +1 -0
  24. package/cjs/skin-34ad98a8.js +1 -0
  25. package/cjs/skin-38de8257.js +1 -0
  26. package/cjs/skin-40c6a7e1.js +1 -0
  27. package/cjs/skin-88f4436c.js +1 -0
  28. package/cjs/skin-cd1687c7.js +1 -0
  29. package/cjs/skin-ceb1b073.js +1 -0
  30. package/cjs/skin-d290cc85.js +1 -0
  31. package/cjs/util-d9685f9c.js +1 -0
  32. package/cjs/videoSelector-22d8e63c.js +1 -0
  33. package/cjs/videoSelector-6a652276.js +1 -0
  34. package/esm/{autoNextVideo-ec6a4046.js → autoNextVideo-501c52f2.js} +1 -1
  35. package/esm/bundle.css +73 -58
  36. package/esm/{caption-settings-5e4c50d1.js → caption-settings-030233d0.js} +1 -1
  37. package/esm/{captions-bbc7eb98.js → captions-6ad6371c.js} +1 -1
  38. package/esm/{features-96f3ac80.js → features-c0f0980d.js} +1 -1
  39. package/esm/generic-d6b795b3.js +1 -0
  40. package/esm/{icons-0676e9c7.js → icons-699e8cf0.js} +1 -1
  41. package/esm/{index-8c443ff1.js → index-0a2a5e85.js} +1 -1
  42. package/esm/index.js +1 -1
  43. package/esm/multicamv2-409ee5f3.js +1 -0
  44. package/esm/multicamv2-6ec581e9.js +1 -0
  45. package/esm/nextEpisodeButton-6a239af5.js +1 -0
  46. package/esm/playlist-2d85f436.js +1 -0
  47. package/esm/renditions-145b511f.js +1 -0
  48. package/esm/{resolution-73611ca6.js → resolution-716ab925.js} +1 -1
  49. package/esm/series-8e49e292.js +1 -0
  50. package/esm/series-v2-512d03b8.js +1 -0
  51. package/esm/series-v2-af3cfd5d.js +1 -0
  52. package/esm/{settings-icon-0fd94cf4.js → settings-icon-736c67a5.js} +1 -1
  53. package/esm/skin-00bcb949.js +1 -0
  54. package/esm/skin-20a86b4e.js +1 -0
  55. package/esm/skin-69273712.js +1 -0
  56. package/esm/skin-6de5014a.js +1 -0
  57. package/esm/skin-85de5c6a.js +1 -0
  58. package/esm/skin-964df3ed.js +1 -0
  59. package/esm/skin-9fece9a0.js +1 -0
  60. package/esm/skin-b11f2621.js +1 -0
  61. package/esm/skin-bf9e2ada.js +1 -0
  62. package/esm/skin-cc7cd5fb.js +1 -0
  63. package/esm/skin-fbab87d5.js +1 -0
  64. package/esm/util-782bcc96.js +1 -0
  65. package/esm/videoSelector-737ae8c2.js +1 -0
  66. package/esm/videoSelector-75fb528c.js +1 -0
  67. package/package.json +1 -1
  68. package/cjs/generic-ba36a442.js +0 -1
  69. package/cjs/icons-0ea2e662.js +0 -1
  70. package/cjs/index-5bfdc0ed.js +0 -1
  71. package/cjs/multicamv2-09d7cc5b.js +0 -1
  72. package/cjs/multicamv2-274187ee.js +0 -1
  73. package/cjs/nextEpisodeButton-0a4b3776.js +0 -1
  74. package/cjs/playlist-acf20a84.js +0 -1
  75. package/cjs/renditions-00bfda1f.js +0 -1
  76. package/cjs/series-4e1e045e.js +0 -1
  77. package/cjs/series-v2-0c532b09.js +0 -1
  78. package/cjs/series-v2-a9b97769.js +0 -1
  79. package/cjs/skin-0e506a38.js +0 -1
  80. package/cjs/skin-87c06e34.js +0 -1
  81. package/cjs/skin-a1d317e2.js +0 -1
  82. package/cjs/skin-b1c390e3.js +0 -1
  83. package/cjs/skin-b6ed46d6.js +0 -1
  84. package/cjs/skin-ba5665c0.js +0 -1
  85. package/cjs/skin-d60f1399.js +0 -1
  86. package/cjs/skin-f1304c1c.js +0 -1
  87. package/cjs/skin-f87e1c22.js +0 -1
  88. package/cjs/util-e1bc715c.js +0 -1
  89. package/cjs/videoSelector-07ca3c66.js +0 -1
  90. package/cjs/videoSelector-912ddc08.js +0 -1
  91. package/esm/generic-adf94b3d.js +0 -1
  92. package/esm/index-e8a82518.js +0 -1
  93. package/esm/multicamv2-1b5a4340.js +0 -1
  94. package/esm/multicamv2-d114b114.js +0 -1
  95. package/esm/nextEpisodeButton-5fd8430d.js +0 -1
  96. package/esm/playlist-55295c26.js +0 -1
  97. package/esm/renditions-7393c027.js +0 -1
  98. package/esm/series-55848c07.js +0 -1
  99. package/esm/series-v2-11efc578.js +0 -1
  100. package/esm/series-v2-43ac947e.js +0 -1
  101. package/esm/skin-46862baf.js +0 -1
  102. package/esm/skin-86e7e2b5.js +0 -1
  103. package/esm/skin-979229c9.js +0 -1
  104. package/esm/skin-9c97a06c.js +0 -1
  105. package/esm/skin-a74b2d26.js +0 -1
  106. package/esm/skin-bfd83db6.js +0 -1
  107. package/esm/skin-e4b35c14.js +0 -1
  108. package/esm/skin-e75ce862.js +0 -1
  109. package/esm/skin-f03e04cd.js +0 -1
  110. package/esm/util-f9af2f94.js +0 -1
  111. package/esm/videoSelector-76f3dea4.js +0 -1
  112. package/esm/videoSelector-8ad1d136.js +0 -1
@@ -1 +1 @@
1
- "use strict";var e,i=require("./generic-ba36a442.js"),t=require("./util-e1bc715c.js"),n=require("./skin-f87e1c22.js"),o=0,u=0,d=function e(t,o,d,r){u=t,t>d.length-1||(i.setVideoIdx(u+1),i.load(o,d[t].id).then(function(e){n.highlightVideo(u,o),u++,c(e)}).catch(function(i){c(i),setTimeout(function(){n.highlightVideo(u,o),u++,e(u,o,d)},5e3)}))},c=function(i){e&&e(i)};exports.autoPlayNext=function(r){clearTimeout(o);var h=null==r?void 0:r.content;e=null==r?void 0:r.cb;var l=r.playerId;t.onVideoEnded(l,function(){var e=n.getPlayer(l);0!==(null==e?void 0:e.currentTime())&&((u=i.getVideoIdx())>h.length-1||(i.setVideoIdx(u+1),i.load(l,h[u].id).then(function(e){n.highlightVideo(u,l),i.setCurrentVideo(e.response),u++,c(e)}).catch(function(e){c(e),n.highlightVideo(u,l),u++,o=setTimeout(function(){i.isPaused(l)&&d(u,l,h)},5e3)})))})},exports.switchToNext=d;
1
+ "use strict";var e,i=require("./generic-c55478de.js"),t=require("./util-d9685f9c.js"),n=require("./skin-cd1687c7.js"),o=0,u=0,d=function e(t,o,d,r){u=t,t>d.length-1||(i.setVideoIdx(u+1),i.load(o,d[t].id).then(function(e){n.highlightVideo(u,o),u++,c(e)}).catch(function(i){c(i),setTimeout(function(){n.highlightVideo(u,o),u++,e(u,o,d)},5e3)}))},c=function(i){e&&e(i)};exports.autoPlayNext=function(r){clearTimeout(o);var h=null==r?void 0:r.content;e=null==r?void 0:r.cb;var l=r.playerId;t.onVideoEnded(l,function(){var e=n.getPlayer(l);0!==(null==e?void 0:e.currentTime())&&((u=i.getVideoIdx())>h.length-1||(i.setVideoIdx(u+1),i.load(l,h[u].id).then(function(e){n.highlightVideo(u,l),i.setCurrentVideo(e.response),u++,c(e)}).catch(function(e){c(e),n.highlightVideo(u,l),u++,o=setTimeout(function(){i.isPaused(l)&&d(u,l,h)},5e3)})))})},exports.switchToNext=d;
package/cjs/bundle.css CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
 
4
4
 
5
-
6
-
7
5
  /*
8
6
  * Styles the icon size and line height for button icons in the SmartTV skin.
9
7
  *
@@ -1561,6 +1559,10 @@ iframe {
1561
1559
  top: -1px;
1562
1560
  }
1563
1561
 
1562
+ .video-js.skin_smartTV .vjs-button > .vjs-icon-placeholder{
1563
+ position: absolute !important;
1564
+ }
1565
+
1564
1566
 
1565
1567
 
1566
1568
  .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
@@ -1736,6 +1738,7 @@ iframe {
1736
1738
  }
1737
1739
  }
1738
1740
 
1741
+
1739
1742
  /* CSS for videojs-dvr-seekbar */
1740
1743
 
1741
1744
  .video-js.vjs-dvr-seekbar {
@@ -2200,6 +2203,17 @@ iframe {
2200
2203
  margin: unset !important;
2201
2204
  }
2202
2205
 
2206
+ .vjs-text-track-display{
2207
+ position: unset !important;
2208
+ top: unset !important;
2209
+ bottom: unset !important;
2210
+ left: unset !important;
2211
+ right: unset !important;
2212
+ }
2213
+ .vjs-text-track-cue{
2214
+ font-size: 46px !important;
2215
+ bottom: 10% !important;
2216
+ }
2203
2217
 
2204
2218
  /* ADs */
2205
2219
  .ima-ad-container {
@@ -2355,6 +2369,62 @@ iframe {
2355
2369
  .video-js.vjs-playing .bumpable-ima-ad-container {
2356
2370
  margin-top: -4em;
2357
2371
  }
2372
+ .ssai-ad-container{
2373
+ display: none;
2374
+ }
2375
+ .ssai-ad-container .ad-counter{
2376
+ position: absolute;
2377
+ bottom: 3rem;
2378
+ left: 6.5rem;
2379
+ color: white;
2380
+ padding: 3.6px 10px;
2381
+ font-size: 12px;
2382
+ border-radius: 4px;
2383
+ overflow: hidden;
2384
+ text-overflow: ellipsis;
2385
+ font-family: sans-serif;
2386
+ white-space: nowrap;
2387
+ -webkit-user-select: none;
2388
+ -moz-user-select: none;
2389
+ font-weight: 700;
2390
+ text-shadow: 0 0 4px rgba(0, 0, 0, .75);
2391
+ user-select: none;
2392
+ }
2393
+ .ad-info-icon:hover {
2394
+ cursor: pointer;
2395
+ }
2396
+
2397
+ .ssai-ad-container .sponsored-adbox{
2398
+ position: absolute;
2399
+ bottom: 3rem;
2400
+ font-family: sans-serif;
2401
+ left: 0.8rem;
2402
+ padding: 3.6px 0;
2403
+ display: flex;
2404
+ align-items: center;
2405
+ color: white;
2406
+ font-size: 12px;
2407
+ border-radius: 4px;
2408
+ overflow: hidden;
2409
+ text-overflow: ellipsis;
2410
+ white-space: nowrap;
2411
+ -webkit-user-select: none;
2412
+ -moz-user-select: none;
2413
+ font-weight: 700;
2414
+ text-shadow: 0 0 4px rgba(0, 0, 0, .75);
2415
+ user-select: none;
2416
+ }
2417
+ .ssai-ad-container .sponsored-adbox .sponsored-text{
2418
+ margin-right: 0.4rem;
2419
+ }
2420
+
2421
+ @media (max-width:600px){
2422
+ .ssai-ad-container .ad-info-title{
2423
+ max-width: 190px;
2424
+ }
2425
+ }
2426
+
2427
+
2358
2428
  /* Resolution Module */
2359
2429
 
2360
2430
  .video-js .container {
@@ -2671,59 +2741,4 @@ iframe {
2671
2741
  background-image: url('https://player.viewlift.com/images/ic_airplay_white_24px.svg');
2672
2742
  }
2673
2743
 
2674
- /* Airplay end */
2675
- .ssai-ad-container{
2676
- display: none;
2677
- }
2678
- .ssai-ad-container .ad-counter{
2679
- position: absolute;
2680
- bottom: 3rem;
2681
- left: 6.5rem;
2682
- color: white;
2683
- padding: 3.6px 10px;
2684
- font-size: 12px;
2685
- border-radius: 4px;
2686
- overflow: hidden;
2687
- text-overflow: ellipsis;
2688
- font-family: sans-serif;
2689
- white-space: nowrap;
2690
- -webkit-user-select: none;
2691
- -moz-user-select: none;
2692
- font-weight: 700;
2693
- text-shadow: 0 0 4px rgba(0, 0, 0, .75);
2694
- user-select: none;
2695
- }
2696
- .ad-info-icon:hover {
2697
- cursor: pointer;
2698
- }
2699
-
2700
- .ssai-ad-container .sponsored-adbox{
2701
- position: absolute;
2702
- bottom: 3rem;
2703
- font-family: sans-serif;
2704
- left: 0.8rem;
2705
- padding: 3.6px 0;
2706
- display: flex;
2707
- align-items: center;
2708
- color: white;
2709
- font-size: 12px;
2710
- border-radius: 4px;
2711
- overflow: hidden;
2712
- text-overflow: ellipsis;
2713
- white-space: nowrap;
2714
- -webkit-user-select: none;
2715
- -moz-user-select: none;
2716
- font-weight: 700;
2717
- text-shadow: 0 0 4px rgba(0, 0, 0, .75);
2718
- user-select: none;
2719
- }
2720
- .ssai-ad-container .sponsored-adbox .sponsored-text{
2721
- margin-right: 0.4rem;
2722
- }
2723
-
2724
- @media (max-width:600px){
2725
- .ssai-ad-container .ad-info-title{
2726
- max-width: 190px;
2727
- }
2728
- }
2729
-
2744
+ /* Airplay end */
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),r=require("./icons-0ea2e662.js"),c=require("./captions-bc814903.js"),l=require("./skin-f87e1c22.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}require("@babel/runtime/helpers/toConsumableArray");var d=i.getComponent("Component"),p=function(){n(v,d);var p,u,m=(p=v,u=s(),function(){var e,t=o(p);if(u){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(i=m.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(v,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r.CaptionsSvgV2())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./caption-settings-34ca0188.js")}).then(function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=c.getCaptions(this.playerId);null==t||t.map(function(t){return c.disableCaptions(e.playerId,t.id)});var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(l.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",l.setUpdatedElHeight(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var r=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(r),i.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),l.detectOrientationChange(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),c=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,c),i.dom.appendContent(c,s),l.handleDrawerResizing(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),c.getCaptions(e.playerId).map(function(t){return c.disableCaptions(e.playerId,t.id)})},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var l=c.getCaptions(this.playerId),s=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});s.onchange=function(t){c.enableCaptions(e.playerId,l[n].id)},s.setAttribute("type","radio"),i.dom.appendContent(o,s),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),v}();exports.default=p;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),r=require("./icons-eb807ef0.js"),c=require("./captions-d914af7e.js"),l=require("./skin-cd1687c7.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}require("@babel/runtime/helpers/toConsumableArray");var d=i.getComponent("Component"),p=function(){n(v,d);var p,u,m=(p=v,u=s(),function(){var e,t=o(p);if(u){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(i=m.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(v,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r.CaptionsSvgV2())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./caption-settings-34ca0188.js")}).then(function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=c.getCaptions(this.playerId);null==t||t.map(function(t){return c.disableCaptions(e.playerId,t.id)});var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(l.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",l.setUpdatedElHeight(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var r=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(r),i.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),l.detectOrientationChange(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),c=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,c),i.dom.appendContent(c,s),l.handleDrawerResizing(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),c.getCaptions(e.playerId).map(function(t){return c.disableCaptions(e.playerId,t.id)})},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var l=c.getCaptions(this.playerId),s=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});s.onchange=function(t){c.enableCaptions(e.playerId,l[n].id)},s.setAttribute("type","radio"),i.dom.appendContent(o,s),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),v}();exports.default=p;
@@ -1 +1 @@
1
- "use strict";var t=require("./skin-f87e1c22.js"),e=function(e){var l,n,i=t.getPlayer(e);return(null==i||null===(l=i.textTracks)||void 0===l||null===(n=l.call(i))||void 0===n?void 0:n.tracks_.filter(function(t){return"subtitles"==t.kind||"captions"===t.kind}))||[]};exports.addCaptions=function(e,l){var n=t.getPlayer(e);n.remoteTextTracks().tracks_.map(function(t){n.removeRemoteTextTrack(t)}),l.map(function(t){n.addRemoteTextTrack({src:t.url,srclang:t.srclang,label:t.label})})},exports.disableCaptions=function(e,l){for(var n,i=t.getPlayer(e),r=null==i||null===(n=i.textTracks)||void 0===n?void 0:n.call(i),a=0;a<r.length;a++){var o=r[a];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==l||(o.mode="hidden")}},exports.enableCaptions=function(e,l){var n,i,r,a;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(i=n[0])||void 0===i||null===(r=i.style)||void 0===r||r.setProperty("display","flex"));for(var o=t.getPlayer(e),s=null==o||null===(a=o.textTracks)||void 0===a?void 0:a.call(o),d=0;d<s.length;d++){var u=s[d];"subtitles"!==u.kind&&"captions"!==u.kind||u.id!=l||(u.mode="showing")}},exports.getCaptions=e,exports.getTextTracksWithCuesDetails=function(l){var n,i,r=t.getPlayer(l);try{var a,o,s,d,u;i=Array.from(null==r||null===(a=r.children_)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.textTracks),i=null==r||null===(s=r.children_)||void 0===s||null===(d=s[0])||void 0===d||null===(u=d.textTracks)||void 0===u?void 0:u.filter(function(t){return"subtitles"==t.kind||"captions"===t.kind})}catch(t){}return i&&0!==(null===(n=i)||void 0===n?void 0:n.length)||(i=e(l)),i||[]},exports.removeCaptions=function(e){var l=t.getPlayer(e);l.remoteTextTracks().tracks_.map(function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,l.removeRemoteTextTrack(t)})};
1
+ "use strict";var t=require("./skin-cd1687c7.js"),e=function(e){var l,n,i=t.getPlayer(e);return(null==i||null===(l=i.textTracks)||void 0===l||null===(n=l.call(i))||void 0===n?void 0:n.tracks_.filter(function(t){return"subtitles"==t.kind||"captions"===t.kind}))||[]};exports.addCaptions=function(e,l){var n=t.getPlayer(e);n.remoteTextTracks().tracks_.map(function(t){n.removeRemoteTextTrack(t)}),l.map(function(t){n.addRemoteTextTrack({src:t.url,srclang:t.srclang,label:t.label})})},exports.disableCaptions=function(e,l){for(var n,i=t.getPlayer(e),r=null==i||null===(n=i.textTracks)||void 0===n?void 0:n.call(i),a=0;a<r.length;a++){var o=r[a];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==l||(o.mode="hidden")}},exports.enableCaptions=function(e,l){var n,i,r,a;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(i=n[0])||void 0===i||null===(r=i.style)||void 0===r||r.setProperty("display","flex"));for(var o=t.getPlayer(e),s=null==o||null===(a=o.textTracks)||void 0===a?void 0:a.call(o),d=0;d<s.length;d++){var u=s[d];"subtitles"!==u.kind&&"captions"!==u.kind||u.id!=l||(u.mode="showing")}},exports.getCaptions=e,exports.getTextTracksWithCuesDetails=function(l){var n,i,r=t.getPlayer(l);try{var a,o,s,d,u;i=Array.from(null==r||null===(a=r.children_)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.textTracks),i=null==r||null===(s=r.children_)||void 0===s||null===(d=s[0])||void 0===d||null===(u=d.textTracks)||void 0===u?void 0:u.filter(function(t){return"subtitles"==t.kind||"captions"===t.kind})}catch(t){}return i&&0!==(null===(n=i)||void 0===n?void 0:n.length)||(i=e(l)),i||[]},exports.removeCaptions=function(e){var l=t.getPlayer(e);l.remoteTextTracks().tracks_.map(function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,l.removeRemoteTextTrack(t)})};
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-ba36a442.js"),s=require("./renditions-00bfda1f.js"),d=require("./skin-f87e1c22.js"),c=require("./localisation-56e0a999.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-d31caa42.js")}).then(function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=d.getPlayer(e).el(),r=0,n=d.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-274187ee.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-09d7cc5b.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-0a4b3776.js")}).then(function(n){var o=n.default,l=d.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=d.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-acf20a84.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-0a6680be.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-4e1e045e.js")}).then(function(n){var o=n.seriesModule,l=d.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)})},c=0;c<a.length;c++)s(c)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-a9b97769.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-0c532b09.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-772875ec.js")}).then(function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-07ca3c66.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-912ddc08.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-c55478de.js"),s=require("./renditions-1dce5a4b.js"),d=require("./skin-cd1687c7.js"),c=require("./localisation-56e0a999.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-a0565b31.js")}).then(function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=d.getPlayer(e).el(),r=0,n=d.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-e17c45da.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-dbfc28ef.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-ca7cf6aa.js")}).then(function(n){var o=n.default,l=d.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=d.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-3a355641.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-5cef7eef.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-56aa269f.js")}).then(function(n){var o=n.seriesModule,l=d.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)})},c=0;c<a.length;c++)s(c)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-477104dc.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-36ffd0f4.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-c792cbf8.js")}).then(function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-22d8e63c.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-6a652276.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("axios"),r=require("./skin-cd1687c7.js"),l=require("./browser-38ff3331.js"),a=require("js-cookie"),d=require("ua-parser-js"),s=require("./captions-d914af7e.js"),u=require("@babel/runtime/helpers/toConsumableArray"),c=require("@babel/runtime/helpers/slicedToArray");function v(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function m(e,t){v("event",e,t)}var f={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 p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function g(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?p(Object(o),!0).forEach(function(n){e(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}var I={name:"@viewlift/player-backup",version:"2.0.98-smarttv",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0",install:"^0.13.0","js-cookie":"^3.0.5",npm:"^11.5.2","ua-parser-js":"^2.0.3","video.js":"7.21.7","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-contrib-quality-menu":"^1.0.3","videojs-mux":"^4.21.7","videojs-contrib-dash":"^5.1.1","videojs-ima":"^2.1.0"}};window.vl_player_version=I.version;var w,E=function(e,t){var n,o,r,l,a,d,s,u,c,v;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:null!==(s=window)&&void 0!==s&&null!==(u=s.customData)&&void 0!==u&&u.overrideEntitlementBaseUrl?(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v?void 0:v.overrideEntitlementBaseUrl)+"/video/status":_.get()+"".concat(null==f?void 0:f.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":I.version,adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken,"x-player-name":"videojs"},withCredentials:!0})},T=function(e,t){var n,o,r,l,a,d;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:_.get()+f.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},h=function(){var e=t(n.mark(function e(t){var o;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A();case 2:return o=e.sent,e.abrupt("return",i({url:_.get()+"".concat(null==f?void 0:f.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:g({},t),params:g({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),y=function(e,t){var n,o,r=window.contentType;return i({method:"GET",url:_.get()+"".concat(null==f?void 0:f.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},b=function(e){var t=e.videoId;return i({method:"GET",url:_.get()+"".concat(null==f?void 0:f.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},_=(w=null==f?void 0:f.apiBaseUrl,{set:function(e){e&&(w=e)},get:function(){return w}}),S=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},D=null;function F(){return{set:function(e){e&&(D=e)},get:function(){return D}}}var L,O,P,R,V,x,W=function(){var e=t(n.mark(function e(){var t,o,r;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=F().get(),o=_.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(t)});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)}}(),C=null,A=function(){var e=t(n.mark(function e(){var t;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!S(t)){e.next=6;break}return C||(C=W().then(function(e){var n,o,i=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&F().set(r),i||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){C=null})),e.abrupt("return",C);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),k=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},j=function(e){O=e},N=function(){return O},M=function(){return L},B=function(e){P=e},U=function(e){if(R){var t=R.get(e);B(t+1)}},H=(x=0,{set:function(e){e>=0&&(x=e)},get:function(){return x}});function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function z(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?G(Object(o),!0).forEach(function(n){e(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):G(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}var q=0,Y=!1,Q=function(){var e,t,n,o,i,r,l,a=N();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(o=n.content)||void 0===o?void 0:o.id:(null==a||null===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function X(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function K(){var e=window.sessionStorage.getItem("uid");return e||(e=X(),window.sessionStorage.setItem("uid",e),e)}function J(){return $.apply(this,arguments)}function $(){return($=t(n.mark(function e(){var t,o;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(o=JSON.parse(atob(t.split(".")[1])))||!o.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==o?void 0:o.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Z(e){return e?String(e):""}window.initialise=function(e){window.sid=X(),window.environment="production",window.platform="WEBSITE",Y=!1;try{Y(e),buffering(e),ads(e),ping(e)}catch(e){}},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",function(){var n,o,i,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.handleBufferTimer=null,Y=!0,m(r?"FAILED_TO_START":"DROPPED_STREAM",z({pfm:window.platform,uid:K(),vid:Q(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,o,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),m("PLAY",z({pfm:window.platform,uid:K(),vid:Q(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(o=n.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}),t&&t("started_video_playback",{"Video ID":Q(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||Y||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,o;if(t.el_){var i,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(o=n.className)&&void 0!==o&&o.includes("vjs-waiting")&&q<4)q++,m("BUFFERING",z({pfm:window.platform,uid:K(),vid:Q(),videoPosition:t.el_&&Math.floor(t.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:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,m("FIRST_FRAME",z({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:K(),vid:Q()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.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 t,n,o,i,r,l;m("AD_REQUEST",z({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:K(),vid:Q(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.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}),m("AD_IMPRESSION",z({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:K(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Q()},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 t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(q=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,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 t=e.currentTime(),n=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(ee(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var ee=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark(function e(t){var o,r,l,a,d,s,u,c,v,m,p,g,I,w,E,T,h,y,b,S;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A();case 2:return T=e.sent,h=k(T),y=null==h?void 0:h.site,b=null==h?void 0:h.siteId,e.t0=z,e.t1=z,e.t2=z({aid:y,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.t4=K(),e.t5=Q(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(a=t.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?Z(t.adPosition):"",e.next=26,J();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(s=t.bitrate)&&void 0!==s?s:null,e.t24=null!==(u=t.resHeight)&&void 0!==u?u:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.bufferHealth)&&void 0!==v?v:null,e.t27={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},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t31=(0,e.t0)(e.t29,e.t30),S=[e.t31],i({url:(null===(I=window)||void 0===I||null===(w=I.customData)||void 0===w||null===(E=w.beacon)||void 0===E?void 0:E.url)||_.get()+f.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:S}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(t){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 te=function(){var e=H.get();return e>=0?e+1:1},ne=function(){var e,t,n,o=M(),i=N(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=H.get(),a=null==o||null===(t=o[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ie(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?oe(Object(o),!0).forEach(function(n){e(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):oe(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}window._deviceInfo=d.UAParser(navigator.userAgent);var re=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},le=function(e){var t=ae(e,"video.tags",[]),n=ae(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},ae=function(e,t,n){for(var o=0,i=(t=t.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[t[o]]}return e||n},de=function(){var e,t,n,o,i,l,d,s,u,c,v,m,f,p,g,I,w,E,T,h,y,b,_,S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",D=arguments.length>1?arguments[1]:void 0,F=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.disableMacros)return S;var L=(null==F?void 0:F.siteName)||"",O=(null==F?void 0:F.contentType)||"video",P=(null==F||null===(n=F[O])||void 0===n?void 0:n.metadata)||(null==F||null===(o=F[O])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.metadata),R=r.getPlayer(D);if(!S.includes("VIEWLIFT_"))return S;var V,x=window.getComputedStyle(document.getElementById(D),null),W=Math.trunc(x.getPropertyValue("height").slice(0,-2)),C=Math.trunc(x.getPropertyValue("width").slice(0,-2)),A="linearchannel"===O?null==F||null===(l=F.linearchannel)||void 0===l||null===(d=l.channels)||void 0===d||null===(s=d.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===s||null===(u=s.content)||void 0===u?void 0:u.id:ae(F,"video.gist.id",""),k="linearchannel"===O?null==F||null===(c=F.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===m?void 0:m.title:ae(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),j=null,N=null;"function"==typeof window.__gpp&&(null===(V=window)||void 0===V||V.__gpp("ping",function(e){j=null==e?void 0:e.gppString,N=null==e?void 0:e.sectionList[0]}));var M=ie(ie({},se(P)),{},{VIEWLIFT_WIDTH:C,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:re(C,W),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===(f=window)||void 0===f?void 0:f.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ae(F,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ae(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ae(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(p=R.options_)||void 0===p?void 0:p.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(g=R.options_)||void 0===g?void 0:g.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:le(F),VIEWLIFT_MEDIA_ID:A,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ae(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:A,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ae(F,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ae(null===(I=window)||void 0===I||null===(w=I.app_data)||void 0===w||null===(E=w.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L?"":ae(null===(T=window)||void 0===T||null===(h=T.app_data)||void 0===h||null===(y=h.site)||void 0===y?void 0:y.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ae(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ae(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:A,VIEWLIFT_CONTENT_TITLE:k,VIEWLIFT_CONTENT_SERIES_TITLE:ae(F,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ae(F,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ne(),VIEWLIFT_SEASON_NUMBER:te(),VIEWLIFT_CONTENT_TAGS:le(F),VIEWLIFT_GPP_SID:N||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:j||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(b=window)||void 0===b||null===(_=b.customData)||void 0===_?void 0:_.macros);for(var B in M){var U=new RegExp(B,"g");S=S.replace(U,M[B])}return S},se=function(e){var t,n,o,i,r,a,d;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV)return ue(e);var s={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var c=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.subscription)||void 0===i?void 0:i.SVOD)||!1,v=(null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a||null===(d=a.subscription)||void 0===d?void 0:d.TVE)||!1;return c||v?(l.isMobile()?c?s=ie(ie({},s),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):v&&(s=ie(ie({},s),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):c?s=ie(ie({},s),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):v&&(s=ie(ie({},s),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),c?s=ie(ie({},s),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):v&&(s=ie(ie({},s),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),s=l.isMobile()?ie(ie({},s),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ie(ie({},s),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(s=ie(ie({},s),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),s=l.isMobile()?ie(ie({},s),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ie(ie({},s),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),s=ie(ie({},s),{},{VIEWLIFT_AFID:u.get("afid")})},ue=function(e){var t,n,o,i,r,l,a={},d=new Map;return(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)})),null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.subscription)||void 0===o||o.SVOD,(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?"lgTv"==window.customData.device?(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.tve")||d.get("sfid.tve")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.tve")||d.get("sfid.tve")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.tve")||d.get("sfid.tve")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.tve")||d.get("sfid.tve")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.tve")||d.get("sfid.tve")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.tve")||d.get("sfid.tve")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):"lgTv"==window.customData.device?(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.dtc")||d.get("sfid.dtc")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.dtc")||d.get("sfid.dtc")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.dtc")||d.get("sfid.dtc")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.dtc")||d.get("sfid.dtc")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.dtc")||d.get("sfid.dtc")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.firetv.dtc")||"",VIEWLIFT_PROF:d.get("prof.firetv")||""})):(a=ie(ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.dtc")||d.get("sfid.dtc")}),a=ie(ie({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})),a},ce=function(e){var t=null;try{var n,o,i,r,l,a,d,s,u,c,v,m,f,p,g,I,w,E,T,h,y,b,_,S,D,F,L,O,P,R,V,x,W,C,A,k,j;if(null!==(n=window)&&void 0!==n&&n.customData.isSmartTV){if("samsungTv"==window.customData.device&&null!=e&&null!==(o=e.ads)&&void 0!==o&&null!==(i=o.preRoll)&&void 0!==i&&null!==(r=i.adTags)&&void 0!==r&&null!==(l=r.samsung_tv)&&void 0!==l&&l.active)t=null==e||null===(F=e.ads)||void 0===F||null===(L=F.preRoll)||void 0===L||null===(O=L.adTags)||void 0===O||null===(P=O.samsung_tv)||void 0===P?void 0:P.url;else if("lgTv"==window.customData.device&&null!=e&&null!==(a=e.ads)&&void 0!==a&&null!==(d=a.preRoll)&&void 0!==d&&null!==(s=d.adTags)&&void 0!==s&&null!==(u=s.lg_tv)&&void 0!==u&&u.active){var N,M,B,U;t=null==e||null===(N=e.ads)||void 0===N||null===(M=N.preRoll)||void 0===M||null===(B=M.adTags)||void 0===B||null===(U=B.lg_tv)||void 0===U?void 0:U.url}else if("vizioTv"==window.customData.device&&null!=e&&null!==(c=e.ads)&&void 0!==c&&null!==(v=c.preRoll)&&void 0!==v&&null!==(m=v.adTags)&&void 0!==m&&null!==(f=m.vizioTv)&&void 0!==f&&f.active){var H,G,z,q;t=null==e||null===(H=e.ads)||void 0===H||null===(G=H.preRoll)||void 0===G||null===(z=G.adTags)||void 0===z||null===(q=z.vizioTv)||void 0===q?void 0:q.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(g=p.preRoll)&&void 0!==g&&null!==(I=g.adTags)&&void 0!==I&&null!==(w=I.xbox)&&void 0!==w&&w.active){var Y,Q,X,K;t=null==e||null===(Y=e.ads)||void 0===Y||null===(Q=Y.preRoll)||void 0===Q||null===(X=Q.adTags)||void 0===X||null===(K=X.xbox)||void 0===K?void 0:K.url}else if("xbox"==window.customData.device&&null!=e&&null!==(E=e.ads)&&void 0!==E&&null!==(T=E.preRoll)&&void 0!==T&&null!==(h=T.adTags)&&void 0!==h&&null!==(y=h.xbox)&&void 0!==y&&y.active){var J,$,Z,ee;t=null==e||null===(J=e.ads)||void 0===J||null===($=J.preRoll)||void 0===$||null===(Z=$.adTags)||void 0===Z||null===(ee=Z.xbox)||void 0===ee?void 0:ee.url}else if("FireTV"==window.customData.device&&null!=e&&null!==(b=e.ads)&&void 0!==b&&null!==(_=b.preRoll)&&void 0!==_&&null!==(S=_.adTags)&&void 0!==S&&null!==(D=S.firetv)&&void 0!==D&&D.active){var te,ne,oe,ie;t=null==e||null===(te=e.ads)||void 0===te||null===(ne=te.preRoll)||void 0===ne||null===(oe=ne.adTags)||void 0===oe||null===(ie=oe.firetv)||void 0===ie?void 0:ie.url}}else t=(null==e||null===(R=e.ads)||void 0===R||null===(V=R.preRoll)||void 0===V||null===(x=V.adTags)||void 0===x||null===(W=x.web)||void 0===W?void 0:W.active)&&(null==e||null===(C=e.ads)||void 0===C||null===(A=C.preRoll)||void 0===A||null===(k=A.adTags)||void 0===k||null===(j=k.web)||void 0===j?void 0:j.url)}catch(e){}return t},ve=function(e,t){var n,o,i,r,a,d,s,u,c,v,m,f,p,g=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[g])||void 0===n?void 0:n.drmEnabled,w=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[g])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(d=e[g])||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[g])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return fe(E);if(I){var y=pe(w,t);return y.src=de(y.src,t,e),y}if("Safari"!==l.detectBrowser()&&h){var b=me(w);return b.src=de(b.src,t,e),b}if(T){var _=fe(w);return _.src=de(_.src,t,e),_}if(null!=w&&w.mpeg){var S=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(w);return S.src=de(S.src,t,e),S}return null},me=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},fe=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},pe=function(e,t){var n=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,a=e.widevine,d=e.playReady,s=l.detectBrowser();if(r.getPlayer(t),"Safari"===s){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,function(e,t,o){console.log(e),e&&n(e),n(null,new Uint8Array(o))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,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,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(i);return ge(t),u}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(ge(t),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==d?void 0:d.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==n?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var ge=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==l.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ie=function(e,t){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}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(t),i.appendChild(r),o.append(i)}}},we=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Ee=!1,Te=function(e,t,n){var o=de(t,e,n),i=r.getPlayer(e);if(t&&window.google){if("function"!=typeof i.ima)return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,l=r.getPlayer(e);if(null!==l.el_){Ee=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Ee&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,function(){u&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(o=n.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 t=e.adsManager;t.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),t.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};var he,ye=(he=!0,{enable:function(){he=!0},disable:function(){he=!1},get enabled(){return he}}),be="ssai-breakStart",_e="ssai-adImpression",Se="ssai-firstQuartile",De="ssai-midpoint",Fe="ssai-thirdQuartile",Le="ssai-complete",Oe="ssai-breakEnd",Pe={breakStart:be,impression:_e,firstQuartile:Se,midpoint:De,thirdQuartile:Fe,complete:Le,breakEnd:Oe};function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var o=t.eventType,i=Pe[o];i&&n.trigger(i,t)}function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function xe(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Ve(Object(o),!0).forEach(function(n){e(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ve(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function We(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ce(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);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(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw r}}}}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Ae,ke=function(){var e="";return{set:function(t){t&&(e=t)},get:function(){return e}}}(),je=(Ae=null,{set:function(e){Ae=e},get position(){return Ae}});function Ne(e,t){return Me.apply(this,arguments)}function Me(){return(Me=t(n.mark(function e(t,o){var i,l,a,d,s,u,v,m,f,p,g,I,w,E;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.getPlayer(t),i=ve(o,t),l=i.src,a=l.replace("/dash/","/session/").replace("/master/","/session/"),a=de(a,t,o),d=Be(a),s=c(d,2),u=s[0],v=s[1],a=new URL(a.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var t=c(e,2),n=t[0],o=t[1];a.searchParams.set(n,o)}),e.prev=8,e.next=11,fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:xe({},u)})});case 11:return m=e.sent,e.next=14,m.json();case 14:return f=e.sent,p="https://"+new URL(a).hostname,g=f.trackingUrl,I=f.manifestUrl,w=p+g,E=p+I,ke.set(w),console.log("%c TRACKING URL","background: #bdf369; color: #000",w),i.src=E,e.abrupt("return",i);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",i);case 29:case"end":return e.stop()}},e,null,[[8,26]])}))).apply(this,arguments)}function Be(e){var t={};if(!e.split("?")[1])return[{},{}];var n,o=new URL(e,window.location.origin),i=We((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(n=i.n()).done;){var r=c(n.value,2),l=r[0],a=r[1];t[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,v=Object.entries(t);u<v.length;u++){var m=c(v[u],2),f=m[0],p=m[1];if(f.startsWith("ads."))d[f.replace(/^ads\./,"")]=p;else s[f]=p}return[d,s]}function Ue(){return Ue=t(n.mark(function e(o,i){var l,a,d,s,c,v,m,f,p,g,I,w,E,T,h,y,b,_,S,D,F,L,O;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:O=function(e,t,n,i,l,a){var d=r.getPlayer(o);if(!d.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(d.currentTime());var s,u=We(n);try{var c=function(){var n,r,u,c=s.value,v=c.eventType,m=c.beaconUrls,f=c.startTimeInSeconds,p=c.startTime,g=c.durationInSeconds,I=f||0,w=m,E=(null===(n=window)||void 0===n||null===(r=n.customData)||void 0===r||null===(u=r.ads)||void 0===u?void 0:u.adEventHandler)||null,T="".concat(I,"_").concat(v),h=F.get("pod-".concat(l))||[];if(e>=I&&!h.includes(T)){var y;h.push(T),F.set("pod-".concat(l),h);try{L(v,t,w,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,t)}if("breakEnd"==v){var b=je.position;je.set(null),setTimeout(function(){null!=b&&(d.currentTime(b),a())},500)}if("function"==typeof E&&null!=t&&null!==(y=t.ads)&&void 0!==y&&y[i])try{var _,S={eventType:v,startTimeInSeconds:f,startTime:p,durationInSeconds:g,ad:null==t||null===(_=t.ads)||void 0===_?void 0:_[i],adIndex:i};E({adsData:S}),Re(o,S)}catch(e){console.error("Error when calling ads callback:",e)}}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},L=function(e,t,n,o){null==n||n.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(t){console.warn("Beacon failed:",e,t)})})},D=function(e){var t=Math.floor(e/60),n=Math.floor(e%60);return"".concat(t,":").concat(n.toString().padStart(2,"0"))},je.set(i),p=ke.get(),(g=r.getPlayer(o)).one("loadeddata",function(){p&&S(p)}),I=new Map,w=new Map,E=-1,T=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,h=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,y=(null==g||null===(s=g.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,_=(null==g||null===(m=g.el())||void 0===m||null===(f=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,S=function(){var e=t(n.mark(function e(t){var l,a,d,s,c,v,m,f,p,g,S,F,L,P,R,V,x;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return L=function(e){document.removeEventListener("pointermove",F),document.removeEventListener("pointerup",L),0===e.button&&g()},F=function(e){},S=function(){var e,t=m.currentTime(),n=null,o=We(v);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));t>=r&&t<=a&&(n=a,I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==n&&(console.log("Seeking to end of the ad pod:",n),setTimeout(function(){m.currentTime(n+2.2)},100))},g=function(){var e,t=m.currentTime(),n=null,o=We(v);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&&(t>d||t>r)&&!I.has(r)||t>=r&&t<=d)&&(n=r,I.set(r,!0),w.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==n&&(console.log("Seeking back to ad pod:",n),setTimeout(function(){m.currentTime(n+.4)},100))},a=!1,e.next=7,fetch(t);case 7:return d=e.sent,e.next=10,d.json();case 10:s=e.sent,c=s.avails,v=[],m=r.getPlayer(o),f=m.controlBar.progressControl,p=f.seekBar.el(),c.map(function(e,t){var n,o,i;0==t&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(n=e.ads)||void 0===n?void 0:n.length)>0&&(a=!0),v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(i=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===i?void 0:i[0])||[]})}),!a&&i&&(m.currentTime(i),S()),null!=v&&v.length&&(window.adsQueueList=v),console.log(v,"data"),v.forEach(function(e){var t,n,o=e.markerPositionInSeconds,i=e.ads,r=m.duration();if(!(o>r||Array.isArray(i)&&0==(null==i?void 0:i.length))){var l=o/r*100,a=document.createElement("div");a.className="vjs-seekbar-marker",a.style.left="".concat(l,"%"),a.style.position="absolute",a.style.top="0",a.style.bottom="0",a.style.width="2px",a.style.backgroundColor="#fecc09",a.style.left="".concat(l,"%"),a.style.pointerEvents="none",p.appendChild(a),null!==(t=window)&&void 0!==t&&null!==(n=t.customData)&&void 0!==n&&n.disableControls&&(p.style.display="none")}}),m.on("timeupdate",r.throttle(function(){var e=m.currentTime();if(e!==E){E=e;for(var t=!1,n=function(){var n=v[o],i=n.startTimeInSeconds,r=n.durationInSeconds,l=n.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(t=!0),e>a&&I.set(i,!0),ye.disable(),T&&T.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),h&&(h.el().style.pointerEvents="none",h.el().classList.add("vjs-hidden")),y&&(y.el().style.pointerEvents="none",y.el().classList.add("vjs-hidden")),f.el().style.visibility="hidden";for(var d=e-i,s=0,c=0,m=0;m<l.length;m++){var p,g=null==l||null===(p=l[m])||void 0===p?void 0:p.durationInSeconds;if(d<s+g){c=m;break}s+=g}l[c];var E=Math.max(0,r-d),F=Math.round(E);P.style.display="block",x.textContent="".concat(c+1," of ").concat(l.length," • ").concat(D(F));var L=[];return null==l||l.forEach(function(e){var t=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});L.push.apply(L,u(t))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&L.push(null==n?void 0:n.podSlotImpressionBeacon),O(e,n,L,c,o,S),"break"}w.delete(i)},o=0;o<v.length;o++){if("break"===n())break}t||(P.style.display="none",f.el().style.visibility="visible",h&&(h.el().style.pointerEvents="auto",h.el().classList.remove("vjs-hidden")),y&&(y.el().style.pointerEvents="auto",y.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),ye.enable())}},1e3)),null===(l=document)||void 0===l||l.addEventListener("keydown",function(e){ye.enabled&&"ArrowRight"==e.key&&(g(),Ge(o,10),e.stopPropagation())}),f.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",F),document.addEventListener("pointerup",L))}),(P=document.createElement("div")).className="ssai-ad-container",(R=document.createElement("div")).className="sponsored-adbox",(V=document.createElement("div")).className="sponsored-text",V.textContent="Sponsored Ad",R.append(V),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",P.append(R),P.append(x),m.el().appendChild(P);case 40:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),F=new Map;case 18:case"end":return e.stop()}},e)})),Ue.apply(this,arguments)}function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}var Ge=function(e,t){var n=o(e),i=n.currentTime()+t;n.currentTime(i)},ze=function(e,t){var n=o(e),i=n.currentTime(),r=i<=t?0:i-t;n.currentTime(r)},qe=function(e){return!!o.getPlayer("".concat(e))},Ye=function(){var e=t(n.mark(function e(t,o){var i,l,a,d=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>2&&void 0!==d[2]&&d[2],e.next=3,A();case 3:return l=e.sent,a=r.getPlayer(t),e.abrupt("return",new Promise(function(e,n){T(o,l).then(function(n){var r=null==n?void 0:n.data;window.sid=X(),r.contentType="linearchannel",r.channelId=null==o?void 0:o.channelId;var l=ve(r,t);j(r),l&&i?(Ke(t,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){n({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Qe=function(){var e=t(n.mark(function e(o,i){var l,a,d,u,c,v,m=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=m.length>2&&void 0!==m[2]?m[2]:null){e.next=5;break}return e.next=4,A();case 4:u=e.sent;case 5:return(M()||null)&&U(i),c=0,v=0,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(d=a.watchHistory)&&void 0!==d&&d.enable&&y(i,u).then(function(e){var t,n,o,i,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,v=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.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){E(i,u).then(function(){var i=t(n.mark(function t(i){var a,d,u,m,f,p,g,I,w,E,T,h,y,b,_,S,D,F,L,O,P,R,V,x,W,C,A,k,N,M;return n.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(I=null==i?void 0:i.data,w=(null==I?void 0:I.contentType)||"video",E=(null==I||null===(a=I[w])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(m=u.appcmsMain)||void 0===m||null===(f=m.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,T=(null==I||null===(p=I.video)||void 0===p||null===(g=p.streamingInfo)||void 0===g?void 0:g.isLiveStream)||!1,j(i.data),(h=ce(I))&&Te(o,h,I),y=ve(I,o),!E){t.next=12;break}return t.next=11,Ne(o,I);case 11:y=t.sent;case 12:y?(x=(null==I||null===(b=I.video)||void 0===b||null===(_=b.gist)||void 0===_?void 0:_.videoImageUrl)||(null==I||null===(S=I.video)||void 0===S||null===(D=S.gist)||void 0===D||null===(F=D.imageGist)||void 0===F?void 0:F.r16x9),(W=r.getPlayer(o)).poster(x),Ke(o,y),W.on("loadstart",function(){T&&e({status:!0,msg:"Video Loaded",response:I})}),W.on("loadeddata",function(){we(),e({status:!0,msg:"Video Loaded",response:I})}),W.one("play",function(){c&&v<95&&setTimeout(function(){W.currentTime(c)},0)}),W.one("error",function(){var e;l({status:!1,msg:(null==W||null===(e=W.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==I||null===(L=I.video)||void 0===L||null===(O=L.contentDetails)||void 0===O||null===(P=O.closedCaptions)||void 0===P?void 0:P.length)>0||(null==I||null===(R=I.video)||void 0===R||null===(V=R.closedCaptions)||void 0===V?void 0:V.length)>0?(M=(null==I||null===(A=I.video)||void 0===A||null===(k=A.contentDetails)||void 0===k?void 0:k.closedCaptions)||(null==I||null===(N=I.video)||void 0===N?void 0:N.closedCaptions),C=M.filter(function(e){return"VTT"===e.format}),s.addCaptions(o,C)):s.removeCaptions(o)):(Ie(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 t.stop()}},t)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){Je(e,o,l,i)})}));case 11:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Xe=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()},Ke=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},Je=function(t,n,o,i){var r,l,a,d,s,u,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);qe(n)&&Ie(n,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?He(Object(o),!0).forEach(function(n){e(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):He(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}({status:!1,response:t,msg:"".concat(v)},i&&{videoId:i}))};exports.authenticateLC=Ye,exports.baseUrlManager=_,exports.clearError=we,exports.createIdxMapping=function(e){R=new Map,e.map(function(e,t){R.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;b({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),V=n}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var o=t.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=t.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var t=r.getPlayer(e);if(Xe(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getAdsURL=ce,exports.getCurrentSeries=M,exports.getCurrentVideo=N,exports.getDecodedToken=k,exports.getEntitlementData=function(e,t,n,o){return i({url:n,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:t},withCredentials:!0})},exports.getEpisodeNumber=ne,exports.getLinearChannelDetails=T,exports.getSGAIEnabledSource=Ne,exports.getSeasonNumber=te,exports.getSeriesDetails=function(e,t){var n,o,r=k(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.seriesData})}):i({url:_.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=b,exports.getSeriesWatchMap=function(){return V},exports.getSource=ve,exports.getSsaiEvents=function(e){var t=r.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var n=function(e,n){var o=function(e,t){return n(t)};return t.on(e,o),function(){return t.off(e,o)}};return{adBreakStart:function(e){return n(be,e)},adImpression:function(e){return n(_e,e)},adFirstQuartile:function(e){return n(Se,e)},adMidpoint:function(e){return n(De,e)},adThirdQuartile:function(e){return n(Fe,e)},adComplete:function(e){return n(Le,e)},adBreakEnd:function(e){return n(Oe,e)}}},exports.getToken=A,exports.getUpdatedClusterSource=function(e,t){var n=e.src,o=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:o};t=t.replace(/\/$/,"");var i=n.split(".com")[1]||"";return{src:i?"".concat(t).concat(i):n,type:o}},exports.getUserId=K,exports.getVideoDetails=E,exports.getVideoIdx=function(){return P},exports.getVideoInfo=y,exports.handleError=Ie,exports.initialiseAdvertisement=Te,exports.initialiseKeyboardEvents=function(e,t){var n,o,i,l=r.getPlayer(e),a=null==l||null===(n=l.controlBar)||void 0===n||null===(o=n.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(n){var o,i,r,s,u,c,v,m,f;if(ye.enabled&&"input"!=n.target.localName){var p=n.key,g=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(n.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===t.liveui||ze(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(f=m.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||Ge(e,10)}}},!0)},exports.initiateErrorHandling=Je,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}},exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=qe,exports.isTokenExpired=S,exports.load=Qe,exports.loadVideo=Ke,exports.loadVideoInstantly=function(e,t,n){var o=r.getPlayer(e);return o.src(t),new Promise(function(e,t){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=F,exports.rewind=ze,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],v("js",new Date),v("config",e)},exports.saveWatchHistory=h,exports.seasonIdxManager=H,exports.setCurrentSeries=function(e){L=e},exports.setCurrentVideo=j,exports.setVideoIdx=B,exports.setVideoIdxById=U,exports.setupAdvertisementMarkers=function(e,t){return Ue.apply(this,arguments)},exports.skip=Ge,exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return n&&!o&&(t=!1),t};
@@ -0,0 +1 @@
1
+ "use strict";exports.BackIcon=function(){return'<svg width="13" height="13" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6169 0.418212C11.0883 0.933084 11.1247 1.74341 10.726 2.30391L10.6173 2.43852L3.69866 10.0029L10.6169 17.5611C11.0883 18.0759 11.1247 18.8863 10.726 19.4468L10.6173 19.5814C10.1461 20.0965 9.40458 20.1362 8.89165 19.7006L8.76847 19.5818L0 10.0039L8.76809 0.418626C9.27852 -0.13938 10.1063 -0.139565 10.6169 0.418212Z" fill="white"/>\n </svg>\n '},exports.BroadcastIcon=function(){return'<svg width="22" height="20" viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.01316 12.1667L0.25 10.5V15.5L3.01316 14.25V18H15.25V8H3.01316V12.1667ZM7.67057 10.7216C7.53806 10.6283 7.35547 10.7231 7.35547 10.8852V15.1146C7.35547 15.2766 7.53806 15.3714 7.67057 15.2781L10.6757 13.1634C10.7889 13.0838 10.7889 12.916 10.6757 12.8363L7.67057 10.7216Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.25 2H20.25H21.25V3V10H20.25V3H7.25V2ZM17.25 5H4.25V6H17.25V13H18.25V6V5H17.25Z" fill="white"/>\n </svg>\n '},exports.CaptionsSvgV2=function(){return'<svg width="21" height="18" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.4541 15.8369V2H0.454102V15.8369H11.992L17.7874 18V15.8369H20.4541ZM2.4541 4H18.4541V13.8614H15.9182L15.9179 15L11.9664 13.8614H2.4541V4Z" fill="white"/>\n <rect x="3.4541" y="6" width="9" height="2" fill="white"/>\n <rect x="14.4541" y="6" width="3" height="2" fill="white"/>\n <rect x="8.4541" y="10" width="9" height="2" fill="white"/>\n <rect x="3.4541" y="10" width="3" height="2" fill="white"/>\n </svg>\n '},exports.EpisodesSvg=function(){return'<svg class=\'icon icon-episodes\' width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1 11.7368C1 11.3299 1.32989 11 1.73684 11H16.2632C16.6701 11 17 11.3299 17 11.7368V21.2632C17 21.6701 16.6701 22 16.2632 22H1.73684C1.3299 22 1 21.6701 1 21.2632V11.7368Z" fill="white"/>\n <path d="M5 8H19.2632C19.6701 8 20 8.3299 20 8.73684V18" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M8 4H22.2632C22.6701 4 23 4.3299 23 4.73684V13" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},exports.MaximizeSvg=function(n){return"<svg fill='".concat(n||"white","'\n class='icon icon-maximize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(n||"white","' d='M43.369 45.938h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.004 9.004z' />\n <path fill='").concat(n||"white","' d='M21.969 18.834h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.003-9.003z' />\n </svg>")},exports.MinimizeSvg=function(n){return"<svg fill='".concat(n||"white","'\n class='icon icon-minimize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(n||"white","' d='M40.397 37.511h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.004-9.004z' />\n <path fill='").concat(n||"white","' d='M24.443 26.763h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.003 9.004z' />\n </svg>")},exports.NewCaptionsSvg=function(){return'<svg width="18" height="16" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M5 6.5H10M5 10H13M7.68375 16H14.2C15.8802 16 16.7202 16 17.362 15.673C17.9265 15.3854 18.3854 14.9265 18.673 14.362C19 13.7202 19 12.8802 19 11.2V5.8C19 4.11984 19 3.27976 18.673 2.63803C18.3854 2.07354 17.9265 1.6146 17.362 1.32698C16.7202 1 15.8802 1 14.2 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V18.3355C1 18.8684 1 19.1348 1.10923 19.2716C1.20422 19.3906 1.34827 19.4599 1.50054 19.4597C1.67563 19.4595 1.88367 19.2931 2.29976 18.9602L4.68521 17.0518C5.17252 16.662 5.41617 16.4671 5.68749 16.3285C5.9282 16.2055 6.18443 16.1156 6.44921 16.0613C6.74767 16 7.0597 16 7.68375 16Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},exports.PlayNextEpisodeSvg=function(n){return'<svg className=\'icon-play-next\' width="16" height="16" viewBox="0 0 25 25" fill='.concat(n,' xmlns="http://www.w3.org/2000/svg">\n <path d="M14.8837 9.99984L0 0V20L14.8837 9.99984Z" fill=').concat(n,' />\n <rect x="18" width="2" height="20" fill=').concat(n," />\n </svg>")},exports.PlaylistIcon=function(){return'<svg version="1.0" xmlns="http://www.w3.org/2000/svg"\n width="17" height="17" viewBox="0 0 512.000000 512.000000"\n preserveAspectRatio="xMidYMid meet">\n \n <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"\n fill="white" stroke="none">\n <path d="M340 4674 c-46 -20 -77 -50 -103 -99 -22 -40 -22 -45 -25 -754 -3\n -813 -5 -788 72 -859 69 -64 158 -77 238 -36 17 9 232 177 478 374 492 394\n 490 392 490 499 0 60 -23 112 -72 158 -62 60 -863 695 -900 714 -45 23 -128\n 25 -178 3z"/>\n <path d="M2045 4673 c-164 -86 -166 -300 -3 -384 37 -19 73 -19 1382 -17\n l1344 3 44 30 c138 97 118 306 -34 370 -33 13 -189 15 -1370 15 -1195 -1\n -1336 -2 -1363 -17z"/>\n <path d="M2045 3393 c-164 -86 -166 -300 -3 -384 37 -19 73 -19 1382 -17\n l1344 3 44 30 c138 97 118 306 -34 370 -33 13 -189 15 -1370 15 -1195 -1\n -1336 -2 -1363 -17z"/>\n <path d="M340 2114 c-173 -75 -161 -342 18 -394 26 -8 692 -10 2224 -8 l2186\n 3 44 30 c138 97 118 306 -34 370 -33 13 -272 15 -2220 15 -1927 -1 -2187 -3\n -2218 -16z"/>\n <path d="M340 834 c-173 -75 -161 -342 18 -394 26 -8 692 -10 2224 -8 l2186 3\n 44 30 c138 97 118 306 -34 370 -33 13 -272 15 -2220 15 -1927 -1 -2187 -3\n -2218 -16z"/>\n </g>\n </svg>'},exports.RewindSvg=function(n){return'<svg style="width:16px" class=\'rewindbtn\' viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.88817 16.9913L7.72176 18.5762C9.58746 18.8613 11.4677 18.5376 13.1023 17.6161C17.1941 15.3094 18.4803 9.98978 15.9732 5.74243C13.47 1.50156 8.13865 -0.0590307 4.03665 2.25351C3.35173 2.64307 2.7379 3.12124 2.20384 3.67698L3.34087 4.82569C3.77642 4.37247 4.27773 3.98196 4.83679 3.66398C8.20452 1.76539 12.5901 3.04913 14.644 6.5288C16.6894 9.99402 15.6429 14.3223 12.3046 16.2043C10.9636 16.9602 9.42195 17.2257 7.88817 16.9913Z" fill=\''.concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.10742 0.462205L0.56205 5.24366L6.06202 5.79492L3.10742 0.462205Z" fill=\'').concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.80172 14.1769C10.1682 14.1769 10.5096 14.1082 10.8258 13.9708C11.142 13.8333 11.416 13.6241 11.6479 13.343C11.8798 13.0619 12.0615 12.7059 12.1928 12.275C12.3242 11.8441 12.3898 11.3368 12.3898 10.753C12.3898 10.1661 12.3242 9.65803 12.1928 9.22868C12.0615 8.79934 11.8798 8.44413 11.6479 8.16305C11.416 7.88197 11.142 7.6727 10.8258 7.53525C10.5096 7.3978 10.1682 7.32907 9.80172 7.32907C9.43524 7.32907 9.09551 7.3978 8.78254 7.53525C8.46956 7.6727 8.19794 7.88197 7.96767 8.16305C7.7374 8.44413 7.5574 8.79934 7.42767 9.22868C7.29794 9.65803 7.23308 10.1661 7.23308 10.753C7.23308 11.3368 7.29794 11.8441 7.42767 12.275C7.5574 12.7059 7.7374 13.0619 7.96767 13.343C8.19794 13.6241 8.46956 13.8333 8.78254 13.9708C9.09551 14.1082 9.43524 14.1769 9.80172 14.1769ZM6.54713 14.1028V13.2457H5.28226V7.39394H4.2947L2.14929 9.13139L2.52875 9.62714C2.5547 9.66112 2.59443 9.69123 2.64794 9.71749C2.70145 9.74374 2.76064 9.75687 2.82551 9.75687C2.86767 9.75687 2.91064 9.75069 2.95443 9.73834C2.99821 9.72598 3.04118 9.70282 3.08335 9.66884L4.09524 8.86266C4.08551 9.02946 4.08064 9.18853 4.08064 9.33988V13.2457H2.65524V14.1028H6.54713ZM9.30308 13.1136C9.46362 13.1893 9.62983 13.2271 9.80172 13.2271C9.97686 13.2271 10.1455 13.1893 10.3077 13.1136C10.4698 13.038 10.6133 12.9059 10.7382 12.7175C10.8631 12.5291 10.9628 12.2758 11.0374 11.9576C11.112 11.6395 11.1493 11.238 11.1493 10.753C11.1493 10.2681 11.112 9.86652 11.0374 9.54838C10.9628 9.23023 10.8631 8.97695 10.7382 8.78853C10.6133 8.60011 10.4698 8.46807 10.3077 8.39239C10.1455 8.31672 9.97686 8.27888 9.80172 8.27888C9.62983 8.27888 9.46362 8.31672 9.30308 8.39239C9.14254 8.46807 9.00064 8.60011 8.8774 8.78853C8.75416 8.97695 8.65605 9.23023 8.58308 9.54838C8.5101 9.86652 8.47362 10.2681 8.47362 10.753C8.47362 11.238 8.5101 11.6395 8.58308 11.9576C8.65605 12.2758 8.75416 12.5291 8.8774 12.7175C9.00064 12.9059 9.14254 13.038 9.30308 13.1136Z" fill=\'').concat(window.color||"white","' />\n </svg>")},exports.RewindSvgV2=function(){return'<svg class=\'rewindbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.22363 9.43675L3.152 11.3434L5.08151 9.43675M2.91616 10.8667C2.88115 10.5537 2.86319 10.2356 2.86319 9.91341C2.86319 5.17486 6.74945 1.3335 11.5434 1.3335C16.3374 1.3335 20.2236 5.17486 20.2236 9.91341C20.2236 14.652 16.3374 18.4933 11.5434 18.4933C8.8166 18.4933 6.38346 17.2505 4.79212 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M9.92694 13.0831V6.80067H8.94318C8.58633 7.20106 7.97871 7.53473 7.37109 7.64912V8.66918C7.68937 8.64058 8.22947 8.52618 8.51881 8.39272V13.0831H9.92694Z" fill="white"/>\n <path d="M13.6545 6.6958C11.8316 6.6958 11.1951 8.23065 11.1951 9.94664C11.1951 11.6817 11.7641 13.1975 13.6255 13.1975C15.5159 13.1975 16.0656 11.634 16.0656 9.9085C16.0656 8.12579 15.4291 6.6958 13.6545 6.6958ZM13.6545 7.78259C14.4839 7.78259 14.6382 8.69778 14.6382 9.91804C14.6382 11.1478 14.5225 12.1107 13.6448 12.1107C12.7479 12.1107 12.6128 11.0811 12.6128 9.92757C12.6128 8.57385 12.8443 7.78259 13.6545 7.78259Z" fill="white"/>\n </svg>'},exports.RewindSvgV3=function(){return'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11.3206 14.3155C11.1375 14.0052 10.8796 13.7456 10.5704 13.5604C10.2613 13.3753 9.91067 13.2705 9.55061 13.2555C9.19055 13.2705 8.83996 13.3753 8.5308 13.5604C8.22163 13.7456 7.96373 14.0052 7.78061 14.3155C7.35864 15.014 7.1356 15.8145 7.1356 16.6305C7.1356 17.4466 7.35864 18.2471 7.78061 18.9455C7.96373 19.2559 8.22163 19.5155 8.5308 19.7007C8.83996 19.8858 9.19055 19.9906 9.55061 20.0055C9.91067 19.9906 10.2613 19.8858 10.5704 19.7007C10.8796 19.5155 11.1375 19.2559 11.3206 18.9455C11.7426 18.2471 11.9656 17.4466 11.9656 16.6305C11.9656 15.8145 11.7426 15.014 11.3206 14.3155V14.3155ZM9.55061 19.0355C8.77061 19.0355 8.11061 17.9355 8.11061 16.6255C8.11061 15.3155 8.77061 14.2155 9.55061 14.2155C10.3306 14.2155 10.9906 15.3155 10.9906 16.6255C10.9906 17.9355 10.3406 19.0355 9.55061 19.0355V19.0355ZM5.21061 20.0055V14.9055L4.73061 15.3855L4.05061 14.7055L5.35061 13.4055C5.41774 13.3382 5.50338 13.2923 5.59664 13.2737C5.68991 13.255 5.78661 13.2645 5.87446 13.301C5.96231 13.3374 6.03737 13.3991 6.09009 13.4783C6.14282 13.5574 6.17084 13.6504 6.17061 13.7455V20.0155L5.21061 20.0055V20.0055ZM21.4106 6.98555V19.5155C21.4089 19.6423 21.3577 19.7634 21.2681 19.853C21.1785 19.9427 21.0574 19.9938 20.9306 19.9955H14.6606V18.0655H19.4806V8.42555H7.91061V10.3555C7.91061 10.8855 7.55061 11.0755 7.11061 10.7855L2.93061 7.99555C2.78952 7.92442 2.68211 7.80061 2.63158 7.65091C2.58105 7.5012 2.59148 7.33762 2.66061 7.19555C2.71811 7.07805 2.81311 6.98305 2.93061 6.92555L7.11061 4.13555C7.55061 3.84555 7.91061 4.03555 7.91061 4.56555V6.49555H20.9206C21.05 6.49746 21.1735 6.54969 21.265 6.64118C21.3565 6.73266 21.4087 6.85618 21.4106 6.98555V6.98555Z" fill="white"/>\n </svg>'},exports.SelectedStream=function(){return'<svg class=\'selected-stream\' width="25" height="25" viewBox="0 0 35 33" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_319_60943)">\n <path d="M0 0H35V33H0V0Z" fill="#D2393B"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M15.8689 17.6541L22.3039 11.2898C22.6966 10.9014 23.3372 10.9054 23.7299 11.2937C24.1225 11.6821 24.1265 12.3157 23.7338 12.704L16.6345 19.7253C16.6189 19.743 16.6026 19.7604 16.5856 19.7772C16.5158 19.8463 16.4381 19.9032 16.3554 19.9479C15.9716 20.1587 15.4758 20.1009 15.1503 19.779C15.126 19.755 15.1032 19.73 15.0819 19.7042L12.2919 16.9449C11.8992 16.5565 11.9032 15.9229 12.2958 15.5346C12.6885 15.1462 13.3291 15.1423 13.7218 15.5306L15.8689 17.6541Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_319_60943">\n <path d="M0 0H35V33H8C3.58172 33 0 29.4183 0 25V0Z" fill="white"/>\n </clipPath>\n </defs>\n </svg>\n '},exports.SettingsSvg=function(){return'<svg width="16" height="16" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11 14C12.6569 14 14 12.6569 14 11C14 9.34315 12.6569 8 11 8C9.34315 8 8 9.34315 8 11C8 12.6569 9.34315 14 11 14Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M17.7273 13.7273C17.6063 14.0015 17.5702 14.3056 17.6236 14.6005C17.6771 14.8954 17.8177 15.1676 18.0273 15.3818L18.0818 15.4364C18.2509 15.6052 18.385 15.8057 18.4765 16.0265C18.568 16.2472 18.6151 16.4838 18.6151 16.7227C18.6151 16.9617 18.568 17.1983 18.4765 17.419C18.385 17.6397 18.2509 17.8402 18.0818 18.0091C17.913 18.1781 17.7124 18.3122 17.4917 18.4037C17.271 18.4952 17.0344 18.5423 16.7955 18.5423C16.5565 18.5423 16.3199 18.4952 16.0992 18.4037C15.8785 18.3122 15.678 18.1781 15.5091 18.0091L15.4545 17.9545C15.2403 17.745 14.9682 17.6044 14.6733 17.5509C14.3784 17.4974 14.0742 17.5335 13.8 17.6545C13.5311 17.7698 13.3018 17.9611 13.1403 18.205C12.9788 18.4489 12.8921 18.7347 12.8909 19.0273V19.1818C12.8909 19.664 12.6994 20.1265 12.3584 20.4675C12.0174 20.8084 11.5549 21 11.0727 21C10.5905 21 10.1281 20.8084 9.78708 20.4675C9.4461 20.1265 9.25455 19.664 9.25455 19.1818V19.1C9.24751 18.7991 9.15011 18.5073 8.97501 18.2625C8.79991 18.0176 8.55521 17.8312 8.27273 17.7273C7.99853 17.6063 7.69437 17.5702 7.39947 17.6236C7.10456 17.6771 6.83244 17.8177 6.61818 18.0273L6.56364 18.0818C6.39478 18.2509 6.19425 18.385 5.97353 18.4765C5.7528 18.568 5.51621 18.6151 5.27727 18.6151C5.03834 18.6151 4.80174 18.568 4.58102 18.4765C4.36029 18.385 4.15977 18.2509 3.99091 18.0818C3.82186 17.913 3.68775 17.7124 3.59626 17.4917C3.50476 17.271 3.45766 17.0344 3.45766 16.7955C3.45766 16.5565 3.50476 16.3199 3.59626 16.0992C3.68775 15.8785 3.82186 15.678 3.99091 15.5091L4.04545 15.4545C4.25503 15.2403 4.39562 14.9682 4.4491 14.6733C4.50257 14.3784 4.46647 14.0742 4.34545 13.8C4.23022 13.5311 4.03887 13.3018 3.79497 13.1403C3.55107 12.9788 3.26526 12.8921 2.97273 12.8909H2.81818C2.33597 12.8909 1.87351 12.6994 1.53253 12.3584C1.19156 12.0174 1 11.5549 1 11.0727C1 10.5905 1.19156 10.1281 1.53253 9.78708C1.87351 9.4461 2.33597 9.25455 2.81818 9.25455H2.9C3.2009 9.24751 3.49273 9.15011 3.73754 8.97501C3.98236 8.79991 4.16883 8.55521 4.27273 8.27273C4.39374 7.99853 4.42984 7.69437 4.37637 7.39947C4.3229 7.10456 4.18231 6.83244 3.97273 6.61818L3.91818 6.56364C3.74913 6.39478 3.61503 6.19425 3.52353 5.97353C3.43203 5.7528 3.38493 5.51621 3.38493 5.27727C3.38493 5.03834 3.43203 4.80174 3.52353 4.58102C3.61503 4.36029 3.74913 4.15977 3.91818 3.99091C4.08704 3.82186 4.28757 3.68775 4.50829 3.59626C4.72901 3.50476 4.96561 3.45766 5.20455 3.45766C5.44348 3.45766 5.68008 3.50476 5.9008 3.59626C6.12152 3.68775 6.32205 3.82186 6.49091 3.99091L6.54545 4.04545C6.75971 4.25503 7.03183 4.39562 7.32674 4.4491C7.62164 4.50257 7.9258 4.46647 8.2 4.34545H8.27273C8.54161 4.23022 8.77093 4.03887 8.93245 3.79497C9.09397 3.55107 9.18065 3.26526 9.18182 2.97273V2.81818C9.18182 2.33597 9.37338 1.87351 9.71435 1.53253C10.0553 1.19156 10.5178 1 11 1C11.4822 1 11.9447 1.19156 12.2856 1.53253C12.6266 1.87351 12.8182 2.33597 12.8182 2.81818V2.9C12.8193 3.19253 12.906 3.47834 13.0676 3.72224C13.2291 3.96614 13.4584 4.15749 13.7273 4.27273C14.0015 4.39374 14.3056 4.42984 14.6005 4.37637C14.8954 4.3229 15.1676 4.18231 15.3818 3.97273L15.4364 3.91818C15.6052 3.74913 15.8057 3.61503 16.0265 3.52353C16.2472 3.43203 16.4838 3.38493 16.7227 3.38493C16.9617 3.38493 17.1983 3.43203 17.419 3.52353C17.6397 3.61503 17.8402 3.74913 18.0091 3.91818C18.1781 4.08704 18.3122 4.28757 18.4037 4.50829C18.4952 4.72901 18.5423 4.96561 18.5423 5.20455C18.5423 5.44348 18.4952 5.68008 18.4037 5.9008C18.3122 6.12152 18.1781 6.32205 18.0091 6.49091L17.9545 6.54545C17.745 6.75971 17.6044 7.03183 17.5509 7.32674C17.4974 7.62164 17.5335 7.9258 17.6545 8.2V8.27273C17.7698 8.54161 17.9611 8.77093 18.205 8.93245C18.4489 9.09397 18.7347 9.18065 19.0273 9.18182H19.1818C19.664 9.18182 20.1265 9.37338 20.4675 9.71435C20.8084 10.0553 21 10.5178 21 11C21 11.4822 20.8084 11.9447 20.4675 12.2856C20.1265 12.6266 19.664 12.8182 19.1818 12.8182H19.1C18.8075 12.8193 18.5217 12.906 18.2778 13.0676C18.0339 13.2291 17.8425 13.4584 17.7273 13.7273Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},exports.SettingsSvgV2=function(){return'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.7275 8.7189V11.2811L18.0174 11.7913C17.8497 12.5312 17.558 13.2374 17.1546 13.88L18.71 16.1626L16.8874 17.9721L14.6149 16.43C13.9694 16.8283 13.2636 17.1194 12.5249 17.2919L12.0143 20H9.43828L8.92846 17.2919C8.18971 17.1194 7.48385 16.8284 6.8384 16.43L4.56591 17.9721L2.74302 16.1626L4.28649 13.88C3.88787 13.2349 3.5965 12.5296 3.42371 11.7913L0.727539 11.2811V8.7189L3.42371 8.1968C3.59774 7.4568 3.89356 6.75083 4.29909 6.10771L2.74337 3.837L4.56626 2.02785L6.83875 3.57C7.48173 3.16673 8.18841 2.8752 8.92881 2.70777L9.43863 0H12.0147L12.5252 2.70777C13.2656 2.87529 13.9723 3.16682 14.6153 3.57L16.8878 2.02785L18.7103 3.837L17.1549 6.11996C17.5582 6.75838 17.85 7.46066 18.0177 8.1968L20.7275 8.7189ZM5.19864 10.0057C5.2018 13.0538 7.67684 15.5222 10.7268 15.5191C12.1916 15.5176 13.5957 14.9347 14.6304 13.8985C15.665 12.8624 16.2454 11.4579 16.2438 9.99405C16.2405 6.94597 13.7654 4.47766 10.7154 4.48088C7.6654 4.4841 5.19548 6.95764 5.19864 10.0057Z" fill="white"/>\n </svg>'},exports.SkipSvg=function(n){return'<svg style="width:16px" class=\'skipbtn\' viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.99586 16.9937L10.1623 18.5786C8.29657 18.8638 6.41631 18.54 4.78178 17.6185C0.689955 15.3118 -0.596286 9.9922 1.9108 5.74486C4.41407 1.50398 9.74539 -0.0566045 13.8474 2.25594C14.5323 2.64549 15.1461 3.12366 15.6802 3.6794L14.5432 4.82812C14.1076 4.3749 13.6063 3.98438 13.0472 3.66641C9.67952 1.76782 5.29397 3.05156 3.24002 6.53123C1.1946 9.99645 2.24115 14.3247 5.57947 16.2067C6.92039 16.9626 8.46208 17.2281 9.99586 16.9937Z" fill=\''.concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.7766 0.464616L17.322 5.24607L11.822 5.79733L14.7766 0.464616Z" fill=\'').concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M13.0245 14.115C13.391 14.115 13.7323 14.0463 14.0486 13.9088C14.3648 13.7714 14.6388 13.5621 14.8707 13.281C15.1026 13 15.2842 12.644 15.4156 12.2131C15.5469 11.7822 15.6126 11.2749 15.6126 10.6911C15.6126 10.1042 15.5469 9.59609 15.4156 9.16675C15.2842 8.73741 15.1026 8.38219 14.8707 8.10111C14.6388 7.82003 14.3648 7.61076 14.0486 7.47331C13.7323 7.33586 13.391 7.26714 13.0245 7.26714C12.658 7.26714 12.3183 7.33586 12.0053 7.47331C11.6923 7.61076 11.4207 7.82003 11.1904 8.10111C10.9602 8.38219 10.7802 8.73741 10.6504 9.16675C10.5207 9.59609 10.4559 10.1042 10.4559 10.6911C10.4559 11.2749 10.5207 11.7822 10.6504 12.2131C10.7802 12.644 10.9602 13 11.1904 13.281C11.4207 13.5621 11.6923 13.7714 12.0053 13.9088C12.3183 14.0463 12.658 14.115 13.0245 14.115ZM9.76991 14.0409V13.1837H8.50504V7.332H7.51748L5.37207 9.06945L5.75153 9.56521C5.77748 9.59918 5.81721 9.6293 5.87072 9.65555C5.92423 9.68181 5.98342 9.69493 6.04829 9.69493C6.09045 9.69493 6.13342 9.68876 6.17721 9.6764C6.22099 9.66405 6.26396 9.64088 6.30612 9.6069L7.31802 8.80073C7.30829 8.96752 7.30342 9.1266 7.30342 9.27795V13.1837H5.87802V14.0409H9.76991ZM12.5259 13.0517C12.6864 13.1274 12.8526 13.1652 13.0245 13.1652C13.1996 13.1652 13.3683 13.1274 13.5304 13.0517C13.6926 12.976 13.8361 12.844 13.961 12.6556C14.0859 12.4671 14.1856 12.2139 14.2602 11.8957C14.3348 11.5776 14.3721 11.176 14.3721 10.6911C14.3721 10.2061 14.3348 9.80459 14.2602 9.48644C14.1856 9.16829 14.0859 8.91501 13.961 8.7266C13.8361 8.53818 13.6926 8.40613 13.5304 8.33046C13.3683 8.25478 13.1996 8.21694 13.0245 8.21694C12.8526 8.21694 12.6864 8.25478 12.5259 8.33046C12.3653 8.40613 12.2234 8.53818 12.1002 8.7266C11.9769 8.91501 11.8788 9.16829 11.8059 9.48644C11.7329 9.80459 11.6964 10.2061 11.6964 10.6911C11.6964 11.176 11.7329 11.5776 11.8059 11.8957C11.8788 12.2139 11.9769 12.4671 12.1002 12.6556C12.2234 12.844 12.3653 12.976 12.5259 13.0517Z" fill=\'').concat(window.color?window.color:"white","' />\n </svg>")},exports.SkipSvgV2=function(){return'<svg class=\'skipbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M19.7236 9.43675L17.7953 11.3434L15.8658 9.43675M18.0311 10.8667C18.0661 10.5537 18.0841 10.2356 18.0841 9.91341C18.0841 5.17486 14.1978 1.3335 9.40386 1.3335C4.6099 1.3335 0.723633 5.17486 0.723633 9.91341C0.723633 14.652 4.6099 18.4933 9.40386 18.4933C12.1307 18.4933 14.5638 17.2505 16.1551 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M7.80584 13.0831V6.80067H6.82209C6.46523 7.20106 5.85762 7.53473 5.25 7.64912V8.66918C5.56828 8.64058 6.10838 8.52618 6.39772 8.39272V13.0831H7.80584Z" fill="white"/>\n <path d="M11.5334 6.6958C9.71052 6.6958 9.07397 8.23065 9.07397 9.94664C9.07397 11.6817 9.64301 13.1975 11.5044 13.1975C13.3948 13.1975 13.9445 11.634 13.9445 9.9085C13.9445 8.12579 13.308 6.6958 11.5334 6.6958ZM11.5334 7.78259C12.3628 7.78259 12.5171 8.69778 12.5171 9.91804C12.5171 11.1478 12.4014 12.1107 11.5237 12.1107C10.6268 12.1107 10.4917 11.0811 10.4917 9.92757C10.4917 8.57385 10.7232 7.78259 11.5334 7.78259Z" fill="white"/>\n </svg>'},exports.TickMarkIcon=function(){return'<svg width="28" height="28" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28">\n <path d="M21 10L11 20L7 16" stroke="white" stroke-width="2" fill="none"/>\n </svg>'},exports.crossIconSvg=function(){return'<svg width="13" height="13" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.273985 2.30391C-0.124672 1.74341 -0.0882695 0.933084 0.383092 0.418212C0.893733 -0.139565 1.72148 -0.13938 2.23191 0.418626L9.25 8.09082L16.2681 0.418626C16.7785 -0.13938 17.6063 -0.139565 18.1169 0.418212C18.5883 0.933084 18.6247 1.74341 18.226 2.30391L18.1173 2.43852L11.1987 10.0029L18.1169 17.5611C18.5883 18.0759 18.6247 18.8863 18.226 19.4468L18.1173 19.5814C17.6461 20.0965 16.9046 20.1362 16.3916 19.7006L16.2685 19.5818L9.25 11.9155L2.23153 19.5818L2.10835 19.7006C1.59542 20.1362 0.853882 20.0965 0.382714 19.5814L0.273985 19.4468C-0.124672 18.8863 -0.0882694 18.0759 0.383092 17.5611L7.30134 10.0029L0.382714 2.43852L0.273985 2.30391Z" fill="white"/>\n </svg>\n \n '};
@@ -1 +1 @@
1
- "use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),a=require("./skin-f87e1c22.js"),o=require("./generic-ba36a442.js"),l=require("./autoNextVideo-a5bd03c7.js"),u=require("./icons-0ea2e662.js"),s=require("@babel/runtime/helpers/typeof"),c=require("video.js"),d=require("@babel/runtime/helpers/asyncToGenerator"),p=require("@babel/runtime/regenerator"),v=require("@babel/runtime/helpers/defineProperty"),m=require("@babel/runtime/helpers/slicedToArray"),f=[],g=!1,h=function(e,t){var n=a.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=o.getVideoIdx();l.switchToNext(i,e,f)}};function b(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 y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===s(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},c.registerPlugin("thumbnails",function(i){var a,o,l,u,s,c,d,p,v,m;if(u=t({},e,i),c=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=c.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",s=document.createElement("img"),l.appendChild(s),s.src=u[0].src,s.className="vjs-thumbnail",t(s.style,u[0].style),s.style.left||s.style.right||(s.onload=function(){s.style.left=-s.naturalWidth/2+"px"}),p=c.duration(),c.on("durationchange",function(e){p=c.duration()}),c.on("loadedmetadata",function(e){p=c.duration()}),(d=c.controlBar.progressControl).el().appendChild(l),v=function(e){var i,a,o,c,v,m,f,g,h,b;for(a in o=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((b=r(d.el()).getBoundingClientRect()).width||b.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),c=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c-=r(d.el()).getBoundingClientRect().left+h,i=Math.floor((c-d.el().offsetLeft)/d.width()*p),u)i>a&&(o=Math.max(o,a));(v=u[o]).src&&s.src!=v.src&&(s.src=v.src),v.style&&s.style!=v.style&&t(s.style,v.style),c+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(s,v.width||u[0].width)/2)>f?c-=c+g-f:c<g&&(c=g),l.style.left=c+"px"},null!==(a=window)&&void 0!==a&&null!==(o=a.customData)&&void 0!==o&&o.isSmartTV){var f=function(){var e,t,n=0,r=(null===(e=d.el_.children[0].children[2])||void 0===e?void 0:e.offsetWidth)||5;r<65?r=5:r>=c.el().offsetWidth-180?r=c.el().offsetWidth-240:r-=58;var i=c.currentTime();for(t in u)i>t&&(n=Math.max(n,t));var a=u[n];a.uri&&""!=a.uri&&s.src!=a.uri?(s.src=a.uri,l.style.left=r+"px",s.style.opacity="1"):(l.style.left="-1000px",s.style.opacity="0")},g=null;d.el_.children[0].onfocus=function(){f(),g=setInterval(function(){f()},250)},d.el_.children[0].addEventListener("blur",function(){try{l.style.left="-1000px",s.style.opacity="0",g&&(clearInterval(g),g=null)}catch(e){}})}else d.on("mousemove",v),d.on("touchmove",v);function h(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",h),m()}d.on("pointerdown",function(e){document.addEventListener("pointermove",v),document.addEventListener("pointerup",h)}),m=function(e){l.style.left="-1000px"},d.on("mouseout",m),d.on("touchcancel",m),d.on("touchend",m),c.on("userinactive",m)});var x="my-player";function w(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function E(){return(E=d(p.mark(function e(t){var n,r,i,a,o,l,u,s,c,d,v,f,g,h,b,y,x,w,E,A,N,k,j,C;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),o=m(a,2),l=o[0],u=o[1],s=i.width/u,c=i.height/l,d=[],v=0;v<l;v++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,v*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),d.push({uri:h,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=m(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(C=j.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function A(e,t){return N.apply(this,arguments)}function N(){return(N=d(p.mark(function e(t,n){var r,i;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return x=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",w(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function k(e,t,n){var r=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),i=a.getPlayer(x);if(r&&i){var o=r.getBoundingClientRect(),l=(e.clientX-o.left)/o.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var o=Math.floor((i+a)/2),l=t[o];if(l===e)return l;l<e?i=o+1:a=o-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*i.duration()),n),s=t[u];s&&!s.loading&&(s.loading=!0,function(e){return E.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function j(e){return C.apply(this,arguments)}function C(){return(C=d(p.mark(function e(t){var n,r,i,o;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=m(r,2),a=i[0]*i[1],o=e.duration,l=0;l<a;l++){var u,s=Math.round((t*a+l)*o);n[s]=y(y({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},v(u,"left","-60px"),v(u,"border","1px solid transparent"),v(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",a.throttle(function(e){return k(e,n,r)},500)),null==(o=document.querySelector(".vjs-progress-control.vjs-control"))||o.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",a.throttle(function(e){return k(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var I=function(){var e=d(p.mark(function e(t,n){var r,i,a,o,l,u,s,c;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),o=[],l=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),n=m(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,o.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function T(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function P(e,t){return O.apply(this,arguments)}function O(){return(O=d(p.mark(function e(t,n){var r,i,l,u,s,c,d,v,f,g,h,b,y,w,E,A,N,k,j,C,I,P,O,B,M,R,q,D,$,X,V,_,F,U,W,G,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,oe,le,ue,se,ce,de,pe,ve,me;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return x=n,r=a.getPlayer(n),i=t.split("/"),l=i.findIndex(function(e){return"dash"===e.toLowerCase()}),u=T(-1!==l?i.slice(0,l+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return v=e.sent,e.next=11,v.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),b=(null==r?void 0:r.duration())||(null===(s=o.getCurrentVideo())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),y=(null==h||null===(d=h.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||u+"/",w=h.getElementsByTagName("AdaptationSet"),E=0;case 18:if(!(E<w.length)){e.next=72;break}if(("image"!==(A=w[E]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(k=A.getElementsByTagName("SegmentTemplate")[0],j=null===(N=k.getElementsByTagName("SegmentTimeline"))||void 0===N?void 0:N[0],!k||!j){e.next=48;break}if(P=j.getElementsByTagName("S"),O=parseInt(null===(C=P[0])||void 0===C?void 0:C.getAttribute("t")),B=parseInt(null===(I=P[0])||void 0===I?void 0:I.getAttribute("d")),M=A.getElementsByTagName("Representation")[0],R=M.getElementsByTagName("EssentialProperty")[0],q=R.getAttribute("value"),D=null==q?void 0:q.split("x"),$=m(D,2),X=$[0],V=$[1],!k){e.next=46;break}if(k.getAttribute("media"),_=k.getAttribute("timescale"),F=(_?B/_:B)/(X*V),U=M.getAttribute("id"),W=Math.round(b/F),G=Math.ceil(W/(X*V)),z=k.getAttribute("media"),parseInt(k.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],E=0;E<G;E++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:F,layout:q,uri:Y+Q.replace("$Time$",O+E*B).replace("$RepresentationID$",U)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=A.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=m(ee,2),ne=te[0],re=te[1],!k){e.next=69;break}if(k.getAttribute("media"),ie=k.getAttribute("duration"),ae=k.getAttribute("timescale"),oe=(ae?ie/ae:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/oe),se=Math.ceil(ue/(ne*re)),ce=k.getAttribute("media"),de=parseInt(k.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],ve=S(ce),E=0;E<se;E++)me=ve?L(ve,E+de):ce,pe.push({duration:oe,layout:Z,uri:y+me.replace("$Number$",E+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:E++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function S(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function L(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function B(){return(B=d(p.mark(function e(t){var n,r,i,o,l,u,s,c,d,v,m,f,g,h,b,y;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=a.getPlayer(t),s=u.currentSource(),c=s.src,c=null!==(n=c)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(i=r.player)||void 0===i?void 0:i.getSource():c,null===(o=c)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,A(c,t);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return v=(null==d?void 0:d[0])||null,m=v.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,I(f,m);case 12:return g=e.sent,e.next=15,j(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,P(c,t);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,j(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(g=!1,null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;f=[];var l=o.getCurrentSeries();null==l||l.map(function(e){var t;return(t=f).push.apply(t,i(e.episodes))}),null==t||null===(r=t.series)||void 0===r||r.cb}else{var s,c;f=(null==t||null===(s=t.relatedVideos)||void 0===s?void 0:s.content)||[],null==t||null===(c=t.relatedVideos)||void 0===c||c.cb}var d=a.getPlayer(e);d.on("timeupdate",function(){var e,t;if(!g){var n=Math.floor(d.currentTime()),r=d.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&o.getVideoIdx()<=(null===(t=f)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}});var p,v=f.filter(function(e,t){return t==o.getVideoIdx()});if((null==v?void 0:v.length)>0)if(null!==(p=document.getElementsByClassName("next-ep-preview"))&&void 0!==p&&p[0]){var m,b,y,x,w,E,A,N,k,j,C,I;(null===(m=document.getElementsByClassName("next-ep-preview"))||void 0===m?void 0:m[0]).style.visibility="hidden";var T=null===(b=document.getElementsByClassName("next-ep-title"))||void 0===b?void 0:b[0],P=null===(y=document.getElementsByClassName("next-ep-img"))||void 0===y?void 0:y[0],O=null===(x=document.getElementsByClassName("next-ep-content"))||void 0===x?void 0:x[0],S=null===(w=v[0])||void 0===w?void 0:w.title;(null===(E=S)||void 0===E?void 0:E.length)>60&&(S=S.substr(0,60)+"..."),T.textContent="".concat(S),P.src=(null===(A=v[0])||void 0===A||null===(N=A.gist)||void 0===N||null===(k=N.imageGist)||void 0===k?void 0:k.r16x9)||(null==v||null===(j=v[0])||void 0===j?void 0:j.img)||(null===(C=window)||void 0===C||null===(I=C.customData)||void 0===I?void 0:I.fallbackImage),O.onclick=function(){return h(e)}}else{var L,B,M,R,q,D,$,X,V=document.createElement("div");V.className="next-ep-preview",V.style.visibility="hidden",document.getElementById(e).append(V);var _=document.createElement("div");_.className="next-heading-wrapper";var F=document.createElement("div");F.className="next-ep-header",F.textContent="Next up";var U=document.createElement("div");U.className="next-ep-close",U.onclick=function(){V.style.visibility="hidden",g=!0},U.appendChild(a.parseSvgString(u.crossIconSvg())),_.append(F),_.append(U);var W=null===(L=v[0])||void 0===L?void 0:L.title,G=document.createElement("img");G.className="next-ep-img",G.src=(null===(B=v[0])||void 0===B||null===(M=B.gist)||void 0===M||null===(R=M.imageGist)||void 0===R?void 0:R.r16x9)||(null==v||null===(q=v[0])||void 0===q?void 0:q.img)||(null===(D=window)||void 0===D||null===($=D.customData)||void 0===$?void 0:$.fallbackImage);var z=document.createElement("div");z.className="next-ep-title",(null===(X=W)||void 0===X?void 0:X.length)>60&&(W=W.substr(0,60)+"..."),z.textContent="".concat(W);var H=document.createElement("div");H.className="next-ep-content",H.append(G),H.append(z),H.onclick=function(){return h(e)},V.append(_),V.append(H)}},exports.addTVProviderImage=function(e,t){var n=a.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(r),o.alt="Provider Image",i.append(o),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}},exports.initiateTrickplay=function(e){return B.apply(this,arguments)};
1
+ "use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),a=require("./skin-cd1687c7.js"),o=require("./generic-c55478de.js"),l=require("./autoNextVideo-a4480b32.js"),u=require("./icons-eb807ef0.js"),s=require("@babel/runtime/helpers/typeof"),c=require("video.js"),d=require("@babel/runtime/helpers/asyncToGenerator"),p=require("@babel/runtime/regenerator"),v=require("@babel/runtime/helpers/defineProperty"),m=require("@babel/runtime/helpers/slicedToArray"),f=[],g=!1,h=function(e,t){var n=a.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=o.getVideoIdx();l.switchToNext(i,e,f)}};function b(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 y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===s(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},c.registerPlugin("thumbnails",function(i){var a,o,l,u,s,c,d,p,v,m;if(u=t({},e,i),c=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=c.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",s=document.createElement("img"),l.appendChild(s),s.src=u[0].src,s.className="vjs-thumbnail",t(s.style,u[0].style),s.style.left||s.style.right||(s.onload=function(){s.style.left=-s.naturalWidth/2+"px"}),p=c.duration(),c.on("durationchange",function(e){p=c.duration()}),c.on("loadedmetadata",function(e){p=c.duration()}),(d=c.controlBar.progressControl).el().appendChild(l),v=function(e){var i,a,o,c,v,m,f,g,h,b;for(a in o=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((b=r(d.el()).getBoundingClientRect()).width||b.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),c=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c-=r(d.el()).getBoundingClientRect().left+h,i=Math.floor((c-d.el().offsetLeft)/d.width()*p),u)i>a&&(o=Math.max(o,a));(v=u[o]).src&&s.src!=v.src&&(s.src=v.src),v.style&&s.style!=v.style&&t(s.style,v.style),c+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(s,v.width||u[0].width)/2)>f?c-=c+g-f:c<g&&(c=g),l.style.left=c+"px"},null!==(a=window)&&void 0!==a&&null!==(o=a.customData)&&void 0!==o&&o.isSmartTV){var f=function(){var e,t,n=0,r=(null===(e=d.el_.children[0].children[2])||void 0===e?void 0:e.offsetWidth)||5;r<65?r=5:r>=c.el().offsetWidth-180?r=c.el().offsetWidth-240:r-=58;var i=c.currentTime();for(t in u)i>t&&(n=Math.max(n,t));var a=u[n];a.uri&&""!=a.uri&&s.src!=a.uri?(s.src=a.uri,l.style.left=r+"px",s.style.opacity="1"):(l.style.left="-1000px",s.style.opacity="0")},g=null;d.el_.children[0].onfocus=function(){f(),g=setInterval(function(){f()},250)},d.el_.children[0].addEventListener("blur",function(){try{l.style.left="-1000px",s.style.opacity="0",g&&(clearInterval(g),g=null)}catch(e){}})}else d.on("mousemove",v),d.on("touchmove",v);function h(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",h),m()}d.on("pointerdown",function(e){document.addEventListener("pointermove",v),document.addEventListener("pointerup",h)}),m=function(e){l.style.left="-1000px"},d.on("mouseout",m),d.on("touchcancel",m),d.on("touchend",m),c.on("userinactive",m)});var x="my-player";function w(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function E(){return(E=d(p.mark(function e(t){var n,r,i,a,o,l,u,s,c,d,v,f,g,h,b,y,x,w,E,A,N,k,j,C;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),o=m(a,2),l=o[0],u=o[1],s=i.width/u,c=i.height/l,d=[],v=0;v<l;v++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,v*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),d.push({uri:h,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=m(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(C=j.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function A(e,t){return N.apply(this,arguments)}function N(){return(N=d(p.mark(function e(t,n){var r,i;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return x=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",w(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function k(e,t,n){var r=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),i=a.getPlayer(x);if(r&&i){var o=r.getBoundingClientRect(),l=(e.clientX-o.left)/o.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var o=Math.floor((i+a)/2),l=t[o];if(l===e)return l;l<e?i=o+1:a=o-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*i.duration()),n),s=t[u];s&&!s.loading&&(s.loading=!0,function(e){return E.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function j(e){return C.apply(this,arguments)}function C(){return(C=d(p.mark(function e(t){var n,r,i,o;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=m(r,2),a=i[0]*i[1],o=e.duration,l=0;l<a;l++){var u,s=Math.round((t*a+l)*o);n[s]=y(y({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},v(u,"left","-60px"),v(u,"border","1px solid transparent"),v(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",a.throttle(function(e){return k(e,n,r)},500)),null==(o=document.querySelector(".vjs-progress-control.vjs-control"))||o.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",a.throttle(function(e){return k(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var I=function(){var e=d(p.mark(function e(t,n){var r,i,a,o,l,u,s,c;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),o=[],l=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),n=m(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,o.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function T(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function P(e,t){return O.apply(this,arguments)}function O(){return(O=d(p.mark(function e(t,n){var r,i,l,u,s,c,d,v,f,g,h,b,y,w,E,A,N,k,j,C,I,P,O,B,M,R,q,D,$,X,V,_,F,U,W,G,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,oe,le,ue,se,ce,de,pe,ve,me;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return x=n,r=a.getPlayer(n),i=t.split("/"),l=i.findIndex(function(e){return"dash"===e.toLowerCase()}),u=T(-1!==l?i.slice(0,l+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return v=e.sent,e.next=11,v.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),b=(null==r?void 0:r.duration())||(null===(s=o.getCurrentVideo())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),y=(null==h||null===(d=h.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||u+"/",w=h.getElementsByTagName("AdaptationSet"),E=0;case 18:if(!(E<w.length)){e.next=72;break}if(("image"!==(A=w[E]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(k=A.getElementsByTagName("SegmentTemplate")[0],j=null===(N=k.getElementsByTagName("SegmentTimeline"))||void 0===N?void 0:N[0],!k||!j){e.next=48;break}if(P=j.getElementsByTagName("S"),O=parseInt(null===(C=P[0])||void 0===C?void 0:C.getAttribute("t")),B=parseInt(null===(I=P[0])||void 0===I?void 0:I.getAttribute("d")),M=A.getElementsByTagName("Representation")[0],R=M.getElementsByTagName("EssentialProperty")[0],q=R.getAttribute("value"),D=null==q?void 0:q.split("x"),$=m(D,2),X=$[0],V=$[1],!k){e.next=46;break}if(k.getAttribute("media"),_=k.getAttribute("timescale"),F=(_?B/_:B)/(X*V),U=M.getAttribute("id"),W=Math.round(b/F),G=Math.ceil(W/(X*V)),z=k.getAttribute("media"),parseInt(k.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],E=0;E<G;E++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:F,layout:q,uri:Y+Q.replace("$Time$",O+E*B).replace("$RepresentationID$",U)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=A.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=m(ee,2),ne=te[0],re=te[1],!k){e.next=69;break}if(k.getAttribute("media"),ie=k.getAttribute("duration"),ae=k.getAttribute("timescale"),oe=(ae?ie/ae:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/oe),se=Math.ceil(ue/(ne*re)),ce=k.getAttribute("media"),de=parseInt(k.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],ve=S(ce),E=0;E<se;E++)me=ve?L(ve,E+de):ce,pe.push({duration:oe,layout:Z,uri:y+me.replace("$Number$",E+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:E++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function S(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function L(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function B(){return(B=d(p.mark(function e(t){var n,r,i,o,l,u,s,c,d,v,m,f,g,h,b,y;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=a.getPlayer(t),s=u.currentSource(),c=s.src,c=null!==(n=c)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(i=r.player)||void 0===i?void 0:i.getSource():c,null===(o=c)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,A(c,t);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return v=(null==d?void 0:d[0])||null,m=v.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,I(f,m);case 12:return g=e.sent,e.next=15,j(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,P(c,t);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,j(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(g=!1,null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;f=[];var l=o.getCurrentSeries();null==l||l.map(function(e){var t;return(t=f).push.apply(t,i(e.episodes))}),null==t||null===(r=t.series)||void 0===r||r.cb}else{var s,c;f=(null==t||null===(s=t.relatedVideos)||void 0===s?void 0:s.content)||[],null==t||null===(c=t.relatedVideos)||void 0===c||c.cb}var d=a.getPlayer(e);d.on("timeupdate",function(){var e,t;if(!g){var n=Math.floor(d.currentTime()),r=d.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&o.getVideoIdx()<=(null===(t=f)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}});var p,v=f.filter(function(e,t){return t==o.getVideoIdx()});if((null==v?void 0:v.length)>0)if(null!==(p=document.getElementsByClassName("next-ep-preview"))&&void 0!==p&&p[0]){var m,b,y,x,w,E,A,N,k,j,C,I;(null===(m=document.getElementsByClassName("next-ep-preview"))||void 0===m?void 0:m[0]).style.visibility="hidden";var T=null===(b=document.getElementsByClassName("next-ep-title"))||void 0===b?void 0:b[0],P=null===(y=document.getElementsByClassName("next-ep-img"))||void 0===y?void 0:y[0],O=null===(x=document.getElementsByClassName("next-ep-content"))||void 0===x?void 0:x[0],S=null===(w=v[0])||void 0===w?void 0:w.title;(null===(E=S)||void 0===E?void 0:E.length)>60&&(S=S.substr(0,60)+"..."),T.textContent="".concat(S),P.src=(null===(A=v[0])||void 0===A||null===(N=A.gist)||void 0===N||null===(k=N.imageGist)||void 0===k?void 0:k.r16x9)||(null==v||null===(j=v[0])||void 0===j?void 0:j.img)||(null===(C=window)||void 0===C||null===(I=C.customData)||void 0===I?void 0:I.fallbackImage),O.onclick=function(){return h(e)}}else{var L,B,M,R,q,D,$,X,V=document.createElement("div");V.className="next-ep-preview",V.style.visibility="hidden",document.getElementById(e).append(V);var _=document.createElement("div");_.className="next-heading-wrapper";var F=document.createElement("div");F.className="next-ep-header",F.textContent="Next up";var U=document.createElement("div");U.className="next-ep-close",U.onclick=function(){V.style.visibility="hidden",g=!0},U.appendChild(a.parseSvgString(u.crossIconSvg())),_.append(F),_.append(U);var W=null===(L=v[0])||void 0===L?void 0:L.title,G=document.createElement("img");G.className="next-ep-img",G.src=(null===(B=v[0])||void 0===B||null===(M=B.gist)||void 0===M||null===(R=M.imageGist)||void 0===R?void 0:R.r16x9)||(null==v||null===(q=v[0])||void 0===q?void 0:q.img)||(null===(D=window)||void 0===D||null===($=D.customData)||void 0===$?void 0:$.fallbackImage);var z=document.createElement("div");z.className="next-ep-title",(null===(X=W)||void 0===X?void 0:X.length)>60&&(W=W.substr(0,60)+"..."),z.textContent="".concat(W);var H=document.createElement("div");H.className="next-ep-content",H.append(G),H.append(z),H.onclick=function(){return h(e)},V.append(_),V.append(H)}},exports.addTVProviderImage=function(e,t){var n=a.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(r),o.alt="Provider Image",i.append(o),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}},exports.initiateTrickplay=function(e){return B.apply(this,arguments)};