@viewlift/player-backup 2.0.312-backup → 2.0.313-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.
Files changed (86) hide show
  1. package/cjs/{autoNextVideo-405fbb9c.js → autoNextVideo-1219220b.js} +1 -1
  2. package/cjs/bundle.css +738 -738
  3. package/cjs/{features-497aa685.js → features-1b6f9b76.js} +1 -1
  4. package/cjs/generic-460c2f4c.js +1 -0
  5. package/cjs/{index-1b1814b2.js → index-15040639.js} +1 -1
  6. package/cjs/{index-f0e7f225.js → index-d012ce66.js} +1 -1
  7. package/cjs/{index-a3c4762d.js → index-df46f39c.js} +1 -1
  8. package/cjs/{index-160bf3cf.js → index-fed823e4.js} +1 -1
  9. package/cjs/index.js +1 -1
  10. package/cjs/{multicamv2-d97aac93.js → multicamv2-b46493cd.js} +1 -1
  11. package/cjs/{multicamv2-b7179cca.js → multicamv2-fb311cf2.js} +1 -1
  12. package/cjs/{nextEpisodeButton-d8673023.js → nextEpisodeButton-651ab380.js} +1 -1
  13. package/cjs/{playlist-da78386b.js → playlist-649c8f45.js} +1 -1
  14. package/cjs/{series-a44ff797.js → series-b109f9a2.js} +1 -1
  15. package/cjs/{series-v2-d70b0c21.js → series-v2-86b32c0e.js} +1 -1
  16. package/cjs/{series-v2-f583f57c.js → series-v2-d2950b02.js} +1 -1
  17. package/cjs/{skin-329840ee.js → skin-08149121.js} +1 -1
  18. package/cjs/{skin-43fd6f9f.js → skin-2193cc41.js} +1 -1
  19. package/cjs/{skin-64a712c1.js → skin-222dc6b7.js} +1 -1
  20. package/cjs/{skin-57d7b91d.js → skin-4e3170cf.js} +1 -1
  21. package/cjs/{skin-fe84f7e4.js → skin-765e1355.js} +1 -1
  22. package/cjs/{skin-125b2f1b.js → skin-886a6d4b.js} +1 -1
  23. package/cjs/{skin-ca777bf7.js → skin-8bcb6a55.js} +1 -1
  24. package/cjs/{skin-b8d21775.js → skin-c8d40d82.js} +1 -1
  25. package/cjs/{skin-986ee45f.js → skin-dbacca02.js} +1 -1
  26. package/cjs/{skin-765eaa0a.js → skin-e4a31cb3.js} +1 -1
  27. package/cjs/{videoSelector-78d2a88e.js → videoSelector-13aaa2d8.js} +1 -1
  28. package/cjs/{videoSelector-dd2d5324.js → videoSelector-6a0fa8d0.js} +1 -1
  29. package/esm/{autoNextVideo-d7d17130.js → autoNextVideo-1ade2ac8.js} +1 -1
  30. package/esm/bundle.css +738 -738
  31. package/esm/{features-f8a70ef8.js → features-c38a5458.js} +1 -1
  32. package/esm/{generic-e99fa280.js → generic-859e1b0f.js} +1 -1
  33. package/esm/{index-5e82fbd8.js → index-022a4725.js} +1 -1
  34. package/esm/{index-0a27b711.js → index-41558ed2.js} +1 -1
  35. package/esm/{index-7fc11ec8.js → index-4fd3b927.js} +1 -1
  36. package/esm/{index-e3e95c56.js → index-6c225809.js} +1 -1
  37. package/esm/index.js +1 -1
  38. package/esm/{multicamv2-6816cd94.js → multicamv2-21b1f1c1.js} +1 -1
  39. package/esm/{multicamv2-20f178e4.js → multicamv2-71e2abdd.js} +1 -1
  40. package/esm/{nextEpisodeButton-5c8edd3e.js → nextEpisodeButton-36f416dc.js} +1 -1
  41. package/esm/{playlist-dd6e58b6.js → playlist-d838f1a7.js} +1 -1
  42. package/esm/{series-46f0c516.js → series-d1b982ab.js} +1 -1
  43. package/esm/{series-v2-d433b819.js → series-v2-03cef666.js} +1 -1
  44. package/esm/{series-v2-8adf9d91.js → series-v2-2559637f.js} +1 -1
  45. package/esm/{skin-45f8682c.js → skin-08cd7f59.js} +1 -1
  46. package/esm/{skin-11edae05.js → skin-0fb217b1.js} +1 -1
  47. package/esm/{skin-7198271b.js → skin-2080b142.js} +1 -1
  48. package/esm/{skin-4eadb6ed.js → skin-21d67daa.js} +1 -1
  49. package/esm/{skin-f24e5bea.js → skin-255cf575.js} +1 -1
  50. package/esm/{skin-e26bb2ef.js → skin-361a4e27.js} +1 -1
  51. package/esm/{skin-e7a418d5.js → skin-49aa30ba.js} +1 -1
  52. package/esm/{skin-06d0e08e.js → skin-77405f2e.js} +1 -1
  53. package/esm/{skin-12cd8332.js → skin-77c06b80.js} +1 -1
  54. package/esm/{skin-9aeadb01.js → skin-a28700c4.js} +1 -1
  55. package/esm/{videoSelector-0713849a.js → videoSelector-25b6e54e.js} +1 -1
  56. package/esm/{videoSelector-54aca560.js → videoSelector-556c1f53.js} +1 -1
  57. package/package.json +2 -2
  58. package/cjs/generic-215f4b2f.js +0 -1
  59. package/cjs/index-eed20004.js +0 -1
  60. package/cjs/skin-645e94e3.js +0 -1
  61. package/esm/autoNextVideo-8969c6df.js +0 -1
  62. package/esm/features-412626fb.js +0 -1
  63. package/esm/generic-34f78811.js +0 -1
  64. package/esm/index-06ad6212.js +0 -1
  65. package/esm/index-07cb2e05.js +0 -1
  66. package/esm/index-88ef87d6.js +0 -1
  67. package/esm/index-f3d95023.js +0 -1
  68. package/esm/multicamv2-5850afc8.js +0 -1
  69. package/esm/multicamv2-7d56314d.js +0 -1
  70. package/esm/nextEpisodeButton-e5c7a4f2.js +0 -1
  71. package/esm/playlist-47344207.js +0 -1
  72. package/esm/series-74ab47cc.js +0 -1
  73. package/esm/series-v2-15df8835.js +0 -1
  74. package/esm/series-v2-3b5e2560.js +0 -1
  75. package/esm/skin-1ffbc63d.js +0 -1
  76. package/esm/skin-212eda31.js +0 -1
  77. package/esm/skin-29b49d84.js +0 -1
  78. package/esm/skin-4abc33d7.js +0 -1
  79. package/esm/skin-6d648b73.js +0 -1
  80. package/esm/skin-a02fbfbe.js +0 -1
  81. package/esm/skin-b236cc43.js +0 -1
  82. package/esm/skin-b2991b04.js +0 -1
  83. package/esm/skin-c90e133a.js +0 -1
  84. package/esm/skin-e56529d4.js +0 -1
  85. package/esm/videoSelector-6ac21745.js +0 -1
  86. package/esm/videoSelector-a5e0df6e.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),i=require("video.js"),r=require("axios"),o=require("./skin-66dce245.js"),a=require("./browser-3670a923.js"),l=require("md5"),s=require("js-cookie"),d=require("./captions-0ca41a03.js"),u=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=require("@babel/runtime/helpers/slicedToArray"),f=require("@viewlift/comscore/index.js"),p=require("@babel/runtime/helpers/classCallCheck"),m=require("@babel/runtime/helpers/createClass");function h(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function g(e,n){h("event",e,n)}var y={name:"@viewlift/player",version:"2.1.49",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/sse":"^0.0.3","broadcast-channel":"^7.3.0","@viewlift/comscore":"^1.0.18",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","jwt-decode":"^4.0.0","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"},overrides:{"min-document":"^2.19.1"}},w={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 T(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function _(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?T(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):T(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var b,I=(b={},{setConfig:function(e){b=_(_({},b),e)},getConfig:function(){return b}}),E=function(e){return!!e&&"drm"===function(e){var n;if(5===Number(null==e?void 0:e.code))return"drm";var t="".concat(null!==(n=null==e?void 0:e.code)&&void 0!==n?n:""," ").concat(function(e){var n,t,i,r,o;return(null==e||null===(n=e.response)||void 0===n||null===(t=n.data)||void 0===t?void 0:t.errorMessage)||(null==e||null===(i=e.response)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.message)||(null==e||null===(o=e.response)||void 0===o?void 0:o.statusText)||(null==e?void 0:e.message)||"unknown_error"}(e)).toLowerCase();return/(drm|license|widevine|playready|fairplay|eme|key|hdcp)/.test(t)?"drm":/(network|manifest|segment|playlist|http|xhr|fetch|timeout)/.test(t)?"network":/(decode|mediaerror|mediasource|appendbuffer|sourcebuffer)/.test(t)?"decode":"player"}(e)},S=new Set(["license","key","server_certificate"]);function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var A="asset_not_found",O="geo_blocking_issue",P="entitlement_mismatch",D="DRM/License Failures",L=new Set(["contentgeorestricted","contentgeorestrictedbyhba","content_not_available_for_country"]),C=[/geo[\s_-]?block/i,/geo[\s_-]?restrict/i,/geographic/i,/not available in your/i,/outside.*(?:region|country|territory)/i,/\bcountry\b/i,/\bterritory\b/i],F=[/entitlement/i,/not entitled/i,/subscription/i,/not subscribed/i,/access denied/i,/\bunauthorized\b/i,/\bforbidden\b/i,/\bpremium\b/i,/upgrade required/i,/tv[\s_-]?provider/i,/\bprovider\b/i],x=[/not found/i,/no content/i,/does not exist/i,/\bmissing\b/i,/not available currently/i,/not available/i],j=function(e,n,t,i){var r=Number(e),o=String(n||"");return E(i)?D:L.has(function(e){return String(e||"").toLowerCase().replace(/[\s-]/g,"_")}(t))||C.some(function(e){return e.test(o)})?O:F.some(function(e){return e.test(o)})?P:x.some(function(e){return e.test(o)})||404===r?A:451===r?O:P},R=function(n,t,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};console.log("emitApiErrorEvent",{apiName:n,error:t,errorCategory:i,meta:o});var a=function(){var e,n,t,i,r=I.getConfig()||{};return(null==r?void 0:r.apiErrorCb)||(null==r?void 0:r.onApiError)||(null==r||null===(e=r.customData)||void 0===e?void 0:e.apiErrorCb)||(null==r||null===(n=r.customData)||void 0===n?void 0:n.onApiError)||(null==r||null===(t=r.customData)||void 0===t||null===(i=t.callbacks)||void 0===i?void 0:i.onApiError)||null}();if("function"==typeof a){console.log("emitApiErrorEvent",t);var l=(null==t||null===(r=t.response)||void 0===r?void 0:r.status)||(null==t?void 0:t.status)||0,s=function(e){var n,t,i,r,o;return(null==e||null===(n=e.response)||void 0===n||null===(t=n.data)||void 0===t?void 0:t.errorMessage)||(null==e||null===(i=e.response)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.message)||(null==e||null===(o=e.response)||void 0===o?void 0:o.statusText)||(null==e?void 0:e.message)||"unknown_error"}(t),d=function(e){var n,t,i,r,o,a;return(null==e||null===(n=e.response)||void 0===n||null===(t=n.data)||void 0===t?void 0:t.errorCode)||(null==e||null===(i=e.response)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.error_code)||(null==e||null===(o=e.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.code)||(null==e?void 0:e.errorCode)||null}(t),u=j(l,s,d,t),c=function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?k(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({errorcode:l||d,errormessage:s,errorcategory:i||u},o);n&&(c.apiPath=n);try{a(u,c)}catch(e){console.warn("[VLPlayer] apiError callback failed:",e)}}};function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function M(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?V(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):V(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var W=y;window.vl_player_version=W.version;var N,U=function(){var e,n,t,i;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":Q.get()+"".concat(null==w?void 0:w.getVideoDetails)},B=function(e,n){var t,i,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse)return new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})});var a,l,s,d,u=U();return r({url:U(),params:M({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:o},null===(a=window)||void 0===a||null===(l=a.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":W.version,"x-player-name":"videojs",adbTempToken:null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0}).catch(function(n){throw R(u,n,"content",{videoId:e}),n})},H=function(e,n){var t,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse)return new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})});var u=Q.get()+w.getLinearChannelDetails;return r({url:u,params:M(M(M(M(M({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},(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===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken}}).catch(function(n){throw R(u,n,"content",{videoId:null==e?void 0:e.id,channelId:null==e?void 0:e.channelId,programId:null==e?void 0:e.programId}),n})},q=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae();case 2:return i=e.sent,e.abrupt("return",r({url:Q.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:M({},n),params:M({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}).catch(function(e){throw R("saveWatchHistory",e,"content",{videoId:null==n?void 0:n.videoId,profileId:null==n?void 0:n.profileId}),e}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),G=function(e,n){var t,i,o=window.contentType,a=Q.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(o,"/").concat(e);return r({method:"GET",url:a,headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3}).catch(function(n){throw R(a,n,"content",{videoId:e,contentType:o}),n})},z=function(e){var n=e.videoId,t=Q.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(n);return r({method:"GET",url:t,headers:{Authorization:e.token},timeout:15e3}).catch(function(i){throw R(t,i,"content",{seriesId:n,videoId:null==e?void 0:e.videoId}),i})},Q=(N=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(N=e)},get:function(){return N}}),Y=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},K=null;function X(){return{set:function(e){e&&(K=e)},get:function(){return K}}}var J,$,Z,ee,ne,te,ie,re=function(){var e=n(t.mark(function e(){var n,i,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=X().get(),i=Q.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),oe=null,ae=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"))||!Y(n)){e.next=6;break}return oe||(oe=re().then(function(e){var t,i,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,o=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),o&&X().set(o),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){oe=null})),e.abrupt("return",oe);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),le=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},se=(te=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;te.set(t,(te.get(t)||0)+1)},get:function(e){return te.get(e)},clear:function(){te.clear()}}),de=function(e){$=e},ue=function(){return $},ce=function(){return J},ve=function(e){Z=e},fe=function(e){if(ee){var n=ee.get(e);ve(n+1)}},pe=(ie=0,{set:function(e){e>=0&&(ie=e)},get:function(){return ie}});function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function he(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?me(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var ge=0,ye=null,we=null,Te=!1,_e=!1,be=function(){var e,n,t,i,r,o,a,l=ue();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.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==l?void 0:l.channelId)}))||void 0===t||null===(i=t.content)||void 0===i?void 0:i.id:(null==l||null===(r=l.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function Ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Ee(){return ye||window.sessionStorage.getItem("uid")}function Se(){return ke.apply(this,arguments)}function ke(){return(ke=n(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(n.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ae(e){return e?String(e):""}window.initialise=function(e){window.sid=Ie(),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,window.isAdPlaying=!1,window._pingTimes=[],window._pingTimeUpdateHandler=null,streamFailures(e),buffering(e),ads(e),ping(e),Oe(e),Pe(e)};var Oe=function(e){e.on("play",function(){"pause"!==we||e.scrubbing()||(we="play",g("RESUME",{pfm:window.platform,uid:Ee(),vid:be(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"RESUME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))}),e.on("playing",function(){window.firstFrameFired&&!e.scrubbing()&&(we="play")}),e.on("pause",function(){setTimeout(function(){!Te&&window.firstFrameFired&&"play"===we&&(we="pause",g("PAUSE",{pfm:window.platform,uid:Ee(),vid:be(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"PAUSE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))},50)})},Pe=function(e){if(e){var n=0,t=0,i=0,r=0;e.on("timeupdate",o),e.on("seeking",function(){if(Te)return;Te=!0,e.off("timeupdate",o),e.one("seeked",a)}),e.on("seeked",a)}function o(){n=t,t=Math.floor(e.currentTime()),n<t&&(r=n,n=t)}function a(){if(_e)_e=!1;else{i=Math.floor(e.currentTime());var n=Math.floor(i-r);if(0!==n&&window.firstFrameFired){var t=n>0?"SEEK_FORWARD":"SEEK_BACKWARD";g(t,{pfm:window.platform,uid:Ee(),vid:be(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:t,videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}r=Math.floor(e.currentTime()),setTimeout(function(){Te=!1},50),e.on("timeupdate",o)}}};window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var n,t,i,r=o.getPlayer(),a=null!=r&&r.el_?Math.floor(r.currentTime()):0;window.cleanupTimers(),g(e,he({pfm:window.platform,uid:Ee(),vid:be(),videoPosition:a},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:e,videoPosition:a,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var i,r,o;window.ttFirstFrameStartTime_In_MS=performance.now(),we="play",window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),g("PLAY",he({pfm:window.platform,uid:Ee(),vid:be(),videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(o=r.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",he({"Video ID":be(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.firstFrameFired&&(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()&&window.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var r,o,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&ge<4)ge++,g("BUFFERING",he({pfm:window.platform,uid:Ee(),vid:be(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}window.ttFirstFrameStartTime_In_MS=null},window.endFirstFrame=function(e){var n=tryCatch(function(){var t,i,r;if(window.ttFirstFrameStartTime_In_MS&&!window.firstFrameFired)if(window.isAdPlaying)console.log("'playing' event ignored during ad playback.");else{clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0;var o=(performance.now()-window.ttFirstFrameStartTime_In_MS)/1e3;window.ttFirstFrameStartTime_In_MS=null,window.totalBufferTime=o||0,g("FIRST_FRAME",he({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:parseFloat(null==o?void 0:o.toFixed(2)),bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ee(),vid:be()},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:parseFloat(null==o?void 0:o.toFixed(2)),bufferHealth:window.getRemainingBufferTime(e)}),e.off("timeupdate",n)}});e.on("timeupdate",n)},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,i,r,o,a;window.isAdPlaying=!0,!window.firstFrameFired&&window.failedToStartTimer&&clearTimeout(window.failedToStartTimer),g("AD_REQUEST",he({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ee(),vid:be(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),g("AD_IMPRESSION",he({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ee(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:be()},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4))}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4))})})};var De=function(e,n,t){var i;fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:t,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:(null===(i=e.tech_)||void 0===i?void 0:i.vhs)&&window.getBitrate(e)})};window.fireExitPing=function(e){if(!window.isAdPlaying){var n=null!=e&&e.el_?Math.floor(e.currentTime()):0;n<=0||De(e,n,n)}},window.ping=function(e){window._pingTimeUpdateHandler&&(e.off("timeupdate",window._pingTimeUpdateHandler),window._pingTimeUpdateHandler=null),e.on("dispose",tryCatch(function(){console.log('Player DISPOSED >> "dispose" event fired >>> firing exit PING'),window.fireExitPing(e)})),window._pingTimes||(window._pingTimes=[]),window._pingTimeUpdateHandler=function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!window._pingTimes.includes(n)&&(ge=0,window._pingTimes.push(n),De(e,n,30))},e.on("timeupdate",window._pingTimeUpdateHandler)},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),r=0;r<i.length;r++){var o=i.start(r),a=i.end(r);if(Le(n,o,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var Le=function(e,n,t){return e>=n&&e<=t},Ce=function(){var e,n=ue(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=n(t.mark(function e(n){var i,o,l,s,d,u,c,v,f,p,m,h,g,y,T,_,b,I,E,S,k;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isBotUserAgent()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,ae();case 4:return b=e.sent,I=le(b),E=null==I?void 0:I.site,S=null==I?void 0:I.siteId,e.t0=he,e.t1=he,e.t2=he({aid:E,cid:S,pfm:window.platform},null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o||null===(l=o.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=Ee(),e.t5=be(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(s=n.videoPosition)&&void 0!==s?s:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?Ae(n.adPosition):"",e.next=28,Se();case 28:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t25=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t26=null!==(f=n.bufferHealth)&&void 0!==f?f:null,e.t27=null!==(p=Ce())&&void 0!==p?p:null,e.t28=null!=E?E:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(m=window)||void 0===m||null===(h=m.customData)||void 0===h||null===(g=h.beacon)||void 0===g?void 0:g.params,e.t33=(0,e.t0)(e.t31,e.t32),k=[e.t33],r({url:(null===(y=window)||void 0===y||null===(T=y.customData)||void 0===T||null===(_=T.beacon)||void 0===_?void 0:_.url)||Q.get()+w.getBeaconUrl,method:"post",headers:{Authorization:b},contentType:"application/x-www-form-urlencoded",dataType:"text",data:k}).catch(function(e){console.error(e)});case 46:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};window.watchLive=function(e){var n;if(e){var t=null==e||null===(n=e.controlBar)||void 0===n?void 0:n.getChild("SeekToLive");if(t){var i=t.handleClick;t.handleClick=function(n){var t,r;return null!==(t=e.liveTracker)&&void 0!==t&&null!==(r=t.atLiveEdge)&&void 0!==r&&r.call(t)||(!function(e){var n,t,i;g("WATCH_LIVE",he({eventName:"WATCH_LIVE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ee(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:be()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"WATCH_LIVE",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!1})}(e),_e=!0),i.call(this,n)}}}};var Fe=function(){var e=pe.get();return e>=0?e+1:1},xe=function(){var e,n,t,i=ce(),r=ue(),o=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=pe.get(),l=null==i||null===(n=i[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===o});return l>=0?l+1:1};function je(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Re(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?je(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Ve=l,Me=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},We=function(e){var n=Ne(e,"video.tags",[]),t=Ne(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Ne=function(e,n,t){for(var i=0,r=(n=n.split(".")).length;i<r;i++){var o;e=null===(o=e)||void 0===o?void 0:o[n[i]]}return e||t},Ue=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID";return e?n:n.includes("browser-")?n.replace("browser-",""):n},Be=function(){var e,n,t,i,r,a,l,d,u,c,v,f,p,m,h,g,y,w,T,_,b,I,E,S,k,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",O=arguments.length>1?arguments[1]:void 0,P=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return A;var D=(null==P?void 0:P.siteName)||(null==P?void 0:P.site)||"",L=(null==P?void 0:P.contentType)||"video",C=(null==P||null===(t=P[L])||void 0===t?void 0:t.metadata)||(null==P||null===(i=P[L])||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.metadata),F=o.getPlayer(O);if(!A.includes("VIEWLIFT_"))return A;var x,j=window.getComputedStyle(document.getElementById(O),null),R=Math.trunc(j.getPropertyValue("height").slice(0,-2)),V=Math.trunc(j.getPropertyValue("width").slice(0,-2)),M="linearchannel"===L?null==P||null===(a=P.linearchannel)||void 0===a||null===(l=a.channels)||void 0===l||null===(d=l.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===d||null===(u=d.content)||void 0===u?void 0:u.id:Ne(P,"video.gist.id",""),W="linearchannel"===L?null==P||null===(c=P.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(f=v.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===f?void 0:f.title:Ne(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,U=null;"function"==typeof window.__gpp&&(null===(x=window)||void 0===x||x.__gpp("ping",function(e){N=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]}));var B=s.get("us_privacy")||s.get("usprivacy"),H=void 0!==B?B:"1YNN",q=null!==(p=null===(m=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===m?void 0:m.fwIdentifier)&&void 0!==p?p:null,G=Re(Re({},He(C)),{},{VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:R,VIEWLIFT_SIZE:Me(V,R),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===(h=window)||void 0===h?void 0:h.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ne(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ne(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ne(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==F||null===(g=F.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==F||null===(y=F.options_)||void 0===y?void 0:y.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D||"golfchannel"==D?"":Ue(!1),VIEWLIFT_DID:"spinco"==D||"usanetwork"==D||"golfchannel"==D?"":Ue(),VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:We(P),VIEWLIFT_MEDIA_ID:M,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ne(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:M,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ne(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:s.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ne(null===(w=window)||void 0===w||null===(T=w.app_data)||void 0===T||null===(_=T.site)||void 0===_?void 0:_.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D||"golfchannel"==D?"":Ne(null===(b=window)||void 0===b||null===(I=b.app_data)||void 0===I||null===(E=I.site)||void 0===E?void 0:E.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:q?Ve(q):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*Ne(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ne(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:M,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:Ne(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ne(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:xe(),VIEWLIFT_SEASON_NUMBER:Fe(),VIEWLIFT_CONTENT_TAGS:We(P),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(S=window)||void 0===S||null===(k=S.customData)||void 0===k?void 0:k.macros);for(var z in G){var Q=new RegExp(z,"g");A=A.replace(Q,G[z])}return A},He=function(e){var n,t,i,r,o,l,s,d,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var f=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i?void 0:i.SVOD)||!1,p=(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(l=o.subscription)||void 0===l?void 0:l.TVE)||!1;return f||p?(a.isMobile()?f?c=Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):p&&(c=Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):f?c=Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):p&&(c=Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),f?c=Re(Re({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):p&&(c=Re(Re({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=a.isMobile()?Re(Re({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):Re(Re({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=Re(Re({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=a.isMobile()?Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=Re(Re({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:Ne(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(u=d.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},qe=function(e,n){var t,i,r,o,l,s,d,u,c,v,f,p,m,h=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[h])||void 0===t?void 0:t.drmEnabled,y=null==e||null===(i=e[h])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.videoAssets,w=null==e||null===(o=e[h])||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.audioAssets,T=(null==e||null===(s=e[h])||void 0===s||null===(d=s.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[h])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var _=(null==e||null===(f=e[h])||void 0===f||null===(p=f.streamingInfo)||void 0===p||null===(m=p.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 ze(w);if(g){var b=Qe(y,n);return b.src=Be(b.src,n,e),b}if("Safari"!==a.detectBrowser()&&_)return Ge(y);if(T){var I=ze(y);return I.src=Be(I.src,n,e),I}if(null!=y&&y.mpeg){var E=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(y);return E.src=Be(E.src,n,e),E}return null},Ge=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ze=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},Qe=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,l=e.widevine,s=e.playReady,d=a.detectBrowser();if(o.getPlayer(n),"Safari"===d){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",__vlLicenseUrl:(null==e?void 0:e.licenseUrl)||"",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(r,function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,o){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,n,t){console.log(e),e&&o(e),o(null,t)})}}}}}(r);return Ye(n),u}var c,v={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ye(n),v.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==s?void 0:s.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==s?void 0:s.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==s?void 0:s.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==s?void 0:s.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==s?void 0:s.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ye=function(e){var n=o.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==a.detectBrowser()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ke=function(e,n){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.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 i=document.getElementById(e);if(i){var r=document.createElement("div");r.className="error-container";var o=document.createElement("div");o.className="error-message",o.innerHTML="".concat(n),r.appendChild(o),i.append(r)}}},Xe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Je=!1,$e=function(e,n,t){var i=Be(n,e,t),r=o.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima&&"object"!==u(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,i,r,a=o.getPlayer(e);if(null!==a.el_){Je=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Je&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),a.one(d,function(){u&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.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})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};var Ze,en=(Ze=!0,{enable:function(){Ze=!0},disable:function(){Ze=!1},get enabled(){return Ze}}),nn="ssai-breakStart",tn="ssai-adImpression",rn="ssai-firstQuartile",on="ssai-midpoint",an="ssai-thirdQuartile",ln="ssai-complete",sn="ssai-breakEnd",dn={breakStart:nn,impression:tn,firstQuartile:rn,midpoint:on,thirdQuartile:an,complete:ln,breakEnd:sn};function un(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=o.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var i=n.eventType,r=dn[i];r&&t.trigger(r,n)}function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function vn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):cn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var fn,pn=(fn={},{get:function(){return fn},set:function(e){fn=e}});function mn(e,n){var t,i,r,a,l,s,d,u,c,v,p,m,h,g,y,w,T,_,b,I,E,S=null==e?void 0:e.playerId,k=o.getPlayer(S);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var A=ue(),O=(null==A||null===(i=A.video)||void 0===i?void 0:i.metadata)||[],P=(null==O?void 0:O.length)&&O.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=P)&&void 0!==r&&r.length){var D=P.map(function(e){return e.value});P=null==D?void 0:D.join(",")}f.destroyComscoreTag();var L,C,F,x=null===(a=window)||void 0===a?void 0:a.lcProgrammeDetails,j=Array.isArray(null==x?void 0:x.category)?null==x||null===(l=x.category)||void 0===l?void 0:l.join(","):(null==x?void 0:x.category)||null,R=vn(vn(vn({},null==A?void 0:A.video),null==A?void 0:A.linearchannel),{},{siteName:(null==e||null===(s=e.comscore)||void 0===s?void 0:s.applicationName)||(null==e||null===(d=e.comscore)||void 0===d||null===(u=d.metadata)||void 0===u?void 0:u.siteName)||(null==A?void 0:A.site)||null,programId:(null==x?void 0:x.videotmsid)||null,programTitle:(null==x?void 0:x.lcProgrammeName)||null,episodeId:(null==x?void 0:x.videotmsid)||null,seasonNumber:(null==A||null===(c=A.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==x||null===(p=x.seriesDetails)||void 0===p?void 0:p.season)||null,episodeNumber:(null==A||null===(m=A.video)||void 0===m||null===(h=m.series)||void 0===h?void 0:h.episodeNumber)||(null==x||null===(g=x.seriesDetails)||void 0===g?void 0:g.episode)||null,episodeTitle:(null==x?void 0:x.lcSubTitle)||null,isCompleteEpisode:!!(null!=A&&null!==(y=A.video)&&void 0!==y&&y.series||null!=x&&null!==(w=x.seriesDetails)&&void 0!==w&&w.episode),genre:P||j,comscoreConfig:{implementationId:(null==e||null===(T=e.comscore)||void 0===T?void 0:T.implementationId)||null,projectId:(null==e||null===(_=e.comscore)||void 0===_?void 0:_.projectId)||null}}),V=null==e||null===(b=e.comscore)||void 0===b||null===(I=b.metadata)||void 0===I?void 0:I.contentType;if(null!=R&&null!==(E=R.streamingInfo)&&void 0!==E&&E.isLiveStream?R.contentType="Live":R.contentType=V||"LongFormOnDemand",null==R||!R.network){var M,W=(null==R?void 0:R.metadata)||[],N=null==W||null===(M=W.find(function(e){return"network"===e.name}))||void 0===M?void 0:M.value;R.network=N||null}null!=R&&R.network&&null!=R&&R.genre&&(R.customGenre="".concat(R.network,"_").concat((null==R?void 0:R.programTitle)||(L=R,null!=L&&L.series?null==L||null===(F=L.series)||void 0===F?void 0:F.title:null==L||null===(C=L.gist)||void 0===C?void 0:C.title),"_").concat(R.genre)),null!=x&&x.airDate&&(R.publishDate=x.airDate),null!=R&&R.runtime&&"function"==typeof k.duration&&(R.runtime=1e3*Math.ceil(k.duration()));var U=f.formulateComscorePayload(R,k);console.log("comscoreOptions player data",U),f.createComscoreStreamingTag(vn({playerName:"Video.js"},U)),f.setComscorePlayerInstance(k)}}function hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function gn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):hn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function yn(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 wn(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)?wn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function wn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var Tn,_n=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),bn=(Tn=null,{set:function(e){Tn=e},get position(){return Tn}});function In(e,n){return En.apply(this,arguments)}function En(){return(En=n(t.mark(function e(n,i){var r,a,l,s,d,u,c,f,p,m,h,g,y,w,T,_,b,I;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o.getPlayer(n),l=qe(i,n),s=l.src,d=(null==i?void 0:i.contentType)||"video",null==i||null===(r=i[d])||void 0===r||null===(a=r.streamingInfo)||void 0===a||a.isLiveStream,u=s.replace("/dash/","/session/").replace("/master/","/session/"),u=Be(u,n,i),c=kn(u),f=v(c,2),p=f[0],m=f[1],h=Sn(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach(function(e){var n=v(e,2),t=n[0],i=n[1];u.searchParams.set(t,i)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gn({adsParams:gn({},p)},h))});case 14:return g=e.sent,e.next=17,g.json();case 17:return y=e.sent,w="https://"+new URL(u).hostname,T=y.trackingUrl,_=y.manifestUrl,b=w+T,I=w+_,_n.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),l.src=I,e.abrupt("return",l);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",l);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function Sn(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=v(e,2),t=n[0],i=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(i)]}))||{}}function kn(e){var n={};if(!e.split("?")[1])return[{},{}];var t,i=new URL(e,window.location.origin),r=yn((null==i?void 0:i.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var o=v(t.value,2),a=o[0],l=o[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},d={},u=0,c=Object.entries(n);u<c.length;u++){var f=v(c[u],2),p=f[0],m=f[1];if(p.startsWith("ads."))s[p.replace(/^ads\./,"")]=m;else d[p]=m}return[s,d]}var An,On,Pn,Dn=new Map;function Ln(e,n){return Cn.apply(this,arguments)}function Cn(){return Cn=n(t.mark(function e(i,r){var a,l,s,d,u,v,f,p,m,h,g,y,w,T,_,b,I,E,S,k,A,O,P,D,L;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,n,t,r,a,l){var s,d,u=o.getPlayer(i);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<P&&O.clear(),P=e;var v=(null==n||null===(s=n.ads)||void 0===s||null===(d=s[r])||void 0===d?void 0:d.adId)||c;Math.floor(u.currentTime());var f,p=yn(t);try{var m=function(){var t,o,s,d=f.value,c=d.eventType,p=d.beaconUrls,m=d.startTimeInSeconds,h=d.startTime,g=d.durationInSeconds,y=m||0,w=p,T=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(s=o.ads)||void 0===s?void 0:s.adEventHandler)||null,_="".concat(y,"_").concat(c),b=Dn.get("pod-".concat(a))||[];if(console.warn(e,y,"map:",c,"condition1:",e>=y,"map:",Dn),e>=y&&!b.includes(_)){b.push(_),Dn.set("pod-".concat(a),b);try{D(c,n,w,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var I=bn.position;bn.set(null),setTimeout(function(){null!=I&&(u.currentTime(I),l())},500)}if("function"==typeof T)try{var E,S={eventType:c,startTimeInSeconds:m,startTime:h,durationInSeconds:g,ad:null==n||null===(E=n.ads)||void 0===E?void 0:E[r],adIndex:r};T({adsData:S}),un(i,S)}catch(e){console.error("Error when calling ads callback:",e)}var k=pn.get();if(k&&0!==Object.keys(k).length){var A=k.formulateComscoreAdPayload,P=k.startComscoreAdTracking,L=k.finishComscoreAdTracking,C=k.endComscoreAdTracking,F="".concat(y,"_").concat(v,"_").concat(c);if(!O.has(F))if(O.set(F,!0),"impression"===c){var x,j=_n.get();P(A(gn(gn({},null==n||null===(x=n.ads)||void 0===x?void 0:x[r]),{},{trackingUrl:j})))}else"complete"===c?L():"breakEnd"===c&&C()}}};for(p.s();!(f=p.n()).done;)m()}catch(e){p.e(e)}finally{p.f()}}},D=function(e,n,t,i){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.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"))},Dn.clear(),bn.set(r),m=_n.get(),(h=o.getPlayer(i)).one("loadeddata",function(){m&&k(m)}),g=new Map,y=new Map,w=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,_=(null==h||null===(s=h.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,b=(null==h||null===(d=h.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,I=(null==h||null===(u=h.el())||void 0===u||null===(v=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,E=(null==h||null===(f=h.el())||void 0===f||null===(p=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,S=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(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],s=null==l||null===(n=l.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.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(!d&&a){var u=null==s?void 0:s.map(function(e){return gn(gn({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},k=function(){var e=n(t.mark(function e(n){var a,l,s,d,u,v,f,p,m,h,k,O,P,D,C,F,x,j,R,V,M,W,N,U,B;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return M=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",M),0===e.button&&x(F)},V=function(e){},R=function(e){if(null!=e){var n,t=null,i=yn(p);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=r.startTimeInSeconds,a=r.ads;Array.isArray(a)&&(null==a?void 0:a.length)>0&&(o>e||g.has(o)||(null===t||o>t.startTimeInSeconds)&&(t=r))}}catch(e){i.e(e)}finally{i.f()}t?(console.log("Resume: seeking back to recent ad break:",t.startTimeInSeconds,"then resuming to",e),bn.set(e),setTimeout(function(){m.currentTime(t.startTimeInSeconds+.4)},100)):(bn.set(null),m.currentTime(e),j())}},j=function(){var e,n=m.currentTime(),t=null,i=yn(p);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(o+a));n>=o&&n<=l&&(t=l,g.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){m.currentTime(t+2.2)},100))},x=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m.currentTime();if(!(null==e||e<0||n<=e)){var t,i=null,r=yn(p);try{for(r.s();!(t=r.n()).done;){var o=t.value,a=o.startTimeInSeconds,l=o.ads;Array.isArray(l)&&(null==l?void 0:l.length)>0&&(g.has(a)||a>e&&a<=n&&(null===i||a<i)&&(i=a))}}catch(e){r.e(e)}finally{r.f()}null!==i&&(g.set(i,!0),y.set(i,!0),console.log("Seeking back to ad pod:",i),setTimeout(function(){m.currentTime(i+.4)},100))}},e.next=8,fetch(n);case 8:return u=e.sent,e.next=11,u.json();case 11:v=e.sent,f=v.avails,p=[],m=o.getPlayer(i),h=m.controlBar.progressControl,k=h.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),f.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t||t.length),p.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:S(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),r&&R(r),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p,"function"==typeof(C=(null===(O=window)||void 0===O||null===(P=O.customData)||void 0===P||null===(D=P.ads)||void 0===D?void 0:D.onAdBreaksLoaded)||null)&&C(p)),console.log(p,"data"),p.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,i=m.duration();if(!(n>i||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",k.appendChild(o)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=o.throttle(function(){var e=m.currentTime();if(e!==w){w=e;for(var n=!1,t=function(){var t=p[i],r=t.startTimeInSeconds,o=t.durationInSeconds,a=t.ads,l=r+o;if(e>=r-1.2&&e<=l+1.2){var s;e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&g.set(r,!0),en.disable(),T&&T.classList.add("vjs-hidden"),I&&(I.style.pointerEvents="none",I.classList.add("vjs-hidden")),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),h.el().classList.add("hide-progress-bar");for(var d=e-r,u=0,v=0,f=0;f<a.length;f++){var m,w=null==a||null===(m=a[f])||void 0===m?void 0:m.durationInSeconds;if(d<u+w){v=f;break}u+=w}a[v];var S=Math.max(0,o-d),k=Math.round(S);W.style.display="block",B.textContent="".concat(v+1," of ").concat(a.length," • ").concat(A(k));var O=[];return null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});O.push.apply(O,c(n))}),(null==t||null===(s=t.podSlotImpressionBeacon)||void 0===s?void 0:s.length)>0&&O.push.apply(O,c(null==t?void 0:t.podSlotImpressionBeacon)),L(e,t,O,v,i,j),"break"}y.delete(r)},i=0;i<p.length;i++){if("break"===t())break}n||(W.style.display="none",h.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),I&&(I.style.pointerEvents="auto",I.classList.remove("vjs-hidden")),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),en.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",function(e){if(en.enabled&&"ArrowRight"==e.key){var n=m.currentTime();Wt(i,10),x(n,n+10),e.stopPropagation()}}),F=-1,h.el().addEventListener("pointerdown",function(e){0===e.button&&(F=m.currentTime(),document.addEventListener("pointermove",V),document.addEventListener("pointerup",M))}),null===(s=document)||void 0===s||null===(d=s.querySelectorAll(".ssai-ad-container"))||void 0===d||d.forEach(function(e){return null==e?void 0:e.remove()}),(W=document.createElement("div")).className="ssai-ad-container",(N=document.createElement("div")).className="sponsored-adbox",(U=document.createElement("div")).className="sponsored-text",U.textContent="Sponsored Ad",N.append(U),(B=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",W.append(N),W.append(B),m.el().appendChild(W);case 46:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),O=new Map,P=-1;case 21:case"end":return e.stop()}},e)})),Cn.apply(this,arguments)}function Fn(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 xn(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)?xn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function xn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}function jn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Rn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?jn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):jn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Vn={},Mn=(null===(An=window)||void 0===An||null===(On=An.location)||void 0===On||null===(Pn=On.search)||void 0===Pn?void 0:Pn.includes("debug=true"))||!1,Wn=null;function Nn(e){return Un.apply(this,arguments)}function Un(){return Un=n(t.mark(function e(i){var r,a,l,s,d,u,v,f,p,m,h,g,y,w,T,_,b,I,E,S,k,A,O,P,D,L,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,r,a){var l,s,d=o.getPlayer(i);if(!d.seeking()){var u=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(l=n.ads)||void 0===l||null===(s=l[r])||void 0===s?void 0:s.adId)||u;Math.floor(d.currentTime());var v,f=Fn(t);try{for(f.s();!(v=f.n()).done;){var p,m,h,g=v.value,y=g.eventType,w=g.beaconUrls,T=g.startTimeInSeconds,_=g.startTime,b=g.durationInSeconds,I=(g.eventId,T||u),E=w,S=(null===(p=window)||void 0===p||null===(m=p.customData)||void 0===m||null===(h=m.ads)||void 0===h?void 0:h.adEventHandler)||null,k="".concat(c,"_").concat(y),A="pod-".concat(u);P.has(A)||P.set(A,new Set);var O=P.get(A);if(Mn&&console.warn(e,I,"map:",y,"condition1:",e>=I,"map:",P),e>=I&&e<=I+D&&!O.has(k)){O.add(k);try{L(y,n,E,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,n)}if("function"==typeof S)try{var C,F={eventType:y,startTimeInSeconds:T,startTime:_,durationInSeconds:b,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[r],adIndex:r};S({adsData:F}),un(i,F)}catch(e){console.error("Error when calling ads callback:",e)}var x=pn.get();if(x&&0!==Object.keys(x).length){var j=x.formulateComscoreAdPayload,R=x.startComscoreAdTracking,V=x.finishComscoreAdTracking,M=x.endComscoreAdTracking;if("impression"===y){var W,N=_n.get();R(j(Rn(Rn({},null==n||null===(W=n.ads)||void 0===W?void 0:W[r]),{},{trackingUrl:N})))}else"complete"===y?V():"breakEnd"===y&&M()}}}}catch(e){f.e(e)}finally{f.f()}}},L=function(e,n,t,i){var r,o,a;"breakEnd"===e&&(null===(r=Vn)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(o=Vn)||void 0===o?void 0:o.totalAds)&&(null==n||null===(a=n.ads)||void 0===a?void 0:a.length)>0||(Mn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},h=function(){Wn&&clearInterval(Wn)},p=_n.get(),(m=o.getPlayer(i)).one("loadeddata",function(){h(),Wn=setInterval(function(){p&&!m.paused()&&O(p)},2e3)}),m.on("dispose",function(){h()}),g=new Map,y=new Map,w=-1,T=null,_=(null===(r=document)||void 0===r||null===(a=r.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,b=(null==m||null===(l=m.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,I=(null==m||null===(s=m.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,E=(null==m||null===(d=m.el())||void 0===d||null===(u=d.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,S=(null==m||null===(v=m.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,k=!1,A=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(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],s=null==l||null===(n=l.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.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(!d&&a){var u=null==s?void 0:s.map(function(e){return Rn(Rn({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},O=function(){var e=n(t.mark(function e(n){var r,a,l,s,d,u,v,f,p,m,h,O;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=new URL(n),T&&s.searchParams.append("nextToken",T),e.next=4,fetch(s.toString(),{method:"GET"});case 4:return d=e.sent,e.next=7,d.json();case 7:u=e.sent,v=u.avails,f=u.nextToken||null,T=f,p=[],m=o.getPlayer(i),h=null==m||null===(r=m.controlBar)||void 0===r?void 0:r.progressControl,O=null==h||null===(a=h.seekBar)||void 0===a?void 0:a.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),v.map(function(e,n){p.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:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),Mn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,i=m.duration();if(!(n>i||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",O.appendChild(o)}}),m._timeUpdateHandler&&m.off("timeupdate",null==m?void 0:m._timeUpdateHandler),m._timeUpdateHandler=o.throttle(function(){if(Ut(i)){var e=null==m?void 0:m.currentTime();if(e!==w){w=e;for(var n=function(){var n=p[t],i=n.startTimeInSeconds,r=n.durationInSeconds,o=n.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var l;k=!!(e>=i&&e<=a&&Array.isArray(o)&&(null==o?void 0:o.length)>0),e>a&&g.set(i,!0),en.disable(),_&&_.classList.add("vjs-hidden"),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),h.el().classList.add("hide-progress-bar");for(var s=e-i,d=0,u=0,v=0;v<o.length;v++){var f,m=null==o||null===(f=o[v])||void 0===f?void 0:f.durationInSeconds;if(s<d+m){u=v;break}d+=m}setTimeout(function(){Vn.totalAds=null==o?void 0:o.length,Vn.currentAdIndex=u},1e3);var w=[];return null==o||o.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});w.push.apply(w,c(n))}),(null==n||null===(l=n.podSlotImpressionBeacon)||void 0===l?void 0:l.length)>0&&w.push.apply(w,c(null==n?void 0:n.podSlotImpressionBeacon)),C(e,n,w,u),"break"}y.delete(i)},t=0;t<p.length;t++){if("break"===n())break}k||(Vn={},h.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),en.enable())}}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,D=2.5;case 22:case"end":return e.stop()}},e)})),Un.apply(this,arguments)}var Bn=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Hn(e){return JSON.stringify((e||[]).map(function(e){return{availId:e.availId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds,ads:(e.ads||[]).map(function(e){return{adId:e.adId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds}})}}))}var qn=function(){function e(n,t,i,r){p(this,e),this.video_=r,this.ad_=n,this.skipOffset_=function(e){if(!e)return null;var n=new RegExp(Bn.source,"g");n.lastIndex=0;var t=n.exec(e);if(!t)return null;var i=Number(t[1])||0,r=Number(t[2]),o=Number(t[3]),a=Number(t[6])||0;return r>59||o>59?null:a/1e3+o+60*r+3600*i}(null==n?void 0:n.skipOffset),this.adPosition_=t,this.totalAds_=i,this.isSkipped_=!1}return m(e,[{key:"isClientRendering",value:function(){return!1}},{key:"getDuration",value:function(){var e,n;return null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.durationInSeconds)&&void 0!==e?e:0}},{key:"getRemainingTime",value:function(){var e,n,t,i,r,o;return(null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==e?e:0)+(null!==(t=null===(i=this.ad_)||void 0===i?void 0:i.durationInSeconds)&&void 0!==t?t:0)-(null!==(r=null===(o=this.video_)||void 0===o?void 0:o.currentTime)&&void 0!==r?r:0)}},{key:"isSkippable",value:function(){return"number"==typeof this.skipOffset_}},{key:"getTimeUntilSkippable",value:function(){if("number"!=typeof this.skipOffset_)return this.getRemainingTime();var e=this.getRemainingTime()+this.skipOffset_-this.getDuration();return Math.max(e,0)}},{key:"canSkipNow",value:function(){return 0===this.getTimeUntilSkippable()}},{key:"skip",value:function(){this.isSkipped_=!0,this.video_&&(this.video_.currentTime+=this.getRemainingTime())}},{key:"isLinear",value:function(){return!0}},{key:"getSequenceLength",value:function(){return this.totalAds_||1}},{key:"getPositionInSequence",value:function(){return this.adPosition_||1}},{key:"getTitle",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adTitle)||""}},{key:"getVastAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.vastAdId)||""}},{key:"getAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adId)||""}},{key:"getCreativeAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.creativeId)||""}},{key:"getTimeOffset",value:function(){var e,n;return null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==e?e:0}},{key:"release",value:function(){this.ad_=null,this.adPosition_=null,this.totalAds_=null}},{key:"isSkipped",value:function(){return this.isSkipped_}}]),e}(),Gn="impression",zn="start",Qn="mute",Yn="unmute",Kn="resume",Xn="pause",Jn="firstQuartile",$n="midpoint",Zn="thirdQuartile",et="complete",nt="skip",tt="breakStart",it="breakEnd",rt="skipStateChanged",ot="ad_impression",at="ad_started",lt="ad_muted",st="ad_volume_changed",dt="ad_resumed",ut="ad_paused",ct="ad_first_quartile",vt="ad_midpoint",ft="ad_third_quartile",pt="ad_complete",mt="ad_stopped",ht="ad_skipped",gt="ad_skip_state_changed",yt="ad_break_started",wt="ad_break_ended",Tt="ads_loaded",_t="ad_cuepoints_changed";function bt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function It(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):bt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Et(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 St(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)?St(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function St(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var kt="[Transmit]";function At(e){var n,t,i;if(null==e)return{avails:[],nextToken:null,dashAvailabilityStartTime:null};var r=null!==(n=e.dashAvailabilityStartTime)&&void 0!==n?n:null,o=null!==(t=e.nextToken)&&void 0!==t?t:null,a=[];if(Array.isArray(e.avails))a=e.avails;else if(Array.isArray(e)){var l,s,d,u,c=e[0];if(c&&Array.isArray(c.avails))a=c.avails,r=null!==(l=null!==(s=r)&&void 0!==s?s:c.dashAvailabilityStartTime)&&void 0!==l?l:null,o=null!==(d=null!==(u=o)&&void 0!==u?u:c.nextToken)&&void 0!==d?d:null;else a=e}else if(Array.isArray(null==e||null===(i=e.data)||void 0===i?void 0:i.avails)){var v,f,p,m;a=e.data.avails,o=null!==(v=null!==(f=o)&&void 0!==f?f:e.data.nextToken)&&void 0!==v?v:null,r=null!==(p=null!==(m=r)&&void 0!==m?m:e.data.dashAvailabilityStartTime)&&void 0!==p?p:null}else Array.isArray(null==e?void 0:e.data)&&(a=e.data);return{avails:a,nextToken:o,dashAvailabilityStartTime:r}}var Ot=function(){function e(n,t,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};p(this,e),this.video_=n,this.player_=t,this.onEvent_="function"==typeof i?i:function(){},this.dashManifestUrl_=o.dashManifestUrl||null,this.config_=null,this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.pollIntervalMs_=2e3,this.pollId_=null,this.adBreaks_=[],this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null,this.eventsSent_=new Set,this.firedBeacons_=new Set,this.adBreakListenersAttached_=!1,this.globalListeners_=[],this.adListeners_=[],this.videoTimeupdate_=null,this.lastMutedForAd_=null,this.onDispose_=function(){return r.release()},this.apiTimelineAbsolute_=!1}var i,r,o;return m(e,[{key:"configure",value:function(e){this.config_=e}},{key:"addTrackingUrl",value:function(e){this.trackingUrl_=e||"",this.onEvent_({type:Tt,loadTime:0})}},{key:"getCuePoints",value:function(){var e,n=new Map,t=Et(this.adBreaks_);try{for(t.s();!(e=t.n()).done;){var i,r=Et(e.value.ads||[]);try{for(r.s();!(i=r.n()).done;){var o=i.value,a=o.startTimeInSeconds,l=a+o.durationInSeconds;if(isFinite(a)&&isFinite(l)&&!(l<=a)){var s="".concat(a.toFixed(1),"|").concat(l.toFixed(1));n.has(s)||n.set(s,{start:a,end:l})}}}catch(e){r.e(e)}finally{r.f()}}}catch(e){t.e(e)}finally{t.f()}return Array.from(n.values()).sort(function(e,n){return e.start-n.start})}},{key:"onManifestUpdated",value:function(){this.trackingUrl_&&(this.requestTrackingInfo_(this.firstTrackingRequest_),this.firstTrackingRequest_=!1,this.ensurePolling_())}},{key:"stop",value:function(){this.onEnded_(),this.detachAllListeners_(),this.eventsSent_.clear(),this.firedBeacons_.clear(),this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.apiTimelineAbsolute_=!1,this.adBreaks_=[],this.adBreakListenersAttached_=!1,this.pollId_&&(clearInterval(this.pollId_),this.pollId_=null)}},{key:"release",value:function(){this.stop()}},{key:"ensurePolling_",value:function(){var e=this;this.pollId_||(this.pollId_=setInterval(function(){var n,t;e.trackingUrl_&&(null!==(n=e.player_)&&void 0!==n&&null!==(t=n.paused)&&void 0!==t&&t.call(n)||e.requestTrackingInfo_(!1))},this.pollIntervalMs_))}},{key:"requestTrackingInfo_",value:(o=n(t.mark(function e(n){var i,r,o,a,l,s,d,u,c,v,f,p,m,h,g,y,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,r=new Map,o=0,a=null;case 4:if(!(o<10)){e.next=25;break}return l=new URL(this.trackingUrl_),this.nextToken_&&l.searchParams.set("nextToken",this.nextToken_),e.next=9,fetch(l.toString(),{method:"GET"});case 9:return s=e.sent,e.next=12,s.json();case 12:d=e.sent,o++,(u=At(d)).dashAvailabilityStartTime&&!a&&(a=u.dashAvailabilityStartTime),c=Et(u.avails);try{for(c.s();!(v=c.n()).done;)f=v.value,p=(null==f?void 0:f.availId)||"".concat(null==f?void 0:f.startTimeInSeconds),r.set(p,f)}catch(e){c.e(e)}finally{c.f()}if((m=u.nextToken||null)&&m!==this.nextToken_){e.next=22;break}return this.nextToken_=m,e.abrupt("break",25);case 22:this.nextToken_=m,e.next=4;break;case 25:if(h=Array.from(r.values()),this.updateApiTimelineAbsoluteFlag_(h),g=(null==h||null===(i=h[0])||void 0===i?void 0:i.startTimeInSeconds)||0,this.apiTimelineAbsolute_){e.next=33;break}return e.next=31,this.resolveDashAvailabilityStartTime_(a,g);case 31:e.next=35;break;case 33:this.dashAvailabilityStartTimeResolved_=!0,this.dashAvailabilityStartTime_=0;case 35:h.length?(y=this.normalizeAvails_(h),Hn(this.adBreaks_)!==Hn(y)&&(this.adBreaks_=y,w=this.getCuePoints(),this.onEvent_({type:_t,cuepoints:w}))):this.adBreaks_.length&&(this.onEvent_({type:_t,cuepoints:[]}),this.onEnded_(),this.adBreaks_=[]),n&&this.setupAdBreakListeners_(),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(0),console.warn(kt,"tracking info fetch failed",e.t0);case 42:case"end":return e.stop()}},e,this,[[0,39]])})),function(e){return o.apply(this,arguments)})},{key:"updateApiTimelineAbsoluteFlag_",value:function(e){this.apiTimelineAbsolute_=!1;var n,t=1e6,i=Et(e||[]);try{for(i.s();!(n=i.n()).done;){var r,o=n.value;if((null!==(r=null==o?void 0:o.startTimeInSeconds)&&void 0!==r?r:0)>t)return void(this.apiTimelineAbsolute_=!0);var a,l=Et((null==o?void 0:o.ads)||[]);try{for(l.s();!(a=l.n()).done;){var s,d=a.value;if((null!==(s=null==d?void 0:d.startTimeInSeconds)&&void 0!==s?s:0)>t)return void(this.apiTimelineAbsolute_=!0)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}}},{key:"normalizeAvails_",value:function(e){var n=this,t=this.apiTimelineAbsolute_?0:this.dashAvailabilityStartTime_||0;return e.map(function(e){var i=n.resolveAbsoluteStart_(e,t,null);return It(It({},e),{},{startTimeInSeconds:i,ads:(e.ads||[]).map(function(r){return It(It({},r),{},{startTimeInSeconds:n.resolveAbsoluteStart_(r,t,e,i)})})})})}},{key:"resolveAbsoluteStart_",value:function(e,n,t,i){var r=null==e?void 0:e.adProgramDateTime;if(r){var o=new Date(r).getTime()/1e3;if(isFinite(o)&&o>0)return o}return null!=t&&t.adProgramDateTime&&"number"==typeof i?i+((e.startTimeInSeconds||0)-(t.startTimeInSeconds||0)):(e.startTimeInSeconds||0)+n}},{key:"resolveDashAvailabilityStartTime_",value:(r=n(t.mark(function e(n,i){var r,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.dashAvailabilityStartTimeResolved_){e.next=2;break}return e.abrupt("return");case 2:if(!n){e.next=8;break}if(r=new Date(n).getTime()/1e3,!(isFinite(r)&&r>0)){e.next=8;break}return this.dashAvailabilityStartTime_=r,this.dashAvailabilityStartTimeResolved_=!0,e.abrupt("return");case 8:if(!(i>0)){e.next=13;break}return e.next=11,this.fetchDashAvailabilityStartTimeFromMpd_();case 11:(o=e.sent)>0&&(this.dashAvailabilityStartTime_=o,this.dashAvailabilityStartTimeResolved_=!0);case 13:case"end":return e.stop()}},e,this)})),function(e,n){return r.apply(this,arguments)})},{key:"fetchDashAvailabilityStartTimeFromMpd_",value:(i=n(t.mark(function e(){var n,i,r,o,a,l;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=this.dashManifestUrl_||this.getCurrentSourceUrl_())&&i.includes(".mpd")){e.next=4;break}return e.abrupt("return",0);case 4:return e.next=6,fetch(i);case 6:return r=e.sent,e.next=9,r.text();case 9:return o=e.sent,a=(new DOMParser).parseFromString(o,"application/xml"),l=null===(n=a.querySelector("MPD"))||void 0===n?void 0:n.getAttribute("availabilityStartTime"),e.abrupt("return",l?new Date(l).getTime()/1e3:0);case 15:return e.prev=15,e.t0=e.catch(0),console.warn(kt,"MPD availabilityStartTime parse failed",e.t0),e.abrupt("return",0);case 19:case"end":return e.stop()}},e,this,[[0,15]])})),function(){return i.apply(this,arguments)})},{key:"getCurrentSourceUrl_",value:function(){try{var e,n,t,i,r=(null===(e=this.player_)||void 0===e||null===(n=e.currentSrc)||void 0===n?void 0:n.call(e))||(null===(t=this.player_)||void 0===t||null===(i=t.src)||void 0===i?void 0:i.call(t));return"string"==typeof r?r:(null==r?void 0:r.src)||""}catch(e){return""}}},{key:"setupAdBreakListeners_",value:function(){var e=this;if(!this.adBreakListenersAttached_){this.adBreakListenersAttached_=!0,this.onTimeupdate_();this.attachGlobalListener_("timeupdate",function(){return e.onTimeupdate_()}),this.attachGlobalListener_("dispose",this.onDispose_),this.video_&&(this.videoTimeupdate_=function(){return e.onTimeupdate_()},this.video_.addEventListener("timeupdate",this.videoTimeupdate_))}}},{key:"isHlsSource_",value:function(){var e,n,t=this.getCurrentSourceUrl_().toLowerCase(),i=((null===(e=this.player_)||void 0===e||null===(n=e.currentType)||void 0===n?void 0:n.call(e))||"").toLowerCase();return t.includes(".m3u8")||"application/x-mpegurl"===i||"application/vnd.apple.mpegurl"===i}},{key:"isDashSource_",value:function(){var e,n,t=this.getCurrentSourceUrl_().toLowerCase();return"application/dash+xml"===((null===(e=this.player_)||void 0===e||null===(n=e.currentType)||void 0===n?void 0:n.call(e))||"").toLowerCase()||t.includes(".mpd")}},{key:"getDashMediaPlayerTimelineSeconds_",value:function(){try{var e,n,t=null===(e=this.player_)||void 0===e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer;if(!t||"function"!=typeof t.time)return null;var i=t.time();return"number"==typeof i&&isFinite(i)&&i>1e6?i:null}catch(e){return null}}},{key:"getCurrentTime_",value:function(){var e,n,t,i=null!==(e=null===(n=this.video_)||void 0===n?void 0:n.currentTime)&&void 0!==e?e:0,r=a.detectBrowser();if(this.isHlsSource_()){var o,l,s=i,d=null===(o=this.player_)||void 0===o||null===(l=o.seekable)||void 0===l?void 0:l.call(o);return d&&d.length>0&&(s=d.end(d.length-1)),Date.now()/1e3-(s-i)}if(this.isDashSource_()){var u,c,v,f=this.getDashMediaPlayerTimelineSeconds_();if(null!=f)return f;var p=null===(u=this.player_)||void 0===u||null===(c=u.seekable)||void 0===c?void 0:c.call(u),m="function"==typeof(null===(v=this.player_)||void 0===v?void 0:v.currentTime)?this.player_.currentTime():i;if(p&&p.length>0){var h=p.start(0);if(h>1e6&&h+m>1e6)return h+m}if(this.apiTimelineAbsolute_&&(this.dashAvailabilityStartTime_||0)>1e9)return(this.dashAvailabilityStartTime_||0)+m}return"Safari"===r?i:"function"==typeof(null===(t=this.player_)||void 0===t?void 0:t.currentTime)?this.player_.currentTime():i}},{key:"onTimeupdate_",value:function(){if(this.ad_||this.adBreaks_.length){var e=this.getCurrentTime_();if(this.ad_){var n,t;this.sendInProgressEvents_(e,this.transmitAd_);var i=this.ad_.getDuration(),r=(null!==(n=null===(t=this.transmitAd_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==n?n:0)+i,o=r-e;this.ad_.canSkipNow()&&o>0&&i>0&&this.sendTrackingEvent_(rt),i>0&&e>=r&&this.onEnded_()}this.ad_||this.checkLinearAds_(e)}}},{key:"sendInProgressEvents_",value:function(e,n){if(n){var t=n.startTimeInSeconds+.25*n.durationInSeconds,i=n.startTimeInSeconds+.5*n.durationInSeconds,r=n.startTimeInSeconds+.75*n.durationInSeconds;e>=t&&!this.eventsSent_.has(Jn)&&(this.eventsSent_.add(Jn),this.sendTrackingEvent_(Jn)),e>=i&&!this.eventsSent_.has($n)&&(this.eventsSent_.add($n),this.sendTrackingEvent_($n)),e>=r&&!this.eventsSent_.has(Zn)&&(this.eventsSent_.add(Zn),this.sendTrackingEvent_(Zn))}}},{key:"flushPendingQuartiles_",value:function(){for(var e=0,n=[Jn,$n,Zn];e<n.length;e++){var t=n[e];this.eventsSent_.has(t)||(this.eventsSent_.add(t),this.sendTrackingEvent_(t))}}},{key:"checkLinearAds_",value:function(e){var n,t=Et(this.adBreaks_);try{for(t.s();!(n=t.n()).done;){var i=n.value;if(this.ad_)break;for(var r=i.ads||[],o=0;o<r.length;o++){var a=r[o],l=a.startTimeInSeconds,s=l+a.durationInSeconds;if(l<=e&&s>e){this.onEnded_(),this.transmitAdBreak_=i,this.transmitAd_=a,this.ad_=new qn(a,o+1,r.length,this.video_),0===o&&this.sendTrackingEvent_(tt),this.setupCurrentAdListeners_();break}}}}catch(e){t.e(e)}finally{t.f()}}},{key:"onEnded_",value:function(){this.ad_&&this.transmitAd_&&(this.ad_.isSkipped()||this.flushPendingQuartiles_(),this.removeCurrentAdListeners_(this.ad_.isSkipped()),this.ad_.getPositionInSequence()===this.ad_.getSequenceLength()&&this.sendTrackingEvent_(it),this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null)}},{key:"setupCurrentAdListeners_",value:function(){var e,n,t,i,r,o=this,a=!1;null!==(e=this.player_)&&void 0!==e&&null!==(n=e.paused)&&void 0!==n&&n.call(e)?a=!0:(this.sendTrackingEvent_(Gn),this.sendTrackingEvent_(zn)),this.lastMutedForAd_=null!==(t=null===(i=this.player_)||void 0===i||null===(r=i.muted)||void 0===r?void 0:r.call(i))&&void 0!==t&&t,this.attachAdListener_("volumechange",function(){var e,n,t,i=null!==(e=null===(n=o.player_)||void 0===n||null===(t=n.muted)||void 0===t?void 0:t.call(n))&&void 0!==e&&e;i!==o.lastMutedForAd_&&(o.lastMutedForAd_=i,i?o.sendTrackingEvent_(Qn):o.sendTrackingEvent_(Yn))}),this.attachAdListener_("play",function(){a?(o.sendTrackingEvent_(Gn),o.sendTrackingEvent_(zn),a=!1):o.sendTrackingEvent_(Kn)}),this.attachAdListener_("pause",function(){o.sendTrackingEvent_(Xn)})}},{key:"removeCurrentAdListeners_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.sendTrackingEvent_(e?nt:et),this.detachAdListeners_(),this.eventsSent_.clear()}},{key:"attachGlobalListener_",value:function(e,n){this.player_&&(this.player_.on(e,n),this.globalListeners_.push({event:e,handler:n}))}},{key:"attachAdListener_",value:function(e,n){this.player_&&(this.player_.on(e,n),this.adListeners_.push({event:e,handler:n}))}},{key:"detachAdListeners_",value:function(){var e,n=Et(this.adListeners_);try{for(n.s();!(e=n.n()).done;){var t,i,r=e.value,o=r.event,a=r.handler;null===(t=this.player_)||void 0===t||null===(i=t.off)||void 0===i||i.call(t,o,a)}}catch(e){n.e(e)}finally{n.f()}this.adListeners_=[]}},{key:"detachAllListeners_",value:function(){this.detachAdListeners_();var e,n=Et(this.globalListeners_);try{for(n.s();!(e=n.n()).done;){var t,i,r=e.value,o=r.event,a=r.handler;null===(t=this.player_)||void 0===t||null===(i=t.off)||void 0===i||i.call(t,o,a)}}catch(e){n.e(e)}finally{n.f()}this.globalListeners_=[],this.video_&&this.videoTimeupdate_&&(this.video_.removeEventListener("timeupdate",this.videoTimeupdate_),this.videoTimeupdate_=null)}},{key:"startComscoreForCurrentAd_",value:function(){try{var e=pn.get();if(!e||0===Object.keys(e).length)return;var n=e.formulateComscoreAdPayload,t=e.startComscoreAdTracking,i=_n.get();t(n(It(It({},this.transmitAd_),{},{trackingUrl:i})))}catch(e){console.warn(kt,"comscore start failed",e)}}},{key:"sendTrackingEvent_",value:function(e){var n,t=this;if(this.transmitAd_&&this.transmitAdBreak_){var i=(this.transmitAd_.trackingEvents||[]).find(function(n){return n.eventType===e});if(i||(i=(this.transmitAdBreak_.adBreakTrackingEvents||[]).find(function(n){return n.eventType===e})),i&&(null===(n=this.config_)||void 0===n||!n.disableTrackingEvents)){var r,o,a,l=(null===(r=this.transmitAd_)||void 0===r?void 0:r.adId)||(null===(o=this.transmitAdBreak_)||void 0===o?void 0:o.availId)||"unknown",s=Et(i.beaconUrls||[]);try{var d=function(){var n=a.value;if(!n)return"continue";var i="".concat(l,"|").concat(e,"|").concat(n);if(t.firedBeacons_.has(i))return"continue";t.firedBeacons_.add(i),fetch(n,{mode:"no-cors"}).catch(function(e){console.warn(kt,"beacon failed",n,e)})};for(s.s();!(a=s.n()).done;)d()}catch(e){s.e(e)}finally{s.f()}}var u=pn.get(),c=u&&Object.keys(u).length?u:null;switch(e){case Gn:this.onEvent_({type:ot}),this.startComscoreForCurrentAd_();break;case zn:this.onEvent_({type:at,ad:this.ad_});break;case Qn:this.onEvent_({type:lt});break;case Yn:this.onEvent_({type:st});break;case Kn:this.onEvent_({type:dt});break;case Xn:this.onEvent_({type:ut});break;case Jn:this.onEvent_({type:ct});break;case $n:this.onEvent_({type:vt});break;case Zn:this.onEvent_({type:ft});break;case et:this.onEvent_({type:pt}),this.onEvent_({type:mt}),null!=c&&c.finishComscoreAdTracking&&c.finishComscoreAdTracking();break;case nt:this.onEvent_({type:ht}),this.onEvent_({type:mt});break;case tt:this.onEvent_({type:yt});break;case it:this.onEvent_({type:wt}),null!=c&&c.endComscoreAdTracking&&c.endComscoreAdTracking();break;case rt:this.onEvent_({type:gt})}}else console.warn(kt,"sendTrackingEvent_ skipped — no active ad",{eventType:e})}}]),e}();function Pt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Dt(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Pt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Lt={dash:"tracking/initialize/dash",hls:"tracking/initialize/hls"};function Ct(e){if(null==e||!e.src)return null;var n=(e.type||"").toLowerCase(),t=String(e.src).toLowerCase();return"application/dash+xml"===n||t.includes(".mpd")?"dash":"application/x-mpegurl"===n||"application/vnd.apple.mpegurl"===n||t.includes(".m3u8")?"hls":null}function Ft(e,n,t){return xt.apply(this,arguments)}function xt(){return(xt=n(t.mark(function e(n,i,r){var o,a,l,s,d,u,c,v,f,p,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Ct(n)){e.next=3;break}return e.abrupt("return",n);case 3:return a=Be(n.src,r,i),l=a.replace(o,Lt[o]),console.log("[Transmit] session init →",l),e.prev=6,e.next=9,fetch(l,{method:"GET",redirect:"follow"});case 9:return s=e.sent,e.next=12,s.json();case 12:if(d=e.sent,console.log("[Transmit] session response",d),u="dash"===o?null==d?void 0:d.dashUrl:null==d?void 0:d.hlsUrl,c=null==d?void 0:d.trackingUrl,u&&c){e.next=18;break}return e.abrupt("return",n);case 18:return v=new URL(l),f=v.hostname,p="https://".concat(f).concat(u),m="https://".concat(f).concat(c),_n.set(m),console.log("[Transmit] session ready",{manifestUrl:p,trackingUrl:m}),e.abrupt("return",Dt(Dt({},n),{},{src:p}));case 26:return e.prev=26,e.t0=e.catch(6),console.warn("[Transmit] session init failed",e.t0),e.abrupt("return",n);case 30:case"end":return e.stop()}},e,null,[[6,26]])}))).apply(this,arguments)}var jt=null;function Rt(e,n){var t;if(jt)return console.log("[Transmit] initializeTransmit skipped — manager already initialised"),jt;var i=_n.get();if(!i)return console.warn("[Transmit] initializeTransmit skipped — no tracking URL"),null;var r=o.getPlayer(e);if(!r)return console.warn("[Transmit] initializeTransmit skipped — no player"),null;var a=(null===(t=r.el())||void 0===t?void 0:t.querySelector("video"))||null,l=function(e){try{var n="function"==typeof(null==e?void 0:e.currentSrc)&&e.currentSrc()||"function"==typeof(null==e?void 0:e.src)&&e.src()||"";if("application/dash+xml"===("function"==typeof(null==e?void 0:e.currentType)&&e.currentType()||"")||String(n).includes(".mpd"))return n}catch(e){}return null}(r);return(jt=new Ot(a,r,function(e){var t,i;console.log("[Transmit] ad event",e);var r=null==n||null===(t=n.customData)||void 0===t||null===(i=t.ads)||void 0===i?void 0:i.adEventHandler;if("function"==typeof r)try{r(e)}catch(e){console.warn("[Transmit] adEventHandler threw",e)}},{dashManifestUrl:l})).configure({disableTrackingEvents:!1}),jt.addTrackingUrl(i),jt.onManifestUpdated(),jt}function Vt(){jt&&(jt.release(),jt=null)}function Mt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var Wt=function(e,n){var t=i(e),r=t.currentTime()+n;t.currentTime(r)},Nt=function(e,n){var t=i(e),r=t.currentTime(),o=r<=n?0:r-n;t.currentTime(o)},Ut=function(e){return!!i.getPlayer("".concat(e))},Bt=function(){var e=n(t.mark(function e(i,r){var l,s,d,u=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=u.length>2&&void 0!==u[2]&&u[2],e.next=3,ae();case 3:return s=e.sent,d=o.getPlayer(i),e.abrupt("return",new Promise(function(e,o){H(r,s).then(function(){var o=n(t.mark(function n(o){var s,u,c,v,f,p,m,h,g,y,w;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(Vt(),p=null==o?void 0:o.data,a.isBotUserAgent()||(window.sid=Ie()),p.contentType="linearchannel",p.channelId=null==r?void 0:r.channelId,m=(null===(s=window.customData)||void 0===s?void 0:s.ads)||(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v?void 0:v.adsConfig)||{},h=!(null==p||null===(f=p.linearchannel)||void 0===f||!f.isSSAIEnabled),g=h&&"MEDIA_TAILOR"==(null==m?void 0:m.vodAdSticherProvider),y=h&&"TRANSMIT"==(null==m?void 0:m.liveAdSticherProvider)&&!(null==m||!m.liveAdClientSideTracking),w=qe(p,i),!g){n.next=17;break}return n.next=13,In(i,p);case 13:w=n.sent,l=!0,n.next=22;break;case 17:if(!y){n.next=22;break}return n.next=20,Ft(w,p,i);case 20:w=n.sent,l=!0;case 22:de(p),w&&l?(Gt(i,w),y?Rt(i,{customData:window.customData||{ads:m}}):g&&Nn(i),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:p})})):(pn.get()&&0!==Object.keys(pn.get()).length&&mn({playerId:i,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:p}));case 24:case"end":return n.stop()}},n)}));return function(e){return o.apply(this,arguments)}}()).catch(function(e){o({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)}}(),Ht=function(){var e=n(t.mark(function e(i,r,a){var l,s,u,c,v,f,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae();case 2:return c=e.sent,console.log("load video"),(ce()||null)&&fe(r),v=0,f=0,p=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(u=s.watchHistory)&&void 0!==u&&u.enable&&G(r,c).then(function(e){var n,t,i,r,o,a,l,s,d;(null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t||!t.cb||null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.isExternal||null===(o=window)||void 0===o||null===(a=o.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data),v=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,(f=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedPercentage)||null)<95)&&(p=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedTime)||null)}).catch(function(){}),e.abrupt("return",new Promise(function(e,a){B(r,c).then(function(){var r=n(t.mark(function n(r){var l,s,u,c,m,h,g,y,w,T,_,b,I,E,S,k,A,O,P,D,L,C,F,x,j,R,V,M,W,N,U,B,H,q,G,z,Q,Y,K,X;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(k=null==r?void 0:r.data,A=(null==k?void 0:k.contentType)||"video",O=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c?void 0:c.adsConfig)||{},P=!(null==k||null===(m=k[A])||void 0===m||!m.isSSAIEnabled),D=P&&"MEDIA_TAILOR"==(null==O?void 0:O.vodAdSticherProvider),L=P&&"TRANSMIT"==(null==O?void 0:O.liveAdSticherProvider)&&!(null==O||!O.liveAdClientSideTracking),C=!(null==k||null===(h=k[A])||void 0===h||null===(g=h.streamingInfo)||void 0===g||!g.isLiveStream)||"linearchannel"===A,de(r.data),(F=(null==k||null===(y=k.ads)||void 0===y||null===(w=y.preRoll)||void 0===w||null===(T=w.adTags)||void 0===T||null===(_=T.web)||void 0===_?void 0:_.active)&&(null==k||null===(b=k.ads)||void 0===b||null===(I=b.preRoll)||void 0===I||null===(E=I.adTags)||void 0===E||null===(S=E.web)||void 0===S?void 0:S.url))&&$e(i,F,k),x=qe(k,i),!D){n.next=17;break}return n.next=14,In(i,k);case 14:x=n.sent,n.next=22;break;case 17:if(!L||!C){n.next=22;break}return Vt(),n.next=21,Ft(x,k,i);case 21:x=n.sent;case 22:if(!x){n.next=37;break}if((null==k||null===(j=k.video)||void 0===j||null===(R=j.gist)||void 0===R?void 0:R.videoImageUrl)||null==k||null===(V=k.video)||void 0===V||null===(M=V.gist)||void 0===M||null===(W=M.imageGist)||void 0===W||W.r16x9,G=o.getPlayer(i)){n.next=28;break}return console.error("[VL][player-core] player not found for id=".concat(i),{player:G}),n.abrupt("return",a({status:!1,msg:"Player not found",response:{}}));case 28:Gt(i,x),L&&C?Rt(i,{customData:window.customData||{ads:O}}):D&&Ln(i,p),G.on("loadstart",function(){C&&e({status:!0,msg:"Video Loaded",response:k})}),G.on("loadeddata",function(){Xe(),e({status:!0,msg:"Video Loaded",response:k})}),G.one("play",function(){!v||D||L&&C||f<95&&setTimeout(function(){G.currentTime(v)},0)}),G.one("error",function(){var e;a({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==k||null===(N=k.video)||void 0===N||null===(U=N.contentDetails)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0||(null==k||null===(H=k.video)||void 0===H||null===(q=H.closedCaptions)||void 0===q?void 0:q.length)>0?(X=(null==k||null===(Q=k.video)||void 0===Q||null===(Y=Q.contentDetails)||void 0===Y?void 0:Y.closedCaptions)||(null==k||null===(K=k.video)||void 0===K?void 0:K.closedCaptions),z=X.filter(function(e){return"VTT"===e.format}),d.addCaptions(i,z)):d.removeCaptions(i),n.next=39;break;case 37:Ke(i,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed");case 39:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){zt(e,i,a,r)})}));case 11:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),qt=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()},Gt=function(e,n){console.log("load video in core",n);var t=o.getPlayer(e);t&&t.src(n)},zt=function(n,t,i,r){var o,a,l,s,d,u,c=null==n||null===(o=n.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==n?void 0:n.message);Ut(t)&&Ke(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Mt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))};exports.authenticateLC=Bt,exports.baseUrlManager=Q,exports.classifyRequestKind=function(e,n){var t=String(n||"").toLowerCase();if(t.includes("license"))return"license";if(t.includes("certificate"))return"server_certificate";if(t.includes("manifest"))return"manifest";if(t.includes("key"))return"key";if(t.includes("segment")||t.includes("media"))return"segment";var i=String(e||"").split("?")[0].toLowerCase();return i.endsWith(".mpd")||i.endsWith(".m3u8")||i.endsWith(".ism/manifest")?"manifest":/\.(m4s|mp4|m4a|m4v|ts|aac|webm|cmf[av]|mp4a)$/.test(i)?"segment":/license|widevine|playready|fairplay|drm/.test(i)?"license":/cert|certificate/.test(i)?"server_certificate":/\.key($|\?)/.test(i)||/\/key\//.test(i)?"key":"other"},exports.clearError=Xe,exports.comscoreInstanceManager=pn,exports.createIdxMapping=function(e){ee=new Map,e.map(function(e,n){ee.set(e.id,n)})},exports.createSeriesWatchMap=function(e,n){var t=new Map;z({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),ne=t}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){Vt();var n=o.getPlayer(e),t=(pn.get()||{}).destroyComscoreTag;if(qt(),t&&t(),o.clearEventListeners(),window.onresize=null,n)n.dispose();else{var i=document.getElementById(e);i&&i.remove()}},exports.emitApiErrorEvent=R,exports.extractStatusCode=function(e,n){for(var t=0,i=[null==e?void 0:e.statusCode,null==e?void 0:e.status,null==e?void 0:e.code,null==n?void 0:n.statusCode,null==n?void 0:n.status,null==n?void 0:n.code];t<i.length;t++){var r=Number(i[t]);if(Number.isFinite(r)&&r>0)return r}return null},exports.getCurrentSeries=ce,exports.getCurrentVideo=ue,exports.getDecodedToken=le,exports.getEntitlementData=function(e,n,t,i){var o,a;return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.adbTempToken},withCredentials:!0}).catch(function(n){throw R(t,n,"content",{videoId:e,url:t}),n})},exports.getEpisodeNumber=xe,exports.getLinearChannelDetails=H,exports.getSGAIEnabledSource=In,exports.getSeasonNumber=Fe,exports.getSeriesDetails=function(e,n){var t,i,o=le(n),a=(null==o?void 0:o.site)||null;if(null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData)return new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})});var l=Q.get()+"/v3/content/series/".concat(e);return r({url:l,params:{site:a},method:"GET",headers:{Authorization:n}}).catch(function(n){throw R(l,n,"content",{videoId:e}),n})},exports.getSeriesWatchHistory=z,exports.getSeriesWatchMap=function(){return ne},exports.getSource=qe,exports.getSsaiEvents=function(e){var n=o.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var i=function(e,n){return t(n)};return n.on(e,i),function(){return n.off(e,i)}};return{adBreakStart:function(e){return t(nn,e)},adImpression:function(e){return t(tn,e)},adFirstQuartile:function(e){return t(rn,e)},adMidpoint:function(e){return t(on,e)},adThirdQuartile:function(e){return t(an,e)},adComplete:function(e){return t(ln,e)},adBreakEnd:function(e){return t(sn,e)}}},exports.getToken=ae,exports.getTransmitEnabledSource=Ft,exports.getUpdatedClusterSource=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:i}},exports.getUserId=Ee,exports.getVideoDetails=B,exports.getVideoIdx=function(){return Z},exports.getVideoInfo=G,exports.handleError=Ke,exports.initialiseAdvertisement=$e,exports.initialiseComscoreStreamingTracking=mn,exports.initialiseKeyboardEvents=function(e,n){var t,i,r,a=o.getPlayer(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(i=t.playToggle)||void 0===i?void 0:i.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var i,r,o,d,u,c,v,f,p;if(en.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var m=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(t.preventDefault(),null==s||s.focus()),m){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(i=document.querySelector(".vjs-fullscreen-control"))||void 0===i||i.click();break;case"ArrowLeft":h&&!1===n.liveui||Nt(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(o=r.app_data)||void 0===o||null===(d=o.appcmsMain)||void 0===d||null===(u=d.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!==(p=f.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;h||Wt(e,10)}}},!0)},exports.initializeTransmit=Rt,exports.initiateErrorHandling=zt,exports.inititateBeacon=function(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&!a.isBotUserAgent()){var t=I.getConfig();if(null==t||!t.disableBeacon){null!=n&&n.userId&&(ye=n.userId);var i=o.getPlayer(e);window.initialise(i,null==n?void 0:n.analyticsCb),window.firstFrame(i,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),window.endFirstFrame(i),window.watchLive(i)}}},exports.isDrmError=E,exports.isDrmRequestKind=function(e){return S.has(e)},exports.isHttpOk=function(e){return null==e||e>=200&&e<400},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=Ut,exports.isTokenExpired=Y,exports.load=Ht,exports.loadVideo=Gt,exports.loadVideoInstantly=function(e,n,t){var i=o.getPlayer(e);return i.src(n),new Promise(function(e,n){var r=0;i.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){r=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.playerConfigManager=I,exports.refreshTokenManager=X,exports.rewind=Nt,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],h("js",new Date),h("config",e)},exports.saveWatchHistory=q,exports.seasonIdxManager=pe,exports.setCurrentSeries=function(e){J=e},exports.setCurrentVideo=de,exports.setUserId=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},exports.setVideoIdx=ve,exports.setVideoIdxById=fe,exports.setupAdvertisementMarkers=Ln,exports.setupAdvertisementMarkersForLinear=Nn,exports.skip=Wt,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},exports.trackMap=Dn,exports.trackingUrlManager=_n,exports.videoReplayTracker=se;
@@ -1 +0,0 @@
1
- "use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-215f4b2f.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/get"),u=require("@babel/runtime/helpers/inherits"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),c=require("@babel/runtime/helpers/getPrototypeOf"),d=require("./index-160bf3cf.js"),v=require("./captions-0ca41a03.js"),f=require("./renditions-627bdfad.js"),p=require("./resolution-3af2cf1b.js"),m=require("./skin-66dce245.js"),g=require("./browser-3670a923.js"),h=require("./localisation-56e0a999.js"),y=require("@babel/runtime/helpers/typeof");require("@viewlift/comscore/index.js");var b=require("@babel/runtime/helpers/toConsumableArray"),w=require("@viewlift/sse"),k=require("./relatedVideosManager-eeeaf32c.js");function S(e,n,t,r){var i=a(c(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof i?function(e){return i.apply(t,e)}:i}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}var P=i.getComponent("TextTrackSettings"),E=i.dom,I=[{value:"12",label:"12px"},{value:"14",label:"14px"},{value:"16",label:"16px"},{value:"18",label:"18px"},{value:"20",label:"20px"},{value:"24",label:"24px"},{value:"28",label:"28px"},{value:"32",label:"32px"}],C=I.map(function(e){return e.value}),D="16",O="vlp-caption-font-size-px",j="vlp-caption-font-size-style",x=".vjs-font-percent > select",_=function(e){return-1!==C.indexOf(e)?e:D},A=null;P?(A=function(){u(r,P);var e,n,t=(e=r,n=T(),function(){var t,r=c(e);if(n){var i=c(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return s(this,t)});function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).customUiReady_=!0,i.applyCustomFontSizeUI_(),i}return l(r,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(x);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);I.forEach(function(n){e.appendChild(E.createEl("option",{value:n.value,textContent:n.label}))}),e.value=D}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$(x);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=_(e);if("undefined"!=typeof document){var t=document.getElementById(j);t||((t=document.createElement("style")).id=j,document.head.appendChild(t)),t.textContent=[".vjs-text-track-cue,",".vjs-text-track-cue > div,",".vjs-text-track-display-ttml,",".vjs-text-track-display-ttml span,",".vjs-text-track-display-ttml div","{ font-size: ".concat(n,"px !important; line-height: normal !important; }")].join(" ")}}},{key:"restoreCustomFontSize_",value:function(){var e=null;try{e=window.localStorage.getItem(O)}catch(e){}var n=_(e),t=this.$(x);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=S(r,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(S(r,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$(x);e&&(e.value=D),this.applyFontSize_(D)}}},{key:"saveSettings",value:function(){if(S(r,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$(x);if(e)try{window.localStorage.setItem(O,_(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){S(r,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),r}(),i.registerComponent("TextTrackSettings",A)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var R=function(e){return new Promise(function(n,t){if(L(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},L=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},N=function(e,n,t){var r=m.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var i=parseFloat(n)/100;r.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},M=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},B=function(){var e=t(r.mark(function e(n){var t,o,l,a,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=m.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,R("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(i),e.finish(13);case 16:(u=i.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==g.detectBrowser()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),U=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,o,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}})};var V=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),R("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),H=function(){var n=t(r.mark(function n(){return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),q=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){i.getPlugin("eme")||i.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),F=function(){var e=t(r.mark(function e(){var n;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(i),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),z=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-072614bc.js")});case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),K=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){R("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(i)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(i)})},loadAdsLibrary:V,loadEMELibrary:q,loadMuxPlugin:F,loadDvrSeekbar:z,loadContribDash:G,loadComscorePlugin:H});function W(e){return Y.apply(this,arguments)}function Y(){return(Y=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,V();case 3:t&&"Safari"==g.detectBrowser()&&Promise.resolve().then(function(){return K}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $(e){return J.apply(this,arguments)}function J(){return(J=t(r.mark(function e(n){var t,i,o,l,a,u,s,c,d,v;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=m.getPlayer(n.playerId),e.next=3,H();case 3:v.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(i=n.comscore)||void 0===i?void 0:i.endpoint,applicationName:(null==n||null===(o=n.comscore)||void 0===o?void 0:o.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function X(e,n){return Q.apply(this,arguments)}function Q(){return(Q=t(r.mark(function e(n,t){var i,o,l,a,u,s,c,d,v,f,p,m,h,y;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",f=null==t||null===(i=t[v])||void 0===i?void 0:i.drmEnabled,null==t||null===(o=t[v])||void 0===o||null===(l=o.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==t||null===(a=t[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==g.detectBrowser()?q():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?G():q():"Safari"!=g.detectBrowser()&&p?G():null,m?$(n):null,h?F():null,B(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}},e,null,[[7,12]])}))).apply(this,arguments)}function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ne=new Set,te=null,re=function(n,t,r,i){var o,l,a,u,s,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(o=n[f])||void 0===o?void 0:o.id)||"Null",v["c3.cm.contentType"]=ce(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==r||null===(u=r.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),v["c3.cm.categoryType"]=ae(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(s=n[f])||void 0===s?void 0:s.drmEnabled)||"None",v.DAIStream=null!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=ue(n),v["c3.cm.genreList"]=oe(n),v["c3.cm.genre"]=ie(n),v["c3.cm.channel"]=le(n,i);var p=fe(e.getCurrentSeries(),n);return v=ee(ee({},v),p)},ie=function(e){var n,t,r,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},oe=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},le=function(e,n){var t,r,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(r=((null==e||null===(t=e[i])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===r?void 0:r.title)||"NULL"},ae=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},ue=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},se=function(e,n){var t,r,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var o=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[o])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},ce=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var de,ve,fe=function(n,t){var r,i,o,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),c=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(o=n[s-1])||void 0===o||null===(l=o.episodes)||void 0===l||null===(a=l[c-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},pe=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},me=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ge=function(){var n=t(r.mark(function n(t,i){var o,l,a,u,s,c,d,v,f,p,g,h;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(o=(null==i?void 0:i.convivaConfig)||{},l=o.trackConvivaPlayerEvent,a=o.paymentHandler,u=o.tveProvider,s=o.enable,c=o.appName,v=(d=i||{}).token,f=d.epg,s){n.next=4;break}return n.abrupt("return");case 4:if(p=m.getPlayer(t),"function"==typeof(g=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,g("getConvivaObject");case 10:if(h=n.sent){n.next=13;break}return n.abrupt("return");case 13:p.ready(function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=pe(t.keySystem);g("contentInfo",{DRMEnabled:r})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),p.on("loadstart",function(){var n,t;te&&te!==p.currentSrc()&&g("playbackEnded"),g("setPlayer",p),ne.clear(),te=p.currentSrc();var r=me(p.currentType()),o=e.getCurrentVideo(),l=re(o,p,h,f);l[null==h||null===(n=h.Constants)||void 0===n?void 0:n.PLAYER_NAME]=c||"WEB",l[null==h||null===(t=h.Constants)||void 0===t?void 0:t.ASSET_NAME]=se(o,i),l.authToken=v||"NULL",l.streamType=r,l.D2CType=a||"NONE",l.subscriberType=u?"MVPD":"FREE"!==a?"D2C":"FREE",l["c3.cm.affiliate"]=u||"NULL",he.setData(l),g("contentInfo",l)}),p.on("loadedmetadata",function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})}),p.on("play",function(){ne.has(p.currentSrc())||(ne.add(p.currentSrc()),g("playbackStarted",null))}),p.on("ended",function(){ne.has(p.currentSrc())&&ne.delete(p.currentSrc()),g("playbackEnded")}),p.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})}),p.on("dispose",function(){null==ne||ne.clear(),g("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),he=(de={},{setData:function(e){de=ee(ee({},de),e)},getData:function(){return de}}),ye=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-ca777bf7.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-43fd6f9f.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-765eaa0a.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-fe84f7e4.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-b8d21775.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-329840ee.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-986ee45f.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-64a712c1.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t?Promise.resolve().then(function(){return require("./skin-125b2f1b.js")}).then(function(t){t.initialiseSkin(e,n)}):"CN_NEWS"==t&&Promise.resolve().then(function(){return require("./skin-645e94e3.js")}).then(function(t){t.initialiseSkin(e,n)})};function be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ke=[],Se=0,Te=null;function Pe(){ve=null,ke=[],Se=0,Te=null}function Ee(t,r,i){var o,l,a,u,s,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(o=r.watchHistory)||void 0===o||o.apiVersion;var d=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(u=r.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==r||null===(s=r.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),h=c?100:Math.floor(v/f*100),y={};m?function(t,r,i){var o=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(i),l=Ie(o),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return we(we({},e),{},n({},t,s[t]))},{}),d=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ve});d<0?l.push(we(we({content:c},t),{},{addedDate:a,updateDate:a})):l[d]=we(we(we({},l[d]),t),{},{updateDate:a});localStorage.setItem("".concat(o),JSON.stringify(l))}(y={completed:c,watchedTime:g,watchedPercentage:h},d,r.siteOwner):(y=we(we({videoId:ve,watchedTime:g,watchedPercentage:h,doneWatching:c,profileId:d},Te&&{seriesId:Te}),p&&{originalObjectId:p}),e.saveWatchHistory(y).then(function(e){}).catch(function(e){})),Se=v+i}function Ie(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Ce(e,n,t){var r=Ie(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return r&&Array.isArray(r)&&(i=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}var De=!1,Oe=function(n,t){var r,i,o=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[o])||void 0===r||null===(i=r.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!De){var l=je(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),De=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function je(e,n,t){if(Array.isArray(e))return e.map(function(e){return je(e,n,t)});if(null!==e&&"object"===y(e)){var r={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?r[i]=e[t]:i===t&&void 0!==e[n]?r[i]=e[n]:r[i]=je(e[i],n,t)}),r}return e}function xe(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 _e(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)?_e(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 o,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,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function _e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Le=function(n,t,r,i){var o,l,a,u,s,c=i.res,d=i.sres,f=m.getPlayer(n),p=(null==c?void 0:c.contentType)||"video",h=(null==c||null===(o=c[p])||void 0===o?void 0:o.drmEnabled)||!1,b=!(null==c||null===(l=c[p])||void 0===l||null===(a=l.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===p,w=(null==c||null===(u=c[p])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;e.setCurrentVideo(c),e.videoReplayTracker.set(c),f&&(f.on("loadstart",function(){b?r.resolve({status:!0,msg:"Video Loaded",response:c}):r.resolve(Re({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:c}:{response:c}))}),f.on("loadeddata",function(){var r,i,o,l,a=v.getCaptions(n);if(null==a||a.map(function(e){return v.disableCaptions(n,e.id)}),w&&"Safari"===g.detectBrowser())try{var u;null==f||null===(u=f.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==f||!f.muted())&&N(n,sessionStorage.getItem("volume")||"100");var s=e.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.isExternal){var d=Re(Re({},t),c);!function(e,n){var t,r,i;if(null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&"function"==typeof(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.cb)){var o,l,a,u=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.interval)||30,s=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.completionThreshold)||95,c=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.cb,d=-1;e.on("seeked",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(d=t,t>0){var r=Math.floor(n/e.duration()*100);c({watchedTime:n,watchedPercentage:r,doneWatching:r>=s})}}),e.on("timeupdate",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(n%u===0&&t!==d){d=t;var r=Math.floor(n/e.duration()*100);c({watchedTime:n,watchedPercentage:r,doneWatching:r>=s||!1})}}),e.on("ended",function(){c({watchedTime:Math.floor(e.duration()),watchedPercentage:100,doneWatching:!0})})}}(f,d)}else if(null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var p,h,y=Re(Re({},t),c);!function(e,n,t){var r,i,o;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(Te=null==n||null===(i=n.series)||void 0===i?void 0:i.id),ke=[],Se=0,ve=t;var l=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.interval)||30,a=m.getPlayer(e);a&&(a.on("dispose",Pe),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());ke.includes(Se)||(e!=Se||e<l?e>Se&&(Se=e+l):(ke.push(e),Ee(a,n,l)))}}),a.one("ended",function(){Ee(a,n,l,!0)}))}(n,y,null==s||null===(p=s.video)||void 0===p||null===(h=p.gist)||void 0===h?void 0:h.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=f&&f.mux){var b,k,S,T,P,E,I=(null===(b=e.getCurrentVideo())||void 0===b?void 0:b.video)||(null==c?void 0:c.video),C=null==I?void 0:I.gist,D={env_key:null==t||null===(k=t.analytics)||void 0===k?void 0:k.muxKey,player_name:"vl-web-player",player_version:null===(S=window)||void 0===S?void 0:S.vl_player_version,video_id:null==C?void 0:C.id,video_title:null==C?void 0:C.title,video_series:null==I||null===(T=I.series)||void 0===T?void 0:T.title,video_stream_type:null!=I&&null!==(P=I.streamingInfo)&&void 0!==P&&P.isLiveStream?"live":"video",viewer_user_id:null==t||null===(E=t.analytics)||void 0===E?void 0:E.userId};f.mux({debug:!1,data:D})}}),f.textTracks().on("change",function(e){var t=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];v.syncTtmlDisplay(n),f.trigger("subtitlechanged",t)}),f.on("subtitlechanged",function(e,n){var t,r,i,o,l,a,u,s,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(o=i.CastContext)||void 0===o||null===(l=o.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(c=s.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,g=p.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),f.tech_.on("retryplaylist",function(){b&&Oe(c,n)}),f.on("error",function(){var t,i;(console.log("ERROR",f.error(),f.error().code),4===f.error().code&&b)?Oe(c,n):(e.handleError(n,(null==f||null===(t=f.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==f||null===(i=f.error())||void 0===i?void 0:i.message)||"Some error occured",response:c}))}),f.one("play",function(){var n,r,i,o,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(i=r.appcmsMain)||void 0===i||null===(o=i.adsConfig)||void 0===o||!o.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,u,s,c=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,d=e.getSeriesWatchMap(),v=(null==d?void 0:d.get(c))||{t:0,p:0},p=v.t,m=v.p;p&&m<95&&setTimeout(function(){f.currentTime(p)},0)}else{var g,h,y,b,w,k,S,T=null!==(g=null==t?void 0:t.watchHistoryResumeTime)&&void 0!==g?g:null==t||null===(h=t.watchHistory)||void 0===h?void 0:h.watchedTime,P=null!==(y=null!==(b=null==t?void 0:t.watchedPercentage)&&void 0!==b?b:null==t||null===(w=t.watchHistory)||void 0===w?void 0:w.watchedPercentage)&&void 0!==y?y:0,E=null!==(k=null==t||null===(S=t.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==k?k:95;T&&P<E&&setTimeout(function(){f.currentTime(T)},0)}if(null!=f&&f.dvrSeekbar)try{f.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),f.on("volumechange",function(){var e=100*f.volume().toFixed(2);f.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),f.on("chromecastDisconnected",function(){if(b){f.currentSource();for(var e=f.textTracks(),n=e.length-1;n>=0;n--)f.removeRemoteTextTrack(e[n])}}),f.one("loadeddata",function(){var e,n=(null==f||null===(e=f.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0}),"object"==y(f.dash)){var t,r,i,o=null==f||null===(t=f.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==o?void 0:o.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=xe(n);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],d=xe(n);try{for(d.s();!(s=d.n()).done;){var v,p,m,b=s.value;("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(v=navigator)&&void 0!==v&&null!==(p=v.userAgent)&&void 0!==p&&p.includes("Macintosh")||!h))&&null!=b&&null!==(m=b.label)&&void 0!==m&&m.includes("5.1")?f.audioTracks().removeTrack(b):c.push(b)}}catch(e){d.e(e)}finally{d.f()}for(var w=c.find(function(e){return"main"===e.kind}),k=w||c.find(function(e){return e.enabled})||c[0],S=0,T=c;S<T.length;S++){var P=T[S];P.enabled=P===k}}}))};function Ne(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Be(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 Ue(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)?Ue(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 o,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,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function Ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var Ve={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0};function He(n,t,r){e.emitApiErrorEvent(n,{status:r,message:"DRM ".concat(t," request failed")},"playback",{requestKind:t})}function qe(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var i=n[r[t]];if("string"==typeof i)return i;if(null!=i&&i.url)return i.url;if(null!=i&&i.licenseUri)return i.licenseUri}var o=null==e?void 0:e.keySystemOptions;if(Array.isArray(o)){var l,a=Be(o);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function Fe(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return qe("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function ze(n,t){t&&!t.__vlDrmDashHooksInstalled&&(t.__vlDrmDashHooksInstalled=!0,"function"==typeof t.addResponseInterceptor&&t.addResponseInterceptor(function(n){try{var t=(null==n?void 0:n.request)||{},r=(null==n?void 0:n.url)||(null==t?void 0:t.url)||"",i=e.classifyRequestKind(r,(null==t?void 0:t.type)||(null==n?void 0:n.type));if(e.isDrmRequestKind(i)){var o=e.extractStatusCode(n,null);e.isHttpOk(o)||He(r,i,o)}}catch(e){}return Promise.resolve(n)}),"function"==typeof t.registerLicenseRequestFilter&&t.registerLicenseRequestFilter(function(e){try{null!=e&&e.url&&(t.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()}),"function"==typeof t.on&&t.on("public_licenseRequestComplete",function(r){try{var i,o,l,a;if(null==r||!r.error)return;var u=null!==(i=null==r||null===(o=r.error)||void 0===o||null===(l=o.data)||void 0===l?void 0:l.responseCode)&&void 0!==i?i:e.extractStatusCode(null,r.error);He((null==r||null===(a=r.data)||void 0===a?void 0:a.url)||t.__vlLastLicenseUrl||Fe(n)||"","license",u)}catch(e){}}))}var Ge=!1,Ke=null,We=new Set;function Ye(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,We.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,We.delete(e),function(){if(Ge&&!(We.size>0)){var e=null==i?void 0:i.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof Ke&&e.removeHook("beforeinitialize",Ke),Ge=!1,Ke=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function $e(n){if(n){Ye(n),function(){if(!Ge){var e=null==i?void 0:i.Html5DashJS;e&&"function"==typeof e.hook&&(Ke=function(e,n){null!=e&&e.__vlDrmDashEnabled&&ze(e,n)},Ge=!0,e.hook("beforeinitialize",Ke))}}(),function(n){n&&!n.__vlEmeDrmErrorInstalled&&(n.__vlEmeDrmErrorInstalled=!0,n.on("error",function(){try{var t,r="function"==typeof n.error?n.error():null;if(!r||!e.isDrmError(r))return;if(null!=n&&null!==(t=n.dash)&&void 0!==t&&t.mediaPlayer)return;He(Fe(n),"license",null)}catch(e){}}))}(n);var t=function(){var t;!function(n){var t,r,i=null==n||null===(t=n.tech_)||void 0===t||null===(r=t.vhs)||void 0===r?void 0:r.xhr;i&&"function"==typeof i.onResponse&&!n.__vlDrmVhsHooksInstalled&&(n.__vlDrmVhsHooksInstalled=!0,i.onResponse(function(n,t,r){try{var i=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(n),o=e.classifyRequestKind(i,null==n?void 0:n.type);if(!e.isDrmRequestKind(o))return;var l=e.extractStatusCode(r,t);e.isHttpOk(l)&&!t||He(i,o,l)}catch(e){}}))}(n),ze(n,null==n||null===(t=n.dash)||void 0===t?void 0:t.mediaPlayer)};t(),n.on("xhr-hooks-ready",t),n.on("loadstart",function(){setTimeout(t,0)})}}var Je=function(o,l,a,u){var s,c,d,f,p,h,y,b,w,k,S,T,P,E,I,C,D,O,j,x,_,A,R,L,N,M,B,V,H,q,F,z,G,K,W,Y,$,J,Q=l.res,Z=void 0===Q?null:Q,ee=l.sres,ne=void 0===ee?null:ee,te=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=Ve[r]?Ve[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),re=te.playerDebug,ie=te.logLevel,oe=te.dashLogLevel;re&&(console.log("[PLAYER DEBUG] config:",a),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var le=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(s=Z)||void 0===s?void 0:s.contentType)||"video",ue=m.impolicy16x9(null===(c=Z)||void 0===c||null===(d=c[ae])||void 0===d||null===(f=d.gist)||void 0===f?void 0:f.videoImageUrl)||m.impolicy16x9(null===(p=Z)||void 0===p||null===(h=p[ae])||void 0===h||null===(y=h.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),se=(null===(w=Z)||void 0===w||null===(k=w[ae])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,ce=!(null===(T=Z)||void 0===T||null===(P=T[ae])||void 0===P||null===(E=P.streamingInfo)||void 0===E||!E.isLiveStream)||"linearchannel"===ae,de=(null===(I=Z)||void 0===I||null===(C=I.ads)||void 0===C||null===(D=C.preRoll)||void 0===D||null===(O=D.adTags)||void 0===O||null===(j=O.web)||void 0===j?void 0:j.active)&&(null===(x=Z)||void 0===x||null===(_=x.ads)||void 0===_||null===(A=_.preRoll)||void 0===A||null===(R=A.adTags)||void 0===R||null===(L=R.web)||void 0===L?void 0:L.url);Z=Me(Me({},Z),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ve=(null==a||null===(N=a.customData)||void 0===N?void 0:N.ads)||{},fe=(null===(M=Z)||void 0===M||null===(B=M[ae])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,pe=!(null===(V=Z)||void 0===V||null===(H=V[ae])||void 0===H||!H.isSSAIEnabled)&&"TRANSMIT"==(null==ve?void 0:ve.liveAdSticherProvider)&&!(null==ve||!ve.liveAdClientSideTracking),me=(null==a?void 0:a.latency)||6,be=(null==a?void 0:a.skin_settings)||{},we=null,ke=($={enableSmoothSeeking:!0,controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==be?void 0:be.pictureInPictureToggle)||!1},playbackRates:null!=be&&be.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==a.skin,liveui:se},n($,"autoplay",null==a?void 0:a.autoplay),n($,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!de),n($,"loop",(null==a?void 0:a.loop)||!1),n($,"audioPosterMode",null==a?void 0:a.audioPosterMode),n($,"html5",Me(Me({dash:Me(Me({},!i.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Me(Me({},((null==a?void 0:a.debugConfig)&&(null==a||null===(q=a.debugConfig)||void 0===q?void 0:q.enable)||re)&&{debug:{logLevel:oe}}),{},{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Me({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:Me(Me(Me(Me({},(null==a?void 0:a.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==a?void 0:a.initialBandwidth)/1e3}}),(null==a?void 0:a.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==a?void 0:a.maxBitrate)/1e3}}),(null==a?void 0:a.minBitrate)&&{minBitrate:{audio:-1,video:(null==a?void 0:a.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:Me(Me(Me({},(null==a?void 0:a.initialBandwidth)&&{bandwidth:a.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==a||!a.initialBandwidth},(null==a||null===(F=a.customData)||void 0===F?void 0:F.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(z=null==a?void 0:a.enableLowInitialPlaylist)&&void 0!==z&&z},((null==a?void 0:a.debugConfig)&&(null==a||null===(G=a.debugConfig)||void 0===G?void 0:G.enable)||re)&&{debug:!0}),debug:(null==a?void 0:a.debugConfig)&&(null==a||null===(K=a.debugConfig)||void 0===K?void 0:K.enable)||re||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(Y=a.customData)||void 0===Y?void 0:Y.nativeVideoTracks)&&{nativeVideoTracks:!1})),n($,"poster",ue),n($,"techOrder",le),n($,"chromecast",{requestCustomDataFn:function(n){var t,r,i=m.getPlayer(o),l=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),u=function(e,n,t){var r,i,o,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,h,y,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,P=(null==T?void 0:T.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=P;var E=(null==T?void 0:T.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=E}var I=(null==e||null===(r=e[f])||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=I;var C=null==e||null===(o=e[f])||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.runtime;p.duration=C;var D=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=D;var O=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=O,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,n,l),s=l.find(function(e){return"showing"===e.mode})||null;return we=s?{language:s.language||s.lang||null,label:s.label||null}:null,Me(Me({},u),{},{activeCaption:{enabled:!!s,language:(null==s?void 0:s.language)||(null==s?void 0:s.lang)||null,label:(null==s?void 0:s.label)||null},transmitTrackingUrl:e.trackingUrlManager.get()||null,convivaMetaData:Me({customerKey:(null==a||null===(t=a.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==a||null===(r=a.convivaConfig)||void 0===r?void 0:r.debug)||!1},he.getData())})},modifyLoadRequestFn:function(e){var n,t,r,i,l,a=m.getPlayer(o),u=(null==a?void 0:a.currentSource())||{};!(null===(n=Z)||void 0===n||null===(t=n[ae])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!i.getPlayers()[o]){(null!=a&&a.debugConfig&&null!=a&&null!==(J=a.debugConfig)&&void 0!==J&&J.enable||re)&&i.log.level(ie||"debug");var Se=i(o,ke,function(){var n=t(r.mark(function n(){var t,l,s,c,d,f,p,m,g,h,y,b,w,k,S,T,P,E,I,C,D,O;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return $e(Se),console.log(Se),console.log(i.VERSION),console.log(i.getPlugins()),n.next=6,X(a,Z);case 6:if(null!=a&&a.debugConfig&&null!=a&&null!==(t=a.debugConfig)&&void 0!==t&&t.enable||re){try{i.log.level(ie||"debug")}catch(e){}(w=function(){try{var e,n,t;null==Se||null===(e=Se.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:oe}})}catch(e){}})(),Se.one("loadedmetadata",w)}if(k=null===(l=Z)||void 0===l||null===(s=l[ae])||void 0===s||null===(c=s.liveDetails)||void 0===c?void 0:c.startOverTime,ce&&u.resolve(Me({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),e.inititateBeacon(o,{analyticsCb:null==a?void 0:a.analyticsCb,analyticsEventParams:null==a?void 0:a.analyticsEventParams,userId:null==a?void 0:a.userId}),ge(o,a),Se.on("chromecastConnected",function(){var e=Se.textTracks().tracks_.find(function(e){return("captions"===e.kind||"subtitles"===e.kind)&&"showing"===e.mode}),n=e?{language:e.language||null,label:e.label||null}:null,t=function(){var e=n||we;if(e){var t=Se.textTracks().tracks_.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}),r=t.find(function(n){return e.language&&n.language===e.language})||t.find(function(n){return e.label&&n.label===e.label})||t[0];r&&"showing"!==r.mode&&(r.mode="showing")}};Se.one("loadeddata",function(){return setTimeout(t,0)}),setTimeout(t,1500)}),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),se&&U(o,k),!de||null!=a&&null!==(d=a.customData)&&void 0!==d&&d.disableAds||e.initialiseAdvertisement(o,de,Z),S=e.getSource(Z,o),console.log(S),re&&(console.log("[PLAYER DEBUG] source:",S),console.log("[PLAYER DEBUG] videojs options:",ke)),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),!fe){n.next=25;break}return n.next=22,e.getSGAIEnabledSource(o,Z);case 22:S=n.sent,n.next=29;break;case 25:if(!pe){n.next=29;break}return n.next=28,e.getTransmitEnabledSource(S,Z,o);case 28:S=n.sent;case 29:Se&&(Se.__vlDrmLicenseUrl=qe(S)),S?e.loadVideo(o,S):(u.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),e.handleError(o,"Incompatible / Missing Source")),((null===(f=Z)||void 0===f||null===(p=f[ae])||void 0===p||null===(m=p.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=Z)||void 0===h||null===(y=h[ae])||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0)&&(O=(null===(P=Z)||void 0===P||null===(E=P[ae])||void 0===E||null===(I=E.contentDetails)||void 0===I?void 0:I.closedCaptions)||(null===(C=Z)||void 0===C||null===(D=C[ae])||void 0===D?void 0:D.closedCaptions),T=O.filter(function(e){return"VTT"===e.format}),v.addCaptions(o,T)),null!=a&&a.disableControls?e.disableControls(o):ye(o,Me(Me(Me({},a),ke),{},{liveVideo:ce,isDvrEnabled:se,res:Z,sres:ne})),Le(o,Me(Me(Me({},a),ke),{},{liveVideo:ce}),u,{res:Z,sres:ne});case 34:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function Xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ze=function(e,n){var t=n.resolve,r=n.reject,i=null==e?void 0:e.playerId,o=en(e);Je(i,{res:o},e,{resolve:t,reject:r})},en=function(n){var t,r,i,o,l,a,u,s,c,d,v,f,p,m=null==n?void 0:n.streamingInfo,g=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,h=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,y=(null==n||null===(i=n.streamingInfo)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.url)||null,w=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,k=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],S=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,T=(null==n||null===(c=n.streamingInfo)||void 0===c?void 0:c.macroMap)||[],P=(null==n||null===(d=n.customData)||void 0===d||null===(v=d.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,E=null==n?void 0:n.token,I=e.getDecodedToken(E);null==I||I.site;var C=null==I?void 0:I.siteId,D=(null==n||null===(f=n.customData)||void 0===f||null===(p=f.comscore)||void 0===p?void 0:p.video)||null,O=Qe(Qe({id:"".concat(C,"_external")},!h&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:Qe(Qe(Qe(Qe(Qe({drmEnabled:h,streamingInfo:Qe(Qe({videoAssets:Qe(Qe({},S&&{drmProvider:S}),{},{widevine:null==g?void 0:g.widevine,fairPlay:null==g?void 0:g.fairPlay,playReady:null==g?void 0:g.playReady})},(null==m?void 0:m.isDvrEnabled)&&{isLiveStream:!0}),(null==D?void 0:D.isLiveStream)&&{isLiveStream:null==D?void 0:D.isLiveStream})},P&&{isSSAIEnabled:P}),{},{metadata:T,liveDetails:{isDvrEnabled:null==m?void 0:m.isDvrEnabled},gist:Qe(Qe(Qe({},w&&{videoImageUrl:w}),(null==D?void 0:D.videoId)&&{id:null==D?void 0:D.videoId}),(null==D?void 0:D.videoTitle)&&{title:null==D?void 0:D.videoTitle}),contentDetails:Qe({},(null==k?void 0:k.length)>0&&{closedCaptions:b(k)})},(null==D?void 0:D.runtime)&&{runtime:null==D?void 0:D.runtime}),(null==D?void 0:D.publishDate)&&{publishDate:null==D?void 0:D.publishDate}),(null==D?void 0:D.platform)&&{platform:null==D?void 0:D.platform}),(null==D?void 0:D.series)&&{series:null==D?void 0:D.series}),ads:{preRoll:{adTags:{web:Qe(Qe({},y&&{active:!0}),y&&{url:y})}}}});return D&&(null!=D&&D.isDvrEnabled&&(O.video.liveDetails=Qe(Qe({},O.video.liveDetails),{},{isDvrEnabled:null==D?void 0:D.isDvrEnabled})),null!=D&&D.metadata&&(O.video.metadata=[].concat(b(O.video.metadata),b(null==D?void 0:D.metadata)))),O};function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=t(r.mark(function n(t,i){var o,l,a,u,s,c,v,f,p;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.resolve,u=i.reject,s=null==t?void 0:t.videoId,c=null==t?void 0:t.playerId,v=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:f=n.sent,p=!1===(null==t||null===(o=t.customData)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getVideoDetails(s,f,p).then(function(n){var r,i,o,l,p,m,g,h,y,b,w;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(i=r.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType,e.setCurrentVideo(null==n?void 0:n.data);var k=null==n||null===(l=n.data)||void 0===l||null===(p=l.video)||void 0===p||null===(m=p.gist)||void 0===m?void 0:m.scheduleEndDate,S=null==n||null===(g=n.data)||void 0===g||null===(h=g.video)||void 0===h||null===(y=h.gist)||void 0===y?void 0:y.scheduleStartDate;d.handlePlayerMessage(c,{scheduleEndDate:k,scheduleStartDate:S});var T=null==n?void 0:n.data;if(null!=t&&null!==(b=t.watchHistory)&&void 0!==b&&b.isExternal)T.contentType="video",Je(c,{res:T},t,{resolve:a,reject:u});else if(null!=t&&t.watchHistory&&null!=t&&null!==(w=t.watchHistory)&&void 0!==w&&w.enable&&!v){var P;if((null===(P=t.watchHistory)||void 0===P?void 0:P.saveOffline)||!1){var E,I,C,D=Ce((null===(E=t.watchHistory)||void 0===E?void 0:E.profileId)||"",s,null==t?void 0:t.siteOwner);if(D&&D.length)t.watchHistoryResumeTime=(null===(I=D[0])||void 0===I?void 0:I.watchedTime)||null,t.watchedPercentage=(null===(C=D[0])||void 0===C?void 0:C.watchedPercentage)||null;T.contentType="video",Je(c,{res:T},t,{resolve:a,reject:u})}else e.getVideoInfo(s,f).then(function(e){var n,r,i,o,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,T.contentType="video"}).catch(function(){}).finally(function(){Je(c,{res:T},t,{resolve:a,reject:u})})}else Je(c,{res:T},t,{resolve:a,reject:u})}).catch(function(n){var r,i,o=(null==t||null===(r=t.event)||void 0===r?void 0:r.showScheduleTimer)||!1,l=(null==t||null===(i=t.event)||void 0===i?void 0:i.onCountdownComplete)||null;o&&d.handleCountdownTimer(c,n,l),e.initiateErrorHandling(n,c,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function rn(e,n){return on.apply(this,arguments)}function on(){return(on=t(r.mark(function n(t,i){var o,l,a,u,s,c,d,v;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.resolve,u=i.reject,n.next=3,e.getToken();case 3:s=n.sent,c=null==t?void 0:t.playerId,d=null==t?void 0:t.epg,v=!1===(null==t||null===(o=t.customData)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getLinearChannelDetails(d,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==d?void 0:d.channelId,Je(c,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,c,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function ln(e,n){return an.apply(this,arguments)}function an(){return(an=t(r.mark(function n(t,i){var o,l,a,u,s,c,d;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=i.resolve,a=i.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,c=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(c)),d=null==t||null===(o=t.series)||void 0===o?void 0:o.id,e.getSeriesDetails(d,u).then(function(n){var r,i,o,c=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(i=r.episodes)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.id);e.createSeriesWatchMap(d,u),e.getVideoDetails(f,u).then(function(n){var r,i,o;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(i=r.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType,e.setCurrentVideo(n.data),Je(s,{res:null==n?void 0:n.data,sres:c},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}var un,sn=(un=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n:[];return un.set(e,t),t},get:function(e){return un.get(e)||[]},remove:function(e){un.delete(e)}});function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function dn(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 vn(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)?vn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 o,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,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var fn=function(e){var n=Date.parse(null==e?void 0:e.eventStartUtc),t=Number.isFinite(n)?n/1e3:0;return{start:t+(Number(null==e?void 0:e.startTime)||0),end:t+(Number(null==e?void 0:e.endTime)||0)}},pn=function(e){var n;try{var t,r,i=null==e||null===(t=e.liveTracker)||void 0===t||null===(r=t.seekableEnd)||void 0===r?void 0:r.call(t);if(Number.isFinite(i))return i}catch(e){}var o=null==e||null===(n=e.seekable)||void 0===n?void 0:n.call(e);return o&&o.length?o.end(o.length-1):NaN};function mn(e){var t=null,r=null,i="none",o=function(n){var o=m.getPlayer(e);if(!o)return null;if("pdt"===i&&null!=t)return r+(n-t);var l=pn(o);return Number.isFinite(l)?l-(Date.now()/1e3-n):null},l=function(){var n=m.getPlayer(e),t=n&&n.seekable();return t&&t.length?{start:t.start(0),end:t.end(t.length-1)}:{start:0,end:0}};return{refreshAnchor:function(){var n=m.getPlayer(e);if(n){var o=function(e){try{var n=e.tech(!0),t=n&&n.vhs,r=t&&t.playlists,i=r&&"function"==typeof r.media&&r.media();return i&&i.segments||null}catch(e){return null}}(n),l=n.currentTime()||0;if(o&&o.length){var a,u=null,s=1/0,c=dn(o);try{for(c.s();!(a=c.n()).done;){var d=a.value;if(d&&"number"==typeof d.programDateTime&&"number"==typeof d.start&&Number.isFinite(d.start)){var v=Math.abs(d.start-l);v<s&&(s=v,u=d)}}}catch(e){c.e(e)}finally{c.f()}if(u)return t=u.programDateTime/1e3,r=u.start,void(i="pdt")}t=null,r=null,i="now"}},anchorInfo:function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}({anchorPdtSec:t,anchorPlayerT:r,source:i},l())},chapterToPlayerTime:function(e){return o(fn(e).start)},chapterStartPercent:function(e){return function(e){var n=l(),t=n.start,r=n.end;if(!(r>t))return null;var i=o(e);return null==i||i<t||i>r?null:(i-t)/(r-t)*100}(fn(e).start)},playerTimeToChapterIndex:function(n,o){var l=function(n){var o=m.getPlayer(e);if(!o)return null;if("pdt"===i&&null!=t)return t+(n-r);var l=pn(o);return Number.isFinite(l)?Date.now()/1e3-(l-n):null}(n);if(null==l)return-1;for(var a=-1,u=0;u<o.length;u++){var s=fn(o[u]),c=s.start,d=s.end,v=Math.max(d,c+.001);l>=c&&l<v&&(a=u)}return a},windowBounds:l}}function gn(e){return"livedvr"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).timeMode?mn(e):function(e){var n=function(e){return Number(null==e?void 0:e.startTime)||0},t=function(e){var t=Number(null==e?void 0:e.endTime);return Number.isFinite(t)?t:n(e)};return{chapterToPlayerTime:function(e){return n(e)},chapterStartPercent:function(t){var r=m.getPlayer(e),i=r&&r.duration();if(!Number.isFinite(i)||i<=0)return null;var o,l=n(t);return l<0||l>i?null:100*((o=l/i)<0?0:o>1?1:o)},playerTimeToChapterIndex:function(e,r){for(var i=-1,o=0;o<r.length;o++){var l=n(r[o]),a=Math.max(t(r[o]),l+.001);e>=l&&e<a&&(i=o)}return i},windowBounds:function(){var n=m.getPlayer(e),t=n&&n.duration();return{start:0,end:Number.isFinite(t)?t:0}},refreshAnchor:function(){},anchorInfo:function(){return{source:"vod"}}}}(e)}var hn="chapter-change",yn="chapter-click",bn="chapters-updated";function wn(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=m.getPlayer(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function kn(e){var n=m.getPlayer(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(hn,e)},onChapterClick:function(e){return t(yn,e)},onChaptersUpdated:function(e){return t(bn,e)}}}var Sn="vjs-chapter-marker",Tn="vjs-chapter-preview",Pn=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function En(e,n){var t=n.store,r=n.mapper,o=n.chaptersConfig,l=void 0===o?{}:o,a=n.seek,u=m.getPlayer(e);if(!u)return{render:function(){},reposition:function(){},destroy:function(){}};var s=new Map,c=null,d=-1,v=function(){return!0===(null==l?void 0:l.enable)},f=function(n,t){var o=m.getPlayer(e),l=Pn(o);if(l){var a=function(e){if(c&&c.isConnected)return c;(c=document.createElement("div")).className=Tn;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",c.appendChild(n),c.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",c.appendChild(r),c._time=n,c._label=t,c._pointer=r,e.appendChild(c),c}(l);a._time.textContent=function(e){try{var n=r.chapterToPlayerTime(e);if(null==n||!Number.isFinite(n))return"";if("vod"===("function"==typeof r.anchorInfo?r.anchorInfo():{}).source)return i.formatTime(n,n);var t=(r.windowBounds()||{}).end;if(!Number.isFinite(t))return"";var o=Math.max(0,t-n);return"-".concat(i.formatTime(o,o))}catch(e){return""}}(n),a._label.textContent=(null==n?void 0:n.label)||"",a.classList.add("vjs-chapter-preview--visible");var u="function"==typeof(null==o?void 0:o.el)?o.el():null;u&&u.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var i="function"==typeof(null==t?void 0:t.el)?t.el():null;if(i){var o=i.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=o.left+8+u,d=o.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(a,l,o,t)}},p=function(){c&&c.classList.remove("vjs-chapter-preview--visible");var n=m.getPlayer(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},g=function(n){var t=document.createElement("div");t.className=Sn,t.dataset.segmentId=String(n.segmentId);var i=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=m.parseSvgString(n);r&&t.appendChild(r)}else{var i=document.createElement("img");i.src=n,i.alt="",t.appendChild(i)}return t}(n);return i&&t.appendChild(i),t.addEventListener("click",function(t){t.stopPropagation(),"function"==typeof a&&a(n.segmentId),wn(e,yn,{chapter:n})}),t.addEventListener("mouseenter",function(){var e=r.chapterStartPercent(n);null!=e&&f(n,e)}),t.addEventListener("mouseleave",p),t},h=function(){v()&&0!==s.size&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=s.get(String(e.segmentId));if(n){var t=r.chapterStartPercent(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}}))},y=0,b=function(n){s.forEach(function(e){return e.classList.remove("".concat(Sn,"--active"))});var r=t.get(e),i=n>=0?r[n]:null;if(i){var o=s.get(String(i.segmentId));o&&o.classList.add("".concat(Sn,"--active"))}},w=function(){var n=m.getPlayer(e);if(n){var i=t.get(e),o=r.playerTimeToChapterIndex(n.currentTime()||0,i);-1===o&&Date.now()<y||o!==d&&(d=o,b(o),wn(e,hn,{chapter:o>=0?i[o]:null}))}},k=m.throttle(function(){h(),w()},1e3),S=function(){h(),w()};u.on("timeupdate",k),u.on("seeked",S);var T=!1;try{u.liveTracker&&"function"==typeof u.liveTracker.on&&(u.liveTracker.on("liveedgechange",h),T=!0)}catch(e){}var P=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(P=setInterval(h,500));return{render:function(){var n=m.getPlayer(e),i=Pn(n);i&&(i.querySelectorAll(".".concat(Sn)).forEach(function(e){return e.remove()}),s.clear(),v()&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=g(e);i.appendChild(n),s.set(String(e.segmentId),n)}),h(),b(d),w()))},reposition:h,destroy:function(){try{u.off("timeupdate",k),u.off("seeked",S),T&&u.liveTracker.off("liveedgechange",h)}catch(e){}P&&(clearInterval(P),P=null);var n=Pn(m.getPlayer(e));n&&n.querySelectorAll(".".concat(Sn,", .").concat(Tn)).forEach(function(e){return e.remove()}),s.clear(),c=null},setActiveBySegment:function(n){var r=t.get(e),i=r.findIndex(function(e){return String(e.segmentId)===String(n)});i<0||(y=Date.now()+1500,i!==d&&(d=i,b(i),wn(e,hn,{chapter:r[i]})))}}}var In=new Map,Cn=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},Dn=function(e){var n=In.get(e);if(n)return n;n={mapper:gn(e,{timeMode:"vod"}),markers:null,chaptersConfig:{},timeMode:"vod"},In.set(e,n);var t=m.getPlayer(e);return t&&t.on("dispose",function(){return Rn(e)}),n},On=function(e){var n=In.get(e),t=function(e){var n=In.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=m.getPlayer(e);return t&&Cn(t)?(n.markers=En(e,{store:sn,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return An(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function jn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Dn(e),sn.set(e,n),On(e),wn(e,bn,{chapters:sn.get(e)}),!0}function xn(e){return sn.get(e)}function _n(e){sn.set(e,[]);var n=In.get(e);return null!=n&&n.markers&&n.markers.render(),wn(e,bn,{chapters:[]}),!0}function An(e,n){var t,r,i=m.getPlayer(e),o=Dn(e);if(!i)return!1;var l=sn.get(e).find(function(e){return e.segmentId===n});if(!l)return!1;o.mapper.refreshAnchor();var a=o.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=o.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),i.currentTime(a),null===(t=o.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function Rn(e){var n=In.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),In.delete(e),sn.remove(e)}var Ln,Nn=function(n){var t=n.site,r=n.sseBaseUrl,i=n.sseEndpoint,o=n.debug,l=void 0!==o&&o;return w.createSSETransport({site:t,sseBaseUrl:r,getToken:e.getToken,sseEndpoint:i,onOpen:function(e){var n=e.userId,t=e.endpoint;l&&console.log("SSE Connected:",n,t)},onMessage:function(n){var t,r,i,o,a,u,s,c,v,f;if(l&&console.log("SSE Message:",n),(null===(t=e.getCurrentVideo())||void 0===t||null===(r=t.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)===(null==n||null===(o=n.payload)||void 0===o?void 0:o.id)&&"GAME_STATE_CHANGE"===(null==n?void 0:n.notificationType)){var p=1e3*(null==n||null===(a=n.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.live)||void 0===s?void 0:s.startDateTime),m=1e3*(null==n||null===(c=n.payload)||void 0===c||null===(v=c.states)||void 0===v||null===(f=v.end)||void 0===f?void 0:f.endDateTime);p&&m&&(console.log("Setting schedule timer",p,m),d.scheduleTimerInstanceManager.set({startDateTime:p,endDateTime:m}))}},onReconnectAttempt:function(e){l&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;l&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){l&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){l&&console.error("SSE Error:",e,n)},onClose:function(){l&&console.log("SSE Closed")}})},Mn=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,i=e.sseEndpoint,o=e.debug;if(n){var l=Nn({site:t,sseBaseUrl:r,sseEndpoint:i,debug:void 0!==o&&o});return l._sseBaseUrl=r,l._site=t,l._sseEndpoint=i,l}};function Bn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Un(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:d.onTimeUpdate,getVideoDuration:d.getVideoDuration,onVideoEnded:d.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=t(r.mark(function t(i,o){var l,a,u,s,c,d,v,f,p,g,y,b,w,S,T,P,E,I,C,D,O,j,x,_,A,L,N,M,B,U,V,H;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=3;break}return i({status:!0,msg:"Player already initialised",skipped:!0}),t.abrupt("return");case 3:if(C=(null==n?void 0:n.videoSourceUrl)||!1,D=null==n?void 0:n.asat,O=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,j=null==n?void 0:n.videoId,x=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,_=(null==n?void 0:n.streamingInfo)||!1,window.videoId=j,A=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=18;break}if(sessionStorage.setItem("vlp_token",A),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),A&&!e.isTokenExpired(A)){t.next=17;break}return o({status:!1,msg:"".concat(A?"Token is expired !":"Missing Authorization Token"),response:{token:A}}),t.abrupt("return");case 17:Ln=JSON.parse(atob(A.split(".")[1]));case 18:return window.siteName=null===(u=Ln)||void 0===u?void 0:u.site,window.siteId=null===(s=Ln)||void 0===s?void 0:s.siteId,n.isAnonymousUser=!(null===(c=Ln)||void 0===c||!c.anonymousId),n.siteOwner=(null===(d=Ln)||void 0===d?void 0:d.site)||null,n.userId=(null===(v=Ln)||void 0===v?void 0:v.userId)||null,e.setUserId((null===(f=Ln)||void 0===f?void 0:f.userId)||(null===(p=Ln)||void 0===p?void 0:p.anonymousId)||null),window.watchHistory=n.watchHistory||null,L=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,N=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(M=null==n?void 0:n.errors)&&(window.customErrors=M),window.customData=null==n?void 0:n.customData,h.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!m.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),e.playerConfigManager.setConfig(n),k.relatedVideosManager.reset(),k.relatedVideosManager.set(null==n?void 0:n.relatedVideos),t.next=39,W(n);case 39:N&&R("https://www.googletagmanager.com/gtag/js?id=".concat(N)).then(function(){return e.runGtag(N)}).catch(function(e){}),(B=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(L)))&&B.addEventListener("contextmenu",function(e){return e.preventDefault()}),(U=Mn({enable:null==n||null===(S=n.sse)||void 0===S?void 0:S.enable,site:null==n||null===(T=n.sse)||void 0===T?void 0:T.siteName,sseBaseUrl:null==n||null===(P=n.sse)||void 0===P?void 0:P.sseBaseUrl,sseEndpoint:null==n||null===(E=n.sse)||void 0===E?void 0:E.sseEndpoint,debug:null==n||null===(I=n.sse)||void 0===I?void 0:I.debug}))&&!U.isConnectionActive()&&U.connect(),C?(H={directPlaybackUrl:C,id:V="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},D?e.getVideoDetails(V,A).then(function(e){var t=(null==e?void 0:e.data)||{};Je(L,{res:Un(Un({},t),H)},n,{resolve:i,reject:o})}).catch(function(n){e.initiateErrorHandling(n,L,o,V)}):Je(L,{res:H},n,{resolve:i,reject:o})):_?Ze(n,{resolve:i,reject:o}):x?ln(n,{resolve:i,reject:o}):O?rn(n,{resolve:i,reject:o}):nn(n,{resolve:i,reject:o});case 45:case"end":return t.stop()}},t)}));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:f.getRenditions,skip:e.skip,getPlayer:m.getPlayer,play:e.play,pause:e.pause,detectBrowser:g.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:d.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:v.enableCaptions,disableCaptions:v.disableCaptions,getCaptions:v.getCaptions,playSelectedResolution:p.playSelectedResolution,getSource:e.getSource,setVolume:N,getVolume:M,disableControls:e.disableControls,setPlaybackSpeed:d.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:e.getSsaiEvents,playerEvents:d.playerEvents,onReplay:d.onReplay,relatedVideosManager:k.relatedVideosManager,setChapters:jn,getChapters:xn,clearChapters:_n,seekToChapter:An,getChapterEvents:kn}},exports.initChapters=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,i=n.timeMode,o=void 0===i?"vod":i;n.res;var l=n.chaptersConfig,a=void 0===l?{}:l,u=m.getPlayer(e);if(!u)return!1;Array.isArray(r)&&r.length&&sn.set(e,r);var s=In.get(e);null!=s&&s.markers&&s.markers.destroy();var c={mapper:gn(e,{timeMode:o}),markers:null,chaptersConfig:a||{},timeMode:o,disposed:!1};In.set(e,c);var d=function(){c.disposed||On(e)};return u.one("loadeddata",d),Cn(u)&&d(),u.on("dispose",function(){return Rn(e)}),!0};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./skin-66dce245.js"),l=require("./index-eed20004.js"),i=require("./generic-215f4b2f.js"),n=require("./features-497aa685.js"),r=require("./localisation-56e0a999.js");require("@babel/runtime/helpers/toConsumableArray"),require("video.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/get"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./index-160bf3cf.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("./captions-0ca41a03.js"),require("./renditions-627bdfad.js"),require("./resolution-3af2cf1b.js"),require("@babel/runtime/helpers/assertThisInitialized"),require("./browser-3670a923.js"),require("@viewlift/comscore/index.js"),require("@viewlift/sse"),require("./relatedVideosManager-eeeaf32c.js"),require("axios"),require("md5"),require("js-cookie");var o='<svg xmlns="http://www.w3.org/2000/svg" style="display:none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M7 14H5V19H10V17H7V14ZM5 10H7V7H10V5H5V10ZM17 17H14V19H19V14H17V17ZM14 5V7H17V10H19V5H14Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume" viewBox="0 0 24 24">\n <path d="M3 9.00047V15.0005H7L12 20.0005V4.00047L7 9.00047H3ZM16.5 12.0005C16.5 10.2305 15.48 8.71047 14 7.97047V16.0205C15.48 15.2905 16.5 13.7705 16.5 12.0005ZM14 3.23047V5.29047C16.89 6.15047 19 8.83047 19 12.0005C19 15.1705 16.89 17.8505 14 18.7105V20.7705C18.01 19.8605 21 16.2805 21 12.0005C21 7.72047 18.01 4.14047 14 3.23047Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-pip" viewBox="0 0 24 24">\n <path d="M19 7H11V13H19V7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 20.98 3 20.98H21C22.1 20.98 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19.01H3V4.98H21V19.01Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-captions" viewBox="0 0 18 16">\n <path d="M16.5 1.5V14.5H1.5V1.5H16.5ZM16 0H2C0.89 0 0 0.9 0 2V14C0 15.1 0.89 16 2 16H16C17.1 16 18 15.1 18 14V2C18 0.9 17.1 0 16 0ZM8 7H6.5V6.5H4.5V9.5H6.5V9H8V10C8 10.55 7.55 11 7 11H4C3.45 11 3 10.55 3 10V6C3 5.45 3.45 5 4 5H7C7.55 5 8 5.45 8 6V7ZM15 7H13.5V6.5H11.5V9.5H13.5V9H15V10C15 10.55 14.55 11 14 11H11C10.45 11 10 10.55 10 10V6C10 5.45 10.45 5 11 5H14C14.55 5 15 5.45 15 6V7Z" fill="white"/>\n </symbol>\n </defs>\n</svg>',t='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.99 5V1L6.98999 6L11.99 11V7C15.3 7 17.99 9.69 17.99 13C17.99 16.31 15.3 19 11.99 19C8.67999 19 5.98999 16.31 5.98999 13H3.98999C3.98999 17.42 7.56999 21 11.99 21C16.41 21 19.99 17.42 19.99 13C19.99 8.58 16.41 5 11.99 5Z" fill="white"/>\n<path d="M10.89 16H10.04V12.74L9.03003 13.05V12.36L10.8 11.73H10.89V16Z" fill="white"/>\n<path d="M15.17 14.24C15.17 14.56 15.14 14.84 15.07 15.06C15 15.28 14.9 15.48 14.78 15.63C14.66 15.78 14.5 15.89 14.33 15.96C14.16 16.03 13.96 16.06 13.74 16.06C13.52 16.06 13.33 16.03 13.15 15.96C12.97 15.89 12.82 15.78 12.69 15.63C12.56 15.48 12.46 15.29 12.39 15.06C12.32 14.83 12.28 14.56 12.28 14.24V13.5C12.28 13.18 12.31 12.9 12.38 12.68C12.45 12.46 12.55 12.26 12.67 12.11C12.79 11.96 12.95 11.85 13.12 11.78C13.29 11.71 13.49 11.68 13.71 11.68C13.93 11.68 14.12 11.71 14.3 11.78C14.48 11.85 14.63 11.96 14.76 12.11C14.89 12.26 14.99 12.45 15.06 12.68C15.13 12.91 15.17 13.18 15.17 13.5V14.24ZM14.32 13.38C14.32 13.19 14.31 13.03 14.28 12.9C14.25 12.77 14.21 12.67 14.16 12.59C14.11 12.51 14.05 12.45 13.97 12.42C13.89 12.39 13.81 12.37 13.72 12.37C13.63 12.37 13.54 12.39 13.47 12.42C13.4 12.45 13.33 12.51 13.28 12.59C13.23 12.67 13.19 12.77 13.16 12.9C13.13 13.03 13.12 13.19 13.12 13.38V14.35C13.12 14.54 13.13 14.7 13.16 14.83C13.19 14.96 13.23 15.07 13.28 15.15C13.33 15.23 13.39 15.29 13.47 15.32C13.55 15.35 13.63 15.37 13.72 15.37C13.81 15.37 13.9 15.35 13.97 15.32C14.04 15.29 14.11 15.23 14.16 15.15C14.21 15.07 14.25 14.96 14.27 14.83C14.29 14.7 14.31 14.54 14.31 14.35V13.38H14.32Z" fill="white"/>\n</svg>';exports.initialiseSkin=function(u,a){e.getPlayer(u).addClass("skin_cn_news"),function(l,i){var n,t,u,a,s=e.getPlayer(l);if(!s)return;if(s.el().insertBefore(e.parseSvgString(o),null!==(n=s.el().firstChild)&&void 0!==n?n:null),null===(t=s.controlBar)||void 0===t||t.removeChild("VolumePanel"),null===(u=s.controlBar)||void 0===u||u.addChild("VolumePanel",{inline:!0},1),!(null!==(a=s.controlBar)&&void 0!==a&&a.getChild("PictureInPictureToggle"))){var v,c,d=null===(v=s.controlBar)||void 0===v?void 0:v.getChild("FullscreenToggle"),C=d?s.controlBar.children().indexOf(d):void 0;null===(c=s.controlBar)||void 0===c||c.addChild("PictureInPictureToggle",{},C)}(function(l){var i,n,r,o=(null==l||null===(i=l.controlBar)||void 0===i||null===(n=i.getChild("PlayToggle"))||void 0===n||null===(r=n.el())||void 0===r?void 0:r.firstChild)||null;if(!o)return;var t=e.injectSVG(o,l.paused()?"#vjs-icon-play":"#vjs-icon-pause");l.on("play",function(){return t.setAttributeNS(null,"href","#vjs-icon-pause")}),l.on("pause",function(){return t.setAttributeNS(null,"href","#vjs-icon-play")})})(s),function(l){var i,n,r=(null==l||null===(i=l.controlBar)||void 0===i||null===(n=i.getChild("VolumePanel"))||void 0===n?void 0:n.el())||null,o=null==r?void 0:r.querySelector(".vjs-mute-control .vjs-icon-placeholder");if(!o)return;var t=e.injectSVG(o,l.muted()?"#vjs-icon-mute":"#vjs-icon-volume");l.on("volumechange",function(){var e=l.muted()||0===l.volume();t.setAttributeNS(null,"href",e?"#vjs-icon-mute":"#vjs-icon-volume")})}(s),function(l){var i,n,r,o=(null==l||null===(i=l.controlBar)||void 0===i||null===(n=i.getChild("PictureInPictureToggle"))||void 0===n||null===(r=n.el())||void 0===r?void 0:r.querySelector(".vjs-icon-placeholder"))||null;if(!o)return;e.injectSVG(o,"#vjs-icon-pip")}(s),function(l){var i,n,r=(null==l||null===(i=l.controlBar)||void 0===i||null===(n=i.getChild("SubsCapsButton"))||void 0===n?void 0:n.el())||null,o=null==r?void 0:r.querySelector(".vjs-icon-placeholder");if(!o)return;e.injectSVG(o,"#vjs-icon-captions");var t=function(){for(var e=l.textTracks(),i=!1,n=0;n<e.length;n++){var o=e[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){i=!0;break}}r.classList.toggle("vjs-cc-on",i)};t(),l.textTracks().on("change",t)}(s),function(l){var i,n,r,o=(null==l||null===(i=l.controlBar)||void 0===i||null===(n=i.getChild("FullscreenToggle"))||void 0===n||null===(r=n.el())||void 0===r?void 0:r.firstChild)||null;if(!o)return;var t=e.injectSVG(o,"#vjs-icon-fullscreen");l.on("fullscreenchange",function(){null==t||t.setAttributeNS(null,"href",l.isFullscreen()?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}(s),function(e,l){var i,n=null==e||null===(i=e.controlBar)||void 0===i?void 0:i.getChild("SeekToLive");if(n){var o,t,u=n.el().querySelector(".vjs-seek-to-live-text"),a=r.getLocalisation("liveText")||"LIVE",s=r.getLocalisation("goLiveText")||"GO LIVE",v=function(){var l,i;u&&(u.textContent=null!==(l=e.liveTracker)&&void 0!==l&&null!==(i=l.atLiveEdge)&&void 0!==i&&i.call(l)?a:s)};v(),e.on("timeupdate",v),null===(o=e.liveTracker)||void 0===o||null===(t=o.on)||void 0===t||t.call(o,"liveedgechange",v),n.on("click",function(){if(e.paused())try{e.play()}catch(e){}})}if(null!=l&&l.liveVideo&&null!=l&&l.liveui&&e.liveTracker){var c=function(){return function(e){var l,i,n,r,o=null==e||null===(l=e.controlBar)||void 0===l||null===(i=l.remainingTimeDisplay)||void 0===i?void 0:i.el();if(!o)return;var t=o.querySelector(".vjs-remaining-time-display");null!==(n=e.liveTracker)&&void 0!==n&&null!==(r=n.atLiveEdge)&&void 0!==r&&r.call(n)?o.style.display="none":(o.style.display="flex",t&&(t.innerText=(u=function(e){var l=e.seekable();return l&&l.length>0?Math.max(0,l.end(0)-e.currentTime()):0}(e),a=Math.floor(u/3600),s=Math.floor(u%3600/60),v=Math.floor(u%60),c=function(e){return String(e).padStart(2,"0")},0===a?"".concat(c(s),":").concat(c(v)):"".concat(c(a),":").concat(c(s),":").concat(c(v)))));var u,a,s,v,c}(e)};e.liveTracker.on("liveedgechange",c),e.on("timeupdate",c)}}(s,i)}(u,a),function(r,o){var u,a,s,v,c,d,C=(null==o?void 0:o.liveVideo)||!1,h=(null==o||null===(u=o.res)||void 0===u?void 0:u.contentType)||"video",p=(null==o||null===(a=o.res)||void 0===a||null===(s=a[h])||void 0===s||null===(v=s.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,f=C&&p?"livedvr":"vod";(null!=o&&o.liveui||p)&&n.addRewindButton(r,"CN_NEWS",t);var g=i.playerConfigManager.getConfig();if(null!=g&&null!==(c=g.chaptersConfig)&&void 0!==c&&c.enable||null!=g&&null!==(d=g.chapters)&&void 0!==d&&d.length){var m;!function(l,i){var n,r=null===(n=e.getPlayer(l))||void 0===n?void 0:n.el();if(!r||!i)return;var o=function(e,l){null!=l&&""!==l&&r.style.setProperty(e,l)};o("--vl-chapter-color",i.markerColor),o("--vl-chapter-active",i.markerActiveColor),o("--vl-chapter-hover",i.markerHoverColor),o("--vl-chapter-size",null!=i.markerSize?"".concat(i.markerSize,"px"):null),o("--vl-chapter-opacity",null!=i.markerOpacity?String(i.markerOpacity):null),o("--vl-chapter-tooltip",i.tooltipColor)}(r,null==g||null===(m=g.chaptersConfig)||void 0===m?void 0:m.style),l.initChapters(r,{chapters:(null==g?void 0:g.chapters)||[],timeMode:f,res:null==o?void 0:o.res,chaptersConfig:(null==g?void 0:g.chaptersConfig)||{}})}}(u,a)};
@@ -1 +0,0 @@
1
- import{h as e,a5 as n,S as t,a4 as o,a6 as r}from"./generic-34f78811.js";import{b as s,a as i}from"./index-5e82fbd8.js";import{g as u,h as a}from"./skin-3653c5b3.js";var l,d=0,c=0,v=new Set(["NOT_AIRED","VIDEO_NOT_AVAILABLE","CONTENT_NOT_AVAILABLE"]),f=function(e){return(null==e?void 0:e.response)||e},p=function(e,n){return e&&null!=n&&n.gist&&(e.response=e.response||{},e.response.video=e.response.video||{},e.response.video.gist=n.gist),e},g=function(e){var n,t,o=f(e),r=null==o||null===(n=o.response)||void 0===n?void 0:n.data;return 403===(null==o||null===(t=o.response)||void 0===t?void 0:t.status)||(!!(null!=r&&r.scheduleStartDate&&Number(r.scheduleStartDate)>Date.now())||!(null==r||!r.errorCode||!v.has(r.errorCode)))},h=function(e,n){clearTimeout(d);var t=f(n);i(e,t,null);var o=u(e);o&&!o.paused()&&o.pause()},m=function(e,n,o){var r=o[e];if(function(e){var n,t=null==e||null===(n=e.gist)||void 0===n?void 0:n.scheduleStartDate;return t&&Number(t)>Date.now()}(r))return Promise.reject(function(e){var n,t,o;return{response:{data:{errorMessage:null!=e&&null!==(n=e.gist)&&void 0!==n&&n.scheduleStartDate?"Coming soon":"Content not available",scheduleStartDate:null==e||null===(t=e.gist)||void 0===t?void 0:t.scheduleStartDate,scheduleEndDate:null==e||null===(o=e.gist)||void 0===o?void 0:o.scheduleEndDate,gist:null==e?void 0:e.gist}}}}(r));if(!u(n)){var s={status:!1,msg:"Player not initialised for next episode load",response:{playerId:n,episode:r}};return console.error("[autoNextVideo] player not found before trying next episode load",s),Promise.reject(s)}return t(n,r.id)},D=[],T=function(e){D=e||[]},N=function(t){clearTimeout(d),D=(null==t?void 0:t.content)||[],l=null==t?void 0:t.cb;var i=t.playerId;s(i,function(){var t=u(i);0!==(null==t?void 0:t.currentTime())&&((c=o())>D.length-1||(r(c+1),m(c,i,D).then(function(n){a(c,i),e(n.response),c++,A(n)}).catch(function(e){A(p(e,D[idx])),a(c,i),g(e)?h(i,e):(c++,d=setTimeout(function(){n(i)&&S(c,i,D)},5e3))})))})},S=function e(n,t,o,s){c=n,n>o.length-1||(r(c+1),m(n,t,o).then(function(e){a(c,t),c++,A(e)}).catch(function(r){A(p(r,o[n])),g(r)?h(t,r):setTimeout(function(){a(c,t),c++,e(c,t,o)},5e3)}))},A=function(e){l&&l(e)};export{N as a,S as s,T as u};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{Q as a,N as s}from"./generic-34f78811.js";import{g as c}from"./renditions-620d93b3.js";import{g as d,p as u}from"./skin-3653c5b3.js";import{g as p}from"./localisation-0bf399a1.js";function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?m(Object(r),!0).forEach(function(n){e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var g=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=p("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=u(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=u(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-2ee017b4.js").then(function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))})},b=function(e,t,n){import("./nextEpisodeButton-5c8edd3e.js").then(function(r){var o=r.default,l=d(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)})},j=function(e,t,n){import("./series-74ab47cc.js").then(function(r){var o=r.seriesModule,l=d(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)})},c=0;c<a.length;c++)s(c)})},k=function(e,t){import("./videoSelector-a5e0df6e.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},S=function(e,t){import("./caption-settings-8dfcb482.js").then(function(n){var r,o,l,a,s=n.default,c=d(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},E=function(e,t){import("./settings-icon-c65eb622.js").then(function(n){var r,o,l,a,s=n.default,c=d(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},O=function(e,t){import("./playlist-dd6e58b6.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},I=function(e,t){import("./series-v2-3b5e2560.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},w=function(e,t){import("./multicamv2-5850afc8.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},M=function(e,t){var n=d(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=d(e).el(),n=0,r=d(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e}),window._multiplayer_dbTapHandler=o},x=function(e,t){import("./videoSelector-0713849a.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},N=function(e,t){import("./series-v2-15df8835.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},L=function(e,t){import("./multicamv2-6816cd94.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},_=function(e,t){import("./index-ec92c082.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("MuteButton",r),o.addChild("MuteButton",h({playerId:e},t))})};export{B as a,j as b,b as c,y as d,C as e,E as f,S as g,M as h,g as i,x as j,L as k,O as l,N as m,P as n,k as o,I as p,w as q,_ as r};