@viewlift/player-backup 2.0.181-backup → 2.0.183-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-11ca3627.js → autoNextVideo-487479ca.js} +1 -1
- package/cjs/bundle.css +4 -4
- package/cjs/{features-fc9321c7.js → features-ab3cd88f.js} +1 -1
- package/cjs/{generic-95b4e5ad.js → generic-9303c33a.js} +1 -1
- package/cjs/{index-e7273c9f.js → index-53dd5252.js} +1 -1
- package/cjs/{index-e985a91d.js → index-92587584.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-bca09088.js → multicamv2-08b130ee.js} +1 -1
- package/cjs/{multicamv2-c28812a1.js → multicamv2-ce51b66c.js} +1 -1
- package/cjs/{nextEpisodeButton-9ed5ab66.js → nextEpisodeButton-7dd19b2c.js} +1 -1
- package/cjs/{playlist-2761d3b7.js → playlist-f366e4b7.js} +1 -1
- package/cjs/{series-9a9dbedf.js → series-295b9f0e.js} +1 -1
- package/cjs/{series-v2-890eec0c.js → series-v2-1afd67d0.js} +1 -1
- package/cjs/{series-v2-552458e6.js → series-v2-8b15cd07.js} +1 -1
- package/cjs/{skin-76fd6ecd.js → skin-46f8ec9d.js} +1 -1
- package/cjs/{skin-c75d4075.js → skin-7c64caf6.js} +1 -1
- package/cjs/{skin-4c6873fb.js → skin-a72dd5cf.js} +1 -1
- package/cjs/{skin-90c186a6.js → skin-c004c7ce.js} +1 -1
- package/cjs/{skin-cab81021.js → skin-cbc2a587.js} +1 -1
- package/cjs/{skin-0ee03cd7.js → skin-dfc38b33.js} +1 -1
- package/cjs/{skin-253609c1.js → skin-e4178c7b.js} +1 -1
- package/cjs/{util-66d9ec93.js → util-7f840bbf.js} +1 -1
- package/cjs/{videoSelector-ed514546.js → videoSelector-a0178d21.js} +1 -1
- package/cjs/{videoSelector-c83001d8.js → videoSelector-cf5d07b2.js} +1 -1
- package/esm/{autoNextVideo-681ea0bc.js → autoNextVideo-03522087.js} +1 -1
- package/esm/bundle.css +4 -4
- package/esm/{features-f818bc4b.js → features-a617dba5.js} +1 -1
- package/esm/{generic-ac120b9f.js → generic-029c4b28.js} +1 -1
- package/esm/{index-4bc61485.js → index-686d3708.js} +1 -1
- package/esm/{index-5f582ae8.js → index-b42bad0f.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-9a99be1c.js → multicamv2-82be891d.js} +1 -1
- package/esm/{multicamv2-cfb8cf2c.js → multicamv2-b11d04d1.js} +1 -1
- package/esm/{nextEpisodeButton-75007ee0.js → nextEpisodeButton-a843f90b.js} +1 -1
- package/esm/{playlist-949d454f.js → playlist-67a17a29.js} +1 -1
- package/esm/{series-2864d3b1.js → series-01d3b330.js} +1 -1
- package/esm/{series-v2-199b0eee.js → series-v2-9baac96a.js} +1 -1
- package/esm/{series-v2-c804486a.js → series-v2-e27d6b84.js} +1 -1
- package/esm/{skin-3496d5da.js → skin-26e5f9a2.js} +1 -1
- package/esm/{skin-59688c66.js → skin-3a49c350.js} +1 -1
- package/esm/{skin-94ee778a.js → skin-51af65f9.js} +1 -1
- package/esm/{skin-7f67f5ac.js → skin-75fef00b.js} +1 -1
- package/esm/{skin-b7e99527.js → skin-7d2d625b.js} +1 -1
- package/esm/{skin-5715661f.js → skin-83e1df22.js} +1 -1
- package/esm/{skin-179eecb8.js → skin-88ed9ed3.js} +1 -1
- package/esm/{util-f1f923bb.js → util-20b9bb62.js} +1 -1
- package/esm/{videoSelector-213dcb62.js → videoSelector-1b7f0566.js} +1 -1
- package/esm/{videoSelector-6b851833.js → videoSelector-baf28366.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r}from"./player_instance-34118a5b.js";import l from"js-cookie";import{a,e as d,g as s,h as u,s as c,i as v,d as f}from"./currentVideoInfo-a8a254c2.js";import{a as m,r as p}from"./captions-f507e8ee.js";import{t as g,c as I}from"./skin-d5091b86.js";import w from"@babel/runtime/helpers/toConsumableArray";import y from"@babel/runtime/helpers/slicedToArray";function E(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function h(e){window.dataLayer=window.dataLayer||[],E("js",new Date),E("config",e)}function _(e,n){E("event",e,n)}var T={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 b(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 O(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var S={name:"@viewlift/player",version:"2.0.61",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","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=S.version;var A,C=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==T?void 0:T.getVideoDetails)},L=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:C(),params:O({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:n,"Sdk-Version":S.version,"x-player-name":"videojs"},withCredentials:!0})},P=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:F.get()+T.getLinearChannelDetails,params:O(O(O(O(O({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:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},R=function(e,n){var t,o,r=G(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):i({url:F.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},D=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return o=e.sent,e.abrupt("return",i({url:F.get()+"".concat(null==T?void 0:T.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:O({},n),params:O({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),k=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:F.get()+"".concat(null==T?void 0:T.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},j=function(e){var n=e.videoId;return i({method:"GET",url:F.get()+"".concat(null==T?void 0:T.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(A=null==T?void 0:T.apiBaseUrl,{set:function(e){e&&(A=e)},get:function(){return A}}),M=function(e,n,t,o){return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},V=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},N=null;function W(){return{set:function(e){e&&(N=e)},get:function(){return N}}}var U=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=W().get(),o=F.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),B=null,x=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!V(n)){e.next=6;break}return B||(B=U().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&W().set(r),i||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){B=null}))),e.abrupt("return",B);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},G=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function Q(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 Y(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Q(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var z=100,q=function(){var e,n,t,o,i,r,l,d=a();return"linearchannel"===((null==d?void 0:d.contentType)||"video")?null==d||null===(e=d.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find((function(e){return(null==e?void 0:e.id)===(null==d?void 0:d.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==d||null===(i=d.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==d||null===(l=d.video)||void 0===l?void 0:l.id)||(null==d?void 0:d.id)};function K(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function X(){var e=window.sessionStorage.getItem("uid");return e||(e=K(),window.sessionStorage.setItem("uid",e),e)}function J(){return $.apply(this,arguments)}function $(){return($=n(t.mark((function e(){var n,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(e){return e?String(e):""}var ee=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function ne(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=K(),d="production",s="WEBSITE",u=null,c=0,v=null,f=0,m=0,p=!1,g=[],I=r(e);if(I){var w=function(){var e,n,t,o;return Math.round((null==I||null===(e=I.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)},y=ee((function(){for(var e=I.currentTime(),n=I.buffered(),t=0;t<n.length;t++){var o=n.start(t),i=n.end(t);if(e>=o&&e<=i)return Math.round(i-e)}return 0})),E=function(){var e=n(t.mark((function e(n){var o,r,u,c,v,f,m,p,g,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return g=e.sent,I=G(g),e.t0=Y,e.t1=Y,e.t2=null==I?void 0:I.site,e.t3=null==I?void 0:I.siteId,e.t4=s,e.t5=X(),e.t6=q(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11=d,e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?Z(n.adPosition):"",e.next=25,J();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=a,e.t23=null!==(r=n.ttFirstFrame)&&void 0!==r?r:null,e.t24=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t25=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t26=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t27=null!==(f=n.bufferHealth)&&void 0!==f?f:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==l||null===(m=l.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),w=[e.t32],i({url:(null==l||null===(p=l.beacon)||void 0===p?void 0:p.url)||F.get()+T.getBeaconUrl,method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:w}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),h=function(e){if(!I.paused()&&I.readyState()>2)return clearInterval(u),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&m<4&&p?(m++,_("BUFFERING",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime)},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),E({eventName:"BUFFERING",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),0):t},b=function(){var e=Math.floor(I.currentTime);I.on("error",(function(){var n,t=Math.floor(I.currentTime);clearInterval(u);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";_(o,Y({pfm:s,uid:X(),vid:q(),videoPosition:t},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),E({eventName:o,videoPosition:t,isAdEvent:!1})}))},O=function(){var e=ee((function(){var e;c=0,v=setInterval((function(){c=h(c)}),z),_("PLAY",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime)},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),E({eventName:"PLAY",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":q(),watchTime:Math.floor(I.currentTime)})}));I.one("play",e)},S=function(){I.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(u),f=c||0,_("FIRST_FRAME",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime),ttFirstFrame:c,bufferHealth:y()},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),E({eventName:"FIRST_FRAME",videoPosition:Math.floor(I.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:y()}),p=!0,c=0}))},A=function(){var e=!1;I.on("waiting",ee((function(){p&&(e=!0,clearInterval(u),u=setInterval((function(){e&&!I.paused()?f=h(f):clearInterval(u)}),z))}))),I.on("playing",ee((function(){e=!1,clearInterval(u)})))},C=function(){var e=function(e){var n,t,o,i=Y({videoPosition:Math.floor(I.currentTime),isAdEvent:!0,bufferHealth:y(),pfm:s,uid:X(),vid:q(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==l||null===(o=l.beacon)||void 0===o?void 0:o.params);_(e,Y({},i)),E(Y({eventName:e,adPosition:1},i))};I.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),I.on("adskip",(function(){c=0})),I.on("adend",(function(){c=0}))},L=function(){I.on("timeupdate",(function(){var e=Math.floor(I.currentTime());if(e>=30&&e%30==0&&!g.includes(e)){var n,t=null===(n=I.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];m=0,g.push(e),E({eventName:"PING",videoPosition:e,isAdEvent:!1,duration:30,resHeight:(null==t?void 0:t.videoHeight)||null,resWidth:(null==t?void 0:t.videoWidth)||null,bufferHealth:y(),bitrate:w()})}}))};b(),A(),C(),L(),O(),I.on("loadeddata",S)}else console.error("Videojs: Player instance not found.")}function te(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&ne(e,n,t)}var oe=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},ie=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},re=function(e,n){var t=new Map;j({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),u(t)})).catch((function(e){return console.log(e)}))},le=function(){var e=d.get();return e>=0?e+1:1},ae=function(){var e,n,t,o=s(),i=a(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=d.get(),u=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===r}));return u>=0?u+1:1};function de(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 se(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?de(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):de(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var ue=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ce=function(e){var n=ve(e,"video.tags",[]),t=ve(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},ve=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},fe=function(){var n,t,o,i,a,d,s,u,c,v,f,m,p,g,I,w,y,E,h,_,T,b,O,S,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",C=arguments.length>1?arguments[1]:void 0,L=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return A;var P=(null==L?void 0:L.siteName)||"",R=(null==L?void 0:L.contentType)||"video",D=(null==L||null===(o=L[R])||void 0===o?void 0:o.metadata)||(null==L||null===(i=L[R])||void 0===i||null===(a=i.gist)||void 0===a?void 0:a.metadata),k=r(C);if(!A.includes("VIEWLIFT_"))return A;var j,F=window.getComputedStyle(document.getElementById(C),null),M=Math.trunc(F.getPropertyValue("height").slice(0,-2)),V=Math.trunc(F.getPropertyValue("width").slice(0,-2)),N="linearchannel"===R?null==L||null===(d=L.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(u=s.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===u||null===(c=u.content)||void 0===c?void 0:c.id:ve(L,"video.gist.id",""),W="linearchannel"===R?null==L||null===(v=L.linearchannel)||void 0===v||null===(f=v.channels)||void 0===f||null===(m=f.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===m?void 0:m.title:ve(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,B=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",(function(e){U=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]})));var x=se(se({},me(D)),{},(b={VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:M,VIEWLIFT_SIZE:ue(V,M),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(p=window)||void 0===p?void 0:p.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ve(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(g=k.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==P||"usanetwork"==P?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ce(L),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ve(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ve(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ve(null===(w=window)||void 0===w||null===(y=w.app_data)||void 0===y||null===(E=y.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==P||"usanetwork"==P?"":ve(null===(h=window)||void 0===h||null===(_=h.app_data)||void 0===_||null===(T=_.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:ve(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ve(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ae(),VIEWLIFT_SEASON_NUMBER:le(),VIEWLIFT_CONTENT_TAGS:ce(L),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(b,"VIEWLIFT_LAT",""),e(b,"VIEWLIFT_APP_BUNDLE",""),e(b,"VIEWLIFT_ATT_CONSENT",""),b),null===(O=window)||void 0===O||null===(S=O.customData)||void 0===S?void 0:S.macros);for(var H in x){var G=new RegExp(H,"g");A=A.replace(G,x[H])}return A},me=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(ie()?s?a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=ie()?se(se({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):se(se({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=ie()?se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=se(se({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},pe=function(e,n){var t,o,i,r,l,a,d,s,u,c,v,f,m,p=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[p])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,w=null==e||null===(r=e[p])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[p])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[p])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[p])||void 0===v||null===(f=v.streamingInfo)||void 0===f||null===(m=f.videoAssets)||void 0===m?void 0:m.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=w&&w.hls)return Ie(w);if(g){var h=we(I,n);return h.src=fe(h.src,n,e),h}if("Safari"!==oe()&&E)return ge(I);if(y){var _=Ie(I);return _.src=fe(_.src,n,e),_}if(null!=I&&I.mpeg){var T=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return T.src=fe(T.src,n,e),T}return null},ge=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Ie=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},we=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=oe();if(r(n),"Safari"===d){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(i);return ye(n),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(ye(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ye=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==oe()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ee=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},he=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},_e=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Te=!1,be=function(e,n,t){var o=fe(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima)return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){Te=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Te&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout((function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,(function(){u&&l.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),l.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),l.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};function Oe(e,n){var t,o,i,l=r(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",(function(t){var o,i,r,s,u,c,v,f,m;if(Ae.enabled&&"input"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||_n(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||hn(e,10)}}}),!0)}var Se,Ae=(Se=!0,{enable:function(){Se=!0},disable:function(){Se=!1},get enabled(){return Se}}),Ce="ssai-breakStart",Le="ssai-adImpression",Pe="ssai-firstQuartile",Re="ssai-midpoint",De="ssai-thirdQuartile",ke="ssai-complete",je="ssai-breakEnd",Fe={breakStart:Ce,impression:Le,firstQuartile:Pe,midpoint:Re,thirdQuartile:De,complete:ke,breakEnd:je};function Me(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=Fe[o];i&&t.trigger(i,n)}function Ve(e){var n=r(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Ce,e)},adImpression:function(e){return t(Le,e)},adFirstQuartile:function(e){return t(Pe,e)},adMidpoint:function(e){return t(Re,e)},adThirdQuartile:function(e){return t(De,e)},adComplete:function(e){return t(ke,e)},adBreakEnd:function(e){return t(je,e)}}}function Ne(e){var n,t,o,i,r=e.isLive,l=e.startTimeInSeconds;return r?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==l?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:l===("function"==typeof(null===(t=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===t?void 0:t.getDuration)&&(null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.comscorePlayerInstance)||void 0===i?void 0:i.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function We(){var e,n,t,o,i,r,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",function(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="ad"),d.notifyPause();var s=new a.StreamingAnalytics.AdvertisementMetadata;s.setMediaType(Ne({isLive:null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentOptions)||void 0===i?void 0:i.isLive,startTimeInSeconds:null==l?void 0:l.startTimeInSeconds})),s.setUniqueId(l.id||"ad-001"),s.setLength(1e3*parseInt(l.durationMs,10)||0),s.setTitle(l.title||"Advertisement"),s.setServerCampaignId(l.campaignId),s.setRelatedContentMetadata(null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r?void 0:r.contentMetadata),s.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),s.setPlacementId(l.placementId);var u={cs_ad_tu:null==l?void 0:l.trackingUrl,ns_st_ami:null==l?void 0:l.creativeId};s.addCustomLabels(u),d.setMetadata(s),d.notifyPlay(),console.log("[Comscore] Ad started:",l)}function Ue(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))}function Be(){var e,n,t,o,i;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var r=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;r.notifyPause(),r.notifyEnd(),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="content"),(null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentMetadata)&&(r.setMetadata(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata),r.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}}function xe(e){return{id:null==e?void 0:e.adId,adTitle:null==e?void 0:e.adTitle,adDuration:(null==e?void 0:e.durationInSeconds)||0,startTimeInSeconds:(null==e?void 0:e.startTimeInSeconds)||0,campaignId:null==e?void 0:e.campaignId,placementId:null==e?void 0:e.placementId,trackingUrl:null==e?void 0:e.trackingUrl}}function He(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Ge(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?He(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):He(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Qe(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 Ye(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)?Ye(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function Ye(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}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,playerInstance:null,mode:"content",cleanupFns:[],contentOptions:null}),o.registerPlugin("comscore",(function(e){console.log(this),console.log("hello form comscore plugin",e);var n=e||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;new Promise((function(t,o){var i=document.createElement("script");i.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",i.async=!0,document.head.appendChild(i),i.onload=function(){!function(e){var n=e.publisherId,t=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var o=window.ns_.analytics;o.PlatformApi.setPlatformAPI(o.PlatformApi.PlatformApis.WebBrowser);var i=new o.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==t?void 0:t.userConsent)||"",cs_fpid:(null==t?void 0:t.userId)||""}});o.configuration.addClient(i),o.configuration.enableFirstPartyCookie(),o.configuration.enableImplementationValidationMode(),o.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=o}({publisherId:e||"40813950"})},i.onerror=function(e){o("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}));var ze,qe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Ke=(ze=null,{set:function(e){ze=e},get position(){return ze}});function Xe(e,n){return Je.apply(this,arguments)}function Je(){return(Je=n(t.mark((function e(n,o){var i,l,a,d,s,u,c,v,f,m,p,g,I,w,E,h,_,T;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(n),a=pe(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=fe(u,n,o),c=Ze(u),v=y(c,2),f=v[0],m=v[1],p=$e(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach((function(e){var n=y(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)})),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ge({adsParams:Ge({},f)},p))});case 14:return g=e.sent,e.next=17,g.json();case 17:return I=e.sent,w="https://"+new URL(u).hostname,E=I.trackingUrl,h=I.manifestUrl,_=w+E,T=w+h,qe.set(_),console.log("%c TRACKING URL","background: #bdf369; color: #000",_),a.src=T,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}}),e,null,[[11,29]])})))).apply(this,arguments)}function $e(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map((function(e){var n=y(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]})))||{}}function Ze(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Qe((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=y(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,c=Object.entries(n);u<c.length;u++){var v=y(c[u],2),f=v[0],m=v[1];if(f.startsWith("ads."))d[f.replace(/^ads\./,"")]=m;else s[f]=m}return[d,s]}var en,nn,tn,on,rn=(en=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),en=Array.isArray(e)?w(e):en},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",en),w(en)}}),ln=new Map;function an(e,n){return dn.apply(this,arguments)}function dn(){return dn=n(t.mark((function e(o,i){var l,a,d,s,u,c,v,f,m,p,I,y,E,h,_,T,b,O,S,A,C,L;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,n,t,i,l,a){var d=r(o);if(!d.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(d.currentTime());var s,u=Qe(t);try{var c=function(){var t,r,u,c=s.value,v=c.eventType,f=c.beaconUrls,m=c.startTimeInSeconds,p=c.startTime,g=c.durationInSeconds,I=m||0,w=f,y=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(u=r.ads)||void 0===u?void 0:u.adEventHandler)||null,E="".concat(I,"_").concat(v),h=ln.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",ln),e>=I&&!h.includes(E)){h.push(E),ln.set("pod-".concat(l),h);try{C(v,n,w,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var _=Ke.position;Ke.set(null),setTimeout((function(){null!=_&&(d.currentTime(_),a())}),500)}if("function"==typeof y)try{var T,b={eventType:v,startTimeInSeconds:m,startTime:p,durationInSeconds:g,ad:null==n||null===(T=n.ads)||void 0===T?void 0:T[i],adIndex:i};y({adsData:b}),Me(o,b)}catch(e){console.error("Error when calling ads callback:",e)}if("impression"===v){var O,S=qe.get();We(xe(Ge(Ge({},null==n||null===(O=n.ads)||void 0===O?void 0:O[i]),{},{trackingUrl:S})))}else"complete"===v?Ue():"breakEnd"===v&&Be()}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},C=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},ln.clear(),Ke.set(i),m=qe.get(),(p=r(o)).one("loadeddata",(function(){m&&S(m)})),I=new Map,y=new Map,E=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,_=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==p||null===(s=p.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==p||null===(u=p.el())||void 0===u||null===(c=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,O=(null==p||null===(v=p.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,S=function(){var e=n(t.mark((function e(n){var l,a,d,s,u,c,v,f,m,p,S,C,P,R,D,k,j,F,M,V;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",k),0===e.button&&P()},D=function(e){},R=function(){var e,n=p.currentTime(),t=null,o=Qe(m);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){p.currentTime(t+2.2)}),100))},P=function(){var e,n=p.currentTime(),t=null,o=Qe(m);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!I.has(r)||n>=r&&n<=d)&&(t=r,I.set(r,!0),y.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){p.currentTime(t+.4)}),100))},u=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),f=v.avails,m=[],p=r(o),S=p.controlBar.progressControl,C=S.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),f.map((function(e,n){var t,o,i;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),m.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(i=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===i?void 0:i[0])||[]})})),!u&&i&&(p.currentTime(i),R()),null!=m&&m.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),window.adsQueueList=m),console.log(m,"data"),m.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=p.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",C.appendChild(r)}})),p._timeUpdateHandler&&p.off("timeupdate",p._timeUpdateHandler),p._timeUpdateHandler=g((function(){var e=p.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=m[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&I.set(i,!0),Ae.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),S.el().classList.add("hide-progress-bar");for(var d=e-i,s=0,u=0,c=0;c<l.length;c++){var v,f=null==l||null===(v=l[c])||void 0===v?void 0:v.durationInSeconds;if(d<s+f){u=c;break}s+=f}l[u];var p=Math.max(0,r-d),g=Math.round(p);j.style.display="block",V.textContent="".concat(u+1," of ").concat(l.length," • ").concat(A(g));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,w(n))})),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),L(e,t,E,u,o,R),"break"}y.delete(i)},o=0;o<m.length;o++){if("break"===t())break}n||(j.style.display="none",S.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),Ae.enable())}}),1e3),p.on("timeupdate",p._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",(function(e){Ae.enabled&&"ArrowRight"==e.key&&(P(),hn(o,10),e.stopPropagation())})),S.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",D),document.addEventListener("pointerup",k))})),null===(d=document)||void 0===d||null===(s=d.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach((function(e){return null==e?void 0:e.remove()})),(j=document.createElement("div")).className="ssai-ad-container",(F=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",F.append(M),(V=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",j.append(F),j.append(V),p.el().appendChild(j);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),dn.apply(this,arguments)}function sn(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 un(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)?un(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function un(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 cn(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 vn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):cn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var fn={},mn=(null===(nn=window)||void 0===nn||null===(tn=nn.location)||void 0===tn||null===(on=tn.search)||void 0===on?void 0:on.includes("debug=true"))||!1,pn=null;function gn(e){return In.apply(this,arguments)}function In(){return In=n(t.mark((function e(o){var i,l,a,d,s,u,c,v,f,m,p,I,y,E,h,_,T,b,O,S,A,C,L,P,R,D,k;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,i,l){var a=r(o);if(!a.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(a.currentTime());var d,s=sn(t);try{for(s.s();!(d=s.n()).done;){var u,c,v,f=d.value,m=f.eventType,p=f.beaconUrls,g=f.startTimeInSeconds,I=f.startTime,w=f.durationInSeconds,y=g||0,E=p,h=(null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.adEventHandler)||null,_="".concat(y,"_").concat(m),T="pod-".concat(l);P.has(T)||P.set(T,new Set);var b=P.get(T);if(mn&&console.warn(e,y,"map:",m,"condition1:",e>=y,"map:",P),e>=y&&e<=y+R&&!b.has(_)){b.add(_);try{D(m,n,E,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,n)}if("function"==typeof h)try{var O,S={eventType:m,startTimeInSeconds:g,startTime:I,durationInSeconds:w,ad:null==n||null===(O=n.ads)||void 0===O?void 0:O[i],adIndex:i};h({adsData:S}),Me(o,S)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){s.e(e)}finally{s.f()}}},D=function(e,n,t,o){var i,r;"breakEnd"===e&&(null===(i=fn)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=fn)||void 0===r?void 0:r.totalAds)||(mn&&(console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n)),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))})))},p=function(){pn&&clearInterval(pn)},f=qe.get(),(m=r(o)).one("loadeddata",(function(){p(),pn=setInterval((function(){f&&!m.paused()&&L(f)}),2e3)})),m.on("dispose",(function(){p()})),I=new Map,y=new Map,E=-1,h=null,_=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==m||null===(a=m.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==m||null===(d=m.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,O=(null==m||null===(s=m.el())||void 0===s||null===(u=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,S=(null==m||null===(c=m.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===v?void 0:v[0])||null,A=!1,C=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return w(o);var i=[],r=null==o?void 0:o.find((function(e){return"breakEnd"===(null==e?void 0:e.eventType)})),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find((function(e){return e.includes("videoView")})))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter((function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)})),s=(null==d?void 0:d.some((function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some((function(e){return e.includes("videoView")}))})))||!1;if(!s&&l){var u=null==d?void 0:d.map((function(e){return vn(vn({},e),{},{eventType:"videoView",beaconUrls:[l]})}));null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},L=function(){var e=n(t.mark((function e(n){var i,l,a,d,s,u,c,v,f,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),h&&l.searchParams.append("nextToken",h),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,s=d.avails,u=d.nextToken||null,h=u,c=[],v=r(o),f=v.controlBar.progressControl,m=f.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),s.map((function(e,n){c.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:C(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),mn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",c),null!=c&&c.length&&(window.adsQueueList=c),c.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=v.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",m.appendChild(r)}})),v._timeUpdateHandler&&v.off("timeupdate",v._timeUpdateHandler),v._timeUpdateHandler=g((function(){var e=v.currentTime();if(e!==E){E=e;for(var n=function(){var n=c[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;A=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&I.set(o,!0),Ae.disable(),_&&_.classList.add("vjs-hidden"),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,u=0,v=0;v<r.length;v++){var m,p=null==r||null===(m=r[v])||void 0===m?void 0:m.durationInSeconds;if(d<s+p){u=v;break}s+=p}setTimeout((function(){fn.totalAds=null==r?void 0:r.length,fn.currentAdIndex=u}),1e3);var g=[];return null==r||r.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));g.push.apply(g,w(n))})),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&g.push.apply(g,w(null==n?void 0:n.podSlotImpressionBeacon)),k(e,n,g,u,t),"break"}y.delete(o)},t=0;t<c.length;t++){if("break"===n())break}A||(fn={},f.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Ae.enable())}}),1e3),v.on("timeupdate",v._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=new Map,R=2.5;case 22:case"end":return e.stop()}}),e)}))),In.apply(this,arguments)}function wn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var yn=function(e){o(e).play()},En=function(e){o(e).pause()},hn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},_n=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Tn=function(e){return!!o.getPlayer("".concat(e))},bn=function(e){return o(e).paused()},On=function(){var e=n(t.mark((function e(o,i){var l,a,d,s=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,x();case 3:return a=e.sent,d=r(o),e.abrupt("return",new Promise((function(e,r){var s=(null==i?void 0:i.programs)||[];null==i||delete i.programs,P(i,a).then(function(){var r=n(t.mark((function n(r){var a,u,v,m,p,g,I,w;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(g=null==r?void 0:r.data,window.sid=K(),g.contentType="linearchannel",g.channelId=null==i?void 0:i.channelId,I=(null==g||null===(a=g.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(v=u.app_data)||void 0===v||null===(m=v.appcmsMain)||void 0===m||null===(p=m.adsConfig)||void 0===p?void 0:p.vodAdSticherProvider)||!1,w=pe(g,o),!I){n.next=11;break}return n.next=9,Xe(o,g);case 9:w=n.sent,l=!0;case 11:c(g),f(s),sessionStorage.setItem("program_switched",!0),w&&l?(Pn(o,w),I&&gn(o),d.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:g})}))):e({status:!0,msg:"Feed authenticated",response:g});case 15:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){r({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Sn=function(){var e=n(t.mark((function e(o,i,l){var a,d,u,f,g,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return f=e.sent,(s()||null)&&v(i),g=0,I=0,w=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&k(i,f).then((function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),g=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(I=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(w=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,l){L(i,f).then(function(){var i=n(t.mark((function n(i){var a,d,s,u,v,f,y,E,h,_,T,b,O,S,A,C,L,P,R,D,k,j,F,M,V,N,W,U,B,x,H,G,Q,Y,z,q,K,X;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(C=null==i?void 0:i.data,L=(null==C?void 0:C.contentType)||"video",P=(null==C||null===(a=C[L])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(v=u.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,R=(null==C||null===(f=C.video)||void 0===f||null===(y=f.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,c(i.data),(D=(null==C||null===(E=C.ads)||void 0===E||null===(h=E.preRoll)||void 0===h||null===(_=h.adTags)||void 0===_||null===(T=_.web)||void 0===T?void 0:T.active)&&(null==C||null===(b=C.ads)||void 0===b||null===(O=b.preRoll)||void 0===O||null===(S=O.adTags)||void 0===S||null===(A=S.web)||void 0===A?void 0:A.url))&&be(o,D,C),k=pe(C,o),!P){n.next=12;break}return n.next=11,Xe(o,C);case 11:k=n.sent;case 12:k?(G=(null==C||null===(j=C.video)||void 0===j||null===(F=j.gist)||void 0===F?void 0:F.videoImageUrl)||(null==C||null===(M=C.video)||void 0===M||null===(V=M.gist)||void 0===V||null===(N=V.imageGist)||void 0===N?void 0:N.r16x9),(Q=r(o)).poster(G),Pn(o,k),P&&an(o,w),Q.on("loadstart",(function(){R&&e({status:!0,msg:"Video Loaded",response:C})})),Q.on("loadeddata",(function(){_e(),e({status:!0,msg:"Video Loaded",response:C})})),Q.one("play",(function(){g&&!P&&I<95&&setTimeout((function(){Q.currentTime(g)}),0)})),Q.one("error",(function(){var e;l({status:!1,msg:(null==Q||null===(e=Q.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==C||null===(W=C.video)||void 0===W||null===(U=W.contentDetails)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0||(null==C||null===(x=C.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(X=(null==C||null===(z=C.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==C||null===(K=C.video)||void 0===K?void 0:K.closedCaptions),Y=X.filter((function(e){return"VTT"===e.format})),m(o,Y)):p(o)):(he(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){Rn(e,o,l,i)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),An=function(e,n,t){var o=r(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Cn=function(e){var n=r(e);if(Ln(),function(){var e,n,t,o,i,r,l,a,d,s;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.comscoreCleanupFns=[]),console.log("comscoreTag",null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef),null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.tagRef){try{null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r||r.tagRef.notifyEnd()}catch(e){}null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||(l.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(s=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===s||(s.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}(),I(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Ln=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()},Pn=function(e,n){var t=r(e);t&&t.src(n)},Rn=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Tn(t)&&he(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):wn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Dn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{_n as A,Tn as B,Sn as C,On as D,Cn as E,M as F,rn as G,Ve as H,F as I,H as J,W as K,V as L,h as M,ln as N,Oe as O,ie as P,bn as Q,gn as R,an as S,j as T,ae as a,le as b,pe as c,oe as d,_e as e,Dn as f,X as g,he as h,te as i,be as j,Ee as k,Pn as l,Xe as m,G as n,L as o,k as p,Rn as q,x as r,D as s,P as t,R as u,re as v,An as w,hn as x,yn as y,En as z};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r}from"./player_instance-34118a5b.js";import l from"js-cookie";import{a,e as d,g as s,h as u,s as c,i as v,d as f}from"./currentVideoInfo-a8a254c2.js";import{a as m,r as p}from"./captions-f507e8ee.js";import{t as g,c as I}from"./skin-d5091b86.js";import w from"@babel/runtime/helpers/toConsumableArray";import y from"@babel/runtime/helpers/slicedToArray";function E(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function h(e){window.dataLayer=window.dataLayer||[],E("js",new Date),E("config",e)}function _(e,n){E("event",e,n)}var T={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 b(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 O(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var S={name:"@viewlift/player",version:"2.0.61",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","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=S.version;var A,C=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==T?void 0:T.getVideoDetails)},L=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:C(),params:O({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:n,"Sdk-Version":S.version,"x-player-name":"videojs"},withCredentials:!0})},P=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:F.get()+T.getLinearChannelDetails,params:O(O(O(O(O({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:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},R=function(e,n){var t,o,r=G(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):i({url:F.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},D=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return o=e.sent,e.abrupt("return",i({url:F.get()+"".concat(null==T?void 0:T.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:O({},n),params:O({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),k=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:F.get()+"".concat(null==T?void 0:T.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},j=function(e){var n=e.videoId;return i({method:"GET",url:F.get()+"".concat(null==T?void 0:T.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(A=null==T?void 0:T.apiBaseUrl,{set:function(e){e&&(A=e)},get:function(){return A}}),M=function(e,n,t,o){return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},V=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},N=null;function W(){return{set:function(e){e&&(N=e)},get:function(){return N}}}var U=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=W().get(),o=F.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),B=null,x=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!V(n)){e.next=6;break}return B||(B=U().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&W().set(r),i||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){B=null}))),e.abrupt("return",B);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},G=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function Q(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 Y(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Q(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var z=100,q=function(){var e,n,t,o,i,r,l,d=a();return"linearchannel"===((null==d?void 0:d.contentType)||"video")?null==d||null===(e=d.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find((function(e){return(null==e?void 0:e.id)===(null==d?void 0:d.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==d||null===(i=d.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==d||null===(l=d.video)||void 0===l?void 0:l.id)||(null==d?void 0:d.id)};function K(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function X(){var e=window.sessionStorage.getItem("uid");return e||(e=K(),window.sessionStorage.setItem("uid",e),e)}function J(){return $.apply(this,arguments)}function $(){return($=n(t.mark((function e(){var n,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(e){return e?String(e):""}var ee=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function ne(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=K(),d="production",s="WEBSITE",u=null,c=0,v=null,f=0,m=0,p=!1,g=[],I=r(e);if(I){var w=function(){var e,n,t,o;return Math.round((null==I||null===(e=I.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)},y=ee((function(){for(var e=I.currentTime(),n=I.buffered(),t=0;t<n.length;t++){var o=n.start(t),i=n.end(t);if(e>=o&&e<=i)return Math.round(i-e)}return 0})),E=function(){var e=n(t.mark((function e(n){var o,r,u,c,v,f,m,p,g,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return g=e.sent,I=G(g),e.t0=Y,e.t1=Y,e.t2=null==I?void 0:I.site,e.t3=null==I?void 0:I.siteId,e.t4=s,e.t5=X(),e.t6=q(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11=d,e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?Z(n.adPosition):"",e.next=25,J();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=a,e.t23=null!==(r=n.ttFirstFrame)&&void 0!==r?r:null,e.t24=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t25=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t26=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t27=null!==(f=n.bufferHealth)&&void 0!==f?f:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==l||null===(m=l.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),w=[e.t32],i({url:(null==l||null===(p=l.beacon)||void 0===p?void 0:p.url)||F.get()+T.getBeaconUrl,method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:w}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),h=function(e){if(!I.paused()&&I.readyState()>2)return clearInterval(u),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&m<4&&p?(m++,_("BUFFERING",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime)},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),E({eventName:"BUFFERING",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),0):t},b=function(){var e=Math.floor(I.currentTime);I.on("error",(function(){var n,t=Math.floor(I.currentTime);clearInterval(u);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";_(o,Y({pfm:s,uid:X(),vid:q(),videoPosition:t},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),E({eventName:o,videoPosition:t,isAdEvent:!1})}))},O=function(){var e=ee((function(){var e;c=0,v=setInterval((function(){c=h(c)}),z),_("PLAY",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime)},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),E({eventName:"PLAY",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":q(),watchTime:Math.floor(I.currentTime)})}));I.one("play",e)},S=function(){I.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(u),f=c||0,_("FIRST_FRAME",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime),ttFirstFrame:c,bufferHealth:y()},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),E({eventName:"FIRST_FRAME",videoPosition:Math.floor(I.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:y()}),p=!0,c=0}))},A=function(){var e=!1;I.on("waiting",ee((function(){p&&(e=!0,clearInterval(u),u=setInterval((function(){e&&!I.paused()?f=h(f):clearInterval(u)}),z))}))),I.on("playing",ee((function(){e=!1,clearInterval(u)})))},C=function(){var e=function(e){var n,t,o,i=Y({videoPosition:Math.floor(I.currentTime),isAdEvent:!0,bufferHealth:y(),pfm:s,uid:X(),vid:q(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==l||null===(o=l.beacon)||void 0===o?void 0:o.params);_(e,Y({},i)),E(Y({eventName:e,adPosition:1},i))};I.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),I.on("adskip",(function(){c=0})),I.on("adend",(function(){c=0}))},L=function(){I.on("timeupdate",(function(){var e=Math.floor(I.currentTime());if(e>=30&&e%30==0&&!g.includes(e)){var n,t=null===(n=I.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];m=0,g.push(e),E({eventName:"PING",videoPosition:e,isAdEvent:!1,duration:30,resHeight:(null==t?void 0:t.videoHeight)||null,resWidth:(null==t?void 0:t.videoWidth)||null,bufferHealth:y(),bitrate:w()})}}))};b(),A(),C(),L(),O(),I.on("loadeddata",S)}else console.error("Videojs: Player instance not found.")}function te(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&ne(e,n,t)}var oe=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},ie=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},re=function(e,n){var t=new Map;j({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),u(t)})).catch((function(e){return console.log(e)}))},le=function(){var e=d.get();return e>=0?e+1:1},ae=function(){var e,n,t,o=s(),i=a(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=d.get(),u=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===r}));return u>=0?u+1:1};function de(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 se(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?de(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):de(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var ue=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ce=function(e){var n=ve(e,"video.tags",[]),t=ve(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},ve=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},fe=function(){var n,t,o,i,a,d,s,u,c,v,f,m,p,g,I,w,y,E,h,_,T,b,O,S,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",C=arguments.length>1?arguments[1]:void 0,L=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return A;var P=(null==L?void 0:L.siteName)||"",R=(null==L?void 0:L.contentType)||"video",D=(null==L||null===(o=L[R])||void 0===o?void 0:o.metadata)||(null==L||null===(i=L[R])||void 0===i||null===(a=i.gist)||void 0===a?void 0:a.metadata),k=r(C);if(!A.includes("VIEWLIFT_"))return A;var j,F=window.getComputedStyle(document.getElementById(C),null),M=Math.trunc(F.getPropertyValue("height").slice(0,-2)),V=Math.trunc(F.getPropertyValue("width").slice(0,-2)),N="linearchannel"===R?null==L||null===(d=L.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(u=s.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===u||null===(c=u.content)||void 0===c?void 0:c.id:ve(L,"video.gist.id",""),W="linearchannel"===R?null==L||null===(v=L.linearchannel)||void 0===v||null===(f=v.channels)||void 0===f||null===(m=f.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===m?void 0:m.title:ve(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,B=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",(function(e){U=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]})));var x=se(se({},me(D)),{},(b={VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:M,VIEWLIFT_SIZE:ue(V,M),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(p=window)||void 0===p?void 0:p.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ve(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(g=k.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==P||"usanetwork"==P?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ce(L),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ve(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ve(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ve(null===(w=window)||void 0===w||null===(y=w.app_data)||void 0===y||null===(E=y.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==P||"usanetwork"==P?"":ve(null===(h=window)||void 0===h||null===(_=h.app_data)||void 0===_||null===(T=_.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:ve(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ve(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ae(),VIEWLIFT_SEASON_NUMBER:le(),VIEWLIFT_CONTENT_TAGS:ce(L),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(b,"VIEWLIFT_LAT",""),e(b,"VIEWLIFT_APP_BUNDLE",""),e(b,"VIEWLIFT_ATT_CONSENT",""),b),null===(O=window)||void 0===O||null===(S=O.customData)||void 0===S?void 0:S.macros);for(var H in x){var G=new RegExp(H,"g");A=A.replace(G,x[H])}return A},me=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(ie()?s?a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=ie()?se(se({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):se(se({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=ie()?se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=se(se({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},pe=function(e,n){var t,o,i,r,l,a,d,s,u,c,v,f,m,p=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[p])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,w=null==e||null===(r=e[p])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[p])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[p])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[p])||void 0===v||null===(f=v.streamingInfo)||void 0===f||null===(m=f.videoAssets)||void 0===m?void 0:m.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=w&&w.hls)return Ie(w);if(g){var h=we(I,n);return h.src=fe(h.src,n,e),h}if("Safari"!==oe()&&E)return ge(I);if(y){var _=Ie(I);return _.src=fe(_.src,n,e),_}if(null!=I&&I.mpeg){var T=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return T.src=fe(T.src,n,e),T}return null},ge=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Ie=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},we=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=oe();if(r(n),"Safari"===d){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(i);return ye(n),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(ye(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ye=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==oe()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ee=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},he=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},_e=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Te=!1,be=function(e,n,t){var o=fe(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima)return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){Te=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Te&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout((function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,(function(){u&&l.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),l.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),l.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};function Oe(e,n){var t,o,i,l=r(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",(function(t){var o,i,r,s,u,c,v,f,m;if(Ae.enabled&&"input"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||_n(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||hn(e,10)}}}),!0)}var Se,Ae=(Se=!0,{enable:function(){Se=!0},disable:function(){Se=!1},get enabled(){return Se}}),Ce="ssai-breakStart",Le="ssai-adImpression",Pe="ssai-firstQuartile",Re="ssai-midpoint",De="ssai-thirdQuartile",ke="ssai-complete",je="ssai-breakEnd",Fe={breakStart:Ce,impression:Le,firstQuartile:Pe,midpoint:Re,thirdQuartile:De,complete:ke,breakEnd:je};function Me(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=Fe[o];i&&t.trigger(i,n)}function Ve(e){var n=r(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Ce,e)},adImpression:function(e){return t(Le,e)},adFirstQuartile:function(e){return t(Pe,e)},adMidpoint:function(e){return t(Re,e)},adThirdQuartile:function(e){return t(De,e)},adComplete:function(e){return t(ke,e)},adBreakEnd:function(e){return t(je,e)}}}function Ne(e){var n,t,o,i,r=e.isLive,l=e.startTimeInSeconds;return r?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==l?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:l===("function"==typeof(null===(t=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===t?void 0:t.getDuration)&&(null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.comscorePlayerInstance)||void 0===i?void 0:i.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function We(){var e,n,t,o,i,r,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",function(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="ad"),d.notifyPause();var s=new a.StreamingAnalytics.AdvertisementMetadata;s.setMediaType(Ne({isLive:null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentOptions)||void 0===i?void 0:i.isLive,startTimeInSeconds:null==l?void 0:l.startTimeInSeconds})),s.setUniqueId(l.id||"ad-001"),s.setLength(1e3*parseInt(l.durationMs,10)||0),s.setTitle(l.title||"Advertisement"),s.setServerCampaignId(l.campaignId),s.setRelatedContentMetadata(null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r?void 0:r.contentMetadata),s.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),s.setPlacementId(l.placementId);var u={cs_ad_tu:null==l?void 0:l.trackingUrl,ns_st_ami:null==l?void 0:l.creativeId};s.addCustomLabels(u),d.setMetadata(s),d.notifyPlay(),console.log("[Comscore] Ad started:",l)}function Ue(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))}function Be(){var e,n,t,o,i;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var r=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;r.notifyPause(),r.notifyEnd(),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="content"),(null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentMetadata)&&(r.setMetadata(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata),r.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}}function xe(e){return{id:null==e?void 0:e.adId,adTitle:null==e?void 0:e.adTitle,adDuration:(null==e?void 0:e.durationInSeconds)||0,startTimeInSeconds:(null==e?void 0:e.startTimeInSeconds)||0,campaignId:null==e?void 0:e.campaignId,placementId:null==e?void 0:e.placementId,trackingUrl:null==e?void 0:e.trackingUrl}}function He(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Ge(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?He(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):He(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Qe(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 Ye(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)?Ye(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function Ye(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}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,playerInstance:null,mode:"content",cleanupFns:[],contentOptions:null}),o.registerPlugin("comscore",(function(e){console.log(this),console.log("hello form comscore plugin",e);var n=e||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;new Promise((function(t,o){var i=document.createElement("script");i.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",i.async=!0,document.head.appendChild(i),i.onload=function(){!function(e){var n=e.publisherId,t=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var o=window.ns_.analytics;o.PlatformApi.setPlatformAPI(o.PlatformApi.PlatformApis.WebBrowser);var i=new o.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==t?void 0:t.userConsent)||"",cs_fpid:(null==t?void 0:t.userId)||""}});o.configuration.addClient(i),o.configuration.enableFirstPartyCookie(),o.configuration.enableImplementationValidationMode(),o.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=o}({publisherId:e||"40813950"})},i.onerror=function(e){o("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}));var ze,qe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Ke=(ze=null,{set:function(e){ze=e},get position(){return ze}});function Xe(e,n){return Je.apply(this,arguments)}function Je(){return(Je=n(t.mark((function e(n,o){var i,l,a,d,s,u,c,v,f,m,p,g,I,w,E,h,_,T;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(n),a=pe(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=fe(u,n,o),c=Ze(u),v=y(c,2),f=v[0],m=v[1],p=$e(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach((function(e){var n=y(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)})),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ge({adsParams:Ge({},f)},p))});case 14:return g=e.sent,e.next=17,g.json();case 17:return I=e.sent,w="https://"+new URL(u).hostname,E=I.trackingUrl,h=I.manifestUrl,_=w+E,T=w+h,qe.set(_),console.log("%c TRACKING URL","background: #bdf369; color: #000",_),a.src=T,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}}),e,null,[[11,29]])})))).apply(this,arguments)}function $e(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map((function(e){var n=y(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]})))||{}}function Ze(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Qe((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=y(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,c=Object.entries(n);u<c.length;u++){var v=y(c[u],2),f=v[0],m=v[1];if(f.startsWith("ads."))d[f.replace(/^ads\./,"")]=m;else s[f]=m}return[d,s]}var en,nn,tn,on,rn=(en=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),en=Array.isArray(e)?w(e):en},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",en),w(en)}}),ln=new Map;function an(e,n){return dn.apply(this,arguments)}function dn(){return dn=n(t.mark((function e(o,i){var l,a,d,s,u,c,v,f,m,p,I,y,E,h,_,T,b,O,S,A,C,L;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,n,t,i,l,a){var d=r(o);if(!d.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(d.currentTime());var s,u=Qe(t);try{var c=function(){var t,r,u,c=s.value,v=c.eventType,f=c.beaconUrls,m=c.startTimeInSeconds,p=c.startTime,g=c.durationInSeconds,I=m||0,w=f,y=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(u=r.ads)||void 0===u?void 0:u.adEventHandler)||null,E="".concat(I,"_").concat(v),h=ln.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",ln),e>=I&&!h.includes(E)){h.push(E),ln.set("pod-".concat(l),h);try{C(v,n,w,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var _=Ke.position;Ke.set(null),setTimeout((function(){null!=_&&(d.currentTime(_),a())}),500)}if("function"==typeof y)try{var T,b={eventType:v,startTimeInSeconds:m,startTime:p,durationInSeconds:g,ad:null==n||null===(T=n.ads)||void 0===T?void 0:T[i],adIndex:i};y({adsData:b}),Me(o,b)}catch(e){console.error("Error when calling ads callback:",e)}if("impression"===v){var O,S=qe.get();We(xe(Ge(Ge({},null==n||null===(O=n.ads)||void 0===O?void 0:O[i]),{},{trackingUrl:S})))}else"complete"===v?Ue():"breakEnd"===v&&Be()}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},C=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},ln.clear(),Ke.set(i),m=qe.get(),(p=r(o)).one("loadeddata",(function(){m&&S(m)})),I=new Map,y=new Map,E=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,_=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==p||null===(s=p.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==p||null===(u=p.el())||void 0===u||null===(c=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,O=(null==p||null===(v=p.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,S=function(){var e=n(t.mark((function e(n){var l,a,d,s,u,c,v,f,m,p,S,C,P,R,D,k,j,F,M,V;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",k),0===e.button&&P()},D=function(e){},R=function(){var e,n=p.currentTime(),t=null,o=Qe(m);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){p.currentTime(t+2.2)}),100))},P=function(){var e,n=p.currentTime(),t=null,o=Qe(m);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!I.has(r)||n>=r&&n<=d)&&(t=r,I.set(r,!0),y.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){p.currentTime(t+.4)}),100))},u=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),f=v.avails,m=[],p=r(o),S=p.controlBar.progressControl,C=S.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),f.map((function(e,n){var t,o,i;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),m.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(i=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===i?void 0:i[0])||[]})})),!u&&i&&(p.currentTime(i),R()),null!=m&&m.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),window.adsQueueList=m),console.log(m,"data"),m.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=p.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",C.appendChild(r)}})),p._timeUpdateHandler&&p.off("timeupdate",p._timeUpdateHandler),p._timeUpdateHandler=g((function(){var e=p.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=m[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&I.set(i,!0),Ae.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),S.el().classList.add("hide-progress-bar");for(var d=e-i,s=0,u=0,c=0;c<l.length;c++){var v,f=null==l||null===(v=l[c])||void 0===v?void 0:v.durationInSeconds;if(d<s+f){u=c;break}s+=f}l[u];var p=Math.max(0,r-d),g=Math.round(p);j.style.display="block",V.textContent="".concat(u+1," of ").concat(l.length," • ").concat(A(g));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,w(n))})),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),L(e,t,E,u,o,R),"break"}y.delete(i)},o=0;o<m.length;o++){if("break"===t())break}n||(j.style.display="none",S.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),Ae.enable())}}),1e3),p.on("timeupdate",p._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",(function(e){Ae.enabled&&"ArrowRight"==e.key&&(P(),hn(o,10),e.stopPropagation())})),S.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",D),document.addEventListener("pointerup",k))})),null===(d=document)||void 0===d||null===(s=d.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach((function(e){return null==e?void 0:e.remove()})),(j=document.createElement("div")).className="ssai-ad-container",(F=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",F.append(M),(V=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",j.append(F),j.append(V),p.el().appendChild(j);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),dn.apply(this,arguments)}function sn(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 un(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)?un(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function un(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 cn(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 vn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):cn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var fn={},mn=(null===(nn=window)||void 0===nn||null===(tn=nn.location)||void 0===tn||null===(on=tn.search)||void 0===on?void 0:on.includes("debug=true"))||!1,pn=null;function gn(e){return In.apply(this,arguments)}function In(){return In=n(t.mark((function e(o){var i,l,a,d,s,u,c,v,f,m,p,I,y,E,h,_,T,b,O,S,A,C,L,P,R,D,k;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,i,l){var a=r(o);if(!a.seeking()){var d=n.startTimeInSeconds;n.durationInSeconds,Math.floor(a.currentTime());var s,u=sn(t);try{for(u.s();!(s=u.n()).done;){var c,v,f,m=s.value,p=m.eventType,g=m.beaconUrls,I=m.startTimeInSeconds,w=m.startTime,y=m.durationInSeconds,E=I||0,h=g,_=(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(f=v.ads)||void 0===f?void 0:f.adEventHandler)||null,T="".concat(E,"_").concat(p),b="pod-".concat(d);P.has(b)||P.set(b,new Set);var O=P.get(b);if(mn&&console.warn(e,E,"map:",p,"condition1:",e>=E,"map:",P),e>=E&&e<=E+R&&!O.has(T)){O.add(T);try{D(p,n,h,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,p,n)}if("function"==typeof _)try{var S,A={eventType:p,startTimeInSeconds:I,startTime:w,durationInSeconds:y,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[i],adIndex:i};_({adsData:A}),Me(o,A)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){u.e(e)}finally{u.f()}}},D=function(e,n,t,o){var i,r;"breakEnd"===e&&(null===(i=fn)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=fn)||void 0===r?void 0:r.totalAds)||(mn&&(console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n)),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))})))},p=function(){pn&&clearInterval(pn)},f=qe.get(),(m=r(o)).one("loadeddata",(function(){p(),pn=setInterval((function(){f&&!m.paused()&&L(f)}),2e3)})),m.on("dispose",(function(){p()})),I=new Map,y=new Map,E=-1,h=null,_=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==m||null===(a=m.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==m||null===(d=m.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,O=(null==m||null===(s=m.el())||void 0===s||null===(u=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,S=(null==m||null===(c=m.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===v?void 0:v[0])||null,A=!1,C=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return w(o);var i=[],r=null==o?void 0:o.find((function(e){return"breakEnd"===(null==e?void 0:e.eventType)})),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find((function(e){return e.includes("videoView")})))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter((function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)})),s=(null==d?void 0:d.some((function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some((function(e){return e.includes("videoView")}))})))||!1;if(!s&&l){var u=null==d?void 0:d.map((function(e){return vn(vn({},e),{},{eventType:"videoView",beaconUrls:[l]})}));null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},L=function(){var e=n(t.mark((function e(n){var i,l,a,d,s,u,c,v,f,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),h&&l.searchParams.append("nextToken",h),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,s=d.avails,u=d.nextToken||null,h=u,c=[],v=r(o),f=v.controlBar.progressControl,m=f.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),s.map((function(e,n){c.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:C(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),mn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",c),null!=c&&c.length&&(window.adsQueueList=c),c.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=v.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",m.appendChild(r)}})),v._timeUpdateHandler&&v.off("timeupdate",v._timeUpdateHandler),v._timeUpdateHandler=g((function(){var e=v.currentTime();if(e!==E){E=e;for(var n=function(){var n=c[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;A=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&I.set(o,!0),Ae.disable(),_&&_.classList.add("vjs-hidden"),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,u=0,v=0;v<r.length;v++){var m,p=null==r||null===(m=r[v])||void 0===m?void 0:m.durationInSeconds;if(d<s+p){u=v;break}s+=p}setTimeout((function(){fn.totalAds=null==r?void 0:r.length,fn.currentAdIndex=u}),1e3);var g=[];return null==r||r.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));g.push.apply(g,w(n))})),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&g.push.apply(g,w(null==n?void 0:n.podSlotImpressionBeacon)),k(e,n,g,u),"break"}y.delete(o)},t=0;t<c.length;t++){if("break"===n())break}A||(fn={},f.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Ae.enable())}}),1e3),v.on("timeupdate",v._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=new Map,R=2.5;case 22:case"end":return e.stop()}}),e)}))),In.apply(this,arguments)}function wn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var yn=function(e){o(e).play()},En=function(e){o(e).pause()},hn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},_n=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Tn=function(e){return!!o.getPlayer("".concat(e))},bn=function(e){return o(e).paused()},On=function(){var e=n(t.mark((function e(o,i){var l,a,d,s=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,x();case 3:return a=e.sent,d=r(o),e.abrupt("return",new Promise((function(e,r){var s=(null==i?void 0:i.programs)||[];null==i||delete i.programs,P(i,a).then(function(){var r=n(t.mark((function n(r){var a,u,v,m,p,g,I,w;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(g=null==r?void 0:r.data,window.sid=K(),g.contentType="linearchannel",g.channelId=null==i?void 0:i.channelId,I=(null==g||null===(a=g.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(v=u.app_data)||void 0===v||null===(m=v.appcmsMain)||void 0===m||null===(p=m.adsConfig)||void 0===p?void 0:p.vodAdSticherProvider)||!1,w=pe(g,o),!I){n.next=11;break}return n.next=9,Xe(o,g);case 9:w=n.sent,l=!0;case 11:c(g),f(s),sessionStorage.setItem("program_switched",!0),w&&l?(Pn(o,w),I&&gn(o),d.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:g})}))):e({status:!0,msg:"Feed authenticated",response:g});case 15:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){r({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Sn=function(){var e=n(t.mark((function e(o,i,l){var a,d,u,f,g,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return f=e.sent,(s()||null)&&v(i),g=0,I=0,w=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&k(i,f).then((function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),g=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(I=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(w=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,l){L(i,f).then(function(){var i=n(t.mark((function n(i){var a,d,s,u,v,f,y,E,h,_,T,b,O,S,A,C,L,P,R,D,k,j,F,M,V,N,W,U,B,x,H,G,Q,Y,z,q,K,X;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(C=null==i?void 0:i.data,L=(null==C?void 0:C.contentType)||"video",P=(null==C||null===(a=C[L])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(v=u.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,R=(null==C||null===(f=C.video)||void 0===f||null===(y=f.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,c(i.data),(D=(null==C||null===(E=C.ads)||void 0===E||null===(h=E.preRoll)||void 0===h||null===(_=h.adTags)||void 0===_||null===(T=_.web)||void 0===T?void 0:T.active)&&(null==C||null===(b=C.ads)||void 0===b||null===(O=b.preRoll)||void 0===O||null===(S=O.adTags)||void 0===S||null===(A=S.web)||void 0===A?void 0:A.url))&&be(o,D,C),k=pe(C,o),!P){n.next=12;break}return n.next=11,Xe(o,C);case 11:k=n.sent;case 12:k?(G=(null==C||null===(j=C.video)||void 0===j||null===(F=j.gist)||void 0===F?void 0:F.videoImageUrl)||(null==C||null===(M=C.video)||void 0===M||null===(V=M.gist)||void 0===V||null===(N=V.imageGist)||void 0===N?void 0:N.r16x9),(Q=r(o)).poster(G),Pn(o,k),P&&an(o,w),Q.on("loadstart",(function(){R&&e({status:!0,msg:"Video Loaded",response:C})})),Q.on("loadeddata",(function(){_e(),e({status:!0,msg:"Video Loaded",response:C})})),Q.one("play",(function(){g&&!P&&I<95&&setTimeout((function(){Q.currentTime(g)}),0)})),Q.one("error",(function(){var e;l({status:!1,msg:(null==Q||null===(e=Q.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==C||null===(W=C.video)||void 0===W||null===(U=W.contentDetails)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0||(null==C||null===(x=C.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(X=(null==C||null===(z=C.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==C||null===(K=C.video)||void 0===K?void 0:K.closedCaptions),Y=X.filter((function(e){return"VTT"===e.format})),m(o,Y)):p(o)):(he(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){Rn(e,o,l,i)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),An=function(e,n,t){var o=r(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Cn=function(e){var n=r(e);if(Ln(),function(){var e,n,t,o,i,r,l,a,d,s;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.comscoreCleanupFns=[]),console.log("comscoreTag",null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef),null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.tagRef){try{null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r||r.tagRef.notifyEnd()}catch(e){}null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||(l.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(s=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===s||(s.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}(),I(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Ln=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()},Pn=function(e,n){var t=r(e);t&&t.src(n)},Rn=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Tn(t)&&he(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):wn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Dn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{_n as A,Tn as B,Sn as C,On as D,Cn as E,M as F,rn as G,Ve as H,F as I,H as J,W as K,V as L,h as M,ln as N,Oe as O,ie as P,bn as Q,gn as R,an as S,j as T,ae as a,le as b,pe as c,oe as d,_e as e,Dn as f,X as g,he as h,te as i,be as j,Ee as k,Pn as l,Xe as m,G as n,L as o,k as p,Rn as q,x as r,D as s,P as t,R as u,re as v,An as w,hn as x,yn as y,En as z};
|