@viewlift/player-backup 2.0.187-backup → 2.0.189-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-22652dfa.js → autoNextVideo-41da3adf.js} +1 -1
- package/cjs/bundle.css +34 -34
- package/cjs/{features-9cfbe682.js → features-284139cb.js} +1 -1
- package/cjs/generic-3f615bbd.js +1 -0
- package/cjs/{index-03e2cd90.js → index-5ecb7b79.js} +1 -1
- package/cjs/index-a351a4af.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-8c346b54.js +1 -0
- package/cjs/multicamv2-b126168c.js +1 -0
- package/cjs/nextEpisodeButton-2aea8a15.js +1 -0
- package/cjs/playlist-46f67a06.js +1 -0
- package/cjs/series-332e15bd.js +1 -0
- package/cjs/series-v2-5781b71a.js +1 -0
- package/cjs/series-v2-76d68ef3.js +1 -0
- package/cjs/skin-0e3d2dae.js +1 -0
- package/cjs/skin-1276d8ca.js +1 -0
- package/cjs/skin-4a149a9d.js +1 -0
- package/cjs/skin-8cf82be0.js +1 -0
- package/cjs/skin-8e6bcb6e.js +1 -0
- package/cjs/skin-e2f59bb3.js +1 -0
- package/cjs/skin-ed9c145d.js +1 -0
- package/cjs/{util-d1548c88.js → util-f7cfcd68.js} +1 -1
- package/cjs/videoSelector-3e0e5f6d.js +1 -0
- package/cjs/videoSelector-adf04e66.js +1 -0
- package/esm/{autoNextVideo-371fc9f9.js → autoNextVideo-85755fc4.js} +1 -1
- package/esm/bundle.css +34 -34
- package/esm/{features-f1d3d118.js → features-2ce15d85.js} +1 -1
- package/esm/generic-e4c9d7b0.js +1 -0
- package/esm/{index-8a921112.js → index-262b4925.js} +1 -1
- package/esm/index-da58bd54.js +1 -0
- package/esm/index.js +1 -1
- package/esm/multicamv2-00f6316c.js +1 -0
- package/esm/multicamv2-078f2b28.js +1 -0
- package/esm/nextEpisodeButton-bd252447.js +1 -0
- package/esm/playlist-6202f8d9.js +1 -0
- package/esm/series-735c0487.js +1 -0
- package/esm/series-v2-9c335821.js +1 -0
- package/esm/series-v2-a70bbbc4.js +1 -0
- package/esm/skin-02150ba0.js +1 -0
- package/esm/skin-41ef2916.js +1 -0
- package/esm/skin-54602099.js +1 -0
- package/esm/skin-813694d1.js +1 -0
- package/esm/skin-9c1ff8cb.js +1 -0
- package/esm/skin-a8a8d569.js +1 -0
- package/esm/skin-c6f71ba5.js +1 -0
- package/esm/{util-a0bb1689.js → util-2fa0573e.js} +1 -1
- package/esm/utilities/comscore.d.ts +4 -0
- package/esm/videoSelector-4360ad52.js +1 -0
- package/esm/videoSelector-b8ec9374.js +1 -0
- package/package.json +2 -1
- package/cjs/generic-d35f6dee.js +0 -1
- package/cjs/index-20a8f9d3.js +0 -1
- package/cjs/multicamv2-10c8a198.js +0 -1
- package/cjs/multicamv2-909f6195.js +0 -1
- package/cjs/nextEpisodeButton-9d58d26a.js +0 -1
- package/cjs/playlist-3e63d87f.js +0 -1
- package/cjs/series-d40a41ed.js +0 -1
- package/cjs/series-v2-6d1eeea2.js +0 -1
- package/cjs/series-v2-c01faea8.js +0 -1
- package/cjs/skin-0c2336f4.js +0 -1
- package/cjs/skin-2ea7faaf.js +0 -1
- package/cjs/skin-5e2c1ffd.js +0 -1
- package/cjs/skin-8519f6ab.js +0 -1
- package/cjs/skin-e7711ae6.js +0 -1
- package/cjs/skin-e9d5b0e1.js +0 -1
- package/cjs/skin-f9b64c74.js +0 -1
- package/cjs/videoSelector-540fe935.js +0 -1
- package/cjs/videoSelector-9349e072.js +0 -1
- package/esm/generic-f1cad267.js +0 -1
- package/esm/index-8fdfd90c.js +0 -1
- package/esm/multicamv2-dbbab362.js +0 -1
- package/esm/multicamv2-ffe2f040.js +0 -1
- package/esm/nextEpisodeButton-30d09255.js +0 -1
- package/esm/playlist-a8634369.js +0 -1
- package/esm/plugins/comscore_dist/index.min.d.ts +0 -51
- package/esm/series-77060f82.js +0 -1
- package/esm/series-v2-4ab00b80.js +0 -1
- package/esm/series-v2-fef2fd81.js +0 -1
- package/esm/skin-02c6353e.js +0 -1
- package/esm/skin-096756f6.js +0 -1
- package/esm/skin-17b1ff2a.js +0 -1
- package/esm/skin-2e0eb419.js +0 -1
- package/esm/skin-3597ca56.js +0 -1
- package/esm/skin-45f73b69.js +0 -1
- package/esm/skin-801a41e9.js +0 -1
- package/esm/videoSelector-360a2631.js +0 -1
- package/esm/videoSelector-f362ee71.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as l,d as e,e as i,j as n,k as t,l as o,m as s}from"./features-2ce15d85.js";import{f as r}from"./icons-37daa6b3.js";import{g as C}from"./player_instance-34118a5b.js";import{p as a,e as u}from"./skin-d5091b86.js";import{g as d}from"./resolution-1c59b0f3.js";import{a as v,i as c,b as p}from"./index-262b4925.js";import{S as h,d as m}from"./generic-e4c9d7b0.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"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-a8a254c2.js";import"./autoNextVideo-85755fc4.js";import"./util-2fa0573e.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"@viewlift/comscore/index.js";function f(f,b){C(f).addClass("skin_news"),function(){"Chrome"==m()&&import("./chromett-a3cbb2e1.js").then((function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)}));import("./skin-9fece9a0.js").then((function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)}))}(),function(e,i){var n=C(e);n&&n.on("loadeddata",(function(){var n,t,o,s,r,C;(null===(n=d(e))||void 0===n?void 0:n.length)>0&&l(e,i),!(null!=i&&null!==(t=i.series)&&void 0!==t&&t.enable||null!==(o=window)&&void 0!==o&&null!==(s=o.app_data)&&void 0!==s&&null!==(r=s.appcmsMain)&&void 0!==r&&null!==(C=r.features)&&void 0!==C&&C.auto_play)||null!=i&&i.liveVideo||v(e,i),null!=i&&i.liveVideo||h()||c(e)}))}(f,b),function(l,e){var i,n,t,o,s,r,d,v,c,p,h,m,f,b,B,y,L,j,g=C(l);null===(i=g.controlBar)||void 0===i||i.removeChild("VolumePanel"),null===(n=g.controlBar)||void 0===n||n.addChild("VolumePanel",{inline:!1},1);var w=null===(t=g.controlBar)||void 0===t?void 0:t.getChild("ProgressControl"),E=document.createElement("div");E.className="custom-spaced-progress-bar",w&&E.append(w.el());null===(o=g.controlBar)||void 0===o||null===(s=o.el())||void 0===s||s.append(E);var V='<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\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>';g.el().insertBefore(a(V),null!==(r=g.el().firstChild)&&void 0!==r?r:null);var x=(null==g||null===(d=g.controlBar)||void 0===d||null===(v=d.getChild("PlayToggle"))||void 0===v||null===(c=v.el())||void 0===c?void 0:c.firstChild)||null;if(x){x.style.height="24px",x.style.width="24px";var M=u(x,g.paused()?"#vjs-icon-play":"#vjs-icon-pause");g.on("pause",(function(){return M.setAttributeNS(null,"href","#vjs-icon-play")})),g.on("play",(function(){return M.setAttributeNS(null,"href","#vjs-icon-pause")}))}var k=(null==g||null===(p=g.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(k){k.style.height="24px",k.style.width="24px";var Z=u(k,"#vjs-icon-fullscreen");g.on("fullscreenchange",(function(){var l=g.isFullscreen_;null==Z||Z.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var S=(null==g||null===(f=g.controlBar)||void 0===f||null===(b=f.getChild("VolumePanel"))||void 0===b?void 0:b.el())||null;if(S){var N=S.querySelector(".vjs-mute-control .vjs-icon-placeholder");N.classList.add("vjs-svg-icon"),N.style.height="24px",N.style.width="24px";var A=u(N,g.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");g.on("volumechange",(function(l){var e=g.volume();console.log(e,g.muted()),0==e||g.muted()?A.setAttributeNS(null,"href","#vjs-icon-mute"):e>0&&e<=.3?A.setAttributeNS(null,"href","#vjs-icon-volume1"):e>=.3&&e<=.7?A.setAttributeNS(null,"href","#vjs-icon-volume2"):A.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var _=(null==g||null===(B=g.controlBar)||void 0===B||null===(y=B.getChild("PictureInPictureToggle"))||void 0===y?void 0:y.el())||null;if(_){var H=null==_?void 0:_.querySelector(".vjs-icon-placeholder");H.style.height="16px",H.style.width="25px";var P=u(H,"#vjs-icon-pip");g.on("enterpictureinpicture",(function(){P.setAttributeNS(null,"href","#vjs-icon-pip")}))}var T=(null==g||null===(L=g.controlBar)||void 0===L||null===(j=L.getChild("SubsCapsButton"))||void 0===j?void 0:j.el())||null;if(T){var I=T.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");I.classList.add("vjs-svg-icon"),I.style.height="16px",I.style.width="29px";var q=u(I,"#vjs-icon-caps");q.setAttributeNS(null,"href","#vjs-icon-captions-off"),g.textTracks().on("change",(function(l){for(var e=g.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?q.setAttributeNS(null,"href","#vjs-icon-captions"):q.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}}(f),function(l,C){var a,u,d,v,c,p,h=(null==C?void 0:C.skin_settings)||{};null==h||h.slowMoBtn,null!=h&&h.skipBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)&&e(l,"VL_ONE",SkipSvgV2());(null!=h&&h.rewindBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)||1==(null==C?void 0:C.liveui))&&i(l,"VL_ONE",r());(null==C||null===(a=C.relatedVideos)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&n(l,null==C?void 0:C.relatedVideos);(null==C||null===(d=C.streams)||void 0===d?void 0:d.length)>1&&t(l,null==C?void 0:C.streams);(null==C||null===(v=C.playlist)||void 0===v||null===(c=v.content)||void 0===c?void 0:c.length)>0&&o(l,null==C?void 0:C.playlist);null!=C&&null!==(p=C.series)&&void 0!==p&&p.enable&&s(l,C)}(f,b),p(f,b)}export{f as initialiseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as l,g as e,h as o,d as i,e as n,i as t,j as r,k as a,l as d,m as s}from"./features-2ce15d85.js";import{M as u,a as m,c as v,d as p}from"./icons-37daa6b3.js";import{g as c}from"./player_instance-34118a5b.js";import{b as h}from"./skin-d5091b86.js";import{g as f}from"./resolution-1c59b0f3.js";import{g as b}from"./captions-f507e8ee.js";import{a as g,i as C,b as j}from"./index-262b4925.js";import{S as y,d as V}from"./generic-e4c9d7b0.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"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-a8a254c2.js";import"./autoNextVideo-85755fc4.js";import"./util-2fa0573e.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"@viewlift/comscore/index.js";function w(w,B){c(w).addClass("skin_defaultv2"),function(){"Chrome"==V()&&import("./chromett-a3cbb2e1.js").then((function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)}));import("./skin-fbab87d5.js").then((function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)}))}(),function(i,n){var t=c(i);t&&(t.on("loadeddata",(function(){var o,t,r,a,d,s,u;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(t=b(i))||void 0===t?void 0:t.length)>0&&e(i,n),!(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(s=d.appcmsMain)&&void 0!==s&&null!==(u=s.features)&&void 0!==u&&u.auto_play)||null!=n&&n.liveVideo||g(i,n),null!=n&&n.liveVideo||y()||C(i)})),t.one("play",(function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}(w,B),function(l,e){var o,i,n,t,r,a,d,s,v,p,f,b,g,C=c(l);null===(o=C.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(i=C.controlBar)||void 0===i||i.addChild("VolumePanel",{inline:!1},1);var j=null===(n=C.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),y=null===(t=C.controlBar)||void 0===t?void 0:t.getChild("CurrentTimeDisplay"),V=null===(r=C.controlBar)||void 0===r?void 0:r.getChild("SeekToLive"),w=document.createElement("div");w.className="custom-spaced-progress-bar",j&&y&&V&&w.append(j.el(),y.el(),V.el());null===(a=C.controlBar)||void 0===a||null===(d=a.el())||void 0===d||d.append(w),null==C||null===(s=C.controlBar)||void 0===s||null===(v=s.getChild("FullscreenToggle"))||void 0===v||null===(p=v.el())||void 0===p||p.appendChild(h(u(window.controlsColor))),null==C||null===(f=C.controlBar)||void 0===f||null===(b=f.getChild("FullscreenToggle"))||void 0===b||null===(g=b.el())||void 0===g||g.appendChild(h(m(window.controlsColor)));var B=document.getElementsByClassName("vjs-time-control");e.liveVideo&&B[0]&&(B[0].style.display="none")}(w,B),function(l,e){var o,u,m,c,h,f,b=(null==e?void 0:e.skin_settings)||{},g=0!=(null==b?void 0:b.slowMoBtn);0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",v());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());!e.liveVideo&&g&&t(l);(null==e||null===(o=e.relatedVideos)||void 0===o||null===(u=o.content)||void 0===u?void 0:u.length)>0&&r(l,null==e?void 0:e.relatedVideos);(null==e||null===(m=e.streams)||void 0===m?void 0:m.length)>1&&a(l,null==e?void 0:e.streams);(null==e||null===(c=e.playlist)||void 0===c||null===(h=c.content)||void 0===h?void 0:h.length)>0&&d(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&s(l,e)}(w,B),j(w,B)}export{w as initialiseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as r}from"./generic-e4c9d7b0.js";import{g as t}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./captions-f507e8ee.js";import"./skin-d5091b86.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function o(e){n(e),i(e)}var i=function(o){var i=t(o),n=document.getElementById("".concat(o));n&&n.addEventListener("touchstart",(function(){i.paused()?e(o):r(o)}))},n=function(e){var r=t(e);r.requestFullscreen=function(){},r.controlBar.hide()};export{o as initaliseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as t,c as o,d as s,e as i}from"./features-2ce15d85.js";import{R as n}from"./generic-e4c9d7b0.js";import{S as r,M as l,a,N as m,b as d,R as u}from"./icons-37daa6b3.js";import{g as p}from"./player_instance-34118a5b.js";import{b as c}from"./skin-d5091b86.js";import{a as b}from"./currentVideoInfo-a8a254c2.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"video.js";import"./resolution-1c59b0f3.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function v(v,f){p(v).addClass("skin_default"),n(v,f),import("./skin-71be210e.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",d());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"default",u())}(v,f),function(s,i){var n=p(s),l=(null==i?void 0:i.sres)||null;n.on("loadeddata",(function(){e(s,"default",r()),l&&import("./nextEpisodeButton-bd252447.js").then((function(e){e.initaliseFunctionality(i.sres.seasons,b())}))})),n.one("loadedmetadata",(function(){var e;l&&(t(s,null==i||null===(e=i.sres)||void 0===e?void 0:e.seasons,i),o(i.sres,i.res,s))}))}(v,f),function(e,t){var o,s,i,n,r=p(e),d=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],b=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(d&&(d.style.display="none"),u&&(u.style.display="none"),b&&(b.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(c(l(window.controlsColor))),null===(i=r.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(c(a(window.controlsColor)));var v=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(c(m()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from"@babel/runtime/helpers/typeof";import{
|
|
1
|
+
import n from"@babel/runtime/helpers/typeof";import{Q as e}from"./generic-e4c9d7b0.js";import{a as t,v as o}from"./currentVideoInfo-a8a254c2.js";import{g as i}from"./player_instance-34118a5b.js";var a=!1,r=function(n,e,t){var o=i(n);o?e>=0&&e<=o.duration()?(t({status:!0,msg:"Successfully seeked to timestamp : ".concat(e)}),o.currentTime(e)):t({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):t("Cannot find player with id: '".concat(n,"'"))},c=function(n,r){var c=i(n);c?(c.on("ended",(function(){return a=!0})),c.on("timeupdate",(function(){if(!c.paused()&&a){var n,i,u=null===(n=t())||void 0===n||null===(i=n.video)||void 0===i?void 0:i.id;o.get(u)?(o.clear(),e.clear(),r(),o.set(u)):(o.clear(),o.set(u)),a=!1}}))):r("Cannot find player with id: '".concat(n,"'"))},u=function(n,e){var t=i(n);if(!t)return"Cannot find player with id: '".concat(n,"'");try{return t.playbackRate(e),"Playback speed set to ".concat(e,"x")}catch(n){return"Error: ".concat(n)}},l=function(n,e){var t=i(n);t?t.on("timeupdate",(function(){return e(t.currentTime())})):e("Cannot find player with id: '".concat(n,"'"))},s=function(n,e){var t=i(n);t?t.on("ended",(function(){return e(!0)})):e("Cannot find player with id: '".concat(n,"'"))},d=function(n){var e=i(n);return e?e.duration():"Cannot find player with id: '".concat(n,"'")};function f(){var e=function(n,e){var t=i(n);if(!t)throw"Cannot find player with id: '".concat(n,"'");if("function"!=typeof e)throw"Callback function (cb) is missing or not a function";return t};return{onPlay:function(n,t){e(n,t).on("play",(function(){return t()}))},onPause:function(n,t){e(n,t).on("pause",(function(){return t()}))},onMute:function(n,t){var o=e(n,t);o.on("volumechange",(function(){o.muted()?t({muted:!0}):t({muted:!1})}))},onPictureInPictureChange:function(n,t){var o=e(n,t);o.on("enterpictureinpicture",(function(){t({pip:!0})})),o.on("leavepictureinpicture",(function(){t({pip:!1})}))},onFullScreenChange:function(n,t){var o=e(n,t);o.on("fullscreenchange",(function(n){o.isFullscreen_?t({isFullscreen:!0}):t({isFullscreen:!1})}))},onSetVolume:function(n,t){var o=e(n,t);o.on("volumechange",(function(){var n=100*o.volume().toFixed(2);o.muted()?t({vol:0}):t({vol:n})}))},onSeeked:function(n,t){var o=e(n,t);o.on("seeked",(function(){t({seeked:o.currentTime()})}))},onSubtitleEnable:function(n,t){var o=e(n,t);o.textTracks().on("change",(function(n){console.log(o.textTracks());var e=o.textTracks().tracks_.filter((function(n){return("subtitles"===n.kind||"captions"===n.kind)&&"showing"===n.mode}));e.length>0&&t({enabled:e[0]})}))},onDisableSubtitles:function(n,t){var o=e(n,t);o.textTracks().on("change",(function(n){var e,i;console.log(o.textTracks()),(null==o||null===(e=o.textTracks())||void 0===e||null===(i=e.tracks_)||void 0===i?void 0:i.every((function(n){return"showing"!=n.mode})))&&t({captions_disabled:!0})}))},onSubtitleCueChange:function(t,o){var i=e(t,o);i.on("loadeddata",(function(){var e,t,a,r,c,u=i.textTracks();"object"==n(i.dash)&&null!=i.dash&&i.dash.mediaPlayer.on(null===(t=window)||void 0===t||null===(a=t.dashjs)||void 0===a||null===(r=a.MediaPlayer)||void 0===r||null===(c=r.events)||void 0===c?void 0:c.CAPTION_RENDERED,(function(n){o(n)}));for(var l=0;l<u.length;l++){var s=u[l];"metadata"===s.kind&&(s.mode="hidden",e=s)}e&&e.addEventListener("cuechange",(function(){var n=e.activeCues;if(n&&n.length>0)for(var t=0;t<n.length;t++){var i=n[t];o(i)}else console.log("no active cue at this moment")}))}))},onError:function(n,t){var o=e(n,t);o.on("error",(function(){var n,e;t({error:null==o||null===(n=o.error())||void 0===n?void 0:n.code,msg:null==o||null===(e=o.error())||void 0===e?void 0:e.message})}))}}}export{s as a,u as b,c,d as g,l as o,f as p,r as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as l}from"./icons-37daa6b3.js";import{E as s}from"./generic-e4c9d7b0.js";import{k as c}from"./currentVideoInfo-a8a254c2.js";import{g as d,s as m,j as p,k as u,l as v}from"./skin-d5091b86.js";import{a as h}from"./autoNextVideo-85755fc4.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-2fa0573e.js";import"@babel/runtime/helpers/typeof";function b(e){var t=y();return function(){var o,a=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(a,arguments,r)}else o=a.apply(this,arguments);return n(this,o)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var g=a.getComponent("Component"),C=function(n){o(y,g);var i=b(y);function y(t){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(a=i.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(c(0),h({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(y,[{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("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return a.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=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(d(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",m(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),a.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=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),d=a.dom.createEl("div",{className:"video-selector-content"}),m=a.dom.createEl("div",{className:"video-container"}),p=function(e){var o,n,i,r,l,p=a.dom.createEl("div",{className:"video -".concat(e)}),u=a.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){c(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(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===(r=i.customData)||void 0===r?void 0:r.fallbackImage)),h.alt="No Thumbnail Available",u.append(h);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(p,u),a.dom.appendContent(p,f),a.dom.appendContent(m,p),a.dom.appendContent(d,m)},h=0;h<this.videos.length;h++)p(h);a.dom.appendContent(n,i),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,d),u(this.playerId,e)}}]),y}();export{C as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as l,e as s}from"./icons-37daa6b3.js";import{E as d}from"./generic-e4c9d7b0.js";import{k as r}from"./currentVideoInfo-a8a254c2.js";import{g as c,s as m,j as u,h as v,k as p,i as h}from"./skin-d5091b86.js";import{a as y}from"./autoNextVideo-85755fc4.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-2fa0573e.js";import"@babel/runtime/helpers/typeof";function f(e){var t=C();return function(){var o,a=i(e);if(t){var l=i(this).constructor;o=Reflect.construct(a,arguments,l)}else o=a.apply(this,arguments);return n(this,o)}}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var g=a.getComponent("Component"),E=function(n){o(C,g);var i=f(C);function C(t){var o,n,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,C),(a=i.call(this,t,l)).playerId=l.playerId,a.seriesData=l.sres,a.videos=l.related.content,a.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=l.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(r(0),y({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(C,[{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(l())});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")?(c(),o.classList.remove("hidden"),t.classList.add("open"),m(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),u(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;r(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),d(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,a=0;a<i;a++)document.getElementsByClassName("recommended -".concat(a))[0]&&(document.getElementsByClassName("recommended -".concat(a))[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,a=0;a<i;a++)document.getElementsByClassName("recommended -".concat(a))&&(document.getElementsByClassName("recommended -".concat(a))[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()};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),d=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),r=a.dom.createEl("div",{className:"video-container video-accessibility"}),c=function(e){var o,n,i,l,s,c,m,u,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},p.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(h(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||h(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(c=s.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(y);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title)||"")});a.dom.appendContent(v,p),a.dom.appendContent(v,b),a.dom.appendContent(r,v),a.dom.appendContent(d,r)},m=0;m<this.videos.length;m++)c(m);a.dom.appendContent(n,l),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,d),p(this.playerId,e)}}]),C}();export{E as default};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewlift/player-backup",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.189-backup",
|
|
4
4
|
"main": "dist/bundle.cjs.js",
|
|
5
5
|
"types": "dist/@viewlift/player/esm/index.d.ts",
|
|
6
6
|
"amdName": "_playerCore",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@silvermine/videojs-airplay": "^1.3.0",
|
|
9
9
|
"@silvermine/videojs-chromecast": "^1.4.1",
|
|
10
|
+
"@viewlift/comscore": "^0.0.3",
|
|
10
11
|
"axios": "^1.2.3",
|
|
11
12
|
"ima": "npm:videojs-ima@2.2.0",
|
|
12
13
|
"js-cookie": "^3.0.5",
|
package/cjs/generic-d35f6dee.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("axios"),r=require("./player_instance-fcf6a8fb.js"),l=require("js-cookie"),a=require("./currentVideoInfo-31d70bec.js"),d=require("./captions-dbc83a75.js"),s=require("./skin-516012d7.js"),u=require("@babel/runtime/helpers/toConsumableArray"),c=require("@babel/runtime/helpers/slicedToArray");function v(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function p(e,n){v("event",e,n)}var f={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function g(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?m(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var I={name:"@viewlift/player",version:"2.0.61",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=I.version;var y,w=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":S.get()+"".concat(null==f?void 0:f.getVideoDetails)},E=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:w(),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":I.version,"x-player-name":"videojs"},withCredentials:!0})},h=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:S.get()+f.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return o=e.sent,e.abrupt("return",i({url:S.get()+"".concat(null==f?void 0:f.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:S.get()+"".concat(null==f?void 0:f.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},b=function(e){var n=e.videoId;return i({method:"GET",url:S.get()+"".concat(null==f?void 0:f.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},S=(y=null==f?void 0:f.apiBaseUrl,{set:function(e){e&&(y=e)},get:function(){return y}}),O=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},C=null;function P(){return{set:function(e){e&&(C=e)},get:function(){return C}}}var A=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=P().get(),o=S.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),L=null,D=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"))||!O(n)){e.next=6;break}return L||(L=A().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&P().set(r),i||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){L=null}))),e.abrupt("return",L);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function M(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?k(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var V=100,j=function(){var e,n,t,o,i,r,l,d=a.getCurrentVideo();return"linearchannel"===((null==d?void 0:d.contentType)||"video")?null==d||null===(e=d.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find((function(e){return(null==e?void 0:e.id)===(null==d?void 0:d.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==d||null===(i=d.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==d||null===(l=d.video)||void 0===l?void 0:l.id)||(null==d?void 0:d.id)};function F(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function x(){var e=window.sessionStorage.getItem("uid");return e||(e=F(),window.sessionStorage.setItem("uid",e),e)}function N(){return W.apply(this,arguments)}function W(){return(W=n(t.mark((function e(){var n,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(e){return e?String(e):""}var B=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function H(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=F(),d="production",s="WEBSITE",u=null,c=0,v=null,m=0,g=0,I=!1,y=[],w=r.getPlayer(e);if(w){var E=function(){var e,n,t,o;return Math.round((null==w||null===(e=w.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)},h=B((function(){for(var e=w.currentTime(),n=w.buffered(),t=0;t<n.length;t++){var o=n.start(t),i=n.end(t);if(e>=o&&e<=i)return Math.round(i-e)}return 0})),_=function(){var e=n(t.mark((function e(n){var o,r,u,c,v,p,m,g,I,y,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return I=e.sent,y=R(I),e.t0=M,e.t1=M,e.t2=null==y?void 0:y.site,e.t3=null==y?void 0:y.siteId,e.t4=s,e.t5=x(),e.t6=j(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11=d,e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?U(n.adPosition):"",e.next=25,N();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=a,e.t23=null!==(r=n.ttFirstFrame)&&void 0!==r?r:null,e.t24=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t25=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t26=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t27=null!==(p=n.bufferHealth)&&void 0!==p?p:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==l||null===(m=l.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),w=[e.t32],i({url:(null==l||null===(g=l.beacon)||void 0===g?void 0:g.url)||S.get()+f.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:w}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(e){if(!w.paused()&&w.readyState()>2)return clearInterval(u),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&g<4&&I?(g++,p("BUFFERING",M({pfm:s,uid:x(),vid:j(),videoPosition:Math.floor(w.currentTime)},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),_({eventName:"BUFFERING",videoPosition:Math.floor(w.currentTime),isAdEvent:!1}),0):t},b=function(){var e=Math.floor(w.currentTime);w.on("error",(function(){var n,t=Math.floor(w.currentTime);clearInterval(u);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";p(o,M({pfm:s,uid:x(),vid:j(),videoPosition:t},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),_({eventName:o,videoPosition:t,isAdEvent:!1})}))},O=function(){var e=B((function(){var e;c=0,v=setInterval((function(){c=T(c)}),V),p("PLAY",M({pfm:s,uid:x(),vid:j(),videoPosition:Math.floor(w.currentTime)},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),_({eventName:"PLAY",videoPosition:Math.floor(w.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":j(),watchTime:Math.floor(w.currentTime)})}));w.one("play",e)},C=function(){w.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(u),m=c||0,p("FIRST_FRAME",M({pfm:s,uid:x(),vid:j(),videoPosition:Math.floor(w.currentTime),ttFirstFrame:c,bufferHealth:h()},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),_({eventName:"FIRST_FRAME",videoPosition:Math.floor(w.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:h()}),I=!0,c=0}))},P=function(){var e=!1;w.on("waiting",B((function(){I&&(e=!0,clearInterval(u),u=setInterval((function(){e&&!w.paused()?m=T(m):clearInterval(u)}),V))}))),w.on("playing",B((function(){e=!1,clearInterval(u)})))},A=function(){var e=function(e){var n,t,o,i=M({videoPosition:Math.floor(w.currentTime),isAdEvent:!0,bufferHealth:h(),pfm:s,uid:x(),vid:j(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==l||null===(o=l.beacon)||void 0===o?void 0:o.params);p(e,M({},i)),_(M({eventName:e,adPosition:1},i))};w.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),w.on("adskip",(function(){c=0})),w.on("adend",(function(){c=0}))},L=function(){w.on("timeupdate",(function(){var e=Math.floor(w.currentTime());if(e>=30&&e%30==0&&!y.includes(e)){var n,t=null===(n=w.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];g=0,y.push(e),_({eventName:"PING",videoPosition:e,isAdEvent:!1,duration:30,resHeight:(null==t?void 0:t.videoHeight)||null,resWidth:(null==t?void 0:t.videoWidth)||null,bufferHealth:h(),bitrate:E()})}}))};b(),P(),A(),L(),O(),w.on("loadeddata",C)}else console.error("Videojs: Player instance not found.")}var G=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},q=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},Q=function(){var e=a.seasonIdxManager.get();return e>=0?e+1:1},Y=function(){var e,n,t,o=a.getCurrentSeries(),i=a.getCurrentVideo(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=a.seasonIdxManager.get(),d=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===r}));return d>=0?d+1:1};function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function K(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?z(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):z(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var X=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},J=function(e){var n=$(e,"video.tags",[]),t=$(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},$=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},Z=function(){var n,t,o,i,a,d,s,u,c,v,p,f,m,g,I,y,w,E,h,_,T,b,S,O,C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return C;var L=(null==A?void 0:A.siteName)||"",D=(null==A?void 0:A.contentType)||"video",R=(null==A||null===(o=A[D])||void 0===o?void 0:o.metadata)||(null==A||null===(i=A[D])||void 0===i||null===(a=i.gist)||void 0===a?void 0:a.metadata),k=r.getPlayer(P);if(!C.includes("VIEWLIFT_"))return C;var M,V=window.getComputedStyle(document.getElementById(P),null),j=Math.trunc(V.getPropertyValue("height").slice(0,-2)),F=Math.trunc(V.getPropertyValue("width").slice(0,-2)),x="linearchannel"===D?null==A||null===(d=A.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(u=s.find((function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)})))||void 0===u||null===(c=u.content)||void 0===c?void 0:c.id:$(A,"video.gist.id",""),N="linearchannel"===D?null==A||null===(v=A.linearchannel)||void 0===v||null===(p=v.channels)||void 0===p||null===(f=p.find((function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)})))||void 0===f?void 0:f.title:$(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),W=null,U=null;"function"==typeof window.__gpp&&(null===(M=window)||void 0===M||M.__gpp("ping",(function(e){W=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]})));var B=K(K({},ee(R)),{},(b={VIEWLIFT_WIDTH:F,VIEWLIFT_HEIGHT:j,VIEWLIFT_SIZE:X(F,j),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===(m=window)||void 0===m?void 0:m.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:$(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:$(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:$(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(g=k.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:J(A),VIEWLIFT_MEDIA_ID:x,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI($(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:x,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+$(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:$(null===(y=window)||void 0===y||null===(w=y.app_data)||void 0===w||null===(E=w.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L?"":$(null===(h=window)||void 0===h||null===(_=h.app_data)||void 0===_||null===(T=_.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*$(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:$(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:x,VIEWLIFT_CONTENT_TITLE:N,VIEWLIFT_CONTENT_SERIES_TITLE:$(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:$(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Y(),VIEWLIFT_SEASON_NUMBER:Q(),VIEWLIFT_CONTENT_TAGS:J(A),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:W||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(b,"VIEWLIFT_LAT",""),e(b,"VIEWLIFT_APP_BUNDLE",""),e(b,"VIEWLIFT_ATT_CONSENT",""),b),null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var H in B){var G=new RegExp(H,"g");C=C.replace(G,B[H])}return C},ee=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(q()?s?a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):u&&(a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=q()?K(K({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):K(K({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=q()?K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=K(K({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},ne=function(e,n){var t,o,i,r,l,a,d,s,u,c,v,p,f,m=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[m])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[m])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,y=null==e||null===(r=e[m])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(a=e[m])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[m])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[m])||void 0===v||null===(p=v.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return oe(y);if(g){var h=ie(I,n);return h.src=Z(h.src,n,e),h}if("Safari"!==G()&&E)return te(I);if(w){var _=oe(I);return _.src=Z(_.src,n,e),_}if(null!=I&&I.mpeg){var T=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return T.src=Z(T.src,n,e),T}return null},te=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},oe=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},ie=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=G();if(r.getPlayer(n),"Safari"===d){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(i);return re(n),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(re(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var re=function(e){var n=r.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==G()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},le=function(e,n){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},ae=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var de=!1,se=function(e,n,t){var o=Z(n,e,t),i=r.getPlayer(e);if(n&&window.google){if("function"!=typeof i.ima)return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r.getPlayer(e);if(null!==l.el_){de=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),de&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout((function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,(function(){u&&l.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),l.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),l.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};var ue,ce=(ue=!0,{enable:function(){ue=!0},disable:function(){ue=!1},get enabled(){return ue}}),ve="ssai-breakStart",pe="ssai-adImpression",fe="ssai-firstQuartile",me="ssai-midpoint",ge="ssai-thirdQuartile",Ie="ssai-complete",ye="ssai-breakEnd",we={breakStart:ve,impression:pe,firstQuartile:fe,midpoint:me,thirdQuartile:ge,complete:Ie,breakEnd:ye};function Ee(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=we[o];i&&t.trigger(i,n)}function he(e){var n,t,o,i,r=e.isLive,l=e.startTimeInSeconds;return r?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==l?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:l===("function"==typeof(null===(t=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===t?void 0:t.getDuration)&&(null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.comscorePlayerInstance)||void 0===i?void 0:i.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function _e(){var e,n,t,o,i,r,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",function(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="ad"),d.notifyPause();var s=new a.StreamingAnalytics.AdvertisementMetadata;s.setMediaType(he({isLive:null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentOptions)||void 0===i?void 0:i.isLive,startTimeInSeconds:null==l?void 0:l.startTimeInSeconds})),s.setUniqueId(l.id||"ad-001"),s.setLength(1e3*parseInt(l.adDuration,10)||0),s.setTitle(l.title||"Advertisement"),s.setServerCampaignId(l.campaignId),s.setRelatedContentMetadata(null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r?void 0:r.contentMetadata),s.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),s.setPlacementId(l.placementId);var u={cs_ad_tu:null==l?void 0:l.trackingUrl,ns_st_ami:null==l?void 0:l.creativeId};s.addCustomLabels(u),d.setMetadata(s),d.notifyPlay(),console.log("[Comscore] Ad started:",l)}function Te(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))}function be(){var e,n,t,o,i;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var r=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;r.notifyPause(),r.notifyEnd(),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="content"),(null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentMetadata)&&(r.setMetadata(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata),r.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}}function Se(e,n){var t,o,i=null!==(o=null===(t=null==e?void 0:e.match(/campaignId=([^;]*)/))||void 0===t?void 0:t[1])&&void 0!==o?o:null;return(null==i?void 0:i.trim())||null}function Oe(e){var n,t,o,i;return{id:null==e?void 0:e.adId,adTitle:null==e?void 0:e.adTitle,adDuration:(null==e?void 0:e.durationInSeconds)||0,startTimeInSeconds:(null==e?void 0:e.startTimeInSeconds)||0,campaignId:Se(null===(t=null===(n=null==e?void 0:e.extensions)||void 0===n?void 0:n[0])||void 0===t?void 0:t.content),placementId:Se(null===(i=null===(o=null==e?void 0:e.extensions)||void 0===o?void 0:o[0])||void 0===i?void 0:i.content),trackingUrl:null==e?void 0:e.trackingUrl,creativeId:null==e?void 0:e.creativeId}}function Ce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Pe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ce(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Ae(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 Le(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)?Le(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function Le(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,comscorePlayerInstance:null,mode:"content",cleanupFns:[],contentOptions:null}),o.registerPlugin("comscore",(function(e){var n=e||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;new Promise((function(t,o){var i=document.createElement("script");i.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",i.async=!0,document.head.appendChild(i),i.onload=function(){!function(e){var n=e.publisherId,t=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var o=window.ns_.analytics;o.PlatformApi.setPlatformAPI(o.PlatformApi.PlatformApis.WebBrowser);var i=new o.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==t?void 0:t.userConsent)||"",cs_fpid:(null==t?void 0:t.userId)||""}});o.configuration.addClient(i),o.configuration.enableFirstPartyCookie(),o.configuration.enableImplementationValidationMode(),o.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=o}({publisherId:e||"40813950"})},i.onerror=function(e){o("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}));var De,Re=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),ke=(De=null,{set:function(e){De=e},get position(){return De}});function Me(e,n){return Ve.apply(this,arguments)}function Ve(){return(Ve=n(t.mark((function e(n,o){var i,l,a,d,s,u,v,p,f,m,g,I,y,w,E,h,_,T;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.getPlayer(n),a=ne(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=Z(u,n,o),v=Fe(u),p=c(v,2),f=p[0],m=p[1],g=je(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach((function(e){var n=c(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)})),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Pe({adsParams:Pe({},f)},g))});case 14:return I=e.sent,e.next=17,I.json();case 17:return y=e.sent,w="https://"+new URL(u).hostname,E=y.trackingUrl,h=y.manifestUrl,_=w+E,T=w+h,Re.set(_),console.log("%c TRACKING URL","background: #bdf369; color: #000",_),a.src=T,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}}),e,null,[[11,29]])})))).apply(this,arguments)}function je(e){var n,t=Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map((function(e){var n=c(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]})));return t||{}}function Fe(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Ae((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=c(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,v=Object.entries(n);u<v.length;u++){var p=c(v[u],2),f=p[0],m=p[1];if(f.startsWith("ads."))d[f.replace(/^ads\./,"")]=m;else s[f]=m}return[d,s]}var xe,Ne,We,Ue,Be=(xe=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),xe=Array.isArray(e)?u(e):xe},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",xe),u(xe)}}),He=new Map;function Ge(e,n){return qe.apply(this,arguments)}function qe(){return qe=n(t.mark((function e(o,i){var l,a,d,c,v,p,f,m,g,I,y,w,E,h,_,T,b,S,O,C,P,A;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:A=function(e,n,t,i,l,a){var d=r.getPlayer(o);if(!d.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(d.currentTime());var s,u=Ae(t);try{var c=function(){var t,r,u,c=s.value,v=c.eventType,p=c.beaconUrls,f=c.startTimeInSeconds,m=c.startTime,g=c.durationInSeconds,I=f||0,y=p,w=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(u=r.ads)||void 0===u?void 0:u.adEventHandler)||null,E="".concat(I,"_").concat(v),h=He.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",He),e>=I&&!h.includes(E)){h.push(E),He.set("pod-".concat(l),h);try{P(v,n,y,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var _=ke.position;ke.set(null),setTimeout((function(){null!=_&&(d.currentTime(_),a())}),500)}if("function"==typeof w)try{var T,b={eventType:v,startTimeInSeconds:f,startTime:m,durationInSeconds:g,ad:null==n||null===(T=n.ads)||void 0===T?void 0:T[i],adIndex:i};w({adsData:b}),Ee(o,b)}catch(e){console.error("Error when calling ads callback:",e)}if("impression"===v){var S,O=Re.get();_e(Oe(Pe(Pe({},null==n||null===(S=n.ads)||void 0===S?void 0:S[i]),{},{trackingUrl:O})))}else"complete"===v?Te():"breakEnd"===v&&be()}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},P=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},C=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},He.clear(),ke.set(i),g=Re.get(),(I=r.getPlayer(o)).one("loadeddata",(function(){g&&O(g)})),y=new Map,w=new Map,E=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,_=(null==I||null===(d=I.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==I||null===(c=I.controlBar)||void 0===c?void 0:c.getChild("seriesV2"))||null,b=(null==I||null===(v=I.el())||void 0===v||null===(p=v.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===p?void 0:p[0])||null,S=(null==I||null===(f=I.el())||void 0===f||null===(m=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=function(){var e=n(t.mark((function e(n){var l,a,d,c,v,p,f,m,g,I,O,P,L,D,R,k,M,V,j,F;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",k),0===e.button&&L()},R=function(e){},D=function(){var e,n=I.currentTime(),t=null,o=Ae(g);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,y.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){I.currentTime(t+2.2)}),100))},L=function(){var e,n=I.currentTime(),t=null,o=Ae(g);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!y.has(r)||n>=r&&n<=d)&&(t=r,y.set(r,!0),w.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){I.currentTime(t+.4)}),100))},v=!1,e.next=7,fetch(n);case 7:return p=e.sent,e.next=10,p.json();case 10:f=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",f),m=f.avails,g=[],I=r.getPlayer(o),O=I.controlBar.progressControl,P=O.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),m.map((function(e,n){var t,o,i;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(v=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(i=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===i?void 0:i[0])||[]})})),!v&&i&&(I.currentTime(i),D()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g),console.log(g,"data"),g.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=I.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",P.appendChild(r)}})),I._timeUpdateHandler&&I.off("timeupdate",I._timeUpdateHandler),I._timeUpdateHandler=s.throttle((function(){var e=I.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=g[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&y.set(i,!0),ce.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var d=e-i,s=0,c=0,v=0;v<l.length;v++){var p,f=null==l||null===(p=l[v])||void 0===p?void 0:p.durationInSeconds;if(d<s+f){c=v;break}s+=f}l[c];var m=Math.max(0,r-d),I=Math.round(m);M.style.display="block",F.textContent="".concat(c+1," of ").concat(l.length," • ").concat(C(I));var E=[];return null==l||l.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));E.push.apply(E,u(n))})),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),A(e,t,E,c,o,D),"break"}w.delete(i)},o=0;o<g.length;o++){if("break"===t())break}n||(M.style.display="none",O.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),ce.enable())}}),1e3),I.on("timeupdate",I._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",(function(e){ce.enabled&&"ArrowRight"==e.key&&(L(),tn(o,10),e.stopPropagation())})),O.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",k))})),null===(d=document)||void 0===d||null===(c=d.querySelectorAll(".ssai-ad-container"))||void 0===c||c.forEach((function(e){return null==e?void 0:e.remove()})),(M=document.createElement("div")).className="ssai-ad-container",(V=document.createElement("div")).className="sponsored-adbox",(j=document.createElement("div")).className="sponsored-text",j.textContent="Sponsored Ad",V.append(j),(F=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",M.append(V),M.append(F),I.el().appendChild(M);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),qe.apply(this,arguments)}function Qe(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ye(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ye(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function Ye(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Ke(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ze(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Xe={},Je=(null===(Ne=window)||void 0===Ne||null===(We=Ne.location)||void 0===We||null===(Ue=We.search)||void 0===Ue?void 0:Ue.includes("debug=true"))||!1,$e=null;function Ze(e){return en.apply(this,arguments)}function en(){return en=n(t.mark((function e(o){var i,l,a,d,c,v,p,f,m,g,I,y,w,E,h,_,T,b,S,O,C,P,A,L,D,R,k;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,i,l){var a=r.getPlayer(o);if(!a.seeking()){var d=n.startTimeInSeconds;n.durationInSeconds,Math.floor(a.currentTime());var s,u=Qe(t);try{for(u.s();!(s=u.n()).done;){var c,v,p,f=s.value,m=f.eventType,g=f.beaconUrls,I=f.startTimeInSeconds,y=f.startTime,w=f.durationInSeconds,E=f.eventId,h=I||0,_=g,T=(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(p=v.ads)||void 0===p?void 0:p.adEventHandler)||null,b="".concat(E,"_").concat(m),S="pod-".concat(d);L.has(S)||L.set(S,new Set);var O=L.get(S);if(Je&&console.warn(e,h,"map:",m,"condition1:",e>=h,"map:",L),e>=h&&e<=h+D&&!O.has(b)){O.add(b);try{R(m,n,_,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,n)}if("function"==typeof T)try{var C,P={eventType:m,startTimeInSeconds:I,startTime:y,durationInSeconds:w,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[i],adIndex:i};T({adsData:P}),Ee(o,P)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){u.e(e)}finally{u.f()}}},R=function(e,n,t,o){var i,r;"breakEnd"===e&&(null===(i=Xe)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=Xe)||void 0===r?void 0:r.totalAds)||(Je&&(console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n)),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))})))},I=function(){$e&&clearInterval($e)},m=Re.get(),(g=r.getPlayer(o)).one("loadeddata",(function(){I(),$e=setInterval((function(){m&&!g.paused()&&A(m)}),2e3)})),g.on("dispose",(function(){I()})),y=new Map,w=new Map,E=-1,h=null,_=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==g||null===(a=g.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(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,O=(null==g||null===(p=g.el())||void 0===p||null===(f=p.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,C=!1,P=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return u(o);var i=[],r=null==o?void 0:o.find((function(e){return"breakEnd"===(null==e?void 0:e.eventType)})),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find((function(e){return e.includes("videoView")})))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter((function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)})),s=(null==d?void 0:d.some((function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some((function(e){return e.includes("videoView")}))})))||!1;if(!s&&l){var c=null==d?void 0:d.map((function(e){return Ke(Ke({},e),{},{eventType:"videoView",beaconUrls:[l]})}));null!=c&&c[0]&&i.push(null==c?void 0:c[0])}return i},A=function(){var e=n(t.mark((function e(n){var i,l,a,d,c,v,p,f,m,g;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),h&&l.searchParams.append("nextToken",h),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,c=d.avails,v=d.nextToken||null,h=v,p=[],f=r.getPlayer(o),m=f.controlBar.progressControl,g=m.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),c.map((function(e,n){p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:P(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),Je&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",g.appendChild(r)}})),f._timeUpdateHandler&&f.off("timeupdate",f._timeUpdateHandler),f._timeUpdateHandler=s.throttle((function(){var e=f.currentTime();if(e!==E){E=e;for(var n=function(){var n=p[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;C=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&y.set(o,!0),ce.disable(),_&&_.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),m.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,c=0,v=0;v<r.length;v++){var f,g=null==r||null===(f=r[v])||void 0===f?void 0:f.durationInSeconds;if(d<s+g){c=v;break}s+=g}setTimeout((function(){Xe.totalAds=null==r?void 0:r.length,Xe.currentAdIndex=c}),1e3);var I=[];return null==r||r.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));I.push.apply(I,u(n))})),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&I.push.apply(I,u(null==n?void 0:n.podSlotImpressionBeacon)),k(e,n,I,c),"break"}w.delete(o)},t=0;t<p.length;t++){if("break"===n())break}C||(Xe={},m.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),ce.enable())}}),1e3),f.on("timeupdate",f._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)}))),en.apply(this,arguments)}function nn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var tn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},on=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},rn=function(e){return!!o.getPlayer("".concat(e))},ln=function(){var e=n(t.mark((function e(o,i){var l,d,s,u=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=u.length>2&&void 0!==u[2]&&u[2],e.next=3,D();case 3:return d=e.sent,s=r.getPlayer(o),e.abrupt("return",new Promise((function(e,r){var u=(null==i?void 0:i.programs)||[];null==i||delete i.programs,h(i,d).then(function(){var r=n(t.mark((function n(r){var d,c,v,p,f,m,g,I;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==r?void 0:r.data,window.sid=F(),m.contentType="linearchannel",m.channelId=null==i?void 0:i.channelId,g=(null==m||null===(d=m.linearchannel)||void 0===d?void 0:d.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(f=p.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,I=ne(m,o),!g){n.next=11;break}return n.next=9,Me(o,m);case 9:I=n.sent,l=!0;case 11:a.setCurrentVideo(m),a.setCurrentEpgPrograms(u),sessionStorage.setItem("program_switched",!0),I&&l?(sn(o,I),g&&Ze(o),s.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})}))):e({status:!0,msg:"Feed authenticated",response:m});case 15:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){r({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),an=function(){var e=n(t.mark((function e(o,i,l){var s,u,c,v,p,f,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return v=e.sent,(a.getCurrentSeries()||null)&&a.setVideoIdxById(i),p=0,f=0,m=null,null!==(s=window)&&void 0!==s&&s.watchHistory&&null!==(u=window)&&void 0!==u&&null!==(c=u.watchHistory)&&void 0!==c&&c.enable&&T(i,v).then((function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),p=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(f=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,l){E(i,v).then(function(){var i=n(t.mark((function n(i){var s,u,c,v,g,I,y,w,E,h,_,T,b,S,O,C,P,A,L,D,R,k,M,V,j,F,x,N,W,U,B,H,G,q,Q,Y,z,K;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(C=null==i?void 0:i.data,P=(null==C?void 0:C.contentType)||"video",A=(null==C||null===(s=C[P])||void 0===s?void 0:s.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(g=v.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,L=(null==C||null===(I=C.video)||void 0===I||null===(y=I.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,a.setCurrentVideo(i.data),(D=(null==C||null===(w=C.ads)||void 0===w||null===(E=w.preRoll)||void 0===E||null===(h=E.adTags)||void 0===h||null===(_=h.web)||void 0===_?void 0:_.active)&&(null==C||null===(T=C.ads)||void 0===T||null===(b=T.preRoll)||void 0===b||null===(S=b.adTags)||void 0===S||null===(O=S.web)||void 0===O?void 0:O.url))&&se(o,D,C),R=ne(C,o),!A){n.next=12;break}return n.next=11,Me(o,C);case 11:R=n.sent;case 12:R?(H=(null==C||null===(k=C.video)||void 0===k||null===(M=k.gist)||void 0===M?void 0:M.videoImageUrl)||(null==C||null===(V=C.video)||void 0===V||null===(j=V.gist)||void 0===j||null===(F=j.imageGist)||void 0===F?void 0:F.r16x9),(G=r.getPlayer(o)).poster(H),sn(o,R),A&&Ge(o,m),G.on("loadstart",(function(){L&&e({status:!0,msg:"Video Loaded",response:C})})),G.on("loadeddata",(function(){ae(),e({status:!0,msg:"Video Loaded",response:C})})),G.one("play",(function(){p&&!A&&f<95&&setTimeout((function(){G.currentTime(p)}),0)})),G.one("error",(function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==C||null===(x=C.video)||void 0===x||null===(N=x.contentDetails)||void 0===N||null===(W=N.closedCaptions)||void 0===W?void 0:W.length)>0||(null==C||null===(U=C.video)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==C||null===(Q=C.video)||void 0===Q||null===(Y=Q.contentDetails)||void 0===Y?void 0:Y.closedCaptions)||(null==C||null===(z=C.video)||void 0===z?void 0:z.closedCaptions),q=K.filter((function(e){return"VTT"===e.format})),d.addCaptions(o,q)):d.removeCaptions(o)):(le(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){un(e,o,l,i)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),dn=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()},sn=function(e,n){var t=r.getPlayer(e);t&&t.src(n)},un=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);rn(t)&&le(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):nn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))};exports.adsQueuePointManager=Be,exports.authenticateLC=ln,exports.baseUrlManager=S,exports.clearError=ae,exports.createSeriesWatchMap=function(e,n){var t=new Map;b({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),a.setSeriesWatchMap(t)})).catch((function(e){return console.log(e)}))},exports.detectBrowser=G,exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var n=r.getPlayer(e);if(dn(),function(){var e,n,t,o,i,r,l,a,d,s;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.comscoreCleanupFns=[]),console.log("comscoreTag",null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef),null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.tagRef){try{null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r||r.tagRef.notifyEnd()}catch(e){}null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||(l.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(s=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===s||(s.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}(),s.clearEventListeners(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},exports.getDecodedToken=R,exports.getEntitlementData=function(e,n,t,o){return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},exports.getEpisodeNumber=Y,exports.getLinearChannelDetails=h,exports.getSGAIEnabledSource=Me,exports.getSeasonNumber=Q,exports.getSeriesDetails=function(e,n){var t,o,r=R(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):i({url:S.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=b,exports.getSource=ne,exports.getSsaiEvents=function(e){var n=r.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(ve,e)},adImpression:function(e){return t(pe,e)},adFirstQuartile:function(e){return t(fe,e)},adMidpoint:function(e){return t(me,e)},adThirdQuartile:function(e){return t(ge,e)},adComplete:function(e){return t(Ie,e)},adBreakEnd:function(e){return t(ye,e)}}},exports.getToken=D,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},exports.getUserId=x,exports.getVideoDetails=E,exports.getVideoInfo=T,exports.handleError=le,exports.initialiseAdvertisement=se,exports.initialiseKeyboardEvents=function(e,n){var t,o,i,l=r.getPlayer(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",(function(t){var o,i,r,s,u,c,v,p,f;if(ce.enabled&&"input"!=t.target.localName){var m=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(t.preventDefault(),null==d||d.focus()),m){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||on(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(p=v.appcmsMain)&&void 0!==p&&null!==(f=p.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||tn(e,10)}}}),!0)},exports.initiateErrorHandling=un,exports.inititateBeacon=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&H(e,n,t)},exports.isBehindLive=function(e){var n,t=r.getPlayer(e);return!(null!=t&&null!==(n=t.liveTracker)&&void 0!==n&&n.atLiveEdge())||null},exports.isMobile=q,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=rn,exports.isTokenExpired=O,exports.load=an,exports.loadVideo=sn,exports.loadVideoInstantly=function(e,n,t){var o=r.getPlayer(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=P,exports.rewind=on,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],v("js",new Date),v("config",e)},exports.saveWatchHistory=_,exports.setupAdvertisementMarkers=Ge,exports.setupAdvertisementMarkersForLinear=Ze,exports.skip=tn,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackMap=He;
|
package/cjs/index-20a8f9d3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator");require("axios");var i=require("./generic-d35f6dee.js"),t=require("./player_instance-fcf6a8fb.js"),l=require("video.js"),r=require("./util-d1548c88.js"),a=require("./captions-dbc83a75.js"),d=require("./resolution-f9dcc1b4.js"),u=require("./skin-516012d7.js"),s=require("./localisation-56e0a999.js"),c=require("./currentVideoInfo-31d70bec.js"),v=require("@babel/runtime/helpers/typeof"),p=require("./icons-2609dbe4.js"),f=require("./helper-a50a8ffc.js"),m=require("@babel/runtime/helpers/toConsumableArray"),g=function(e){return new Promise((function(n,o){if(w(e))o("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){n()},i.onerror=function(n){o("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(i)}}))},w=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},y=function(e,n,o){var i=t.getPlayer(e);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var l=parseFloat(n)/100;i.volume(l),o&&o({status:!0,msg:"Volume set to ".concat(n,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},b=function(e){var n=t.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},h=function(){var e=n(o.mark((function e(n){var r,a,d,u,s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=t.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||!(null!=n&&n.chromecastReceiverId||null!=n&&n.airplay)){e.next=10;break}return e.prev=2,e.next=5,g("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),console.log("Error",e.t0);case 10:if(null!=n&&null!==(a=n.series)&&void 0!==a&&a.enable||null==n||!n.chromecastReceiverId){e.next=21;break}return e.next=13,import("@silvermine/videojs-chromecast");case 13:e.sent.default(l),(s=l.getTech("chromecast"))&&!s.prototype.seeking&&(s.prototype.seeking=function(){}),null!==(u=window)&&void 0!==u&&u.cast?null==d||d.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==d||d.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=n&&n.airplay&&"Safari"==i.detectBrowser()?null==d||d.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(n){return e.apply(this,arguments)}}(),O=function(e,n){var o=t.getPlayer(e);o&&n&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(n){var o,i,t,r,a,d=this.el(),u=l.dom.getPointerPosition(d,n).x;l.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var s=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(t=i.framework)||void 0===t||null===(r=t.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S;if(console.log(s),s&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*u,v.seek()}}))};var C=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),g("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){return Te}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then((function(e){l.getPlugin("eme")||l.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(){var e=n(o.mark((function e(){var n;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(l),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./index-3f0e537b.js")}));case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./videojs-dash5.es-3854764f.js")}));case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),P=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){g("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(l)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(l)}))},loadAdsLibrary:C,loadEMELibrary:S,loadMuxPlugin:k,loadDvrSeekbar:I,loadContribDash:E,loadComscorePlugin:_});function T(e){return D.apply(this,arguments)}function D(){return(D=n(o.mark((function e(n){var t;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,C();case 3:t&&"Safari"==i.detectBrowser()&&Promise.resolve().then((function(){return P})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e){return R.apply(this,arguments)}function R(){return(R=n(o.mark((function e(n){var i,l,r,a,d,u;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=t.getPlayer(n.playerId),e.next=3,_();case 3:u.comscore({publisherId:null==n||null===(i=n.comscore)||void 0===i?void 0:i.publishedId,endpoint:null==n||null===(l=n.comscore)||void 0===l?void 0:l.endpoint,implementationId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.implementationId,projectId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.projectId,debug:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.debug)||!1});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e,n){return A.apply(this,arguments)}function A(){return(A=n(o.mark((function e(n,t){var l,r,a,d,u,s,c,v,p,f,m,g;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",p=null==t||null===(l=t[v])||void 0===l?void 0:l.drmEnabled,null==t||null===(r=t[v])||void 0===r||null===(a=r.liveDetails)||void 0===a||a.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(d=t[v])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,e.prev=6,j(n),e.next=10,Promise.allSettled([p?"Safari"==i.detectBrowser()?S():"caliente"!=(null===(g=window)||void 0===g?void 0:g.siteName)?E():S():"Safari"!=i.detectBrowser()&&f?E():null,m?h(n):null,h(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("Error",e.t0);case 15:case"end":return e.stop()}}),e,null,[[6,12]])})))).apply(this,arguments)}function x(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function N(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?x(Object(i),!0).forEach((function(o){e(n,o,i[o])})):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 L=new Set,V=null,B=function(e,n,o){var t,l,r,a,d,u,s,v={},p=(null==e?void 0:e.contentType)||"video";v["c3.cm.id"]=(null===(t=e[p])||void 0===t?void 0:t.id)||"Null",v["c3.cm.contentType"]=z(e),v[null==o||null===(l=o.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==e||!e.linearchannel),v[null==o||null===(r=o.Constants)||void 0===r?void 0:r.STREAM_URL]=n.currentSrc(),v[null==o||null===(a=o.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===i.getUserId()?"NULL":i.getUserId(),v["c3.cm.categoryType"]=F(e),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(d=e[p])||void 0===d?void 0:d.drmEnabled)||"None",v.DAIStream=null!==(u=e[p])&&void 0!==u&&null!==(s=u.gist)&&void 0!==s&&s.isSSAIEnabled?"YES":"NO",v[o.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=W(e),v["c3.cm.genreList"]=U(e),v["c3.cm.genre"]=H(e),v["c3.cm.channel"]=q(e);var f=Y(c.getCurrentSeries(),e);return v=N(N({},v),f)},H=function(e){var n,o,i,t=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[t])||void 0===n||null===(o=n.gist)||void 0===o||null===(i=o.primaryCategory)||void 0===i?void 0:i.title)||"Null"},U=function(e){var n,o=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[o])||void 0===n?void 0:n.categories)||[]).map((function(e){return null==e?void 0:e.title})).join(", ")||"Null"},q=function(e){var n,o,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null==e||null===(n=e[i])||void 0===n||null===(o=n.channels[0])||void 0===o?void 0:o.title)||"NULL"},F=function(e){return(null==e?void 0:e.contentType)||"null"},W=function(e){var n,o,i=(null==e?void 0:e.contentType)||"video",t=(null==e||null===(n=e[i])||void 0===n||null===(o=n.liveDetails)||void 0===o?void 0:o.isDvrEnabled)||!1;return t?"YES":"NO"},G=function(e,n){var o,i,t=(n||{}).epg;if(t&&null!=t&&t.enable&&null!=t&&t.programTitle)return t.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(o=e[l])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.title)||"Null";return"".concat(r)},z=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var K,J,Y=function(e,n){var o,t,l,r,a,d={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return d;var u=i.getSeasonNumber(),s=i.getEpisodeNumber();return d["c3.cm.seriesName"]=(null==n||null===(o=n.video)||void 0===o||null===(t=o.series)||void 0===t?void 0:t.title)||"Null",d["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",d["c3.cm.showTitle"]=(null==e||null===(l=e[u-1])||void 0===l||null===(r=l.episodes)||void 0===r||null===(a=r[s-1])||void 0===a?void 0:a.title)||"Null",d["c3.cm.episodeNumber"]=(null==s?void 0:s.toString())||"Null",d},X=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Q=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},$=function(){var e=n(o.mark((function e(n,i){var l,r,a,d,u,s,v,p,f,m;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=(null==i?void 0:i.convivaConfig)||{},r=l.trackConvivaPlayerEvent,a=l.paymentHandler,d=l.tveProvider,u=l.enable,s=l.appName,v=(i||{}).token,u){e.next=4;break}return e.abrupt("return");case 4:if(p=t.getPlayer(n),"function"==typeof(f=r)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,f("getConvivaObject");case 10:if(m=e.sent){e.next=13;break}return e.abrupt("return");case 13:p.ready((function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var o=e.target;if(o&&o.keySystem){var i=X(o.keySystem);f("contentInfo",{DRMEnabled:i})}else f("contentInfo",{DRMEnabled:"None"})})),n||f("contentInfo",{DRMEnabled:"None"})})),p.on("loadstart",(function(){var e,n;V&&V!==p.currentSrc()&&f("playbackEnded"),f("setPlayer",p),L.clear(),V=p.currentSrc();var o=Q(p.currentType()),t=c.getCurrentVideo(),l=B(t,p,m);l[null==m||null===(e=m.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.ASSET_NAME]=G(t,i),l.authToken=v||"NULL",l.streamType=o,l.D2CType=a||"NONE",l.subscriberType=d||(a?"D2C":"FREE"),l["c3.cm.affiliate"]=d||"NULL",Z.setData(l),f("contentInfo",l)})),p.on("loadedmetadata",(function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),f("contentInfo",{screenResolution:e})})),p.on("play",(function(){L.has(p.currentSrc())||(L.add(p.currentSrc()),f("playbackStarted",null))})),p.on("ended",(function(){L.has(p.currentSrc())&&L.delete(p.currentSrc()),f("playbackEnded")})),p.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&f("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})})),p.on("dispose",(function(){null==L||L.clear(),f("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,o){return e.apply(this,arguments)}}(),Z=(K={},{setData:function(e){K=N(N({},K),e)},getData:function(){return K}}),ee=function(e,n){var o=null==n?void 0:n.skin;"default"==o?Promise.resolve().then((function(){return require("./skin-e9d5b0e1.js")})).then((function(o){o.initialiseSkin(e,n)})):"carousel"==o?Promise.resolve().then((function(){return require("./skin-f9b64c74.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==o?Promise.resolve().then((function(){return require("./skin-2ea7faaf.js")})).then((function(o){o.initialiseSkin(e,n)})):"multiplayer"==o?Promise.resolve().then((function(){return require("./skin-e7711ae6.js")})).then((function(o){o.initialiseSkin(e,n)})):"minimalist"==o?Promise.resolve().then((function(){return require("./skin-0c2336f4.js")})).then((function(o){o.initaliseSkin(e,n)})):"VL_ONE"==o?Promise.resolve().then((function(){return require("./skin-5e2c1ffd.js")})).then((function(o){o.initialiseSkin(e,n)})):"news"==o&&Promise.resolve().then((function(){return require("./skin-8519f6ab.js")})).then((function(o){o.initialiseSkin(e,n)}))};function ne(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function oe(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ne(Object(i),!0).forEach((function(o){e(n,o,i[o])})):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 ie=[],te=0,le=null;function re(){console.log("Cleaning up watch history data"),J=null,ie=[],te=0,le=null}function ae(e,n,o){var t,l,r,a,d,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(t=n.watchHistory)||void 0===t||t.apiVersion;var s=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,c=Math.floor(e.currentTime()),v=Math.floor(e.duration());null==n||null===(r=n.watchHistory)||void 0===r||r.xapiKey;var p=(null==n||null===(a=n.video)||void 0===a?void 0:a.originalObjectId)||null,f=(null==n||null===(d=n.watchHistory)||void 0===d?void 0:d.saveOffline)||!1,m=Math.floor(e.currentTime()),g=u?100:Math.floor(c/v*100),w={};f?ue(w={completed:u,watchedTime:m,watchedPercentage:g},s,n.siteOwner):(w=oe(oe({videoId:J,watchedTime:m,watchedPercentage:g,doneWatching:u,profileId:s},le&&{seriesId:le}),p&&{originalObjectId:p}),i.saveWatchHistory(w).then((function(e){})).catch((function(e){}))),te=c+o}function de(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function ue(n,o,i){var t=o?"watchhistory-data-".concat(o):"watchhistory-data-guest-".concat(i),l=de(t),r=(new Date).getTime(),a=c.getCurrentVideo(),d=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(n,o){return oe(oe({},n),{},e({},o,d[o]))}),{}),s=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===J}));s<0?l.push(oe(oe({content:u},n),{},{addedDate:r,updateDate:r})):l[s]=oe(oe(oe({},l[s]),n),{},{updateDate:r}),localStorage.setItem("".concat(t),JSON.stringify(l))}function se(e,n,o){var i=de(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(o)),t=[];return i&&Array.isArray(i)&&(t=i.filter((function(e){var o;return(null==e||null===(o=e.content)||void 0===o?void 0:o.id)===n}))),t}var ce=!1,ve=function(e,n){var o,t,l=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(o=e[l])||void 0===o||null===(t=o.streamingInfo)||void 0===t?void 0:t.secondaryVideoAssets)||null)&&!ce){var r=pe(e,"videoAssets","secondaryVideoAssets"),a=i.getSource(r,n);return a&&i.loadVideo(n,a),ce=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function pe(e,n,o){if(Array.isArray(e))return e.map((function(e){return pe(e,n,o)}));if(null!==e&&"object"===v(e)){var i={};return Object.keys(e).forEach((function(t){t===n&&void 0!==e[o]?i[t]=e[o]:t===o&&void 0!==e[n]?i[t]=e[n]:i[t]=pe(e[t],n,o)})),i}return e}function fe(e){var n=e.publisherId,o=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var i=window.ns_.analytics;i.PlatformApi.setPlatformAPI(i.PlatformApi.PlatformApis.WebBrowser);var t=new i.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==o?void 0:o.userConsent)||"",cs_fpid:(null==o?void 0:o.userId)||""}});return i.configuration.addClient(t),i.configuration.enableFirstPartyCookie(),i.configuration.enableImplementationValidationMode(),i.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=i,i}function me(){var e,n,o,i=null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscorePlayerInstance)||void 0===n?void 0:n.seekable().end(0),t=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.comscorePlayerInstance.currentTime();return Math.max(0,1e3*(i-t))}function ge(){var e,n,o,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(window.analytics){var t=window.analytics,l=new t.StreamingAnalytics;null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e||(e.tagRef=l),null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n||(n.contentOptions=i),i.implementationId&&l.setImplementationId(i.implementationId),i.projectId&&l.setProjectId(i.projectId),l.setMediaPlayerName(i.playerName||"Video.js"),l.setMediaPlayerVersion(i.playerVersion||"8.x"),l.createPlaybackSession(),(null==i?void 0:i.isDvr)&&l.setDvrWindowLength((null==i?void 0:i.dvrWindowLength)||0);var r=new t.StreamingAnalytics.ContentMetadata;r.setMediaType(t.StreamingAnalytics.ContentMetadata.ContentType[i.contentType||"LONG_FORM_ON_DEMAND"]),r.setUniqueId(i.uniqueId),r.setLength((null==i?void 0:i.isLive)?0:i.duration||0),r.setStationTitle(i.stationTitle),r.setPublisherName(i.publisherName),r.setProgramTitle(i.programTitle),r.setDateOfDigitalAiring(i.digitalAirdate.year,i.digitalAirdate.month,i.digitalAirdate.day),r.setDateOfTvAiring(i.tvAiring.year,i.tvAiring.month,i.tvAiring.day),r.carryTvAdvertisementLoad(i.isDaiAds?"1":null),r.setEpisodeTitle(null==i?void 0:i.contentTitle),r.setEpisodeSeasonNumber(i.seasonNumber),r.setEpisodeNumber(i.episodeNumber),r.setProgramId(i.programId),r.setEpisodeId(i.episodeId),r.setGenreName(i.contentGenre),r.setDictionaryClassificationC3(i.brand||"null"),r.setDictionaryClassificationC4(i.platform||"null"),r.setDictionaryClassificationC6(i.genre||"null"),r.classifyAsCompleteEpisode(i.completeEpisode?"1":null);var a={ns_st_li:(null==i?void 0:i.isLive)?"1":"0"};return r.addCustomLabels(a),l.setMetadata(r),null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.contentMetadata=r),l.notifyPlay(),console.log("[Comscore] StreamingAnalytics initialized for:",i.programTitle),l}console.error("[Comscore] analytics SDK not found.")}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,comscorePlayerInstance:null,mode:"content",cleanupFns:[],contentOptions:null});var we=!1;function ye(e){var n,o,i,t;if(e)if(null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef){var l=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef;null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i||(i.comscorePlayerInstance=e);var r=function(){var e,n,o;if("content"===(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.mode)&&l.notifyPlay(),null===(o=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.contentOptions)||void 0===o?void 0:o.isDvr){var i=me();l.startFromDvrWindowOffset(i)}},a=function(){var e;return"content"===(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.mode)&&(null==l?void 0:l.notifyPause())},d=function(){var e;return"content"===(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.mode)&&(null==l?void 0:l.notifyEnd())},u=function(){var e,n;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.contentOptions)||void 0===n?void 0:n.isDvr){var o=me();l.startFromDvrWindowOffset(o)}l.notifySeekStart()},s=function(){null==l||l.notifyBufferStart(),function(){var e,n;we||(we=!0,null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscorePlayerInstance)||void 0===n||n.any(["playing","timeupdate"],(function(){var e,n,o,i,t,l;we=!1,(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&"content"===(null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.mode)&&(null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef)||void 0===i||i.notifyBufferStop(),null===(l=null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t?void 0:t.tagRef)||void 0===l||l.notifyPlay())})))}()};e.on("play",r),e.on("pause",a),e.on("ended",d),e.on("seeking",u),e.on("waiting",s),e.on("timeupdate",(function(){var n,o;if(null===(o=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.contentOptions)||void 0===o?void 0:o.isLive)return l.startFromPosition(0);l.startFromPosition&&"function"==typeof e.currentTime&&l.startFromPosition(1e3*e.currentTime())})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||t.comscoreCleanupFns.push((function(){e.off("play",r),e.off("pause",a),e.off("ended",d),e.off("seeking",u),e.off("waiting",s)})),console.log("[Comscore] Player events attached.")}else console.warn("[Comscore] Tag not initialized. Call initializeComscoreTag() first.");else console.warn("[Comscore] No player instance provided.")}function be(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}function he(e){var n,o,i,t,l=e.isLive,r=e.startTimeInSeconds;return l?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==r?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:r===("function"==typeof(null===(o=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===o?void 0:o.getDuration)&&(null===(t=null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.comscorePlayerInstance)||void 0===t?void 0:t.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function Oe(){var e,n,o,i,t,l,r,a,d,u;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.comscoreCleanupFns=[]),console.log("comscoreTag",null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.tagRef),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t?void 0:t.tagRef){try{null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||l.tagRef.notifyEnd()}catch(e){}null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r||(r.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(u=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===u||(u.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}function Ce(e,n){var o,i,t,l,r,a,d,u={contentType:(null==e?void 0:e.contentType)||"LONG_FORM_ON_DEMAND",uniqueId:null===(o=null==e?void 0:e.gist)||void 0===o?void 0:o.id,duration:(null==e?void 0:e.runtime)||0,stationTitle:null==e?void 0:e.siteName,publisherName:null==e?void 0:e.network,programTitle:(null==e?void 0:e.programTitle)||ke(e),programId:(null==e?void 0:e.programId)||Ie(e),episodeId:(null==e?void 0:e.episodeId)||(null===(i=null==e?void 0:e.gist)||void 0===i?void 0:i.id),contentTitle:null===(t=null==e?void 0:e.gist)||void 0===t?void 0:t.title,isLive:null===(l=null==e?void 0:e.streamingInfo)||void 0===l?void 0:l.isLiveStream,brand:null==e?void 0:e.network,seasonNumber:(null==e?void 0:e.seasonNumber)||Pe(null==e?void 0:e.episodeDisplayAttribute).season,episodeNumber:(null==e?void 0:e.episodeNumber)||Pe(null==e?void 0:e.episodeDisplayAttribute).episode,platform:(null==e?void 0:e.platform)||"browser",genre:(null==e?void 0:e.customGenre)||(null==e?void 0:e.genre)||"null",completeEpisode:(null==e?void 0:e.isCompleteEpisode)||!0,digitalAirdate:Ee(null==e?void 0:e.publishDate),tvAiring:Ee(null==e?void 0:e.publishDate),contentGenre:null==e?void 0:e.genre,isDaiAds:!!(null==e?void 0:e.isDaiAds),isDvr:(null===(r=null==e?void 0:e.liveDetails)||void 0===r?void 0:r.isDvrEnabled)||!1,dvrWindowLength:(null===(a=null==e?void 0:e.liveDetails)||void 0===a?void 0:a.isDvrEnabled)?_e(n):0,implementationId:null===(d=null==e?void 0:e.comscoreConfig)||void 0===d?void 0:d.implementationId};return"LINEARCHANNEL"===(null==e?void 0:e.contentType)&&(u.ContentType="LIVE"),u}function _e(e){var n=1e3*(e.seekable().end(0)-e.seekable().start(0));return console.log("dvrWindowMs",n),n}function Se(e,n){var o,i,t=null!==(i=null===(o=null==e?void 0:e.match(/campaignId=([^;]*)/))||void 0===o?void 0:o[1])&&void 0!==i?i:null;return(null==t?void 0:t.trim())||null}function ke(e){var n,o;return(null==e?void 0:e.series)?null===(o=null==e?void 0:e.series)||void 0===o?void 0:o.title:null===(n=null==e?void 0:e.gist)||void 0===n?void 0:n.title}function Ie(e){var n,o;return(null==e?void 0:e.series)?null===(o=null==e?void 0:e.series)||void 0===o?void 0:o.id:null===(n=null==e?void 0:e.gist)||void 0===n?void 0:n.id}function Ee(e){var n;return{year:(n=isNaN(Number(e))?new Date(e):new Date(1e3*Number(e))).getFullYear(),month:n.getMonth()+1,day:n.getDate()}}function Pe(e){if(!e)return{season:null,episode:null};var n=e.match(/S(\d+)\s*E(\d+)/i);return n?{season:Number(n[1]),episode:Number(n[2])}:{season:null,episode:null}}!function(e){e.registerPlugin("comscore",(function(e){var n=e||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;new Promise((function(o,i){var t=document.createElement("script");t.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",t.async=!0,document.head.appendChild(t),t.onload=function(){fe({publisherId:e||"40813950"})},t.onerror=function(e){i("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}))}(l);var Te=Object.freeze({__proto__:null,createComscoreStreamingTag:ge,destroyComscoreTag:Oe,endComscoreAdTracking:function(){var e,n,o,i,t;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var l=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;l.notifyPause(),l.notifyEnd(),null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.mode="content"),(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata)&&(l.setMetadata(null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t?void 0:t.contentMetadata),l.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}},finishComscoreAdTracking:function(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))},formulateComscoreAdPayload:function(e){var n,o,i,t;return{id:null==e?void 0:e.adId,adTitle:null==e?void 0:e.adTitle,adDuration:(null==e?void 0:e.durationInSeconds)||0,startTimeInSeconds:(null==e?void 0:e.startTimeInSeconds)||0,campaignId:Se(null===(o=null===(n=null==e?void 0:e.extensions)||void 0===n?void 0:n[0])||void 0===o?void 0:o.content),placementId:Se(null===(t=null===(i=null==e?void 0:e.extensions)||void 0===i?void 0:i[0])||void 0===t?void 0:t.content),trackingUrl:null==e?void 0:e.trackingUrl,creativeId:null==e?void 0:e.creativeId}},formulateComscorePayload:Ce,getComscoreTagInstance:function(){var e;return null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef},setComscorePlayerInstance:ye,startComscoreAdTracking:function(){var e,n,o,i,t,l,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",be()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.mode="ad"),d.notifyPause();var u=new a.StreamingAnalytics.AdvertisementMetadata;u.setMediaType(he({isLive:null===(t=null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentOptions)||void 0===t?void 0:t.isLive,startTimeInSeconds:null==r?void 0:r.startTimeInSeconds})),u.setUniqueId(r.id||"ad-001"),u.setLength(1e3*parseInt(r.adDuration,10)||0),u.setTitle(r.title||"Advertisement"),u.setServerCampaignId(r.campaignId),u.setRelatedContentMetadata(null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l?void 0:l.contentMetadata),u.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),u.setPlacementId(r.placementId);var s={cs_ad_tu:null==r?void 0:r.trackingUrl,ns_st_ami:null==r?void 0:r.creativeId};u.addCustomLabels(s),d.setMetadata(u),d.notifyPlay(),console.log("[Comscore] Ad started:",r)}});function De(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function je(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?De(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):De(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function Re(e,n){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,n){if(e){if("string"==typeof e)return Me(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Me(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){o&&(e=o);var i=0,t=function(){};return{s:t,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t}}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 l,r=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==o.return||o.return()}finally{if(a)throw l}}}}function Me(e,n){(null==n||n>e.length)&&(n=e.length);for(var o=0,i=Array(n);o<n;o++)i[o]=e[o];return i}function Ae(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function xe(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Ae(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Ae(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var Ne=function(e,n,o,l){var r,d,u,s,p,f=l.res,m=l.sres,g=t.getPlayer(e),w=(null==f?void 0:f.contentType)||"video",b=(null==f||null===(r=f[w])||void 0===r?void 0:r.drmEnabled)||!1,h=(null==f||null===(d=f[w])||void 0===d||null===(u=d.streamingInfo)||void 0===u?void 0:u.isLiveStream)||!1,O=(null==f||null===(s=f[w])||void 0===s||null===(p=s.liveDetails)||void 0===p?void 0:p.isDvrEnabled)||!1;c.setCurrentVideo(f),c.videoReplayTracker.set(f),g&&(g.on("loadstart",(function(){h?o.resolve({status:!0,msg:"Video Loaded",response:f}):o.resolve(xe({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:f}:{response:f}))})),g.on("loadeddata",(function(){var o,l,r,d=a.getCaptions(e);if(null==d||d.map((function(n){return a.disableCaptions(e,n.id)})),O&&"Safari"===i.detectBrowser())try{var u;null==g||null===(u=g.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==g||!g.muted())&&y(e,sessionStorage.getItem("volume")||"100");var s=c.getCurrentVideo();if(function(e,n){var o,i,l,r,a,d,u,s,v,p,f,m,g=null==e?void 0:e.playerId,w=t.getPlayer(g),y=null==n?void 0:n.siteName;if(null!=e&&null!==(o=e.comscore)&&void 0!==o&&o.enable){var b=c.getCurrentVideo(),h=(null==b||null===(i=b.video)||void 0===i?void 0:i.metadata)||[],O=(null==h?void 0:h.length)&&h.filter((function(e){return"advertisingGenre"===e.name}));if(null!==(l=O)&&void 0!==l&&l.length){var C=O.map((function(e){return e.value}));O=null==C?void 0:C.join(",")}Oe();var _=null===(r=window)||void 0===r?void 0:r.lcProgrammeDetails,S=Array.isArray(null==_?void 0:_.category)?null==_||null===(a=_.category)||void 0===a?void 0:a.join(","):(null==_?void 0:_.category)||null,k=je(je(je({},null==b?void 0:b.video),null==b?void 0:b.linearchannel),{},{siteName:y,programId:(null==_?void 0:_.videotmsid)||null,programTitle:(null==_?void 0:_.lcProgrammeName)||null,episodeId:(null==_?void 0:_.videotmsid)||null,seasonNumber:(null==_||null===(d=_.seriesDetails)||void 0===d?void 0:d.season)||null,episodeNumber:(null==_||null===(u=_.seriesDetails)||void 0===u?void 0:u.episode)||null,isCompleteEpisode:!!(null!=b&&null!==(s=b.video)&&void 0!==s&&s.series||null!=_&&null!==(v=_.seriesDetails)&&void 0!==v&&v.episode),genre:O||S,comscoreConfig:{implementationId:(null==e||null===(p=e.comscore)||void 0===p?void 0:p.implementationId)||null,projectId:(null==e||null===(f=e.comscore)||void 0===f?void 0:f.projectId)||null}});if(null!=k&&null!==(m=k.streamingInfo)&&void 0!==m&&m.isLiveStream&&(k.contentType="LIVE"),null==k||!k.network){var I,E=(null==k?void 0:k.metadata)||[],P=null==E||null===(I=E.find((function(e){return"network"===e.name})))||void 0===I?void 0:I.value;k.network=P||null}null!=k&&k.network&&null!=k&&k.genre&&(k.customGenre="".concat(k.network,"_").concat((null==k?void 0:k.programTitle)||function(e){var n,o;return null!=e&&e.series?null==e||null===(o=e.series)||void 0===o?void 0:o.title:null==e||null===(n=e.gist)||void 0===n?void 0:n.title}(k),"_").concat(k.genre)),null!=_&&_.airDate&&(k.publishDate=_.airDate);var T=Ce(k,w);console.log("comscoreOptions player data",T),ge(je({playerName:"Video.js"},T)),ye(w)}}(n,f),i.clearError(),null!=n&&n.watchHistory&&null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.enable&&(!n.isAnonymousUser||null!=n&&null!==(l=n.watchHistory)&&void 0!==l&&l.saveOffline)){var v,p,m=xe(xe({},n),f);!function(e,n,o){var i,l,r;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(le=null==n||null===(l=n.series)||void 0===l?void 0:l.id),ie=[],te=0,J=o;var a=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.interval)||30,d=t.getPlayer(e);d&&(d.on("dispose",re),d.on("timeupdate",(function(){if(!d.seeking()){var e=Math.floor(d.currentTime());ie.includes(te)||(e!=te||e<a?e>te&&(te=e+a):(ie.push(e),ae(d,n,a)))}})),d.one("ended",(function(){ae(d,n,a,!0)})))}(e,m,null==s||null===(v=s.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=n&&null!==(r=n.analytics)&&void 0!==r&&r.muxKey&&null!=g&&g.mux){var w,b,h,C,_,S,k=(null===(w=c.getCurrentVideo())||void 0===w?void 0:w.video)||(null==f?void 0:f.video),I=null==k?void 0:k.gist,E={env_key:null==n||null===(b=n.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==k||null===(C=k.series)||void 0===C?void 0:C.title,video_stream_type:null!=k&&null!==(_=k.streamingInfo)&&void 0!==_&&_.isLiveStream?"live":"video",viewer_user_id:null==n||null===(S=n.analytics)||void 0===S?void 0:S.userId};g.mux({debug:!1,data:E})}})),g.textTracks().on("change",(function(e){var n=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];g.trigger("subtitlechanged",n)})),g.on("subtitlechanged",(function(e,n){var o,i,t,l,r,a,d,u,s,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(t=i.framework)||void 0===t||null===(l=t.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,f=null===(a=window)||void 0===a||null===(d=a.cast)||void 0===d||null===(u=d.framework)||void 0===u||null===(s=u.CastContext)||void 0===s||null===(c=s.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),w=g.media.tracks.filter((function(e){return"TEXT"==e.type}));m=n?new chrome.cast.media.EditTracksInfoRequest([w[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}})),g.tech_.on("retryplaylist",(function(){h&&ve(f,e)})),g.on("error",(function(){var n,t;(console.log("ERROR",g.error(),g.error().code),4===g.error().code&&h)?ve(f,e):(i.handleError(e,(null==g||null===(n=g.error())||void 0===n?void 0:n.message)||"Some error occured"),o.reject({status:!1,msg:(null==g||null===(t=g.error())||void 0===t?void 0:t.message)||"Some error occured",response:f}))})),g.one("play",(function(){var e,o,i,t,l;if(null===(e=window)||void 0===e||null===(o=e.app_data)||void 0===o||null===(i=o.appcmsMain)||void 0===i||null===(t=i.adsConfig)||void 0===t||!t.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var r,a,d,u=null===(r=c.getCurrentVideo())||void 0===r||null===(a=r.video)||void 0===a||null===(d=a.gist)||void 0===d?void 0:d.id,s=c.getSeriesWatchMap(),v=(null==s?void 0:s.get(u))||{t:0,p:0},p=v.t,f=v.p;p&&f<95&&setTimeout((function(){g.currentTime(p)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){g.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0);if(null!=g&&g.dvrSeekbar)try{g.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}})),g.on("volumechange",(function(){var e=100*g.volume().toFixed(2);g.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),g.on("chromecastDisconnected",(function(){if(h){g.currentSource();for(var e=g.textTracks(),n=e.length-1;n>=0;n--)g.removeRemoteTextTrack(e[n])}})),g.one("loadeddata",(function(){var e,n=(null==g||null===(e=g.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort((function(e,n){var o=(e.language||e.language||"").toUpperCase(),i=(n.language||n.label||"").toUpperCase();return o<i?-1:o>i?1:0})),"object"==v(g.dash)){var o,t,l,r=null==g||null===(o=g.dash)||void 0===o||null===(t=o.mediaPlayer)||void 0===t?void 0:t.getTracksFor("audio"),a=null==r?void 0:r.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),d=Re(n);try{for(d.s();!(l=d.n()).done;){var u=l.value;if(a&&(null==u?void 0:u.id)=="dash-audio-".concat(a.index)){u.enabled=!0;break}}}catch(e){d.e(e)}finally{d.f()}}else{var s,c=Re(n);try{for(c.s();!(s=c.n()).done;){var p,f,m,w=s.value;if(("Chrome"==i.detectBrowser()||"Edge"==i.detectBrowser()&&(null!==(p=navigator)&&void 0!==p&&null!==(f=p.userAgent)&&void 0!==f&&f.includes("Macintosh")||!b))&&null!=w&&null!==(m=w.label)&&void 0!==m&&m.includes("5.1"))g.audioTracks().removeTrack(w);else{if("main"==w.kind){w.enabled=!0;break}w.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}})))};function Le(e,n,o){var i=document.createElement("div");return i.className="vjs-seekbar-program-marker",i.id=e,i.style.title=n,i.style.left="".concat(o,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="4px",i.style.backgroundColor="#000000",i.style.left="".concat(o,"%"),i.style.pointerEvents="none",i}function Ve(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach((function(e){e.remove()}))}function Be(e){var n=(new Date).getTime(),o=new Date(n-1e3*e).getTime();return(c.getCurrentEpgPrograms()||[]).filter((function(e){var i=new Date(e.formatted_startdate).getTime();return i>=o&&i<=n})).map((function(e){var n=new Date(e.formatted_startdate).getTime()-o;return{title:e.title,time:n/1e3,id:e.programme_id}}))}function He(e,n){var o=t.getPlayer(e);if(o){var i=n.dvrConfig,l=void 0===i?{}:i,r=n.videoId;n.epg;var a=l.playLive,d=l.playFromBegining,u=l.programs;c.setCurrentEpgPrograms(u),o.on("loadeddata",(function(){f.checkDvrStartOverEnabled(n)?d?f.playFromBeginningHandler(o,n):a?f.playLiveOrResumeHandler(o,r):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.dvrConfig,i=void 0===o?{}:o,t=n.videoId,l=n.epg,r=i.buttonConfig,a=void 0===r?{}:r,d=a.watchLive;a.resume;var u=a.startFromBegining,s=t;if(l&&null!=l&&l.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));s="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!f.getWatchedTime(s),p=document.querySelector(".vjs-dvr-btn-overlay");p||((p=document.createElement("div")).className="vjs-dvr-btn-overlay");var m=f.getCurrentProgramThumbnail(n);m&&(p.style.backgroundImage="url(".concat(m,")"),p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="cover");p.innerHTML=qe(i,v),p.style.display="flex",e.el().appendChild(p),f.pauseAndHideControl(e),Ue("watch-live-resume-btn",d,(function(){f.showControl(e,p),f.playLiveOrResumeHandler(e,s)})),Ue("watch-begining-btn",u,(function(){f.showControl(e,p),f.playFromBeginningHandler(e,n)}))}(o,n),f.handleLiveStartOverBtn({player:o,showWatchLive:!0,showStartOver:!0})):f.removeDvrStartOver(o)})),o.one("loadedmetadata",(function(){sessionStorage.setItem("program_switched",!0),function(e,n){var o=n.videoId,i=e.currentTime(),t=!1,l=e.seekable(),r=l.start(0),a=l.end(l.length-1)-r,d=JSON.parse(sessionStorage.getItem("epgConfig")),u=o,s=!0;if(d&&null!=d&&d.enable){var c;s=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==d?void 0:d.programId),u=null==d?void 0:d.programId}e.on("seeking",(function(){t=!0})),e.on("seeked",(function(){t=!1,i=e.currentTime();var o=JSON.parse(sessionStorage.getItem("epgConfig"));if(o&&null!=o&&o.enable){if(!s||sessionStorage.getItem("program_switched"))return;u="".concat(null==o?void 0:o.programId,"-").concat(null==o?void 0:o.channelId)}f.saveWatchedTime(u,i),f.getProgramStartTime(e,n),f.handleLiveStartOverBtn({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})})),e.on("timeupdate",(function(){if(!t){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!s||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");u="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var o=e.currentTime();Math.abs(o-i)>=20&&(f.saveWatchedTime(u,o),i=o,function(e,n){Be(n).forEach((function(o){var i=o.id,t=o.title,l=o.time,r=document.getElementById(i);if(r){var a=Math.min(l/n*100,99.5);r.style.left="".concat(a,"%")}else{var d=e.controlBar.progressControl.seekBar.el(),u=Le(i,t,Math.min(l/n*100,99.5));d.appendChild(u)}}))}(e,a))}}))}(o,n)}))}else console.warn("Player instance is required to initialize start over.")}function Ue(e,n,o){var i,t,l=document.getElementById(e);l&&(t=n,(i=l)&&(i.style.color="".concat((null==t?void 0:t.textColor)||"#000"),i.style.backgroundColor="".concat((null==t?void 0:t.backGroundColor)||"#DCF95B")),l.addEventListener("click",o))}function qe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(null==e?void 0:e.buttonConfig)||{},i=o.watchLive,t=o.resume,l=o.startFromBegining,r=n?(null==t?void 0:t.text)||"Resume":(null==i?void 0:i.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(p.watchLiveIcon2()," ").concat(r,"</button>"),d='<button id="watch-begining-btn">'.concat(p.startLiveIcon()," ").concat((null==l?void 0:l.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(d,"</div>")}function Fe(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function We(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Fe(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Fe(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var Ge=function(r,d,s,c){var v,p,f,m,g,w,y,b,h,C,_,S,k,I,E,P,T,D,j,R,A,x,N,L,V,B,H,U,q,F,W,G,z,K,J,Y,X,Q,ne,oe,ie=d.res,te=void 0===ie?null:ie,le=d.sres,re=void 0===le?null:le,ae=null!=s&&s.chromecastReceiverId?["chromecast","html5"]:["html5"],de=(null===(v=te)||void 0===v?void 0:v.contentType)||"video",ue=u.impolicy16x9(null===(p=te)||void 0===p||null===(f=p[de])||void 0===f||null===(m=f.gist)||void 0===m?void 0:m.videoImageUrl)||u.impolicy16x9(null===(g=te)||void 0===g||null===(w=g[de])||void 0===w||null===(y=w.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),se=(null===(h=te)||void 0===h||null===(C=h[de])||void 0===C||null===(_=C.liveDetails)||void 0===_?void 0:_.isDvrEnabled)||!1,ce=(null===(S=te)||void 0===S||null===(k=S[de])||void 0===k||null===(I=k.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,ve=(null===(E=te)||void 0===E||null===(P=E.ads)||void 0===P||null===(T=P.preRoll)||void 0===T||null===(D=T.adTags)||void 0===D||null===(j=D.web)||void 0===j?void 0:j.active)&&(null===(R=te)||void 0===R||null===(A=R.ads)||void 0===A||null===(x=A.preRoll)||void 0===x||null===(N=x.adTags)||void 0===N||null===(L=N.web)||void 0===L?void 0:L.url),pe=(null===(V=te=We(We({},te),{},{audioAssetSource:null==s?void 0:s.audioAssetSource}))||void 0===V||null===(B=V[de])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(H=window)||void 0===H||null===(U=H.app_data)||void 0===U||null===(q=U.appcmsMain)||void 0===q||null===(F=q.adsConfig)||void 0===F?void 0:F.vodAdSticherProvider)||!1,fe=(null==s?void 0:s.latency)||6,me=(null==s?void 0:s.skin_settings)||{};null==s||s.dvrConfig;var ge=(ne={enableSmoothSeeking:!0,controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==me?void 0:me.pictureInPictureToggle)||!1},playbackRates:null!=me&&me.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==s.skin,liveui:se},e(ne,"autoplay",null==s?void 0:s.autoplay),e(ne,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!ve),e(ne,"loop",(null==s?void 0:s.loop)||!1),e(ne,"audioPosterMode",null==s?void 0:s.audioPosterMode),e(ne,"html5",We(We({dash:We(We(We({},!l.browser.IS_SAFARI&&{useTTML:!0}),(null==s?void 0:s.debugConfig)&&(null==s||null===(W=s.debugConfig)||void 0===W?void 0:W.enable)&&{debug:!0,logLevel:null!=s&&null!==(G=s.debugConfig)&&void 0!==G&&G.logLevel?null==s||null===(z=s.debugConfig)||void 0===z?void 0:z.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:fe},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:We(We({liveRangeSafeTimeDelta:fe,useDevicePixelRatio:!0,experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==s||null===(K=s.customData)||void 0===K?void 0:K.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(J=null==s?void 0:s.enableLowInitialPlaylist)||void 0===J||J}),debug:(null==s?void 0:s.debugConfig)&&(null==s||null===(Y=s.debugConfig)||void 0===Y?void 0:Y.enable)||!1,nativeTextTracks:"Safari"==i.detectBrowser()},0==(null==s||null===(X=s.customData)||void 0===X?void 0:X.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(Q=s.customData)||void 0===Q?void 0:Q.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ne,"poster",ue),e(ne,"techOrder",ae),e(ne,"chromecast",{requestCustomDataFn:function(e){var n,o,i=t.getPlayer(r),l=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),a=function(e,n,o){var i,t,l,r,a,d,u,s,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,w,y,b,h,O,C;f.isDrmEnabled=!0;var _=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,S=(null==_?void 0:_.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(w=g[0])||void 0===w||null===(y=w.options)||void 0===y?void 0:y.serverURL);f.licenseUrl=S;var k=(null==_?void 0:_.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(h=b[0])||void 0===h||null===(O=h.options)||void 0===O||null===(C=O.httpRequestHeaders)||void 0===C?void 0:C["X-AxDRM-Message"]);f.licenseToken=k}var I=(null==e||null===(i=e[p])||void 0===i||null===(t=i.gist)||void 0===t?void 0:t.contentType)||"VIDEO";f.contentType=I;var E=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=E;var P=null==e||null===(a=e[p])||void 0===a||null===(d=a.gist)||void 0===d?void 0:d.title;f.mediaTitle=P;var T=null==e||null===(u=e[p])||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.videoImageUrl;return f.mediaImage=T,f.subTitles=o,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(te,e,l);return We(We({},a),{},{convivaMetaData:We({customerKey:(null==s||null===(n=s.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==s||null===(o=s.convivaConfig)||void 0===o?void 0:o.debug)||!1},Z.getData())})},modifyLoadRequestFn:function(e){var n,o,i,l,a,d=t.getPlayer(r),u=(null==d?void 0:d.currentSource())||{};!(null===(n=te)||void 0===n||null===(o=n[de])||void 0===o||null===(i=o.streamingInfo)||void 0===i||null===(l=i.videoAssets)||void 0===l?void 0:l.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(a=u.src)&&void 0!==a&&a.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ne);if(!l.getPlayers()[r]){null!=s&&s.debugConfig&&null!=s&&null!==(oe=s.debugConfig)&&void 0!==oe&&oe.enable&&l.log.level("debug");var we=l(r,ge,function(){var e=n(o.mark((function e(){var n,t,d,u,v,p,f,m,g,w,y,b,h,C,_,S,k,I,E,P,T;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(we),console.log(l.VERSION),console.log(l.getPlugins()),e.next=5,M(s,te);case 5:if(h=null===(n=te)||void 0===n||null===(t=n[de])||void 0===t||null===(d=t.liveDetails)||void 0===d?void 0:d.startOverTime,ce&&c.resolve(We({status:!0,msg:"Player Initialised"},re?{seriesResponse:re,response:te}:{response:te})),se&&null!=s&&null!==(u=s.dvrConfig)&&void 0!==u&&u.enable&&He(r,We(We({},s),{},{isDvrEnabled:se})),i.inititateBeacon(r,null==s?void 0:s.analyticsCb,null==s?void 0:s.customData),$(r,s),/Android/i.test(navigator.userAgent)&&(l.options.vhs.overrideNative=!0),se&&O(r,h),!ve||null!=s&&null!==(v=s.customData)&&void 0!==v&&v.disableAds||i.initialiseAdvertisement(r,ve,te),C=i.getSource(te,r),console.log(C),null!=s&&s.nearestClusterUrl&&(C=i.getUpdatedClusterSource(C,s.nearestClusterUrl)),!pe){e.next=21;break}return e.next=20,i.getSGAIEnabledSource(r,te);case 20:C=e.sent;case 21:C?i.loadVideo(r,C):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:te}),i.handleError(r,"Incompatible / Missing Source")),((null===(p=te)||void 0===p||null===(f=p[de])||void 0===f||null===(m=f.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(w=te)||void 0===w||null===(y=w[de])||void 0===y||null===(b=y.closedCaptions)||void 0===b?void 0:b.length)>0)&&(T=(null===(S=te)||void 0===S||null===(k=S[de])||void 0===k||null===(I=k.contentDetails)||void 0===I?void 0:I.closedCaptions)||(null===(E=te)||void 0===E||null===(P=E[de])||void 0===P?void 0:P.closedCaptions),_=T.filter((function(e){return"VTT"===e.format||"WEBVTT"===e.format})),a.addCaptions(r,_)),null!=s&&s.disableControls?i.disableControls(r):ee(r,We(We(We({},s),ge),{},{liveVideo:ce,isDvrEnabled:se,res:te,sres:re})),Ne(r,We(We(We({},s),ge),{},{liveVideo:ce}),c,{res:te,sres:re});case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}},ze={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Ke(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function Je(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Ke(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Ke(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var Ye,Xe=function(e,n){var o=n.resolve,i=n.reject,t=null==e?void 0:e.playerId,l=Qe(e);Ge(t,{res:l},e,{resolve:o,reject:i})},Qe=function(e){var n,o,t,l,r,a,d,u,s=null==e?void 0:e.streamingInfo,c=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,v=(null==e||null===(o=e.streamingInfo)||void 0===o?void 0:o.isDrmEnabled)||null,p=(null==e||null===(t=e.streamingInfo)||void 0===t||null===(l=t.ads)||void 0===l?void 0:l.url)||null,f=(null==e||null===(r=e.streamingInfo)||void 0===r?void 0:r.posterUrl)||null,g=(null==e||null===(a=e.streamingInfo)||void 0===a?void 0:a.subtitles)||[],w=(null==e||null===(d=e.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.drmProvider)||null,y=null==e?void 0:e.token,b=i.getDecodedToken(y),h=null==b?void 0:b.site;return Je(Je({id:null==ze?void 0:ze[h]},!v&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:v,streamingInfo:{videoAssets:Je(Je({},w&&{drmProvider:w}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==s?void 0:s.isDvrEnabled},gist:Je({},f&&{videoImageUrl:f}),contentDetails:Je({},(null==g?void 0:g.length)>0&&{closedCaptions:m(g)})},ads:{preRoll:{adTags:{web:Je(Je({},p&&{active:!0}),p&&{url:p})}}}})};function $e(e,n){return Ze.apply(this,arguments)}function Ze(){return(Ze=n(o.mark((function e(n,t){var l,r,a,d,u,s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,a=null==n?void 0:n.videoId,d=null==n?void 0:n.playerId,u=!(null==n||!n.anonymousId),e.next=6,i.getToken();case 6:s=e.sent,i.getVideoDetails(a,s).then((function(e){var o,t,v,p;window.contentType=null==e||null===(o=e.data)||void 0===o||null===(t=o.video)||void 0===t||null===(v=t.gist)||void 0===v?void 0:v.contentType,c.setCurrentVideo(null==e?void 0:e.data);var f,m=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(p=n.watchHistory)&&void 0!==p&&p.enable&&!u)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var g,w,y,b=se((null===(g=n.watchHistory)||void 0===g?void 0:g.profileId)||"",a,null==n?void 0:n.siteOwner);if(b&&b.length)n.watchHistoryResumeTime=(null===(w=b[0])||void 0===w?void 0:w.watchedTime)||null,n.watchedPercentage=(null===(y=b[0])||void 0===y?void 0:y.watchedPercentage)||null;m.contentType="video",Ge(d,{res:m},n,{resolve:l,reject:r})}else i.getVideoInfo(a,s).then((function(e){var o,i,t,l,r,a;null!==(o=window)&&void 0!==o&&null!==(i=o.watchHistory)&&void 0!==i&&i.cb&&(null===(t=window)||void 0===t||null===(l=t.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,m.contentType="video"})).catch((function(e){var n,o,i,t;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(t=i.watchHistory)||void 0===t||t.cb(e))})).finally((function(){Ge(d,{res:m},n,{resolve:l,reject:r})}));else Ge(d,{res:m},n,{resolve:l,reject:r})})).catch((function(e){i.initiateErrorHandling(e,d,r,a)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function en(e,n){return nn.apply(this,arguments)}function nn(){return(nn=n(o.mark((function e(n,t){var l,r,a,d,u;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,e.next=3,i.getToken();case 3:a=e.sent,d=null==n?void 0:n.playerId,u=null==n?void 0:n.epg,i.getLinearChannelDetails(u,a).then((function(e){var o=null==e?void 0:e.data;o.contentType="linearchannel",o.channelId=null==u?void 0:u.channelId,Ge(d,{res:o},n,{resolve:l,reject:r})})).catch((function(e){i.initiateErrorHandling(e,d,r,videoId)}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function on(e,n){return tn.apply(this,arguments)}function tn(){return(tn=n(o.mark((function e(n,t){var l,r,a,d,u,s,v;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,a=t.reject,e.next=3,i.getToken();case 3:d=e.sent,u=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,c.seasonIdxManager.set(parseInt(s)),v=null==n||null===(l=n.series)||void 0===l?void 0:l.id,i.getSeriesDetails(v,d).then((function(e){var o,t,l,s=e.data,p=e.data.seasons;c.setCurrentSeries(p);var f=videoId||(null==p||null===(o=p[0])||void 0===o||null===(t=o.episodes)||void 0===t||null===(l=t[0])||void 0===l?void 0:l.id);i.createSeriesWatchMap(v,d),i.getVideoDetails(f,d).then((function(e){var o,i,t;window.contentType=null==e||null===(o=e.data)||void 0===o||null===(i=o.video)||void 0===i||null===(t=i.gist)||void 0===t?void 0:t.contentType,c.setCurrentVideo(e.data),Ge(u,{res:null==e?void 0:e.data,sres:s},n,{resolve:r,reject:a})})).catch((function(e){i.initiateErrorHandling(e,u,a,videoId)}))})).catch((function(e){i.initiateErrorHandling(e,u,a)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ln(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function rn(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ln(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ln(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}exports.VLPlayerCore=function(){return{loadVideoInstantly:i.loadVideoInstantly,onTimeUpdate:r.onTimeUpdate,getVideoDuration:r.getVideoDuration,onVideoEnded:r.onVideoEnded,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var t=n(o.mark((function n(t,l){var r,a,d,c,v,p,f,m,w,y,b,h,O,C,_,S,k,I,E,P,D,j,R,M,A;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!i.isPlayerInitialised(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(O=(null==e?void 0:e.videoSourceUrl)||!1,C=null==e?void 0:e.asat,_=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,S=null==e?void 0:e.videoId,k=(null==e||null===(a=e.series)||void 0===a?void 0:a.enable)||!1,I=(null==e?void 0:e.streamingInfo)||!1,window.videoId=S,E=null==e?void 0:e.token,!i.token_authentication_enabled(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",E),i.refreshTokenManager().set(null==e?void 0:e.refreshToken),E&&!i.isTokenExpired(E)){n.next=16;break}return l({status:!1,msg:"".concat(E?"Token is expired !":"Missing Authorization Token"),response:{token:E}}),n.abrupt("return");case 16:Ye=JSON.parse(atob(E.split(".")[1]));case 17:return window.siteName=null===(d=Ye)||void 0===d?void 0:d.site,window.siteId=null===(c=Ye)||void 0===c?void 0:c.siteId,e.isAnonymousUser=!(null===(v=Ye)||void 0===v||!v.anonymousId),e.siteOwner=(null===(p=Ye)||void 0===p?void 0:p.site)||null,e.userId=(null===(f=Ye)||void 0===f?void 0:f.userId)||null,window.sessionStorage.setItem("uid",null===(m=Ye)||void 0===m?void 0:m.userId),window.watchHistory=e.watchHistory||null,P=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(w=e.series)&&void 0!==w&&w.enable?null:null==e?void 0:e.chromecastReceiverId,D=(null==e||null===(y=e.analytics)||void 0===y?void 0:y.gaId)||null,(j=null==e?void 0:e.errors)&&(window.customErrors=j),window.customData=null==e?void 0:e.customData,s.setLocalisation(null==e||null===(b=e.customData)||void 0===b?void 0:b.localisation),i.baseUrlManager.set(e.apiBaseUrl),null!=e&&e.skin&&!u.isNotAValidSkin(e.skin)||(e.skin="VL_ONE"),n.next=35,T(e);case 35:D&&g("https://www.googletagmanager.com/gtag/js?id=".concat(D)).then((function(){return i.runGtag(D)})).catch((function(e){})),(R=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(P)))&&R.addEventListener("contextmenu",(function(e){return e.preventDefault()})),O?(A={directPlaybackUrl:O,id:M="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},C?i.getVideoDetails(M,E).then((function(n){var o=(null==n?void 0:n.data)||{};Ge(P,{res:rn(rn({},o),A)},e,{resolve:t,reject:l})})).catch((function(e){i.initiateErrorHandling(e,P,l,M)})):Ge(P,{res:A},e,{resolve:t,reject:l})):I?Xe(e,{resolve:t,reject:l}):k?on(e,{resolve:t,reject:l}):_?en(e,{resolve:t,reject:l}):$e(e,{resolve:t,reject:l});case 39:case"end":return n.stop()}}),n)})));return function(e,n){return t.apply(this,arguments)}}())},getRenditions:d.getRenditions,skip:i.skip,getPlayer:t.getPlayer,play:i.play,pause:i.pause,detectBrowser:i.detectBrowser,rewind:i.rewind,loadVideo:i.loadVideo,seekToTimeStamp:r.seekToTimeStamp,isPlayerInitialised:i.isPlayerInitialised,load:i.load,authenticateLC:i.authenticateLC,dispose:i.dispose,enableCaptions:a.enableCaptions,disableCaptions:a.disableCaptions,getCaptions:a.getCaptions,playSelectedResolution:d.playSelectedResolution,getSource:i.getSource,setVolume:y,getVolume:b,disableControls:i.disableControls,setPlaybackSpeed:r.setPlaybackSpeed,getEntitlementData:i.getEntitlementData,adsQueuePointManager:i.adsQueuePointManager,getSsaiEvents:i.getSsaiEvents,playerEvents:r.playerEvents,onReplay:r.onReplay,isBehindLive:i.isBehindLive}},exports.initiateMarker=function(e){var n=t.getPlayer(e),o=n.seekable(),i=n.controlBar.progressControl.seekBar.el();if(o&&o.length>0){var l=o.start(0),r=o.end(o.length-1)-l;Ve(),Be(r).forEach((function(e){var n=e.id,o=e.title,t=e.time,l=Le(n,o,Math.min(t/r*100,99.5));i.appendChild(l)}))}},exports.removeMarkers=Ve;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-2609dbe4.js"),i=require("./generic-d35f6dee.js"),l=require("./skin-516012d7.js"),c=require("./player_instance-fcf6a8fb.js");function d(e){var t=u();return function(){var r,s=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(s,arguments,o)}else r=s.apply(this,arguments);return n(this,r)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("./currentVideoInfo-31d70bec.js"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray");var m=s.getComponent("Component"),p=function(n){r(u,m);var a=d(u);function u(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),(r=a.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(u,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./multicamv2-7a86b517.js")})).then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(l.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var n=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var l=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",i.load(t.playerId,t.streams[e].id).then((function(e){i.play(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",n.append(a),s.dom.appendContent(u,n),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(n,a),s.dom.appendContent(n,l),s.dom.appendContent(e,n),s.dom.appendContent(e,d),c.getPlayer(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),u}();exports.default=p;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-2609dbe4.js"),i=require("./generic-d35f6dee.js"),l=require("./skin-516012d7.js");function c(e){var t=d();return function(){var r,s=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(s,arguments,o)}else r=s.apply(this,arguments);return n(this,r)}}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./currentVideoInfo-31d70bec.js"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray");var u=s.getComponent("Component"),m=function(n){r(d,u);var a=c(d);function d(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),(r=a.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(d,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./multicamv2-1efdbdb9.js")})).then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var n;null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(l.closeOpenDrawers(),r.classList.remove("hidden"),t.classList.add("open"),l.setUpdatedElHeight(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var a=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(a,"px"),n.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=parseInt(sessionStorage.getItem("selectedStreamIndex")||0),p=function(e){var r,n,a,l=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});m==e&&(l.classList.add("selected"),l.style.border="2px solid #D2393B"),l.onclick=function(){for(var r=s.dom.$$(".stream"),n=0;n<r.length;n++)r[n].style.border="none",r[n].classList.remove("selected");l.classList.add("selected"),l.style.border="2px solid #D2393B",i.load(t.playerId,t.streams[e].id).then((function(e){i.play(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},l.style.backgroundImage="url(".concat(t.streams[e].img,")");var c=document.createElement("img");c.className="stream-thumbnail-image",c.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(n=window)||void 0===n||null===(a=n.customData)||void 0===a?void 0:a.fallbackImage)),l.append(c),s.dom.appendContent(u,l),s.dom.appendContent(d,u)},v=0;v<this.streams.length;v++)p(v);s.dom.appendContent(n,a),s.dom.appendContent(n,c),s.dom.appendContent(e,n),s.dom.appendContent(e,d),l.handleDrawerResizing(this.playerId,e)}}]),d}();exports.default=m;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-2609dbe4.js"),s=require("./generic-d35f6dee.js"),a=require("./currentVideoInfo-31d70bec.js"),d=require("./skin-516012d7.js");function u(e){var n=c();return function(){var t,o=i(e);if(n){var l=i(this).constructor;t=Reflect.construct(o,arguments,l)}else t=o.apply(this,arguments);return r(this,t)}}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray");var p=o.getComponent("Component"),v=function(r){t(s,p);var i=u(s);function s(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,s),(t=i.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(s,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./nextEpisodeButton-b6e6586f.js")})).then((function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,l),o.dom.appendContent(n,t),o.dom.appendContent(n,r),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",(function(){o.dom.removeClass(n,"nextepisode-hidden")})),n.addEventListener("mouseover",(function(){o.dom.removeClass(n,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){o.dom.addClass(n,"nextepisode-hidden")})),n.addEventListener("mouseout",(function(){o.dom.addClass(n,"nextepisode-hidden")}))}}]),s}(),m=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach((function(e,r){e.gist.id===n&&(t=r)})),t):null},g=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then((function(e){a.setCurrentVideo(e.response)}))};var r=o.dom.$(".next-eps-image"),i=d.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==r||r.append(l);for(var u=o.dom.$(".next-eps-description"),c=d.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=c&&c.firstChild;)null==u||u.appendChild(c.firstChild)};exports.default=v,exports.initaliseFunctionality=function(e,n){var t=m(e,n.video.gist.id),r=h(e[t],n.video.gist.id),i=f(e[t],r);g(i.nextEp)};
|
package/cjs/playlist-3e63d87f.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),r=require("./icons-2609dbe4.js"),s=require("./generic-d35f6dee.js"),c=require("./currentVideoInfo-31d70bec.js"),d=require("./autoNextVideo-22652dfa.js"),u=require("./skin-516012d7.js"),p=require("./player_instance-fcf6a8fb.js");function m(e){var t=v();return function(){var n,l=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(l,arguments,o)}else n=l.apply(this,arguments);return i(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/slicedToArray"),require("./util-d1548c88.js"),require("@babel/runtime/helpers/typeof");var y=o.getComponent("Component"),h=function(i){l(v,y);var a=m(v);function v(e){var n,l,i,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,v),(o=a.call(this,e,r)).playerId=r.playerId,o.seriesData=r.sres,o.videos=null==r||null===(n=r.playlist)||void 0===n?void 0:n.content,o.cb=(null==r||null===(l=r.playlist)||void 0===l?void 0:l.cb)||null,o.autoNext=(null==r||null===(i=r.playlist)||void 0===i?void 0:i.autoNext)||!1,o.currentVideoData=r.res,o.initialiseStructure(),o.loadCSS(),o.autoNext&&d.autoPlayNext({playerId:o.playerId,content:o.videos,cb:o.cb}),o}return n(v,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(r.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./playlist-df87ca90.js")})).then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(u.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var d=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),u=o.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),r=o.dom.createEl("div",{className:"playlist-section",index:t}),d=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),p=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(r,d),o.dom.appendContent(r,p),o.dom.appendContent(a,r),o.dom.appendContent(u,a);var m=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),y=o.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(m,y),o.dom.appendContent(m,v),o.dom.appendContent(a,m),o.dom.appendContent(u,a),m.onclick=function(e){e.stopPropagation(),c.setVideoIdx(t+1),s.load(n.playerId,n.videos[t].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},r.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==r||null===(l=r.classList)||void 0===l||l.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);o.dom.appendContent(i,a),o.dom.appendContent(i,d),o.dom.appendContent(t,i),o.dom.appendContent(t,u),p.getPlayer(this.playerId).on("fullscreenchange",(function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}}))}}]),v}();exports.default=h;
|