@viewlift/player-backup 2.0.328-backup → 2.0.329-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 (62) hide show
  1. package/cjs/{autoNextVideo-48c26383.js → autoNextVideo-e313efcf.js} +1 -1
  2. package/cjs/bundle.css +531 -531
  3. package/cjs/{features-73714179.js → features-f6bc37dc.js} +1 -1
  4. package/cjs/{generic-3f85a6cc.js → generic-29a1821f.js} +1 -1
  5. package/cjs/{index-51f2472f.js → index-1ae0c7be.js} +1 -1
  6. package/cjs/index-5da999ba.js +1 -0
  7. package/cjs/{index-8c1ab404.js → index-a451525b.js} +1 -1
  8. package/cjs/{index-467c2357.js → index-eff6f3d1.js} +1 -1
  9. package/cjs/index.js +1 -1
  10. package/cjs/{multicamv2-40b13aa4.js → multicamv2-02516abf.js} +1 -1
  11. package/cjs/{multicamv2-44233377.js → multicamv2-e3fac68a.js} +1 -1
  12. package/cjs/{nextEpisodeButton-41a72963.js → nextEpisodeButton-2e51b74f.js} +1 -1
  13. package/cjs/{playlist-9e61bd0f.js → playlist-ac3e0128.js} +1 -1
  14. package/cjs/{series-f4c17edf.js → series-1b46cc76.js} +1 -1
  15. package/cjs/{series-v2-ca04e855.js → series-v2-1a02ad02.js} +1 -1
  16. package/cjs/{series-v2-7dbdae1c.js → series-v2-5ddf1024.js} +1 -1
  17. package/cjs/{skin-69deac36.js → skin-3926faa3.js} +1 -1
  18. package/cjs/{skin-148324d6.js → skin-4eb6cf11.js} +1 -1
  19. package/cjs/{skin-2a7a160e.js → skin-5ab5098d.js} +1 -1
  20. package/cjs/skin-7786a20f.js +1 -0
  21. package/cjs/{skin-c58c2d44.js → skin-8b20ce13.js} +1 -1
  22. package/cjs/{skin-42cf6ae4.js → skin-b2cf11ad.js} +1 -1
  23. package/cjs/{skin-e3a75bd5.js → skin-bf241109.js} +1 -1
  24. package/cjs/{skin-15543330.js → skin-cc89ecae.js} +1 -1
  25. package/cjs/{skin-64081592.js → skin-e70cd7e5.js} +1 -1
  26. package/cjs/{skin-fbb54be6.js → skin-e92a1f28.js} +1 -1
  27. package/cjs/{videoSelector-f018ca53.js → videoSelector-bf5e6adc.js} +1 -1
  28. package/cjs/{videoSelector-a13b5d80.js → videoSelector-c45c25d6.js} +1 -1
  29. package/esm/{autoNextVideo-8dd79ed6.js → autoNextVideo-11cfc2a5.js} +1 -1
  30. package/esm/bundle.css +531 -531
  31. package/esm/{features-d065e47f.js → features-6552142d.js} +1 -1
  32. package/esm/generic-15a83d12.js +1 -0
  33. package/esm/{index-4a95669c.js → index-2106e328.js} +1 -1
  34. package/esm/index-480542e3.js +1 -0
  35. package/esm/{index-7db11ad8.js → index-a3b754ff.js} +1 -1
  36. package/esm/{index-8a99e78b.js → index-a73b8941.js} +1 -1
  37. package/esm/index.js +1 -1
  38. package/esm/{multicamv2-3f17bc42.js → multicamv2-3e1be80d.js} +1 -1
  39. package/esm/{multicamv2-9a57666e.js → multicamv2-466631dc.js} +1 -1
  40. package/esm/{nextEpisodeButton-b2b192a3.js → nextEpisodeButton-184d31b1.js} +1 -1
  41. package/esm/{playlist-9c446200.js → playlist-70071d11.js} +1 -1
  42. package/esm/{series-22d976f7.js → series-b3a494c0.js} +1 -1
  43. package/esm/{series-v2-4a1c0d17.js → series-v2-2720d2ea.js} +1 -1
  44. package/esm/{series-v2-ac9023d0.js → series-v2-7a9438a7.js} +1 -1
  45. package/esm/skin-4d2f88c0.js +1 -0
  46. package/esm/{skin-9474cdd8.js → skin-531204df.js} +1 -1
  47. package/esm/{skin-136b3f83.js → skin-5e02a78d.js} +1 -1
  48. package/esm/{skin-a82bf87c.js → skin-82a118b7.js} +1 -1
  49. package/esm/{skin-2e154857.js → skin-84d8d9de.js} +1 -1
  50. package/esm/{skin-1b850562.js → skin-a0a2cbe4.js} +1 -1
  51. package/esm/{skin-2f722d43.js → skin-ae467337.js} +1 -1
  52. package/esm/{skin-d7ae572c.js → skin-cd0cc0a7.js} +1 -1
  53. package/esm/{skin-f91442fa.js → skin-d7b60630.js} +1 -1
  54. package/esm/{skin-02a986f0.js → skin-dbffdbc0.js} +1 -1
  55. package/esm/{videoSelector-bdf6f403.js → videoSelector-8a5ec98b.js} +1 -1
  56. package/esm/{videoSelector-66433721.js → videoSelector-fd7a3b03.js} +1 -1
  57. package/package.json +1 -1
  58. package/cjs/index-84cce26a.js +0 -1
  59. package/cjs/skin-6ce0f4b5.js +0 -1
  60. package/esm/generic-e783464c.js +0 -1
  61. package/esm/index-5d92eaa3.js +0 -1
  62. package/esm/skin-f563c426.js +0 -1
@@ -1 +1 @@
1
- import{f as l,r as i,d as e,e as n,j as o,k as t,l as r,m as s}from"./features-d065e47f.js";import{e as a}from"./icons-262bef63.js";import{g as d,p as u,e as v}from"./skin-3653c5b3.js";import{g as C}from"./renditions-620d93b3.js";import"@babel/runtime/helpers/toConsumableArray";import{a as c,b as p}from"./index-7db11ad8.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import{r as h}from"./relatedVideosManager-81661348.js";import{a7 as m,a8 as f,e as g,a9 as b,m as L}from"./generic-e783464c.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-8dd79ed6.js";import"./index-8a99e78b.js";import"@babel/runtime/helpers/typeof";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-92c899aa.js";import"@viewlift/comscore/index.js";function B(B,y){d(B).addClass("skin_news_live"),function(i,e){var n=d(i);n&&n.on("loadeddata",function(){var n,o,t,r,s,a,d,u,v,p;(null===(n=C(i))||void 0===n?void 0:n.length)>0&&0!=(null==e||null===(o=e.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(i,e);var m=(null===(t=h.get())||void 0===t||null===(r=t.content)||void 0===r?void 0:r.length)>0;if(!(null!=e&&null!==(s=e.series)&&void 0!==s&&s.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(u=d.appcmsMain)&&void 0!==u&&null!==(v=u.features)&&void 0!==v&&v.auto_play||m)||null!=e&&e.liveVideo){if(!(null!=e&&e.liveVideo||null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable)){var f;f=h.subscribe(function(l){var n;(null==l||null===(n=l.content)||void 0===n?void 0:n.length)>0&&(c(i,e),f&&f())})}}else c(i,e)})}(B,y),function(l,i){var e,n,o,t,r,s,a,C,c,p,h,m,f,g,b,L,B,y,j,w,E,V,x,M,k,S,T,Z,A,H,P=d(l);null===(e=P.controlBar)||void 0===e||e.removeChild("PlayToggle");var _=null==P||null===(n=P.controlBar)||void 0===n||null===(o=n.el())||void 0===o||null===(t=o.children)||void 0===t?void 0:t[2],N=document.createElement("div");N.className="vjs-play-toggle-container",N.append(null==P||null===(r=P.controlBar)||void 0===r||null===(s=r.addChild("PlayToggle"))||void 0===s?void 0:s.el()),null==P||null===(a=P.controlBar)||void 0===a||null===(C=a.el())||void 0===C||C.insertBefore(N,_),null==P||null===(c=P.controlBar)||void 0===c||c.removeChild("VolumePanel"),null==P||null===(p=P.controlBar)||void 0===p||p.addChild("VolumePanel",{inline:!0},1);var q=null==P||null===(h=P.controlBar)||void 0===h?void 0:h.getChild("ProgressControl");null===(m=P.controlBar)||void 0===m||m.removeChild("SeekToLive"),null===(f=P.controlBar)||void 0===f||f.addChild("SeekToLive",{inline:!1},2);var I=null===(g=P.controlBar)||void 0===g||null===(b=g.getChild("SeekToLive"))||void 0===b?void 0:b.el();I&&(I.onclick=function(){if(P.paused())try{P.play()}catch(l){console.log(l)}});var O=document.createElement("div");O.className="custom-spaced-progress-bar",q&&O.append(q.el());null===(L=P.controlBar)||void 0===L||null===(B=L.el())||void 0===B||B.append(O);var R='<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="#EBEBEB"/>\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\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\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\n <symbol id="vjs-icon-volume1" 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="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" 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="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" 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="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\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 </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\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="inherit"/>\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="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';P.el().insertBefore(u(R),null!==(y=P.el().firstChild)&&void 0!==y?y:null);var D=(null==P||null===(j=P.controlBar)||void 0===j||null===(w=j.getChild("PlayToggle"))||void 0===w||null===(E=w.el())||void 0===E?void 0:E.firstChild)||null;if(D){D.style.height="18px",D.style.width="18px";var F=v(D,P.paused()?"#vjs-icon-play":"#vjs-icon-pause");P.on("pause",function(){return F.setAttributeNS(null,"href","#vjs-icon-play")}),P.on("play",function(){return F.setAttributeNS(null,"href","#vjs-icon-pause")})}var G=(null==P||null===(V=P.controlBar)||void 0===V||null===(x=V.getChild("FullscreenToggle"))||void 0===x||null===(M=x.el())||void 0===M?void 0:M.firstChild)||null;if(G){G.style.height="24px",G.style.width="24px";var z=v(G,"#vjs-icon-fullscreen");P.on("fullscreenchange",function(){var l=P.isFullscreen_;null==z||z.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var J=(null==P||null===(k=P.controlBar)||void 0===k||null===(S=k.getChild("VolumePanel"))||void 0===S?void 0:S.el())||null;if(J){var K=J.querySelector(".vjs-mute-control .vjs-icon-placeholder");K.classList.add("vjs-svg-icon"),K.style.height="24px",K.style.width="24px";var Q=v(K,P.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");P.on("volumechange",function(l){var i=P.volume();console.log(i,P.muted()),0==i||P.muted()?Q.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?Q.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?Q.setAttributeNS(null,"href","#vjs-icon-volume2"):Q.setAttributeNS(null,"href","#vjs-icon-volume3")})}var U=(null==P||null===(T=P.controlBar)||void 0===T||null===(Z=T.getChild("PictureInPictureToggle"))||void 0===Z?void 0:Z.el())||null;if(U){var W=null==U?void 0:U.querySelector(".vjs-icon-placeholder");W.style.height="25px",W.style.width="25px";var X=v(W,"#vjs-icon-pip");P.on("enterpictureinpicture",function(){X.setAttributeNS(null,"href","#vjs-icon-pip")})}var Y=(null==P||null===(A=P.controlBar)||void 0===A||null===(H=A.getChild("SubsCapsButton"))||void 0===H?void 0:H.el())||null;if(Y){var $=Y.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");$.classList.add("vjs-svg-icon"),$.style.height="29px",$.style.width="29px";var ll=v($,"#vjs-icon-caps");ll.setAttributeNS(null,"href","#vjs-icon-captions-off"),P.textTracks().on("change",function(l){for(var i=P.textTracks(),e=!1,n=0;n<i.length;n++){var o=i[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){e=!0;break}}e?ll.setAttributeNS(null,"href","#vjs-icon-captions"):ll.setAttributeNS(null,"href","#vjs-icon-captions-off")})}P&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(P.liveTracker.on("liveedgechange",function(){nl(P)}),P.on("timeupdate",function(){nl(P)}));function il(l){var i=Math.floor(l/3600),e=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===i?"".concat(o(e),":").concat(o(n)):"".concat(o(i),":").concat(o(e),":").concat(o(n))}function el(l){var i=l.seekable();if(i&&i.length>0){var e=i.end(0);return Math.max(0,e-l.currentTime())}return 0}function nl(l){var i,e,n=l.liveTracker.atLiveEdge(),o=el(l),t=null==l||null===(i=l.controlBar)||void 0===i||null===(e=i.remainingTimeDisplay)||void 0===e?void 0:e.el();if(t){var r=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",r&&(r.innerText=il(o)))}}}(B,y),function(l,u){var v,C,c,p,B,y,j,w,E,V=(null==u?void 0:u.liveVideo)||!1,x=(null==u||null===(v=u.res)||void 0===v?void 0:v.contentType)||"video",M=(null==u||null===(C=u.res)||void 0===C||null===(c=C[x])||void 0===c?void 0:c.isSSAIEnabled)||!1,k=(null==u?void 0:u.skin_settings)||{};null==k||k.slowMoBtn;var S=(null==u||null===(p=u.customData)||void 0===p?void 0:p.ads)||{};i(l),null!=k&&k.skipBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=k&&k.rewindBtn&&(0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&n(l,"VL_ONE",a());var T,Z=h.get();(null==Z||null===(B=Z.content)||void 0===B?void 0:B.length)>0&&o(l,Z);T=h.subscribe(function(i){var e,n,t=d(l);(null==t||null===(e=t.controlBar)||void 0===e||!e.getChild("videoSelector"))&&(null==i||null===(n=i.content)||void 0===n?void 0:n.length)>0&&(o(l,i),T&&T())}),(null==u||null===(y=u.streams)||void 0===y?void 0:y.length)>1&&t(l,null==u?void 0:u.streams);(null==u||null===(j=u.playlist)||void 0===j||null===(w=j.content)||void 0===w?void 0:w.length)>0&&r(l,null==u?void 0:u.playlist);null!=u&&null!==(E=u.series)&&void 0!==E&&E.enable&&s(l,u);if(M&&V&&"TRANSMIT"==(null==S?void 0:S.liveAdSticherProvider)&&null!=S&&S.liveAdClientSideTracking)m(l,u);else if("MEDIA_TAILOR"==(null==S?void 0:S.vodAdSticherProvider)&&null!=S&&S.vodAdClientSideTracking&&M)if(V)f(l);else{var A,H=null;if(null!=u&&null!==(A=u.series)&&void 0!==A&&A.enable){var P,_,N,q,I,O=null===(P=g())||void 0===P||null===(_=P.video)||void 0===_||null===(N=_.gist)||void 0===N?void 0:N.id,R=L(),D=(null==R?void 0:R.get(O))||{t:0,p:0},F=D.t,G=D.p;"function"==typeof(null===(q=window)||void 0===q||null===(I=q.watchHistory)||void 0===I?void 0:I.cb)&&window.watchHistory.cb({watchedTime:F}),G<95&&(H=F)}else{var z=u.watchHistoryResumeTime;u.watchedPercentage<95&&(H=z)}b(l,H)}}(B,y),p(B,y)}export{B as initialiseSkin};
1
+ import{f as l,r as i,d as e,e as n,j as o,k as t,l as r,m as s}from"./features-6552142d.js";import{e as a}from"./icons-262bef63.js";import{g as d,p as u,e as v}from"./skin-3653c5b3.js";import{g as C}from"./renditions-620d93b3.js";import"@babel/runtime/helpers/toConsumableArray";import{a as c,b as p}from"./index-a3b754ff.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import{r as h}from"./relatedVideosManager-81661348.js";import{a7 as m,a8 as f,e as g,a9 as b,m as L}from"./generic-15a83d12.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-11cfc2a5.js";import"./index-a73b8941.js";import"@babel/runtime/helpers/typeof";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-92c899aa.js";import"@viewlift/comscore/index.js";function B(B,y){d(B).addClass("skin_news_live"),function(i,e){var n=d(i);n&&n.on("loadeddata",function(){var n,o,t,r,s,a,d,u,v,p;(null===(n=C(i))||void 0===n?void 0:n.length)>0&&0!=(null==e||null===(o=e.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(i,e);var m=(null===(t=h.get())||void 0===t||null===(r=t.content)||void 0===r?void 0:r.length)>0;if(!(null!=e&&null!==(s=e.series)&&void 0!==s&&s.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(u=d.appcmsMain)&&void 0!==u&&null!==(v=u.features)&&void 0!==v&&v.auto_play||m)||null!=e&&e.liveVideo){if(!(null!=e&&e.liveVideo||null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable)){var f;f=h.subscribe(function(l){var n;(null==l||null===(n=l.content)||void 0===n?void 0:n.length)>0&&(c(i,e),f&&f())})}}else c(i,e)})}(B,y),function(l,i){var e,n,o,t,r,s,a,C,c,p,h,m,f,g,b,L,B,y,j,w,E,V,x,M,k,S,T,Z,A,H,P=d(l);null===(e=P.controlBar)||void 0===e||e.removeChild("PlayToggle");var _=null==P||null===(n=P.controlBar)||void 0===n||null===(o=n.el())||void 0===o||null===(t=o.children)||void 0===t?void 0:t[2],N=document.createElement("div");N.className="vjs-play-toggle-container",N.append(null==P||null===(r=P.controlBar)||void 0===r||null===(s=r.addChild("PlayToggle"))||void 0===s?void 0:s.el()),null==P||null===(a=P.controlBar)||void 0===a||null===(C=a.el())||void 0===C||C.insertBefore(N,_),null==P||null===(c=P.controlBar)||void 0===c||c.removeChild("VolumePanel"),null==P||null===(p=P.controlBar)||void 0===p||p.addChild("VolumePanel",{inline:!0},1);var q=null==P||null===(h=P.controlBar)||void 0===h?void 0:h.getChild("ProgressControl");null===(m=P.controlBar)||void 0===m||m.removeChild("SeekToLive"),null===(f=P.controlBar)||void 0===f||f.addChild("SeekToLive",{inline:!1},2);var I=null===(g=P.controlBar)||void 0===g||null===(b=g.getChild("SeekToLive"))||void 0===b?void 0:b.el();I&&(I.onclick=function(){if(P.paused())try{P.play()}catch(l){console.log(l)}});var O=document.createElement("div");O.className="custom-spaced-progress-bar",q&&O.append(q.el());null===(L=P.controlBar)||void 0===L||null===(B=L.el())||void 0===B||B.append(O);var R='<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="#EBEBEB"/>\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\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\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\n <symbol id="vjs-icon-volume1" 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="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" 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="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" 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="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\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 </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\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="inherit"/>\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="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';P.el().insertBefore(u(R),null!==(y=P.el().firstChild)&&void 0!==y?y:null);var D=(null==P||null===(j=P.controlBar)||void 0===j||null===(w=j.getChild("PlayToggle"))||void 0===w||null===(E=w.el())||void 0===E?void 0:E.firstChild)||null;if(D){D.style.height="18px",D.style.width="18px";var F=v(D,P.paused()?"#vjs-icon-play":"#vjs-icon-pause");P.on("pause",function(){return F.setAttributeNS(null,"href","#vjs-icon-play")}),P.on("play",function(){return F.setAttributeNS(null,"href","#vjs-icon-pause")})}var G=(null==P||null===(V=P.controlBar)||void 0===V||null===(x=V.getChild("FullscreenToggle"))||void 0===x||null===(M=x.el())||void 0===M?void 0:M.firstChild)||null;if(G){G.style.height="24px",G.style.width="24px";var z=v(G,"#vjs-icon-fullscreen");P.on("fullscreenchange",function(){var l=P.isFullscreen_;null==z||z.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var J=(null==P||null===(k=P.controlBar)||void 0===k||null===(S=k.getChild("VolumePanel"))||void 0===S?void 0:S.el())||null;if(J){var K=J.querySelector(".vjs-mute-control .vjs-icon-placeholder");K.classList.add("vjs-svg-icon"),K.style.height="24px",K.style.width="24px";var Q=v(K,P.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");P.on("volumechange",function(l){var i=P.volume();console.log(i,P.muted()),0==i||P.muted()?Q.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?Q.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?Q.setAttributeNS(null,"href","#vjs-icon-volume2"):Q.setAttributeNS(null,"href","#vjs-icon-volume3")})}var U=(null==P||null===(T=P.controlBar)||void 0===T||null===(Z=T.getChild("PictureInPictureToggle"))||void 0===Z?void 0:Z.el())||null;if(U){var W=null==U?void 0:U.querySelector(".vjs-icon-placeholder");W.style.height="25px",W.style.width="25px";var X=v(W,"#vjs-icon-pip");P.on("enterpictureinpicture",function(){X.setAttributeNS(null,"href","#vjs-icon-pip")})}var Y=(null==P||null===(A=P.controlBar)||void 0===A||null===(H=A.getChild("SubsCapsButton"))||void 0===H?void 0:H.el())||null;if(Y){var $=Y.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");$.classList.add("vjs-svg-icon"),$.style.height="29px",$.style.width="29px";var ll=v($,"#vjs-icon-caps");ll.setAttributeNS(null,"href","#vjs-icon-captions-off"),P.textTracks().on("change",function(l){for(var i=P.textTracks(),e=!1,n=0;n<i.length;n++){var o=i[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){e=!0;break}}e?ll.setAttributeNS(null,"href","#vjs-icon-captions"):ll.setAttributeNS(null,"href","#vjs-icon-captions-off")})}P&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(P.liveTracker.on("liveedgechange",function(){nl(P)}),P.on("timeupdate",function(){nl(P)}));function il(l){var i=Math.floor(l/3600),e=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===i?"".concat(o(e),":").concat(o(n)):"".concat(o(i),":").concat(o(e),":").concat(o(n))}function el(l){var i=l.seekable();if(i&&i.length>0){var e=i.end(0);return Math.max(0,e-l.currentTime())}return 0}function nl(l){var i,e,n=l.liveTracker.atLiveEdge(),o=el(l),t=null==l||null===(i=l.controlBar)||void 0===i||null===(e=i.remainingTimeDisplay)||void 0===e?void 0:e.el();if(t){var r=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",r&&(r.innerText=il(o)))}}}(B,y),function(l,u){var v,C,c,p,B,y,j,w,E,V=(null==u?void 0:u.liveVideo)||!1,x=(null==u||null===(v=u.res)||void 0===v?void 0:v.contentType)||"video",M=(null==u||null===(C=u.res)||void 0===C||null===(c=C[x])||void 0===c?void 0:c.isSSAIEnabled)||!1,k=(null==u?void 0:u.skin_settings)||{};null==k||k.slowMoBtn;var S=(null==u||null===(p=u.customData)||void 0===p?void 0:p.ads)||{};i(l),null!=k&&k.skipBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=k&&k.rewindBtn&&(0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&n(l,"VL_ONE",a());var T,Z=h.get();(null==Z||null===(B=Z.content)||void 0===B?void 0:B.length)>0&&o(l,Z);T=h.subscribe(function(i){var e,n,t=d(l);(null==t||null===(e=t.controlBar)||void 0===e||!e.getChild("videoSelector"))&&(null==i||null===(n=i.content)||void 0===n?void 0:n.length)>0&&(o(l,i),T&&T())}),(null==u||null===(y=u.streams)||void 0===y?void 0:y.length)>1&&t(l,null==u?void 0:u.streams);(null==u||null===(j=u.playlist)||void 0===j||null===(w=j.content)||void 0===w?void 0:w.length)>0&&r(l,null==u?void 0:u.playlist);null!=u&&null!==(E=u.series)&&void 0!==E&&E.enable&&s(l,u);if(M&&V&&"TRANSMIT"==(null==S?void 0:S.liveAdSticherProvider)&&null!=S&&S.liveAdClientSideTracking)m(l,u);else if("MEDIA_TAILOR"==(null==S?void 0:S.vodAdSticherProvider)&&null!=S&&S.vodAdClientSideTracking&&M)if(V)f(l);else{var A,H=null;if(null!=u&&null!==(A=u.series)&&void 0!==A&&A.enable){var P,_,N,q,I,O=null===(P=g())||void 0===P||null===(_=P.video)||void 0===_||null===(N=_.gist)||void 0===N?void 0:N.id,R=L(),D=(null==R?void 0:R.get(O))||{t:0,p:0},F=D.t,G=D.p;"function"==typeof(null===(q=window)||void 0===q||null===(I=q.watchHistory)||void 0===I?void 0:I.cb)&&window.watchHistory.cb({watchedTime:F}),G<95&&(H=F)}else{var z=u.watchHistoryResumeTime;u.watchedPercentage<95&&(H=z)}b(l,H)}}(B,y),p(B,y)}export{B as initialiseSkin};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as d,g as s}from"./icons-262bef63.js";import{T as r,a6 as c}from"./generic-e783464c.js";import{i as m,j as u,s as v,k as p,h,l as b}from"./skin-3653c5b3.js";import{a as f,u as y}from"./autoNextVideo-8dd79ed6.js";import{g as C}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-81661348.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-92c899aa.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-8a99e78b.js";function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(E=function(){return!!e})()}var I=a.getComponent("Component"),N=function(){n(L,I);var N,k,x=(N=L,k=E(),function(){var e,t=l(N);if(k){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function L(t){var o,n,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,L),(i=x.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),f({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe(function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,y(i.videos),i._refreshList()}),i}return t(L,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,l,d,s,r,c,u=this,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(this.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(t){"Enter"===t.key&&u.loadVideoAssetById(e)},p.onclick=function(){u.loadVideoAssetById(e)};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat(m(null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||m(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(l=i.appcmsMain)||void 0===l||null===(d=l.images)||void 0===d?void 0:d.placeholderCover)),h.alt="".concat((null==this||null===(s=this.videos[e])||void 0===s||null===(r=s.title)||void 0===r?void 0:r.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(h);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(c=this.videos[e])||void 0===c?void 0:c.title)||"")});return a.dom.appendContent(v,p),a.dom.appendContent(v,b),v}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var a=o(l(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a}(L,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(d())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-def99d5e.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;e.handleTabIndexSelector(),null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),v(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;c(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";h(e),r(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(s())});i.onkeydown=function(n){"Enter"===n.key&&(e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex()};var l=C("relatedVideoTitle")||"Recommended",d=a.dom.createEl("div",{className:"video-selector-title",innerHTML:l,ariaLabel:l,tabIndex:-1});d.setAttribute("role","heading"),d.setAttribute("aria-level","2"),this.titleEl=d;for(var r=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=a.dom.createEl("div",{className:"video-container video-accessibility"}),u=function(e){var o,n,i,l,d,s,u,v,p=a.dom.createEl("div",{className:"video -".concat(e)}),h=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var b=document.createElement("img");b.className="related-thumbnail-image",b.src="".concat(m(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||m(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(d=l.appcmsMain)||void 0===d||null===(s=d.images)||void 0===s?void 0:s.placeholderCover)),b.alt="".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(b);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});a.dom.appendContent(p,h),a.dom.appendContent(p,f),a.dom.appendContent(c,p),a.dom.appendContent(r,c)},v=0;v<this.videos.length;v++)u(v);a.dom.appendContent(n,d),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,r),b(this.playerId,e)}}]),L}();export{N as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as d,g as s}from"./icons-262bef63.js";import{T as r,a6 as c}from"./generic-15a83d12.js";import{i as m,j as u,s as v,k as p,h,l as b}from"./skin-3653c5b3.js";import{a as f,u as y}from"./autoNextVideo-11cfc2a5.js";import{g as C}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-81661348.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-92c899aa.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-a73b8941.js";function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(E=function(){return!!e})()}var I=a.getComponent("Component"),N=function(){n(L,I);var N,k,x=(N=L,k=E(),function(){var e,t=l(N);if(k){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function L(t){var o,n,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,L),(i=x.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),f({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe(function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,y(i.videos),i._refreshList()}),i}return t(L,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,l,d,s,r,c,u=this,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(this.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(t){"Enter"===t.key&&u.loadVideoAssetById(e)},p.onclick=function(){u.loadVideoAssetById(e)};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat(m(null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||m(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(l=i.appcmsMain)||void 0===l||null===(d=l.images)||void 0===d?void 0:d.placeholderCover)),h.alt="".concat((null==this||null===(s=this.videos[e])||void 0===s||null===(r=s.title)||void 0===r?void 0:r.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(h);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(c=this.videos[e])||void 0===c?void 0:c.title)||"")});return a.dom.appendContent(v,p),a.dom.appendContent(v,b),v}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var a=o(l(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a}(L,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(d())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-def99d5e.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;e.handleTabIndexSelector(),null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),v(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;c(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";h(e),r(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,o;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(s())});i.onkeydown=function(n){"Enter"===n.key&&(e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex()};var l=C("relatedVideoTitle")||"Recommended",d=a.dom.createEl("div",{className:"video-selector-title",innerHTML:l,ariaLabel:l,tabIndex:-1});d.setAttribute("role","heading"),d.setAttribute("aria-level","2"),this.titleEl=d;for(var r=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=a.dom.createEl("div",{className:"video-container video-accessibility"}),u=function(e){var o,n,i,l,d,s,u,v,p=a.dom.createEl("div",{className:"video -".concat(e)}),h=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var b=document.createElement("img");b.className="related-thumbnail-image",b.src="".concat(m(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||m(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(d=l.appcmsMain)||void 0===d||null===(s=d.images)||void 0===s?void 0:s.placeholderCover)),b.alt="".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(b);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});a.dom.appendContent(p,h),a.dom.appendContent(p,f),a.dom.appendContent(c,p),a.dom.appendContent(r,c)},v=0;v<this.videos.length;v++)u(v);a.dom.appendContent(n,d),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,r),b(this.playerId,e)}}]),L}();export{N as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{E as r,g as d}from"./icons-262bef63.js";import{T as s,a6 as c}from"./generic-e783464c.js";import{m,j as u,s as v,k as p,l as h}from"./skin-3653c5b3.js";import{a as f,u as b}from"./autoNextVideo-8dd79ed6.js";import{g as y}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-81661348.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-92c899aa.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-8a99e78b.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}var N=l.getComponent("Component"),E=function(){n(I,N);var E,k,j=(E=I,k=C(),function(){var e,t=a(E);if(k){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function I(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,I),(i=j.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),f({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe(function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,b(i.videos),i._refreshList()}),i}return t(I,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,a,r=this,d=l.dom.createEl("div",{className:"video -".concat(e)}),u=l.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){c(e+1);for(var t=l.dom.$$(".recommended"),o=0;o<t.length;o++)t[o].style.border="none";m(e),s(r.playerId,r.videos[e].id).then(function(e){r.cb&&r.cb(e)}).catch(function(e){r.cb&&r.cb(e)})};var v=document.createElement("img");v.className="related-thumbnail-image",v.src="".concat((null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.fallbackImage)),v.alt="No Thumbnail Available",u.append(v);var p=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(a=this.videos[e])||void 0===a?void 0:a.title)||"")});return l.dom.appendContent(d,u),l.dom.appendContent(d,p),d}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){l.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)l.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var l=o(a(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof l?function(e){return l.apply(n,e)}:l}(I,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",v(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),l.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(d())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=l.dom.createEl("div",{className:"video-selector-title",innerHTML:y("relatedVideoTitle")||"Recommended"}),r=l.dom.createEl("div",{className:"video-selector-content"}),u=l.dom.createEl("div",{className:"video-container"}),v=function(e){var o,n,i,a,d,v=l.dom.createEl("div",{className:"video -".concat(e)}),p=l.dom.createEl("div",{className:"recommended -".concat(e)});p.setAttribute("video-idx",e),p.onclick=function(){c(e+1);for(var o=l.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";m(e),s(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.fallbackImage)),h.alt="No Thumbnail Available",p.append(h);var f=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(d=t.videos[e])||void 0===d?void 0:d.title)||"")});l.dom.appendContent(v,p),l.dom.appendContent(v,f),l.dom.appendContent(u,v),l.dom.appendContent(r,u)},p=0;p<this.videos.length;p++)v(p);l.dom.appendContent(n,i),l.dom.appendContent(n,a),l.dom.appendContent(e,n),l.dom.appendContent(e,r),h(this.playerId,e)}}]),I}();export{E as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{E as r,g as d}from"./icons-262bef63.js";import{T as s,a6 as c}from"./generic-15a83d12.js";import{m,j as u,s as v,k as p,l as h}from"./skin-3653c5b3.js";import{a as f,u as b}from"./autoNextVideo-11cfc2a5.js";import{g as y}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-81661348.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-92c899aa.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-a73b8941.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}var N=l.getComponent("Component"),E=function(){n(I,N);var E,k,j=(E=I,k=C(),function(){var e,t=a(E);if(k){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function I(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,I),(i=j.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),f({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe(function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,b(i.videos),i._refreshList()}),i}return t(I,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,a,r=this,d=l.dom.createEl("div",{className:"video -".concat(e)}),u=l.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){c(e+1);for(var t=l.dom.$$(".recommended"),o=0;o<t.length;o++)t[o].style.border="none";m(e),s(r.playerId,r.videos[e].id).then(function(e){r.cb&&r.cb(e)}).catch(function(e){r.cb&&r.cb(e)})};var v=document.createElement("img");v.className="related-thumbnail-image",v.src="".concat((null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.fallbackImage)),v.alt="No Thumbnail Available",u.append(v);var p=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(a=this.videos[e])||void 0===a?void 0:a.title)||"")});return l.dom.appendContent(d,u),l.dom.appendContent(d,p),d}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){l.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)l.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var l=o(a(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof l?function(e){return l.apply(n,e)}:l}(I,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",v(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),l.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(d())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=l.dom.createEl("div",{className:"video-selector-title",innerHTML:y("relatedVideoTitle")||"Recommended"}),r=l.dom.createEl("div",{className:"video-selector-content"}),u=l.dom.createEl("div",{className:"video-container"}),v=function(e){var o,n,i,a,d,v=l.dom.createEl("div",{className:"video -".concat(e)}),p=l.dom.createEl("div",{className:"recommended -".concat(e)});p.setAttribute("video-idx",e),p.onclick=function(){c(e+1);for(var o=l.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";m(e),s(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.fallbackImage)),h.alt="No Thumbnail Available",p.append(h);var f=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(d=t.videos[e])||void 0===d?void 0:d.title)||"")});l.dom.appendContent(v,p),l.dom.appendContent(v,f),l.dom.appendContent(u,v),l.dom.appendContent(r,u)},p=0;p<this.videos.length;p++)v(p);l.dom.appendContent(n,i),l.dom.appendContent(n,a),l.dom.appendContent(e,n),l.dom.appendContent(e,r),h(this.playerId,e)}}]),I}();export{E as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewlift/player-backup",
3
- "version": "2.0.328-backup",
3
+ "version": "2.0.329-backup",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "types": "dist/@viewlift/player/esm/index.d.ts",
6
6
  "amdName": "_playerCore",
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/get"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var l={startTime:0,timeLive:3600},u=0,c=l.timeLive,p=o.getComponent("Button"),h=o.getComponent("Component"),d=o.getComponent("ProgressControl"),v=d.getComponent("SeekBar"),m=d.getComponent("PlayProgressBar"),f=d.getComponent("LoadProgressBar"),_=o.getComponent("MouseTimeDisplay");f.prototype.update=function(e){var t=this.player_.buffered(),r=this.player_.duration(),n=this.player_.bufferedEnd(),a=this.partEls_,i=function(e,t){var r=e/t||0;return 100*(r>=1?1:r)+"%"};0!==i(n,r)&&(this.el_.style.width=i(n,r));for(var o=0;o<t.length;o++){var s=t.start(o),l=t.end(o),u=a[o];u||(u=this.el_.appendChild(document.createElement("div")),a[o]=u),0!==i(s,n)&&(u.style.left=i(s,n)),0!==i(l-s,n)&&(u.style.width=i(l-s,n))}for(var c=a.length;c>t.length;c--)this.el_.removeChild(a[c-1]);a.length=t.length},v.prototype.update_=function(e,t){var r=this.player_.duration(),n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),r!==Number.POSITIVE_INFINITY&&this.el_.setAttribute("aria-valuetext","-".concat(o.formatTime(r-n,r))),this.bar.update(o.dom.getBoundingClientRect(this.el_),t)},v.prototype.handleMouseMove=function(e){var t=1-this.calculateDistance(e),r=this.player_.seekable().end(0)-t*c;r===this.player_.duration()&&(r-=.1),this.player_.currentTime(r),this.update()},m.prototype.update=function(e,t){var r=this,n=this.player_.duration();this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var a=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),i=o.formatTime(n-a,n);0!==t&&n!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(i))})},_.prototype.update=function(e,t){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var n=o.formatTime(c-t*c,c);r.el_.style.left="".concat(e.width*t,"px"),0!==t&&r.player_.duration()!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(n))})};var y=function(e){var t=this;e||(e=l),this.on("timeupdate",function(e){var r,n;(n=(r=t).seekable())&&n.length&&(n.end(0)-r.currentTime()<20?r.controlBar.liveButton.addClass("onair"):r.controlBar.liveButton.removeClass("onair"),r.duration(r.seekable().end(0)),u||(u=c=r.seekable().end(0)))}),this.on("pause",function(e){t.controlBar.liveButton.removeClass("onair")}),this.ready(function(){var r;r=t,o.mergeOptions(l,e),r.addClass("vjs-dvr-seekbar"),r.controlBar.addClass("vjs-dvr-control-bar"),r.controlBar.progressControl.seekBar.__proto__.__proto__.update=function(){if(this.el_){var e;e="VolumeBar"===this.name_?this.getPercent():1-(this.player_.duration()-this.player_.currentTime())/c;var t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0),e>1&&(e=1);var r=(100*e).toFixed(2)+"%",n=t.el().style;return 0!==e&&(this.vertical()?n.height=r:n.width=r),e}}},r.controlBar.progressControl&&r.controlBar.progressControl.addClass("vjs-dvr-progress-control"),r.controlBar.liveButton=r.controlBar.addChild("liveButton"),r.controlBar.el().insertBefore(r.controlBar.liveButton.el(),r.controlBar.progressControl.el())})},C=function(){n(c,p);var o,l,u=(o=c,l=s(),function(){var e,t=i(o);if(l){var r=i(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function c(t,r){var n;return e(this,c),(n=u.call(this,t,r)).el().innerHTML='<span class="liveCircle"></span><span class="liveText">LIVE</span>',t.paused()||n.addClass("onair"),n}return t(c,[{key:"buildCSSClass",value:function(){return"vjs-live-button ".concat(function(e,t,n,a){var o=r(i(1&a?e.prototype:e),t,n);return 2&a&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(c,"buildCSSClass",this,3)([]))}},{key:"handleClick",value:function(e){var t=this.player_.seekable().end(0);this.player_.currentTime(t),this.player_.play()}}]),c}();h.registerComponent("LiveButton",C),(o.registerPlugin||o.plugin)("dvrSeekbar",y),exports.default=y;
@@ -1 +0,0 @@
1
- "use strict";var e=require("./features-73714179.js"),l=require("./skin-66dce245.js"),i=require("./index-467c2357.js"),r=require("./index-51f2472f.js"),n=require("./browser-3670a923.js");require("videojs-contrib-quality-menu");var o=require("./relatedVideosManager-0a220d05.js"),u=require("video.js"),d=require("./generic-3f85a6cc.js"),a=require("./icons-eb807ef0.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./renditions-627bdfad.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-48c26383.js"),require("./index-8c1ab404.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("md5"),require("js-cookie"),require("./captions-c8b5cc66.js"),require("@viewlift/comscore/index.js");function t(u,d){var a,t=l.getPlayer(u),v=(null==d||null===(a=d.res)||void 0===a?void 0:a.siteId)||"";t&&(t.on("loadeddata",function(){var e,a,t,s,c,p,g,b;!function(e){var i=l.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(u);var y=(null===(e=o.relatedVideosManager.get())||void 0===e||null===(a=e.content)||void 0===a?void 0:a.length)>0;if(!(null!=d&&null!==(t=d.series)&&void 0!==t&&t.enable||null!==(s=window)&&void 0!==s&&null!==(c=s.app_data)&&void 0!==c&&null!==(p=c.appcmsMain)&&void 0!==p&&null!==(g=p.features)&&void 0!==g&&g.auto_play||y)||null!=d&&d.liveVideo){if(!(null!=d&&d.liveVideo||null!=d&&null!==(b=d.series)&&void 0!==b&&b.enable)){var m;m=o.relatedVideosManager.subscribe(function(e){var l;(null==e||null===(l=e.content)||void 0===l?void 0:l.length)>0&&(i.addNextEpPreview(u,d),m&&m())})}}else i.addNextEpPreview(u,d);null!=d&&d.liveVideo||n.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===v||r.initiateTrickplay(u)}),t.one("play",function(){var l,i,r,n;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(u,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}var v=function(e,i){var r,n,o,d,a,t,v,s,c,p,g,b,y=l.getPlayer(e),m=(null==i?void 0:i.theme)||{},q=u.dom.$(".vjs-play-progress"),h=u.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(r=window)||void 0===r||null===(n=r.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(d=o.brand)||void 0===d||null===(a=d.cta)||void 0===a||null===(t=a.primary)||void 0===t?void 0:t.backgroundColor)),q&&(q.style.background="".concat(null===(v=window)||void 0===v||null===(s=v.app_data)||void 0===s||null===(c=s.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(g=p.cta)||void 0===g||null===(b=g.primary)||void 0===b?void 0:b.backgroundColor));var f=y.getChild("BigPlayButton")||null;(null==m?void 0:m.progressBarColor)&&q&&(q.style.background=m.progressBarColor),(null==m?void 0:m.playButtonBackgroundColor)&&f&&(f.el().style.background=m.playButtonBackgroundColor),(null==m?void 0:m.playButtonColor)&&h&&(h.style.color=m.playButtonColor),(null==m?void 0:m.playButtonType)&&("square"==(null==m?void 0:m.playButtonType)?f.el().style.borderRadius=".3em":f.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(r,n){l.getPlayer(r).addClass("skin_vlone"),t(r,n),function(r,n){var u,t,v,s,c,p,g,b=l.getPlayer(r),y=(null==n?void 0:n.liveVideo)||!1,m=(null==n||null===(u=n.res)||void 0===u?void 0:u.contentType)||"video",q=(null==n||null===(t=n.res)||void 0===t||null===(v=t[m])||void 0===v?void 0:v.isSSAIEnabled)||!1,h=d.getSource(null==n?void 0:n.res,r)||{};h.src;var f=(null==n?void 0:n.skin_settings)||{},k=(null==n||null===(s=n.customData)||void 0===s?void 0:s.ads)||{};if(y&&(null==n||!n.liveui)){var w,j,C=(null==b||null===(w=b.controlBar)||void 0===w||null===(j=w.getChild("LiveDisplay"))||void 0===j?void 0:j.el())||null;if(C){var S,V;C.onclick=function(){try{var e;null==b||null===(e=b.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}};var T=C.querySelector(".vjs-live-display")||C,B=function(){var e,l,i,r=null===(e=null==b||null===(l=b.liveTracker)||void 0===l||null===(i=l.atLiveEdge)||void 0===i?void 0:i.call(l))||void 0===e||e;T.classList.toggle("vjs-behind-live",!r)};null==b||null===(S=b.liveTracker)||void 0===S||null===(V=S.on)||void 0===V||V.call(S,"liveedgechange",B),B()}}null!=f&&f.skipBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(r,"VL_ONE",a.SkipSvgV2());(null!=f&&f.rewindBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(r,"VL_ONE",a.RewindSvgV2());var M,P=o.relatedVideosManager.get();(null==P||null===(c=P.content)||void 0===c?void 0:c.length)>0&&e.addVideoSelector(r,P);M=o.relatedVideosManager.subscribe(function(i){var n,o,u=l.getPlayer(r);(null==u||null===(n=u.controlBar)||void 0===n||!n.getChild("videoSelector"))&&(null==i||null===(o=i.content)||void 0===o?void 0:o.length)>0&&(e.addVideoSelector(r,i),M&&M())}),null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable&&e.addSeriesSelectorV2(r,n);(null==n||null===(g=n.streams)||void 0===g?void 0:g.length)>1&&e.addMulticamSelector(r,null==n?void 0:n.streams);if(i.addTVProviderImage(r,n),d.initialiseKeyboardEvents(r,n),q&&y&&"TRANSMIT"==(null==k?void 0:k.liveAdSticherProvider)&&!(null==k||!k.liveAdClientSideTracking))d.initializeTransmit(r,n);else if("MEDIA_TAILOR"==(null==k?void 0:k.vodAdSticherProvider)&&null!=k&&k.vodAdClientSideTracking&&q)if(y)d.setupAdvertisementMarkersForLinear(r);else{var A,E=null;if(null!=n&&null!==(A=n.series)&&void 0!==A&&A.enable){var L,x,R,_,O,I=null===(L=d.getCurrentVideo())||void 0===L||null===(x=L.video)||void 0===x||null===(R=x.gist)||void 0===R?void 0:R.id,N=d.getSeriesWatchMap(),D=(null==N?void 0:N.get(I))||{t:0,p:0},H=D.t,F=D.p;"function"==typeof(null===(_=window)||void 0===_||null===(O=_.watchHistory)||void 0===O?void 0:O.cb)&&window.watchHistory.cb({watchedTime:H}),F<95&&(E=H)}else{var G=n.watchHistoryResumeTime;n.watchedPercentage<95&&(E=G)}d.setupAdvertisementMarkers(r,E)}}(r,n),v(r,n)};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"video.js";import r from"axios";import{g as o,t as a,c as l}from"./skin-3653c5b3.js";import{i as s,a as d,d as u}from"./browser-de5f6a74.js";import c from"md5";import v from"js-cookie";import{b as f,a as m}from"./captions-92c899aa.js";import p from"@babel/runtime/helpers/typeof";import h from"@babel/runtime/helpers/toConsumableArray";import g from"@babel/runtime/helpers/slicedToArray";import{destroyComscoreTag as y,formulateComscorePayload as w,createComscoreStreamingTag as T,setComscorePlayerInstance as _}from"@viewlift/comscore/index.js";import b from"@babel/runtime/helpers/classCallCheck";import I from"@babel/runtime/helpers/createClass";function E(){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||[],E("js",new Date),E("config",e)}function k(e,n){E("event",e,n)}var A={name:"@viewlift/player",version:"2.1.57",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.19",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"}},O={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 P(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 L(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?P(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var D,C=(D={},{setConfig:function(e){D=L(L({},D),e)},getConfig:function(){return D}}),F=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)},j=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"},R=new Set(["license","key","server_certificate"]),N=function(e){return R.has(e)},V=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},W=function(e){return null==e||e>=200&&e<400};function x(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 U="asset_not_found",M="geo_blocking_issue",B="entitlement_mismatch",H="DRM/License Failures",G=new Set(["contentgeorestricted","contentgeorestrictedbyhba","content_not_available_for_country"]),q=[/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],z=[/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],Q=[/not found/i,/no content/i,/does not exist/i,/\bmissing\b/i,/not available currently/i,/not available/i],Y=function(e,n,t,i){var r=Number(e),o=String(n||"");return F(i)?H:G.has(function(e){return String(e||"").toLowerCase().replace(/[\s-]/g,"_")}(t))||q.some(function(e){return e.test(o)})?M:z.some(function(e){return e.test(o)})?B:Q.some(function(e){return e.test(o)})||404===r?U:451===r?M:B},K=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=C.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=Y(l,s,d,t),c=function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?x(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):x(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 X(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 J(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?X(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):X(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var $=A;window.vl_player_version=$.version;var Z,ee=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":le.get()+"".concat(null==O?void 0:O.getVideoDetails)},ne=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=ee();return r({url:ee(),params:J({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":$.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 K(u,n,"content",{videoId:e}),n})},te=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=le.get()+O.getLinearChannelDetails;return r({url:u,params:J(J(J(J(J({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 K(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})},ie=function(e,n){var t,i,o=Ie(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=le.get()+"/v3/content/series/".concat(e);return r({url:l,params:{site:a},method:"GET",headers:{Authorization:n}}).catch(function(n){throw K(l,n,"content",{videoId:e}),n})},re=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,_e();case 2:return i=e.sent,e.abrupt("return",r({url:le.get()+"".concat(null==O?void 0:O.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:J({},n),params:J({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}).catch(function(e){throw K("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)}}(),oe=function(e,n){var t,i,o=window.contentType,a=le.get()+"".concat(null==O?void 0:O.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 K(a,n,"content",{videoId:e,contentType:o}),n})},ae=function(e){var n=e.videoId,t=le.get()+"".concat(null==O?void 0:O.getSeriesWatchHistoryV2,"/").concat(n);return r({method:"GET",url:t,headers:{Authorization:e.token},timeout:15e3}).catch(function(i){throw K(t,i,"content",{seriesId:n,videoId:null==e?void 0:e.videoId}),i})},le=(Z=null==O?void 0:O.apiBaseUrl,{set:function(e){e&&(Z=e)},get:function(){return Z}}),se=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 K(t,n,"content",{videoId:e,url:t}),n})},de=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},ue=null;function ce(){return{set:function(e){e&&(ue=e)},get:function(){return ue}}}var ve,fe,me,pe,he,ge,ye,we=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=ce().get(),i=le.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)}}(),Te=null,_e=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"))||!de(n)){e.next=6;break}return Te||(Te=we().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&&ce().set(o),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){Te=null})),e.abrupt("return",Te);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),be=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},Ie=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},Ee=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},Se=(ge=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;ge.set(t,(ge.get(t)||0)+1)},get:function(e){return ge.get(e)},clear:function(){ge.clear()}}),ke=function(e){fe=e},Ae=function(){return fe},Oe=function(e){ve=e},Pe=function(){return ve},Le=function(){return me},De=function(e){me=e},Ce=function(){return he},Fe=function(e){pe=new Map,e.map(function(e,n){pe.set(e.id,n)})},je=function(e){if(pe){var n=pe.get(e);De(n+1)}},Re=(ye=0,{set:function(e){e>=0&&(ye=e)},get:function(){return ye}});function Ne(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 Ve(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Ne(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var We=0,xe=null,Ue=null,Me=!1,Be=!1,He=[],Ge=null;function qe(e,n,t,i){e&&(i?e.one(n,t):e.on(n,t),He.push({type:"player",player:e,event:n,handler:t}))}function ze(e,n,t){if(e){var i=He.findIndex(function(i){return"player"===i.type&&i.player===e&&i.event===n&&i.handler===t});-1!==i&&He.splice(i,1),e.off(n,t)}}function Qe(e,n,t){var i;e&&null!=e&&e.ima&&"function"==typeof(null==e||null===(i=e.ima)||void 0===i?void 0:i.addEventListener)&&(e.ima.addEventListener(n,t),He.push({type:"ima",player:e,eventType:n,handler:t}))}var Ye=function(){if(Ge){try{var e=Ge,n=e.seekToLive,t=e.originalHandleClick;n&&"function"==typeof t&&(n.handleClick=t)}catch(e){console.error(e)}Ge=null}},Ke=function(){He.forEach(function(e){try{"player"===e.type?e.player.off(e.event,e.handler):"ima"===e.type&&function(e,n,t){if(null!=e&&e.ima){var i=e.ima;if("function"!=typeof i.removeEventListener){var r="function"==typeof i.getAdsManager?i.getAdsManager():null;r&&"function"==typeof r.removeEventListener&&r.removeEventListener(n,t)}else i.removeEventListener(n,t)}}(e.player,e.eventType,e.handler)}catch(e){console.error(e)}}),He.length=0,Ye(),We=0,xe=null,Ue=null,Me=!1,Be=!1,"function"==typeof window.cleanupTimers&&window.cleanupTimers()},Xe=function(){var e,n,t,i,r,o,a,l=Ae();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 Je(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function $e(){return xe||window.sessionStorage.getItem("uid")}function Ze(){return en.apply(this,arguments)}function en(){return(en=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,_e();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 nn(e){return e?String(e):""}window.initialise=function(e){window.sid=Je(),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),tn(e),rn(e)};var tn=function(e){qe(e,"play",function(){"pause"!==Ue||e.scrubbing()||(Ue="play",k("RESUME",{pfm:window.platform,uid:$e(),vid:Xe(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"RESUME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))}),qe(e,"playing",function(){window.firstFrameFired&&!e.scrubbing()&&(Ue="play")}),qe(e,"pause",function(){setTimeout(function(){!Me&&window.firstFrameFired&&"play"===Ue&&(Ue="pause",k("PAUSE",{pfm:window.platform,uid:$e(),vid:Xe(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"PAUSE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))},50)})},rn=function(e){if(e){var n=0,t=0,i=0,r=0;qe(e,"timeupdate",o),qe(e,"seeking",function(){Me||(Me=!0,ze(e,"timeupdate",o),qe(e,"seeked",a,!0))}),qe(e,"seeked",a)}function o(){n=t,t=Math.floor(e.currentTime()),n<t&&(r=n,n=t)}function a(){if(Be)Be=!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";k(t,{pfm:window.platform,uid:$e(),vid:Xe(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:t,videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}r=Math.floor(e.currentTime()),setTimeout(function(){Me=!1},50),qe(e,"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(),a=null!=r&&r.el_?Math.floor(r.currentTime()):0;window.cleanupTimers(),k(e,Ve({pfm:window.platform,uid:$e(),vid:Xe(),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){qe(e,"error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,n,t){qe(e,"play",tryCatch(function(){var i,r,o;window.ttFirstFrameStartTime_In_MS=performance.now(),Ue="play",window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),k("PLAY",Ve({pfm:window.platform,uid:$e(),vid:Xe(),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",Ve({"Video ID":Xe(),watchTime:Math.floor(e.currentTime())},t))}),!0)},window.buffering=function(e){qe(e,"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")&&We<4)We++,k("BUFFERING",Ve({pfm:window.platform,uid:$e(),vid:Xe(),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,k("FIRST_FRAME",Ve({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:$e(),vid:Xe()},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)}),ze(e,"timeupdate",n)}});qe(e,"timeupdate",n)},window.ads=function(e){function n(){var n,t,i,r,o,a;window.isAdPlaying=!0,!window.firstFrameFired&&window.failedToStartTimer&&clearTimeout(window.failedToStartTimer),k("AD_REQUEST",Ve({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:$e(),vid:Xe(),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}),k("AD_IMPRESSION",Ve({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:$e(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Xe()},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})}function t(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4))}function i(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4))}var r=!1;function o(){var o,a,l,s;r||null!==(o=window)&&void 0!==o&&null!==(a=o.google)&&void 0!==a&&null!==(l=a.ima)&&void 0!==l&&null!==(s=l.AdEvent)&&void 0!==s&&s.Type&&null!=e&&e.ima&&"function"==typeof e.ima.addEventListener&&("function"==typeof e.ima.getAdsManager?e.ima.getAdsManager():null)&&(Qe(e,window.google.ima.AdEvent.Type.STARTED,n),Qe(e,window.google.ima.AdEvent.Type.SKIPPED,t),Qe(e,window.google.ima.AdEvent.Type.COMPLETE,i),r=!0)}qe(e,"adsready",o),o()};var on=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||on(e,n,n)}},window.ping=function(e){window._pingTimeUpdateHandler&&(ze(e,"timeupdate",window._pingTimeUpdateHandler),window._pingTimeUpdateHandler=null),window._pingTimes||(window._pingTimes=[]),window._pingTimeUpdateHandler=function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!window._pingTimes.includes(n)&&(We=0,window._pingTimes.push(n),on(e,n,30))},qe(e,"dispose",tryCatch(function(){console.log('Player DISPOSED >> "dispose" event fired >>> firing exit PING'),window.fireExitPing(e)})),qe(e,"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(an(n,o,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var an=function(e,n,t){return e>=n&&e<=t},ln=function(){var e,n=Ae(),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,a,l,d,u,c,v,f,m,p,h,g,y,w,T,_,b,I,E,S,k,A;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!s()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,_e();case 4:return I=e.sent,E=Ie(I),S=null==E?void 0:E.site,k=null==E?void 0:E.siteId,e.t0=Ve,e.t1=Ve,e.t2=Ve({aid:S,cid:k,pfm:window.platform},null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=$e(),e.t5=Xe(),e.t6=n.url||document.location.href,e.t7=n.ref||(null===(l=window)||void 0===l||null===(d=l.location)||void 0===d?void 0:d.ref)||document.referrer,e.t8=n.eventName,e.t9=null!==(u=n.videoPosition)&&void 0!==u?u: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?nn(n.adPosition):"",e.next=28,Ze();case 28:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(c=n.ttFirstFrame)&&void 0!==c?c:null,e.t23=null!==(v=n.bitrate)&&void 0!==v?v:null,e.t24=null!==(f=n.resHeight)&&void 0!==f?f:null,e.t25=null!==(m=n.resWidth)&&void 0!==m?m:null,e.t26=null!==(p=n.bufferHealth)&&void 0!==p?p:null,e.t27=null!==(h=ln())&&void 0!==h?h:null,e.t28=null!=S?S: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===(g=window)||void 0===g||null===(y=g.customData)||void 0===y||null===(w=y.beacon)||void 0===w?void 0:w.params,e.t33=(0,e.t0)(e.t31,e.t32),A=[e.t33],r({url:(null===(T=window)||void 0===T||null===(_=T.customData)||void 0===_||null===(b=_.beacon)||void 0===b?void 0:b.url)||le.get()+O.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:A}).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}}};function sn(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&!s()){var t=C.getConfig();if(null==t||!t.disableBeacon){null!=n&&n.userId&&(xe=n.userId);var i=o(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)}}}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){Ye();var i=t.handleClick;Ge={seekToLive:t,originalHandleClick:i},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;k("WATCH_LIVE",Ve({eventName:"WATCH_LIVE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:$e(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Xe()},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),Be=!0),i.call(this,n)}}}};var dn=function(e,n){var t=new Map;ae({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),he=t}).catch(function(e){return console.log(e)})},un=function(){var e=Re.get();return e>=0?e+1:1},cn=function(){var e,n,t,i=Pe(),r=Ae(),o=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=Re.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 vn(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 fn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?vn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):vn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var mn=c,pn=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},hn=function(e){var n=gn(e,"video.tags",[]),t=gn(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},gn=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},yn=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},wn=function(){var e,n,t,i,r,a,l,s,d,u,c,f,m,p,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 L=(null==P?void 0:P.siteName)||(null==P?void 0:P.site)||"",D=(null==P?void 0:P.contentType)||"video",C=(null==P||null===(t=P[D])||void 0===t?void 0:t.metadata)||(null==P||null===(i=P[D])||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.metadata),F=o(O);if(!A.includes("VIEWLIFT_"))return A;var j,R=window.getComputedStyle(document.getElementById(O),null),N=Math.trunc(R.getPropertyValue("height").slice(0,-2)),V=Math.trunc(R.getPropertyValue("width").slice(0,-2)),W="linearchannel"===D?null==P||null===(a=P.linearchannel)||void 0===a||null===(l=a.channels)||void 0===l||null===(s=l.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===s||null===(d=s.content)||void 0===d?void 0:d.id:gn(P,"video.gist.id",""),x="linearchannel"===D?null==P||null===(u=P.linearchannel)||void 0===u||null===(c=u.channels)||void 0===c||null===(f=c.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===f?void 0:f.title:gn(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,M=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",function(e){U=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]}));var B=v.get("us_privacy")||v.get("usprivacy"),H=void 0!==B?B:"1YNN",G=null!==(m=null===(p=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===p?void 0:p.fwIdentifier)&&void 0!==m?m:null,q=fn(fn({},Tn(C)),{},{VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:N,VIEWLIFT_SIZE:pn(V,N),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:gn(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:gn(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:gn(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"==L||"usanetwork"==L||"golfchannel"==L?"":yn(!1),VIEWLIFT_DID:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":yn(),VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:hn(P),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(gn(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+gn(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:v.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:gn(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"==L||"usanetwork"==L||"golfchannel"==L?"":gn(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:G?mn(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*gn(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:gn(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:x,VIEWLIFT_CONTENT_SERIES_TITLE:gn(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:gn(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:cn(),VIEWLIFT_SEASON_NUMBER:un(),VIEWLIFT_CONTENT_TAGS:hn(P),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"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 q){var Q=new RegExp(z,"g");A=A.replace(Q,q[z])}return A},Tn=function(e){var n,t,i,r,o,a,l,s,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,m=(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.subscription)||void 0===a?void 0:a.TVE)||!1;return f||m?(d()?f?c=fn(fn({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):m&&(c=fn(fn({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):f?c=fn(fn({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):m&&(c=fn(fn({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),f?c=fn(fn({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(d()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):m&&(c=fn(fn({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(d()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=d()?fn(fn({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):fn(fn({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=fn(fn({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(d()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=d()?fn(fn({},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")||""}):fn(fn({},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=fn(fn({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:gn(null===(l=window)||void 0===l||null===(s=l.app_data)||void 0===s||null===(u=s.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")||""})},_n=function(e,n){var t,i,r,o,a,l,s,d,c,v,f,m,p,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===(a=o.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[h])||void 0===l||null===(s=l.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.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===(m=f.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=w&&w.hls)return In(w);if(g){var b=En(y,n);return b.src=wn(b.src,n,e),b}if("Safari"!==u()&&_)return bn(y);if(T){var I=In(y);return I.src=wn(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=wn(E.src,n,e),E}return null},bn=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},In=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},En=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,s=u();if(o(n),"Safari"===s){var d=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 Sn(n),d}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Sn(n),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Sn=function(e){var n=o(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==u()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},kn=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}},An=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 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)}}},On=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Pn=!1,Ln=function(e,n,t){var i=wn(n,e,t),r=o(e);if(n&&window.google){if("function"!=typeof r.ima&&"object"!==p(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,i,r,a=o(e);if(null!==a.el_){Pn=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Pn&&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)}};function Dn(e,n){var t,i,r,a=o(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,m;if(Fn.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==s||s.focus()),p){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||wi(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!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;h||yi(e,10)}}},!0)}var Cn,Fn=(Cn=!0,{enable:function(){Cn=!0},disable:function(){Cn=!1},get enabled(){return Cn}}),jn="ssai-breakStart",Rn="ssai-adImpression",Nn="ssai-firstQuartile",Vn="ssai-midpoint",Wn="ssai-thirdQuartile",xn="ssai-complete",Un="ssai-breakEnd",Mn={breakStart:jn,impression:Rn,firstQuartile:Nn,midpoint:Vn,thirdQuartile:Wn,complete:xn,breakEnd:Un};function Bn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=o(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var i=n.eventType,r=Mn[i];r&&t.trigger(r,n)}function Hn(e){var n=o(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(jn,e)},adImpression:function(e){return t(Rn,e)},adFirstQuartile:function(e){return t(Nn,e)},adMidpoint:function(e){return t(Vn,e)},adThirdQuartile:function(e){return t(Wn,e)},adComplete:function(e){return t(xn,e)},adBreakEnd:function(e){return t(Un,e)}}}function Gn(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 qn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Gn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var zn,Qn=(zn={},{get:function(){return zn},set:function(e){zn=e}});function Yn(e,n){var t,i,r,a,l,s,d,u,c,v,f,m,p,h,g,b,I,E,S,k,A,O=null==e?void 0:e.playerId,P=o(O);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var L=Ae(),D=(null==L||null===(i=L.video)||void 0===i?void 0:i.metadata)||[],C=(null==D?void 0:D.length)&&D.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=C)&&void 0!==r&&r.length){var F=C.map(function(e){return e.value});C=null==F?void 0:F.join(",")}y();var j,R,N,V=null===(a=window)||void 0===a?void 0:a.lcProgrammeDetails,W=Array.isArray(null==V?void 0:V.category)?null==V||null===(l=V.category)||void 0===l?void 0:l.join(","):(null==V?void 0:V.category)||null,x=qn(qn(qn({},null==L?void 0:L.video),null==L?void 0:L.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==L?void 0:L.site)||null,programId:(null==V?void 0:V.videotmsid)||null,programTitle:(null==V?void 0:V.lcProgrammeName)||null,episodeId:(null==V?void 0:V.videotmsid)||null,seasonNumber:(null==L||null===(c=L.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==V||null===(f=V.seriesDetails)||void 0===f?void 0:f.season)||null,episodeNumber:(null==L||null===(m=L.video)||void 0===m||null===(p=m.series)||void 0===p?void 0:p.episodeNumber)||(null==V||null===(h=V.seriesDetails)||void 0===h?void 0:h.episode)||null,episodeTitle:(null==V?void 0:V.lcSubTitle)||null,isCompleteEpisode:!!(null!=L&&null!==(g=L.video)&&void 0!==g&&g.series||null!=V&&null!==(b=V.seriesDetails)&&void 0!==b&&b.episode),genre:C||W,comscoreConfig:{implementationId:(null==e||null===(I=e.comscore)||void 0===I?void 0:I.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),U=null==e||null===(S=e.comscore)||void 0===S||null===(k=S.metadata)||void 0===k?void 0:k.contentType;if(null!=x&&null!==(A=x.streamingInfo)&&void 0!==A&&A.isLiveStream?x.contentType="Live":x.contentType=U||"LongFormOnDemand",null==x||!x.network){var M,B=(null==x?void 0:x.metadata)||[],H=null==B||null===(M=B.find(function(e){return"network"===e.name}))||void 0===M?void 0:M.value;x.network=H||null}null!=x&&x.network&&null!=x&&x.genre&&(x.customGenre="".concat(x.network,"_").concat((null==x?void 0:x.programTitle)||(j=x,null!=j&&j.series?null==j||null===(N=j.series)||void 0===N?void 0:N.title:null==j||null===(R=j.gist)||void 0===R?void 0:R.title),"_").concat(x.genre)),null!=V&&V.airDate&&(x.publishDate=V.airDate),null!=x&&x.runtime&&"function"==typeof P.duration&&(x.runtime=1e3*Math.ceil(P.duration()));var G=w(x,P);console.log("comscoreOptions player data",G),T(qn({playerName:"Video.js"},G)),_(P)}}function Kn(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 Xn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Kn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Kn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Jn(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 $n(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)?$n(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 $n(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 Zn=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}();function et(e,n){return nt.apply(this,arguments)}function nt(){return(nt=n(t.mark(function e(n,i){var r,a,l,s,d,u,c,v,f,m,p,h,y,w,T,_,b,I;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o(n),l=_n(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=wn(u,n,i),c=it(u),v=g(c,2),f=v[0],m=v[1],p=tt(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach(function(e){var n=g(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(Xn({adsParams:Xn({},f)},p))});case 14:return h=e.sent,e.next=17,h.json();case 17:return y=e.sent,w="https://"+new URL(u).hostname,T=y.trackingUrl,_=y.manifestUrl,b=w+T,I=w+_,Zn.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 tt(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=g(e,2),t=n[0],i=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(i)]}))||{}}function it(e){var n={};if(!e.split("?")[1])return[{},{}];var t,i=new URL(e,window.location.origin),r=Jn((null==i?void 0:i.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var o=g(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 v=g(c[u],2),f=v[0],m=v[1];if(f.startsWith("ads."))s[f.replace(/^ads\./,"")]=m;else d[f]=m}return[s,d]}var rt,ot,at,lt=new Map;function st(e,n){return dt.apply(this,arguments)}function dt(){return dt=n(t.mark(function e(i,r){var l,s,d,u,c,v,f,m,p,g,y,w,T,_,b,I,E,S,k,A,O,P,L,D,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,r,a,l){var s,d,u=o(i);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<L&&P.clear(),L=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,m=Jn(t);try{for(m.s();!(f=m.n()).done;){var p,h,g,y=f.value,w=y.eventType,T=y.beaconUrls,_=y.startTimeInSeconds,b=y.startTime,I=y.durationInSeconds,E=_||0,S=T,k=(null===(p=window)||void 0===p||null===(h=p.customData)||void 0===h||null===(g=h.ads)||void 0===g?void 0:g.adEventHandler)||null,A="".concat(E,"_").concat(w),O=lt.get("pod-".concat(a))||[];if(console.warn(e,E,"map:",w,"condition1:",e>=E,"map:",lt),e>=E&&!O.includes(A)){O.push(A),lt.set("pod-".concat(a),O);try{D(w,n,S,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,w,n)}if("function"==typeof k)try{var C,F={eventType:w,startTimeInSeconds:_,startTime:b,durationInSeconds:I,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[r],adIndex:r};k({adsData:F}),Bn(i,F)}catch(e){console.error("Error when calling ads callback:",e)}var j=Qn.get();if(j&&0!==Object.keys(j).length){var R=j.formulateComscoreAdPayload,N=j.startComscoreAdTracking,V=j.finishComscoreAdTracking,W=j.endComscoreAdTracking,x="".concat(E,"_").concat(v,"_").concat(w);if(!P.has(x))if(P.set(x,!0),"impression"===w){var U,M=Zn.get();N(R(Xn(Xn({},null==n||null===(U=n.ads)||void 0===U?void 0:U[r]),{},{trackingUrl:M})))}else"complete"===w?V():"breakEnd"===w&&W()}}}}catch(e){m.e(e)}finally{m.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)})})},O=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},lt.clear(),window.isAdPlaying=!1,p=Zn.get(),(g=o(i)).one("loadeddata",function(){p&&A(p)}),y=new Map,w=new Map,T=-1,_=(null===(l=document)||void 0===l||null===(s=l.getElementsByClassName("tvProviderImage"))||void 0===s?void 0:s[0])||null,b=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,I=(null==g||null===(u=g.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,E=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==g||null===(f=g.el())||void 0===f||null===(m=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,k=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 h(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 Xn(Xn({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},A=function(){var e=n(t.mark(function e(n){var l,s,d,u,c,v,f,m,p,g,A,P,L,D,F,j,R,N,V,W,x,U,M,B,H,G;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return U=function(e){document.removeEventListener("pointermove",x),document.removeEventListener("pointerup",U),0===e.button&&N(R)},x=function(e){},W=function(e){if(null!=e){var n,t=null,i=Jn(m);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||y.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),p={position:e,podStart:t.startTimeInSeconds,podEndTime:t.startTimeInSeconds+t.durationInSeconds,entered:!1},setTimeout(function(){g.currentTime(t.startTimeInSeconds+.4)},100)):(p=null,g.currentTime(e),V(e))}},V=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.currentTime(),t=null,i=Jn(m);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,y.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(){g.currentTime(t+2.2)},100))},N=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.currentTime();if(!(null==e||e<0||n<=e)){var t,i=null,r=Jn(m);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&&(y.has(a)||a>e&&a<=n&&(null===i||a>i.startTimeInSeconds)&&(i=o))}}catch(e){r.e(e)}finally{r.f()}null!==i&&(y.set(i.startTimeInSeconds,!0),w.set(i.startTimeInSeconds,!0),p={position:n,podStart:i.startTimeInSeconds,podEndTime:i.startTimeInSeconds+i.durationInSeconds,entered:!1},console.log("Seeking back to ad pod:",i.startTimeInSeconds,"then resuming to",n),setTimeout(function(){g.currentTime(i.startTimeInSeconds+.4)},100))}},e.next=8,fetch(n);case 8:return c=e.sent,e.next=11,c.json();case 11:v=e.sent,f=v.avails,m=[],p=null,g=o(i),A=g.controlBar.progressControl,P=A.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),f.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t||t.length),m.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:k(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),r&&W(r),null!=m&&m.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),window.adsQueueList=m,"function"==typeof(j=(null===(L=window)||void 0===L||null===(D=L.customData)||void 0===D||null===(F=D.ads)||void 0===F?void 0:F.onAdBreaksLoaded)||null)&&j(m)),console.log(m,"data"),m.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,i=g.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",P.appendChild(o)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=a(function(){var e=g.currentTime();if(e!==T){T=e;for(var n=!1,t=function(){var t=m[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&&y.set(r,!0),Fn.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")),A.el().classList.add("hide-progress-bar");for(var d=e-r,u=0,c=0,v=0;v<a.length;v++){var f,p=null==a||null===(f=a[v])||void 0===f?void 0:f.durationInSeconds;if(d<u+p){c=v;break}u+=p}a[c];var g=Math.max(0,o-d),T=Math.round(g);M.style.display="block",G.textContent="".concat(c+1," of ").concat(a.length," • ").concat(O(T));var k=[];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)});k.push.apply(k,h(n))}),(null==t||null===(s=t.podSlotImpressionBeacon)||void 0===s?void 0:s.length)>0&&k.push.apply(k,h(null==t?void 0:t.podSlotImpressionBeacon)),C(e,t,k,c,i),"break"}w.delete(r)},i=0;i<m.length;i++){if("break"===t())break}if(window.isAdPlaying=n,p&&!g.seeking()&&(e>=p.podStart&&e<=p.podEndTime&&(p.entered=!0),p.entered&&e>=p.podEndTime)){var r=p.position;p=null,setTimeout(function(){g.currentTime(r),V(r)},300)}n||(M.style.display="none",A.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")),Fn.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(s=document)||void 0===s||s.addEventListener("keydown",function(e){if(Fn.enabled&&"ArrowRight"==e.key){var n=g.currentTime();yi(i,10),N(n,n+10),e.stopPropagation()}}),R=-1,A.el().addEventListener("pointerdown",function(e){0===e.button&&(R=g.currentTime(),document.addEventListener("pointermove",x),document.addEventListener("pointerup",U))}),null===(d=document)||void 0===d||null===(u=d.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach(function(e){return null==e?void 0:e.remove()}),(M=document.createElement("div")).className="ssai-ad-container",(B=document.createElement("div")).className="sponsored-adbox",(H=document.createElement("div")).className="sponsored-text",H.textContent="Sponsored Ad",B.append(H),(G=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",M.append(B),M.append(G),g.el().appendChild(M);case 47:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,L=-1;case 21:case"end":return e.stop()}},e)})),dt.apply(this,arguments)}function ut(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 ct(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)?ct(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 ct(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 vt(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 ft(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):vt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var mt={},pt=(null===(rt=window)||void 0===rt||null===(ot=rt.location)||void 0===ot||null===(at=ot.search)||void 0===at?void 0:at.includes("debug=true"))||!1,ht=null;function gt(e){return yt.apply(this,arguments)}function yt(){return yt=n(t.mark(function e(i){var r,l,s,d,u,c,v,f,m,p,g,y,w,T,_,b,I,E,S,k,A,O,P,L,D,C,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,r,a){var l,s,d=o(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=ut(t);try{for(f.s();!(v=f.n()).done;){var m,p,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===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(h=p.ads)||void 0===h?void 0:h.adEventHandler)||null,k="".concat(c,"_").concat(y),A="pod-".concat(u);L.has(A)||L.set(A,new Set);var O=L.get(A);if(pt&&console.warn(e,I,"map:",y,"condition1:",e>=I,"map:",L),e>=I&&e<=I+D&&!O.has(k)){O.add(k);try{C(y,n,E,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,n)}if("function"==typeof S)try{var P,F={eventType:y,startTimeInSeconds:T,startTime:_,durationInSeconds:b,ad:null==n||null===(P=n.ads)||void 0===P?void 0:P[r],adIndex:r};S({adsData:F}),Bn(i,F)}catch(e){console.error("Error when calling ads callback:",e)}var j=Qn.get();if(j&&0!==Object.keys(j).length){var R=j.formulateComscoreAdPayload,N=j.startComscoreAdTracking,V=j.finishComscoreAdTracking,W=j.endComscoreAdTracking;if("impression"===y){var x,U=Zn.get();N(R(ft(ft({},null==n||null===(x=n.ads)||void 0===x?void 0:x[r]),{},{trackingUrl:U})))}else"complete"===y?V():"breakEnd"===y&&W()}}}}catch(e){f.e(e)}finally{f.f()}}},C=function(e,n,t,i){var r,o,a;"breakEnd"===e&&(null===(r=mt)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(o=mt)||void 0===o?void 0:o.totalAds)&&(null==n||null===(a=n.ads)||void 0===a?void 0:a.length)>0||(pt&&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)})}))},g=function(){ht&&clearInterval(ht)},m=Zn.get(),(p=o(i)).one("loadeddata",function(){g(),ht=setInterval(function(){m&&!p.paused()&&P(m)},2e3)}),p.on("dispose",function(){g()}),y=new Map,w=new Map,T=-1,_=null,b=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,I=(null==p||null===(s=p.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,E=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==p||null===(u=p.el())||void 0===u||null===(c=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,k=(null==p||null===(v=p.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,A=!1,O=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 h(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 ft(ft({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},P=function(){var e=n(t.mark(function e(n){var r,l,s,d,u,c,v,f,m,p,g,P;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=new URL(n),_&&d.searchParams.append("nextToken",_),e.next=4,fetch(d.toString(),{method:"GET"});case 4:return u=e.sent,e.next=7,u.json();case 7:c=e.sent,v=c.avails,f=c.nextToken||null,_=f,m=[],p=o(i),g=null==p||null===(r=p.controlBar)||void 0===r?void 0:r.progressControl,P=null==g||null===(l=g.seekBar)||void 0===l?void 0:l.el(),null===(s=document)||void 0===s||s.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),v.map(function(e,n){m.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),pt&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),null!=m&&m.length&&(window.adsQueueList=m),m.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,i=p.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",P.appendChild(o)}}),p._timeUpdateHandler&&p.off("timeupdate",null==p?void 0:p._timeUpdateHandler),p._timeUpdateHandler=a(function(){if(Ti(i)){var e=null==p?void 0:p.currentTime();if(e!==T){T=e;for(var n=function(){var n=m[t],i=n.startTimeInSeconds,r=n.durationInSeconds,o=n.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var l;A=!!(e>=i&&e<=a&&Array.isArray(o)&&(null==o?void 0:o.length)>0),e>a&&y.set(i,!0),Fn.disable(),b&&b.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),k&&(k.style.pointerEvents="none",k.classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),g.el().classList.add("hide-progress-bar");for(var s=e-i,d=0,u=0,c=0;c<o.length;c++){var v,f=null==o||null===(v=o[c])||void 0===v?void 0:v.durationInSeconds;if(s<d+f){u=c;break}d+=f}setTimeout(function(){mt.totalAds=null==o?void 0:o.length,mt.currentAdIndex=u},1e3);var p=[];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)});p.push.apply(p,h(n))}),(null==n||null===(l=n.podSlotImpressionBeacon)||void 0===l?void 0:l.length)>0&&p.push.apply(p,h(null==n?void 0:n.podSlotImpressionBeacon)),F(e,n,p,u),"break"}w.delete(i)},t=0;t<m.length;t++){if("break"===n())break}A||(mt={},g.el().classList.remove("hide-progress-bar"),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),b&&b.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),k&&(k.style.pointerEvents="auto",k.classList.remove("vjs-hidden")),Fn.enable())}}},1e3),p.on("timeupdate",p._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,D=2.5;case 22:case"end":return e.stop()}},e)})),yt.apply(this,arguments)}var wt=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Tt(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 _t=function(){function e(n,t,i,r){b(this,e),this.video_=r,this.ad_=n,this.skipOffset_=function(e){if(!e)return null;var n=new RegExp(wt.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 I(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}(),bt="impression",It="start",Et="mute",St="unmute",kt="resume",At="pause",Ot="firstQuartile",Pt="midpoint",Lt="thirdQuartile",Dt="complete",Ct="skip",Ft="breakStart",jt="breakEnd",Rt="skipStateChanged",Nt="ad_impression",Vt="ad_started",Wt="ad_muted",xt="ad_volume_changed",Ut="ad_resumed",Mt="ad_paused",Bt="ad_first_quartile",Ht="ad_midpoint",Gt="ad_third_quartile",qt="ad_complete",zt="ad_stopped",Qt="ad_skipped",Yt="ad_skip_state_changed",Kt="ad_break_started",Xt="ad_break_ended",Jt="ads_loaded",$t="ad_cuepoints_changed";function Zt(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 ei(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Zt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function ni(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 ti(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)?ti(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 ti(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 ii="[Transmit]";function ri(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,m,p;a=e.data.avails,o=null!==(v=null!==(f=o)&&void 0!==f?f:e.data.nextToken)&&void 0!==v?v:null,r=null!==(m=null!==(p=r)&&void 0!==p?p:e.data.dashAvailabilityStartTime)&&void 0!==m?m:null}else Array.isArray(null==e?void 0:e.data)&&(a=e.data);return{avails:a,nextToken:o,dashAvailabilityStartTime:r}}var oi=function(){function e(n,t,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};b(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 I(e,[{key:"configure",value:function(e){this.config_=e}},{key:"addTrackingUrl",value:function(e){this.trackingUrl_=e||"",this.onEvent_({type:Jt,loadTime:0})}},{key:"getCuePoints",value:function(){var e,n=new Map,t=ni(this.adBreaks_);try{for(t.s();!(e=t.n()).done;){var i,r=ni(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,m,p,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=ri(d)).dashAvailabilityStartTime&&!a&&(a=u.dashAvailabilityStartTime),c=ni(u.avails);try{for(c.s();!(v=c.n()).done;)f=v.value,m=(null==f?void 0:f.availId)||"".concat(null==f?void 0:f.startTimeInSeconds),r.set(m,f)}catch(e){c.e(e)}finally{c.f()}if((p=u.nextToken||null)&&p!==this.nextToken_){e.next=22;break}return this.nextToken_=p,e.abrupt("break",25);case 22:this.nextToken_=p,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),Tt(this.adBreaks_)!==Tt(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(ii,"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=ni(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=ni((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 ei(ei({},e),{},{startTimeInSeconds:i,ads:(e.ads||[]).map(function(r){return ei(ei({},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(ii,"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=u();if(this.isHlsSource_()){var o,a,l=i,s=null===(o=this.player_)||void 0===o||null===(a=o.seekable)||void 0===a?void 0:a.call(o);return s&&s.length>0&&(l=s.end(s.length-1)),Date.now()/1e3-(l-i)}if(this.isDashSource_()){var d,c,v,f=this.getDashMediaPlayerTimelineSeconds_();if(null!=f)return f;var m=null===(d=this.player_)||void 0===d||null===(c=d.seekable)||void 0===c?void 0:c.call(d),p="function"==typeof(null===(v=this.player_)||void 0===v?void 0:v.currentTime)?this.player_.currentTime():i;if(m&&m.length>0){var h=m.start(0);if(h>1e6&&h+p>1e6)return h+p}if(this.apiTimelineAbsolute_&&(this.dashAvailabilityStartTime_||0)>1e9)return(this.dashAvailabilityStartTime_||0)+p}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(Ot)&&(this.eventsSent_.add(Ot),this.sendTrackingEvent_(Ot)),e>=i&&!this.eventsSent_.has(Pt)&&(this.eventsSent_.add(Pt),this.sendTrackingEvent_(Pt)),e>=r&&!this.eventsSent_.has(Lt)&&(this.eventsSent_.add(Lt),this.sendTrackingEvent_(Lt))}}},{key:"flushPendingQuartiles_",value:function(){for(var e=0,n=[Ot,Pt,Lt];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=ni(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 _t(a,o+1,r.length,this.video_),0===o&&this.sendTrackingEvent_(Ft),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_(jt),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_(bt),this.sendTrackingEvent_(It)),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_(Et):o.sendTrackingEvent_(St))}),this.attachAdListener_("play",function(){a?(o.sendTrackingEvent_(bt),o.sendTrackingEvent_(It),a=!1):o.sendTrackingEvent_(kt)}),this.attachAdListener_("pause",function(){o.sendTrackingEvent_(At)})}},{key:"removeCurrentAdListeners_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.sendTrackingEvent_(e?Ct:Dt),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=ni(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=ni(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=Qn.get();if(!e||0===Object.keys(e).length)return;var n=e.formulateComscoreAdPayload,t=e.startComscoreAdTracking,i=Zn.get();t(n(ei(ei({},this.transmitAd_),{},{trackingUrl:i})))}catch(e){console.warn(ii,"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=ni(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(ii,"beacon failed",n,e)})};for(s.s();!(a=s.n()).done;)d()}catch(e){s.e(e)}finally{s.f()}}var u=Qn.get(),c=u&&Object.keys(u).length?u:null;switch(e){case bt:this.onEvent_({type:Nt}),this.startComscoreForCurrentAd_();break;case It:this.onEvent_({type:Vt,ad:this.ad_});break;case Et:this.onEvent_({type:Wt});break;case St:this.onEvent_({type:xt});break;case kt:this.onEvent_({type:Ut});break;case At:this.onEvent_({type:Mt});break;case Ot:this.onEvent_({type:Bt});break;case Pt:this.onEvent_({type:Ht});break;case Lt:this.onEvent_({type:Gt});break;case Dt:this.onEvent_({type:qt}),this.onEvent_({type:zt}),null!=c&&c.finishComscoreAdTracking&&c.finishComscoreAdTracking();break;case Ct:this.onEvent_({type:Qt}),this.onEvent_({type:zt});break;case Ft:this.onEvent_({type:Kt});break;case jt:this.onEvent_({type:Xt}),null!=c&&c.endComscoreAdTracking&&c.endComscoreAdTracking();break;case Rt:this.onEvent_({type:Yt})}}else console.warn(ii,"sendTrackingEvent_ skipped — no active ad",{eventType:e})}}]),e}();function ai(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 li(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ai(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ai(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var si={dash:"tracking/initialize/dash",hls:"tracking/initialize/hls"};function di(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 ui(e,n,t){return ci.apply(this,arguments)}function ci(){return(ci=n(t.mark(function e(n,i,r){var o,a,l,s,d,u,c,v,f,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=di(n)){e.next=3;break}return e.abrupt("return",n);case 3:return a=wn(n.src,r,i),l=a.replace(o,si[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,m="https://".concat(f).concat(u),p="https://".concat(f).concat(c),Zn.set(p),console.log("[Transmit] session ready",{manifestUrl:m,trackingUrl:p}),e.abrupt("return",li(li({},n),{},{src:m}));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 vi=null;function fi(e,n){var t;if(vi)return console.log("[Transmit] initializeTransmit skipped — manager already initialised"),vi;var i=Zn.get();if(!i)return console.warn("[Transmit] initializeTransmit skipped — no tracking URL"),null;var r=o(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(vi=new oi(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}),vi.addTrackingUrl(i),vi.onManifestUpdated(),vi}function mi(){vi&&(vi.release(),vi=null)}function pi(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 hi=function(e){i(e).play()},gi=function(e){i(e).pause()},yi=function(e,n){var t=i(e),r=t.currentTime()+n;t.currentTime(r)},wi=function(e,n){var t=i(e),r=t.currentTime(),o=r<=n?0:r-n;t.currentTime(o)},Ti=function(e){return!!i.getPlayer("".concat(e))},_i=function(e){return i(e).paused()},bi=function(){var e=n(t.mark(function e(i,r){var a,l,d,u,c=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=c.length>2&&void 0!==c[2]&&c[2],e.next=3,_e();case 3:return l=e.sent,d=o(i),u=C.getConfig(),e.abrupt("return",new Promise(function(e,o){te(r,l).then(function(){var o=n(t.mark(function n(o){var l,c,v,f,m,p,h,g,y,w,T;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(mi(),p=null==o?void 0:o.data,s()||(window.sid=Je()),p.contentType="linearchannel",p.channelId=null==r?void 0:r.channelId,h=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(f=v.appcmsMain)||void 0===f?void 0:f.adsConfig)||{},g=!(null==p||null===(m=p.linearchannel)||void 0===m||!m.isSSAIEnabled),y=g&&"MEDIA_TAILOR"==(null==h?void 0:h.vodAdSticherProvider),w=g&&"TRANSMIT"==(null==h?void 0:h.liveAdSticherProvider)&&!(null==h||!h.liveAdClientSideTracking),T=_n(p,i),!y){n.next=17;break}return n.next=13,et(i,p);case 13:T=n.sent,a=!0,n.next=22;break;case 17:if(!w){n.next=22;break}return n.next=20,ui(T,p,i);case 20:T=n.sent,a=!0;case 22:ke(p),T&&a?(Ke(),sn(i,{analyticsCb:null==u?void 0:u.analyticsCb,analyticsEventParams:null==u?void 0:u.analyticsEventParams,userId:null==u?void 0:u.userId}),Ai(i,T),w?fi(i,{customData:window.customData||{ads:h}}):y&&gt(i),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:p})})):(Qn.get()&&0!==Object.keys(Qn.get()).length&&Yn({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 7:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Ii=function(){var e=n(t.mark(function e(i,r,a){var l,s,d,u,c,v,p,h;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_e();case 2:return u=e.sent,c=C.getConfig(),console.log("load video"),(Pe()||null)&&je(r),v=0,p=0,h=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(d=s.watchHistory)&&void 0!==d&&d.enable&&oe(r,u).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,(p=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedPercentage)||null)<95)&&(h=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedTime)||null)}).catch(function(){}),e.abrupt("return",new Promise(function(e,a){ne(r,u).then(function(){var r=n(t.mark(function n(r){var l,s,d,u,g,y,w,T,_,b,I,E,S,k,A,O,P,L,D,C,F,j,R,N,V,W,x,U,M,B,H,G,q,z,Q,Y,K,X,J,$,Z;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==r?void 0:r.data,P=(null==O?void 0:O.contentType)||"video",L=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(u=d.appcmsMain)||void 0===u?void 0:u.adsConfig)||{},D=!(null==O||null===(g=O[P])||void 0===g||!g.isSSAIEnabled),C=D&&"MEDIA_TAILOR"==(null==L?void 0:L.vodAdSticherProvider),F=D&&"TRANSMIT"==(null==L?void 0:L.liveAdSticherProvider)&&!(null==L||!L.liveAdClientSideTracking),j=!(null==O||null===(y=O[P])||void 0===y||null===(w=y.streamingInfo)||void 0===w||!w.isLiveStream)||"linearchannel"===P,ke(r.data),(R=(null==O||null===(T=O.ads)||void 0===T||null===(_=T.preRoll)||void 0===_||null===(b=_.adTags)||void 0===b||null===(I=b.web)||void 0===I?void 0:I.active)&&(null==O||null===(E=O.ads)||void 0===E||null===(S=E.preRoll)||void 0===S||null===(k=S.adTags)||void 0===k||null===(A=k.web)||void 0===A?void 0:A.url))&&Ln(i,R,O),N=_n(O,i),!C){n.next=17;break}return n.next=14,et(i,O);case 14:N=n.sent,n.next=22;break;case 17:if(!F||!j){n.next=22;break}return mi(),n.next=21,ui(N,O,i);case 21:N=n.sent;case 22:if(!N){n.next=40;break}if(Q=(null==O||null===(V=O.video)||void 0===V||null===(W=V.gist)||void 0===W?void 0:W.videoImageUrl)||(null==O||null===(x=O.video)||void 0===x||null===(U=x.gist)||void 0===U||null===(M=U.imageGist)||void 0===M?void 0:M.r16x9),Y=o(i)){n.next=28;break}return console.error("[VL][player-core] player not found for id=".concat(i),{player:Y}),n.abrupt("return",a({status:!1,msg:"Player not found",response:{}}));case 28:Y.poster(Q),Ke(),sn(i,{analyticsCb:null==c?void 0:c.analyticsCb,analyticsEventParams:null==c?void 0:c.analyticsEventParams,userId:null==c?void 0:c.userId}),Ai(i,N),F&&j?fi(i,{customData:window.customData||{ads:L}}):C&&st(i,h),Y.on("loadstart",function(){j&&e({status:!0,msg:"Video Loaded",response:O})}),Y.on("loadeddata",function(){On(),e({status:!0,msg:"Video Loaded",response:O})}),Y.one("play",function(){!v||C||F&&j||p<95&&setTimeout(function(){Y.currentTime(v)},0)}),Y.one("error",function(){var e;a({status:!1,msg:(null==Y||null===(e=Y.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==O||null===(B=O.video)||void 0===B||null===(H=B.contentDetails)||void 0===H||null===(G=H.closedCaptions)||void 0===G?void 0:G.length)>0||(null==O||null===(q=O.video)||void 0===q||null===(z=q.closedCaptions)||void 0===z?void 0:z.length)>0?(Z=(null==O||null===(X=O.video)||void 0===X||null===(J=X.contentDetails)||void 0===J?void 0:J.closedCaptions)||(null==O||null===($=O.video)||void 0===$?void 0:$.closedCaptions),K=Z.filter(function(e){return"VTT"===e.format}),m(i,K)):f(i),n.next=42;break;case 40:An(i,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed");case 42:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){Oi(e,i,a,r)})}));case 12:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),Ei=function(e,n,t){var i=o(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)})})},Si=function(e){mi();var n=o(e),t=(Qn.get()||{}).destroyComscoreTag;if(ki(),t&&t(),l(),window.onresize=null,n)n.dispose();else{var i=document.getElementById(e);i&&i.remove()}},ki=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()},Ai=function(e,n){console.log("load video in core",n);var t=o(e);t&&t.src(n)},Oi=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);Ti(t)&&An(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?pi(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):pi(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}))},Pi=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")};export{ce as $,N as A,V as B,W as C,Ie as D,ne as E,oe as F,Oi as G,_e as H,te as I,ie as J,dn as K,Re as L,Oe as M,Ei as N,yi as O,hi as P,gi as Q,wi as R,Ti as S,Ii as T,bi as U,Si as V,se as W,Hn as X,Ee as Y,le as Z,be as _,cn as a,de as a0,S as a1,lt as a2,Dn as a3,Le as a4,_i as a5,De as a6,fi as a7,gt as a8,st as a9,ae as aa,Fe as ab,je as ac,Pe as b,Qn as c,un as d,Ae as e,_n as f,$e as g,ke as h,Yn as i,On as j,An as k,Ai as l,Ce as m,Pi as n,ui as o,C as p,sn as q,Ln as r,re as s,Zn as t,kn as u,Se as v,et as w,F as x,K as y,j as z};
@@ -1 +0,0 @@
1
- import t from"@babel/runtime/helpers/classCallCheck";import e from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/get";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}var s={startTime:0,timeLive:3600},u=0,p=s.timeLive,c=i.getComponent("Button"),h=i.getComponent("Component"),d=i.getComponent("ProgressControl"),m=d.getComponent("SeekBar"),f=d.getComponent("PlayProgressBar"),v=d.getComponent("LoadProgressBar"),_=i.getComponent("MouseTimeDisplay");v.prototype.update=function(t){var e=this.player_.buffered(),r=this.player_.duration(),o=this.player_.bufferedEnd(),n=this.partEls_,a=function(t,e){var r=t/e||0;return 100*(r>=1?1:r)+"%"};0!==a(o,r)&&(this.el_.style.width=a(o,r));for(var i=0;i<e.length;i++){var l=e.start(i),s=e.end(i),u=n[i];u||(u=this.el_.appendChild(document.createElement("div")),n[i]=u),0!==a(l,o)&&(u.style.left=a(l,o)),0!==a(s-l,o)&&(u.style.width=a(s-l,o))}for(var p=n.length;p>e.length;p--)this.el_.removeChild(n[p-1]);n.length=e.length},m.prototype.update_=function(t,e){var r=this.player_.duration(),o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),r!==Number.POSITIVE_INFINITY&&this.el_.setAttribute("aria-valuetext","-".concat(i.formatTime(r-o,r))),this.bar.update(i.dom.getBoundingClientRect(this.el_),e)},m.prototype.handleMouseMove=function(t){var e=1-this.calculateDistance(t),r=this.player_.seekable().end(0)-e*p;r===this.player_.duration()&&(r-=.1),this.player_.currentTime(r),this.update()},f.prototype.update=function(t,e){var r=this,o=this.player_.duration();this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var n=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),a=i.formatTime(o-n,o);0!==e&&o!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(t,e,"-".concat(a))})},_.prototype.update=function(t,e){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var o=i.formatTime(p-e*p,p);r.el_.style.left="".concat(t.width*e,"px"),0!==e&&r.player_.duration()!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(t,e,"-".concat(o))})};var y=function(t){var e=this;t||(t=s),this.on("timeupdate",function(t){var r,o;(o=(r=e).seekable())&&o.length&&(o.end(0)-r.currentTime()<20?r.controlBar.liveButton.addClass("onair"):r.controlBar.liveButton.removeClass("onair"),r.duration(r.seekable().end(0)),u||(u=p=r.seekable().end(0)))}),this.on("pause",function(t){e.controlBar.liveButton.removeClass("onair")}),this.ready(function(){var r;r=e,i.mergeOptions(s,t),r.addClass("vjs-dvr-seekbar"),r.controlBar.addClass("vjs-dvr-control-bar"),r.controlBar.progressControl.seekBar.__proto__.__proto__.update=function(){if(this.el_){var t;t="VolumeBar"===this.name_?this.getPercent():1-(this.player_.duration()-this.player_.currentTime())/p;var e=this.bar;if(e){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0),t>1&&(t=1);var r=(100*t).toFixed(2)+"%",o=e.el().style;return 0!==t&&(this.vertical()?o.height=r:o.width=r),t}}},r.controlBar.progressControl&&r.controlBar.progressControl.addClass("vjs-dvr-progress-control"),r.controlBar.liveButton=r.controlBar.addChild("liveButton"),r.controlBar.el().insertBefore(r.controlBar.liveButton.el(),r.controlBar.progressControl.el())})},C=function(){o(p,c);var i,s,u=(i=p,s=l(),function(){var t,e=a(i);if(s){var r=a(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return n(this,t)});function p(e,r){var o;return t(this,p),(o=u.call(this,e,r)).el().innerHTML='<span class="liveCircle"></span><span class="liveText">LIVE</span>',e.paused()||o.addClass("onair"),o}return e(p,[{key:"buildCSSClass",value:function(){return"vjs-live-button ".concat(function(t,e,o,n){var i=r(a(1&n?t.prototype:t),e,o);return 2&n&&"function"==typeof i?function(t){return i.apply(o,t)}:i}(p,"buildCSSClass",this,3)([]))}},{key:"handleClick",value:function(t){var e=this.player_.seekable().end(0);this.player_.currentTime(e),this.player_.play()}}]),p}();h.registerComponent("LiveButton",C),(i.registerPlugin||i.plugin)("dvrSeekbar",y);export{y as default};
@@ -1 +0,0 @@
1
- import{h as l,d as i,e as o,o as e,p as n,q as r}from"./features-d065e47f.js";import{g as a}from"./skin-3653c5b3.js";import{a as t,b as d}from"./index-7db11ad8.js";import{i as u}from"./index-4a95669c.js";import{a as s}from"./browser-de5f6a74.js";import"videojs-contrib-quality-menu";import{r as v}from"./relatedVideosManager-81661348.js";import c from"video.js";import{f as p,a3 as m,a7 as b,a8 as f,e as y,a9 as g,m as h}from"./generic-e783464c.js";import{c as j,d as k}from"./icons-262bef63.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-620d93b3.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-8dd79ed6.js";import"./index-8a99e78b.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"md5";import"js-cookie";import"./captions-92c899aa.js";import"@viewlift/comscore/index.js";function w(i,o){var e,n=a(i),r=(null==o||null===(e=o.res)||void 0===e?void 0:e.siteId)||"";n&&(n.on("loadeddata",function(){var l,e,n,d,c,p,m,b;!function(l){var i=a(l);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(i);var f=(null===(l=v.get())||void 0===l||null===(e=l.content)||void 0===e?void 0:e.length)>0;if(!(null!=o&&null!==(n=o.series)&&void 0!==n&&n.enable||null!==(d=window)&&void 0!==d&&null!==(c=d.app_data)&&void 0!==c&&null!==(p=c.appcmsMain)&&void 0!==p&&null!==(m=p.features)&&void 0!==m&&m.auto_play||f)||null!=o&&o.liveVideo){if(!(null!=o&&o.liveVideo||null!=o&&null!==(b=o.series)&&void 0!==b&&b.enable)){var y;y=v.subscribe(function(l){var e;(null==l||null===(e=l.content)||void 0===e?void 0:e.length)>0&&(t(i,o),y&&y())})}}else t(i,o);null!=o&&o.liveVideo||s()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===r||u(i)}),n.one("play",function(){var o,e,n,r;null!==(o=window)&&void 0!==o&&null!==(e=o.customData)&&void 0!==e&&e.iframeOverlayUrl&&l(i,null===(n=window)||void 0===n||null===(r=n.customData)||void 0===r?void 0:r.iframeOverlayUrl)}))}function C(l,t){a(l).addClass("skin_vlone"),w(l,t),function(l,t){var u,s,c,w,C,B,T,A=a(l),V=(null==t?void 0:t.liveVideo)||!1,L=(null==t||null===(u=t.res)||void 0===u?void 0:u.contentType)||"video",S=(null==t||null===(s=t.res)||void 0===s||null===(c=s[L])||void 0===c?void 0:c.isSSAIEnabled)||!1,_=p(null==t?void 0:t.res,l)||{};_.src;var M=(null==t?void 0:t.skin_settings)||{},q=(null==t||null===(w=t.customData)||void 0===w?void 0:w.ads)||{};if(V&&(null==t||!t.liveui)){var x,E,R=(null==A||null===(x=A.controlBar)||void 0===x||null===(E=x.getChild("LiveDisplay"))||void 0===E?void 0:E.el())||null;if(R){var O,P;R.onclick=function(){try{var l;null==A||null===(l=A.liveTracker)||void 0===l||l.seekToLiveEdge()}catch(l){console.log(l,"Cannot seek to LE")}};var D=R.querySelector(".vjs-live-display")||R,I=function(){var l,i,o,e=null===(l=null==A||null===(i=A.liveTracker)||void 0===i||null===(o=i.atLiveEdge)||void 0===o?void 0:o.call(i))||void 0===l||l;D.classList.toggle("vjs-behind-live",!e)};null==A||null===(O=A.liveTracker)||void 0===O||null===(P=O.on)||void 0===P||P.call(O,"liveedgechange",I),I()}}null!=M&&M.skipBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&i(l,"VL_ONE",j());(null!=M&&M.rewindBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&o(l,"VL_ONE",k());var H,N=v.get();(null==N||null===(C=N.content)||void 0===C?void 0:C.length)>0&&e(l,N);H=v.subscribe(function(i){var o,n,r=a(l);(null==r||null===(o=r.controlBar)||void 0===o||!o.getChild("videoSelector"))&&(null==i||null===(n=i.content)||void 0===n?void 0:n.length)>0&&(e(l,i),H&&H())}),null!=t&&null!==(B=t.series)&&void 0!==B&&B.enable&&n(l,t);(null==t||null===(T=t.streams)||void 0===T?void 0:T.length)>1&&r(l,null==t?void 0:t.streams);if(d(l,t),m(l,t),S&&V&&"TRANSMIT"==(null==q?void 0:q.liveAdSticherProvider)&&!(null==q||!q.liveAdClientSideTracking))b(l,t);else if("MEDIA_TAILOR"==(null==q?void 0:q.vodAdSticherProvider)&&null!=q&&q.vodAdClientSideTracking&&S)if(V)f(l);else{var G,U=null;if(null!=t&&null!==(G=t.series)&&void 0!==G&&G.enable){var $,F,z,J,K,Q=null===($=y())||void 0===$||null===(F=$.video)||void 0===F||null===(z=F.gist)||void 0===z?void 0:z.id,W=h(),X=(null==W?void 0:W.get(Q))||{t:0,p:0},Y=X.t,Z=X.p;"function"==typeof(null===(J=window)||void 0===J||null===(K=J.watchHistory)||void 0===K?void 0:K.cb)&&window.watchHistory.cb({watchedTime:Y}),Z<95&&(U=Y)}else{var ll=t.watchHistoryResumeTime;t.watchedPercentage<95&&(U=ll)}g(l,U)}}(l,t),B(l,t)}var B=function(l,i){var o,e,n,r,t,d,u,s,v,p,m,b,f=a(l),y=(null==i?void 0:i.theme)||{},g=c.dom.$(".vjs-play-progress"),h=c.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(o=window)||void 0===o||null===(e=o.app_data)||void 0===e||null===(n=e.appcmsMain)||void 0===n||null===(r=n.brand)||void 0===r||null===(t=r.cta)||void 0===t||null===(d=t.primary)||void 0===d?void 0:d.backgroundColor)),g&&(g.style.background="".concat(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(v=s.appcmsMain)||void 0===v||null===(p=v.brand)||void 0===p||null===(m=p.cta)||void 0===m||null===(b=m.primary)||void 0===b?void 0:b.backgroundColor));var j=f.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&g&&(g.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&j&&(j.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&h&&(h.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};export{C as initialiseSkin};