@viewlift/player-backup 2.0.96-smartTv-test → 2.0.96-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.
- package/cjs/bundle.css +174 -174
- package/cjs/{index-53c3a5c0.js → index-0d42ae3e.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{skin-22c33a9a.js → skin-550a6e36.js} +1 -1
- package/cjs/{skin-ec1c7dbf.js → skin-b63a05b9.js} +1 -1
- package/cjs/{skin-41ab5f86.js → skin-e621e53a.js} +1 -1
- package/esm/bundle.css +174 -174
- package/esm/{index-5ebdc3b9.js → index-7ac9ea03.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{skin-87d5ab21.js → skin-5aa23c4b.js} +1 -1
- package/esm/{skin-f8896448.js → skin-74f517c9.js} +1 -1
- package/esm/{skin-db377e11.js → skin-9d26a226.js} +1 -1
- package/package.json +1 -1
package/cjs/bundle.css
CHANGED
|
@@ -2,180 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
6
|
-
height: 0.7em;
|
|
7
|
-
position: absolute;
|
|
8
|
-
top: -0.7em;
|
|
9
|
-
width: 100%;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.video-js.skin_vlone .vjs-progress-holder.vjs-slider.vjs-slider-horizontal {
|
|
13
|
-
height: 100%;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.video-js.skin_vlone .vjs-playback-rate .vjs-playback-rate-value{
|
|
17
|
-
line-height: 2.5;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.video-js.skin_vlone button.vjs-control.vjs-button.vjs-rewind-button > svg{
|
|
21
|
-
height: 19px;
|
|
22
|
-
width: 19px;
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.video-js.skin_vlone button.vjs-control.vjs-button.vjs-skip-button > svg{
|
|
27
|
-
height: 19px;
|
|
28
|
-
width: 19px;
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.video-js.skin_vlone .vjs-play-progress:before {
|
|
33
|
-
display: none !important;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.video-js.skin_vlone .vjs-progress-control>.vjs-progress-holder.vjs-slider {
|
|
37
|
-
margin: 0 !important;
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.video-js.skin_vlone .vjs-custom-control-spacer {
|
|
43
|
-
display: block;
|
|
44
|
-
flex: 1 1 auto;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.video-js.skin_vlone .vjs-volume-panel.vjs-volume-panel-vertical{
|
|
48
|
-
z-index: 1;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.video-js.skin_vlone .vjs-control-bar {
|
|
53
|
-
height: 40px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before,
|
|
57
|
-
.vjs-button>.vjs-icon-placeholder:before {
|
|
58
|
-
position: relative !important;
|
|
59
|
-
}
|
|
60
|
-
.video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before{
|
|
61
|
-
display: flex;
|
|
62
|
-
left: 0px;
|
|
63
|
-
top: -1px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.vjs-button>.vjs-icon-placeholder:before {
|
|
67
|
-
font-size: 2em !important;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.video-js.skin_vlone .vjs-control {
|
|
71
|
-
width: 4.3em;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.vjs-menu-button-popup .vjs-menu {
|
|
75
|
-
bottom: 10px !important;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control:hover {
|
|
80
|
-
height: 1.3em;
|
|
81
|
-
position: absolute;
|
|
82
|
-
top: -1.3em;
|
|
83
|
-
transition: height 0.3s, top 0.3s;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
.video-js.skin_vlone.vjs-live .vjs-time-control{
|
|
88
|
-
display: none !important;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.video-js.skin_vlone .vjs-time-control {
|
|
92
|
-
display: block;
|
|
93
|
-
}
|
|
94
|
-
.video-js.skin_vlone .vjs-remaining-time {
|
|
95
|
-
display: none;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.video-js.skin_vlone .vjs-remaining-time.vjs-time-control.vjs-control>span.vjs-remaining-time-display {
|
|
99
|
-
line-height: 3.5em;
|
|
100
|
-
font-size: 1.1em;
|
|
101
|
-
min-width: 4em;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.video-js.skin_vlone .vjs-time-divider > div{
|
|
105
|
-
display: flex;
|
|
106
|
-
justify-content: center;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.video-js.skin_vlone .vjs-live-control{
|
|
110
|
-
align-items: center;
|
|
111
|
-
}
|
|
112
|
-
.video-js.skin_vlone .vjs-live-display{
|
|
113
|
-
height: 2.2em;
|
|
114
|
-
display: flex;
|
|
115
|
-
align-items: center;
|
|
116
|
-
font-family: monospace;
|
|
117
|
-
width: 4em;
|
|
118
|
-
justify-content: center;
|
|
119
|
-
background: red;
|
|
120
|
-
margin: 4px 0px 4px 12px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.video-js.skin_vlone .vjs-time-control {
|
|
124
|
-
line-height: 3.5em !important;
|
|
125
|
-
font-size: 1.1em !important;
|
|
126
|
-
width: min-content !important;
|
|
127
|
-
min-width: 1.5em;
|
|
128
|
-
padding: 0 !important;
|
|
129
|
-
user-select: none;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.video-js.skin_vlone .vjs-current-time.vjs-time-control.vjs-control {
|
|
133
|
-
margin-left: 16px !important;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
/* Big play */
|
|
138
|
-
.video-js.skin_vlone.vjs-paused .vjs-big-play-button {
|
|
139
|
-
width: 80px;
|
|
140
|
-
height: 80px;
|
|
141
|
-
display: flex;
|
|
142
|
-
justify-content: center;
|
|
143
|
-
align-items: center;
|
|
144
|
-
border: none;
|
|
145
|
-
position: absolute;
|
|
146
|
-
top: 0;
|
|
147
|
-
left: 0;
|
|
148
|
-
right: 0;
|
|
149
|
-
bottom: 0;
|
|
150
|
-
margin: auto;
|
|
151
|
-
font-size: 5em;
|
|
152
|
-
line-height: 1.3em;
|
|
153
|
-
transform: none !important;
|
|
154
|
-
border-radius: 1.3em;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
@media(max-width:600px){
|
|
159
|
-
.video-js.skin_vlone button.vjs-big-play-button {
|
|
160
|
-
width: 50px !important;
|
|
161
|
-
height: 50px !important;
|
|
162
|
-
font-size: 2.1rem !important;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.video-js.skin_vlone .vjs-playback-rate .vjs-playback-rate-value {
|
|
166
|
-
display: none;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.video-js.skin_vlone button.vjs-control.vjs-button.vjs-rewind-button>svg {
|
|
170
|
-
display: none;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.video-js.skin_vlone button.vjs-control.vjs-button.vjs-skip-button>svg {
|
|
174
|
-
display: none;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
5
|
|
|
180
6
|
/*
|
|
181
7
|
* Styles the icon size and line height for button icons in the SmartTV skin.
|
|
@@ -1736,6 +1562,180 @@ iframe {
|
|
|
1736
1562
|
|
|
1737
1563
|
|
|
1738
1564
|
|
|
1565
|
+
|
|
1566
|
+
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
1567
|
+
height: 0.7em;
|
|
1568
|
+
position: absolute;
|
|
1569
|
+
top: -0.7em;
|
|
1570
|
+
width: 100%;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
.video-js.skin_vlone .vjs-progress-holder.vjs-slider.vjs-slider-horizontal {
|
|
1574
|
+
height: 100%;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
.video-js.skin_vlone .vjs-playback-rate .vjs-playback-rate-value{
|
|
1578
|
+
line-height: 2.5;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
.video-js.skin_vlone button.vjs-control.vjs-button.vjs-rewind-button > svg{
|
|
1582
|
+
height: 19px;
|
|
1583
|
+
width: 19px;
|
|
1584
|
+
cursor: pointer;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
.video-js.skin_vlone button.vjs-control.vjs-button.vjs-skip-button > svg{
|
|
1588
|
+
height: 19px;
|
|
1589
|
+
width: 19px;
|
|
1590
|
+
cursor: pointer;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
.video-js.skin_vlone .vjs-play-progress:before {
|
|
1594
|
+
display: none !important;
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
.video-js.skin_vlone .vjs-progress-control>.vjs-progress-holder.vjs-slider {
|
|
1598
|
+
margin: 0 !important;
|
|
1599
|
+
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
.video-js.skin_vlone .vjs-custom-control-spacer {
|
|
1604
|
+
display: block;
|
|
1605
|
+
flex: 1 1 auto;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
.video-js.skin_vlone .vjs-volume-panel.vjs-volume-panel-vertical{
|
|
1609
|
+
z-index: 1;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
.video-js.skin_vlone .vjs-control-bar {
|
|
1614
|
+
height: 40px;
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
.video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before,
|
|
1618
|
+
.vjs-button>.vjs-icon-placeholder:before {
|
|
1619
|
+
position: relative !important;
|
|
1620
|
+
}
|
|
1621
|
+
.video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before{
|
|
1622
|
+
display: flex;
|
|
1623
|
+
left: 0px;
|
|
1624
|
+
top: -1px;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
.vjs-button>.vjs-icon-placeholder:before {
|
|
1628
|
+
font-size: 2em !important;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
.video-js.skin_vlone .vjs-control {
|
|
1632
|
+
width: 4.3em;
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
.vjs-menu-button-popup .vjs-menu {
|
|
1636
|
+
bottom: 10px !important;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control:hover {
|
|
1641
|
+
height: 1.3em;
|
|
1642
|
+
position: absolute;
|
|
1643
|
+
top: -1.3em;
|
|
1644
|
+
transition: height 0.3s, top 0.3s;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
|
|
1648
|
+
.video-js.skin_vlone.vjs-live .vjs-time-control{
|
|
1649
|
+
display: none !important;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
.video-js.skin_vlone .vjs-time-control {
|
|
1653
|
+
display: block;
|
|
1654
|
+
}
|
|
1655
|
+
.video-js.skin_vlone .vjs-remaining-time {
|
|
1656
|
+
display: none;
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
.video-js.skin_vlone .vjs-remaining-time.vjs-time-control.vjs-control>span.vjs-remaining-time-display {
|
|
1660
|
+
line-height: 3.5em;
|
|
1661
|
+
font-size: 1.1em;
|
|
1662
|
+
min-width: 4em;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
.video-js.skin_vlone .vjs-time-divider > div{
|
|
1666
|
+
display: flex;
|
|
1667
|
+
justify-content: center;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
.video-js.skin_vlone .vjs-live-control{
|
|
1671
|
+
align-items: center;
|
|
1672
|
+
}
|
|
1673
|
+
.video-js.skin_vlone .vjs-live-display{
|
|
1674
|
+
height: 2.2em;
|
|
1675
|
+
display: flex;
|
|
1676
|
+
align-items: center;
|
|
1677
|
+
font-family: monospace;
|
|
1678
|
+
width: 4em;
|
|
1679
|
+
justify-content: center;
|
|
1680
|
+
background: red;
|
|
1681
|
+
margin: 4px 0px 4px 12px;
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
.video-js.skin_vlone .vjs-time-control {
|
|
1685
|
+
line-height: 3.5em !important;
|
|
1686
|
+
font-size: 1.1em !important;
|
|
1687
|
+
width: min-content !important;
|
|
1688
|
+
min-width: 1.5em;
|
|
1689
|
+
padding: 0 !important;
|
|
1690
|
+
user-select: none;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
.video-js.skin_vlone .vjs-current-time.vjs-time-control.vjs-control {
|
|
1694
|
+
margin-left: 16px !important;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
/* Big play */
|
|
1699
|
+
.video-js.skin_vlone.vjs-paused .vjs-big-play-button {
|
|
1700
|
+
width: 80px;
|
|
1701
|
+
height: 80px;
|
|
1702
|
+
display: flex;
|
|
1703
|
+
justify-content: center;
|
|
1704
|
+
align-items: center;
|
|
1705
|
+
border: none;
|
|
1706
|
+
position: absolute;
|
|
1707
|
+
top: 0;
|
|
1708
|
+
left: 0;
|
|
1709
|
+
right: 0;
|
|
1710
|
+
bottom: 0;
|
|
1711
|
+
margin: auto;
|
|
1712
|
+
font-size: 5em;
|
|
1713
|
+
line-height: 1.3em;
|
|
1714
|
+
transform: none !important;
|
|
1715
|
+
border-radius: 1.3em;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
@media(max-width:600px){
|
|
1720
|
+
.video-js.skin_vlone button.vjs-big-play-button {
|
|
1721
|
+
width: 50px !important;
|
|
1722
|
+
height: 50px !important;
|
|
1723
|
+
font-size: 2.1rem !important;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
.video-js.skin_vlone .vjs-playback-rate .vjs-playback-rate-value {
|
|
1727
|
+
display: none;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
.video-js.skin_vlone button.vjs-control.vjs-button.vjs-rewind-button>svg {
|
|
1731
|
+
display: none;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
.video-js.skin_vlone button.vjs-control.vjs-button.vjs-skip-button>svg {
|
|
1735
|
+
display: none;
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
1739
|
/* CSS for videojs-dvr-seekbar */
|
|
1740
1740
|
|
|
1741
1741
|
.video-js.vjs-dvr-seekbar {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-539a795d.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("./util-e1bc715c.js"),l=require("./captions-bc814903.js"),a=require("./skin-f87e1c22.js"),u=require("./renditions-7fe52e97.js"),s=require("./resolution-0a6680be.js"),d=require("./browser-38ff3331.js"),c=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof"),f=require("@babel/runtime/helpers/toConsumableArray"),p=require("@babel/runtime/helpers/slicedToArray"),m=function(e){return new Promise(function(n,t){if(g(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},g=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},y=function(e){var n,t=a.getPlayer(e);return(null==t||null===(n=t.audioTracks())||void 0===n?void 0:n.tracks_)||[]||[]},h=function(e,n){for(var t=a.getPlayer(e).audioTracks().tracks_||[],r=0;r<t.length;r++){var o=t[r];o.id==n?o.enabled=!0:o.enabled=!1}},b=function(e,n,t){var r=a.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},w=function(e){var n=a.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},k=function(){var e=t(r.mark(function e(n){var t,i,l,u,s;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return u=e.sent,e.prev=5,e.next=8,m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,u.default(o),e.finish(13);case 16:(s=o.getTech("chromecast"))&&!s.prototype.seeking&&(s.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==d.detectBrowser()?null==i||i.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),S=function(e,n){var t=a.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,i,l,a,u=this.el(),s=o.dom.getPointerPosition(u,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}})};var T=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),m("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),O=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),P=function(){var e=t(r.mark(function e(){var n;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(o),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),I=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),j=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-0c89add5.js")});case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),E=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:T,loadEMELibrary:O,loadMuxPlugin:P,loadDvrSeekbar:I,loadContribDash:j});function C(e){return D.apply(this,arguments)}function D(){return(D=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,T();case 3:t&&"Safari"==d.detectBrowser()&&Promise.resolve().then(function(){return E}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function A(e,n){return x.apply(this,arguments)}function x(){return(x=t(r.mark(function e(n,t){var o,i,l,a,u,s,c,v,f,p;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[c])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[c])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[c])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==d.detectBrowser()?O():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?j():O():"Safari"!=d.detectBrowser()&&f?j():null,k(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var V=new Set,N=null,M=function(n,t,r){var o,i,l,a,u,s,d,c={},v=(null==n?void 0:n.contentType)||"video";c["c3.cm.id"]=(null===(o=n[v])||void 0===o?void 0:o.id)||"Null",c["c3.cm.contentType"]=Q(n),c[null==r||null===(i=r.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==n||!n.linearchannel),c[null==r||null===(l=r.Constants)||void 0===l?void 0:l.STREAM_URL]=t.currentSrc(),c[null==r||null===(a=r.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),c["c3.cm.categoryType"]=H(n),c["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),c.DRMEnabled=(null===(u=n[v])||void 0===u?void 0:u.drmEnabled)||"None",c.DAIStream=null!==(s=n[v])&&void 0!==s&&null!==(d=s.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",c[r.Constants.DEFAULT_RESOURCE]="AKAMAI",c["c3.cm.brand"]="NULL",c.CDVREnabled=q(n),c["c3.cm.genreList"]=B(n),c["c3.cm.genre"]=_(n),c["c3.cm.channel"]=U(n);var f=K(e.getCurrentSeries(),n);return c=R(R({},c),f)},_=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},B=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},U=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},H=function(e){return(null==e?void 0:e.contentType)||"null"},q=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},F=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},Q=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var W,K=function(n,t){var r,o,i,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(o=r.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(i=n[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},G=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},J=function(){var n=t(r.mark(function n(t,o){var i,l,u,s,d,c,v,f,p,m;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},l=i.trackConvivaPlayerEvent,u=i.paymentHandler,s=i.tveProvider,d=i.enable,c=i.appName,v=(o||{}).token,d){n.next=4;break}return n.abrupt("return");case 4:if(f=a.getPlayer(t),"function"==typeof(p=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,p("getConvivaObject");case 10:if(m=n.sent){n.next=13;break}return n.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=G(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;N&&N!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),V.clear(),N=f.currentSrc();var r=z(f.currentType()),i=e.getCurrentVideo(),l=M(i,f,m);l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.PLAYER_NAME]=c||"WEB",l[null==m||null===(t=m.Constants)||void 0===t?void 0:t.ASSET_NAME]=F(i,o),l.authToken=v||"NULL",l.streamType=r,l.D2CType=u||"NONE",l.subscriberType=s||(u?"D2C":"FREE"),l["c3.cm.affiliate"]=s||"NULL",p("contentInfo",l)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),f.on("play",function(){V.has(f.currentSrc())||(V.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){V.has(f.currentSrc())&&V.delete(f.currentSrc()),p("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==V||V.clear(),p("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),X=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-ec1c7dbf.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-7be5db18.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-ea523de3.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-ebb43855.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-e6399b8c.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-22c33a9a.js")}).then(function(t){t.initialiseSkin(e,n)}):"VL_SmartTV"==t&&Promise.resolve().then(function(){return require("./skin-41ab5f86.js")}).then(function(t){t.initialiseSkin(e,n)})};function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function $(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Z=[],ee=0,ne=null;function te(t,r,o){var i,l,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(i=r.watchHistory)||void 0===i||i.apiVersion;var c=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(u=r.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==r||null===(s=r.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),y=d?100:Math.floor(v/f*100),h={};m?function(t,r,o){var i=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(o),l=re(i),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return $($({},e),{},n({},t,s[t]))},{}),c=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===W});c<0?l.push($($({content:d},t),{},{addedDate:a,updateDate:a})):l[c]=$($($({},l[c]),t),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:d,watchedTime:g,watchedPercentage:y},c,r.siteOwner):(h=$($({videoId:W,watchedTime:g,watchedPercentage:y,doneWatching:d,profileId:c},ne&&{seriesId:ne}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then(function(e){}).catch(function(e){})),ee=v+o}function re(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function oe(e,n,t){var r=re(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return r&&Array.isArray(r)&&(o=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var ie=!1,le=function(n,t){var r,o,i=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[i])||void 0===r||null===(o=r.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!ie){var l=ae(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),ie=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ae(e,n,t){if(Array.isArray(e))return e.map(function(e){return ae(e,n,t)});if(null!==e&&"object"===v(e)){var r={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=ae(e[o],n,t)}),r}return e}function ue(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return se(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?se(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function se(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ve=function(n,t,r,o){var i,u,s,c,f=o.res,p=o.sres,m=a.getPlayer(n),g=(null==f?void 0:f.contentType)||"video",y=(null==f?void 0:f[g].drmEnabled)||!1,h=(null==f||null===(i=f[g])||void 0===i||null===(u=i.streamingInfo)||void 0===u?void 0:u.isLiveStream)||!1,w=(null==f||null===(s=f[g])||void 0===s||null===(c=s.liveDetails)||void 0===c?void 0:c.isDvrEnabled)||!1;e.setCurrentVideo(f),m&&(m.on("loadstart",function(){h?r.resolve({status:!0,msg:"Video Loaded",response:f}):r.resolve(ce({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var r,o,i,u=l.getCaptions(n);if(null==u||u.map(function(e){return l.disableCaptions(n,e.id)}),w&&"Safari"===d.detectBrowser())try{var s;null==m||null===(s=m.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&b(n,sessionStorage.getItem("volume")||"100");var c=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var v,p,g=ce(ce({},t),f);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(ne=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Z=[],ee=0,W=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,u=a.getPlayer(e);u&&(u.on("timeupdate",function(){if(!u.seeking()){var e=Math.floor(u.currentTime());Z.includes(ee)||(e==ee?(Z.push(e),te(u,n,l)):e>ee&&(ee=e+l))}}),u.one("ended",function(){te(u,n,l,!0)}))}(n,g,null==c||null===(v=c.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var y,h,k,S,T,O,P=(null===(y=e.getCurrentVideo())||void 0===y?void 0:y.video)||(null==f?void 0:f.video),I=null==P?void 0:P.gist,j={env_key:null==t||null===(h=t.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(k=window)||void 0===k?void 0:k.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(T=P.streamingInfo)&&void 0!==T&&T.isLiveStream?"live":"video",viewer_user_id:null==t||null===(O=t.analytics)||void 0===O?void 0:O.userId};m.mux({debug:!1,data:j})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,r,o,i,l,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var m,g=p.getMediaSession(),y=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){h&&le(f,n)}),m.on("error",function(){var t,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?le(f,n):(e.handleError(n,(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var n,r,o,i,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(o=r.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,u,s,d=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&setTimeout(function(){m.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0}),"object"==v(m.dash)){var t,r,o,i=null==m||null===(t=m.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=ue(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=ue(n);try{for(c.s();!(s=c.n()).done;){var f,p,g,h=s.value;if(("Chrome"==d.detectBrowser()||"Edge"==d.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(p=f.userAgent)&&void 0!==p&&p.includes("Macintosh")||!y))&&null!=h&&null!==(g=h.label)&&void 0!==g&&g.includes("5.1"))m.audioTracks().removeTrack(h);else{if("main"==h.kind){h.enabled=!0;break}h.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};var fe,pe=(fe=!0,{enable:function(){fe=!0},disable:function(){fe=!1},get enabled(){return fe}}),me="ssai-breakStart",ge="ssai-adImpression",ye="ssai-firstQuartile",he="ssai-midpoint",be="ssai-thirdQuartile",we="ssai-complete",ke="ssai-breakEnd",Se={breakStart:me,impression:ge,firstQuartile:ye,midpoint:he,thirdQuartile:be,complete:we,breakEnd:ke};function Te(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=a.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var r=n.eventType,o=Se[r];o&&t.trigger(o,n)}function Oe(e){var n=a.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{adBreakStart:function(e){return t(me,e)},adImpression:function(e){return t(ge,e)},adFirstQuartile:function(e){return t(ye,e)},adMidpoint:function(e){return t(he,e)},adThirdQuartile:function(e){return t(be,e)},adComplete:function(e){return t(we,e)},adBreakEnd:function(e){return t(ke,e)}}}function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function je(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ee(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ee(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Ee(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var Ce,De,Ae=(Ce="",{set:function(e){e&&(Ce=e)},get:function(){return Ce}}),xe=(De=null,{set:function(e){De=e},get position(){return De}});function Le(e,n){return Re.apply(this,arguments)}function Re(){return(Re=t(r.mark(function n(t,o){var i,l,u,s,d,c,v,f,m,g,y,h,b,w;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a.getPlayer(t),i=e.getSource(o,t),l=i.src,u=l.replace("/dash/","/session/").replace("master","session"),u=e.replaceMacros(u,t,o),s=Ve(u),d=p(s,2),c=d[0],v=d[1],u=new URL(u.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var n=p(e,2),t=n[0],r=n[1];u.searchParams.set(t,r)}),n.prev=8,n.next=11,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Ie({},c)})});case 11:return f=n.sent,n.next=14,f.json();case 14:return m=n.sent,g="https://"+new URL(u).hostname,y=m.trackingUrl,h=m.manifestUrl,b=g+y,w=g+h,Ae.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),i.src=w,n.abrupt("return",i);case 26:return n.prev=26,n.t0=n.catch(8),n.abrupt("return",i);case 29:case"end":return n.stop()}},n,null,[[8,26]])}))).apply(this,arguments)}function Ve(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var r,o=je(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=p(i,2),a=l[0],u=l[1];n[decodeURIComponent(a)]=decodeURIComponent(u||"")}}catch(e){o.e(e)}finally{o.f()}for(var s={},d={},c=0,v=Object.entries(n);c<v.length;c++){var f=p(v[c],2),m=f[0],g=f[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=g;else d[m]=g}return[s,d]}function Ne(e,n){return Me.apply(this,arguments)}function Me(){return Me=t(r.mark(function n(o,i){var l,u,s,d,c,v,p,m,g,y,h,b,w,k,S,T,O;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:O=function(e,n,t,r,i,l){var u=a.getPlayer(o);if(!u.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(u.currentTime());var s,d=je(t);try{var c=function(){var t,a,d,c=s.value,v=c.eventType,f=c.beaconUrls,p=c.startTimeInSeconds,m=c.startTime,g=c.durationInSeconds,y=p||0,h=f,b=(null===(t=window)||void 0===t||null===(a=t.customData)||void 0===a||null===(d=a.ads)||void 0===d?void 0:d.adEventHandler)||null,w="".concat(y,"_").concat(v),k=S.get("pod-".concat(i))||[];if(e>=y&&!k.includes(w)){var O;k.push(w),S.set("pod-".concat(i),k);try{T(v,n,h,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var P=xe.position;xe.set(null),setTimeout(function(){null!=P&&(u.currentTime(P),l())},500)}if("function"==typeof b&&null!=n&&null!==(O=n.ads)&&void 0!==O&&O[r])try{var I,j={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:g,ad:null==n||null===(I=n.ads)||void 0===I?void 0:I[r],adIndex:r};b({adsData:j}),Te(o,j)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(s=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},T=function(e,n,t,r){null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},k=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},xe.set(i),c=Ae.get(),(v=a.getPlayer(o)).one("loadeddata",function(){c&&w(c)}),p=new Map,m=new Map,g=-1,y=(null===(l=document)||void 0===l||null===(u=l.getElementsByClassName("tvProviderImage"))||void 0===u?void 0:u[0])||null,h=(null==v||null===(s=v.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,b=(null==v||null===(d=v.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,w=function(){var n=t(r.mark(function n(t){var l,u,s,d,c,v,w,S,T,P,I,j,E,C,D,A,x;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return E=function(e){document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",E),0===e.button&&P()},j=function(e){},I=function(){var e,n=w.currentTime(),t=null,r=je(v);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=(o.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,p.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){w.currentTime(t+2.2)},100))},P=function(){var e,n=w.currentTime(),t=null,r=je(v);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=o.ads,u=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>u||n>i)&&!p.has(i)||n>=i&&n<=u)&&(t=i,p.set(i,!0),m.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){w.currentTime(t+.4)},100))},u=!1,n.next=7,fetch(t);case 7:return s=n.sent,n.next=10,s.json();case 10:d=n.sent,c=d.avails,v=[],w=a.getPlayer(o),S=w.controlBar.progressControl,T=S.seekBar.el(),c.map(function(e,n){var t,r,o;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!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===(r=e.adBreakTrackingEvents)||void 0===r||null===(o=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===o?void 0:o[0])||[]})}),!u&&i&&(w.currentTime(i),I()),null!=v&&v.length&&(window.adsQueueList=v),console.log(v,"data"),v.forEach(function(e){var n,t,r=e.markerPositionInSeconds,o=e.ads,i=w.duration();if(!(r>i||Array.isArray(o)&&0==(null==o?void 0:o.length))){var l=r/i*100,a=document.createElement("div");a.className="vjs-seekbar-marker",a.style.left="".concat(l,"%"),a.style.position="absolute",a.style.top="0",a.style.bottom="0",a.style.width="2px",a.style.backgroundColor="#fecc09",a.style.left="".concat(l,"%"),a.style.pointerEvents="none",T.appendChild(a),null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableControls&&(T.style.display="none")}}),w.on("timeupdate",a.throttle(function(){var e=w.currentTime();if(e!==g){g=e;for(var n=!1,t=function(){var t=v[r],o=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=o+i;if(e>=o-1.2&&e<=a+1.2){e>=o&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&p.set(o,!0),pe.disable(),y&&y.classList.add("vjs-hidden"),h&&(h.el().style.pointerEvents="none",h.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),S.el().style.visibility="hidden";for(var u=e-o,s=0,d=0,c=0;c<l.length;c++){var g,w=null==l||null===(g=l[c])||void 0===g?void 0:g.durationInSeconds;if(u<s+w){d=c;break}s+=w}l[d];var T=Math.max(0,i-u),P=Math.round(T);C.style.display="block",x.textContent="".concat(d+1," of ").concat(l.length," • ").concat(k(P));var j=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});j.push.apply(j,f(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&j.push(null==t?void 0:t.podSlotImpressionBeacon),O(e,t,j,d,r,I),"break"}m.delete(o)},r=0;r<v.length;r++){if("break"===t())break}n||(C.style.display="none",S.el().style.visibility="visible",h&&(h.el().style.pointerEvents="auto",h.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),y&&y.classList.remove("vjs-hidden"),pe.enable())}},1e3)),null===(l=document)||void 0===l||l.addEventListener("keydown",function(n){pe.enabled&&"ArrowRight"==n.key&&(P(),e.skip(o,10),n.stopPropagation())}),S.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",E))}),(C=document.createElement("div")).className="ssai-ad-container",(D=document.createElement("div")).className="sponsored-adbox",(A=document.createElement("div")).className="sponsored-text",A.textContent="Sponsored Ad",D.append(A),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",C.append(D),C.append(x),w.el().appendChild(C);case 40:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}(),S=new Map;case 16:case"end":return n.stop()}},n)})),Me.apply(this,arguments)}function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ue=function(i,u,s,c){var v,f,p,m,g,y,h,b,w,k,T,O,P,I,j,E,C,D,x,L,R,V,N,M,_,B,U,H,q,F,Q,W,K,G,z=u.res,Y=void 0===z?null:z,$=u.sres,Z=void 0===$?null:$,ee=null!=s&&s.chromecastReceiverId?["chromecast","html5"]:["html5"],ne=(null===(v=Y)||void 0===v?void 0:v.contentType)||"video",te=a.impolicy16x9(null===(f=Y)||void 0===f||null===(p=f[ne])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.videoImageUrl)||a.impolicy16x9(null===(g=Y)||void 0===g||null===(y=g[ne])||void 0===y||null===(h=y.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),re=(null===(w=Y)||void 0===w||null===(k=w[ne])||void 0===k||null===(T=k.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,oe=(null===(O=Y)||void 0===O||null===(P=O[ne])||void 0===P||null===(I=P.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,ie=e.getAdsURL(Y);Y=Be(Be({},Y),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var le="MEDIA_TAILOR"==(null===(j=window)||void 0===j||null===(E=j.app_data)||void 0===E||null===(C=E.appcmsMain)||void 0===C||null===(D=C.adsConfig)||void 0===D?void 0:D.vodAdSticherProvider)||"MEDIA_TAILOR"==(null===(x=window)||void 0===x||null===(L=x.customData)||void 0===L||null===(R=L.ads)||void 0===R?void 0:R.vodAdSticherProvider)||!1,ae=(null==s?void 0:s.latency)||6,ue=(null==s?void 0:s.skin_settings)||{},se=(K={enableSmoothSeeking:!0,controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ue?void 0:ue.pictureInPictureToggle)||!1},playbackRates:null!=ue&&ue.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==s.skin,liveui:re},n(K,"autoplay",null==s?void 0:s.autoplay),n(K,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!ie),n(K,"loop",(null==s?void 0:s.loop)||!1),n(K,"audioPosterMode",null==s?void 0:s.audioPosterMode),n(K,"html5",Be(Be({dash:Be(Be(Be({},!o.browser.IS_SAFARI&&!(null!==(V=window)&&void 0!==V&&null!==(N=V.customData)&&void 0!==N&&N.isSmartTV)&&{useTTML:!0}),(null==s?void 0:s.debugConfig)&&(null==s||null===(M=s.debugConfig)||void 0===M?void 0:M.enable)&&{debug:!0,logLevel:null!=s&&null!==(_=s.debugConfig)&&void 0!==_&&_.logLevel?null==s||null===(B=s.debugConfig)||void 0===B?void 0:B.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ae},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Be({},"IE"==d.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}},null!==(U=window)&&void 0!==U&&null!==(H=U.customData)&&void 0!==H&&H.isSmartTV?{bufferToKeep:10,bufferTimeAtTopQuality:15,bufferTimeAtTopQualityLongForm:15,bufferPruningInterval:5}:{}),vhs:Be(Be({liveRangeSafeTimeDelta:ae,useDevicePixelRatio:!0,experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==s||null===(q=s.customData)||void 0===q?void 0:q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(F=null==s?void 0:s.enableLowInitialPlaylist)||void 0===F||F}),nativeTextTracks:"Safari"==d.detectBrowser()},0==(null==s||null===(Q=s.customData)||void 0===Q?void 0:Q.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(W=s.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(K,"poster",te),n(K,"techOrder",ee),n(K,"chromecast",{requestCustomDataFn:function(e){var n=a.getPlayer(i),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var r,o,i,l,a,u,s,d,c,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,y,h,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,O=(null==T?void 0:T.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(y=g[0])||void 0===y||null===(h=y.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=O;var P=(null==T?void 0:T.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=P}var I=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=I;var j=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=j;var E=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=E;var C=null==e||null===(s=e[f])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=C,p.subTitles=t,p.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Y,e,t)},modifyLoadRequestFn:function(e){var n,t,r,o,l,u=a.getPlayer(i),s=(null==u?void 0:u.currentSource())||{};!(null===(n=Y)||void 0===n||null===(t=n[ne])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(o=r.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),K);if(!o.getPlayers()[i]){null===(G=window)||void 0===G||!G.customData.isSmartTV||null!=s&&s.disableControls||(se.spatialNavigation={enabled:!0,horizontalSeek:!0});try{o.log.level("off")}catch(e){}var de=o(i,se,function(){var n=t(r.mark(function n(){var t,a,u,d,v,f,p,m,g,y,h,b,w,k,T,O,P,I,j,E,C,D,x,L,R,V,N,M,_,B,U,H,q,F,Q,W,K,G,z;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:try{de.log.level("off")}catch(e){}return console.log(de),console.log(o.VERSION),console.log(o.getPlugins()),n.next=6,A(s,Y);case 6:try{null===(M=window)||void 0===M||!M.customData.isSmartTV||null!=s&&s.disableControls||de.spatialNavigation.start()}catch(e){}if(_=null===(t=Y)||void 0===t||null===(a=t[ne])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.startOverTime,oe&&c.resolve(Be({status:!0,msg:"Player Initialised"},Z?{seriesResponse:Z,response:Y}:{response:Y})),e.inititateBeacon(i,null==s?void 0:s.analyticsCb),J(i,s),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),re&&S(i,_),!ie||null!=s&&null!==(d=s.customData)&&void 0!==d&&d.disableAds||e.initialiseAdvertisement(i,ie,Y),B=e.getSource(Y,i),console.log(B),null!=s&&s.nearestClusterUrl&&(B=e.getUpdatedClusterSource(B,s.nearestClusterUrl)),!le||null===(v=Y)||void 0===v||null===(f=v.video)||void 0===f||!f.isSSAIEnabled){n.next=21;break}return n.next=20,Le(i,Y);case 20:B=n.sent;case 21:B?e.loadVideo(i,B):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:Y}),e.handleError(i,"Incompatible / Missing Source")),((null===(p=Y)||void 0===p||null===(m=p[ne])||void 0===m||null===(g=m.contentDetails)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0||(null===(h=Y)||void 0===h||null===(b=h[ne])||void 0===b||null===(w=b.closedCaptions)||void 0===w?void 0:w.length)>0)&&(K=(null===(H=Y)||void 0===H||null===(q=H[ne])||void 0===q||null===(F=q.contentDetails)||void 0===F?void 0:F.closedCaptions)||(null===(Q=Y)||void 0===Q||null===(W=Q[ne])||void 0===W?void 0:W.closedCaptions),U=K.filter(function(e){return"VTT"===e.format}),l.addCaptions(i,U)),null!=s&&s.disableControls&&e.disableControls(i),"MEDIA_TAILOR"==(null===(k=window)||void 0===k||null===(T=k.app_data)||void 0===T||null===(O=T.appcmsMain)||void 0===O||null===(P=O.adsConfig)||void 0===P?void 0:P.vodAdSticherProvider)&&null!==(I=window)&&void 0!==I&&null!==(j=I.app_data)&&void 0!==j&&null!==(E=j.appcmsMain)&&void 0!==E&&null!==(C=E.adsConfig)&&void 0!==C&&C.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(D=window)||void 0===D||null===(x=D.customData)||void 0===x||null===(L=x.ads)||void 0===L?void 0:L.vodAdSticherProvider)&&null!==(R=window)&&void 0!==R&&null!==(V=R.customData)&&void 0!==V&&null!==(N=V.ads)&&void 0!==N&&N.vodAdClientSideTracking?(s.customData.disableControls=!0,G=e.getSource(null==se?void 0:se.res,i)||{},z=G.src,Ne(i,z)):X(i,Be(Be(Be({},s),se),{},{liveVideo:oe,isDvrEnabled:re,res:Y,sres:Z})),ve(i,Be(Be(Be({},s),se),{},{liveVideo:oe}),c,{res:Y,sres:Z});case 26:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},He={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Qe,We=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=Ke(e);Ue(o,{res:i},e,{resolve:t,reject:r})},Ke=function(n){var t,r,o,i,l,a,u,s,d=null==n?void 0:n.streamingInfo,c=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,v=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,p=(null==n||null===(o=n.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,m=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,g=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],y=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,h=null==n?void 0:n.token,b=e.getDecodedToken(h),w=null==b?void 0:b.site;return Fe(Fe({id:null==He?void 0:He[w]},!v&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:v,streamingInfo:{videoAssets:Fe(Fe({},y&&{drmProvider:y}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==d?void 0:d.isDvrEnabled},gist:Fe({},m&&{videoImageUrl:m}),contentDetails:Fe({},(null==g?void 0:g.length)>0&&{closedCaptions:f(g)})},ads:{preRoll:{adTags:{web:Fe(Fe({},p&&{active:!0}),p&&{url:p})}}}})};function Ge(e,n){return ze.apply(this,arguments)}function ze(){return(ze=t(r.mark(function n(t,o){var i,l,a,u,s,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,a=null==t?void 0:t.videoId,u=null==t?void 0:t.playerId,s=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:d=n.sent,e.getVideoDetails(a,d).then(function(n){var r,o,c,v;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(c=o.gist)||void 0===c?void 0:c.contentType,e.setCurrentVideo(null==n?void 0:n.data);var f,p=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(v=t.watchHistory)&&void 0!==v&&v.enable&&!s)if((null===(f=t.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,g,y,h=oe((null===(m=t.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==t?void 0:t.siteOwner);if(h&&h.length)t.watchHistoryResumeTime=(null===(g=h[0])||void 0===g?void 0:g.watchedTime)||null,t.watchedPercentage=(null===(y=h[0])||void 0===y?void 0:y.watchedPercentage)||null;p.contentType="video",Ue(u,{res:p},t,{resolve:i,reject:l})}else e.getVideoInfo(a,d).then(function(e){var n,r,o,i,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,r,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(e))}).finally(function(){Ue(u,{res:p},t,{resolve:i,reject:l})});else Ue(u,{res:p},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,u,l,a)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Je(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=t(r.mark(function n(t,o){var i,l,a,u,s;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,n.next=3,e.getToken();case 3:a=n.sent,u=null==t?void 0:t.playerId,s=null==t?void 0:t.epg,e.getLinearChannelDetails(s,a).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==s?void 0:s.channelId,Ue(u,{res:n},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,u,l,videoId)});case 7:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ye(e,n){return $e.apply(this,arguments)}function $e(){return($e=t(r.mark(function n(t,o){var i,l,a,u,s,d,c;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(i=t.series)||void 0===i?void 0:i.id,e.getSeriesDetails(c,u).then(function(n){var r,o,i,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(o=r.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);e.createSeriesWatchMap(c,u),e.getVideoDetails(f,u).then(function(n){var r,o,i;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,e.setCurrentVideo(n.data),Ue(s,{res:null==n?void 0:n.data,sres:d},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function en(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:i.onTimeUpdate,getVideoDuration:i.getVideoDuration,getVideoCurrentTime:i.getVideoCurrentTime,onVideoEnded:i.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(r.mark(function t(o,i){var l,u,s,d,v,f,p,g,y,h,b,w,k,S,T,O,P,I,j,E,D,A,x;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(b=(null==n?void 0:n.videoSourceUrl)||!1,w=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,S=null==n?void 0:n.videoId,T=(null==n||null===(u=n.series)||void 0===u?void 0:u.enable)||!1,O=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,P=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",P),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),P&&!e.isTokenExpired(P)){t.next=16;break}return i({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}}),t.abrupt("return");case 16:Qe=JSON.parse(atob(P.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(s=Qe)||void 0===s||!s.anonymousId),n.siteOwner=(null===(d=Qe)||void 0===d?void 0:d.site)||null,n.userId=(null===(v=Qe)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=Qe)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,I=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable?null:null==n?void 0:n.chromecastReceiverId,j=(null==n||null===(g=n.analytics)||void 0===g?void 0:g.gaId)||null,(E=null==n?void 0:n.errors)&&(window.customErrors=E),window.customData=null==n?void 0:n.customData,c.setLocalisation(null==n||null===(y=n.customData)||void 0===y?void 0:y.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!a.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,C(n);case 33:j&&m("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then(function(){return e.runGtag(j)}).catch(function(e){}),(D=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(I)))&&D.addEventListener("contextmenu",function(e){return e.preventDefault()}),b?(x={directPlaybackUrl:b,id:A="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(A,P).then(function(e){var t=(null==e?void 0:e.data)||{};Ue(I,{res:en(en({},t),x)},n,{resolve:o,reject:i})}).catch(function(n){e.initiateErrorHandling(n,I,i,A)}):Ue(I,{res:x},n,{resolve:o,reject:i})):O?We(n,{resolve:o,reject:i}):T?Ye(n,{resolve:o,reject:i}):k?Je(n,{resolve:o,reject:i}):Ge(n,{resolve:o,reject:i});case 37:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:u.getRenditions,getSelectedRendition:u.getSelectedRendition,skip:e.skip,getPlayer:a.getPlayer,play:e.play,pause:e.pause,isPaused:e.isPaused,detectBrowser:d.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:i.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,getAudioTracks:y,enableAudioTrack:h,playSelectedResolution:s.playSelectedResolution,getSource:e.getSource,setVolume:b,getVolume:w,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:Oe,getPlayerVersion:function(){return window.vl_player_version},getTextTracksWithCuesDetails:l.getTextTracksWithCuesDetails,playerEvents:i.playerEvents}},exports.initialiseKeyboardEvents=function(n,t){var r,o,i,l=a.getPlayer(n),u=null==l||null===(r=l.controlBar)||void 0===r||null===(o=r.playToggle)||void 0===o?void 0:o.el_,s=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(r){var o,i,a,d,c,v,f,p,m;if(pe.enabled&&"input"!=r.target.localName){var g=r.key,y=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(r.preventDefault(),null==s||s.focus()),g){case" ":null==u||u.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":y&&!1===t.liveui||e.rewind(n,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(d=a.appcmsMain)||void 0===d||null===(c=d.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(v=window)&&void 0!==v&&null!==(f=v.app_data)&&void 0!==f&&null!==(p=f.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;y||e.skip(n,10)}}},!0)},exports.setupAdvertisementMarkers=Ne;
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-539a795d.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("./util-e1bc715c.js"),l=require("./captions-bc814903.js"),a=require("./skin-f87e1c22.js"),u=require("./renditions-7fe52e97.js"),s=require("./resolution-0a6680be.js"),d=require("./browser-38ff3331.js"),c=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof"),f=require("@babel/runtime/helpers/toConsumableArray"),p=require("@babel/runtime/helpers/slicedToArray"),m=function(e){return new Promise(function(n,t){if(g(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},g=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},y=function(e){var n,t=a.getPlayer(e);return(null==t||null===(n=t.audioTracks())||void 0===n?void 0:n.tracks_)||[]||[]},h=function(e,n){for(var t=a.getPlayer(e).audioTracks().tracks_||[],r=0;r<t.length;r++){var o=t[r];o.id==n?o.enabled=!0:o.enabled=!1}},b=function(e,n,t){var r=a.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},w=function(e){var n=a.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},k=function(){var e=t(r.mark(function e(n){var t,i,l,u,s;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return u=e.sent,e.prev=5,e.next=8,m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,u.default(o),e.finish(13);case 16:(s=o.getTech("chromecast"))&&!s.prototype.seeking&&(s.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==d.detectBrowser()?null==i||i.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),S=function(e,n){var t=a.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,i,l,a,u=this.el(),s=o.dom.getPointerPosition(u,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}})};var T=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),m("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),O=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),P=function(){var e=t(r.mark(function e(){var n;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(o),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),I=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),j=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-0c89add5.js")});case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),E=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:T,loadEMELibrary:O,loadMuxPlugin:P,loadDvrSeekbar:I,loadContribDash:j});function C(e){return D.apply(this,arguments)}function D(){return(D=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,T();case 3:t&&"Safari"==d.detectBrowser()&&Promise.resolve().then(function(){return E}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function A(e,n){return x.apply(this,arguments)}function x(){return(x=t(r.mark(function e(n,t){var o,i,l,a,u,s,c,v,f,p;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[c])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[c])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[c])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==d.detectBrowser()?O():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?j():O():"Safari"!=d.detectBrowser()&&f?j():null,k(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var V=new Set,N=null,M=function(n,t,r){var o,i,l,a,u,s,d,c={},v=(null==n?void 0:n.contentType)||"video";c["c3.cm.id"]=(null===(o=n[v])||void 0===o?void 0:o.id)||"Null",c["c3.cm.contentType"]=Q(n),c[null==r||null===(i=r.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==n||!n.linearchannel),c[null==r||null===(l=r.Constants)||void 0===l?void 0:l.STREAM_URL]=t.currentSrc(),c[null==r||null===(a=r.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),c["c3.cm.categoryType"]=H(n),c["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),c.DRMEnabled=(null===(u=n[v])||void 0===u?void 0:u.drmEnabled)||"None",c.DAIStream=null!==(s=n[v])&&void 0!==s&&null!==(d=s.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",c[r.Constants.DEFAULT_RESOURCE]="AKAMAI",c["c3.cm.brand"]="NULL",c.CDVREnabled=q(n),c["c3.cm.genreList"]=B(n),c["c3.cm.genre"]=_(n),c["c3.cm.channel"]=U(n);var f=K(e.getCurrentSeries(),n);return c=R(R({},c),f)},_=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},B=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},U=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},H=function(e){return(null==e?void 0:e.contentType)||"null"},q=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},F=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},Q=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var W,K=function(n,t){var r,o,i,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(o=r.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(i=n[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},G=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},J=function(){var n=t(r.mark(function n(t,o){var i,l,u,s,d,c,v,f,p,m;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},l=i.trackConvivaPlayerEvent,u=i.paymentHandler,s=i.tveProvider,d=i.enable,c=i.appName,v=(o||{}).token,d){n.next=4;break}return n.abrupt("return");case 4:if(f=a.getPlayer(t),"function"==typeof(p=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,p("getConvivaObject");case 10:if(m=n.sent){n.next=13;break}return n.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=G(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;N&&N!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),V.clear(),N=f.currentSrc();var r=z(f.currentType()),i=e.getCurrentVideo(),l=M(i,f,m);l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.PLAYER_NAME]=c||"WEB",l[null==m||null===(t=m.Constants)||void 0===t?void 0:t.ASSET_NAME]=F(i,o),l.authToken=v||"NULL",l.streamType=r,l.D2CType=u||"NONE",l.subscriberType=s||(u?"D2C":"FREE"),l["c3.cm.affiliate"]=s||"NULL",p("contentInfo",l)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),f.on("play",function(){V.has(f.currentSrc())||(V.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){V.has(f.currentSrc())&&V.delete(f.currentSrc()),p("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==V||V.clear(),p("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),X=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-b63a05b9.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-7be5db18.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-ea523de3.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-ebb43855.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-e6399b8c.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-550a6e36.js")}).then(function(t){t.initialiseSkin(e,n)}):"VL_SmartTV"==t&&Promise.resolve().then(function(){return require("./skin-e621e53a.js")}).then(function(t){t.initialiseSkin(e,n)})};function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function $(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Z=[],ee=0,ne=null;function te(t,r,o){var i,l,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(i=r.watchHistory)||void 0===i||i.apiVersion;var c=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(u=r.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==r||null===(s=r.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),y=d?100:Math.floor(v/f*100),h={};m?function(t,r,o){var i=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(o),l=re(i),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return $($({},e),{},n({},t,s[t]))},{}),c=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===W});c<0?l.push($($({content:d},t),{},{addedDate:a,updateDate:a})):l[c]=$($($({},l[c]),t),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:d,watchedTime:g,watchedPercentage:y},c,r.siteOwner):(h=$($({videoId:W,watchedTime:g,watchedPercentage:y,doneWatching:d,profileId:c},ne&&{seriesId:ne}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then(function(e){}).catch(function(e){})),ee=v+o}function re(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function oe(e,n,t){var r=re(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return r&&Array.isArray(r)&&(o=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var ie=!1,le=function(n,t){var r,o,i=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[i])||void 0===r||null===(o=r.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!ie){var l=ae(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),ie=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ae(e,n,t){if(Array.isArray(e))return e.map(function(e){return ae(e,n,t)});if(null!==e&&"object"===v(e)){var r={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=ae(e[o],n,t)}),r}return e}function ue(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return se(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?se(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function se(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ve=function(n,t,r,o){var i,u,s,c,f=o.res,p=o.sres,m=a.getPlayer(n),g=(null==f?void 0:f.contentType)||"video",y=(null==f?void 0:f[g].drmEnabled)||!1,h=(null==f||null===(i=f[g])||void 0===i||null===(u=i.streamingInfo)||void 0===u?void 0:u.isLiveStream)||!1,w=(null==f||null===(s=f[g])||void 0===s||null===(c=s.liveDetails)||void 0===c?void 0:c.isDvrEnabled)||!1;e.setCurrentVideo(f),m&&(m.on("loadstart",function(){h?r.resolve({status:!0,msg:"Video Loaded",response:f}):r.resolve(ce({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var r,o,i,u=l.getCaptions(n);if(null==u||u.map(function(e){return l.disableCaptions(n,e.id)}),w&&"Safari"===d.detectBrowser())try{var s;null==m||null===(s=m.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&b(n,sessionStorage.getItem("volume")||"100");var c=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var v,p,g=ce(ce({},t),f);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(ne=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Z=[],ee=0,W=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,u=a.getPlayer(e);u&&(u.on("timeupdate",function(){if(!u.seeking()){var e=Math.floor(u.currentTime());Z.includes(ee)||(e==ee?(Z.push(e),te(u,n,l)):e>ee&&(ee=e+l))}}),u.one("ended",function(){te(u,n,l,!0)}))}(n,g,null==c||null===(v=c.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var y,h,k,S,T,O,P=(null===(y=e.getCurrentVideo())||void 0===y?void 0:y.video)||(null==f?void 0:f.video),I=null==P?void 0:P.gist,j={env_key:null==t||null===(h=t.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(k=window)||void 0===k?void 0:k.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(T=P.streamingInfo)&&void 0!==T&&T.isLiveStream?"live":"video",viewer_user_id:null==t||null===(O=t.analytics)||void 0===O?void 0:O.userId};m.mux({debug:!1,data:j})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,r,o,i,l,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var m,g=p.getMediaSession(),y=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){h&&le(f,n)}),m.on("error",function(){var t,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?le(f,n):(e.handleError(n,(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var n,r,o,i,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(o=r.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,u,s,d=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&setTimeout(function(){m.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0}),"object"==v(m.dash)){var t,r,o,i=null==m||null===(t=m.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=ue(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=ue(n);try{for(c.s();!(s=c.n()).done;){var f,p,g,h=s.value;if(("Chrome"==d.detectBrowser()||"Edge"==d.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(p=f.userAgent)&&void 0!==p&&p.includes("Macintosh")||!y))&&null!=h&&null!==(g=h.label)&&void 0!==g&&g.includes("5.1"))m.audioTracks().removeTrack(h);else{if("main"==h.kind){h.enabled=!0;break}h.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};var fe,pe=(fe=!0,{enable:function(){fe=!0},disable:function(){fe=!1},get enabled(){return fe}}),me="ssai-breakStart",ge="ssai-adImpression",ye="ssai-firstQuartile",he="ssai-midpoint",be="ssai-thirdQuartile",we="ssai-complete",ke="ssai-breakEnd",Se={breakStart:me,impression:ge,firstQuartile:ye,midpoint:he,thirdQuartile:be,complete:we,breakEnd:ke};function Te(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=a.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var r=n.eventType,o=Se[r];o&&t.trigger(o,n)}function Oe(e){var n=a.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{adBreakStart:function(e){return t(me,e)},adImpression:function(e){return t(ge,e)},adFirstQuartile:function(e){return t(ye,e)},adMidpoint:function(e){return t(he,e)},adThirdQuartile:function(e){return t(be,e)},adComplete:function(e){return t(we,e)},adBreakEnd:function(e){return t(ke,e)}}}function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function je(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ee(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ee(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Ee(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var Ce,De,Ae=(Ce="",{set:function(e){e&&(Ce=e)},get:function(){return Ce}}),xe=(De=null,{set:function(e){De=e},get position(){return De}});function Le(e,n){return Re.apply(this,arguments)}function Re(){return(Re=t(r.mark(function n(t,o){var i,l,u,s,d,c,v,f,m,g,y,h,b,w;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a.getPlayer(t),i=e.getSource(o,t),l=i.src,u=l.replace("/dash/","/session/").replace("master","session"),u=e.replaceMacros(u,t,o),s=Ve(u),d=p(s,2),c=d[0],v=d[1],u=new URL(u.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var n=p(e,2),t=n[0],r=n[1];u.searchParams.set(t,r)}),n.prev=8,n.next=11,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Ie({},c)})});case 11:return f=n.sent,n.next=14,f.json();case 14:return m=n.sent,g="https://"+new URL(u).hostname,y=m.trackingUrl,h=m.manifestUrl,b=g+y,w=g+h,Ae.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),i.src=w,n.abrupt("return",i);case 26:return n.prev=26,n.t0=n.catch(8),n.abrupt("return",i);case 29:case"end":return n.stop()}},n,null,[[8,26]])}))).apply(this,arguments)}function Ve(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var r,o=je(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=p(i,2),a=l[0],u=l[1];n[decodeURIComponent(a)]=decodeURIComponent(u||"")}}catch(e){o.e(e)}finally{o.f()}for(var s={},d={},c=0,v=Object.entries(n);c<v.length;c++){var f=p(v[c],2),m=f[0],g=f[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=g;else d[m]=g}return[s,d]}function Ne(e,n){return Me.apply(this,arguments)}function Me(){return Me=t(r.mark(function n(o,i){var l,u,s,d,c,v,p,m,g,y,h,b,w,k,S,T,O;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:O=function(e,n,t,r,i,l){var u=a.getPlayer(o);if(!u.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(u.currentTime());var s,d=je(t);try{var c=function(){var t,a,d,c=s.value,v=c.eventType,f=c.beaconUrls,p=c.startTimeInSeconds,m=c.startTime,g=c.durationInSeconds,y=p||0,h=f,b=(null===(t=window)||void 0===t||null===(a=t.customData)||void 0===a||null===(d=a.ads)||void 0===d?void 0:d.adEventHandler)||null,w="".concat(y,"_").concat(v),k=S.get("pod-".concat(i))||[];if(e>=y&&!k.includes(w)){var O;k.push(w),S.set("pod-".concat(i),k);try{T(v,n,h,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var P=xe.position;xe.set(null),setTimeout(function(){null!=P&&(u.currentTime(P),l())},500)}if("function"==typeof b&&null!=n&&null!==(O=n.ads)&&void 0!==O&&O[r])try{var I,j={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:g,ad:null==n||null===(I=n.ads)||void 0===I?void 0:I[r],adIndex:r};b({adsData:j}),Te(o,j)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(s=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},T=function(e,n,t,r){null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},k=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},xe.set(i),c=Ae.get(),(v=a.getPlayer(o)).one("loadeddata",function(){c&&w(c)}),p=new Map,m=new Map,g=-1,y=(null===(l=document)||void 0===l||null===(u=l.getElementsByClassName("tvProviderImage"))||void 0===u?void 0:u[0])||null,h=(null==v||null===(s=v.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,b=(null==v||null===(d=v.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,w=function(){var n=t(r.mark(function n(t){var l,u,s,d,c,v,w,S,T,P,I,j,E,C,D,A,x;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return E=function(e){document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",E),0===e.button&&P()},j=function(e){},I=function(){var e,n=w.currentTime(),t=null,r=je(v);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=(o.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,p.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){w.currentTime(t+2.2)},100))},P=function(){var e,n=w.currentTime(),t=null,r=je(v);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=o.ads,u=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>u||n>i)&&!p.has(i)||n>=i&&n<=u)&&(t=i,p.set(i,!0),m.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){w.currentTime(t+.4)},100))},u=!1,n.next=7,fetch(t);case 7:return s=n.sent,n.next=10,s.json();case 10:d=n.sent,c=d.avails,v=[],w=a.getPlayer(o),S=w.controlBar.progressControl,T=S.seekBar.el(),c.map(function(e,n){var t,r,o;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!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===(r=e.adBreakTrackingEvents)||void 0===r||null===(o=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===o?void 0:o[0])||[]})}),!u&&i&&(w.currentTime(i),I()),null!=v&&v.length&&(window.adsQueueList=v),console.log(v,"data"),v.forEach(function(e){var n,t,r=e.markerPositionInSeconds,o=e.ads,i=w.duration();if(!(r>i||Array.isArray(o)&&0==(null==o?void 0:o.length))){var l=r/i*100,a=document.createElement("div");a.className="vjs-seekbar-marker",a.style.left="".concat(l,"%"),a.style.position="absolute",a.style.top="0",a.style.bottom="0",a.style.width="2px",a.style.backgroundColor="#fecc09",a.style.left="".concat(l,"%"),a.style.pointerEvents="none",T.appendChild(a),null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableControls&&(T.style.display="none")}}),w.on("timeupdate",a.throttle(function(){var e=w.currentTime();if(e!==g){g=e;for(var n=!1,t=function(){var t=v[r],o=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=o+i;if(e>=o-1.2&&e<=a+1.2){e>=o&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&p.set(o,!0),pe.disable(),y&&y.classList.add("vjs-hidden"),h&&(h.el().style.pointerEvents="none",h.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),S.el().style.visibility="hidden";for(var u=e-o,s=0,d=0,c=0;c<l.length;c++){var g,w=null==l||null===(g=l[c])||void 0===g?void 0:g.durationInSeconds;if(u<s+w){d=c;break}s+=w}l[d];var T=Math.max(0,i-u),P=Math.round(T);C.style.display="block",x.textContent="".concat(d+1," of ").concat(l.length," • ").concat(k(P));var j=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});j.push.apply(j,f(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&j.push(null==t?void 0:t.podSlotImpressionBeacon),O(e,t,j,d,r,I),"break"}m.delete(o)},r=0;r<v.length;r++){if("break"===t())break}n||(C.style.display="none",S.el().style.visibility="visible",h&&(h.el().style.pointerEvents="auto",h.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),y&&y.classList.remove("vjs-hidden"),pe.enable())}},1e3)),null===(l=document)||void 0===l||l.addEventListener("keydown",function(n){pe.enabled&&"ArrowRight"==n.key&&(P(),e.skip(o,10),n.stopPropagation())}),S.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",E))}),(C=document.createElement("div")).className="ssai-ad-container",(D=document.createElement("div")).className="sponsored-adbox",(A=document.createElement("div")).className="sponsored-text",A.textContent="Sponsored Ad",D.append(A),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",C.append(D),C.append(x),w.el().appendChild(C);case 40:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}(),S=new Map;case 16:case"end":return n.stop()}},n)})),Me.apply(this,arguments)}function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ue=function(i,u,s,c){var v,f,p,m,g,y,h,b,w,k,T,O,P,I,j,E,C,D,x,L,R,V,N,M,_,B,U,H,q,F,Q,W,K=u.res,G=void 0===K?null:K,z=u.sres,Y=void 0===z?null:z,$=null!=s&&s.chromecastReceiverId?["chromecast","html5"]:["html5"],Z=(null===(v=G)||void 0===v?void 0:v.contentType)||"video",ee=a.impolicy16x9(null===(f=G)||void 0===f||null===(p=f[Z])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.videoImageUrl)||a.impolicy16x9(null===(g=G)||void 0===g||null===(y=g[Z])||void 0===y||null===(h=y.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),ne=(null===(w=G)||void 0===w||null===(k=w[Z])||void 0===k||null===(T=k.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,te=(null===(O=G)||void 0===O||null===(P=O[Z])||void 0===P||null===(I=P.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,re=e.getAdsURL(G);G=Be(Be({},G),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var oe="MEDIA_TAILOR"==(null===(j=window)||void 0===j||null===(E=j.app_data)||void 0===E||null===(C=E.appcmsMain)||void 0===C||null===(D=C.adsConfig)||void 0===D?void 0:D.vodAdSticherProvider)||"MEDIA_TAILOR"==(null===(x=window)||void 0===x||null===(L=x.customData)||void 0===L||null===(R=L.ads)||void 0===R?void 0:R.vodAdSticherProvider)||!1,ie=(null==s?void 0:s.latency)||6,le=(null==s?void 0:s.skin_settings)||{},ae=(Q={enableSmoothSeeking:!0,controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==le?void 0:le.pictureInPictureToggle)||!1},playbackRates:null!=le&&le.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==s.skin,liveui:ne},n(Q,"autoplay",null==s?void 0:s.autoplay),n(Q,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!re),n(Q,"loop",(null==s?void 0:s.loop)||!1),n(Q,"audioPosterMode",null==s?void 0:s.audioPosterMode),n(Q,"html5",Be(Be({dash:Be(Be(Be({},!o.browser.IS_SAFARI&&{useTTML:!0}),(null==s?void 0:s.debugConfig)&&(null==s||null===(V=s.debugConfig)||void 0===V?void 0:V.enable)&&{debug:!1,logLevel:null!=s&&null!==(N=s.debugConfig)&&void 0!==N&&N.logLevel?null==s||null===(M=s.debugConfig)||void 0===M?void 0:M.logLevel:"off"}),{},{updateSettings:{streaming:{delay:{liveDelay:ie},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Be({},"IE"==d.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}},null!==(_=window)&&void 0!==_&&null!==(B=_.customData)&&void 0!==B&&B.isSmartTV?{bufferToKeep:10,bufferTimeAtTopQuality:15,bufferTimeAtTopQualityLongForm:15,bufferPruningInterval:5}:{}),vhs:Be(Be({liveRangeSafeTimeDelta:ie,useDevicePixelRatio:!0,experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==s||null===(U=s.customData)||void 0===U?void 0:U.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(H=null==s?void 0:s.enableLowInitialPlaylist)||void 0===H||H}),nativeTextTracks:"Safari"==d.detectBrowser()},0==(null==s||null===(q=s.customData)||void 0===q?void 0:q.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(F=s.customData)||void 0===F?void 0:F.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(Q,"poster",ee),n(Q,"techOrder",$),n(Q,"chromecast",{requestCustomDataFn:function(e){var n=a.getPlayer(i),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var r,o,i,l,a,u,s,d,c,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,y,h,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,O=(null==T?void 0:T.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(y=g[0])||void 0===y||null===(h=y.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=O;var P=(null==T?void 0:T.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=P}var I=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=I;var j=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=j;var E=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=E;var C=null==e||null===(s=e[f])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=C,p.subTitles=t,p.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(G,e,t)},modifyLoadRequestFn:function(e){var n,t,r,o,l,u=a.getPlayer(i),s=(null==u?void 0:u.currentSource())||{};!(null===(n=G)||void 0===n||null===(t=n[Z])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(o=r.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),Q);if(!o.getPlayers()[i]){null===(W=window)||void 0===W||!W.customData.isSmartTV||null!=s&&s.disableControls||(ae.spatialNavigation={enabled:!0,horizontalSeek:!0});try{o.log.level("off")}catch(e){}var ue=o(i,ae,function(){var n=t(r.mark(function n(){var t,a,u,d,v,f,p,m,g,y,h,b,w,k,T,O,P,I,j,E,C,D,x,L,R,V,N,M,_,B,U,H,q,F,Q,W,K,z,$;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:try{ue.log.level("off")}catch(e){}return console.log(ue),console.log(o.VERSION),console.log(o.getPlugins()),n.next=6,A(s,G);case 6:try{null===(M=window)||void 0===M||!M.customData.isSmartTV||null!=s&&s.disableControls||ue.spatialNavigation.start()}catch(e){}if(_=null===(t=G)||void 0===t||null===(a=t[Z])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.startOverTime,te&&c.resolve(Be({status:!0,msg:"Player Initialised"},Y?{seriesResponse:Y,response:G}:{response:G})),e.inititateBeacon(i,null==s?void 0:s.analyticsCb),J(i,s),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),ne&&S(i,_),!re||null!=s&&null!==(d=s.customData)&&void 0!==d&&d.disableAds||e.initialiseAdvertisement(i,re,G),B=e.getSource(G,i),console.log(B),null!=s&&s.nearestClusterUrl&&(B=e.getUpdatedClusterSource(B,s.nearestClusterUrl)),!oe||null===(v=G)||void 0===v||null===(f=v.video)||void 0===f||!f.isSSAIEnabled){n.next=21;break}return n.next=20,Le(i,G);case 20:B=n.sent;case 21:B?e.loadVideo(i,B):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:G}),e.handleError(i,"Incompatible / Missing Source")),((null===(p=G)||void 0===p||null===(m=p[Z])||void 0===m||null===(g=m.contentDetails)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0||(null===(h=G)||void 0===h||null===(b=h[Z])||void 0===b||null===(w=b.closedCaptions)||void 0===w?void 0:w.length)>0)&&(K=(null===(H=G)||void 0===H||null===(q=H[Z])||void 0===q||null===(F=q.contentDetails)||void 0===F?void 0:F.closedCaptions)||(null===(Q=G)||void 0===Q||null===(W=Q[Z])||void 0===W?void 0:W.closedCaptions),U=K.filter(function(e){return"VTT"===e.format}),l.addCaptions(i,U)),null!=s&&s.disableControls&&e.disableControls(i),"MEDIA_TAILOR"==(null===(k=window)||void 0===k||null===(T=k.app_data)||void 0===T||null===(O=T.appcmsMain)||void 0===O||null===(P=O.adsConfig)||void 0===P?void 0:P.vodAdSticherProvider)&&null!==(I=window)&&void 0!==I&&null!==(j=I.app_data)&&void 0!==j&&null!==(E=j.appcmsMain)&&void 0!==E&&null!==(C=E.adsConfig)&&void 0!==C&&C.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(D=window)||void 0===D||null===(x=D.customData)||void 0===x||null===(L=x.ads)||void 0===L?void 0:L.vodAdSticherProvider)&&null!==(R=window)&&void 0!==R&&null!==(V=R.customData)&&void 0!==V&&null!==(N=V.ads)&&void 0!==N&&N.vodAdClientSideTracking?(s.customData.disableControls=!0,z=e.getSource(null==ae?void 0:ae.res,i)||{},$=z.src,Ne(i,$)):X(i,Be(Be(Be({},s),ae),{},{liveVideo:te,isDvrEnabled:ne,res:G,sres:Y})),ve(i,Be(Be(Be({},s),ae),{},{liveVideo:te}),c,{res:G,sres:Y});case 26:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},He={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Qe,We=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=Ke(e);Ue(o,{res:i},e,{resolve:t,reject:r})},Ke=function(n){var t,r,o,i,l,a,u,s,d=null==n?void 0:n.streamingInfo,c=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,v=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,p=(null==n||null===(o=n.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,m=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,g=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],y=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,h=null==n?void 0:n.token,b=e.getDecodedToken(h),w=null==b?void 0:b.site;return Fe(Fe({id:null==He?void 0:He[w]},!v&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:v,streamingInfo:{videoAssets:Fe(Fe({},y&&{drmProvider:y}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==d?void 0:d.isDvrEnabled},gist:Fe({},m&&{videoImageUrl:m}),contentDetails:Fe({},(null==g?void 0:g.length)>0&&{closedCaptions:f(g)})},ads:{preRoll:{adTags:{web:Fe(Fe({},p&&{active:!0}),p&&{url:p})}}}})};function Ge(e,n){return ze.apply(this,arguments)}function ze(){return(ze=t(r.mark(function n(t,o){var i,l,a,u,s,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,a=null==t?void 0:t.videoId,u=null==t?void 0:t.playerId,s=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:d=n.sent,e.getVideoDetails(a,d).then(function(n){var r,o,c,v;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(c=o.gist)||void 0===c?void 0:c.contentType,e.setCurrentVideo(null==n?void 0:n.data);var f,p=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(v=t.watchHistory)&&void 0!==v&&v.enable&&!s)if((null===(f=t.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,g,y,h=oe((null===(m=t.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==t?void 0:t.siteOwner);if(h&&h.length)t.watchHistoryResumeTime=(null===(g=h[0])||void 0===g?void 0:g.watchedTime)||null,t.watchedPercentage=(null===(y=h[0])||void 0===y?void 0:y.watchedPercentage)||null;p.contentType="video",Ue(u,{res:p},t,{resolve:i,reject:l})}else e.getVideoInfo(a,d).then(function(e){var n,r,o,i,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,r,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(e))}).finally(function(){Ue(u,{res:p},t,{resolve:i,reject:l})});else Ue(u,{res:p},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,u,l,a)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Je(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=t(r.mark(function n(t,o){var i,l,a,u,s;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,n.next=3,e.getToken();case 3:a=n.sent,u=null==t?void 0:t.playerId,s=null==t?void 0:t.epg,e.getLinearChannelDetails(s,a).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==s?void 0:s.channelId,Ue(u,{res:n},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,u,l,videoId)});case 7:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ye(e,n){return $e.apply(this,arguments)}function $e(){return($e=t(r.mark(function n(t,o){var i,l,a,u,s,d,c;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(i=t.series)||void 0===i?void 0:i.id,e.getSeriesDetails(c,u).then(function(n){var r,o,i,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(o=r.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);e.createSeriesWatchMap(c,u),e.getVideoDetails(f,u).then(function(n){var r,o,i;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,e.setCurrentVideo(n.data),Ue(s,{res:null==n?void 0:n.data,sres:d},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function en(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:i.onTimeUpdate,getVideoDuration:i.getVideoDuration,getVideoCurrentTime:i.getVideoCurrentTime,onVideoEnded:i.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(r.mark(function t(o,i){var l,u,s,d,v,f,p,g,y,h,b,w,k,S,T,O,P,I,j,E,D,A,x;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(b=(null==n?void 0:n.videoSourceUrl)||!1,w=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,S=null==n?void 0:n.videoId,T=(null==n||null===(u=n.series)||void 0===u?void 0:u.enable)||!1,O=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,P=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",P),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),P&&!e.isTokenExpired(P)){t.next=16;break}return i({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}}),t.abrupt("return");case 16:Qe=JSON.parse(atob(P.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(s=Qe)||void 0===s||!s.anonymousId),n.siteOwner=(null===(d=Qe)||void 0===d?void 0:d.site)||null,n.userId=(null===(v=Qe)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=Qe)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,I=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable?null:null==n?void 0:n.chromecastReceiverId,j=(null==n||null===(g=n.analytics)||void 0===g?void 0:g.gaId)||null,(E=null==n?void 0:n.errors)&&(window.customErrors=E),window.customData=null==n?void 0:n.customData,c.setLocalisation(null==n||null===(y=n.customData)||void 0===y?void 0:y.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!a.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,C(n);case 33:j&&m("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then(function(){return e.runGtag(j)}).catch(function(e){}),(D=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(I)))&&D.addEventListener("contextmenu",function(e){return e.preventDefault()}),b?(x={directPlaybackUrl:b,id:A="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(A,P).then(function(e){var t=(null==e?void 0:e.data)||{};Ue(I,{res:en(en({},t),x)},n,{resolve:o,reject:i})}).catch(function(n){e.initiateErrorHandling(n,I,i,A)}):Ue(I,{res:x},n,{resolve:o,reject:i})):O?We(n,{resolve:o,reject:i}):T?Ye(n,{resolve:o,reject:i}):k?Je(n,{resolve:o,reject:i}):Ge(n,{resolve:o,reject:i});case 37:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:u.getRenditions,getSelectedRendition:u.getSelectedRendition,skip:e.skip,getPlayer:a.getPlayer,play:e.play,pause:e.pause,isPaused:e.isPaused,detectBrowser:d.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:i.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,getAudioTracks:y,enableAudioTrack:h,playSelectedResolution:s.playSelectedResolution,getSource:e.getSource,setVolume:b,getVolume:w,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:Oe,getPlayerVersion:function(){return window.vl_player_version},getTextTracksWithCuesDetails:l.getTextTracksWithCuesDetails,playerEvents:i.playerEvents}},exports.initialiseKeyboardEvents=function(n,t){var r,o,i,l=a.getPlayer(n),u=null==l||null===(r=l.controlBar)||void 0===r||null===(o=r.playToggle)||void 0===o?void 0:o.el_,s=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(r){var o,i,a,d,c,v,f,p,m;if(pe.enabled&&"input"!=r.target.localName){var g=r.key,y=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(r.preventDefault(),null==s||s.focus()),g){case" ":null==u||u.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":y&&!1===t.liveui||e.rewind(n,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(d=a.appcmsMain)||void 0===d||null===(c=d.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(v=window)&&void 0!==v&&null!==(f=v.app_data)&&void 0!==f&&null!==(p=f.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;y||e.skip(n,10)}}},!0)},exports.setupAdvertisementMarkers=Ne;
|