@viewlift/player-backup 1.0.122-backup → 1.0.124-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 (118) hide show
  1. package/cjs/autoNextVideo-9c72f12c.js +1 -0
  2. package/cjs/beacon-98bf9c09.js +1 -0
  3. package/cjs/bundle.css +362 -221
  4. package/cjs/caption-settings-0b95ecac.js +1 -0
  5. package/cjs/features-77576c13.js +1 -0
  6. package/cjs/icons-0ea2e662.js +1 -0
  7. package/cjs/index-7d5c2525.js +1 -0
  8. package/cjs/index.js +1 -1
  9. package/cjs/multicamv2-35f4fe48.js +1 -0
  10. package/cjs/multicamv2-e8dbe6c8.js +1 -0
  11. package/cjs/nextEpisodeButton-83ab9e7c.js +1 -0
  12. package/cjs/playlist-545aa012.js +1 -0
  13. package/cjs/renditions-16a49685.js +1 -0
  14. package/cjs/resolution-66c0b424.js +1 -0
  15. package/cjs/series-1da1e675.js +1 -0
  16. package/cjs/series-v2-2416d6cc.js +1 -0
  17. package/cjs/series-v2-ceac1dcb.js +1 -0
  18. package/cjs/settings-icon-88633547.js +1 -0
  19. package/cjs/skin-28b515d6.js +1 -0
  20. package/cjs/skin-2aab707c.js +1 -0
  21. package/cjs/skin-33f8a3fe.js +1 -0
  22. package/cjs/skin-4f845aec.js +1 -0
  23. package/cjs/skin-64911073.js +1 -0
  24. package/cjs/skin-f864e1dc.js +1 -0
  25. package/cjs/util-851e11a6.js +1 -0
  26. package/cjs/videoSelector-1dd1f371.js +1 -0
  27. package/cjs/videoSelector-612abe48.js +1 -0
  28. package/esm/autoNextVideo-9fbc7fb2.js +1 -0
  29. package/esm/beacon-053a96a3.js +1 -0
  30. package/esm/bundle.css +362 -221
  31. package/esm/caption-settings-1e57446a.js +1 -0
  32. package/esm/features-4096b7aa.js +1 -0
  33. package/esm/{icons-3e9a1686.js → icons-79ad4d7d.js} +1 -1
  34. package/esm/index-550870e6.js +1 -0
  35. package/esm/index.js +1 -1
  36. package/esm/multicamv2-93c81b27.js +1 -0
  37. package/esm/multicamv2-d663f7a3.js +1 -0
  38. package/esm/nextEpisodeButton-eda113a7.js +1 -0
  39. package/esm/playlist-1b970ee3.js +1 -0
  40. package/esm/renditions-1bc0052e.js +1 -0
  41. package/esm/resolution-e9e2ae66.js +1 -0
  42. package/esm/series-d7948621.js +1 -0
  43. package/esm/series-v2-2d6660c6.js +1 -0
  44. package/esm/series-v2-484fc1f7.js +1 -0
  45. package/esm/settings-icon-250df9ce.js +1 -0
  46. package/esm/skin-1cb95c10.js +1 -0
  47. package/esm/skin-511e9a37.js +1 -0
  48. package/esm/skin-58452f4b.js +1 -0
  49. package/esm/skin-8230f582.js +1 -0
  50. package/esm/skin-b8c55eac.js +1 -0
  51. package/esm/skin-eaf07041.js +1 -0
  52. package/esm/util-c2a374ed.js +1 -0
  53. package/esm/videoSelector-83093f46.js +1 -0
  54. package/esm/videoSelector-b78dacdf.js +1 -0
  55. package/package.json +4 -4
  56. package/cjs/autoNextVideo-ff42f1a0.js +0 -1
  57. package/cjs/caption-settings-f7372584.js +0 -1
  58. package/cjs/dvr_skin-f7f770ae.js +0 -1
  59. package/cjs/features-c93010e5.js +0 -1
  60. package/cjs/generic-57501058.js +0 -1
  61. package/cjs/icons-515b2da0.js +0 -1
  62. package/cjs/keyboardShortcuts-4340bc6b.js +0 -1
  63. package/cjs/loader-393b838a.js +0 -1
  64. package/cjs/multicam-864bd2bb.js +0 -1
  65. package/cjs/multicam-a41fe4a6.js +0 -1
  66. package/cjs/multicamv2-2ffa7f0c.js +0 -1
  67. package/cjs/multicamv2-76d8530b.js +0 -1
  68. package/cjs/mwebPotrait-3c11d7cf.js +0 -1
  69. package/cjs/mwebPotraitTray-56d6e4d2.js +0 -1
  70. package/cjs/nextEpisodeButton-8dfcec10.js +0 -1
  71. package/cjs/nondvr_skin-ef2cb3b2.js +0 -1
  72. package/cjs/playlist-23f2b341.js +0 -1
  73. package/cjs/renditions-cc71ec8c.js +0 -1
  74. package/cjs/resolution-812052c0.js +0 -1
  75. package/cjs/series-c6ebeb87.js +0 -1
  76. package/cjs/series-v2-07035af9.js +0 -1
  77. package/cjs/series-v2-fd7485a5.js +0 -1
  78. package/cjs/settings-icon-48c25dc4.js +0 -1
  79. package/cjs/skin-2075dd29.js +0 -1
  80. package/cjs/skin-3d8b17fc.js +0 -1
  81. package/cjs/skin-5ceb29b6.js +0 -1
  82. package/cjs/skin-65cf70ff.js +0 -1
  83. package/cjs/skin-65f18828.js +0 -1
  84. package/cjs/skin-cffba054.js +0 -1
  85. package/cjs/util-26ad6aca.js +0 -1
  86. package/cjs/videoSelector-3cdfe35b.js +0 -1
  87. package/cjs/videoSelector-fcdf11eb.js +0 -1
  88. package/esm/autoNextVideo-739861ed.js +0 -1
  89. package/esm/caption-settings-835fcf0b.js +0 -1
  90. package/esm/dvr_skin-9cc1b144.js +0 -1
  91. package/esm/features-0eeb3c65.js +0 -1
  92. package/esm/generic-444bf169.js +0 -1
  93. package/esm/keyboardShortcuts-8624e77b.js +0 -1
  94. package/esm/loader-580278fe.js +0 -1
  95. package/esm/multicam-5e992904.js +0 -1
  96. package/esm/multicam-de741974.js +0 -1
  97. package/esm/multicamv2-2640b4f1.js +0 -1
  98. package/esm/multicamv2-d006cffa.js +0 -1
  99. package/esm/mwebPotrait-3c1805d8.js +0 -1
  100. package/esm/mwebPotraitTray-ff38b447.js +0 -1
  101. package/esm/nextEpisodeButton-5a62159a.js +0 -1
  102. package/esm/nondvr_skin-64be70e5.js +0 -1
  103. package/esm/playlist-b612533a.js +0 -1
  104. package/esm/renditions-11d6f06f.js +0 -1
  105. package/esm/resolution-4c376392.js +0 -1
  106. package/esm/series-4d4d1421.js +0 -1
  107. package/esm/series-v2-4cdbf9b1.js +0 -1
  108. package/esm/series-v2-c7c9616a.js +0 -1
  109. package/esm/settings-icon-81bd8bec.js +0 -1
  110. package/esm/skin-347cf391.js +0 -1
  111. package/esm/skin-48a28d17.js +0 -1
  112. package/esm/skin-57962dea.js +0 -1
  113. package/esm/skin-79e9ebc9.js +0 -1
  114. package/esm/skin-af53462a.js +0 -1
  115. package/esm/skin-b1e2e3ce.js +0 -1
  116. package/esm/util-b468f9d5.js +0 -1
  117. package/esm/videoSelector-0d8b0001.js +0 -1
  118. package/esm/videoSelector-8e258d45.js +0 -1
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"axios";import o from"video.js";import r from"js-cookie";import a from"ua-parser-js";import l from"@babel/runtime/helpers/toConsumableArray";var d={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function u(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function s(e){window.dataLayer=window.dataLayer||[],u("js",new Date),u("config",e)}function c(e,n){u("event",e,n)}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 f={name:"@viewlift/player8",version:"1.0.110",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"^8.21.1","videojs-contrib-ads":"^7.5.2","videojs-contrib-eme":"^5.5.1","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=f.version;var p=function(e,n){var t,o,r,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?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})})):i({url:F(),params:m({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":f.version},withCredentials:!0})},w=function(e,n){var t,o,r,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?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})})):i({url:S()+d.getLinearChannelDetails,params:m(m(m(m(m({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n}})},g=function(e,n){var t,o,r=JSON.parse(atob(n.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?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})})):i({url:S()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},E=function(){var e=n(t.mark((function e(n,o){var r,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return a={siteOwner:null==n?void 0:n.siteOwner,userId:null==n?void 0:n.userId,videoId:null==n?void 0:n.videoId,watchedPercentage:null==n?void 0:n.watchedPercentage,watchedTime:null==n?void 0:n.watchedTime},e.abrupt("return",i({url:O(),method:"POST",headers:{Authorization:r,"x-api-key":n.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=o){e.next=10;break}return e.abrupt("return",i({url:D(),method:"POST",headers:{Authorization:r},data:m({},n),params:m({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),I=function(e,n){var t,o,r=(null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(n.split(".")[1])),u=(null==d?void 0:d.site)||null;return i({method:"GET",url:b(e),params:{site:u},headers:{Authorization:n,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return i({method:"GET",url:_(e,v),headers:{Authorization:n,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},h=function(e){var n,t;if("v1"==((null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1"))return i({method:"GET",url:y(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var o=e.videoId;return i({method:"GET",url:T(o),headers:{Authorization:e.token},timeout:15e3})},T=function(e){return S()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV2,"/").concat(e)},y=function(){return S()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV1)},b=function(e){return S()+"".concat(null==d?void 0:d.getVideoInfoV1,"/").concat(e)},_=function(e,n){return S()+"".concat(null==d?void 0:d.getVideoInfoV2,"/").concat(n,"/").concat(e)},O=function(){return S()+"".concat(null==d?void 0:d.saveWatchHistoryV1)},D=function(){return S()+"".concat(null==d?void 0:d.saveWatchHistoryV2)},F=function(){var e,n,t,i,o=S()+"".concat(null==d?void 0:d.getVideoDetails);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":o},S=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==d?void 0:d.apiBaseUrl)},P=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},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var V,R,C,W,N,k,B=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),o=S(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),x=null,j=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"))||!P(n)){e.next=6;break}return x||(x=B().then((function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&L().set(r),o||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){x=null}))),e.abrupt("return",x);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=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},U=function(e,n,t){return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:n},withCredentials:!0})},H=function(e){R=e},z=function(){return R},G=function(e){V=e},Y=function(){return V},q=function(){return C},J=function(e){console.log("set",e),C=e},K=function(e){N=e},X=function(){return N},Q=function(e){W=new Map,e.map((function(e,n){W.set(e.id,n)}))},Z=function(e){if(W){var n=W.get(e);J(n+1)}},$=(k=0,{set:function(e){e>=0&&(k=e)},get:function(){return k}}),ee=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),o.appendChild(r),i.append(o)}}},ne=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var te=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},ie=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};function oe(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?oe(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):oe(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}window._deviceInfo=a(navigator.userAgent);var ae=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},le=function(e){var n=de(e,"video.tags",[]),t=de(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},de=function(e,n,t){for(var i=0,o=(n=n.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[n[i]]}return e||t},ue=function(){var e,n,t,i,o,a,l,d,u,s,c,v,m,f,p,w,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=arguments.length>1?arguments[1]:void 0,I=arguments.length>2?arguments[2]:void 0,h=(null==I?void 0:I.contentType)||"video",T=null==I||null===(e=I[h])||void 0===e?void 0:e.metadata,y=Ge(E);if(!g.includes("VIEWLIFT_"))return g;var b=window.getComputedStyle(document.getElementById(E),null),_=Math.trunc(b.getPropertyValue("height").slice(0,-2)),O=Math.trunc(b.getPropertyValue("width").slice(0,-2)),D="linearchannel"===h?null==I||null===(n=I.linearchannel)||void 0===n||null===(t=n.channels)||void 0===t||null===(i=t.find((function(e){return(null==e?void 0:e.id)===(null==I?void 0:I.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:de(I,"video.gist.id",""),F=re(re({},ve(T)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:ae(O,_),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:de(I,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:de(I,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:de(I,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==y||null===(l=y.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==y||null===(d=y.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:le(I),VIEWLIFT_MEDIA_ID:D,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(de(I,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:D,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+de(I,"video.gist.permalink","")),VIEWLIFT_CONSENT:r.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:de(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.site)||void 0===c?void 0:c.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:de(null===(v=window)||void 0===v||null===(m=v.app_data)||void 0===m||null===(f=m.site)||void 0===f?void 0:f.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*de(I,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:de(I,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:D,VIEWLIFT_CONTENT_TITLE:de(I,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:de(I,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:de(I,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ce(),VIEWLIFT_SEASON_NUMBER:se(),VIEWLIFT_CONTENT_TAGS:le(I)},null===(p=window)||void 0===p||null===(w=p.customData)||void 0===w?void 0:w.macros);for(var S in F){var P=new RegExp(S,"g");g=g.replace(P,F[S])}return g},se=function(){var e=$.get();return e>=0?e+1:1},ce=function(){var e,n,t,i=Y(),o=z(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=$.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)===r}));return l>=0?l+1:1},ve=function(e){var n,t,i,o,r,a,l={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var u=(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,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return u||s?(ie()?u?l=re(re({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(l=re(re({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?l=re(re({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(l=re(re({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?l=re(re({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):s&&(l=re(re({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=ie()?re(re({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):re(re({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=re(re({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=ie()?re(re({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):re(re({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},me=function(e,n){var t,i,o,r,a,l,d,u,s,c,v,m,f,p=(null==e?void 0:e.contentType)||"video",w=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,g=null==e||null===(i=e[p])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[p])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,I=(null==e||null===(l=e[p])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[p])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var h=(null==e||null===(v=e[p])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(f=m.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return pe(E);if(w){var T=we(g,n);return T.src=ue(T.src,n,e),T}if("Safari"!==te()&&h)return fe(g);if(I){var y=pe(g);return y.src=ue(y.src,n,e),y}if(null!=g&&g.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(g);return b.src=ue(b.src,n,e),b}return null},fe=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},pe=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},we=function(e,n){var t=e.fairPlay,i=e.widevine,r=e.playReady,a=te();if(Ge(n),"Safari"===a){var l=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};console.log("🔐 Requesting FairPlay Certificate...",i),o.xhr(i,(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,i,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(t);return ge(n),l}var d={src:i.url,type:"application/dash+xml"};return ge(n),d.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}},d};var ge=function(e){var n=Ge(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==te()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ee=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 o=t.split(".com")[1]||"";return{src:o?"".concat(n).concat(o):t,type:i}},Ie=function(e,n){var t,i,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(t=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===t||null===(i=t[0])||void 0===i||null===(o=i.style)||void 0===o||o.setProperty("display","flex"));for(var r=Ge(e).textTracks(),a=0;a<r.length;a++){var l=r[a];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=n||(l.mode="showing")}},he=function(e,n){for(var t=Ge(e).textTracks(),i=0;i<t.length;i++){var o=t[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==n||(o.mode="hidden")}},Te=function(e){var n,t=Ge(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},ye=function(e){var n=Ge(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))},be=function(e,n){var t=Ge(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},_e=!1,Oe=function(e,n,t){var i=ue(n,e,t),o=Ge(e);n&&window.google&&(o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,n){var t,i,o,r=Ge(e);if(null!==r.el_){_e=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),_e&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,n,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.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"),r.one(d,(function(){u&&r.ima.initializeAdDisplayContainer()}));var s=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;r.one("ads-ad-started",(function(){s&&s({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){s&&s({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){s&&s({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i))},De=["live","carousel","V2","defaultV2","multiplayer","minimalist","VL_ONE"],Fe=function(e){return!De.includes(e)},Se=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},Pe=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},Ae=function(e){return Pe(e)},Le=function(e){var n=l(document.querySelectorAll("[video-idx]"));console.log(n),n.map((function(n){var t=n.parentNode,i=n.getAttribute("video-idx");t.style.background=i==e?"gray":"none"}))},Ve=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()}))},Re=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},Ce="",We=function(e,n){var t,i=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&Ce!==t){var o=window.getComputedStyle(i,null).getPropertyValue("height");n&&(n.style.height="".concat(o)),Ce=t}}(e,n)};window._orientationChangeHandler=i;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){i()}),100)}))},Ne=function(e,n){var t,i=Ge(e),o=Ge(e).el(),r=new ResizeObserver((function(){var i;null!==(i=n.classList)&&void 0!==i&&i.contains("hidden")||(t&&clearTimeout(t),t=setTimeout((function(){ke(e,n)}),200))}));r.observe(o),i.on("dispose",(function(){r.disconnect()})),i.on("fullscreenchange",(function(){setTimeout((function(){ke(e,n)}),50)}))},ke=function(e,n){var t;if(n){var i=document.getElementById(e),o=null===(t=window.getComputedStyle(i,null))||void 0===t?void 0:t.height;n.style.height!==o&&(n.style.height="".concat(o))}};function Be(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 xe=function(e){o(e).play()},je=function(e){o(e).pause()},Me=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Ue=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},He=function(e){return!!o.getPlayer("".concat(e))},ze=function(e){return o(e).paused()},Ge=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},Ye=function(){var e=n(t.mark((function e(n,i){var o,r,a,l=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=l.length>2&&void 0!==l[2]&&l[2],e.next=3,j();case 3:return r=e.sent,a=Ge(n),e.abrupt("return",new Promise((function(e,t){w(i,r).then((function(t){var r=null==t?void 0:t.data;window.sid=on(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=me(r,n);H(r),l&&o?(Qe(n,l),a.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){t({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)}}(),qe=function(){var e=n(t.mark((function e(n,i,o){var r,a,l,d,u,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:return d=e.sent,(Y()||null)&&Z(i),u=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&I(i,d).then((function(e){var n,t,i,o,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,t){p(i,d).then((function(i){var o,r,a,l,d,c,v,m,f,p,w=null==i?void 0:i.data,g=(null==w||null===(o=w.video)||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;H(i.data);var E=(null==w||null===(a=w.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(d=l.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==w||null===(v=w.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(f=m.adTags)||void 0===f||null===(p=f.web)||void 0===p?void 0:p.url);E&&Oe(n,E,w);var I=me(w,n);if(I){var h,T,y,b,_,O,D,F,S,P,A,L,V,R,C=(null==w||null===(h=w.video)||void 0===h||null===(T=h.gist)||void 0===T?void 0:T.videoImageUrl)||(null==w||null===(y=w.video)||void 0===y||null===(b=y.gist)||void 0===b||null===(_=b.imageGist)||void 0===_?void 0:_.r16x9),W=Ge(n);if(W.poster(C),Qe(n,I),W.on("loadstart",(function(){g&&e({status:!0,msg:"Video Loaded",response:w})})),W.on("loadeddata",(function(){ne(),e({status:!0,msg:"Video Loaded",response:w})})),W.one("play",(function(){u&&s<95&&setTimeout((function(){W.currentTime(u)}),0)})),W.one("error",(function(){var e;t({status:!1,msg:(null==W||null===(e=W.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==w||null===(O=w.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(F=D.closedCaptions)||void 0===F?void 0:F.length)>0||(null==w||null===(S=w.video)||void 0===S||null===(P=S.closedCaptions)||void 0===P?void 0:P.length)>0)A=((null==w||null===(L=w.video)||void 0===L||null===(V=L.contentDetails)||void 0===V?void 0:V.closedCaptions)||(null==w||null===(R=w.video)||void 0===R?void 0:R.closedCaptions)).filter((function(e){return"VTT"===e.format})),be(n,A);else ye(n)}else ee(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){Ze(e,n,t,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(n,t,i){return e.apply(this,arguments)}}(),Je=function(e,n,t){var i=Ge(e);return i.src(n),new Promise((function(e,n){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Ke=function(e){var n=Ge(e);if(Xe(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Xe=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()},Qe=function(e,n){var t=Ge(e);t&&t.src(n)},Ze=function(n,t,i,o){var r,a,l,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);He(t)&&ee(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Be(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},o&&{videoId:o}))},$e=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 o=n.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};function en(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 nn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?en(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):en(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var tn=function(){var e,n,t,i,o,r,a,l=z();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===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function on(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function rn(){var e=window.sessionStorage.getItem("uid");return e||(e=on(),window.sessionStorage.setItem("uid",e),e)}function an(){return ln.apply(this,arguments)}function ln(){return(ln=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,j();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)}window.initialise=function(e){window.sid=on(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",(function(){var t,i,o,r=Math.floor(e.currentTime());c(r?"FAILED_TO_START":"DROPPED_STREAM",nn({pfm:window.platform,uid:rn(),vid:tn(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var n,t,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),c("PLAY",nn({pfm:window.platform,uid:rn(),vid:tn(),videoPosition:Math.floor(e.currentTime())},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:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(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=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var o,r,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"))c("BUFFERING",nn({pfm:window.platform,uid:rn(),vid:tn(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var n,t,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",nn({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:rn(),vid:tn()},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:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var n,t,i,o,r,a;c("AD_REQUEST",nn({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:rn(),vid:tn(),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}),c("AD_IMPRESSION",nn({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:rn(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:tn()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var n=[];e.on("timeupdate",(function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(dn(n,r,a)){var l=Math.round(t-a);if(isFinite(l))return l}}}))()};var dn=function(e,n,t){return e>=n&&e<=t};function un(e){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=Ge(e);window.initialise(n),window.firstFrame(n),n.on("loadedmetadata",(function(){window.endFirstFrame(n)}))}}window.fireEvent=function(){var e=n(t.mark((function e(n){var o,r,a,l,d,u,s,c,v,m,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=nn,e.t1=nn,e.t2=nn({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=rn(),e.t5=tn(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=n.videoPosition,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:"",e.t17=!0===n.isAdEvent?(t=n.adPosition)?String(t):"":"",e.next=20,an();case 20:return e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=n.ttFirstFrame,e.t23=n.bitrate,e.t24=n.resHeight,e.t25=n.resWidth,e.t26=n.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==n?void 0:n.duration)&&{duration:n.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),m=[e.t31],e.next=37,j();case 37:f=e.sent,i({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:f},contentType:"application/x-www-form-urlencoded",dataType:"text",data:m}).catch((function(e){console.error(e)}));case 39:case"end":return e.stop()}var t}),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}}};export{Ve as $,Fe as A,s as B,p as C,I as D,Ze as E,M as F,L as G,P as H,Re as I,Oe as J,Ee as K,be as L,un as M,g as N,w as O,$ as P,G as Q,Pe as R,Ae as S,ie as T,q as U,Y as V,J as W,Le as X,ze as Y,ye as Z,Se as _,z as a,ke as a0,We as a1,Ne as a2,Q as a3,Z as a4,me as b,H as c,te as d,ne as e,X as f,Ge as g,ee as h,h as i,K as j,Je as k,Qe as l,Me as m,je as n,He as o,xe as p,qe as q,Ue as r,E as s,Ye as t,Ke as u,Ie as v,he as w,Te as x,$e as y,U as z};