@viewlift/player-backup 2.0.96-smartTv-test1 → 2.0.96-smartTv-test21
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-630079de.js → autoNextVideo-4e20ba6a.js} +1 -1
- package/cjs/bundle.css +37 -37
- package/cjs/{features-0814a0a4.js → features-be45d7f9.js} +1 -1
- package/cjs/generic-21c8c7ea.js +1 -0
- package/cjs/index-7d1a271f.js +1 -0
- package/cjs/{index-467f3c17.js → index-d5a9a936.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-d7fd65e9.js → multicamv2-5e8e7904.js} +1 -1
- package/cjs/{multicamv2-ec8d5060.js → multicamv2-71621dd0.js} +1 -1
- package/cjs/{nextEpisodeButton-aede1150.js → nextEpisodeButton-ebd37232.js} +1 -1
- package/cjs/{playlist-837fa123.js → playlist-a3220c16.js} +1 -1
- package/cjs/renditions-b94006c7.js +1 -0
- package/cjs/{series-af700fb7.js → series-70abfb9f.js} +1 -1
- package/cjs/{series-v2-5be92f0f.js → series-v2-02d98216.js} +1 -1
- package/cjs/{series-v2-a51ee822.js → series-v2-69a0ba49.js} +1 -1
- package/cjs/{settings-icon-dbfe75ab.js → settings-icon-25d10c3e.js} +1 -1
- package/cjs/{skin-97501399.js → skin-29ab2b0b.js} +1 -1
- package/cjs/{skin-19da0fd5.js → skin-4809e1d4.js} +1 -1
- package/cjs/{skin-3ee6a08f.js → skin-8a4af152.js} +1 -1
- package/cjs/{skin-e4570995.js → skin-8fd9c5d9.js} +1 -1
- package/cjs/{skin-2b041920.js → skin-c21c27b5.js} +1 -1
- package/cjs/{skin-eca7096f.js → skin-c9fb46f4.js} +1 -1
- package/cjs/{skin-13a2a94d.js → skin-ed1801d1.js} +1 -1
- package/cjs/{videoSelector-3293b6ce.js → videoSelector-090fab20.js} +1 -1
- package/cjs/{videoSelector-5268ef13.js → videoSelector-5bdeb332.js} +1 -1
- package/cjs/{videojs-dash5.es-0c89add5.js → videojs-dash5.es-ced4b564.js} +1 -1
- package/esm/{autoNextVideo-25176f20.js → autoNextVideo-6d32ebd3.js} +1 -1
- package/esm/bundle.css +37 -37
- package/esm/{features-540ec36b.js → features-93819855.js} +1 -1
- package/esm/generic-5f77f521.js +1 -0
- package/esm/index-87ef96f3.js +1 -0
- package/esm/{index-5a7423a2.js → index-f3660e88.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-4dce7c00.js → multicamv2-b695d56c.js} +1 -1
- package/esm/{multicamv2-3bb84e58.js → multicamv2-bd901048.js} +1 -1
- package/esm/{nextEpisodeButton-2574d5c2.js → nextEpisodeButton-c15e5be0.js} +1 -1
- package/esm/{playlist-d178a6f0.js → playlist-55cdadf1.js} +1 -1
- package/esm/renditions-792c992d.js +1 -0
- package/esm/{series-774e5a42.js → series-2c9e7cf3.js} +1 -1
- package/esm/{series-v2-11dd925b.js → series-v2-056fd38a.js} +1 -1
- package/esm/{series-v2-e141d362.js → series-v2-844454c8.js} +1 -1
- package/esm/{settings-icon-e08003bf.js → settings-icon-a905fdb3.js} +1 -1
- package/esm/{skin-2c9519de.js → skin-0c653990.js} +1 -1
- package/esm/{skin-2073cadc.js → skin-712aeb60.js} +1 -1
- package/esm/{skin-0195076b.js → skin-96e717ac.js} +1 -1
- package/esm/{skin-c09b1530.js → skin-a4aa403f.js} +1 -1
- package/esm/{skin-3986afad.js → skin-a8395b39.js} +1 -1
- package/esm/{skin-651a96b2.js → skin-b21a363b.js} +1 -1
- package/esm/{skin-5be717a2.js → skin-b7fc5738.js} +1 -1
- package/esm/{videoSelector-4c81e19f.js → videoSelector-8f835b46.js} +1 -1
- package/esm/{videoSelector-3e0d433e.js → videoSelector-baa4c25d.js} +1 -1
- package/esm/{videojs-dash5.es-6c1ba1fe.js → videojs-dash5.es-2dcf13b7.js} +1 -1
- package/package.json +5 -2
- package/cjs/generic-ac6915a3.js +0 -1
- package/cjs/index-173955be.js +0 -1
- package/cjs/renditions-7fe52e97.js +0 -1
- package/esm/generic-a4cc0314.js +0 -1
- package/esm/index-f1f0cece.js +0 -1
- package/esm/renditions-05558f5d.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewlift/player-backup",
|
|
3
|
-
"version": "2.0.96-smartTv-
|
|
3
|
+
"version": "2.0.96-smartTv-test21",
|
|
4
4
|
"main": "dist/bundle.cjs.js",
|
|
5
5
|
"types": "dist/@viewlift/player/esm/index.d.ts",
|
|
6
6
|
"amdName": "_playerCore",
|
|
@@ -11,12 +11,15 @@
|
|
|
11
11
|
"ima": "npm:videojs-ima@2.2.0",
|
|
12
12
|
"install": "^0.13.0",
|
|
13
13
|
"js-cookie": "^3.0.5",
|
|
14
|
+
|
|
14
15
|
"npm": "^11.5.2",
|
|
15
16
|
"ua-parser-js": "^2.0.3",
|
|
16
17
|
"video.js": "7.21.7",
|
|
17
18
|
"videojs-contrib-ads": "7.5.2",
|
|
18
19
|
"videojs-contrib-eme": "5.5.1",
|
|
19
20
|
"videojs-contrib-quality-menu": "^1.0.3",
|
|
20
|
-
"videojs-mux": "^4.21.7"
|
|
21
|
+
"videojs-mux": "^4.21.7",
|
|
22
|
+
"videojs-contrib-dash": "^5.1.1",
|
|
23
|
+
"videojs-ima": "^2.1.0"
|
|
21
24
|
}
|
|
22
25
|
}
|
package/cjs/generic-ac6915a3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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-f87e1c22.js"),l=require("./browser-38ff3331.js"),a=require("js-cookie"),d=require("ua-parser-js"),u=require("./captions-bc814903.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",getBeaconUrl:"/analytics/player-beacon"};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 f(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 p={name:"@viewlift/player-backup",version:"2.0.96-smartTv-test1",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0",install:"^0.13.0","js-cookie":"^3.0.5",npm:"^11.5.2","ua-parser-js":"^2.0.3","video.js":"7.21.7","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-contrib-quality-menu":"^1.0.3","videojs-mux":"^4.21.7"}};window.vl_player_version=p.version;var I,g=function(e,t){var n,i,r,l,a,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!==(a=window)&&void 0!==a&&null!==(d=a.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:f({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":p.version},withCredentials:!0})},w=function(e,t){var n,i,r,l;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:f(f(f(f(f({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,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,x();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:f({},t),params:f({},(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=(I=null==v?void 0:v.apiBaseUrl,{set:function(e){e&&(I=e)},get:function(){return I}}),_=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 F(){return{set:function(e){e&&(b=e)},get:function(){return b}}}var D,S,O,L,R,V,P=function(){var e=t(n.mark(function e(){var t,i,r;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=F().get(),i=y.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),W=null,x=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=P().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&&F().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)}}(),C=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},A=function(e){S=e},N=function(){return S},U=function(){return D},B=function(e){O=e},M=function(e){if(L){var t=L.get(e);B(t+1)}},j=(V=0,{set:function(e){e>=0&&(V=e)},get:function(){return V}});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 z=0,G=!1,Y=function(){var e,t,n,i,o,r,l,a=N();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function q(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function X(){var e=window.sessionStorage.getItem("uid");return e||(e=q(),window.sessionStorage.setItem("uid",e),e)}function J(){return K.apply(this,arguments)}function K(){return(K=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,x();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)}function Q(e){return e?String(e):""}window.initialise=function(e){window.sid=q(),window.environment="production",window.platform="WEBSITE",G=!1;try{G(e),buffering(e),ads(e),ping(e)}catch(e){}},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.handleBufferTimer=null,G=!0,c(r?"FAILED_TO_START":"DROPPED_STREAM",H({pfm:window.platform,uid:X(),vid:Y(),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:X(),vid:Y(),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":Y(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||G||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&z<4)z++,c("BUFFERING",H({pfm:window.platform,uid:X(),vid:Y(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,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:X(),vid:Y()},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,l;c("AD_REQUEST",H({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:X(),vid:Y(),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:X(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Y()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(z=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),l=i.end(o);if(Z(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var Z=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark(function e(t){var i,r,l,a,d,u,s,c,m,f,p,I,g,w,E,T,h,_,b,F;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return T=e.sent,h=C(T),_=null==h?void 0:h.site,b=null==h?void 0:h.siteId,e.t0=H,e.t1=H,e.t2=H({aid:_,cid:b,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=X(),e.t5=Y(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(a=t.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?Q(t.adPosition):"",e.next=26,J();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(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!==(m=t.bufferHealth)&&void 0!==m?m: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===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(I=p.beacon)||void 0===I?void 0:I.params,e.t31=(0,e.t0)(e.t29,e.t30),F=[e.t31],o({url:(null===(g=window)||void 0===g||null===(w=g.customData)||void 0===w||null===(E=w.beacon)||void 0===E?void 0:E.url)||y.get()+v.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:F}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var $=function(){var e=j.get();return e>=0?e+1:1},ee=function(){var e,t,n,i=U(),o=N(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=j.get(),a=null==i||null===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function te(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 ne(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?te(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}window._deviceInfo=d.UAParser(navigator.userAgent);var ie=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},oe=function(e){var t=re(e,"video.tags",[]),n=re(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},re=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},le=function(){var e,t,n,i,o,l,d,u,s,c,v,m,f,p,I,g,w,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,F=arguments.length>2?arguments[2]:void 0,D=(null==F?void 0:F.siteName)||"",S=(null==F?void 0:F.contentType)||"video",O=(null==F||null===(e=F[S])||void 0===e?void 0:e.metadata)||(null==F||null===(t=F[S])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),L=r.getPlayer(b);if(!_.includes("VIEWLIFT_"))return _;var R,V=window.getComputedStyle(document.getElementById(b),null),P=Math.trunc(V.getPropertyValue("height").slice(0,-2)),W=Math.trunc(V.getPropertyValue("width").slice(0,-2)),x="linearchannel"===S?null==F||null===(i=F.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(l=o.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===l||null===(d=l.content)||void 0===d?void 0:d.id:re(F,"video.gist.id",""),C="linearchannel"===S?null==F||null===(u=F.linearchannel)||void 0===u||null===(s=u.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===c?void 0:c.title:re(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),A=null,N=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){A=null==e?void 0:e.gppString,N=null==e?void 0:e.sectionList[0]}));var U=ne(ne({},ae(O)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:P,VIEWLIFT_SIZE:ie(W,P),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===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:re(F,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:re(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:re(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==L||null===(m=L.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==L||null===(f=L.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:oe(F),VIEWLIFT_MEDIA_ID:x,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(re(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:x,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+re(F,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:re(null===(p=window)||void 0===p||null===(I=p.app_data)||void 0===I||null===(g=I.site)||void 0===g?void 0:g.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":re(null===(w=window)||void 0===w||null===(E=w.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*re(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:re(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:x,VIEWLIFT_CONTENT_TITLE:C,VIEWLIFT_CONTENT_SERIES_TITLE:re(F,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:re(F,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ee(),VIEWLIFT_SEASON_NUMBER:$(),VIEWLIFT_CONTENT_TAGS:oe(F),VIEWLIFT_GPP_SID:N||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:A||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var B in U){var M=new RegExp(B,"g");_=_.replace(M,U[B])}return _},ae=function(e){var t,n,i,o,r,a,d;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV)return de(e);var u={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){s.set(e.name,e.value)}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.subscription)||void 0===o?void 0:o.SVOD)||!1,v=(null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a||null===(d=a.subscription)||void 0===d?void 0:d.TVE)||!1;return c||v?(l.isMobile()?c?u=ne(ne({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):v&&(u=ne(ne({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):c?u=ne(ne({},u),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):v&&(u=ne(ne({},u),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),c?u=ne(ne({},u),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):v&&(u=ne(ne({},u),{},{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),u=l.isMobile()?ne(ne({},u),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):ne(ne({},u),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(u=ne(ne({},u),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),u=l.isMobile()?ne(ne({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):ne(ne({},u),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),u=ne(ne({},u),{},{VIEWLIFT_AFID:s.get("afid")})},de=function(e){var t,n,i,o,r,l,a={},d=new Map;return(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)})),null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i||i.SVOD,(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?"lgTv"==window.customData.device?(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.tve")||d.get("sfid.tve")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.tve")||d.get("sfid.tve")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.tve")||d.get("sfid.tve")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.tve")||d.get("sfid.tve")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.tve")||d.get("sfid.tve")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.tve")||d.get("sfid.tve")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):"lgTv"==window.customData.device?(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.dtc")||d.get("sfid.dtc")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.dtc")||d.get("sfid.dtc")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.dtc")||d.get("sfid.dtc")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.dtc")||d.get("sfid.dtc")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.dtc")||d.get("sfid.dtc")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.firetv.dtc")||"",VIEWLIFT_PROF:d.get("prof.firetv")||""})):(a=ne(ne({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.dtc")||d.get("sfid.dtc")}),a=ne(ne({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})),a},ue=function(e){var t=null;try{var n,i,o,r,l,a,d,u,s,c,v,m,f,p,I,g,w,E,T,h,y,_,b,F,D,S,O,L,R,V,P,W,x,C,A,N,U;if(null!==(n=window)&&void 0!==n&&n.customData.isSmartTV){if("samsungTv"==window.customData.device&&null!=e&&null!==(i=e.ads)&&void 0!==i&&null!==(o=i.preRoll)&&void 0!==o&&null!==(r=o.adTags)&&void 0!==r&&null!==(l=r.samsung_tv)&&void 0!==l&&l.active)t=null==e||null===(S=e.ads)||void 0===S||null===(O=S.preRoll)||void 0===O||null===(L=O.adTags)||void 0===L||null===(R=L.samsung_tv)||void 0===R?void 0:R.url;else if("lgTv"==window.customData.device&&null!=e&&null!==(a=e.ads)&&void 0!==a&&null!==(d=a.preRoll)&&void 0!==d&&null!==(u=d.adTags)&&void 0!==u&&null!==(s=u.lg_tv)&&void 0!==s&&s.active){var B,M,j,k;t=null==e||null===(B=e.ads)||void 0===B||null===(M=B.preRoll)||void 0===M||null===(j=M.adTags)||void 0===j||null===(k=j.lg_tv)||void 0===k?void 0:k.url}else if("vizioTv"==window.customData.device&&null!=e&&null!==(c=e.ads)&&void 0!==c&&null!==(v=c.preRoll)&&void 0!==v&&null!==(m=v.adTags)&&void 0!==m&&null!==(f=m.vizioTv)&&void 0!==f&&f.active){var H,z,G,Y;t=null==e||null===(H=e.ads)||void 0===H||null===(z=H.preRoll)||void 0===z||null===(G=z.adTags)||void 0===G||null===(Y=G.vizioTv)||void 0===Y?void 0:Y.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(I=p.preRoll)&&void 0!==I&&null!==(g=I.adTags)&&void 0!==g&&null!==(w=g.xbox)&&void 0!==w&&w.active){var q,X,J,K;t=null==e||null===(q=e.ads)||void 0===q||null===(X=q.preRoll)||void 0===X||null===(J=X.adTags)||void 0===J||null===(K=J.xbox)||void 0===K?void 0:K.url}else if("xbox"==window.customData.device&&null!=e&&null!==(E=e.ads)&&void 0!==E&&null!==(T=E.preRoll)&&void 0!==T&&null!==(h=T.adTags)&&void 0!==h&&null!==(y=h.xbox)&&void 0!==y&&y.active){var Q,Z,$,ee;t=null==e||null===(Q=e.ads)||void 0===Q||null===(Z=Q.preRoll)||void 0===Z||null===($=Z.adTags)||void 0===$||null===(ee=$.xbox)||void 0===ee?void 0:ee.url}else if("FireTV"==window.customData.device&&null!=e&&null!==(_=e.ads)&&void 0!==_&&null!==(b=_.preRoll)&&void 0!==b&&null!==(F=b.adTags)&&void 0!==F&&null!==(D=F.firetv)&&void 0!==D&&D.active){var te,ne,ie,oe;t=null==e||null===(te=e.ads)||void 0===te||null===(ne=te.preRoll)||void 0===ne||null===(ie=ne.adTags)||void 0===ie||null===(oe=ie.firetv)||void 0===oe?void 0:oe.url}}else t=(null==e||null===(V=e.ads)||void 0===V||null===(P=V.preRoll)||void 0===P||null===(W=P.adTags)||void 0===W||null===(x=W.web)||void 0===x?void 0:x.active)&&(null==e||null===(C=e.ads)||void 0===C||null===(A=C.preRoll)||void 0===A||null===(N=A.adTags)||void 0===N||null===(U=N.web)||void 0===U?void 0:U.url)}catch(e){}return t},se=function(e,t){var n,i,o,r,a,d,u,s,c,v,m,f,p,I=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[I])||void 0===n?void 0:n.drmEnabled,w=null==e||null===(i=e[I])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[I])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(d=e[I])||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[I])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[I])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ve(E);if(g){var y=me(w,t);return y.src=le(y.src,t,e),y}if("Safari"!==l.detectBrowser()&&h){var _=ce(w);return _.src=le(_.src,t,e),_}if(T){var b=ve(w);return b.src=le(b.src,t,e),b}if(null!=w&&w.mpeg){var F=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(w);return F.src=le(F.src,t,e),F}return null},ce=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},ve=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},me=function(e,t){var n=(null==e?void 0:e.drmProvider)||null,o=e.fairPlayCmaf||e.fairPlay,a=e.widevine,d=e.playReady,u=l.detectBrowser();if(r.getPlayer(t),"Safari"===u){var s=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 l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(o);return fe(t),s}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(fe(t),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==d?void 0:d.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==n?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var fe=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==l.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},pe=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)}}},Ie=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var ge=!1,we=function(e,t,n){var i=le(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,l=r.getPlayer(e);if(null!==l.el_){ge=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),ge&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function Ee(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 Te=function(e){return!!i.getPlayer("".concat(e))},he=function(){var e=t(n.mark(function e(t,i){var o,l,a,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,x();case 3:return l=e.sent,a=r.getPlayer(t),e.abrupt("return",new Promise(function(e,n){w(i,l).then(function(n){var r=null==n?void 0:n.data;window.sid=q(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=se(r,t);A(r),l&&o?(be(t,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){n({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),ye=function(){var e=t(n.mark(function e(t,i){var o,l,a,d,s,c,v=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(d=v.length>2&&void 0!==v[2]?v[2]:null){e.next=5;break}return e.next=4,x();case 4:d=e.sent;case 5:return(U()||null)&&M(i),s=0,c=0,null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&T(i,d).then(function(e){var t,n,i,o,r,l;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)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,c=(null==e||null===(l=e.data)||void 0===l?void 0:l.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,d).then(function(i){var o,l,a=null==i?void 0:i.data,d=(null==a||null===(o=a.video)||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;A(i.data);var v=ue(a);v&&we(t,v,a);var m=se(a,t);if(m){var f,p,I,g,w,E,T,h,y,_,b,F,D,S,O=(null==a||null===(f=a.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.videoImageUrl)||(null==a||null===(I=a.video)||void 0===I||null===(g=I.gist)||void 0===g||null===(w=g.imageGist)||void 0===w?void 0:w.r16x9),L=r.getPlayer(t);if(L.poster(O),be(t,m),L.on("loadstart",function(){d&&e({status:!0,msg:"Video Loaded",response:a})}),L.on("loadeddata",function(){Ie(),e({status:!0,msg:"Video Loaded",response:a})}),L.one("play",function(){s&&c<95&&setTimeout(function(){L.currentTime(s)},0)}),L.one("error",function(){var e;n({status:!1,msg:(null==L||null===(e=L.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==a||null===(E=a.video)||void 0===E||null===(T=E.contentDetails)||void 0===T||null===(h=T.closedCaptions)||void 0===h?void 0:h.length)>0||(null==a||null===(y=a.video)||void 0===y||null===(_=y.closedCaptions)||void 0===_?void 0:_.length)>0)b=((null==a||null===(F=a.video)||void 0===F||null===(D=F.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null==a||null===(S=a.video)||void 0===S?void 0:S.closedCaptions)).filter(function(e){return"VTT"===e.format}),u.addCaptions(t,b);else u.removeCaptions(t)}else pe(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){Fe(e,t,n,i)})}));case 11:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),_e=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()},be=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},Fe=function(t,n,i,o){var r,l,a,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Te(n)&&pe(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?Ee(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ee(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=he,exports.baseUrlManager=y,exports.clearError=Ie,exports.createIdxMapping=function(e){L=new Map,e.map(function(e,t){L.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(_e(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getAdsURL=ue,exports.getCurrentSeries=U,exports.getCurrentVideo=N,exports.getDecodedToken=C,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=ee,exports.getLinearChannelDetails=w,exports.getSeasonNumber=$,exports.getSeriesDetails=function(e,t){var n,i,r=C(t),l=(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:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=h,exports.getSeriesWatchMap=function(){return R},exports.getSource=se,exports.getToken=x,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=X,exports.getVideoDetails=g,exports.getVideoIdx=function(){return O},exports.getVideoInfo=T,exports.handleError=pe,exports.initialiseAdvertisement=we,exports.initiateErrorHandling=Fe,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=Te,exports.isTokenExpired=_,exports.load=ye,exports.loadVideo=be,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=F,exports.replaceMacros=le,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=j,exports.setCurrentSeries=function(e){D=e},exports.setCurrentVideo=A,exports.setVideoIdx=B,exports.setVideoIdxById=M,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};
|
package/cjs/index-173955be.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-ac6915a3.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("./util-e1bc715c.js"),l=require("./captions-bc814903.js"),a=require("./skin-f87e1c22.js"),u=require("./renditions-7fe52e97.js"),s=require("./resolution-0a6680be.js"),d=require("./browser-38ff3331.js"),c=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof"),f=require("@babel/runtime/helpers/toConsumableArray"),p=require("@babel/runtime/helpers/slicedToArray"),m=function(e){return new Promise(function(n,t){if(g(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},g=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},y=function(e){var n,t=a.getPlayer(e);return(null==t||null===(n=t.audioTracks())||void 0===n?void 0:n.tracks_)||[]||[]},h=function(e,n){for(var t=a.getPlayer(e).audioTracks().tracks_||[],r=0;r<t.length;r++){var o=t[r];o.id==n?o.enabled=!0:o.enabled=!1}},b=function(e,n,t){var r=a.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},w=function(e){var n=a.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},k=function(){var e=t(r.mark(function e(n){var t,i,l,u,s;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return u=e.sent,e.prev=5,e.next=8,m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,u.default(o),e.finish(13);case 16:(s=o.getTech("chromecast"))&&!s.prototype.seeking&&(s.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==d.detectBrowser()?null==i||i.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),S=function(e,n){var t=a.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,i,l,a,u=this.el(),s=o.dom.getPointerPosition(u,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}})};var T=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),m("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),O=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),P=function(){var e=t(r.mark(function e(){var n;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(o),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),I=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),j=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-0c89add5.js")});case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),E=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(o)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(o)})},loadAdsLibrary:T,loadEMELibrary:O,loadMuxPlugin:P,loadDvrSeekbar:I,loadContribDash:j});function C(e){return D.apply(this,arguments)}function D(){return(D=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,T();case 3:t&&"Safari"==d.detectBrowser()&&Promise.resolve().then(function(){return E}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function A(e,n){return x.apply(this,arguments)}function x(){return(x=t(r.mark(function e(n,t){var o,i,l,a,u,s,c,v,f,p;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[c])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[c])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(a=t[c])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==d.detectBrowser()?O():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?j():O():"Safari"!=d.detectBrowser()&&f?j():null,k(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var V=new Set,N=null,M=function(n,t,r){var o,i,l,a,u,s,d,c={},v=(null==n?void 0:n.contentType)||"video";c["c3.cm.id"]=(null===(o=n[v])||void 0===o?void 0:o.id)||"Null",c["c3.cm.contentType"]=Q(n),c[null==r||null===(i=r.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==n||!n.linearchannel),c[null==r||null===(l=r.Constants)||void 0===l?void 0:l.STREAM_URL]=t.currentSrc(),c[null==r||null===(a=r.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),c["c3.cm.categoryType"]=H(n),c["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),c.DRMEnabled=(null===(u=n[v])||void 0===u?void 0:u.drmEnabled)||"None",c.DAIStream=null!==(s=n[v])&&void 0!==s&&null!==(d=s.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",c[r.Constants.DEFAULT_RESOURCE]="AKAMAI",c["c3.cm.brand"]="NULL",c.CDVREnabled=q(n),c["c3.cm.genreList"]=B(n),c["c3.cm.genre"]=_(n),c["c3.cm.channel"]=U(n);var f=K(e.getCurrentSeries(),n);return c=R(R({},c),f)},_=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},B=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},U=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},H=function(e){return(null==e?void 0:e.contentType)||"null"},q=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},F=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},Q=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var W,K=function(n,t){var r,o,i,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(o=r.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(i=n[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},G=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},J=function(){var n=t(r.mark(function n(t,o){var i,l,u,s,d,c,v,f,p,m;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=(null==o?void 0:o.convivaConfig)||{},l=i.trackConvivaPlayerEvent,u=i.paymentHandler,s=i.tveProvider,d=i.enable,c=i.appName,v=(o||{}).token,d){n.next=4;break}return n.abrupt("return");case 4:if(f=a.getPlayer(t),"function"==typeof(p=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,p("getConvivaObject");case 10:if(m=n.sent){n.next=13;break}return n.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=G(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var n,t;N&&N!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),V.clear(),N=f.currentSrc();var r=z(f.currentType()),i=e.getCurrentVideo(),l=M(i,f,m);l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.PLAYER_NAME]=c||"WEB",l[null==m||null===(t=m.Constants)||void 0===t?void 0:t.ASSET_NAME]=F(i,o),l.authToken=v||"NULL",l.streamType=r,l.D2CType=u||"NONE",l.subscriberType=s||(u?"D2C":"FREE"),l["c3.cm.affiliate"]=s||"NULL",p("contentInfo",l)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),f.on("play",function(){V.has(f.currentSrc())||(V.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){V.has(f.currentSrc())&&V.delete(f.currentSrc()),p("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==V||V.clear(),p("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),X=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-97501399.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-13a2a94d.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-eca7096f.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-3ee6a08f.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-19da0fd5.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-2b041920.js")}).then(function(t){t.initialiseSkin(e,n)}):"VL_SmartTV"==t&&Promise.resolve().then(function(){return require("./skin-e4570995.js")}).then(function(t){t.initialiseSkin(e,n)})};function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function $(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Z=[],ee=0,ne=null;function te(t,r,o){var i,l,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(i=r.watchHistory)||void 0===i||i.apiVersion;var c=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(u=r.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==r||null===(s=r.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),y=d?100:Math.floor(v/f*100),h={};m?function(t,r,o){var i=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(o),l=re(i),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return $($({},e),{},n({},t,s[t]))},{}),c=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===W});c<0?l.push($($({content:d},t),{},{addedDate:a,updateDate:a})):l[c]=$($($({},l[c]),t),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:d,watchedTime:g,watchedPercentage:y},c,r.siteOwner):(h=$($({videoId:W,watchedTime:g,watchedPercentage:y,doneWatching:d,profileId:c},ne&&{seriesId:ne}),p&&{originalObjectId:p}),e.saveWatchHistory(h).then(function(e){}).catch(function(e){})),ee=v+o}function re(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function oe(e,n,t){var r=re(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return r&&Array.isArray(r)&&(o=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var ie=!1,le=function(n,t){var r,o,i=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[i])||void 0===r||null===(o=r.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!ie){var l=ae(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),ie=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ae(e,n,t){if(Array.isArray(e))return e.map(function(e){return ae(e,n,t)});if(null!==e&&"object"===v(e)){var r={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=ae(e[o],n,t)}),r}return e}function ue(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return se(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?se(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function se(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ve=function(n,t,r,o){var i,u,s,c,f=o.res,p=o.sres,m=a.getPlayer(n),g=(null==f?void 0:f.contentType)||"video",y=(null==f?void 0:f[g].drmEnabled)||!1,h=(null==f||null===(i=f[g])||void 0===i||null===(u=i.streamingInfo)||void 0===u?void 0:u.isLiveStream)||!1,w=(null==f||null===(s=f[g])||void 0===s||null===(c=s.liveDetails)||void 0===c?void 0:c.isDvrEnabled)||!1;e.setCurrentVideo(f),m&&(m.on("loadstart",function(){h?r.resolve({status:!0,msg:"Video Loaded",response:f}):r.resolve(ce({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var r,o,i,u=l.getCaptions(n);if(null==u||u.map(function(e){return l.disableCaptions(n,e.id)}),w&&"Safari"===d.detectBrowser())try{var s;null==m||null===(s=m.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&b(n,sessionStorage.getItem("volume")||"100");var c=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var v,p,g=ce(ce({},t),f);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(ne=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Z=[],ee=0,W=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,u=a.getPlayer(e);u&&(u.on("timeupdate",function(){if(!u.seeking()){var e=Math.floor(u.currentTime());Z.includes(ee)||(e==ee?(Z.push(e),te(u,n,l)):e>ee&&(ee=e+l))}}),u.one("ended",function(){te(u,n,l,!0)}))}(n,g,null==c||null===(v=c.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var y,h,k,S,T,O,P=(null===(y=e.getCurrentVideo())||void 0===y?void 0:y.video)||(null==f?void 0:f.video),I=null==P?void 0:P.gist,j={env_key:null==t||null===(h=t.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(k=window)||void 0===k?void 0:k.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(T=P.streamingInfo)&&void 0!==T&&T.isLiveStream?"live":"video",viewer_user_id:null==t||null===(O=t.analytics)||void 0===O?void 0:O.userId};m.mux({debug:!1,data:j})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,r,o,i,l,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var m,g=p.getMediaSession(),y=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){h&&le(f,n)}),m.on("error",function(){var t,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?le(f,n):(e.handleError(n,(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var n,r,o,i,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(o=r.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,u,s,d=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&setTimeout(function(){m.currentTime(f)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0}),"object"==v(m.dash)){var t,r,o,i=null==m||null===(t=m.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=ue(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=ue(n);try{for(c.s();!(s=c.n()).done;){var f,p,g,h=s.value;if(("Chrome"==d.detectBrowser()||"Edge"==d.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(p=f.userAgent)&&void 0!==p&&p.includes("Macintosh")||!y))&&null!=h&&null!==(g=h.label)&&void 0!==g&&g.includes("5.1"))m.audioTracks().removeTrack(h);else{if("main"==h.kind){h.enabled=!0;break}h.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};var fe,pe=(fe=!0,{enable:function(){fe=!0},disable:function(){fe=!1},get enabled(){return fe}}),me="ssai-breakStart",ge="ssai-adImpression",ye="ssai-firstQuartile",he="ssai-midpoint",be="ssai-thirdQuartile",we="ssai-complete",ke="ssai-breakEnd",Se={breakStart:me,impression:ge,firstQuartile:ye,midpoint:he,thirdQuartile:be,complete:we,breakEnd:ke};function Te(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=a.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var r=n.eventType,o=Se[r];o&&t.trigger(o,n)}function Oe(e){var n=a.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{adBreakStart:function(e){return t(me,e)},adImpression:function(e){return t(ge,e)},adFirstQuartile:function(e){return t(ye,e)},adMidpoint:function(e){return t(he,e)},adThirdQuartile:function(e){return t(be,e)},adComplete:function(e){return t(we,e)},adBreakEnd:function(e){return t(ke,e)}}}function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function je(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ee(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ee(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Ee(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var Ce,De,Ae=(Ce="",{set:function(e){e&&(Ce=e)},get:function(){return Ce}}),xe=(De=null,{set:function(e){De=e},get position(){return De}});function Le(e,n){return Re.apply(this,arguments)}function Re(){return(Re=t(r.mark(function n(t,o){var i,l,u,s,d,c,v,f,m,g,y,h,b,w;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a.getPlayer(t),i=e.getSource(o,t),l=i.src,u=l.replace("/dash/","/session/").replace("master","session"),u=e.replaceMacros(u,t,o),s=Ve(u),d=p(s,2),c=d[0],v=d[1],u=new URL(u.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var n=p(e,2),t=n[0],r=n[1];u.searchParams.set(t,r)}),n.prev=8,n.next=11,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Ie({},c)})});case 11:return f=n.sent,n.next=14,f.json();case 14:return m=n.sent,g="https://"+new URL(u).hostname,y=m.trackingUrl,h=m.manifestUrl,b=g+y,w=g+h,Ae.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),i.src=w,n.abrupt("return",i);case 26:return n.prev=26,n.t0=n.catch(8),n.abrupt("return",i);case 29:case"end":return n.stop()}},n,null,[[8,26]])}))).apply(this,arguments)}function Ve(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var r,o=je(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=p(i,2),a=l[0],u=l[1];n[decodeURIComponent(a)]=decodeURIComponent(u||"")}}catch(e){o.e(e)}finally{o.f()}for(var s={},d={},c=0,v=Object.entries(n);c<v.length;c++){var f=p(v[c],2),m=f[0],g=f[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=g;else d[m]=g}return[s,d]}function Ne(e,n){return Me.apply(this,arguments)}function Me(){return Me=t(r.mark(function n(o,i){var l,u,s,d,c,v,p,m,g,y,h,b,w,k,S,T,O;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:O=function(e,n,t,r,i,l){var u=a.getPlayer(o);if(!u.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(u.currentTime());var s,d=je(t);try{var c=function(){var t,a,d,c=s.value,v=c.eventType,f=c.beaconUrls,p=c.startTimeInSeconds,m=c.startTime,g=c.durationInSeconds,y=p||0,h=f,b=(null===(t=window)||void 0===t||null===(a=t.customData)||void 0===a||null===(d=a.ads)||void 0===d?void 0:d.adEventHandler)||null,w="".concat(y,"_").concat(v),k=S.get("pod-".concat(i))||[];if(e>=y&&!k.includes(w)){var O;k.push(w),S.set("pod-".concat(i),k);try{T(v,n,h,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var P=xe.position;xe.set(null),setTimeout(function(){null!=P&&(u.currentTime(P),l())},500)}if("function"==typeof b&&null!=n&&null!==(O=n.ads)&&void 0!==O&&O[r])try{var I,j={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:g,ad:null==n||null===(I=n.ads)||void 0===I?void 0:I[r],adIndex:r};b({adsData:j}),Te(o,j)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(s=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},T=function(e,n,t,r){null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},k=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},xe.set(i),c=Ae.get(),(v=a.getPlayer(o)).one("loadeddata",function(){c&&w(c)}),p=new Map,m=new Map,g=-1,y=(null===(l=document)||void 0===l||null===(u=l.getElementsByClassName("tvProviderImage"))||void 0===u?void 0:u[0])||null,h=(null==v||null===(s=v.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,b=(null==v||null===(d=v.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,w=function(){var n=t(r.mark(function n(t){var l,u,s,d,c,v,w,S,T,P,I,j,E,C,D,A,x;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return E=function(e){document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",E),0===e.button&&P()},j=function(e){},I=function(){var e,n=w.currentTime(),t=null,r=je(v);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=(o.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,p.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){w.currentTime(t+2.2)},100))},P=function(){var e,n=w.currentTime(),t=null,r=je(v);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=o.ads,u=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>u||n>i)&&!p.has(i)||n>=i&&n<=u)&&(t=i,p.set(i,!0),m.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){w.currentTime(t+.4)},100))},u=!1,n.next=7,fetch(t);case 7:return s=n.sent,n.next=10,s.json();case 10:d=n.sent,c=d.avails,v=[],w=a.getPlayer(o),S=w.controlBar.progressControl,T=S.seekBar.el(),c.map(function(e,n){var t,r,o;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!0),v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(r=e.adBreakTrackingEvents)||void 0===r||null===(o=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===o?void 0:o[0])||[]})}),!u&&i&&(w.currentTime(i),I()),null!=v&&v.length&&(window.adsQueueList=v),console.log(v,"data"),v.forEach(function(e){var n,t,r=e.markerPositionInSeconds,o=e.ads,i=w.duration();if(!(r>i||Array.isArray(o)&&0==(null==o?void 0:o.length))){var l=r/i*100,a=document.createElement("div");a.className="vjs-seekbar-marker",a.style.left="".concat(l,"%"),a.style.position="absolute",a.style.top="0",a.style.bottom="0",a.style.width="2px",a.style.backgroundColor="#fecc09",a.style.left="".concat(l,"%"),a.style.pointerEvents="none",T.appendChild(a),null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableControls&&(T.style.display="none")}}),w.on("timeupdate",a.throttle(function(){var e=w.currentTime();if(e!==g){g=e;for(var n=!1,t=function(){var t=v[r],o=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=o+i;if(e>=o-1.2&&e<=a+1.2){e>=o&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&p.set(o,!0),pe.disable(),y&&y.classList.add("vjs-hidden"),h&&(h.el().style.pointerEvents="none",h.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),S.el().style.visibility="hidden";for(var u=e-o,s=0,d=0,c=0;c<l.length;c++){var g,w=null==l||null===(g=l[c])||void 0===g?void 0:g.durationInSeconds;if(u<s+w){d=c;break}s+=w}l[d];var T=Math.max(0,i-u),P=Math.round(T);C.style.display="block",x.textContent="".concat(d+1," of ").concat(l.length," • ").concat(k(P));var j=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});j.push.apply(j,f(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&j.push(null==t?void 0:t.podSlotImpressionBeacon),O(e,t,j,d,r,I),"break"}m.delete(o)},r=0;r<v.length;r++){if("break"===t())break}n||(C.style.display="none",S.el().style.visibility="visible",h&&(h.el().style.pointerEvents="auto",h.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),y&&y.classList.remove("vjs-hidden"),pe.enable())}},1e3)),null===(l=document)||void 0===l||l.addEventListener("keydown",function(n){pe.enabled&&"ArrowRight"==n.key&&(P(),e.skip(o,10),n.stopPropagation())}),S.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",E))}),(C=document.createElement("div")).className="ssai-ad-container",(D=document.createElement("div")).className="sponsored-adbox",(A=document.createElement("div")).className="sponsored-text",A.textContent="Sponsored Ad",D.append(A),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",C.append(D),C.append(x),w.el().appendChild(C);case 40:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}(),S=new Map;case 16:case"end":return n.stop()}},n)})),Me.apply(this,arguments)}function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ue=function(i,u,s,c){var v,f,p,m,g,y,h,b,w,k,T,O,P,I,j,E,C,D,x,L,R,V,N,M,_,B,U,H,q,F,Q,W,K=u.res,G=void 0===K?null:K,z=u.sres,Y=void 0===z?null:z,$=null!=s&&s.chromecastReceiverId?["chromecast","html5"]:["html5"],Z=(null===(v=G)||void 0===v?void 0:v.contentType)||"video",ee=a.impolicy16x9(null===(f=G)||void 0===f||null===(p=f[Z])||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.videoImageUrl)||a.impolicy16x9(null===(g=G)||void 0===g||null===(y=g[Z])||void 0===y||null===(h=y.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),ne=(null===(w=G)||void 0===w||null===(k=w[Z])||void 0===k||null===(T=k.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,te=(null===(O=G)||void 0===O||null===(P=O[Z])||void 0===P||null===(I=P.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,re=e.getAdsURL(G);G=Be(Be({},G),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var oe="MEDIA_TAILOR"==(null===(j=window)||void 0===j||null===(E=j.app_data)||void 0===E||null===(C=E.appcmsMain)||void 0===C||null===(D=C.adsConfig)||void 0===D?void 0:D.vodAdSticherProvider)||"MEDIA_TAILOR"==(null===(x=window)||void 0===x||null===(L=x.customData)||void 0===L||null===(R=L.ads)||void 0===R?void 0:R.vodAdSticherProvider)||!1,ie=(null==s?void 0:s.latency)||6,le=(null==s?void 0:s.skin_settings)||{},ae=(Q={enableSmoothSeeking:!0,controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==le?void 0:le.pictureInPictureToggle)||!1},playbackRates:null!=le&&le.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==s.skin,liveui:ne},n(Q,"autoplay",null==s?void 0:s.autoplay),n(Q,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!re),n(Q,"loop",(null==s?void 0:s.loop)||!1),n(Q,"audioPosterMode",null==s?void 0:s.audioPosterMode),n(Q,"html5",Be(Be({dash:Be(Be(Be({},!o.browser.IS_SAFARI&&{useTTML:!0}),(null==s?void 0:s.debugConfig)&&(null==s||null===(V=s.debugConfig)||void 0===V?void 0:V.enable)&&{debug:!1,logLevel:null!=s&&null!==(N=s.debugConfig)&&void 0!==N&&N.logLevel?null==s||null===(M=s.debugConfig)||void 0===M?void 0:M.logLevel:"off"}),{},{updateSettings:{streaming:{delay:{liveDelay:ie},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Be({},"IE"==d.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}},null!==(_=window)&&void 0!==_&&null!==(B=_.customData)&&void 0!==B&&B.isSmartTV?{bufferToKeep:10,bufferTimeAtTopQuality:15,bufferTimeAtTopQualityLongForm:15,bufferPruningInterval:5}:{}),vhs:Be(Be({liveRangeSafeTimeDelta:ie,useDevicePixelRatio:!0,experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==s||null===(U=s.customData)||void 0===U?void 0:U.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(H=null==s?void 0:s.enableLowInitialPlaylist)||void 0===H||H}),nativeTextTracks:"Safari"==d.detectBrowser()},0==(null==s||null===(q=s.customData)||void 0===q?void 0:q.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(F=s.customData)||void 0===F?void 0:F.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(Q,"poster",ee),n(Q,"techOrder",$),n(Q,"chromecast",{requestCustomDataFn:function(e){var n=a.getPlayer(i),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var r,o,i,l,a,u,s,d,c,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,y,h,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,O=(null==T?void 0:T.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(y=g[0])||void 0===y||null===(h=y.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=O;var P=(null==T?void 0:T.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=P}var I=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=I;var j=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=j;var E=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=E;var C=null==e||null===(s=e[f])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=C,p.subTitles=t,p.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(G,e,t)},modifyLoadRequestFn:function(e){var n,t,r,o,l,u=a.getPlayer(i),s=(null==u?void 0:u.currentSource())||{};!(null===(n=G)||void 0===n||null===(t=n[Z])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(o=r.videoAssets)||void 0===o?void 0:o.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),Q);if(!o.getPlayers()[i]){null===(W=window)||void 0===W||!W.customData.isSmartTV||null!=s&&s.disableControls||(ae.spatialNavigation={enabled:!0,horizontalSeek:!0});try{o.log.level("off")}catch(e){}var ue=o(i,ae,function(){var n=t(r.mark(function n(){var t,a,u,d,v,f,p,m,g,y,h,b,w,k,T,O,P,I,j,E,C,D,x,L,R,V,N,M,_,B,U,H,q,F,Q,W,K,z,$;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:try{ue.log.level("off")}catch(e){}return console.log(ue),console.log(o.VERSION),console.log(o.getPlugins()),n.next=6,A(s,G);case 6:try{null===(M=window)||void 0===M||!M.customData.isSmartTV||null!=s&&s.disableControls||ue.spatialNavigation.start()}catch(e){}if(_=null===(t=G)||void 0===t||null===(a=t[Z])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.startOverTime,te&&c.resolve(Be({status:!0,msg:"Player Initialised"},Y?{seriesResponse:Y,response:G}:{response:G})),e.inititateBeacon(i,null==s?void 0:s.analyticsCb),J(i,s),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),ne&&S(i,_),!re||null!=s&&null!==(d=s.customData)&&void 0!==d&&d.disableAds||e.initialiseAdvertisement(i,re,G),B=e.getSource(G,i),console.log(B),null!=s&&s.nearestClusterUrl&&(B=e.getUpdatedClusterSource(B,s.nearestClusterUrl)),!oe||null===(v=G)||void 0===v||null===(f=v.video)||void 0===f||!f.isSSAIEnabled){n.next=21;break}return n.next=20,Le(i,G);case 20:B=n.sent;case 21:B?e.loadVideo(i,B):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:G}),e.handleError(i,"Incompatible / Missing Source")),((null===(p=G)||void 0===p||null===(m=p[Z])||void 0===m||null===(g=m.contentDetails)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0||(null===(h=G)||void 0===h||null===(b=h[Z])||void 0===b||null===(w=b.closedCaptions)||void 0===w?void 0:w.length)>0)&&(K=(null===(H=G)||void 0===H||null===(q=H[Z])||void 0===q||null===(F=q.contentDetails)||void 0===F?void 0:F.closedCaptions)||(null===(Q=G)||void 0===Q||null===(W=Q[Z])||void 0===W?void 0:W.closedCaptions),U=K.filter(function(e){return"VTT"===e.format}),l.addCaptions(i,U)),null!=s&&s.disableControls&&e.disableControls(i),"MEDIA_TAILOR"==(null===(k=window)||void 0===k||null===(T=k.app_data)||void 0===T||null===(O=T.appcmsMain)||void 0===O||null===(P=O.adsConfig)||void 0===P?void 0:P.vodAdSticherProvider)&&null!==(I=window)&&void 0!==I&&null!==(j=I.app_data)&&void 0!==j&&null!==(E=j.appcmsMain)&&void 0!==E&&null!==(C=E.adsConfig)&&void 0!==C&&C.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(D=window)||void 0===D||null===(x=D.customData)||void 0===x||null===(L=x.ads)||void 0===L?void 0:L.vodAdSticherProvider)&&null!==(R=window)&&void 0!==R&&null!==(V=R.customData)&&void 0!==V&&null!==(N=V.ads)&&void 0!==N&&N.vodAdClientSideTracking?(s.customData.disableControls=!0,z=e.getSource(null==ae?void 0:ae.res,i)||{},$=z.src,Ne(i,$)):X(i,Be(Be(Be({},s),ae),{},{liveVideo:te,isDvrEnabled:ne,res:G,sres:Y})),ve(i,Be(Be(Be({},s),ae),{},{liveVideo:te}),c,{res:G,sres:Y});case 26:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},He={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Qe,We=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=Ke(e);Ue(o,{res:i},e,{resolve:t,reject:r})},Ke=function(n){var t,r,o,i,l,a,u,s,d=null==n?void 0:n.streamingInfo,c=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,v=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,p=(null==n||null===(o=n.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,m=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,g=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],y=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,h=null==n?void 0:n.token,b=e.getDecodedToken(h),w=null==b?void 0:b.site;return Fe(Fe({id:null==He?void 0:He[w]},!v&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:v,streamingInfo:{videoAssets:Fe(Fe({},y&&{drmProvider:y}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==d?void 0:d.isDvrEnabled},gist:Fe({},m&&{videoImageUrl:m}),contentDetails:Fe({},(null==g?void 0:g.length)>0&&{closedCaptions:f(g)})},ads:{preRoll:{adTags:{web:Fe(Fe({},p&&{active:!0}),p&&{url:p})}}}})};function Ge(e,n){return ze.apply(this,arguments)}function ze(){return(ze=t(r.mark(function n(t,o){var i,l,a,u,s,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,a=null==t?void 0:t.videoId,u=null==t?void 0:t.playerId,s=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:d=n.sent,e.getVideoDetails(a,d).then(function(n){var r,o,c,v;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(c=o.gist)||void 0===c?void 0:c.contentType,e.setCurrentVideo(null==n?void 0:n.data);var f,p=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(v=t.watchHistory)&&void 0!==v&&v.enable&&!s)if((null===(f=t.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,g,y,h=oe((null===(m=t.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==t?void 0:t.siteOwner);if(h&&h.length)t.watchHistoryResumeTime=(null===(g=h[0])||void 0===g?void 0:g.watchedTime)||null,t.watchedPercentage=(null===(y=h[0])||void 0===y?void 0:y.watchedPercentage)||null;p.contentType="video",Ue(u,{res:p},t,{resolve:i,reject:l})}else e.getVideoInfo(a,d).then(function(e){var n,r,o,i,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,r,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(e))}).finally(function(){Ue(u,{res:p},t,{resolve:i,reject:l})});else Ue(u,{res:p},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,u,l,a)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Je(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=t(r.mark(function n(t,o){var i,l,a,u,s;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=o.resolve,l=o.reject,n.next=3,e.getToken();case 3:a=n.sent,u=null==t?void 0:t.playerId,s=null==t?void 0:t.epg,e.getLinearChannelDetails(s,a).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==s?void 0:s.channelId,Ue(u,{res:n},t,{resolve:i,reject:l})}).catch(function(n){e.initiateErrorHandling(n,u,l,videoId)});case 7:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ye(e,n){return $e.apply(this,arguments)}function $e(){return($e=t(r.mark(function n(t,o){var i,l,a,u,s,d,c;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=o.resolve,a=o.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(i=t.series)||void 0===i?void 0:i.id,e.getSeriesDetails(c,u).then(function(n){var r,o,i,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(o=r.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);e.createSeriesWatchMap(c,u),e.getVideoDetails(f,u).then(function(n){var r,o,i;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(o=r.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,e.setCurrentVideo(n.data),Ue(s,{res:null==n?void 0:n.data,sres:d},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function en(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:i.onTimeUpdate,getVideoDuration:i.getVideoDuration,getVideoCurrentTime:i.getVideoCurrentTime,onVideoEnded:i.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=t(r.mark(function t(o,i){var l,u,s,d,v,f,p,g,y,h,b,w,k,S,T,O,P,I,j,E,D,A,x;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(b=(null==n?void 0:n.videoSourceUrl)||!1,w=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,S=null==n?void 0:n.videoId,T=(null==n||null===(u=n.series)||void 0===u?void 0:u.enable)||!1,O=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,P=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",P),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),P&&!e.isTokenExpired(P)){t.next=16;break}return i({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}}),t.abrupt("return");case 16:Qe=JSON.parse(atob(P.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(s=Qe)||void 0===s||!s.anonymousId),n.siteOwner=(null===(d=Qe)||void 0===d?void 0:d.site)||null,n.userId=(null===(v=Qe)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=Qe)||void 0===f?void 0:f.userId),window.watchHistory=n.watchHistory||null,I=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable?null:null==n?void 0:n.chromecastReceiverId,j=(null==n||null===(g=n.analytics)||void 0===g?void 0:g.gaId)||null,(E=null==n?void 0:n.errors)&&(window.customErrors=E),window.customData=null==n?void 0:n.customData,c.setLocalisation(null==n||null===(y=n.customData)||void 0===y?void 0:y.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!a.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,C(n);case 33:j&&m("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then(function(){return e.runGtag(j)}).catch(function(e){}),(D=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(I)))&&D.addEventListener("contextmenu",function(e){return e.preventDefault()}),b?(x={directPlaybackUrl:b,id:A="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(A,P).then(function(e){var t=(null==e?void 0:e.data)||{};Ue(I,{res:en(en({},t),x)},n,{resolve:o,reject:i})}).catch(function(n){e.initiateErrorHandling(n,I,i,A)}):Ue(I,{res:x},n,{resolve:o,reject:i})):O?We(n,{resolve:o,reject:i}):T?Ye(n,{resolve:o,reject:i}):k?Je(n,{resolve:o,reject:i}):Ge(n,{resolve:o,reject:i});case 37:case"end":return t.stop()}},t)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:u.getRenditions,getSelectedRendition:u.getSelectedRendition,skip:e.skip,getPlayer:a.getPlayer,play:e.play,pause:e.pause,isPaused:e.isPaused,detectBrowser:d.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:i.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,getAudioTracks:y,enableAudioTrack:h,playSelectedResolution:s.playSelectedResolution,getSource:e.getSource,setVolume:b,getVolume:w,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:Oe,getPlayerVersion:function(){return window.vl_player_version},getTextTracksWithCuesDetails:l.getTextTracksWithCuesDetails,playerEvents:i.playerEvents}},exports.initialiseKeyboardEvents=function(n,t){var r,o,i,l=a.getPlayer(n),u=null==l||null===(r=l.controlBar)||void 0===r||null===(o=r.playToggle)||void 0===o?void 0:o.el_,s=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(r){var o,i,a,d,c,v,f,p,m;if(pe.enabled&&"input"!=r.target.localName){var g=r.key,y=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(r.preventDefault(),null==s||s.focus()),g){case" ":null==u||u.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":y&&!1===t.liveui||e.rewind(n,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(d=a.appcmsMain)||void 0===d||null===(c=d.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(v=window)&&void 0!==v&&null!==(f=v.app_data)&&void 0!==f&&null!==(p=f.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;y||e.skip(n,10)}}},!0)},exports.setupAdvertisementMarkers=Ne;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var l=require("./skin-f87e1c22.js");exports.getRenditions=function(e){var n,i=l.getPlayer(e),t=[];if((null==i||null===(n=i.tech_)||void 0===n?void 0:n.vhs)||!1){var u,o,v,d=null==i||null===(u=i.tech_)||void 0===u||null===(o=u.vhs)||void 0===o||null===(v=o.representations)||void 0===v?void 0:v.call(o);(null==d?void 0:d.length)>0&&(t=null==d?void 0:d.sort(function(l,e){return(null==l?void 0:l.height)==(null==e?void 0:e.height)?(null==e?void 0:e.bandwidth)-(null==l?void 0:l.bandwidth):(null==e?void 0:e.height)-(null==l?void 0:l.height)}))}else try{var r,h,s,a=null==i||null===(r=i.dash)||void 0===r||null===(h=r.mediaPlayer)||void 0===h||null===(s=h.getRepresentationsByType)||void 0===s?void 0:s.call(h,"video");(null==a?void 0:a.length)>0&&(t=null==a?void 0:a.sort(function(l,e){return e.height-l.height}))}catch(l){var c,g=null==i||null===(c=i.qualityLevels())||void 0===c?void 0:c.levels_;(null==g?void 0:g.length)>0&&(t=null==g?void 0:g.sort(function(l,e){return e.height-l.height}))}return t},exports.getSelectedRendition=function(e){var n,i,t,u,o,v,d=l.getPlayer(e);return null!=d&&d.qualityLevels?null==d||null===(i=d.qualityLevels())||void 0===i?void 0:i.selectedIndex_:null!=d&&null!==(n=d.tech_)&&void 0!==n&&n.vhs?null==d||null===(t=d.tech_)||void 0===t||null===(u=t.vhs)||void 0===u||null===(o=u.selectedRepresentation)||void 0===o||null===(v=o.call(u))||void 0===v?void 0:v.id:0};
|
package/esm/generic-a4cc0314.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r,c as l}from"./skin-86e7e2b5.js";import{i as a,d}from"./browser-512cd55a.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-bbc7eb98.js";function m(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,t){m("event",e,t)}var I={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function w(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 g(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?w(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):w(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var E={name:"@viewlift/player-backup",version:"2.0.96-smartTv-test1",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0",install:"^0.13.0","js-cookie":"^3.0.5",npm:"^11.5.2","ua-parser-js":"^2.0.3","video.js":"7.21.7","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-contrib-quality-menu":"^1.0.3","videojs-mux":"^4.21.7"}};window.vl_player_version=E.version;var T,h=function(e,t){var n,i,r,l,a,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!==(a=window)&&void 0!==a&&null!==(d=a.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":O.get()+"".concat(null==I?void 0:I.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,t){var n,i,r,l;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:O.get()+I.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,t){var n,i,r=k(t),l=(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:O.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},F=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,j();case 2:return i=e.sent,e.abrupt("return",o({url:O.get()+"".concat(null==I?void 0:I.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:g({},t),params:g({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),b=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:O.get()+"".concat(null==I?void 0:I.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})},D=function(e){var t=e.videoId;return o({method:"GET",url:O.get()+"".concat(null==I?void 0:I.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},O=(T=null==I?void 0:I.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),R=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})},S=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},L=null;function V(){return{set:function(e){e&&(L=e)},get:function(){return L}}}var W,P,C,A,N,x,U=function(){var e=t(n.mark(function e(){var t,i,r;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=V().get(),i=O.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),B=null,j=function(){var e=t(n.mark(function e(){var t;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!S(t)){e.next=6;break}return B||(B=U().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&&V().set(r),o||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){B=null})),e.abrupt("return",B);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),M=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},k=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){P=e},z=function(){return P},G=function(e){W=e},Y=function(){return W},X=function(){return C},q=function(e){C=e},J=function(){return N},K=function(e){A=new Map,e.map(function(e,t){A.set(e.id,t)})},Q=function(e){if(A){var t=A.get(e);q(t+1)}},Z=(x=0,{set:function(e){e>=0&&(x=e)},get:function(){return x}});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}var te=0,ne=!1,ie=function(){var e,t,n,i,o,r,l,a=z();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function oe(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function re(){var e=window.sessionStorage.getItem("uid");return e||(e=oe(),window.sessionStorage.setItem("uid",e),e)}function le(){return ae.apply(this,arguments)}function ae(){return(ae=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,j();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)}function de(e){return e?String(e):""}window.initialise=function(e){window.sid=oe(),window.environment="production",window.platform="WEBSITE",ne=!1;try{ne(e),buffering(e),ads(e),ping(e)}catch(e){}},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.handleBufferTimer=null,ne=!0,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:re(),vid:ie(),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),p("PLAY",ee({pfm:window.platform,uid:re(),vid:ie(),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":ie(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||ne||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&te<4)te++,p("BUFFERING",ee({pfm:window.platform,uid:re(),vid:ie(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:re(),vid:ie()},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,l;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:re(),vid:ie(),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}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:re(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:ie()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(te=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),l=i.end(o);if(ue(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var ue=function(e,t,n){return e>=t&&e<=n};function se(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}}window.fireEvent=function(){var e=t(n.mark(function e(t){var i,r,l,a,d,u,s,c,v,m,f,p,w,g,E,T,h,y,_,F;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:return T=e.sent,h=k(T),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:y,cid:_,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=re(),e.t5=ie(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(a=t.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?de(t.adPosition):"",e.next=26,le();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===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),F=[e.t31],o({url:(null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g||null===(E=g.beacon)||void 0===E?void 0:E.url)||O.get()+I.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:F}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ce=function(e,t){var n=new Map;D({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),N=n}).catch(function(e){return console.log(e)})},ve=function(){var e=Z.get();return e>=0?e+1:1},me=function(){var e,t,n,i=Y(),o=z(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=Z.get(),a=null==i||null===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function 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}function pe(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}window._deviceInfo=s(navigator.userAgent);var Ie=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},we=function(e){var t=ge(e,"video.tags",[]),n=ge(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},ge=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},Ee=function(){var e,t,n,i,o,l,a,d,s,c,v,m,f,p,I,w,g,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",F=arguments.length>1?arguments[1]:void 0,b=arguments.length>2?arguments[2]:void 0,D=(null==b?void 0:b.siteName)||"",O=(null==b?void 0:b.contentType)||"video",R=(null==b||null===(e=b[O])||void 0===e?void 0:e.metadata)||(null==b||null===(t=b[O])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),S=r(F);if(!_.includes("VIEWLIFT_"))return _;var L,V=window.getComputedStyle(document.getElementById(F),null),W=Math.trunc(V.getPropertyValue("height").slice(0,-2)),P=Math.trunc(V.getPropertyValue("width").slice(0,-2)),C="linearchannel"===O?null==b||null===(i=b.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(l=o.find(function(e){return(null==e?void 0:e.id)===(null==b?void 0:b.channelId)}))||void 0===l||null===(a=l.content)||void 0===a?void 0:a.id:ge(b,"video.gist.id",""),A="linearchannel"===O?null==b||null===(d=b.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==b?void 0:b.channelId)}))||void 0===c?void 0:c.title:ge(b,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,x=null;"function"==typeof window.__gpp&&(null===(L=window)||void 0===L||L.__gpp("ping",function(e){N=null==e?void 0:e.gppString,x=null==e?void 0:e.sectionList[0]}));var U=pe(pe({},Te(R)),{},{VIEWLIFT_WIDTH:P,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:Ie(P,W),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ge(b,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==S||null===(m=S.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==S||null===(f=S.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:we(b),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ge(b,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ge(b,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ge(null===(p=window)||void 0===p||null===(I=p.app_data)||void 0===I||null===(w=I.site)||void 0===w?void 0:w.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":ge(null===(g=window)||void 0===g||null===(E=g.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:A,VIEWLIFT_CONTENT_SERIES_TITLE:ge(b,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ge(b,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:me(),VIEWLIFT_SEASON_NUMBER:ve(),VIEWLIFT_CONTENT_TAGS:we(b),VIEWLIFT_GPP_SID:x||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var B in U){var j=new RegExp(B,"g");_=_.replace(j,U[B])}return _},Te=function(e){var t,n,i,o,r,l,d;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV)return he(e);var u={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){s.set(e.name,e.value)}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.subscription)||void 0===o?void 0:o.SVOD)||!1,v=(null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(d=l.subscription)||void 0===d?void 0:d.TVE)||!1;return c||v?(a()?c?u=pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):v&&(u=pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):c?u=pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):v&&(u=pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),c?u=pe(pe({},u),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):v&&(u=pe(pe({},u),{},{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),u=a()?pe(pe({},u),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):pe(pe({},u),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(u=pe(pe({},u),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),u=a()?pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),u=pe(pe({},u),{},{VIEWLIFT_AFID:s.get("afid")})},he=function(e){var t,n,i,o,r,l,a={},d=new Map;return(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)})),null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i||i.SVOD,(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?"lgTv"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):"lgTv"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.firetv.dtc")||"",VIEWLIFT_PROF:d.get("prof.firetv")||""})):(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})),a},ye=function(e){var t=null;try{var n,i,o,r,l,a,d,u,s,c,v,m,f,p,I,w,g,E,T,h,y,_,F,b,D,O,R,S,L,V,W,P,C,A,N,x,U;if(null!==(n=window)&&void 0!==n&&n.customData.isSmartTV){if("samsungTv"==window.customData.device&&null!=e&&null!==(i=e.ads)&&void 0!==i&&null!==(o=i.preRoll)&&void 0!==o&&null!==(r=o.adTags)&&void 0!==r&&null!==(l=r.samsung_tv)&&void 0!==l&&l.active)t=null==e||null===(O=e.ads)||void 0===O||null===(R=O.preRoll)||void 0===R||null===(S=R.adTags)||void 0===S||null===(L=S.samsung_tv)||void 0===L?void 0:L.url;else if("lgTv"==window.customData.device&&null!=e&&null!==(a=e.ads)&&void 0!==a&&null!==(d=a.preRoll)&&void 0!==d&&null!==(u=d.adTags)&&void 0!==u&&null!==(s=u.lg_tv)&&void 0!==s&&s.active){var B,j,M,k;t=null==e||null===(B=e.ads)||void 0===B||null===(j=B.preRoll)||void 0===j||null===(M=j.adTags)||void 0===M||null===(k=M.lg_tv)||void 0===k?void 0:k.url}else if("vizioTv"==window.customData.device&&null!=e&&null!==(c=e.ads)&&void 0!==c&&null!==(v=c.preRoll)&&void 0!==v&&null!==(m=v.adTags)&&void 0!==m&&null!==(f=m.vizioTv)&&void 0!==f&&f.active){var H,z,G,Y;t=null==e||null===(H=e.ads)||void 0===H||null===(z=H.preRoll)||void 0===z||null===(G=z.adTags)||void 0===G||null===(Y=G.vizioTv)||void 0===Y?void 0:Y.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(I=p.preRoll)&&void 0!==I&&null!==(w=I.adTags)&&void 0!==w&&null!==(g=w.xbox)&&void 0!==g&&g.active){var X,q,J,K;t=null==e||null===(X=e.ads)||void 0===X||null===(q=X.preRoll)||void 0===q||null===(J=q.adTags)||void 0===J||null===(K=J.xbox)||void 0===K?void 0:K.url}else if("xbox"==window.customData.device&&null!=e&&null!==(E=e.ads)&&void 0!==E&&null!==(T=E.preRoll)&&void 0!==T&&null!==(h=T.adTags)&&void 0!==h&&null!==(y=h.xbox)&&void 0!==y&&y.active){var Q,Z,$,ee;t=null==e||null===(Q=e.ads)||void 0===Q||null===(Z=Q.preRoll)||void 0===Z||null===($=Z.adTags)||void 0===$||null===(ee=$.xbox)||void 0===ee?void 0:ee.url}else if("FireTV"==window.customData.device&&null!=e&&null!==(_=e.ads)&&void 0!==_&&null!==(F=_.preRoll)&&void 0!==F&&null!==(b=F.adTags)&&void 0!==b&&null!==(D=b.firetv)&&void 0!==D&&D.active){var te,ne,ie,oe;t=null==e||null===(te=e.ads)||void 0===te||null===(ne=te.preRoll)||void 0===ne||null===(ie=ne.adTags)||void 0===ie||null===(oe=ie.firetv)||void 0===oe?void 0:oe.url}}else t=(null==e||null===(V=e.ads)||void 0===V||null===(W=V.preRoll)||void 0===W||null===(P=W.adTags)||void 0===P||null===(C=P.web)||void 0===C?void 0:C.active)&&(null==e||null===(A=e.ads)||void 0===A||null===(N=A.preRoll)||void 0===N||null===(x=N.adTags)||void 0===x||null===(U=x.web)||void 0===U?void 0:U.url)}catch(e){}return t},_e=function(e,t){var n,i,o,r,l,a,u,s,c,v,m,f,p,I=(null==e?void 0:e.contentType)||"video",w=null==e||null===(n=e[I])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[I])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[I])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,T=(null==e||null===(a=e[I])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[I])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[I])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return be(E);if(w){var y=De(g,t);return y.src=Ee(y.src,t,e),y}if("Safari"!==d()&&h){var _=Fe(g);return _.src=Ee(_.src,t,e),_}if(T){var F=be(g);return F.src=Ee(F.src,t,e),F}if(null!=g&&g.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return b.src=Ee(b.src,t,e),b}return null},Fe=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},be=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},De=function(e,t){var n=(null==e?void 0:e.drmProvider)||null,o=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,u=d();if(r(t),"Safari"===u){var s=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 l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(o);return Oe(t),s}var c,v={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Oe(t),v.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==n?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Oe=function(e){var t=r(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==d()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Re=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}},Se=function(e,t){if(import("./error-2395864b.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)}}},Le=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Ve=!1,We=function(e,t,n){var i=Ee(t,e,n),o=r(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,l=r(e);if(null!==l.el_){Ve=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Ve&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function Pe(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 Ce=function(e){i(e).play()},Ae=function(e){i(e).pause()},Ne=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},xe=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Ue=function(e){return!!i.getPlayer("".concat(e))},Be=function(e){return i(e).paused()},je=function(){var e=t(n.mark(function e(t,i){var o,l,a,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,j();case 3:return l=e.sent,a=r(t),e.abrupt("return",new Promise(function(e,n){y(i,l).then(function(n){var r=null==n?void 0:n.data;window.sid=oe(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=_e(r,t);H(r),l&&o?(Ge(t,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){n({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Me=function(){var e=t(n.mark(function e(t,i){var o,l,a,d,u,s,m=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(d=m.length>2&&void 0!==m[2]?m[2]:null){e.next=5;break}return e.next=4,j();case 4:d=e.sent;case 5:return(Y()||null)&&Q(i),u=0,s=0,null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&b(i,d).then(function(e){var t,n,i,o,r,l;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)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(l=e.data)||void 0===l?void 0:l.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){h(i,d).then(function(i){var o,l,a=null==i?void 0:i.data,d=(null==a||null===(o=a.video)||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;H(i.data);var m=ye(a);m&&We(t,m,a);var f=_e(a,t);if(f){var p,I,w,g,E,T,h,y,_,F,b,D,O,R,S=(null==a||null===(p=a.video)||void 0===p||null===(I=p.gist)||void 0===I?void 0:I.videoImageUrl)||(null==a||null===(w=a.video)||void 0===w||null===(g=w.gist)||void 0===g||null===(E=g.imageGist)||void 0===E?void 0:E.r16x9),L=r(t);if(L.poster(S),Ge(t,f),L.on("loadstart",function(){d&&e({status:!0,msg:"Video Loaded",response:a})}),L.on("loadeddata",function(){Le(),e({status:!0,msg:"Video Loaded",response:a})}),L.one("play",function(){u&&s<95&&setTimeout(function(){L.currentTime(u)},0)}),L.one("error",function(){var e;n({status:!1,msg:(null==L||null===(e=L.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==a||null===(T=a.video)||void 0===T||null===(h=T.contentDetails)||void 0===h||null===(y=h.closedCaptions)||void 0===y?void 0:y.length)>0||(null==a||null===(_=a.video)||void 0===_||null===(F=_.closedCaptions)||void 0===F?void 0:F.length)>0)b=((null==a||null===(D=a.video)||void 0===D||null===(O=D.contentDetails)||void 0===O?void 0:O.closedCaptions)||(null==a||null===(R=a.video)||void 0===R?void 0:R.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(t,b);else v(t)}else Se(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){Ye(e,t,n,i)})}));case 11:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),ke=function(e,t,n){var i=r(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)})})},He=function(e){var t=r(e);if(ze(),l(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},ze=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()},Ge=function(e,t){var n=r(e);n&&n.src(t)},Ye=function(t,n,i,o){var r,l,a,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Ue(n)&&Se(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?Pe(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pe(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}))},Xe=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")};export{_ as A,ce as B,Z as C,G as D,ke as E,Ce as F,Ae as G,Be as H,Ue as I,Me as J,je as K,He as L,R as M,O as N,M as O,V as P,S as Q,f as R,X as S,q as T,D as U,K as V,Q as W,me as a,Y as b,ve as c,z as d,_e as e,H as f,re as g,Le as h,Se as i,J as j,Ne as k,Ge as l,Ee as m,ye as n,Xe as o,se as p,We as q,xe as r,F as s,Re as t,k as u,h as v,b as w,Ye as x,j as y,y as z};
|
package/esm/index-f1f0cece.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m as p,n as m,o as y,p as g,q as h,t as b,u as w,v as k,w as S,x as T,y as O,z as I,A as j,B as E,C as P,D,E as A,F as x,G as C,H as L,I as R,J as N,K as _,L as M,M as V,N as U,O as B,P as H,Q as F,R as Q}from"./generic-a4cc0314.js";import K from"@babel/runtime/helpers/defineProperty";import q from"@babel/runtime/helpers/asyncToGenerator";import z from"@babel/runtime/regenerator";import G from"video.js";import{o as W,g as J,a as X,b as Y,s as $,c as Z,p as ee}from"./util-f9af2f94.js";import{g as ne,d as te,a as oe,e as re,b as ie}from"./captions-bbc7eb98.js";import{g as le,t as ae,i as se,a as ue}from"./skin-86e7e2b5.js";import{g as ce,a as de}from"./renditions-05558f5d.js";import{playSelectedResolution as ve}from"./resolution-73611ca6.js";import{d as fe}from"./browser-512cd55a.js";import{s as pe}from"./localisation-0bf399a1.js";import me from"@babel/runtime/helpers/typeof";import ye from"@babel/runtime/helpers/toConsumableArray";import ge from"@babel/runtime/helpers/slicedToArray";var he=function(e){return new Promise(function(n,t){if(be(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},be=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},we=function(e){var n,t=le(e);return(null==t||null===(n=t.audioTracks())||void 0===n?void 0:n.tracks_)||[]||[]},ke=function(e,n){for(var t=le(e).audioTracks().tracks_||[],o=0;o<t.length;o++){var r=t[o];r.id==n?r.enabled=!0:r.enabled=!1}},Se=function(e,n,t){var o=le(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Te=function(e){var n=le(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Oe=function(){var e=q(z.mark(function e(n){var t,o,r,i,l;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=le(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,he("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(G),e.finish(13);case 16:(l=G.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==fe()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),Ie=function(e,n){var t=le(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=G.dom.getPointerPosition(a,n).x;G.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var je=function(){var e=q(z.mark(function e(){return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),he("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ee=function(){var e=q(z.mark(function e(){return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){G.getPlugin("eme")||G.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=q(z.mark(function e(){var n;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(G),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),De=function(){var e=q(z.mark(function e(){return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),Ae=function(){var e=q(z.mark(function e(){return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-6c1ba1fe.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),xe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){he("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(G)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(G)})},loadAdsLibrary:je,loadEMELibrary:Ee,loadMuxPlugin:Pe,loadDvrSeekbar:De,loadContribDash:Ae});function Ce(e){return Le.apply(this,arguments)}function Le(){return(Le=q(z.mark(function e(n){var t;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,je();case 3:t&&"Safari"==fe()&&Promise.resolve().then(function(){return xe}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Re(e,n){return Ne.apply(this,arguments)}function Ne(){return(Ne=q(z.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==fe()?Ee():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?Ae():Ee():"Safari"!=fe()&&d?Ae():null,Oe(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_e(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ve=new Set,Ue=null,Be=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=Ge(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=Ke(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=qe(n),v["c3.cm.genreList"]=Fe(n),v["c3.cm.genre"]=He(n),v["c3.cm.channel"]=Qe(n);var p=Je(t(),n);return v=Me(Me({},v),p)},He=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Fe=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},Qe=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},Ke=function(e){return(null==e?void 0:e.contentType)||"null"},qe=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},ze=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},Ge=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var We,Je=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Xe=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Ye=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},$e=function(){var e=q(z.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=le(n),"function"==typeof(v=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Xe(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Ue&&Ue!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),Ve.clear(),Ue=d.currentSrc();var o=Ye(d.currentType()),i=r(),s=Be(i,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=ze(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){Ve.has(d.currentSrc())||(Ve.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){Ve.has(d.currentSrc())&&Ve.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==Ve||Ve.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Ze=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-3986afad.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-2c9519de.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-0195076b.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-651a96b2.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-5be717a2.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-c09b1530.js").then(function(t){t.initialiseSkin(e,n)}):"VL_SmartTV"==t&&import("./skin-2073cadc.js").then(function(t){t.initialiseSkin(e,n)})};function en(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function nn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?en(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):en(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var tn=[],on=0,rn=null;function ln(e,n,t){var o,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),g=c?100:Math.floor(v/f*100),h={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=an(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return nn(nn({},e),{},K({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===We});c<0?i.push(nn(nn({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=nn(nn(nn({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,n.siteOwner):(h=nn(nn({videoId:We,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},rn&&{seriesId:rn}),p&&{originalObjectId:p}),i(h).then(function(e){}).catch(function(e){})),on=v+t}function an(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function sn(e,n,t){var o=an(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var un=!1,cn=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!un){var i=dn(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),un=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function dn(e,n,t){if(Array.isArray(e))return e.map(function(e){return dn(e,n,t)});if(null!==e&&"object"===me(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=dn(e[r],n,t)}),o}return e}function vn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return fn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?fn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function fn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function pn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function mn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pn(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var yn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=le(e),y=(null==f?void 0:f.contentType)||"video",g=(null==f?void 0:f[y].drmEnabled)||!1,h=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadstart",function(){h?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(mn({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=ne(e);if(null==l||l.map(function(n){return te(e,n.id)}),b&&"Safari"===fe())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&Se(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=mn(mn({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(rn=null==n||null===(r=n.series)||void 0===r?void 0:r.id),tn=[],on=0,We=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=le(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());tn.includes(on)||(e==on?(tn.push(e),ln(a,n,l)):e>on&&(on=e+l))}}),a.one("ended",function(){ln(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,g,h,w,k,S=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),T=null==S?void 0:S.gist,O={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==T?void 0:T.id,video_title:null==T?void 0:T.title,video_series:null==S||null===(h=S.series)||void 0===h?void 0:h.title,video_stream_type:null!=S&&null!==(w=S.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:O})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){h&&cn(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?cn(f,e):(c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e,t,o,i,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,s,u,c=null===(a=r())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,v=d(),f=(null==v?void 0:v.get(c))||{t:0,p:0},p=f.t,y=f.p;p&&y<95&&setTimeout(function(){m.currentTime(p)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==me(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=vn(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=vn(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;if(("Chrome"==fe()||"Edge"==fe()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!g))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1"))m.audioTracks().removeTrack(p);else{if("main"==p.kind){p.enabled=!0;break}p.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};function gn(e,n){var t,o,r,i=le(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,s,u,c,d,p,m,y;if(bn.enabled&&"input"!=t.target.localName){var g=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(t.preventDefault(),null==a||a.focus()),g){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":h&&!1===n.liveui||f(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(s=r.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(c=u.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(d=window)&&void 0!==d&&null!==(p=d.app_data)&&void 0!==p&&null!==(m=p.appcmsMain)&&void 0!==m&&null!==(y=m.adsConfig)&&void 0!==y&&y.vodAdClientSideTracking)return;h||v(e,10)}}},!0)}var hn,bn=(hn=!0,{enable:function(){hn=!0},disable:function(){hn=!1},get enabled(){return hn}}),wn="ssai-breakStart",kn="ssai-adImpression",Sn="ssai-firstQuartile",Tn="ssai-midpoint",On="ssai-thirdQuartile",In="ssai-complete",jn="ssai-breakEnd",En={breakStart:wn,impression:kn,firstQuartile:Sn,midpoint:Tn,thirdQuartile:On,complete:In,breakEnd:jn};function Pn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=le(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=En[o];r&&t.trigger(r,n)}function Dn(e){var n=le(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(wn,e)},adImpression:function(e){return t(kn,e)},adFirstQuartile:function(e){return t(Sn,e)},adMidpoint:function(e){return t(Tn,e)},adThirdQuartile:function(e){return t(On,e)},adComplete:function(e){return t(In,e)},adBreakEnd:function(e){return t(jn,e)}}}function An(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function xn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?An(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):An(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ln(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ln(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Ln(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Rn,Nn,_n=(Rn="",{set:function(e){e&&(Rn=e)},get:function(){return Rn}}),Mn=(Nn=null,{set:function(e){Nn=e},get position(){return Nn}});function Vn(e,n){return Un.apply(this,arguments)}function Un(){return(Un=q(z.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,g,h;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return le(n),o=l(t,n),r=o.src,i=r.replace("/dash/","/session/").replace("master","session"),i=p(i,n,t),a=Bn(i),s=ge(a,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=ge(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.prev=8,e.next=11,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:xn({},u)})});case 11:return d=e.sent,e.next=14,d.json();case 14:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,g=f+m,h=f+y,_n.set(g),console.log("%c TRACKING URL","background: #bdf369; color: #000",g),o.src=h,e.abrupt("return",o);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",o);case 29:case"end":return e.stop()}},e,null,[[8,26]])}))).apply(this,arguments)}function Bn(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var o,r=Cn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=ge(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=ge(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}function Hn(e,n){return Fn.apply(this,arguments)}function Fn(){return Fn=q(z.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,f,p,m,y,g,h,b,w;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:w=function(e,t,o,r,i,l){var a=le(n);if(!a.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(a.currentTime());var s,u=Cn(o);try{var c=function(){var o,u,c,d=s.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,y=d.durationInSeconds,g=p||0,w=f,k=(null===(o=window)||void 0===o||null===(u=o.customData)||void 0===u||null===(c=u.ads)||void 0===c?void 0:c.adEventHandler)||null,S="".concat(g,"_").concat(v),T=h.get("pod-".concat(i))||[];if(e>=g&&!T.includes(S)){var O;T.push(S),h.set("pod-".concat(i),T);try{b(v,t,w,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,t)}if("breakEnd"==v){var I=Mn.position;Mn.set(null),setTimeout(function(){null!=I&&(a.currentTime(I),l())},500)}if("function"==typeof k&&null!=t&&null!==(O=t.ads)&&void 0!==O&&O[r])try{var j,E={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:y,ad:null==t||null===(j=t.ads)||void 0===j?void 0:j[r],adIndex:r};k({adsData:E}),Pn(n,E)}catch(e){console.error("Error when calling ads callback:",e)}}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},b=function(e,n,t,o){null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},g=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Mn.set(t),a=_n.get(),(s=le(n)).one("loadeddata",function(){a&&y(a)}),u=new Map,c=new Map,d=-1,f=(null===(o=document)||void 0===o||null===(r=o.getElementsByClassName("tvProviderImage"))||void 0===r?void 0:r[0])||null,p=(null==s||null===(i=s.controlBar)||void 0===i?void 0:i.getChild("videoSelector"))||null,m=(null==s||null===(l=s.controlBar)||void 0===l?void 0:l.getChild("seriesV2"))||null,y=function(){var e=q(z.mark(function e(o){var r,i,l,a,s,y,h,b,k,S,T,O,I,j,E,P,D;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I=function(e){document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",I),0===e.button&&S()},O=function(e){},T=function(){var e,n=h.currentTime(),t=null,o=Cn(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,u.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},S=function(){var e,n=h.currentTime(),t=null,o=Cn(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!u.has(i)||n>=i&&n<=s)&&(t=i,u.set(i,!0),c.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t+.4)},100))},i=!1,e.next=7,fetch(o);case 7:return l=e.sent,e.next=10,l.json();case 10:a=e.sent,s=a.avails,y=[],h=le(n),b=h.controlBar.progressControl,k=b.seekBar.el(),s.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(i=!0),y.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!i&&t&&(h.currentTime(t),T()),null!=y&&y.length&&(window.adsQueueList=y),console.log(y,"data"),y.forEach(function(e){var n,t,o=e.markerPositionInSeconds,r=e.ads,i=h.duration();if(!(o>i||Array.isArray(r)&&0==(null==r?void 0:r.length))){var l=o/i*100,a=document.createElement("div");a.className="vjs-seekbar-marker",a.style.left="".concat(l,"%"),a.style.position="absolute",a.style.top="0",a.style.bottom="0",a.style.width="2px",a.style.backgroundColor="#fecc09",a.style.left="".concat(l,"%"),a.style.pointerEvents="none",k.appendChild(a),null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableControls&&(k.style.display="none")}}),h.on("timeupdate",ae(function(){var e=h.currentTime();if(e!==d){d=e;for(var n=!1,t=function(){var t=y[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&u.set(r,!0),bn.disable(),f&&f.classList.add("vjs-hidden"),p&&(p.el().style.pointerEvents="none",p.el().classList.add("vjs-hidden")),m&&(m.el().style.pointerEvents="none",m.el().classList.add("vjs-hidden")),b.el().style.visibility="hidden";for(var s=e-r,d=0,v=0,h=0;h<l.length;h++){var k,S=null==l||null===(k=l[h])||void 0===k?void 0:k.durationInSeconds;if(s<d+S){v=h;break}d+=S}l[v];var O=Math.max(0,i-s),I=Math.round(O);j.style.display="block",D.textContent="".concat(v+1," of ").concat(l.length," • ").concat(g(I));var E=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});E.push.apply(E,ye(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),w(e,t,E,v,o,T),"break"}c.delete(r)},o=0;o<y.length;o++){if("break"===t())break}n||(j.style.display="none",b.el().style.visibility="visible",p&&(p.el().style.pointerEvents="auto",p.el().classList.remove("vjs-hidden")),m&&(m.el().style.pointerEvents="auto",m.el().classList.remove("vjs-hidden")),f&&f.classList.remove("vjs-hidden"),bn.enable())}},1e3)),null===(r=document)||void 0===r||r.addEventListener("keydown",function(e){bn.enabled&&"ArrowRight"==e.key&&(S(),v(n,10),e.stopPropagation())}),b.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",O),document.addEventListener("pointerup",I))}),(j=document.createElement("div")).className="ssai-ad-container",(E=document.createElement("div")).className="sponsored-adbox",(P=document.createElement("div")).className="sponsored-text",P.textContent="Sponsored Ad",E.append(P),(D=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",j.append(E),j.append(D),h.el().appendChild(j);case 40:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),h=new Map;case 16:case"end":return e.stop()}},e)})),Fn.apply(this,arguments)}function Qn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Kn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qn(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var qn=function(e,n,t,o){var r,i,s,u,d,v,f,p,w,k,S,T,O,I,j,E,P,D,A,x,C,L,R,N,_,M,V,U,B,H,F,Q,W=n.res,J=void 0===W?null:W,X=n.sres,Y=void 0===X?null:X,$=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],Z=(null===(r=J)||void 0===r?void 0:r.contentType)||"video",ee=se(null===(i=J)||void 0===i||null===(s=i[Z])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||se(null===(d=J)||void 0===d||null===(v=d[Z])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),ne=(null===(w=J)||void 0===w||null===(k=w[Z])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,te=(null===(T=J)||void 0===T||null===(O=T[Z])||void 0===O||null===(I=O.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,re=m(J);J=Kn(Kn({},J),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ie="MEDIA_TAILOR"==(null===(j=window)||void 0===j||null===(E=j.app_data)||void 0===E||null===(P=E.appcmsMain)||void 0===P||null===(D=P.adsConfig)||void 0===D?void 0:D.vodAdSticherProvider)||"MEDIA_TAILOR"==(null===(A=window)||void 0===A||null===(x=A.customData)||void 0===x||null===(C=x.ads)||void 0===C?void 0:C.vodAdSticherProvider)||!1,ae=(null==t?void 0:t.latency)||6,ue=(null==t?void 0:t.skin_settings)||{},ce=(F={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ue?void 0:ue.pictureInPictureToggle)||!1},playbackRates:null!=ue&&ue.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==t.skin,liveui:ne},K(F,"autoplay",null==t?void 0:t.autoplay),K(F,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!re),K(F,"loop",(null==t?void 0:t.loop)||!1),K(F,"audioPosterMode",null==t?void 0:t.audioPosterMode),K(F,"html5",Kn(Kn({dash:Kn(Kn(Kn({},!G.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(L=t.debugConfig)||void 0===L?void 0:L.enable)&&{debug:!1,logLevel:null!=t&&null!==(R=t.debugConfig)&&void 0!==R&&R.logLevel?null==t||null===(N=t.debugConfig)||void 0===N?void 0:N.logLevel:"off"}),{},{updateSettings:{streaming:{delay:{liveDelay:ae},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Kn({},"IE"==fe()&&{enableStallFix:!0,stallSeek:1}),abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}},null!==(_=window)&&void 0!==_&&null!==(M=_.customData)&&void 0!==M&&M.isSmartTV?{bufferToKeep:10,bufferTimeAtTopQuality:15,bufferTimeAtTopQualityLongForm:15,bufferPruningInterval:5}:{}),vhs:Kn(Kn({liveRangeSafeTimeDelta:ae,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(V=t.customData)||void 0===V?void 0:V.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(U=null==t?void 0:t.enableLowInitialPlaylist)||void 0===U||U}),nativeTextTracks:"Safari"==fe()},0==(null==t||null===(B=t.customData)||void 0===B?void 0:B.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(H=t.customData)||void 0===H?void 0:H.nativeVideoTracks)&&{nativeVideoTracks:!1})),K(F,"poster",ee),K(F,"techOrder",$),K(F,"chromecast",{requestCustomDataFn:function(n){var t=le(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,O=(null==T?void 0:T.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=O;var I=(null==T?void 0:T.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=I}var j=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=j;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(J,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=le(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=J)||void 0===t||null===(o=t[Z])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),F);if(!G.getPlayers()[e]){null===(Q=window)||void 0===Q||!Q.customData.isSmartTV||null!=t&&t.disableControls||(ce.spatialNavigation={enabled:!0,horizontalSeek:!0});try{G.log.level("off")}catch(e){}var de=G(e,ce,function(){var n=q(z.mark(function n(){var r,i,s,u,d,v,f,p,m,w,k,S,T,O,I,j,E,P,D,A,x,C,L,R,N,_,M,V,U,B,H,F,Q,K,q,W,X,$,ee;return z.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:try{de.log.level("off")}catch(e){}return console.log(de),console.log(G.VERSION),console.log(G.getPlugins()),n.next=6,Re(t,J);case 6:try{null===(V=window)||void 0===V||!V.customData.isSmartTV||null!=t&&t.disableControls||de.spatialNavigation.start()}catch(e){}if(U=null===(r=J)||void 0===r||null===(i=r[Z])||void 0===i||null===(s=i.liveDetails)||void 0===s?void 0:s.startOverTime,te&&o.resolve(Kn({status:!0,msg:"Player Initialised"},Y?{seriesResponse:Y,response:J}:{response:J})),g(e,null==t?void 0:t.analyticsCb),$e(e,t),/Android/i.test(navigator.userAgent)&&(G.options.vhs.overrideNative=!0),ne&&Ie(e,U),!re||null!=t&&null!==(u=t.customData)&&void 0!==u&&u.disableAds||h(e,re,J),B=l(J,e),console.log(B),null!=t&&t.nearestClusterUrl&&(B=b(B,t.nearestClusterUrl)),!ie||null===(d=J)||void 0===d||null===(v=d.video)||void 0===v||!v.isSSAIEnabled){n.next=21;break}return n.next=20,Vn(e,J);case 20:B=n.sent;case 21:B?a(e,B):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:J}),c(e,"Incompatible / Missing Source")),((null===(f=J)||void 0===f||null===(p=f[Z])||void 0===p||null===(m=p.contentDetails)||void 0===m||null===(w=m.closedCaptions)||void 0===w?void 0:w.length)>0||(null===(k=J)||void 0===k||null===(S=k[Z])||void 0===S||null===(T=S.closedCaptions)||void 0===T?void 0:T.length)>0)&&(X=(null===(F=J)||void 0===F||null===(Q=F[Z])||void 0===Q||null===(K=Q.contentDetails)||void 0===K?void 0:K.closedCaptions)||(null===(q=J)||void 0===q||null===(W=q[Z])||void 0===W?void 0:W.closedCaptions),H=X.filter(function(e){return"VTT"===e.format}),oe(e,H)),null!=t&&t.disableControls&&y(e),"MEDIA_TAILOR"==(null===(O=window)||void 0===O||null===(I=O.app_data)||void 0===I||null===(j=I.appcmsMain)||void 0===j||null===(E=j.adsConfig)||void 0===E?void 0:E.vodAdSticherProvider)&&null!==(P=window)&&void 0!==P&&null!==(D=P.app_data)&&void 0!==D&&null!==(A=D.appcmsMain)&&void 0!==A&&null!==(x=A.adsConfig)&&void 0!==x&&x.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(C=window)||void 0===C||null===(L=C.customData)||void 0===L||null===(R=L.ads)||void 0===R?void 0:R.vodAdSticherProvider)&&null!==(N=window)&&void 0!==N&&null!==(_=N.customData)&&void 0!==_&&null!==(M=_.ads)&&void 0!==M&&M.vodAdClientSideTracking?(t.customData.disableControls=!0,$=l(null==ce?void 0:ce.res,e)||{},ee=$.src,Hn(e,ee)):Ze(e,Kn(Kn(Kn({},t),ce),{},{liveVideo:te,isDvrEnabled:ne,res:J,sres:Y})),yn(e,Kn(Kn(Kn({},t),ce),{},{liveVideo:te}),o,{res:J,sres:Y});case 26:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},zn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Gn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Wn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gn(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Jn,Xn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Yn(e);qn(r,{res:i},e,{resolve:t,reject:o})},Yn=function(e){var n,t,o,r,i,l,a,s,u=null==e?void 0:e.streamingInfo,c=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,d=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,v=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.url)||null,f=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,p=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],m=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.drmProvider)||null,y=null==e?void 0:e.token,g=w(y),h=null==g?void 0:g.site;return Wn(Wn({id:null==zn?void 0:zn[h]},!d&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:d,streamingInfo:{videoAssets:Wn(Wn({},m&&{drmProvider:m}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==u?void 0:u.isDvrEnabled},gist:Wn({},f&&{videoImageUrl:f}),contentDetails:Wn({},(null==p?void 0:p.length)>0&&{closedCaptions:ye(p)})},ads:{preRoll:{adTags:{web:Wn(Wn({},v&&{active:!0}),v&&{url:v})}}}})};function $n(e,n){return Zn.apply(this,arguments)}function Zn(){return(Zn=q(z.mark(function e(n,t){var o,r,i,l,a,u;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,O();case 6:u=e.sent,k(i,u).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,s(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=sn((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",qn(l,{res:p},n,{resolve:o,reject:r})}else S(i,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){qn(l,{res:p},n,{resolve:o,reject:r})});else qn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){T(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function et(e,n){return nt.apply(this,arguments)}function nt(){return(nt=q(z.mark(function e(n,t){var o,r,i,l,a;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,O();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,I(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,qn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){T(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function tt(e,n){return ot.apply(this,arguments)}function ot(){return(ot=q(z.mark(function e(n,t){var o,r,i,l,a,u,c;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,O();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,P.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,j(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;D(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);E(c,l),k(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,s(e.data),qn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){T(e,a,i,videoId)})}).catch(function(e){T(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function rt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function it(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rt(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function lt(){return{loadVideoInstantly:A,onTimeUpdate:W,getVideoDuration:J,getVideoCurrentTime:X,onVideoEnded:Y,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=q(z.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,w,S,O,I,j,E,P;return z.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!R(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,g=null==e?void 0:e.videoId,h=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=g,w=null==e?void 0:e.token,!B(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",w),H().set(null==e?void 0:e.refreshToken),w&&!F(w)){n.next=16;break}return o({status:!1,msg:"".concat(w?"Token is expired !":"Missing Authorization Token"),response:{token:w}}),n.abrupt("return");case 16:Jn=JSON.parse(atob(w.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=Jn)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=Jn)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=Jn)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=Jn)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,S=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,O=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(I=null==e?void 0:e.errors)&&(window.customErrors=I),window.customData=null==e?void 0:e.customData,pe(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),U.set(e.apiBaseUrl),null!=e&&e.skin&&!ue(e.skin)||(e.skin="VL_ONE"),n.next=33,Ce(e);case 33:O&&he("https://www.googletagmanager.com/gtag/js?id=".concat(O)).then(function(){return Q(O)}).catch(function(e){}),(j=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(S)))&&j.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(P={directPlaybackUrl:p,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?k(E,w).then(function(n){var r=(null==n?void 0:n.data)||{};qn(S,{res:it(it({},r),P)},e,{resolve:t,reject:o})}).catch(function(e){T(e,S,o,E)}):qn(S,{res:P},e,{resolve:t,reject:o})):b?Xn(e,{resolve:t,reject:o}):h?tt(e,{resolve:t,reject:o}):y?et(e,{resolve:t,reject:o}):$n(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ce,getSelectedRendition:de,skip:v,getPlayer:le,play:x,pause:C,isPaused:L,detectBrowser:fe,rewind:f,loadVideo:a,seekToTimeStamp:$,isPlayerInitialised:R,load:N,authenticateLC:_,dispose:M,enableCaptions:re,disableCaptions:te,getCaptions:ne,getAudioTracks:we,enableAudioTrack:ke,playSelectedResolution:ve,getSource:l,setVolume:Se,getVolume:Te,disableControls:y,setPlaybackSpeed:Z,getEntitlementData:V,getSsaiEvents:Dn,getPlayerVersion:function(){return window.vl_player_version},getTextTracksWithCuesDetails:ie,playerEvents:ee}}export{lt as V,gn as i,Hn as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as l}from"./skin-86e7e2b5.js";var n=function(n){var i,e=l(n),o=[];if((null==e||null===(i=e.tech_)||void 0===i?void 0:i.vhs)||!1){var u,v,t,d=null==e||null===(u=e.tech_)||void 0===u||null===(v=u.vhs)||void 0===v||null===(t=v.representations)||void 0===t?void 0:t.call(v);(null==d?void 0:d.length)>0&&(o=null==d?void 0:d.sort(function(l,n){return(null==l?void 0:l.height)==(null==n?void 0:n.height)?(null==n?void 0:n.bandwidth)-(null==l?void 0:l.bandwidth):(null==n?void 0:n.height)-(null==l?void 0:l.height)}))}else try{var h,r,a,s=null==e||null===(h=e.dash)||void 0===h||null===(r=h.mediaPlayer)||void 0===r||null===(a=r.getRepresentationsByType)||void 0===a?void 0:a.call(r,"video");(null==s?void 0:s.length)>0&&(o=null==s?void 0:s.sort(function(l,n){return n.height-l.height}))}catch(l){var c,g=null==e||null===(c=e.qualityLevels())||void 0===c?void 0:c.levels_;(null==g?void 0:g.length)>0&&(o=null==g?void 0:g.sort(function(l,n){return n.height-l.height}))}return o},i=function(n){var i,e,o,u,v,t,d=l(n);return null!=d&&d.qualityLevels?null==d||null===(e=d.qualityLevels())||void 0===e?void 0:e.selectedIndex_:null!=d&&null!==(i=d.tech_)&&void 0!==i&&i.vhs?null==d||null===(o=d.tech_)||void 0===o||null===(u=o.vhs)||void 0===u||null===(v=u.selectedRepresentation)||void 0===v||null===(t=v.call(u))||void 0===t?void 0:t.id:0};export{i as a,n as g};
|