@viewlift/player-backup 1.0.200-backup → 1.0.201
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/{autoNextVideo-5d95a0bf.js → autoNextVideo-29eef3b1.js} +1 -1
- package/cjs/bundle.css +75 -75
- package/cjs/{features-6d746efe.js → features-0a7f4aad.js} +1 -1
- package/cjs/{generic-fe0b0a0c.js → generic-de956683.js} +1 -1
- package/cjs/{index-9b9cc3b9.js → index-6c2831a2.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-4849bd29.js → keyboardShortcuts-3c66843e.js} +1 -1
- package/cjs/{multicamv2-681192ef.js → multicamv2-4b0e3030.js} +1 -1
- package/cjs/{multicamv2-fc5ca3f8.js → multicamv2-56cbdd14.js} +1 -1
- package/cjs/{nextEpisodeButton-2eb621c9.js → nextEpisodeButton-72ade955.js} +1 -1
- package/cjs/{playlist-4d24f689.js → playlist-f13a4c84.js} +1 -1
- package/cjs/{series-83defb45.js → series-69a1d552.js} +1 -1
- package/cjs/{series-v2-5f5a6044.js → series-v2-cc6e26d1.js} +1 -1
- package/cjs/{series-v2-b818b066.js → series-v2-fe7af588.js} +1 -1
- package/cjs/{skin-ef26d17f.js → skin-439e4eb3.js} +1 -1
- package/cjs/{skin-86c78632.js → skin-5cb47f83.js} +1 -1
- package/cjs/{skin-4344e98f.js → skin-a4ab9cf0.js} +1 -1
- package/cjs/{skin-c5ce5b52.js → skin-a5871744.js} +1 -1
- package/cjs/{skin-11687ffb.js → skin-a7eea90b.js} +1 -1
- package/cjs/skin-a96f44cb.js +1 -0
- package/cjs/t2-616750fe.js +1 -0
- package/cjs/{videoSelector-f7ac92db.js → videoSelector-7edb2c71.js} +1 -1
- package/cjs/{videoSelector-e367b54c.js → videoSelector-e4164582.js} +1 -1
- package/esm/{autoNextVideo-86a5c58d.js → autoNextVideo-d6b60993.js} +1 -1
- package/esm/bundle.css +75 -75
- package/esm/{features-38b5653b.js → features-15fd081c.js} +1 -1
- package/esm/{generic-60698c75.js → generic-6c2c984a.js} +1 -1
- package/esm/{index-b4345b5f.js → index-0388518b.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-6d845732.js → keyboardShortcuts-66f3c994.js} +1 -1
- package/esm/{multicamv2-5cb67a26.js → multicamv2-a853413e.js} +1 -1
- package/esm/{multicamv2-dafd8c57.js → multicamv2-c0bf4bf4.js} +1 -1
- package/esm/{nextEpisodeButton-38afabd1.js → nextEpisodeButton-73d67a99.js} +1 -1
- package/esm/{playlist-7b4e2e0a.js → playlist-27b9ed7b.js} +1 -1
- package/esm/{series-2edc0e72.js → series-cfe7baaf.js} +1 -1
- package/esm/{series-v2-92d8bca2.js → series-v2-332ba620.js} +1 -1
- package/esm/{series-v2-8e704b3d.js → series-v2-c9519185.js} +1 -1
- package/esm/{skin-63918e2e.js → skin-2cecaca3.js} +1 -1
- package/esm/{skin-d7fcaf14.js → skin-529c205a.js} +1 -1
- package/esm/{skin-f359459e.js → skin-64e0ee25.js} +1 -1
- package/esm/{skin-e94189e9.js → skin-a10924f0.js} +1 -1
- package/esm/{skin-39eb38c4.js → skin-c501e7a2.js} +1 -1
- package/esm/{skin-784a839e.js → skin-f5e68bf2.js} +1 -1
- package/esm/t2-100a4b12.js +1 -0
- package/esm/{videoSelector-2c426e2a.js → videoSelector-489acf81.js} +1 -1
- package/esm/{videoSelector-b0b2b494.js → videoSelector-51afa0bf.js} +1 -1
- package/package.json +1 -1
- package/cjs/skin-e86f99b3.js +0 -1
- package/cjs/videojs_contrib_dash-5ec0e9bd.js +0 -1
- package/esm/videojs_contrib_dash-5ee2e52c.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,i=require("./generic-
|
|
1
|
+
"use strict";var e,i=require("./generic-de956683.js"),t=require("./util-6edeeb8a.js"),n=require("./skin-34fbc337.js"),o=0,u=0,d=function e(t,o,d,l){u=t,t>d.length-1||(i.setVideoIdx(u+1),i.load(o,d[t].id).then((function(e){n.highlightVideo(u,o),u++,r(e,t+1)})).catch((function(i){r(i),setTimeout((function(){n.highlightVideo(u,o),u++,e(u,o,d)}),5e3)})))},r=function(i){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e&&e(i,t)};exports.autoPlayNext=function(l){clearTimeout(o);var c=null==l?void 0:l.content;e=null==l?void 0:l.cb;var h=l.playerId;t.onVideoEnded(h,(function(){var e=n.getPlayer(h);0!==(null==e?void 0:e.currentTime())&&((u=i.getVideoIdx())>c.length-1||(i.setVideoIdx(u+1),i.load(h,c[u].id).then((function(e){n.highlightVideo(u,h),i.setCurrentVideo(e.response),u++,r(e,idx+1)})).catch((function(e){r(e),n.highlightVideo(u,h),u++,o=setTimeout((function(){i.isPaused(h)&&d(u,h,c)}),5e3)}))))}))},exports.switchToNext=d;
|
package/cjs/bundle.css
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
3
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
6
4
|
height: 0.7em;
|
|
7
5
|
position: absolute;
|
|
@@ -149,6 +147,77 @@
|
|
|
149
147
|
|
|
150
148
|
|
|
151
149
|
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
.ssai-ad-container{
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
|
+
.ssai-ad-container .ad-counter{
|
|
156
|
+
position: absolute;
|
|
157
|
+
bottom: 3rem;
|
|
158
|
+
left: 7.4rem;
|
|
159
|
+
color: white;
|
|
160
|
+
padding: 3.6px 10px;
|
|
161
|
+
font-size: 12px;
|
|
162
|
+
border-radius: 4px;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
text-overflow: ellipsis;
|
|
165
|
+
font-family: sans-serif;
|
|
166
|
+
white-space: nowrap;
|
|
167
|
+
-webkit-user-select: none;
|
|
168
|
+
-moz-user-select: none;
|
|
169
|
+
font-weight: 700;
|
|
170
|
+
text-shadow: 0 0 4px rgba(0, 0, 0, .75);
|
|
171
|
+
user-select: none;
|
|
172
|
+
}
|
|
173
|
+
.ad-info-icon:hover {
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.ssai-ad-container .ad-visit-advertiser{
|
|
178
|
+
position: absolute;
|
|
179
|
+
top: 18px;
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
font-weight: 600;
|
|
182
|
+
right: 16px;
|
|
183
|
+
text-shadow: 0 0 4px rgba(0, 0, 0, .75);
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.ssai-ad-container .sponsored-adbox{
|
|
188
|
+
position: absolute;
|
|
189
|
+
bottom: 3rem;
|
|
190
|
+
font-family: sans-serif;
|
|
191
|
+
left: 0.8rem;
|
|
192
|
+
display: flex;
|
|
193
|
+
align-items: center;
|
|
194
|
+
color: white;
|
|
195
|
+
font-size: 12px;
|
|
196
|
+
border-radius: 4px;
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
text-overflow: ellipsis;
|
|
199
|
+
white-space: nowrap;
|
|
200
|
+
-webkit-user-select: none;
|
|
201
|
+
-moz-user-select: none;
|
|
202
|
+
font-weight: 700;
|
|
203
|
+
text-shadow: 0 0 4px rgba(0, 0, 0, .75);
|
|
204
|
+
user-select: none;
|
|
205
|
+
}
|
|
206
|
+
.ssai-ad-container .sponsored-adbox .sponsored-text{
|
|
207
|
+
margin-right: 0.4rem;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@media (max-width:600px){
|
|
211
|
+
.ssai-ad-container .ad-info-title{
|
|
212
|
+
max-width: 190px;
|
|
213
|
+
}
|
|
214
|
+
.ssai-ad-container .ad-visit-advertiser{
|
|
215
|
+
right: 8px;
|
|
216
|
+
top: 8px;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
|
|
152
221
|
/* CSS for videojs-dvr-seekbar */
|
|
153
222
|
|
|
154
223
|
.video-js.vjs-dvr-seekbar {
|
|
@@ -295,75 +364,6 @@
|
|
|
295
364
|
display: none;
|
|
296
365
|
}
|
|
297
366
|
|
|
298
|
-
.ssai-ad-container{
|
|
299
|
-
display: none;
|
|
300
|
-
}
|
|
301
|
-
.ssai-ad-container .ad-counter{
|
|
302
|
-
position: absolute;
|
|
303
|
-
bottom: 3rem;
|
|
304
|
-
left: 7.4rem;
|
|
305
|
-
color: white;
|
|
306
|
-
padding: 3.6px 10px;
|
|
307
|
-
font-size: 12px;
|
|
308
|
-
border-radius: 4px;
|
|
309
|
-
overflow: hidden;
|
|
310
|
-
text-overflow: ellipsis;
|
|
311
|
-
font-family: sans-serif;
|
|
312
|
-
white-space: nowrap;
|
|
313
|
-
-webkit-user-select: none;
|
|
314
|
-
-moz-user-select: none;
|
|
315
|
-
font-weight: 700;
|
|
316
|
-
text-shadow: 0 0 4px rgba(0, 0, 0, .75);
|
|
317
|
-
user-select: none;
|
|
318
|
-
}
|
|
319
|
-
.ad-info-icon:hover {
|
|
320
|
-
cursor: pointer;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.ssai-ad-container .ad-visit-advertiser{
|
|
324
|
-
position: absolute;
|
|
325
|
-
top: 18px;
|
|
326
|
-
font-size: 14px;
|
|
327
|
-
font-weight: 600;
|
|
328
|
-
right: 16px;
|
|
329
|
-
text-shadow: 0 0 4px rgba(0, 0, 0, .75);
|
|
330
|
-
cursor: pointer;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.ssai-ad-container .sponsored-adbox{
|
|
334
|
-
position: absolute;
|
|
335
|
-
bottom: 3rem;
|
|
336
|
-
font-family: sans-serif;
|
|
337
|
-
left: 0.8rem;
|
|
338
|
-
display: flex;
|
|
339
|
-
align-items: center;
|
|
340
|
-
color: white;
|
|
341
|
-
font-size: 12px;
|
|
342
|
-
border-radius: 4px;
|
|
343
|
-
overflow: hidden;
|
|
344
|
-
text-overflow: ellipsis;
|
|
345
|
-
white-space: nowrap;
|
|
346
|
-
-webkit-user-select: none;
|
|
347
|
-
-moz-user-select: none;
|
|
348
|
-
font-weight: 700;
|
|
349
|
-
text-shadow: 0 0 4px rgba(0, 0, 0, .75);
|
|
350
|
-
user-select: none;
|
|
351
|
-
}
|
|
352
|
-
.ssai-ad-container .sponsored-adbox .sponsored-text{
|
|
353
|
-
margin-right: 0.4rem;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
@media (max-width:600px){
|
|
357
|
-
.ssai-ad-container .ad-info-title{
|
|
358
|
-
max-width: 190px;
|
|
359
|
-
}
|
|
360
|
-
.ssai-ad-container .ad-visit-advertiser{
|
|
361
|
-
right: 8px;
|
|
362
|
-
top: 8px;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
|
|
367
367
|
.video-js .tvProviderImage {
|
|
368
368
|
position: absolute;
|
|
369
369
|
right: 1rem;
|
|
@@ -391,6 +391,10 @@
|
|
|
391
391
|
|
|
392
392
|
|
|
393
393
|
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
394
398
|
.video-js .multicamera-parent.default{
|
|
395
399
|
height: 345px;
|
|
396
400
|
position: absolute;
|
|
@@ -470,10 +474,6 @@
|
|
|
470
474
|
}
|
|
471
475
|
|
|
472
476
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
477
|
/* nextep */
|
|
478
478
|
.next-ep-preview{
|
|
479
479
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-de956683.js"),s=require("./renditions-b41243b6.js"),d=require("./skin-34fbc337.js"),c=require("./localisation-56e0a999.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-585a6876.js")})).then((function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=d.getPlayer(e).el(),r=0,n=d.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-4b0e3030.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-56cbdd14.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-72ade955.js")})).then((function(n){var o=n.default,l=d.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=d.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-f13a4c84.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-719c85a4.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-69a1d552.js")})).then((function(n){var o=n.seriesModule,l=d.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},c=0;c<a.length;c++)s(c)}))},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then((function(){return require("./series-v2-fe7af588.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./series-v2-cc6e26d1.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-429f8165.js")})).then((function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-e4164582.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-7edb2c71.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("./skin-34fbc337.js"),a=require("./browser-77c57718.js"),l=require("js-cookie"),d=require("ua-parser-js"),u=require("./captions-fbd6fefb.js");function s(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function c(e,t){s("event",e,t)}var v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function p(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?m(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var f={name:"@viewlift/player",version:"2.0.19",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=f.version;var w,g=function(e,t){var n,i,r,a,l,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":y.get()+"".concat(null==v?void 0:v.getVideoDetails),params:p({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":f.version},withCredentials:!0})},I=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:y.get()+v.getLinearChannelDetails,params:p(p(p(p(p({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},E=function(){var e=t(n.mark((function e(t){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return i=e.sent,e.abrupt("return",o({url:y.get()+"".concat(null==v?void 0:v.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:p({},t),params:p({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},h=function(e){var t=e.videoId;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},y=(w=null==v?void 0:v.apiBaseUrl,{set:function(e){e&&(w=e)},get:function(){return w}}),_=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},b=null;function D(){return{set:function(e){e&&(b=e)},get:function(){return b}}}var O,F,P,S,R,L,V=function(){var e=t(n.mark((function e(){var t,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=D().get(),i=y.get(),e.prev=2,e.next=5,axios({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),W=null,C=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!_(t)){e.next=6;break}return W||(W=V().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&D().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){W=null}))),e.abrupt("return",W);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){F=e},N=function(){return F},B=function(){return O},M=function(e){P=e},j=function(e){if(S){var t=S.get(e);M(t+1)}},U=(L=0,{set:function(e){e>=0&&(L=e)},get:function(){return L}});function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function H(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var G=0,z=function(){var e,t,n,i,o,r,a,l=N();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function Y(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function q(){var e=window.sessionStorage.getItem("uid");return e||(e=Y(),window.sessionStorage.setItem("uid",e),e)}function X(){return J.apply(this,arguments)}function J(){return(J=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=Y(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,c(r?"FAILED_TO_START":"DROPPED_STREAM",H({pfm:window.platform,uid:q(),vid:z(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e,t){e.one("play",tryCatch((function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null}),100),c("PLAY",H({pfm:window.platform,uid:q(),vid:z(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":z(),watchTime:Math.floor(e.currentTime())})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&G<4)G++,c("BUFFERING",H({pfm:window.platform,uid:q(),vid:z(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",H({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:q(),vid:z()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;c("AD_REQUEST",H({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:q(),vid:z(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),c("AD_IMPRESSION",H({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:q(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:z()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(G=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(K(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var K=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,p,f,w,g,I,E,T,h,y,_;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return E=e.sent,T=A(E),h=null==T?void 0:T.site,y=null==T?void 0:T.siteId,e.t0=H,e.t1=H,e.t2=H({aid:h,cid:y,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=q(),e.t5=z(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(l=t.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=26,X();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(f=p.beacon)||void 0===f?void 0:f.params,e.t31=(0,e.t0)(e.t29,e.t30),_=[e.t31],o({url:(null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g||null===(I=g.beacon)||void 0===I?void 0:I.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:_}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var Q=function(){var e=U.get();return e>=0?e+1:1},Z=function(){var e,t,n,i=B(),o=N(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=U.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1};function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=d.UAParser(navigator.userAgent);var te=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},ne=function(e){var t=ie(e,"video.tags",[]),n=ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},ie=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},oe=function(){var e,t,n,i,o,a,d,u,s,c,v,m,p,f,w,g,I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=arguments.length>1?arguments[1]:void 0,T=arguments.length>2?arguments[2]:void 0,h=(null==T?void 0:T.contentType)||"video",y=null==T||null===(e=T[h])||void 0===e?void 0:e.metadata,_=r.getPlayer(E);if(!I.includes("VIEWLIFT_"))return I;var b,D=window.getComputedStyle(document.getElementById(E),null),O=Math.trunc(D.getPropertyValue("height").slice(0,-2)),F=Math.trunc(D.getPropertyValue("width").slice(0,-2)),P="linearchannel"===h?null==T||null===(t=T.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==T?void 0:T.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:ie(T,"video.gist.id",""),S=null,R=null;"function"==typeof window.__gpp&&(null===(b=window)||void 0===b||b.__gpp("ping",(function(e){S=null==e?void 0:e.gppString,R=null==e?void 0:e.sectionList[0]})));var L=ee(ee({},re(y)),{},{VIEWLIFT_WIDTH:F,VIEWLIFT_HEIGHT:O,VIEWLIFT_SIZE:te(F,O),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ie(T,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==_||null===(d=_.options_)||void 0===d?void 0:d.autoplay)||1,VIEWLIFT_MUTE:(null==_||null===(u=_.options_)||void 0===u?void 0:u.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:ne(T),VIEWLIFT_MEDIA_ID:P,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ie(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:P,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ie(T,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ie(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.site)||void 0===v?void 0:v.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:ie(null===(m=window)||void 0===m||null===(p=m.app_data)||void 0===p||null===(f=p.site)||void 0===f?void 0:f.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:P,VIEWLIFT_CONTENT_TITLE:ie(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:ie(T,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ie(T,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Z(),VIEWLIFT_SEASON_NUMBER:Q(),VIEWLIFT_CONTENT_TAGS:ne(T),VIEWLIFT_GPP_SID:R||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:S||"VIEWLIFT_GPP"},null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g?void 0:g.macros);for(var V in L){var W=new RegExp(V,"g");I=I.replace(W,L[V])}return I},re=function(e){var t,n,i,o,r,l,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||c?(a.isMobile()?s?d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),d=a.isMobile()?ee(ee({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ee(ee({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),d=a.isMobile()?ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d},ae=function(e,t){var n,i,o,r,l,d,u,s,c,v,m,p,f,w=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,T=(null==e||null===(d=e[w])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return de(E);if(g){var y=ue(I,t);return y.src=oe(y.src,t,e),y}if("Safari"!==a.detectBrowser()&&h)return le(I);if(T){var _=de(I);return _.src=oe(_.src,t,e),_}if(null!=I&&I.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return b.src=oe(b.src,t,e),b}return null},le=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},de=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},ue=function(e,t){var n=e.fairPlay,o=e.widevine,l=e.playReady,d=a.detectBrowser();if(r.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return se(t),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(se(t),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var se=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==a.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ce=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},ve=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var me=!1,pe=function(e,t,n){var i=oe(t,e,n),o=r.getPlayer(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,a=r.getPlayer(e);if(null!==a.el_){me=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),me&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,(function(){s&&a.ima.initializeAdDisplayContainer()}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i)}};function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var we=function(e){return!!i.getPlayer("".concat(e))},ge=function(){var e=t(n.mark((function e(t,i){var o,a,l,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,C();case 3:return a=e.sent,l=r.getPlayer(t),e.abrupt("return",new Promise((function(e,n){I(i,a).then((function(n){var r=null==n?void 0:n.data;window.sid=Y(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=ae(r,t);x(r),a&&o?(Te(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ie=function(){var e=t(n.mark((function e(t,i,o){var a,l,d,s,c,v;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return s=e.sent,(B()||null)&&j(i),c=0,v=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&T(i,s).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,v=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){g(i,s).then((function(i){var o,a,l,d,s,m,p,f,w,g,I=null==i?void 0:i.data,E=(null==I||null===(o=I.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;x(i.data);var T=(null==I||null===(l=I.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(m=s.web)||void 0===m?void 0:m.active)&&(null==I||null===(p=I.ads)||void 0===p||null===(f=p.preRoll)||void 0===f||null===(w=f.adTags)||void 0===w||null===(g=w.web)||void 0===g?void 0:g.url);T&&pe(t,T,I);var h=ae(I,t);if(h){var y,_,b,D,O,F,P,S,R,L,V,W,C,A,N=(null==I||null===(y=I.video)||void 0===y||null===(_=y.gist)||void 0===_?void 0:_.videoImageUrl)||(null==I||null===(b=I.video)||void 0===b||null===(D=b.gist)||void 0===D||null===(O=D.imageGist)||void 0===O?void 0:O.r16x9),B=r.getPlayer(t);if(B.poster(N),Te(t,h),B.on("loadstart",(function(){E&&e({status:!0,msg:"Video Loaded",response:I})})),B.on("loadeddata",(function(){ve(),e({status:!0,msg:"Video Loaded",response:I})})),B.one("play",(function(){c&&v<95&&setTimeout((function(){B.currentTime(c)}),0)})),B.one("error",(function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(F=I.video)||void 0===F||null===(P=F.contentDetails)||void 0===P||null===(S=P.closedCaptions)||void 0===S?void 0:S.length)>0||(null==I||null===(R=I.video)||void 0===R||null===(L=R.closedCaptions)||void 0===L?void 0:L.length)>0)V=((null==I||null===(W=I.video)||void 0===W||null===(C=W.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==I||null===(A=I.video)||void 0===A?void 0:A.closedCaptions)).filter((function(e){return"VTT"===e.format})),u.addCaptions(t,V);else u.removeCaptions(t)}else ce(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){he(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Ee=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Te=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},he=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);we(n)&&ce(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?fe(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.authenticateLC=ge,exports.baseUrlManager=y,exports.clearError=ve,exports.createIdxMapping=function(e){S=new Map,e.map((function(e,t){S.set(e.id,t)}))},exports.createSeriesWatchMap=function(e,t){var n=new Map;h({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),R=n})).catch((function(e){return console.log(e)}))},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=r.getPlayer(e);if(Ee(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getCurrentSeries=B,exports.getCurrentVideo=N,exports.getEntitlementData=function(e,t,n,i){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getEpisodeNumber=Z,exports.getLinearChannelDetails=I,exports.getSeasonNumber=Q,exports.getSeriesDetails=function(e,t){var n,i,r=A(t),a=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:y.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=h,exports.getSeriesWatchMap=function(){return R},exports.getSource=ae,exports.getToken=C,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=q,exports.getVideoDetails=g,exports.getVideoIdx=function(){return P},exports.getVideoInfo=T,exports.handleError=ce,exports.initialiseAdvertisement=pe,exports.initiateErrorHandling=he,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",(function(){window.endFirstFrame(n)}))}},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=we,exports.isTokenExpired=_,exports.load=Ie,exports.loadVideo=Te,exports.loadVideoInstantly=function(e,t,n){var i=r.getPlayer(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=D,exports.replaceMacros=oe,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],s("js",new Date),s("config",e)},exports.saveWatchHistory=E,exports.seasonIdxManager=U,exports.setCurrentSeries=function(e){O=e},exports.setCurrentVideo=x,exports.setVideoIdx=M,exports.setVideoIdxById=j,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("./skin-34fbc337.js"),a=require("./browser-77c57718.js"),l=require("js-cookie"),d=require("ua-parser-js"),u=require("./captions-fbd6fefb.js");function s(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function c(e,t){s("event",e,t)}var v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function p(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?m(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var f={name:"@viewlift/player",version:"2.0.20",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=f.version;var w,g=function(e,t){var n,i,r,a,l,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":y.get()+"".concat(null==v?void 0:v.getVideoDetails),params:p({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":f.version},withCredentials:!0})},I=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:y.get()+v.getLinearChannelDetails,params:p(p(p(p(p({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},E=function(){var e=t(n.mark((function e(t){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return i=e.sent,e.abrupt("return",o({url:y.get()+"".concat(null==v?void 0:v.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:p({},t),params:p({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},h=function(e){var t=e.videoId;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},y=(w=null==v?void 0:v.apiBaseUrl,{set:function(e){e&&(w=e)},get:function(){return w}}),_=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},b=null;function D(){return{set:function(e){e&&(b=e)},get:function(){return b}}}var O,F,P,S,R,L,V=function(){var e=t(n.mark((function e(){var t,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=D().get(),i=y.get(),e.prev=2,e.next=5,axios({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),W=null,C=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!_(t)){e.next=6;break}return W||(W=V().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&D().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){W=null}))),e.abrupt("return",W);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){F=e},N=function(){return F},B=function(){return O},M=function(e){P=e},j=function(e){if(S){var t=S.get(e);M(t+1)}},U=(L=0,{set:function(e){e>=0&&(L=e)},get:function(){return L}});function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function H(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var G=0,z=function(){var e,t,n,i,o,r,a,l=N();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function Y(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function q(){var e=window.sessionStorage.getItem("uid");return e||(e=Y(),window.sessionStorage.setItem("uid",e),e)}function X(){return J.apply(this,arguments)}function J(){return(J=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=Y(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,c(r?"FAILED_TO_START":"DROPPED_STREAM",H({pfm:window.platform,uid:q(),vid:z(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e,t){e.one("play",tryCatch((function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null}),100),c("PLAY",H({pfm:window.platform,uid:q(),vid:z(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":z(),watchTime:Math.floor(e.currentTime())})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&G<4)G++,c("BUFFERING",H({pfm:window.platform,uid:q(),vid:z(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",H({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:q(),vid:z()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;c("AD_REQUEST",H({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:q(),vid:z(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),c("AD_IMPRESSION",H({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:q(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:z()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(G=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(K(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var K=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,p,f,w,g,I,E,T,h,y,_;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return E=e.sent,T=A(E),h=null==T?void 0:T.site,y=null==T?void 0:T.siteId,e.t0=H,e.t1=H,e.t2=H({aid:h,cid:y,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=q(),e.t5=z(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(l=t.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=26,X();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(f=p.beacon)||void 0===f?void 0:f.params,e.t31=(0,e.t0)(e.t29,e.t30),_=[e.t31],o({url:(null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g||null===(I=g.beacon)||void 0===I?void 0:I.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:_}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var Q=function(){var e=U.get();return e>=0?e+1:1},Z=function(){var e,t,n,i=B(),o=N(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=U.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1};function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=d.UAParser(navigator.userAgent);var te=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},ne=function(e){var t=ie(e,"video.tags",[]),n=ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},ie=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},oe=function(){var e,t,n,i,o,a,d,u,s,c,v,m,p,f,w,g,I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=arguments.length>1?arguments[1]:void 0,T=arguments.length>2?arguments[2]:void 0,h=(null==T?void 0:T.contentType)||"video",y=null==T||null===(e=T[h])||void 0===e?void 0:e.metadata,_=r.getPlayer(E);if(!I.includes("VIEWLIFT_"))return I;var b,D=window.getComputedStyle(document.getElementById(E),null),O=Math.trunc(D.getPropertyValue("height").slice(0,-2)),F=Math.trunc(D.getPropertyValue("width").slice(0,-2)),P="linearchannel"===h?null==T||null===(t=T.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==T?void 0:T.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:ie(T,"video.gist.id",""),S=null,R=null;"function"==typeof window.__gpp&&(null===(b=window)||void 0===b||b.__gpp("ping",(function(e){S=null==e?void 0:e.gppString,R=null==e?void 0:e.sectionList[0]})));var L=ee(ee({},re(y)),{},{VIEWLIFT_WIDTH:F,VIEWLIFT_HEIGHT:O,VIEWLIFT_SIZE:te(F,O),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ie(T,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==_||null===(d=_.options_)||void 0===d?void 0:d.autoplay)||1,VIEWLIFT_MUTE:(null==_||null===(u=_.options_)||void 0===u?void 0:u.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:ne(T),VIEWLIFT_MEDIA_ID:P,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ie(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:P,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ie(T,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ie(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.site)||void 0===v?void 0:v.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:ie(null===(m=window)||void 0===m||null===(p=m.app_data)||void 0===p||null===(f=p.site)||void 0===f?void 0:f.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:P,VIEWLIFT_CONTENT_TITLE:ie(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:ie(T,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ie(T,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Z(),VIEWLIFT_SEASON_NUMBER:Q(),VIEWLIFT_CONTENT_TAGS:ne(T),VIEWLIFT_GPP_SID:R||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:S||"VIEWLIFT_GPP"},null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g?void 0:g.macros);for(var V in L){var W=new RegExp(V,"g");I=I.replace(W,L[V])}return I},re=function(e){var t,n,i,o,r,l,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||c?(a.isMobile()?s?d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),d=a.isMobile()?ee(ee({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ee(ee({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),d=a.isMobile()?ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d},ae=function(e,t){var n,i,o,r,l,d,u,s,c,v,m,p,f,w=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,T=(null==e||null===(d=e[w])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return de(E);if(g){var y=ue(I,t);return y.src=oe(y.src,t,e),y}if("Safari"!==a.detectBrowser()&&h)return le(I);if(T){var _=de(I);return _.src=oe(_.src,t,e),_}if(null!=I&&I.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return b.src=oe(b.src,t,e),b}return null},le=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},de=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},ue=function(e,t){var n=e.fairPlay,o=e.widevine,l=e.playReady,d=a.detectBrowser();if(r.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return se(t),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(se(t),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var se=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==a.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ce=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},ve=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var me=!1,pe=function(e,t,n){var i=oe(t,e,n),o=r.getPlayer(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,a=r.getPlayer(e);if(null!==a.el_){me=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),me&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,(function(){s&&a.ima.initializeAdDisplayContainer()}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i)}};function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var we=function(e){return!!i.getPlayer("".concat(e))},ge=function(){var e=t(n.mark((function e(t,i){var o,a,l,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,C();case 3:return a=e.sent,l=r.getPlayer(t),e.abrupt("return",new Promise((function(e,n){I(i,a).then((function(n){var r=null==n?void 0:n.data;window.sid=Y(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=ae(r,t);x(r),a&&o?(Te(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ie=function(){var e=t(n.mark((function e(t,i,o){var a,l,d,s,c,v;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return s=e.sent,(B()||null)&&j(i),c=0,v=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&T(i,s).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,v=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){g(i,s).then((function(i){var o,a,l,d,s,m,p,f,w,g,I=null==i?void 0:i.data,E=(null==I||null===(o=I.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;x(i.data);var T=(null==I||null===(l=I.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(m=s.web)||void 0===m?void 0:m.active)&&(null==I||null===(p=I.ads)||void 0===p||null===(f=p.preRoll)||void 0===f||null===(w=f.adTags)||void 0===w||null===(g=w.web)||void 0===g?void 0:g.url);T&&pe(t,T,I);var h=ae(I,t);if(h){var y,_,b,D,O,F,P,S,R,L,V,W,C,A,N=(null==I||null===(y=I.video)||void 0===y||null===(_=y.gist)||void 0===_?void 0:_.videoImageUrl)||(null==I||null===(b=I.video)||void 0===b||null===(D=b.gist)||void 0===D||null===(O=D.imageGist)||void 0===O?void 0:O.r16x9),B=r.getPlayer(t);if(B.poster(N),Te(t,h),B.on("loadstart",(function(){E&&e({status:!0,msg:"Video Loaded",response:I})})),B.on("loadeddata",(function(){ve(),e({status:!0,msg:"Video Loaded",response:I})})),B.one("play",(function(){c&&v<95&&setTimeout((function(){B.currentTime(c)}),0)})),B.one("error",(function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(F=I.video)||void 0===F||null===(P=F.contentDetails)||void 0===P||null===(S=P.closedCaptions)||void 0===S?void 0:S.length)>0||(null==I||null===(R=I.video)||void 0===R||null===(L=R.closedCaptions)||void 0===L?void 0:L.length)>0)V=((null==I||null===(W=I.video)||void 0===W||null===(C=W.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==I||null===(A=I.video)||void 0===A?void 0:A.closedCaptions)).filter((function(e){return"VTT"===e.format})),u.addCaptions(t,V);else u.removeCaptions(t)}else ce(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){he(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Ee=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Te=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},he=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);we(n)&&ce(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?fe(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.authenticateLC=ge,exports.baseUrlManager=y,exports.clearError=ve,exports.createIdxMapping=function(e){S=new Map,e.map((function(e,t){S.set(e.id,t)}))},exports.createSeriesWatchMap=function(e,t){var n=new Map;h({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),R=n})).catch((function(e){return console.log(e)}))},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=r.getPlayer(e);if(Ee(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getCurrentSeries=B,exports.getCurrentVideo=N,exports.getEntitlementData=function(e,t,n,i){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getEpisodeNumber=Z,exports.getLinearChannelDetails=I,exports.getSeasonNumber=Q,exports.getSeriesDetails=function(e,t){var n,i,r=A(t),a=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:y.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=h,exports.getSeriesWatchMap=function(){return R},exports.getSource=ae,exports.getToken=C,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=q,exports.getVideoDetails=g,exports.getVideoIdx=function(){return P},exports.getVideoInfo=T,exports.handleError=ce,exports.initialiseAdvertisement=pe,exports.initiateErrorHandling=he,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",(function(){window.endFirstFrame(n)}))}},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=we,exports.isTokenExpired=_,exports.load=Ie,exports.loadVideo=Te,exports.loadVideoInstantly=function(e,t,n){var i=r.getPlayer(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=D,exports.replaceMacros=oe,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],s("js",new Date),s("config",e)},exports.saveWatchHistory=E,exports.seasonIdxManager=U,exports.setCurrentSeries=function(e){O=e},exports.setCurrentVideo=x,exports.setVideoIdx=M,exports.setVideoIdxById=j,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),o=require("./skin-34fbc337.js"),a=require("./generic-fe0b0a0c.js"),l=require("./autoNextVideo-5d95a0bf.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=require("@babel/runtime/helpers/asyncToGenerator"),d=require("@babel/runtime/regenerator"),p=require("@babel/runtime/helpers/defineProperty"),v=require("@babel/runtime/helpers/slicedToArray"),m=[],f=function(e,t){var n=o.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=a.getVideoIdx();l.switchToNext(i,e,m)}};function g(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function h(e){return x.apply(this,arguments)}function x(){return(x=c(d.mark((function e(t){return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),o=v(i,2),a=o[0],l=o[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var o=i.width/l,u=i.height/a,s=0;s<a;s++)for(var c=0;c<l;c++){var d=document.createElement("canvas");d.width=o,d.height=u,d.getContext("2d").drawImage(i,c*o,s*u,o,u,0,0,o,u);var p=d.toDataURL("image/png");r.push({uri:p,duration:t.duration})}e(r)},n.onerror=function(n){var r,i,o,a;e([{duration:t.duration,uri:"".concat(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(a=o.images)||void 0===a?void 0:a.placeholderCover)}])}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return b.apply(this,arguments)}function b(){return(b=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",g(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function w(e){return E.apply(this,arguments)}function E(){return(E=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return h(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n,i=e.duration;r[i*t]={src:e.uri,style:(n={left:"-60px",height:"85px",width:"130px"},p(n,"left","-60px"),p(n,"border","1px solid transparent"),p(n,"borderRadius","4px"),n)}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e={0:{src:"example-thumbnail.png"}},t=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===u(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",(function(i){var o,a,l,u,s,c,d,p;function v(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",v),p()}a=t({},e,i),u=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=u.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(o=document.createElement("div")).className="vjs-thumbnail-holder",l=document.createElement("img"),o.appendChild(l),l.src=a[0].src,l.className="vjs-thumbnail",t(l.style,a[0].style),l.style.left||l.style.right||(l.onload=function(){l.style.left=-l.naturalWidth/2+"px"}),c=u.duration(),u.on("durationchange",(function(e){c=u.duration()})),u.on("loadedmetadata",(function(e){c=u.duration()})),(s=u.controlBar.progressControl).el().appendChild(o),d=function(e){var i,u,d,p,v,m,f,g,h,x;for(u in d=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=r(s.el()).getBoundingClientRect()).width||x.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),p=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,p-=r(s.el()).getBoundingClientRect().left+h,i=Math.floor((p-s.el().offsetLeft)/s.width()*c),a)i>u&&(d=Math.max(d,u));(v=a[d]).src&&l.src!=v.src&&(l.src=v.src),v.style&&l.style!=v.style&&t(l.style,v.style),p+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(l,v.width||a[0].width)/2)>f?p-=p+g-f:p<g&&(p=g),o.style.left=p+"px"},s.on("mousemove",d),s.on("touchmove",d),s.on("pointerdown",(function(e){document.addEventListener("pointermove",d),document.addEventListener("pointerup",v)})),p=function(e){o.style.left="-1000px"},s.on("mouseout",p),s.on("touchcancel",p),s.on("touchend",p),u.on("userinactive",p)}));var N=function(){var e=c(d.mark((function e(t,n){var r,i,o,a;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=v(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o}))})),a.push(r))})),e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function C(e,t){return k.apply(this,arguments)}function k(){return(k=c(d.mark((function e(t,n){var r,i,l,u,s,c,p,m,f,g,h,x,y,b,w,E,N,C,k,P,A,L,B,M,S,j,q,O,R,X,V,$,D;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.getPlayer(n),i=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=2,e.next=5,fetch(t);case 5:return c=e.sent,e.next=8,c.text();case 8:p=e.sent,m=new DOMParser,f=m.parseFromString(p,"application/xml"),g=(null==r?void 0:r.duration())||(null===(l=a.getCurrentVideo())||void 0===l||null===(u=l.video)||void 0===u?void 0:u.runtime),h=(null==f||null===(s=f.querySelector("MPD > BaseURL"))||void 0===s?void 0:s.textContent)||i+"/",x=f.getElementsByTagName("AdaptationSet"),y=0;case 15:if(!(y<x.length)){e.next=43;break}if(("image"!==(b=x[y]).getAttribute("contentType")||"image/png"!==b.getAttribute("mimeType"))&&"image/jpeg"!==b.getAttribute("mimeType")){e.next=40;break}if(w=b.getElementsByTagName("SegmentTemplate")[0],E=b.getElementsByTagName("Representation")[0],N=E.getElementsByTagName("EssentialProperty")[0],C=N.getAttribute("value"),k=null==C?void 0:C.split("x"),P=v(k,2),A=P[0],L=P[1],!w){e.next=40;break}if(w.getAttribute("media"),B=w.getAttribute("duration"),M=w.getAttribute("timescale"),S=(M?B/M:B)/(A*L),j=E.getAttribute("id"),q=Math.round(g/S),O=Math.ceil(q/(A*L)),R=w.getAttribute("media"),X=parseInt(w.getAttribute("startNumber"))||0,!isNaN(parseInt(O))){e.next=36;break}return e.abrupt("return");case 36:for(V=[],$=T(R),y=0;y<O;y++)D=$?I($,y+X):R,V.push({duration:S,layout:C,uri:h+D.replace("$Number$",y+X).replace("$RepresentationID$",j)});return e.abrupt("return",V);case 40:y++,e.next=15;break;case 43:return console.log("No trickplay segment found."),e.abrupt("return",null);case 47:e.prev=47,e.t0=e.catch(2),console.error("Error fetching or parsing MPD:",e.t0);case 50:case"end":return e.stop()}}),e,null,[[2,47]])})))).apply(this,arguments)}function T(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function I(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function P(){return(P=c(d.mark((function e(t){var n,r,i,a,l,u,s,c,p,v,m,f,g,h,x,b;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=o.getPlayer(t),s=u.currentSource(),c=s.src,c=null!==(n=c)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(i=r.player)||void 0===i?void 0:i.getSource():c,null===(a=c)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,y(c);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,N(f,m);case 12:return g=e.sent,e.next=15,w(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,C(c,t);case 22:if(!((null==(x=e.sent)?void 0:x.length)>0)){e.next=28;break}return e.next=26,w(x);case 26:b=e.sent,u.thumbnails(b);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;m=[];var l=a.getCurrentSeries();null==l||l.map((function(e){var t;return(t=m).push.apply(t,i(e.episodes))})),null==t||null===(r=t.series)||void 0===r||r.cb}else{var u,s;m=(null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content)||[],null==t||null===(s=t.relatedVideos)||void 0===s||s.cb}var c=o.getPlayer(e);c.on("timeupdate",(function(){var e,t,n=Math.floor(c.currentTime()),r=c.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&a.getVideoIdx()<=(null===(t=m)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var d,p=m.filter((function(e,t){return t==a.getVideoIdx()}));if((null==p?void 0:p.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,g,h,x,y,b,w,E,N,C,k,T;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var I=null===(g=document.getElementsByClassName("next-ep-title"))||void 0===g?void 0:g[0],P=null===(h=document.getElementsByClassName("next-ep-img"))||void 0===h?void 0:h[0],A=null===(x=document.getElementsByClassName("next-ep-content"))||void 0===x?void 0:x[0],L=null===(y=p[0])||void 0===y?void 0:y.title;(null===(b=L)||void 0===b?void 0:b.length)>60&&(L=L.substr(0,60)+"..."),I.textContent="".concat(L),P.src=(null===(w=p[0])||void 0===w||null===(E=w.gist)||void 0===E||null===(N=E.imageGist)||void 0===N?void 0:N.r16x9)||(null==p||null===(C=p[0])||void 0===C?void 0:C.img)||(null===(k=window)||void 0===k||null===(T=k.customData)||void 0===T?void 0:T.fallbackImage),A.onclick=function(){return f(e)}}else{var B,M,S,j,q,O,R,X,V=document.createElement("div");V.className="next-ep-preview",V.style.visibility="hidden",document.getElementById(e).append(V);var $=document.createElement("div");$.className="next-ep-header",$.textContent="Next up";var D=null===(B=p[0])||void 0===B?void 0:B.title,F=document.createElement("img");F.className="next-ep-img",F.src=(null===(M=p[0])||void 0===M||null===(S=M.gist)||void 0===S||null===(j=S.imageGist)||void 0===j?void 0:j.r16x9)||(null==p||null===(q=p[0])||void 0===q?void 0:q.img)||(null===(O=window)||void 0===O||null===(R=O.customData)||void 0===R?void 0:R.fallbackImage);var U=document.createElement("div");U.className="next-ep-title",(null===(X=D)||void 0===X?void 0:X.length)>60&&(D=D.substr(0,60)+"..."),U.textContent="".concat(D);var G=document.createElement("div");G.className="next-ep-content",G.append(F),G.append(U),G.onclick=function(){return f(e)},V.append($),V.append(G)}},exports.addTVProviderImage=function(e,t){var n=o.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(r),a.alt="Provider Image",i.append(a),n.el().appendChild(i),n.on("useractive",(function(){i.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||i.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}},exports.initiateTrickplay=function(e){return P.apply(this,arguments)};
|
|
1
|
+
"use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),o=require("./skin-34fbc337.js"),a=require("./generic-de956683.js"),l=require("./autoNextVideo-29eef3b1.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=require("@babel/runtime/helpers/asyncToGenerator"),d=require("@babel/runtime/regenerator"),p=require("@babel/runtime/helpers/defineProperty"),v=require("@babel/runtime/helpers/slicedToArray"),m=[],f=function(e,t){var n=o.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=a.getVideoIdx();l.switchToNext(i,e,m)}};function g(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function h(e){return x.apply(this,arguments)}function x(){return(x=c(d.mark((function e(t){return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),o=v(i,2),a=o[0],l=o[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var o=i.width/l,u=i.height/a,s=0;s<a;s++)for(var c=0;c<l;c++){var d=document.createElement("canvas");d.width=o,d.height=u,d.getContext("2d").drawImage(i,c*o,s*u,o,u,0,0,o,u);var p=d.toDataURL("image/png");r.push({uri:p,duration:t.duration})}e(r)},n.onerror=function(n){var r,i,o,a;e([{duration:t.duration,uri:"".concat(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(a=o.images)||void 0===a?void 0:a.placeholderCover)}])}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return b.apply(this,arguments)}function b(){return(b=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",g(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function w(e){return E.apply(this,arguments)}function E(){return(E=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return h(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n,i=e.duration;r[i*t]={src:e.uri,style:(n={left:"-60px",height:"85px",width:"130px"},p(n,"left","-60px"),p(n,"border","1px solid transparent"),p(n,"borderRadius","4px"),n)}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e={0:{src:"example-thumbnail.png"}},t=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===u(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",(function(i){var o,a,l,u,s,c,d,p;function v(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",v),p()}a=t({},e,i),u=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=u.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(o=document.createElement("div")).className="vjs-thumbnail-holder",l=document.createElement("img"),o.appendChild(l),l.src=a[0].src,l.className="vjs-thumbnail",t(l.style,a[0].style),l.style.left||l.style.right||(l.onload=function(){l.style.left=-l.naturalWidth/2+"px"}),c=u.duration(),u.on("durationchange",(function(e){c=u.duration()})),u.on("loadedmetadata",(function(e){c=u.duration()})),(s=u.controlBar.progressControl).el().appendChild(o),d=function(e){var i,u,d,p,v,m,f,g,h,x;for(u in d=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=r(s.el()).getBoundingClientRect()).width||x.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),p=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,p-=r(s.el()).getBoundingClientRect().left+h,i=Math.floor((p-s.el().offsetLeft)/s.width()*c),a)i>u&&(d=Math.max(d,u));(v=a[d]).src&&l.src!=v.src&&(l.src=v.src),v.style&&l.style!=v.style&&t(l.style,v.style),p+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(l,v.width||a[0].width)/2)>f?p-=p+g-f:p<g&&(p=g),o.style.left=p+"px"},s.on("mousemove",d),s.on("touchmove",d),s.on("pointerdown",(function(e){document.addEventListener("pointermove",d),document.addEventListener("pointerup",v)})),p=function(e){o.style.left="-1000px"},s.on("mouseout",p),s.on("touchcancel",p),s.on("touchend",p),u.on("userinactive",p)}));var N=function(){var e=c(d.mark((function e(t,n){var r,i,o,a;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=v(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o}))})),a.push(r))})),e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function C(e,t){return k.apply(this,arguments)}function k(){return(k=c(d.mark((function e(t,n){var r,i,l,u,s,c,p,m,f,g,h,x,y,b,w,E,N,C,k,P,A,L,B,M,S,j,q,O,R,X,V,$,D;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.getPlayer(n),i=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=2,e.next=5,fetch(t);case 5:return c=e.sent,e.next=8,c.text();case 8:p=e.sent,m=new DOMParser,f=m.parseFromString(p,"application/xml"),g=(null==r?void 0:r.duration())||(null===(l=a.getCurrentVideo())||void 0===l||null===(u=l.video)||void 0===u?void 0:u.runtime),h=(null==f||null===(s=f.querySelector("MPD > BaseURL"))||void 0===s?void 0:s.textContent)||i+"/",x=f.getElementsByTagName("AdaptationSet"),y=0;case 15:if(!(y<x.length)){e.next=43;break}if(("image"!==(b=x[y]).getAttribute("contentType")||"image/png"!==b.getAttribute("mimeType"))&&"image/jpeg"!==b.getAttribute("mimeType")){e.next=40;break}if(w=b.getElementsByTagName("SegmentTemplate")[0],E=b.getElementsByTagName("Representation")[0],N=E.getElementsByTagName("EssentialProperty")[0],C=N.getAttribute("value"),k=null==C?void 0:C.split("x"),P=v(k,2),A=P[0],L=P[1],!w){e.next=40;break}if(w.getAttribute("media"),B=w.getAttribute("duration"),M=w.getAttribute("timescale"),S=(M?B/M:B)/(A*L),j=E.getAttribute("id"),q=Math.round(g/S),O=Math.ceil(q/(A*L)),R=w.getAttribute("media"),X=parseInt(w.getAttribute("startNumber"))||0,!isNaN(parseInt(O))){e.next=36;break}return e.abrupt("return");case 36:for(V=[],$=T(R),y=0;y<O;y++)D=$?I($,y+X):R,V.push({duration:S,layout:C,uri:h+D.replace("$Number$",y+X).replace("$RepresentationID$",j)});return e.abrupt("return",V);case 40:y++,e.next=15;break;case 43:return console.log("No trickplay segment found."),e.abrupt("return",null);case 47:e.prev=47,e.t0=e.catch(2),console.error("Error fetching or parsing MPD:",e.t0);case 50:case"end":return e.stop()}}),e,null,[[2,47]])})))).apply(this,arguments)}function T(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function I(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function P(){return(P=c(d.mark((function e(t){var n,r,i,a,l,u,s,c,p,v,m,f,g,h,x,b;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=o.getPlayer(t),s=u.currentSource(),c=s.src,c=null!==(n=c)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(i=r.player)||void 0===i?void 0:i.getSource():c,null===(a=c)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,y(c);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,N(f,m);case 12:return g=e.sent,e.next=15,w(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,C(c,t);case 22:if(!((null==(x=e.sent)?void 0:x.length)>0)){e.next=28;break}return e.next=26,w(x);case 26:b=e.sent,u.thumbnails(b);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;m=[];var l=a.getCurrentSeries();null==l||l.map((function(e){var t;return(t=m).push.apply(t,i(e.episodes))})),null==t||null===(r=t.series)||void 0===r||r.cb}else{var u,s;m=(null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content)||[],null==t||null===(s=t.relatedVideos)||void 0===s||s.cb}var c=o.getPlayer(e);c.on("timeupdate",(function(){var e,t,n=Math.floor(c.currentTime()),r=c.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&a.getVideoIdx()<=(null===(t=m)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var d,p=m.filter((function(e,t){return t==a.getVideoIdx()}));if((null==p?void 0:p.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,g,h,x,y,b,w,E,N,C,k,T;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var I=null===(g=document.getElementsByClassName("next-ep-title"))||void 0===g?void 0:g[0],P=null===(h=document.getElementsByClassName("next-ep-img"))||void 0===h?void 0:h[0],A=null===(x=document.getElementsByClassName("next-ep-content"))||void 0===x?void 0:x[0],L=null===(y=p[0])||void 0===y?void 0:y.title;(null===(b=L)||void 0===b?void 0:b.length)>60&&(L=L.substr(0,60)+"..."),I.textContent="".concat(L),P.src=(null===(w=p[0])||void 0===w||null===(E=w.gist)||void 0===E||null===(N=E.imageGist)||void 0===N?void 0:N.r16x9)||(null==p||null===(C=p[0])||void 0===C?void 0:C.img)||(null===(k=window)||void 0===k||null===(T=k.customData)||void 0===T?void 0:T.fallbackImage),A.onclick=function(){return f(e)}}else{var B,M,S,j,q,O,R,X,V=document.createElement("div");V.className="next-ep-preview",V.style.visibility="hidden",document.getElementById(e).append(V);var $=document.createElement("div");$.className="next-ep-header",$.textContent="Next up";var D=null===(B=p[0])||void 0===B?void 0:B.title,F=document.createElement("img");F.className="next-ep-img",F.src=(null===(M=p[0])||void 0===M||null===(S=M.gist)||void 0===S||null===(j=S.imageGist)||void 0===j?void 0:j.r16x9)||(null==p||null===(q=p[0])||void 0===q?void 0:q.img)||(null===(O=window)||void 0===O||null===(R=O.customData)||void 0===R?void 0:R.fallbackImage);var U=document.createElement("div");U.className="next-ep-title",(null===(X=D)||void 0===X?void 0:X.length)>60&&(D=D.substr(0,60)+"..."),U.textContent="".concat(D);var G=document.createElement("div");G.className="next-ep-content",G.append(F),G.append(U),G.onclick=function(){return f(e)},V.append($),V.append(G)}},exports.addTVProviderImage=function(e,t){var n=o.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(r),a.alt="Provider Image",i.append(a),n.el().appendChild(i),n.on("useractive",(function(){i.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||i.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}},exports.initiateTrickplay=function(e){return P.apply(this,arguments)};
|