@viewlift/player-backup 2.0.317-backup → 2.0.319-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-6704601a.js +1 -0
- package/cjs/browser-dc29be24.js +1 -0
- package/cjs/bundle.css +1294 -551
- package/cjs/caption-settings-d2b4b7e3.js +1 -0
- package/cjs/captions-1ec67937.js +1 -0
- package/cjs/features-ef61de84.js +1 -0
- package/cjs/generic-754b73b9.js +1 -0
- package/cjs/icons-1530c39f.js +1 -0
- package/cjs/index-3ff024d5.js +1 -0
- package/cjs/index-58a5e66f.js +1 -0
- package/cjs/index-759a1ed5.js +1 -0
- package/cjs/index-94a82c6b.js +1 -0
- package/cjs/index-b852ed03.js +1 -0
- package/cjs/index-d056b5da.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/localisation-443f3f19.js +1 -0
- package/cjs/multicamv2-a5ccde69.js +1 -0
- package/cjs/multicamv2-c0ea0f16.js +1 -0
- package/cjs/nextEpisodeButton-94a6e1c3.js +1 -0
- package/cjs/playlist-869072fe.js +1 -0
- package/cjs/relatedVideosManager-ba607f01.js +1 -0
- package/cjs/renditions-2d73c43d.js +1 -0
- package/cjs/resolution-68945558.js +1 -0
- package/cjs/series-45f423d1.js +1 -0
- package/cjs/series-v2-85099d28.js +1 -0
- package/cjs/series-v2-fa48542f.js +1 -0
- package/cjs/settings-icon-3b19759d.js +1 -0
- package/cjs/skin-0ba3b5ee.js +1 -0
- package/cjs/skin-0f4c3f0c.js +1 -0
- package/cjs/skin-10eb465d.js +1 -0
- package/cjs/skin-211ae95b.js +1 -0
- package/cjs/skin-5a0cbc97.js +1 -0
- package/cjs/skin-a015e59f.js +1 -0
- package/cjs/skin-b7a6b06c.js +1 -0
- package/cjs/skin-ba4cd74f.js +1 -0
- package/cjs/skin-c6e91e59.js +1 -0
- package/cjs/skin-e5bc212a.js +1 -0
- package/cjs/skin-f7c8304f.js +1 -0
- package/cjs/videoSelector-3c8fb5e9.js +1 -0
- package/cjs/videoSelector-e8c72f5d.js +1 -0
- package/cjs/videojs-dash5.es-e6b0205f.js +1 -0
- package/esm/autoNextVideo-d5b82444.js +1 -0
- package/esm/browser-766b903b.js +1 -0
- package/esm/bundle.css +1294 -551
- package/esm/caption-settings-57593994.js +1 -0
- package/esm/captions-6426f98a.js +1 -0
- package/esm/components/auto-next-video/autoNextVideo.d.ts +1 -0
- package/esm/components/chapters/events.d.ts +15 -0
- package/esm/components/chapters/index.d.ts +13 -0
- package/esm/components/chapters/markers.d.ts +16 -0
- package/esm/components/chapters/store.d.ts +5 -0
- package/esm/components/chapters/timelineMapper.d.ts +35 -0
- package/esm/components/video-selector/videoSelector.d.ts +5 -0
- package/esm/components/video-selector_TEMP/videoSelector.d.ts +4 -0
- package/esm/features-99081d09.js +1 -0
- package/esm/generic-f765c6f0.js +1 -0
- package/esm/helpers/apiErrorTracker.d.ts +1 -0
- package/esm/helpers/drmErrorDetection.d.ts +6 -0
- package/esm/helpers/dvrBoundary.d.ts +13 -0
- package/esm/helpers/dvrBoundary.test.d.ts +1 -0
- package/esm/icons-b8ca9c4a.js +1 -0
- package/esm/index-0155af1b.js +1 -0
- package/esm/index-2b30b793.js +1 -0
- package/esm/index-86977291.js +1 -0
- package/esm/index-894852f9.js +1 -0
- package/esm/index-97684837.js +1 -0
- package/esm/index-aba78d94.js +1 -0
- package/esm/index.d.ts +16 -0
- package/esm/index.js +1 -1
- package/esm/localisation-1ebd418b.js +1 -0
- package/esm/multicamv2-455bd82e.js +1 -0
- package/esm/multicamv2-723a367d.js +1 -0
- package/esm/nextEpisodeButton-6ceba54e.js +1 -0
- package/esm/playlist-16d651a2.js +1 -0
- package/esm/plugins/chromecast.d.ts +2 -0
- package/esm/relatedVideosManager-6e242502.js +1 -0
- package/esm/renditions-38f26c3d.js +1 -0
- package/esm/resolution-41f5c799.js +1 -0
- package/esm/series-99ed8498.js +1 -0
- package/esm/series-v2-d9d8653b.js +1 -0
- package/esm/series-v2-ec6c014a.js +1 -0
- package/esm/settings-icon-43c586ae.js +1 -0
- package/esm/skin/cn_news/skin.d.ts +1 -0
- package/esm/skin-0c5cb109.js +1 -0
- package/esm/skin-1bf16a8c.js +1 -0
- package/esm/skin-513a9b7d.js +1 -0
- package/esm/skin-5b9c3675.js +1 -0
- package/esm/skin-66c6b120.js +1 -0
- package/esm/skin-932f3764.js +1 -0
- package/esm/skin-953812ed.js +1 -0
- package/esm/skin-b471f198.js +1 -0
- package/esm/skin-e63ece28.js +1 -0
- package/esm/skin-f3c11ee9.js +1 -0
- package/esm/skin-ffe5b1ec.js +1 -0
- package/esm/utilities/relatedVideosManager.d.ts +11 -0
- package/esm/videoSelector-ba26c654.js +1 -0
- package/esm/videoSelector-fc8de3a6.js +1 -0
- package/esm/videojs-dash5.es-43f0858c.js +2 -0
- package/package.json +29 -29
- package/cjs/autoNextVideo-7bec2069.js +0 -1
- package/cjs/browser-3670a923.js +0 -1
- package/cjs/caption-settings-45d01d5f.js +0 -1
- package/cjs/captions-3b3f5a65.js +0 -1
- package/cjs/features-0b0c55e5.js +0 -1
- package/cjs/generic-52ec8552.js +0 -1
- package/cjs/icons-eb807ef0.js +0 -1
- package/cjs/index-106cefb5.js +0 -1
- package/cjs/index-3c6c2caa.js +0 -1
- package/cjs/index-84cce26a.js +0 -1
- package/cjs/index-970d061a.js +0 -1
- package/cjs/localisation-56e0a999.js +0 -1
- package/cjs/multicamv2-8eb59201.js +0 -1
- package/cjs/multicamv2-e5bd7e31.js +0 -1
- package/cjs/nextEpisodeButton-a023dbfc.js +0 -1
- package/cjs/playlist-3df4d23f.js +0 -1
- package/cjs/renditions-292f4eaa.js +0 -1
- package/cjs/resolution-50930c62.js +0 -1
- package/cjs/series-fce5dac5.js +0 -1
- package/cjs/series-v2-410aa324.js +0 -1
- package/cjs/series-v2-cc4db1e1.js +0 -1
- package/cjs/settings-icon-fae95200.js +0 -1
- package/cjs/skin-0b3a11df.js +0 -1
- package/cjs/skin-18a6f84f.js +0 -1
- package/cjs/skin-262ccca0.js +0 -1
- package/cjs/skin-50307274.js +0 -1
- package/cjs/skin-52af5e36.js +0 -1
- package/cjs/skin-5c293b1b.js +0 -1
- package/cjs/skin-9ec8340d.js +0 -1
- package/cjs/skin-9fb033bc.js +0 -1
- package/cjs/skin-c53b964a.js +0 -1
- package/cjs/skin-fe66864e.js +0 -1
- package/cjs/util-66f5fbc7.js +0 -1
- package/cjs/videoSelector-0eebf021.js +0 -1
- package/cjs/videoSelector-99ef7080.js +0 -1
- package/cjs/videojs-dash5.es-072614bc.js +0 -1
- package/esm/autoNextVideo-3c813539.js +0 -1
- package/esm/browser-de5f6a74.js +0 -1
- package/esm/caption-settings-f58cadfe.js +0 -1
- package/esm/captions-028eb0f5.js +0 -1
- package/esm/features-15b09e95.js +0 -1
- package/esm/generic-3680ed36.js +0 -1
- package/esm/icons-699e8cf0.js +0 -1
- package/esm/index-4a0d34d8.js +0 -1
- package/esm/index-5d92eaa3.js +0 -1
- package/esm/index-bfcf213e.js +0 -1
- package/esm/index-e48de850.js +0 -1
- package/esm/localisation-0bf399a1.js +0 -1
- package/esm/multicamv2-02e2948d.js +0 -1
- package/esm/multicamv2-a052d1c9.js +0 -1
- package/esm/nextEpisodeButton-8d7081bf.js +0 -1
- package/esm/playlist-eeffdf32.js +0 -1
- package/esm/renditions-4a8ac501.js +0 -1
- package/esm/resolution-1753099d.js +0 -1
- package/esm/series-e628566d.js +0 -1
- package/esm/series-v2-1b631eb4.js +0 -1
- package/esm/series-v2-764353e2.js +0 -1
- package/esm/settings-icon-761d323a.js +0 -1
- package/esm/skin-1db15d2a.js +0 -1
- package/esm/skin-36c8179e.js +0 -1
- package/esm/skin-53939ccc.js +0 -1
- package/esm/skin-6f67606c.js +0 -1
- package/esm/skin-a065c69e.js +0 -1
- package/esm/skin-a1cba4ea.js +0 -1
- package/esm/skin-ba2be5f8.js +0 -1
- package/esm/skin-bc96924b.js +0 -1
- package/esm/skin-bf61df33.js +0 -1
- package/esm/skin-e5001fc1.js +0 -1
- package/esm/util-cdb41ade.js +0 -1
- package/esm/videoSelector-408d9955.js +0 -1
- package/esm/videoSelector-5395609b.js +0 -1
- package/esm/videojs-dash5.es-e31d9fb5.js +0 -1
- package/viewlift-player-backup-2.0.317-backup.tgz +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{M as n,h as t,$ as i,_ as o,a0 as a}from"./generic-3680ed36.js";import{a as e}from"./util-cdb41ade.js";import{g as c,h as s}from"./skin-ba2be5f8.js";var u,r=0,f=0,l=function(l){clearTimeout(r);var d=null==l?void 0:l.content;u=null==l?void 0:l.cb;var v=l.playerId;e(v,function(){var e=c(v);0!==(null==e?void 0:e.currentTime())&&((f=o())>d.length-1||(a(f+1),n(v,d[f].id).then(function(n){s(f,v),t(n.response),f++,h(n)}).catch(function(n){h(n),s(f,v),f++,r=setTimeout(function(){i(v)&&m(f,v,d)},5e3)})))})},m=function t(i,o,e,c){f=i,i>e.length-1||(a(f+1),n(o,e[i].id).then(function(n){s(f,o),f++,h(n)}).catch(function(n){h(n),setTimeout(function(){s(f,o),f++,t(f,o,e)},5e3)}))},h=function(n){u&&u(n)};export{l as a,m as s};
|
package/esm/browser-de5f6a74.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.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"},t=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},r=new RegExp(["googlebot","bingbot","yandexbot","baiduspider","duckduckbot","applebot","facebookexternalhit","twitterbot","linkedinbot","slackbot","whatsapp","telegrambot","pinterestbot","semrushbot","ahrefsbot","petalbot","bytespider","amazonbot","gptbot","chatgpt-user","claudebot","anthropic-ai","ccbot","meta-externalagent","mj12bot","dotbot","rogerbot","ia_archiver","archive.org_bot","mediapartners-google","adsbot-google","feedfetcher-google","bingpreview","embedly","crawler","spider","slurp","lighthouse","headlesschrome","phantomjs","prerender","screaming frog","w3c_validator","python-requests","curl/","wget/","go-http-client","java/","libwww-perl","scrapy","httpclient","okhttp"].join("|"),"i"),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"!=typeof navigator?navigator.userAgent:"";return!!e&&(!("undefined"==typeof navigator||!navigator.webdriver)||r.test(e))};export{t as a,e as d,a as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as r,e as c}from"./icons-699e8cf0.js";import{g as l,d as s,e as d}from"./captions-028eb0f5.js";import{j as p,s as m,k as u,l as v}from"./skin-ba2be5f8.js";import"@babel/runtime/helpers/toConsumableArray";function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var h=i.getComponent("Component"),y=function(){n(E,h);var y,g,C=(y=E,g=f(),function(){var e,t=o(y);if(g){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function E(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,E),(i=C.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important"),i}return t(E,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./caption-settings-cb47408f.js").then(function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=l(this.playerId);null==t||t.map(function(t){return s(e.playerId,t.id)});var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(p(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",m(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var r=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(r),i.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),u(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(c())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),r=i.dom.createEl("div",{className:"caption-selector-content"}),l=i.dom.createEl("div",{className:"caption-container"}),s=this.createLanguageContanier();i.dom.appendContent(l,s),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,r),i.dom.appendContent(r,l),v(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),l(e.playerId).map(function(t){return s(e.playerId,t.id)})},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var c=l(this.playerId),p=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==c||null===(a=c[n])||void 0===a?void 0:a.label;var l=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});l.onchange=function(t){d(e.playerId,c[n].id)},l.setAttribute("type","radio"),i.dom.appendContent(o,l),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},m=0;m<c.length;m++)p(m);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),E}();export{y as default};
|
package/esm/captions-028eb0f5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t}from"./skin-ba2be5f8.js";var e=function(e,n){var s,a,r;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(s=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===s||null===(a=s[0])||void 0===a||null===(r=a.style)||void 0===r||r.setProperty("display","flex"));for(var l=t(e).textTracks(),i=0;i<l.length;i++){var o=l[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},n=function(e,n){for(var s=t(e).textTracks(),a=0;a<s.length;a++){var r=s[a];"subtitles"!==r.kind&&"captions"!==r.kind||r.id!==n||(r.mode="hidden")}},s=function(e){var n,s=t(e);return(null==s||null===(n=s.textTracks())||void 0===n?void 0:n.tracks_.filter(function(t){return"subtitles"==t.kind||"captions"===t.kind}))||[]},a=function(e){var n=t(e);n.remoteTextTracks().tracks_.map(function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)})},r=function(e,n){var s=t(e);s.remoteTextTracks().tracks_.map(function(t){s.removeRemoteTextTrack(t)}),n.map(function(t){s.addRemoteTextTrack({src:t.url,srclang:t.srclang,label:t.label||(null==t?void 0:t.language)})})},l=function(e){var n,s=t(e),a=null==s||null===(n=s.el())||void 0===n?void 0:n.querySelector(".vjs-text-track-display-ttml");a&&(Array.from(s.textTracks()).some(function(t){return("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode})?a.style.setProperty("display","flex"):(a.style.setProperty("display","none","important"),a.innerHTML=""))};export{r as a,n as d,e,s as g,a as r,l as s};
|
package/esm/features-15b09e95.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{L as a,I as s}from"./generic-3680ed36.js";import{g as c}from"./renditions-4a8ac501.js";import{g as d,p as u}from"./skin-ba2be5f8.js";import{g as p}from"./localisation-0bf399a1.js";function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?m(Object(r),!0).forEach(function(n){e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var g=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=p("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=u(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=u(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-1753099d.js").then(function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))})},b=function(e,t,n){import("./nextEpisodeButton-8d7081bf.js").then(function(r){var o=r.default,l=d(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)})},j=function(e,t,n){import("./series-e628566d.js").then(function(r){var o=r.seriesModule,l=d(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)})},c=0;c<a.length;c++)s(c)})},k=function(e,t){import("./videoSelector-408d9955.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},S=function(e,t){import("./caption-settings-f58cadfe.js").then(function(n){var r,o,l,a,s=n.default,c=d(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},E=function(e,t){import("./settings-icon-761d323a.js").then(function(n){var r,o,l,a,s=n.default,c=d(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},O=function(e,t){import("./playlist-eeffdf32.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},I=function(e,t){import("./series-v2-764353e2.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},w=function(e,t){import("./multicamv2-02e2948d.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},M=function(e,t){var n=d(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=d(e).el(),n=0,r=d(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e}),window._multiplayer_dbTapHandler=o},x=function(e,t){import("./videoSelector-5395609b.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},L=function(e,t){import("./series-v2-1b631eb4.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},N=function(e,t){import("./multicamv2-a052d1c9.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},_=function(e,t){import("./index-4a0d34d8.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("MuteButton",r),o.addChild("MuteButton",h({playerId:e},t))})};export{B as a,j as b,b as c,y as d,C as e,E as f,S as g,M as h,g as i,x as j,N as k,O as l,L as m,P as n,k as o,I as p,w as q,_ as r};
|
package/esm/generic-3680ed36.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"video.js";import r from"axios";import{g as o,t as a,c as l}from"./skin-ba2be5f8.js";import{i as s,a as d,d as u}from"./browser-de5f6a74.js";import c from"md5";import v from"js-cookie";import{a as f,r as m}from"./captions-028eb0f5.js";import p from"@babel/runtime/helpers/typeof";import h from"@babel/runtime/helpers/toConsumableArray";import g from"@babel/runtime/helpers/slicedToArray";import{destroyComscoreTag as y,formulateComscorePayload as w,createComscoreStreamingTag as T,setComscorePlayerInstance as _}from"@viewlift/comscore/index.js";import I from"@babel/runtime/helpers/classCallCheck";import b from"@babel/runtime/helpers/createClass";function E(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function S(e){window.dataLayer=window.dataLayer||[],E("js",new Date),E("config",e)}function k(e,n){E("event",e,n)}var A={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 O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function D(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?O(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):O(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var L={name:"@viewlift/player",version:"2.1.54",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/sse":"^0.0.3","broadcast-channel":"^7.3.0","@viewlift/comscore":"^1.0.19",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","jwt-decode":"^4.0.0","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=L.version;var P,F=function(){var e,n,t,i;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":x.get()+"".concat(null==A?void 0:A.getVideoDetails)},C=function(e,n){var t,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):r({url:F(),params:D({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":L.version,"x-player-name":"videojs",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken},withCredentials:!0})},j=function(e,n){var t,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):r({url:x.get()+A.getLinearChannelDetails,params:D(D(D(D(D({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken}})},R=function(e,n){var t,i,o=ne(n),a=(null==o?void 0:o.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})}):r({url:x.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},V=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z();case 2:return i=e.sent,e.abrupt("return",r({url:x.get()+"".concat(null==A?void 0:A.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:D({},n),params:D({},(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)}}(),N=function(e,n){var t,i,o=window.contentType;return r({method:"GET",url:x.get()+"".concat(null==A?void 0:A.getVideoInfoV2,"/").concat(o,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},W=function(e){var n=e.videoId;return r({method:"GET",url:x.get()+"".concat(null==A?void 0:A.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},x=(P=null==A?void 0:A.apiBaseUrl,{set:function(e){e&&(P=e)},get:function(){return P}}),M=function(e,n,t,i){var o,a;return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.adbTempToken},withCredentials:!0})},U=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},B=null;function H(){return{set:function(e){e&&(B=e)},get:function(){return B}}}var G,q,Q,Y,z,K,X,J=function(){var e=n(t.mark(function e(){var n,i,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=H().get(),i=x.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),$=null,Z=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"))||!U(n)){e.next=6;break}return $||($=J().then(function(e){var t,i,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,o=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),o&&H().set(o),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){$=null})),e.abrupt("return",$);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ee=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},ne=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},te=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},ie=(K=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;K.set(t,(K.get(t)||0)+1)},get:function(e){return K.get(e)},clear:function(){K.clear()}}),re=function(e){q=e},oe=function(){return q},ae=function(e){G=e},le=function(){return G},se=function(){return Q},de=function(e){Q=e},ue=function(){return z},ce=function(e){Y=new Map,e.map(function(e,n){Y.set(e.id,n)})},ve=function(e){if(Y){var n=Y.get(e);de(n+1)}},fe=(X=0,{set:function(e){e>=0&&(X=e)},get:function(){return X}});function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function pe(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?me(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var he,ge=(he={},{setConfig:function(e){he=pe(pe({},he),e)},getConfig:function(){return he}});function ye(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function we(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ye(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Te=0,_e=null,Ie=null,be=!1,Ee=!1,Se=function(){var e,n,t,i,r,o,a,l=oe();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)}))||void 0===t||null===(i=t.content)||void 0===i?void 0:i.id:(null==l||null===(r=l.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function ke(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Ae(){return _e||window.sessionStorage.getItem("uid")}function Oe(){return De.apply(this,arguments)}function De(){return(De=n(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(n.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Le(e){return e?String(e):""}window.initialise=function(e){window.sid=ke(),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,window.isAdPlaying=!1,streamFailures(e),buffering(e),ads(e),ping(e),Pe(e),Fe(e)};var Pe=function(e){e.on("play",function(){"pause"!==Ie||e.scrubbing()||(Ie="play",k("RESUME",{pfm:window.platform,uid:Ae(),vid:Se(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"RESUME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))}),e.on("playing",function(){window.firstFrameFired&&!e.scrubbing()&&(Ie="play")}),e.on("pause",function(){setTimeout(function(){!be&&window.firstFrameFired&&"play"===Ie&&(Ie="pause",k("PAUSE",{pfm:window.platform,uid:Ae(),vid:Se(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"PAUSE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))},50)})},Fe=function(e){if(e){var n=0,t=0,i=0,r=0;e.on("timeupdate",o),e.on("seeking",function(){if(be)return;be=!0,e.off("timeupdate",o),e.one("seeked",a)}),e.on("seeked",a)}function o(){n=t,t=Math.floor(e.currentTime()),n<t&&(r=n,n=t)}function a(){if(Ee)Ee=!1;else{i=Math.floor(e.currentTime());var n=Math.floor(i-r);if(0!==n&&window.firstFrameFired){var t=n>0?"SEEK_FORWARD":"SEEK_BACKWARD";k(t,{pfm:window.platform,uid:Ae(),vid:Se(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:t,videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}r=Math.floor(e.currentTime()),setTimeout(function(){be=!1},50),e.on("timeupdate",o)}}};window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var n,t,i,r=o(),a=null!=r&&r.el_?Math.floor(r.currentTime()):0;window.cleanupTimers(),k(e,we({pfm:window.platform,uid:Ae(),vid:Se(),videoPosition:a},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:e,videoPosition:a,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var i,r,o;window.ttFirstFrameStartTime_In_MS=performance.now(),Ie="play",window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),k("PLAY",we({pfm:window.platform,uid:Ae(),vid:Se(),videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(o=r.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",we({"Video ID":Se(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.firstFrameFired&&(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()&&window.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var r,o,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&Te<4)Te++,k("BUFFERING",we({pfm:window.platform,uid:Ae(),vid:Se(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}window.ttFirstFrameStartTime_In_MS=null},window.endFirstFrame=function(e){var n=tryCatch(function(){var t,i,r;if(window.ttFirstFrameStartTime_In_MS&&!window.firstFrameFired)if(window.isAdPlaying)console.log("'playing' event ignored during ad playback.");else{clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0;var o=(performance.now()-window.ttFirstFrameStartTime_In_MS)/1e3;window.ttFirstFrameStartTime_In_MS=null,window.totalBufferTime=o||0,k("FIRST_FRAME",we({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:parseFloat(null==o?void 0:o.toFixed(2)),bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ae(),vid:Se()},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:parseFloat(null==o?void 0:o.toFixed(2)),bufferHealth:window.getRemainingBufferTime(e)}),e.off("timeupdate",n)}});e.on("timeupdate",n)},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,i,r,o,a;window.isAdPlaying=!0,!window.firstFrameFired&&window.failedToStartTimer&&clearTimeout(window.failedToStartTimer),k("AD_REQUEST",we({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ae(),vid:Se(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),k("AD_IMPRESSION",we({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ae(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Se()},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4))}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4))})})};var Ce=function(e,n,t){var i;fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:t,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:(null===(i=e.tech_)||void 0===i?void 0:i.vhs)&&window.getBitrate(e)})};window.fireExitPing=function(e){if(!window.isAdPlaying){var n=null!=e&&e.el_?Math.floor(e.currentTime()):0;n<=0||Ce(e,n,n)}},window.ping=function(e){var n=[];e.on("dispose",tryCatch(function(){console.log('Player DISPOSED >> "dispose" event fired >>> firing exit PING'),window.fireExitPing(e)})),e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(Te=0,n.push(t),Ce(e,t,30))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),r=0;r<i.length;r++){var o=i.start(r),a=i.end(r);if(je(n,o,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var je=function(e,n,t){return e>=n&&e<=t},Re=function(){var e,n=oe(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=n(t.mark(function e(n){var i,o,a,l,d,u,c,v,f,m,p,h,g,y,w,T,_,I,b,E,S;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!s()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Z();case 4:return _=e.sent,I=ne(_),b=null==I?void 0:I.site,E=null==I?void 0:I.siteId,e.t0=we,e.t1=we,e.t2=we({aid:b,cid:E,pfm:window.platform},null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=Ae(),e.t5=Se(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(l=n.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?Le(n.adPosition):"",e.next=28,Oe();case 28:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t25=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t26=null!==(f=n.bufferHealth)&&void 0!==f?f:null,e.t27=null!==(m=Re())&&void 0!==m?m:null,e.t28=null!=b?b:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(h=p.customData)||void 0===h||null===(g=h.beacon)||void 0===g?void 0:g.params,e.t33=(0,e.t0)(e.t31,e.t32),S=[e.t33],r({url:(null===(y=window)||void 0===y||null===(w=y.customData)||void 0===w||null===(T=w.beacon)||void 0===T?void 0:T.url)||x.get()+A.getBeaconUrl,method:"post",headers:{Authorization:_},contentType:"application/x-www-form-urlencoded",dataType:"text",data:S}).catch(function(e){console.error(e)});case 46:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};function Ve(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&!s()){var t=ge.getConfig();if(null==t||!t.disableBeacon){null!=n&&n.userId&&(_e=n.userId);var i=o(e);window.initialise(i,null==n?void 0:n.analyticsCb),window.firstFrame(i,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),window.endFirstFrame(i),window.watchLive(i)}}}window.watchLive=function(e){var n;if(e){var t=null==e||null===(n=e.controlBar)||void 0===n?void 0:n.getChild("SeekToLive");if(t){var i=t.handleClick;t.handleClick=function(n){var t,r;return null!==(t=e.liveTracker)&&void 0!==t&&null!==(r=t.atLiveEdge)&&void 0!==r&&r.call(t)||(!function(e){var n,t,i;k("WATCH_LIVE",we({eventName:"WATCH_LIVE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ae(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Se()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"WATCH_LIVE",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!1})}(e),Ee=!0),i.call(this,n)}}}};var Ne=function(e,n){var t=new Map;W({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),z=t}).catch(function(e){return console.log(e)})},We=function(){var e=fe.get();return e>=0?e+1:1},xe=function(){var e,n,t,i=le(),r=oe(),o=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=fe.get(),l=null==i||null===(n=i[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===o});return l>=0?l+1:1};function Me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Ue(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Me(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Be=c,He=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},Ge=function(e){var n=qe(e,"video.tags",[]),t=qe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},qe=function(e,n,t){for(var i=0,r=(n=n.split(".")).length;i<r;i++){var o;e=null===(o=e)||void 0===o?void 0:o[n[i]]}return e||t},Qe=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID";return e?n:n.includes("browser-")?n.replace("browser-",""):n},Ye=function(){var e,n,t,i,r,a,l,s,d,u,c,f,m,p,h,g,y,w,T,_,I,b,E,S,k,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",O=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return A;var L=(null==D?void 0:D.siteName)||(null==D?void 0:D.site)||"",P=(null==D?void 0:D.contentType)||"video",F=(null==D||null===(t=D[P])||void 0===t?void 0:t.metadata)||(null==D||null===(i=D[P])||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.metadata),C=o(O);if(!A.includes("VIEWLIFT_"))return A;var j,R=window.getComputedStyle(document.getElementById(O),null),V=Math.trunc(R.getPropertyValue("height").slice(0,-2)),N=Math.trunc(R.getPropertyValue("width").slice(0,-2)),W="linearchannel"===P?null==D||null===(a=D.linearchannel)||void 0===a||null===(l=a.channels)||void 0===l||null===(s=l.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===s||null===(d=s.content)||void 0===d?void 0:d.id:qe(D,"video.gist.id",""),x="linearchannel"===P?null==D||null===(u=D.linearchannel)||void 0===u||null===(c=u.channels)||void 0===c||null===(f=c.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===f?void 0:f.title:qe(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,U=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",function(e){M=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]}));var B=v.get("us_privacy")||v.get("usprivacy"),H=void 0!==B?B:"1YNN",G=null!==(m=null===(p=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===p?void 0:p.fwIdentifier)&&void 0!==m?m:null,q=Ue(Ue({},ze(F)),{},{VIEWLIFT_WIDTH:N,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:He(N,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(h=window)||void 0===h?void 0:h.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:qe(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:qe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:qe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==C||null===(g=C.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==C||null===(y=C.options_)||void 0===y?void 0:y.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":Qe(!1),VIEWLIFT_DID:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":Qe(),VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:Ge(D),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(qe(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+qe(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:v.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:qe(null===(w=window)||void 0===w||null===(T=w.app_data)||void 0===T||null===(_=T.site)||void 0===_?void 0:_.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":qe(null===(I=window)||void 0===I||null===(b=I.app_data)||void 0===b||null===(E=b.site)||void 0===E?void 0:E.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?Be(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*qe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:qe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:x,VIEWLIFT_CONTENT_SERIES_TITLE:qe(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:qe(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:xe(),VIEWLIFT_SEASON_NUMBER:We(),VIEWLIFT_CONTENT_TAGS:Ge(D),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(S=window)||void 0===S||null===(k=S.customData)||void 0===k?void 0:k.macros);for(var Q in q){var Y=new RegExp(Q,"g");A=A.replace(Y,q[Q])}return A},ze=function(e){var n,t,i,r,o,a,l,s,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var f=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i?void 0:i.SVOD)||!1,m=(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.subscription)||void 0===a?void 0:a.TVE)||!1;return f||m?(d()?f?c=Ue(Ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):m&&(c=Ue(Ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):f?c=Ue(Ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):m&&(c=Ue(Ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),f?c=Ue(Ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(d()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):m&&(c=Ue(Ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(d()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=d()?Ue(Ue({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):Ue(Ue({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=Ue(Ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(d()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=d()?Ue(Ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):Ue(Ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=Ue(Ue({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:qe(null===(l=window)||void 0===l||null===(s=l.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},Ke=function(e,n){var t,i,r,o,a,l,s,d,c,v,f,m,p,h=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[h])||void 0===t?void 0:t.drmEnabled,y=null==e||null===(i=e[h])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.videoAssets,w=null==e||null===(o=e[h])||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[h])||void 0===l||null===(s=l.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.hls)||!1;null==e||null===(c=e[h])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var _=(null==e||null===(f=e[h])||void 0===f||null===(m=f.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=w&&w.hls)return Je(w);if(g){var I=$e(y,n);return I.src=Ye(I.src,n,e),I}if("Safari"!==u()&&_)return Xe(y);if(T){var b=Je(y);return b.src=Ye(b.src,n,e),b}if(null!=y&&y.mpeg){var E=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(y);return E.src=Ye(E.src,n,e),E}return null},Xe=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Je=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},$e=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,s=u();if(o(n),"Safari"===s){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(r,function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,o){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,n,t){console.log(e),e&&o(e),o(null,t)})}}}}}(r);return Ze(n),d}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ze(n),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ze=function(e){var n=o(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==u()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},en=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:i}},nn=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var i=document.getElementById(e);if(i){var r=document.createElement("div");r.className="error-container";var o=document.createElement("div");o.className="error-message",o.innerHTML="".concat(n),r.appendChild(o),i.append(r)}}},tn=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var rn=!1,on=function(e,n,t){var i=Ye(n,e,t),r=o(e);if(n&&window.google){if("function"!=typeof r.ima&&"object"!==p(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,i,r,a=o(e);if(null!==a.el_){rn=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),rn&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),a.one(d,function(){u&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function an(e,n){var t,i,r,a=o(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(i=t.playToggle)||void 0===i?void 0:i.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var i,r,o,d,u,c,v,f,m;if(sn.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==s||s.focus()),p){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(i=document.querySelector(".vjs-fullscreen-control"))||void 0===i||i.click();break;case"ArrowLeft":h&&!1===n.liveui||Xt(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(o=r.app_data)||void 0===o||null===(d=o.appcmsMain)||void 0===d||null===(u=d.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;h||Kt(e,10)}}},!0)}var ln,sn=(ln=!0,{enable:function(){ln=!0},disable:function(){ln=!1},get enabled(){return ln}}),dn="ssai-breakStart",un="ssai-adImpression",cn="ssai-firstQuartile",vn="ssai-midpoint",fn="ssai-thirdQuartile",mn="ssai-complete",pn="ssai-breakEnd",hn={breakStart:dn,impression:un,firstQuartile:cn,midpoint:vn,thirdQuartile:fn,complete:mn,breakEnd:pn};function gn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=o(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var i=n.eventType,r=hn[i];r&&t.trigger(r,n)}function yn(e){var n=o(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var i=function(e,n){return t(n)};return n.on(e,i),function(){return n.off(e,i)}};return{adBreakStart:function(e){return t(dn,e)},adImpression:function(e){return t(un,e)},adFirstQuartile:function(e){return t(cn,e)},adMidpoint:function(e){return t(vn,e)},adThirdQuartile:function(e){return t(fn,e)},adComplete:function(e){return t(mn,e)},adBreakEnd:function(e){return t(pn,e)}}}function wn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Tn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):wn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var _n,In=(_n={},{get:function(){return _n},set:function(e){_n=e}});function bn(e,n){var t,i,r,a,l,s,d,u,c,v,f,m,p,h,g,I,b,E,S,k,A,O=null==e?void 0:e.playerId,D=o(O);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var L=oe(),P=(null==L||null===(i=L.video)||void 0===i?void 0:i.metadata)||[],F=(null==P?void 0:P.length)&&P.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=F)&&void 0!==r&&r.length){var C=F.map(function(e){return e.value});F=null==C?void 0:C.join(",")}y();var j,R,V,N=null===(a=window)||void 0===a?void 0:a.lcProgrammeDetails,W=Array.isArray(null==N?void 0:N.category)?null==N||null===(l=N.category)||void 0===l?void 0:l.join(","):(null==N?void 0:N.category)||null,x=Tn(Tn(Tn({},null==L?void 0:L.video),null==L?void 0:L.linearchannel),{},{siteName:(null==e||null===(s=e.comscore)||void 0===s?void 0:s.applicationName)||(null==e||null===(d=e.comscore)||void 0===d||null===(u=d.metadata)||void 0===u?void 0:u.siteName)||(null==L?void 0:L.site)||null,programId:(null==N?void 0:N.videotmsid)||null,programTitle:(null==N?void 0:N.lcProgrammeName)||null,episodeId:(null==N?void 0:N.videotmsid)||null,seasonNumber:(null==L||null===(c=L.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==N||null===(f=N.seriesDetails)||void 0===f?void 0:f.season)||null,episodeNumber:(null==L||null===(m=L.video)||void 0===m||null===(p=m.series)||void 0===p?void 0:p.episodeNumber)||(null==N||null===(h=N.seriesDetails)||void 0===h?void 0:h.episode)||null,episodeTitle:(null==N?void 0:N.lcSubTitle)||null,isCompleteEpisode:!!(null!=L&&null!==(g=L.video)&&void 0!==g&&g.series||null!=N&&null!==(I=N.seriesDetails)&&void 0!==I&&I.episode),genre:F||W,comscoreConfig:{implementationId:(null==e||null===(b=e.comscore)||void 0===b?void 0:b.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),M=null==e||null===(S=e.comscore)||void 0===S||null===(k=S.metadata)||void 0===k?void 0:k.contentType;if(null!=x&&null!==(A=x.streamingInfo)&&void 0!==A&&A.isLiveStream?x.contentType="Live":x.contentType=M||"LongFormOnDemand",null==x||!x.network){var U,B=(null==x?void 0:x.metadata)||[],H=null==B||null===(U=B.find(function(e){return"network"===e.name}))||void 0===U?void 0:U.value;x.network=H||null}null!=x&&x.network&&null!=x&&x.genre&&(x.customGenre="".concat(x.network,"_").concat((null==x?void 0:x.programTitle)||(j=x,null!=j&&j.series?null==j||null===(V=j.series)||void 0===V?void 0:V.title:null==j||null===(R=j.gist)||void 0===R?void 0:R.title),"_").concat(x.genre)),null!=N&&N.airDate&&(x.publishDate=N.airDate),null!=x&&x.runtime&&"function"==typeof D.duration&&(x.runtime=1e3*Math.ceil(D.duration()));var G=w(x,D);console.log("comscoreOptions player data",G),T(Tn({playerName:"Video.js"},G)),_(D)}}function En(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Sn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?En(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):En(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function kn(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 An(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)?An(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function An(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var On,Dn=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Ln=(On=null,{set:function(e){On=e},get position(){return On}});function Pn(e,n){return Fn.apply(this,arguments)}function Fn(){return(Fn=n(t.mark(function e(n,i){var r,a,l,s,d,u,c,v,f,m,p,h,y,w,T,_,I,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o(n),l=Ke(i,n),s=l.src,d=(null==i?void 0:i.contentType)||"video",null==i||null===(r=i[d])||void 0===r||null===(a=r.streamingInfo)||void 0===a||a.isLiveStream,u=s.replace("/dash/","/session/").replace("/master/","/session/"),u=Ye(u,n,i),c=jn(u),v=g(c,2),f=v[0],m=v[1],p=Cn(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach(function(e){var n=g(e,2),t=n[0],i=n[1];u.searchParams.set(t,i)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Sn({adsParams:Sn({},f)},p))});case 14:return h=e.sent,e.next=17,h.json();case 17:return y=e.sent,w="https://"+new URL(u).hostname,T=y.trackingUrl,_=y.manifestUrl,I=w+T,b=w+_,Dn.set(I),console.log("%c TRACKING URL","background: #bdf369; color: #000",I),l.src=b,e.abrupt("return",l);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",l);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function Cn(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=g(e,2),t=n[0],i=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(i)]}))||{}}function jn(e){var n={};if(!e.split("?")[1])return[{},{}];var t,i=new URL(e,window.location.origin),r=kn((null==i?void 0:i.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var o=g(t.value,2),a=o[0],l=o[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},d={},u=0,c=Object.entries(n);u<c.length;u++){var v=g(c[u],2),f=v[0],m=v[1];if(f.startsWith("ads."))s[f.replace(/^ads\./,"")]=m;else d[f]=m}return[s,d]}var Rn,Vn,Nn,Wn=new Map;function xn(e,n){return Mn.apply(this,arguments)}function Mn(){return Mn=n(t.mark(function e(i,r){var l,s,d,u,c,v,f,m,p,g,y,w,T,_,I,b,E,S,k,A,O,D,L,P,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,r,a,l){var s,d,u=o(i);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<L&&D.clear(),L=e;var v=(null==n||null===(s=n.ads)||void 0===s||null===(d=s[r])||void 0===d?void 0:d.adId)||c;Math.floor(u.currentTime());var f,m=kn(t);try{var p=function(){var t,o,s,d=f.value,c=d.eventType,m=d.beaconUrls,p=d.startTimeInSeconds,h=d.startTime,g=d.durationInSeconds,y=p||0,w=m,T=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(s=o.ads)||void 0===s?void 0:s.adEventHandler)||null,_="".concat(y,"_").concat(c),I=Wn.get("pod-".concat(a))||[];if(console.warn(e,y,"map:",c,"condition1:",e>=y,"map:",Wn),e>=y&&!I.includes(_)){I.push(_),Wn.set("pod-".concat(a),I);try{P(c,n,w,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=Ln.position;Ln.set(null),setTimeout(function(){null!=b&&(u.currentTime(b),l())},500)}if("function"==typeof T)try{var E,S={eventType:c,startTimeInSeconds:p,startTime:h,durationInSeconds:g,ad:null==n||null===(E=n.ads)||void 0===E?void 0:E[r],adIndex:r};T({adsData:S}),gn(i,S)}catch(e){console.error("Error when calling ads callback:",e)}var k=In.get();if(k&&0!==Object.keys(k).length){var A=k.formulateComscoreAdPayload,O=k.startComscoreAdTracking,L=k.finishComscoreAdTracking,F=k.endComscoreAdTracking,C="".concat(y,"_").concat(v,"_").concat(c);if(!D.has(C))if(D.set(C,!0),"impression"===c){var j,R=Dn.get();O(A(Sn(Sn({},null==n||null===(j=n.ads)||void 0===j?void 0:j[r]),{},{trackingUrl:R})))}else"complete"===c?L():"breakEnd"===c&&F()}}};for(m.s();!(f=m.n()).done;)p()}catch(e){m.e(e)}finally{m.f()}}},P=function(e,n,t,i){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},O=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Wn.clear(),Ln.set(r),p=Dn.get(),(g=o(i)).one("loadeddata",function(){p&&A(p)}),y=new Map,w=new Map,T=-1,_=(null===(l=document)||void 0===l||null===(s=l.getElementsByClassName("tvProviderImage"))||void 0===s?void 0:s[0])||null,I=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,b=(null==g||null===(u=g.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,E=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==g||null===(f=g.el())||void 0===f||null===(m=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,k=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return h(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],s=null==l||null===(n=l.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return Sn(Sn({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},A=function(){var e=n(t.mark(function e(n){var l,s,d,u,c,v,f,m,p,g,A,D,L,P,C,j,R,V,N,W,x,M,U,B;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",W),0===e.button&&R()},N=function(e){},V=function(){var e,n=g.currentTime(),t=null,i=kn(p);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(o+a));n>=o&&n<=l&&(t=l,y.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){g.currentTime(t+2.2)},100))},R=function(){var e,n=g.currentTime(),t=null,i=kn(p);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(o+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>s||n>o)&&!y.has(o)||n>=o&&n<=s)&&(t=o,y.set(o,!0),w.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){g.currentTime(t+.4)},100))},c=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:f=e.sent,m=f.avails,p=[],g=o(i),A=g.controlBar.progressControl,D=A.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;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(c=!0),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:k(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!c&&r&&(g.currentTime(r),V()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p,"function"==typeof(j=(null===(L=window)||void 0===L||null===(P=L.customData)||void 0===P||null===(C=P.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&j(p)),console.log(p,"data"),p.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,i=g.duration();if(!(n>i||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",D.appendChild(o)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=a(function(){var e=g.currentTime();if(e!==T){T=e;for(var n=!1,t=function(){var t=p[i],r=t.startTimeInSeconds,o=t.durationInSeconds,a=t.ads,l=r+o;if(e>=r-1.2&&e<=l+1.2){var s;e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&y.set(r,!0),sn.disable(),_&&_.classList.add("vjs-hidden"),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),A.el().classList.add("hide-progress-bar");for(var d=e-r,u=0,c=0,v=0;v<a.length;v++){var f,m=null==a||null===(f=a[v])||void 0===f?void 0:f.durationInSeconds;if(d<u+m){c=v;break}u+=m}a[c];var g=Math.max(0,o-d),T=Math.round(g);x.style.display="block",B.textContent="".concat(c+1," of ").concat(a.length," • ").concat(O(T));var k=[];return null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});k.push.apply(k,h(n))}),(null==t||null===(s=t.podSlotImpressionBeacon)||void 0===s?void 0:s.length)>0&&k.push.apply(k,h(null==t?void 0:t.podSlotImpressionBeacon)),F(e,t,k,c,i,V),"break"}w.delete(r)},i=0;i<p.length;i++){if("break"===t())break}n||(x.style.display="none",A.el().classList.remove("hide-progress-bar"),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),sn.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(s=document)||void 0===s||s.addEventListener("keydown",function(e){sn.enabled&&"ArrowRight"==e.key&&(R(),Kt(i,10),e.stopPropagation())}),A.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",W))}),null===(d=document)||void 0===d||null===(u=d.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach(function(e){return null==e?void 0:e.remove()}),(x=document.createElement("div")).className="ssai-ad-container",(M=document.createElement("div")).className="sponsored-adbox",(U=document.createElement("div")).className="sponsored-text",U.textContent="Sponsored Ad",M.append(U),(B=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",x.append(M),x.append(B),g.el().appendChild(x);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=new Map,L=-1;case 21:case"end":return e.stop()}},e)})),Mn.apply(this,arguments)}function Un(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 Bn(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)?Bn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function Bn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}function Hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Gn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Hn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var qn={},Qn=(null===(Rn=window)||void 0===Rn||null===(Vn=Rn.location)||void 0===Vn||null===(Nn=Vn.search)||void 0===Nn?void 0:Nn.includes("debug=true"))||!1,Yn=null;function zn(e){return Kn.apply(this,arguments)}function Kn(){return Kn=n(t.mark(function e(i){var r,l,s,d,u,c,v,f,m,p,g,y,w,T,_,I,b,E,S,k,A,O,D,L,P,F,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,r,a){var l,s,d=o(i);if(!d.seeking()){var u=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(l=n.ads)||void 0===l||null===(s=l[r])||void 0===s?void 0:s.adId)||u;Math.floor(d.currentTime());var v,f=Un(t);try{for(f.s();!(v=f.n()).done;){var m,p,h,g=v.value,y=g.eventType,w=g.beaconUrls,T=g.startTimeInSeconds,_=g.startTime,I=g.durationInSeconds,b=(g.eventId,T||u),E=w,S=(null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(h=p.ads)||void 0===h?void 0:h.adEventHandler)||null,k="".concat(c,"_").concat(y),A="pod-".concat(u);L.has(A)||L.set(A,new Set);var O=L.get(A);if(Qn&&console.warn(e,b,"map:",y,"condition1:",e>=b,"map:",L),e>=b&&e<=b+P&&!O.has(k)){O.add(k);try{F(y,n,E,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,n)}if("function"==typeof S)try{var D,C={eventType:y,startTimeInSeconds:T,startTime:_,durationInSeconds:I,ad:null==n||null===(D=n.ads)||void 0===D?void 0:D[r],adIndex:r};S({adsData:C}),gn(i,C)}catch(e){console.error("Error when calling ads callback:",e)}var j=In.get();if(j&&0!==Object.keys(j).length){var R=j.formulateComscoreAdPayload,V=j.startComscoreAdTracking,N=j.finishComscoreAdTracking,W=j.endComscoreAdTracking;if("impression"===y){var x,M=Dn.get();V(R(Gn(Gn({},null==n||null===(x=n.ads)||void 0===x?void 0:x[r]),{},{trackingUrl:M})))}else"complete"===y?N():"breakEnd"===y&&W()}}}}catch(e){f.e(e)}finally{f.f()}}},F=function(e,n,t,i){var r,o,a;"breakEnd"===e&&(null===(r=qn)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(o=qn)||void 0===o?void 0:o.totalAds)&&(null==n||null===(a=n.ads)||void 0===a?void 0:a.length)>0||(Qn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},g=function(){Yn&&clearInterval(Yn)},m=Dn.get(),(p=o(i)).one("loadeddata",function(){g(),Yn=setInterval(function(){m&&!p.paused()&&D(m)},2e3)}),p.on("dispose",function(){g()}),y=new Map,w=new Map,T=-1,_=null,I=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==p||null===(s=p.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,E=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==p||null===(u=p.el())||void 0===u||null===(c=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,k=(null==p||null===(v=p.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,A=!1,O=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return h(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],s=null==l||null===(n=l.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return Gn(Gn({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},D=function(){var e=n(t.mark(function e(n){var r,l,s,d,u,c,v,f,m,p,g,D;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=new URL(n),_&&d.searchParams.append("nextToken",_),e.next=4,fetch(d.toString(),{method:"GET"});case 4:return u=e.sent,e.next=7,u.json();case 7:c=e.sent,v=c.avails,f=c.nextToken||null,_=f,m=[],p=o(i),g=null==p||null===(r=p.controlBar)||void 0===r?void 0:r.progressControl,D=null==g||null===(l=g.seekBar)||void 0===l?void 0:l.el(),null===(s=document)||void 0===s||s.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),v.map(function(e,n){m.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),Qn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),null!=m&&m.length&&(window.adsQueueList=m),m.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,i=p.duration();if(!(n>i||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",D.appendChild(o)}}),p._timeUpdateHandler&&p.off("timeupdate",null==p?void 0:p._timeUpdateHandler),p._timeUpdateHandler=a(function(){if(Jt(i)){var e=null==p?void 0:p.currentTime();if(e!==T){T=e;for(var n=function(){var n=m[t],i=n.startTimeInSeconds,r=n.durationInSeconds,o=n.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var l;A=!!(e>=i&&e<=a&&Array.isArray(o)&&(null==o?void 0:o.length)>0),e>a&&y.set(i,!0),sn.disable(),I&&I.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),k&&(k.style.pointerEvents="none",k.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),g.el().classList.add("hide-progress-bar");for(var s=e-i,d=0,u=0,c=0;c<o.length;c++){var v,f=null==o||null===(v=o[c])||void 0===v?void 0:v.durationInSeconds;if(s<d+f){u=c;break}d+=f}setTimeout(function(){qn.totalAds=null==o?void 0:o.length,qn.currentAdIndex=u},1e3);var p=[];return null==o||o.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});p.push.apply(p,h(n))}),(null==n||null===(l=n.podSlotImpressionBeacon)||void 0===l?void 0:l.length)>0&&p.push.apply(p,h(null==n?void 0:n.podSlotImpressionBeacon)),C(e,n,p,u),"break"}w.delete(i)},t=0;t<m.length;t++){if("break"===n())break}A||(qn={},g.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),I&&I.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),k&&(k.style.pointerEvents="auto",k.classList.remove("vjs-hidden")),sn.enable())}}},1e3),p.on("timeupdate",p._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,P=2.5;case 22:case"end":return e.stop()}},e)})),Kn.apply(this,arguments)}var Xn=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Jn(e){return JSON.stringify((e||[]).map(function(e){return{availId:e.availId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds,ads:(e.ads||[]).map(function(e){return{adId:e.adId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds}})}}))}var $n=function(){function e(n,t,i,r){I(this,e),this.video_=r,this.ad_=n,this.skipOffset_=function(e){if(!e)return null;var n=new RegExp(Xn.source,"g");n.lastIndex=0;var t=n.exec(e);if(!t)return null;var i=Number(t[1])||0,r=Number(t[2]),o=Number(t[3]),a=Number(t[6])||0;return r>59||o>59?null:a/1e3+o+60*r+3600*i}(null==n?void 0:n.skipOffset),this.adPosition_=t,this.totalAds_=i,this.isSkipped_=!1}return b(e,[{key:"isClientRendering",value:function(){return!1}},{key:"getDuration",value:function(){var e,n;return null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.durationInSeconds)&&void 0!==e?e:0}},{key:"getRemainingTime",value:function(){var e,n,t,i,r,o;return(null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==e?e:0)+(null!==(t=null===(i=this.ad_)||void 0===i?void 0:i.durationInSeconds)&&void 0!==t?t:0)-(null!==(r=null===(o=this.video_)||void 0===o?void 0:o.currentTime)&&void 0!==r?r:0)}},{key:"isSkippable",value:function(){return"number"==typeof this.skipOffset_}},{key:"getTimeUntilSkippable",value:function(){if("number"!=typeof this.skipOffset_)return this.getRemainingTime();var e=this.getRemainingTime()+this.skipOffset_-this.getDuration();return Math.max(e,0)}},{key:"canSkipNow",value:function(){return 0===this.getTimeUntilSkippable()}},{key:"skip",value:function(){this.isSkipped_=!0,this.video_&&(this.video_.currentTime+=this.getRemainingTime())}},{key:"isLinear",value:function(){return!0}},{key:"getSequenceLength",value:function(){return this.totalAds_||1}},{key:"getPositionInSequence",value:function(){return this.adPosition_||1}},{key:"getTitle",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adTitle)||""}},{key:"getVastAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.vastAdId)||""}},{key:"getAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adId)||""}},{key:"getCreativeAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.creativeId)||""}},{key:"getTimeOffset",value:function(){var e,n;return null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==e?e:0}},{key:"release",value:function(){this.ad_=null,this.adPosition_=null,this.totalAds_=null}},{key:"isSkipped",value:function(){return this.isSkipped_}}]),e}(),Zn="impression",et="start",nt="mute",tt="unmute",it="resume",rt="pause",ot="firstQuartile",at="midpoint",lt="thirdQuartile",st="complete",dt="skip",ut="breakStart",ct="breakEnd",vt="skipStateChanged",ft="ad_impression",mt="ad_started",pt="ad_muted",ht="ad_volume_changed",gt="ad_resumed",yt="ad_paused",wt="ad_first_quartile",Tt="ad_midpoint",_t="ad_third_quartile",It="ad_complete",bt="ad_stopped",Et="ad_skipped",St="ad_skip_state_changed",kt="ad_break_started",At="ad_break_ended",Ot="ads_loaded",Dt="ad_cuepoints_changed";function Lt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Pt(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Lt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Ft(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ct(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ct(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function Ct(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var jt="[Transmit]";function Rt(e){var n,t,i;if(null==e)return{avails:[],nextToken:null,dashAvailabilityStartTime:null};var r=null!==(n=e.dashAvailabilityStartTime)&&void 0!==n?n:null,o=null!==(t=e.nextToken)&&void 0!==t?t:null,a=[];if(Array.isArray(e.avails))a=e.avails;else if(Array.isArray(e)){var l,s,d,u,c=e[0];if(c&&Array.isArray(c.avails))a=c.avails,r=null!==(l=null!==(s=r)&&void 0!==s?s:c.dashAvailabilityStartTime)&&void 0!==l?l:null,o=null!==(d=null!==(u=o)&&void 0!==u?u:c.nextToken)&&void 0!==d?d:null;else a=e}else if(Array.isArray(null==e||null===(i=e.data)||void 0===i?void 0:i.avails)){var v,f,m,p;a=e.data.avails,o=null!==(v=null!==(f=o)&&void 0!==f?f:e.data.nextToken)&&void 0!==v?v:null,r=null!==(m=null!==(p=r)&&void 0!==p?p:e.data.dashAvailabilityStartTime)&&void 0!==m?m:null}else Array.isArray(null==e?void 0:e.data)&&(a=e.data);return{avails:a,nextToken:o,dashAvailabilityStartTime:r}}var Vt=function(){function e(n,t,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};I(this,e),this.video_=n,this.player_=t,this.onEvent_="function"==typeof i?i:function(){},this.dashManifestUrl_=o.dashManifestUrl||null,this.config_=null,this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.pollIntervalMs_=2e3,this.pollId_=null,this.adBreaks_=[],this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null,this.eventsSent_=new Set,this.firedBeacons_=new Set,this.adBreakListenersAttached_=!1,this.globalListeners_=[],this.adListeners_=[],this.videoTimeupdate_=null,this.lastMutedForAd_=null,this.onDispose_=function(){return r.release()},this.apiTimelineAbsolute_=!1}var i,r,o;return b(e,[{key:"configure",value:function(e){this.config_=e}},{key:"addTrackingUrl",value:function(e){this.trackingUrl_=e||"",this.onEvent_({type:Ot,loadTime:0})}},{key:"getCuePoints",value:function(){var e,n=new Map,t=Ft(this.adBreaks_);try{for(t.s();!(e=t.n()).done;){var i,r=Ft(e.value.ads||[]);try{for(r.s();!(i=r.n()).done;){var o=i.value,a=o.startTimeInSeconds,l=a+o.durationInSeconds;if(isFinite(a)&&isFinite(l)&&!(l<=a)){var s="".concat(a.toFixed(1),"|").concat(l.toFixed(1));n.has(s)||n.set(s,{start:a,end:l})}}}catch(e){r.e(e)}finally{r.f()}}}catch(e){t.e(e)}finally{t.f()}return Array.from(n.values()).sort(function(e,n){return e.start-n.start})}},{key:"onManifestUpdated",value:function(){this.trackingUrl_&&(this.requestTrackingInfo_(this.firstTrackingRequest_),this.firstTrackingRequest_=!1,this.ensurePolling_())}},{key:"stop",value:function(){this.onEnded_(),this.detachAllListeners_(),this.eventsSent_.clear(),this.firedBeacons_.clear(),this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.apiTimelineAbsolute_=!1,this.adBreaks_=[],this.adBreakListenersAttached_=!1,this.pollId_&&(clearInterval(this.pollId_),this.pollId_=null)}},{key:"release",value:function(){this.stop()}},{key:"ensurePolling_",value:function(){var e=this;this.pollId_||(this.pollId_=setInterval(function(){var n,t;e.trackingUrl_&&(null!==(n=e.player_)&&void 0!==n&&null!==(t=n.paused)&&void 0!==t&&t.call(n)||e.requestTrackingInfo_(!1))},this.pollIntervalMs_))}},{key:"requestTrackingInfo_",value:(o=n(t.mark(function e(n){var i,r,o,a,l,s,d,u,c,v,f,m,p,h,g,y,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,r=new Map,o=0,a=null;case 4:if(!(o<10)){e.next=25;break}return l=new URL(this.trackingUrl_),this.nextToken_&&l.searchParams.set("nextToken",this.nextToken_),e.next=9,fetch(l.toString(),{method:"GET"});case 9:return s=e.sent,e.next=12,s.json();case 12:d=e.sent,o++,(u=Rt(d)).dashAvailabilityStartTime&&!a&&(a=u.dashAvailabilityStartTime),c=Ft(u.avails);try{for(c.s();!(v=c.n()).done;)f=v.value,m=(null==f?void 0:f.availId)||"".concat(null==f?void 0:f.startTimeInSeconds),r.set(m,f)}catch(e){c.e(e)}finally{c.f()}if((p=u.nextToken||null)&&p!==this.nextToken_){e.next=22;break}return this.nextToken_=p,e.abrupt("break",25);case 22:this.nextToken_=p,e.next=4;break;case 25:if(h=Array.from(r.values()),this.updateApiTimelineAbsoluteFlag_(h),g=(null==h||null===(i=h[0])||void 0===i?void 0:i.startTimeInSeconds)||0,this.apiTimelineAbsolute_){e.next=33;break}return e.next=31,this.resolveDashAvailabilityStartTime_(a,g);case 31:e.next=35;break;case 33:this.dashAvailabilityStartTimeResolved_=!0,this.dashAvailabilityStartTime_=0;case 35:h.length?(y=this.normalizeAvails_(h),Jn(this.adBreaks_)!==Jn(y)&&(this.adBreaks_=y,w=this.getCuePoints(),this.onEvent_({type:Dt,cuepoints:w}))):this.adBreaks_.length&&(this.onEvent_({type:Dt,cuepoints:[]}),this.onEnded_(),this.adBreaks_=[]),n&&this.setupAdBreakListeners_(),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(0),console.warn(jt,"tracking info fetch failed",e.t0);case 42:case"end":return e.stop()}},e,this,[[0,39]])})),function(e){return o.apply(this,arguments)})},{key:"updateApiTimelineAbsoluteFlag_",value:function(e){this.apiTimelineAbsolute_=!1;var n,t=1e6,i=Ft(e||[]);try{for(i.s();!(n=i.n()).done;){var r,o=n.value;if((null!==(r=null==o?void 0:o.startTimeInSeconds)&&void 0!==r?r:0)>t)return void(this.apiTimelineAbsolute_=!0);var a,l=Ft((null==o?void 0:o.ads)||[]);try{for(l.s();!(a=l.n()).done;){var s,d=a.value;if((null!==(s=null==d?void 0:d.startTimeInSeconds)&&void 0!==s?s:0)>t)return void(this.apiTimelineAbsolute_=!0)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}}},{key:"normalizeAvails_",value:function(e){var n=this,t=this.apiTimelineAbsolute_?0:this.dashAvailabilityStartTime_||0;return e.map(function(e){var i=n.resolveAbsoluteStart_(e,t,null);return Pt(Pt({},e),{},{startTimeInSeconds:i,ads:(e.ads||[]).map(function(r){return Pt(Pt({},r),{},{startTimeInSeconds:n.resolveAbsoluteStart_(r,t,e,i)})})})})}},{key:"resolveAbsoluteStart_",value:function(e,n,t,i){var r=null==e?void 0:e.adProgramDateTime;if(r){var o=new Date(r).getTime()/1e3;if(isFinite(o)&&o>0)return o}return null!=t&&t.adProgramDateTime&&"number"==typeof i?i+((e.startTimeInSeconds||0)-(t.startTimeInSeconds||0)):(e.startTimeInSeconds||0)+n}},{key:"resolveDashAvailabilityStartTime_",value:(r=n(t.mark(function e(n,i){var r,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.dashAvailabilityStartTimeResolved_){e.next=2;break}return e.abrupt("return");case 2:if(!n){e.next=8;break}if(r=new Date(n).getTime()/1e3,!(isFinite(r)&&r>0)){e.next=8;break}return this.dashAvailabilityStartTime_=r,this.dashAvailabilityStartTimeResolved_=!0,e.abrupt("return");case 8:if(!(i>0)){e.next=13;break}return e.next=11,this.fetchDashAvailabilityStartTimeFromMpd_();case 11:(o=e.sent)>0&&(this.dashAvailabilityStartTime_=o,this.dashAvailabilityStartTimeResolved_=!0);case 13:case"end":return e.stop()}},e,this)})),function(e,n){return r.apply(this,arguments)})},{key:"fetchDashAvailabilityStartTimeFromMpd_",value:(i=n(t.mark(function e(){var n,i,r,o,a,l;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=this.dashManifestUrl_||this.getCurrentSourceUrl_())&&i.includes(".mpd")){e.next=4;break}return e.abrupt("return",0);case 4:return e.next=6,fetch(i);case 6:return r=e.sent,e.next=9,r.text();case 9:return o=e.sent,a=(new DOMParser).parseFromString(o,"application/xml"),l=null===(n=a.querySelector("MPD"))||void 0===n?void 0:n.getAttribute("availabilityStartTime"),e.abrupt("return",l?new Date(l).getTime()/1e3:0);case 15:return e.prev=15,e.t0=e.catch(0),console.warn(jt,"MPD availabilityStartTime parse failed",e.t0),e.abrupt("return",0);case 19:case"end":return e.stop()}},e,this,[[0,15]])})),function(){return i.apply(this,arguments)})},{key:"getCurrentSourceUrl_",value:function(){try{var e,n,t,i,r=(null===(e=this.player_)||void 0===e||null===(n=e.currentSrc)||void 0===n?void 0:n.call(e))||(null===(t=this.player_)||void 0===t||null===(i=t.src)||void 0===i?void 0:i.call(t));return"string"==typeof r?r:(null==r?void 0:r.src)||""}catch(e){return""}}},{key:"setupAdBreakListeners_",value:function(){var e=this;if(!this.adBreakListenersAttached_){this.adBreakListenersAttached_=!0,this.onTimeupdate_();this.attachGlobalListener_("timeupdate",function(){return e.onTimeupdate_()}),this.attachGlobalListener_("dispose",this.onDispose_),this.video_&&(this.videoTimeupdate_=function(){return e.onTimeupdate_()},this.video_.addEventListener("timeupdate",this.videoTimeupdate_))}}},{key:"isHlsSource_",value:function(){var e,n,t=this.getCurrentSourceUrl_().toLowerCase(),i=((null===(e=this.player_)||void 0===e||null===(n=e.currentType)||void 0===n?void 0:n.call(e))||"").toLowerCase();return t.includes(".m3u8")||"application/x-mpegurl"===i||"application/vnd.apple.mpegurl"===i}},{key:"isDashSource_",value:function(){var e,n,t=this.getCurrentSourceUrl_().toLowerCase();return"application/dash+xml"===((null===(e=this.player_)||void 0===e||null===(n=e.currentType)||void 0===n?void 0:n.call(e))||"").toLowerCase()||t.includes(".mpd")}},{key:"getDashMediaPlayerTimelineSeconds_",value:function(){try{var e,n,t=null===(e=this.player_)||void 0===e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer;if(!t||"function"!=typeof t.time)return null;var i=t.time();return"number"==typeof i&&isFinite(i)&&i>1e6?i:null}catch(e){return null}}},{key:"getCurrentTime_",value:function(){var e,n,t,i=null!==(e=null===(n=this.video_)||void 0===n?void 0:n.currentTime)&&void 0!==e?e:0,r=u();if(this.isHlsSource_()){var o,a,l=i,s=null===(o=this.player_)||void 0===o||null===(a=o.seekable)||void 0===a?void 0:a.call(o);return s&&s.length>0&&(l=s.end(s.length-1)),Date.now()/1e3-(l-i)}if(this.isDashSource_()){var d,c,v,f=this.getDashMediaPlayerTimelineSeconds_();if(null!=f)return f;var m=null===(d=this.player_)||void 0===d||null===(c=d.seekable)||void 0===c?void 0:c.call(d),p="function"==typeof(null===(v=this.player_)||void 0===v?void 0:v.currentTime)?this.player_.currentTime():i;if(m&&m.length>0){var h=m.start(0);if(h>1e6&&h+p>1e6)return h+p}if(this.apiTimelineAbsolute_&&(this.dashAvailabilityStartTime_||0)>1e9)return(this.dashAvailabilityStartTime_||0)+p}return"Safari"===r?i:"function"==typeof(null===(t=this.player_)||void 0===t?void 0:t.currentTime)?this.player_.currentTime():i}},{key:"onTimeupdate_",value:function(){if(this.ad_||this.adBreaks_.length){var e=this.getCurrentTime_();if(this.ad_){var n,t;this.sendInProgressEvents_(e,this.transmitAd_);var i=this.ad_.getDuration(),r=(null!==(n=null===(t=this.transmitAd_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==n?n:0)+i,o=r-e;this.ad_.canSkipNow()&&o>0&&i>0&&this.sendTrackingEvent_(vt),i>0&&e>=r&&this.onEnded_()}this.ad_||this.checkLinearAds_(e)}}},{key:"sendInProgressEvents_",value:function(e,n){if(n){var t=n.startTimeInSeconds+.25*n.durationInSeconds,i=n.startTimeInSeconds+.5*n.durationInSeconds,r=n.startTimeInSeconds+.75*n.durationInSeconds;e>=t&&!this.eventsSent_.has(ot)&&(this.eventsSent_.add(ot),this.sendTrackingEvent_(ot)),e>=i&&!this.eventsSent_.has(at)&&(this.eventsSent_.add(at),this.sendTrackingEvent_(at)),e>=r&&!this.eventsSent_.has(lt)&&(this.eventsSent_.add(lt),this.sendTrackingEvent_(lt))}}},{key:"flushPendingQuartiles_",value:function(){for(var e=0,n=[ot,at,lt];e<n.length;e++){var t=n[e];this.eventsSent_.has(t)||(this.eventsSent_.add(t),this.sendTrackingEvent_(t))}}},{key:"checkLinearAds_",value:function(e){var n,t=Ft(this.adBreaks_);try{for(t.s();!(n=t.n()).done;){var i=n.value;if(this.ad_)break;for(var r=i.ads||[],o=0;o<r.length;o++){var a=r[o],l=a.startTimeInSeconds,s=l+a.durationInSeconds;if(l<=e&&s>e){this.onEnded_(),this.transmitAdBreak_=i,this.transmitAd_=a,this.ad_=new $n(a,o+1,r.length,this.video_),0===o&&this.sendTrackingEvent_(ut),this.setupCurrentAdListeners_();break}}}}catch(e){t.e(e)}finally{t.f()}}},{key:"onEnded_",value:function(){this.ad_&&this.transmitAd_&&(this.ad_.isSkipped()||this.flushPendingQuartiles_(),this.removeCurrentAdListeners_(this.ad_.isSkipped()),this.ad_.getPositionInSequence()===this.ad_.getSequenceLength()&&this.sendTrackingEvent_(ct),this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null)}},{key:"setupCurrentAdListeners_",value:function(){var e,n,t,i,r,o=this,a=!1;null!==(e=this.player_)&&void 0!==e&&null!==(n=e.paused)&&void 0!==n&&n.call(e)?a=!0:(this.sendTrackingEvent_(Zn),this.sendTrackingEvent_(et)),this.lastMutedForAd_=null!==(t=null===(i=this.player_)||void 0===i||null===(r=i.muted)||void 0===r?void 0:r.call(i))&&void 0!==t&&t,this.attachAdListener_("volumechange",function(){var e,n,t,i=null!==(e=null===(n=o.player_)||void 0===n||null===(t=n.muted)||void 0===t?void 0:t.call(n))&&void 0!==e&&e;i!==o.lastMutedForAd_&&(o.lastMutedForAd_=i,i?o.sendTrackingEvent_(nt):o.sendTrackingEvent_(tt))}),this.attachAdListener_("play",function(){a?(o.sendTrackingEvent_(Zn),o.sendTrackingEvent_(et),a=!1):o.sendTrackingEvent_(it)}),this.attachAdListener_("pause",function(){o.sendTrackingEvent_(rt)})}},{key:"removeCurrentAdListeners_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.sendTrackingEvent_(e?dt:st),this.detachAdListeners_(),this.eventsSent_.clear()}},{key:"attachGlobalListener_",value:function(e,n){this.player_&&(this.player_.on(e,n),this.globalListeners_.push({event:e,handler:n}))}},{key:"attachAdListener_",value:function(e,n){this.player_&&(this.player_.on(e,n),this.adListeners_.push({event:e,handler:n}))}},{key:"detachAdListeners_",value:function(){var e,n=Ft(this.adListeners_);try{for(n.s();!(e=n.n()).done;){var t,i,r=e.value,o=r.event,a=r.handler;null===(t=this.player_)||void 0===t||null===(i=t.off)||void 0===i||i.call(t,o,a)}}catch(e){n.e(e)}finally{n.f()}this.adListeners_=[]}},{key:"detachAllListeners_",value:function(){this.detachAdListeners_();var e,n=Ft(this.globalListeners_);try{for(n.s();!(e=n.n()).done;){var t,i,r=e.value,o=r.event,a=r.handler;null===(t=this.player_)||void 0===t||null===(i=t.off)||void 0===i||i.call(t,o,a)}}catch(e){n.e(e)}finally{n.f()}this.globalListeners_=[],this.video_&&this.videoTimeupdate_&&(this.video_.removeEventListener("timeupdate",this.videoTimeupdate_),this.videoTimeupdate_=null)}},{key:"startComscoreForCurrentAd_",value:function(){try{var e=In.get();if(!e||0===Object.keys(e).length)return;var n=e.formulateComscoreAdPayload,t=e.startComscoreAdTracking,i=Dn.get();t(n(Pt(Pt({},this.transmitAd_),{},{trackingUrl:i})))}catch(e){console.warn(jt,"comscore start failed",e)}}},{key:"sendTrackingEvent_",value:function(e){var n,t=this;if(this.transmitAd_&&this.transmitAdBreak_){var i=(this.transmitAd_.trackingEvents||[]).find(function(n){return n.eventType===e});if(i||(i=(this.transmitAdBreak_.adBreakTrackingEvents||[]).find(function(n){return n.eventType===e})),i&&(null===(n=this.config_)||void 0===n||!n.disableTrackingEvents)){var r,o,a,l=(null===(r=this.transmitAd_)||void 0===r?void 0:r.adId)||(null===(o=this.transmitAdBreak_)||void 0===o?void 0:o.availId)||"unknown",s=Ft(i.beaconUrls||[]);try{var d=function(){var n=a.value;if(!n)return"continue";var i="".concat(l,"|").concat(e,"|").concat(n);if(t.firedBeacons_.has(i))return"continue";t.firedBeacons_.add(i),fetch(n,{mode:"no-cors"}).catch(function(e){console.warn(jt,"beacon failed",n,e)})};for(s.s();!(a=s.n()).done;)d()}catch(e){s.e(e)}finally{s.f()}}var u=In.get(),c=u&&Object.keys(u).length?u:null;switch(e){case Zn:this.onEvent_({type:ft}),this.startComscoreForCurrentAd_();break;case et:this.onEvent_({type:mt,ad:this.ad_});break;case nt:this.onEvent_({type:pt});break;case tt:this.onEvent_({type:ht});break;case it:this.onEvent_({type:gt});break;case rt:this.onEvent_({type:yt});break;case ot:this.onEvent_({type:wt});break;case at:this.onEvent_({type:Tt});break;case lt:this.onEvent_({type:_t});break;case st:this.onEvent_({type:It}),this.onEvent_({type:bt}),null!=c&&c.finishComscoreAdTracking&&c.finishComscoreAdTracking();break;case dt:this.onEvent_({type:Et}),this.onEvent_({type:bt});break;case ut:this.onEvent_({type:kt});break;case ct:this.onEvent_({type:At}),null!=c&&c.endComscoreAdTracking&&c.endComscoreAdTracking();break;case vt:this.onEvent_({type:St})}}else console.warn(jt,"sendTrackingEvent_ skipped — no active ad",{eventType:e})}}]),e}();function Nt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Wt(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Nt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var xt={dash:"tracking/initialize/dash",hls:"tracking/initialize/hls"};function Mt(e){if(null==e||!e.src)return null;var n=(e.type||"").toLowerCase(),t=String(e.src).toLowerCase();return"application/dash+xml"===n||t.includes(".mpd")?"dash":"application/x-mpegurl"===n||"application/vnd.apple.mpegurl"===n||t.includes(".m3u8")?"hls":null}function Ut(e,n,t){return Bt.apply(this,arguments)}function Bt(){return(Bt=n(t.mark(function e(n,i,r){var o,a,l,s,d,u,c,v,f,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Mt(n)){e.next=3;break}return e.abrupt("return",n);case 3:return a=Ye(n.src,r,i),l=a.replace(o,xt[o]),console.log("[Transmit] session init →",l),e.prev=6,e.next=9,fetch(l,{method:"GET",redirect:"follow"});case 9:return s=e.sent,e.next=12,s.json();case 12:if(d=e.sent,console.log("[Transmit] session response",d),u="dash"===o?null==d?void 0:d.dashUrl:null==d?void 0:d.hlsUrl,c=null==d?void 0:d.trackingUrl,u&&c){e.next=18;break}return e.abrupt("return",n);case 18:return v=new URL(l),f=v.hostname,m="https://".concat(f).concat(u),p="https://".concat(f).concat(c),Dn.set(p),console.log("[Transmit] session ready",{manifestUrl:m,trackingUrl:p}),e.abrupt("return",Wt(Wt({},n),{},{src:m}));case 26:return e.prev=26,e.t0=e.catch(6),console.warn("[Transmit] session init failed",e.t0),e.abrupt("return",n);case 30:case"end":return e.stop()}},e,null,[[6,26]])}))).apply(this,arguments)}var Ht=null;function Gt(e,n){var t;if(Ht)return console.log("[Transmit] initializeTransmit skipped — manager already initialised"),Ht;var i=Dn.get();if(!i)return console.warn("[Transmit] initializeTransmit skipped — no tracking URL"),null;var r=o(e);if(!r)return console.warn("[Transmit] initializeTransmit skipped — no player"),null;var a=(null===(t=r.el())||void 0===t?void 0:t.querySelector("video"))||null,l=function(e){try{var n="function"==typeof(null==e?void 0:e.currentSrc)&&e.currentSrc()||"function"==typeof(null==e?void 0:e.src)&&e.src()||"";if("application/dash+xml"===("function"==typeof(null==e?void 0:e.currentType)&&e.currentType()||"")||String(n).includes(".mpd"))return n}catch(e){}return null}(r);return(Ht=new Vt(a,r,function(e){var t,i;console.log("[Transmit] ad event",e);var r=null==n||null===(t=n.customData)||void 0===t||null===(i=t.ads)||void 0===i?void 0:i.adEventHandler;if("function"==typeof r)try{r(e)}catch(e){console.warn("[Transmit] adEventHandler threw",e)}},{dashManifestUrl:l})).configure({disableTrackingEvents:!1}),Ht.addTrackingUrl(i),Ht.onManifestUpdated(),Ht}function qt(){Ht&&(Ht.release(),Ht=null)}function Qt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var Yt=function(e){i(e).play()},zt=function(e){i(e).pause()},Kt=function(e,n){var t=i(e),r=t.currentTime()+n;t.currentTime(r)},Xt=function(e,n){var t=i(e),r=t.currentTime(),o=r<=n?0:r-n;t.currentTime(o)},Jt=function(e){return!!i.getPlayer("".concat(e))},$t=function(e){return i(e).paused()},Zt=function(){var e=n(t.mark(function e(i,r){var a,l,d,u=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=u.length>2&&void 0!==u[2]&&u[2],e.next=3,Z();case 3:return l=e.sent,d=o(i),e.abrupt("return",new Promise(function(e,o){j(r,l).then(function(){var o=n(t.mark(function n(o){var l,u,c,v,f,m,p,h,g,y,w;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(qt(),m=null==o?void 0:o.data,s()||(window.sid=ke()),m.contentType="linearchannel",m.channelId=null==r?void 0:r.channelId,p=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v?void 0:v.adsConfig)||{},h=!(null==m||null===(f=m.linearchannel)||void 0===f||!f.isSSAIEnabled),g=h&&"MEDIA_TAILOR"==(null==p?void 0:p.vodAdSticherProvider),y=h&&"TRANSMIT"==(null==p?void 0:p.liveAdSticherProvider)&&!(null==p||!p.liveAdClientSideTracking),w=Ke(m,i),!g){n.next=17;break}return n.next=13,Pn(i,m);case 13:w=n.sent,a=!0,n.next=22;break;case 17:if(!y){n.next=22;break}return n.next=20,Ut(w,m,i);case 20:w=n.sent,a=!0;case 22:re(m),w&&a?(ri(i,w),y?Gt(i,{customData:window.customData||{ads:p}}):g&&zn(i),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})})):(In.get()&&0!==Object.keys(In.get()).length&&bn({playerId:i,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:m}));case 24:case"end":return n.stop()}},n)}));return function(e){return o.apply(this,arguments)}}()).catch(function(e){o({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),ei=function(){var e=n(t.mark(function e(i,r,a){var l,s,d,u,c,v,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z();case 2:return u=e.sent,console.log("load video"),(le()||null)&&ve(r),c=0,v=0,p=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(d=s.watchHistory)&&void 0!==d&&d.enable&&N(r,u).then(function(e){var n,t,i,r,o,a,l,s,d;(null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t||!t.cb||null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.isExternal||null===(o=window)||void 0===o||null===(a=o.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data),c=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,(v=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedPercentage)||null)<95)&&(p=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedTime)||null)}).catch(function(){}),e.abrupt("return",new Promise(function(e,a){C(r,u).then(function(){var r=n(t.mark(function n(r){var l,s,d,u,h,g,y,w,T,_,I,b,E,S,k,A,O,D,L,P,F,C,j,R,V,N,W,x,M,U,B,H,G,q,Q,Y,z,K,X,J,$;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(A=null==r?void 0:r.data,O=(null==A?void 0:A.contentType)||"video",D=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(u=d.appcmsMain)||void 0===u?void 0:u.adsConfig)||{},L=!(null==A||null===(h=A[O])||void 0===h||!h.isSSAIEnabled),P=L&&"MEDIA_TAILOR"==(null==D?void 0:D.vodAdSticherProvider),F=L&&"TRANSMIT"==(null==D?void 0:D.liveAdSticherProvider)&&!(null==D||!D.liveAdClientSideTracking),C=!(null==A||null===(g=A[O])||void 0===g||null===(y=g.streamingInfo)||void 0===y||!y.isLiveStream)||"linearchannel"===O,re(r.data),(j=(null==A||null===(w=A.ads)||void 0===w||null===(T=w.preRoll)||void 0===T||null===(_=T.adTags)||void 0===_||null===(I=_.web)||void 0===I?void 0:I.active)&&(null==A||null===(b=A.ads)||void 0===b||null===(E=b.preRoll)||void 0===E||null===(S=E.adTags)||void 0===S||null===(k=S.web)||void 0===k?void 0:k.url))&&on(i,j,A),R=Ke(A,i),!P){n.next=17;break}return n.next=14,Pn(i,A);case 14:R=n.sent,n.next=22;break;case 17:if(!F||!C){n.next=22;break}return qt(),n.next=21,Ut(R,A,i);case 21:R=n.sent;case 22:R?(Q=(null==A||null===(V=A.video)||void 0===V||null===(N=V.gist)||void 0===N?void 0:N.videoImageUrl)||(null==A||null===(W=A.video)||void 0===W||null===(x=W.gist)||void 0===x||null===(M=x.imageGist)||void 0===M?void 0:M.r16x9),(Y=o(i)).poster(Q),ri(i,R),F&&C?Gt(i,{customData:window.customData||{ads:D}}):P&&xn(i,p),Y.on("loadstart",function(){C&&e({status:!0,msg:"Video Loaded",response:A})}),Y.on("loadeddata",function(){tn(),e({status:!0,msg:"Video Loaded",response:A})}),Y.one("play",function(){!c||P||F&&C||v<95&&setTimeout(function(){Y.currentTime(c)},0)}),Y.one("error",function(){var e;a({status:!1,msg:(null==Y||null===(e=Y.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==A||null===(U=A.video)||void 0===U||null===(B=U.contentDetails)||void 0===B||null===(H=B.closedCaptions)||void 0===H?void 0:H.length)>0||(null==A||null===(G=A.video)||void 0===G||null===(q=G.closedCaptions)||void 0===q?void 0:q.length)>0?($=(null==A||null===(K=A.video)||void 0===K||null===(X=K.contentDetails)||void 0===X?void 0:X.closedCaptions)||(null==A||null===(J=A.video)||void 0===J?void 0:J.closedCaptions),z=$.filter(function(e){return"VTT"===e.format}),f(i,z)):m(i)):(nn(i,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 23:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){oi(e,i,a,r)})}));case 11:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),ni=function(e,n,t){var i=o(e);return i.src(n),new Promise(function(e,n){var r=0;i.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){r=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},ti=function(e){qt();var n=o(e),t=(In.get()||{}).destroyComscoreTag;if(ii(),t&&t(),l(),window.onresize=null,n)n.dispose();else{var i=document.getElementById(e);i&&i.remove()}},ii=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()},ri=function(e,n){console.log("load video in core",n);var t=o(e);t&&t.src(n)},oi=function(n,t,i,r){var o,a,l,s,d,u,c=null==n||null===(o=n.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==n?void 0:n.message);Jt(t)&&nn(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Qt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))},ai=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")};export{$t as $,oi as A,Z as B,j as C,R as D,Ne as E,fe as F,ae as G,ni as H,Kt as I,Yt as J,zt as K,Xt as L,ei as M,Zt as N,ti as O,M as P,yn as Q,te as R,x as S,ge as T,ee as U,H as V,U as W,S as X,Wn as Y,an as Z,se as _,xe as a,de as a0,Gt as a1,zn as a2,xn as a3,W as a4,ce as a5,ve as a6,le as b,In as c,We as d,oe as e,Ke as f,Ae as g,re as h,bn as i,tn as j,nn as k,ri as l,ue as m,ai as n,Ut as o,Ve as p,on as q,en as r,V as s,Dn as t,Pn as u,ie as v,ne as w,Jt as x,C as y,N as z};
|
package/esm/icons-699e8cf0.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=function(n){return"<svg fill='".concat(n||"white","'\n class='icon icon-minimize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(n||"white","' d='M40.397 37.511h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.004-9.004z' />\n <path fill='").concat(n||"white","' d='M24.443 26.763h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.003 9.004z' />\n </svg>")},C=function(n){return"<svg fill='".concat(n||"white","'\n class='icon icon-maximize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(n||"white","' d='M43.369 45.938h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.004 9.004z' />\n <path fill='").concat(n||"white","' d='M21.969 18.834h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.003-9.003z' />\n </svg>")},t=function(n){return'<svg style="width:16px" class=\'rewindbtn\' viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.88817 16.9913L7.72176 18.5762C9.58746 18.8613 11.4677 18.5376 13.1023 17.6161C17.1941 15.3094 18.4803 9.98978 15.9732 5.74243C13.47 1.50156 8.13865 -0.0590307 4.03665 2.25351C3.35173 2.64307 2.7379 3.12124 2.20384 3.67698L3.34087 4.82569C3.77642 4.37247 4.27773 3.98196 4.83679 3.66398C8.20452 1.76539 12.5901 3.04913 14.644 6.5288C16.6894 9.99402 15.6429 14.3223 12.3046 16.2043C10.9636 16.9602 9.42195 17.2257 7.88817 16.9913Z" fill=\''.concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.10742 0.462205L0.56205 5.24366L6.06202 5.79492L3.10742 0.462205Z" fill=\'').concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.80172 14.1769C10.1682 14.1769 10.5096 14.1082 10.8258 13.9708C11.142 13.8333 11.416 13.6241 11.6479 13.343C11.8798 13.0619 12.0615 12.7059 12.1928 12.275C12.3242 11.8441 12.3898 11.3368 12.3898 10.753C12.3898 10.1661 12.3242 9.65803 12.1928 9.22868C12.0615 8.79934 11.8798 8.44413 11.6479 8.16305C11.416 7.88197 11.142 7.6727 10.8258 7.53525C10.5096 7.3978 10.1682 7.32907 9.80172 7.32907C9.43524 7.32907 9.09551 7.3978 8.78254 7.53525C8.46956 7.6727 8.19794 7.88197 7.96767 8.16305C7.7374 8.44413 7.5574 8.79934 7.42767 9.22868C7.29794 9.65803 7.23308 10.1661 7.23308 10.753C7.23308 11.3368 7.29794 11.8441 7.42767 12.275C7.5574 12.7059 7.7374 13.0619 7.96767 13.343C8.19794 13.6241 8.46956 13.8333 8.78254 13.9708C9.09551 14.1082 9.43524 14.1769 9.80172 14.1769ZM6.54713 14.1028V13.2457H5.28226V7.39394H4.2947L2.14929 9.13139L2.52875 9.62714C2.5547 9.66112 2.59443 9.69123 2.64794 9.71749C2.70145 9.74374 2.76064 9.75687 2.82551 9.75687C2.86767 9.75687 2.91064 9.75069 2.95443 9.73834C2.99821 9.72598 3.04118 9.70282 3.08335 9.66884L4.09524 8.86266C4.08551 9.02946 4.08064 9.18853 4.08064 9.33988V13.2457H2.65524V14.1028H6.54713ZM9.30308 13.1136C9.46362 13.1893 9.62983 13.2271 9.80172 13.2271C9.97686 13.2271 10.1455 13.1893 10.3077 13.1136C10.4698 13.038 10.6133 12.9059 10.7382 12.7175C10.8631 12.5291 10.9628 12.2758 11.0374 11.9576C11.112 11.6395 11.1493 11.238 11.1493 10.753C11.1493 10.2681 11.112 9.86652 11.0374 9.54838C10.9628 9.23023 10.8631 8.97695 10.7382 8.78853C10.6133 8.60011 10.4698 8.46807 10.3077 8.39239C10.1455 8.31672 9.97686 8.27888 9.80172 8.27888C9.62983 8.27888 9.46362 8.31672 9.30308 8.39239C9.14254 8.46807 9.00064 8.60011 8.8774 8.78853C8.75416 8.97695 8.65605 9.23023 8.58308 9.54838C8.5101 9.86652 8.47362 10.2681 8.47362 10.753C8.47362 11.238 8.5101 11.6395 8.58308 11.9576C8.65605 12.2758 8.75416 12.5291 8.8774 12.7175C9.00064 12.9059 9.14254 13.038 9.30308 13.1136Z" fill=\'').concat(window.color||"white","' />\n </svg>")},e=function(){return'<svg class=\'rewindbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.22363 9.43675L3.152 11.3434L5.08151 9.43675M2.91616 10.8667C2.88115 10.5537 2.86319 10.2356 2.86319 9.91341C2.86319 5.17486 6.74945 1.3335 11.5434 1.3335C16.3374 1.3335 20.2236 5.17486 20.2236 9.91341C20.2236 14.652 16.3374 18.4933 11.5434 18.4933C8.8166 18.4933 6.38346 17.2505 4.79212 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M9.92694 13.0831V6.80067H8.94318C8.58633 7.20106 7.97871 7.53473 7.37109 7.64912V8.66918C7.68937 8.64058 8.22947 8.52618 8.51881 8.39272V13.0831H9.92694Z" fill="white"/>\n <path d="M13.6545 6.6958C11.8316 6.6958 11.1951 8.23065 11.1951 9.94664C11.1951 11.6817 11.7641 13.1975 13.6255 13.1975C15.5159 13.1975 16.0656 11.634 16.0656 9.9085C16.0656 8.12579 15.4291 6.6958 13.6545 6.6958ZM13.6545 7.78259C14.4839 7.78259 14.6382 8.69778 14.6382 9.91804C14.6382 11.1478 14.5225 12.1107 13.6448 12.1107C12.7479 12.1107 12.6128 11.0811 12.6128 9.92757C12.6128 8.57385 12.8443 7.78259 13.6545 7.78259Z" fill="white"/>\n </svg>'},i=function(){return'<svg width="16" height="16" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11 14C12.6569 14 14 12.6569 14 11C14 9.34315 12.6569 8 11 8C9.34315 8 8 9.34315 8 11C8 12.6569 9.34315 14 11 14Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M17.7273 13.7273C17.6063 14.0015 17.5702 14.3056 17.6236 14.6005C17.6771 14.8954 17.8177 15.1676 18.0273 15.3818L18.0818 15.4364C18.2509 15.6052 18.385 15.8057 18.4765 16.0265C18.568 16.2472 18.6151 16.4838 18.6151 16.7227C18.6151 16.9617 18.568 17.1983 18.4765 17.419C18.385 17.6397 18.2509 17.8402 18.0818 18.0091C17.913 18.1781 17.7124 18.3122 17.4917 18.4037C17.271 18.4952 17.0344 18.5423 16.7955 18.5423C16.5565 18.5423 16.3199 18.4952 16.0992 18.4037C15.8785 18.3122 15.678 18.1781 15.5091 18.0091L15.4545 17.9545C15.2403 17.745 14.9682 17.6044 14.6733 17.5509C14.3784 17.4974 14.0742 17.5335 13.8 17.6545C13.5311 17.7698 13.3018 17.9611 13.1403 18.205C12.9788 18.4489 12.8921 18.7347 12.8909 19.0273V19.1818C12.8909 19.664 12.6994 20.1265 12.3584 20.4675C12.0174 20.8084 11.5549 21 11.0727 21C10.5905 21 10.1281 20.8084 9.78708 20.4675C9.4461 20.1265 9.25455 19.664 9.25455 19.1818V19.1C9.24751 18.7991 9.15011 18.5073 8.97501 18.2625C8.79991 18.0176 8.55521 17.8312 8.27273 17.7273C7.99853 17.6063 7.69437 17.5702 7.39947 17.6236C7.10456 17.6771 6.83244 17.8177 6.61818 18.0273L6.56364 18.0818C6.39478 18.2509 6.19425 18.385 5.97353 18.4765C5.7528 18.568 5.51621 18.6151 5.27727 18.6151C5.03834 18.6151 4.80174 18.568 4.58102 18.4765C4.36029 18.385 4.15977 18.2509 3.99091 18.0818C3.82186 17.913 3.68775 17.7124 3.59626 17.4917C3.50476 17.271 3.45766 17.0344 3.45766 16.7955C3.45766 16.5565 3.50476 16.3199 3.59626 16.0992C3.68775 15.8785 3.82186 15.678 3.99091 15.5091L4.04545 15.4545C4.25503 15.2403 4.39562 14.9682 4.4491 14.6733C4.50257 14.3784 4.46647 14.0742 4.34545 13.8C4.23022 13.5311 4.03887 13.3018 3.79497 13.1403C3.55107 12.9788 3.26526 12.8921 2.97273 12.8909H2.81818C2.33597 12.8909 1.87351 12.6994 1.53253 12.3584C1.19156 12.0174 1 11.5549 1 11.0727C1 10.5905 1.19156 10.1281 1.53253 9.78708C1.87351 9.4461 2.33597 9.25455 2.81818 9.25455H2.9C3.2009 9.24751 3.49273 9.15011 3.73754 8.97501C3.98236 8.79991 4.16883 8.55521 4.27273 8.27273C4.39374 7.99853 4.42984 7.69437 4.37637 7.39947C4.3229 7.10456 4.18231 6.83244 3.97273 6.61818L3.91818 6.56364C3.74913 6.39478 3.61503 6.19425 3.52353 5.97353C3.43203 5.7528 3.38493 5.51621 3.38493 5.27727C3.38493 5.03834 3.43203 4.80174 3.52353 4.58102C3.61503 4.36029 3.74913 4.15977 3.91818 3.99091C4.08704 3.82186 4.28757 3.68775 4.50829 3.59626C4.72901 3.50476 4.96561 3.45766 5.20455 3.45766C5.44348 3.45766 5.68008 3.50476 5.9008 3.59626C6.12152 3.68775 6.32205 3.82186 6.49091 3.99091L6.54545 4.04545C6.75971 4.25503 7.03183 4.39562 7.32674 4.4491C7.62164 4.50257 7.9258 4.46647 8.2 4.34545H8.27273C8.54161 4.23022 8.77093 4.03887 8.93245 3.79497C9.09397 3.55107 9.18065 3.26526 9.18182 2.97273V2.81818C9.18182 2.33597 9.37338 1.87351 9.71435 1.53253C10.0553 1.19156 10.5178 1 11 1C11.4822 1 11.9447 1.19156 12.2856 1.53253C12.6266 1.87351 12.8182 2.33597 12.8182 2.81818V2.9C12.8193 3.19253 12.906 3.47834 13.0676 3.72224C13.2291 3.96614 13.4584 4.15749 13.7273 4.27273C14.0015 4.39374 14.3056 4.42984 14.6005 4.37637C14.8954 4.3229 15.1676 4.18231 15.3818 3.97273L15.4364 3.91818C15.6052 3.74913 15.8057 3.61503 16.0265 3.52353C16.2472 3.43203 16.4838 3.38493 16.7227 3.38493C16.9617 3.38493 17.1983 3.43203 17.419 3.52353C17.6397 3.61503 17.8402 3.74913 18.0091 3.91818C18.1781 4.08704 18.3122 4.28757 18.4037 4.50829C18.4952 4.72901 18.5423 4.96561 18.5423 5.20455C18.5423 5.44348 18.4952 5.68008 18.4037 5.9008C18.3122 6.12152 18.1781 6.32205 18.0091 6.49091L17.9545 6.54545C17.745 6.75971 17.6044 7.03183 17.5509 7.32674C17.4974 7.62164 17.5335 7.9258 17.6545 8.2V8.27273C17.7698 8.54161 17.9611 8.77093 18.205 8.93245C18.4489 9.09397 18.7347 9.18065 19.0273 9.18182H19.1818C19.664 9.18182 20.1265 9.37338 20.4675 9.71435C20.8084 10.0553 21 10.5178 21 11C21 11.4822 20.8084 11.9447 20.4675 12.2856C20.1265 12.6266 19.664 12.8182 19.1818 12.8182H19.1C18.8075 12.8193 18.5217 12.906 18.2778 13.0676C18.0339 13.2291 17.8425 13.4584 17.7273 13.7273Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},l=function(){return'<svg class=\'selected-stream\' width="25" height="25" viewBox="0 0 35 33" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_319_60943)">\n <path d="M0 0H35V33H0V0Z" fill="#D2393B"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M15.8689 17.6541L22.3039 11.2898C22.6966 10.9014 23.3372 10.9054 23.7299 11.2937C24.1225 11.6821 24.1265 12.3157 23.7338 12.704L16.6345 19.7253C16.6189 19.743 16.6026 19.7604 16.5856 19.7772C16.5158 19.8463 16.4381 19.9032 16.3554 19.9479C15.9716 20.1587 15.4758 20.1009 15.1503 19.779C15.126 19.755 15.1032 19.73 15.0819 19.7042L12.2919 16.9449C11.8992 16.5565 11.9032 15.9229 12.2958 15.5346C12.6885 15.1462 13.3291 15.1423 13.7218 15.5306L15.8689 17.6541Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_319_60943">\n <path d="M0 0H35V33H8C3.58172 33 0 29.4183 0 25V0Z" fill="white"/>\n </clipPath>\n </defs>\n </svg>\n '},o=function(){return'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.7275 8.7189V11.2811L18.0174 11.7913C17.8497 12.5312 17.558 13.2374 17.1546 13.88L18.71 16.1626L16.8874 17.9721L14.6149 16.43C13.9694 16.8283 13.2636 17.1194 12.5249 17.2919L12.0143 20H9.43828L8.92846 17.2919C8.18971 17.1194 7.48385 16.8284 6.8384 16.43L4.56591 17.9721L2.74302 16.1626L4.28649 13.88C3.88787 13.2349 3.5965 12.5296 3.42371 11.7913L0.727539 11.2811V8.7189L3.42371 8.1968C3.59774 7.4568 3.89356 6.75083 4.29909 6.10771L2.74337 3.837L4.56626 2.02785L6.83875 3.57C7.48173 3.16673 8.18841 2.8752 8.92881 2.70777L9.43863 0H12.0147L12.5252 2.70777C13.2656 2.87529 13.9723 3.16682 14.6153 3.57L16.8878 2.02785L18.7103 3.837L17.1549 6.11996C17.5582 6.75838 17.85 7.46066 18.0177 8.1968L20.7275 8.7189ZM5.19864 10.0057C5.2018 13.0538 7.67684 15.5222 10.7268 15.5191C12.1916 15.5176 13.5957 14.9347 14.6304 13.8985C15.665 12.8624 16.2454 11.4579 16.2438 9.99405C16.2405 6.94597 13.7654 4.47766 10.7154 4.48088C7.6654 4.4841 5.19548 6.95764 5.19864 10.0057Z" fill="white"/>\n </svg>'},w=function(n){return'<svg style="width:16px" class=\'skipbtn\' viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.99586 16.9937L10.1623 18.5786C8.29657 18.8638 6.41631 18.54 4.78178 17.6185C0.689955 15.3118 -0.596286 9.9922 1.9108 5.74486C4.41407 1.50398 9.74539 -0.0566045 13.8474 2.25594C14.5323 2.64549 15.1461 3.12366 15.6802 3.6794L14.5432 4.82812C14.1076 4.3749 13.6063 3.98438 13.0472 3.66641C9.67952 1.76782 5.29397 3.05156 3.24002 6.53123C1.1946 9.99645 2.24115 14.3247 5.57947 16.2067C6.92039 16.9626 8.46208 17.2281 9.99586 16.9937Z" fill=\''.concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.7766 0.464616L17.322 5.24607L11.822 5.79733L14.7766 0.464616Z" fill=\'').concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M13.0245 14.115C13.391 14.115 13.7323 14.0463 14.0486 13.9088C14.3648 13.7714 14.6388 13.5621 14.8707 13.281C15.1026 13 15.2842 12.644 15.4156 12.2131C15.5469 11.7822 15.6126 11.2749 15.6126 10.6911C15.6126 10.1042 15.5469 9.59609 15.4156 9.16675C15.2842 8.73741 15.1026 8.38219 14.8707 8.10111C14.6388 7.82003 14.3648 7.61076 14.0486 7.47331C13.7323 7.33586 13.391 7.26714 13.0245 7.26714C12.658 7.26714 12.3183 7.33586 12.0053 7.47331C11.6923 7.61076 11.4207 7.82003 11.1904 8.10111C10.9602 8.38219 10.7802 8.73741 10.6504 9.16675C10.5207 9.59609 10.4559 10.1042 10.4559 10.6911C10.4559 11.2749 10.5207 11.7822 10.6504 12.2131C10.7802 12.644 10.9602 13 11.1904 13.281C11.4207 13.5621 11.6923 13.7714 12.0053 13.9088C12.3183 14.0463 12.658 14.115 13.0245 14.115ZM9.76991 14.0409V13.1837H8.50504V7.332H7.51748L5.37207 9.06945L5.75153 9.56521C5.77748 9.59918 5.81721 9.6293 5.87072 9.65555C5.92423 9.68181 5.98342 9.69493 6.04829 9.69493C6.09045 9.69493 6.13342 9.68876 6.17721 9.6764C6.22099 9.66405 6.26396 9.64088 6.30612 9.6069L7.31802 8.80073C7.30829 8.96752 7.30342 9.1266 7.30342 9.27795V13.1837H5.87802V14.0409H9.76991ZM12.5259 13.0517C12.6864 13.1274 12.8526 13.1652 13.0245 13.1652C13.1996 13.1652 13.3683 13.1274 13.5304 13.0517C13.6926 12.976 13.8361 12.844 13.961 12.6556C14.0859 12.4671 14.1856 12.2139 14.2602 11.8957C14.3348 11.5776 14.3721 11.176 14.3721 10.6911C14.3721 10.2061 14.3348 9.80459 14.2602 9.48644C14.1856 9.16829 14.0859 8.91501 13.961 8.7266C13.8361 8.53818 13.6926 8.40613 13.5304 8.33046C13.3683 8.25478 13.1996 8.21694 13.0245 8.21694C12.8526 8.21694 12.6864 8.25478 12.5259 8.33046C12.3653 8.40613 12.2234 8.53818 12.1002 8.7266C11.9769 8.91501 11.8788 9.16829 11.8059 9.48644C11.7329 9.80459 11.6964 10.2061 11.6964 10.6911C11.6964 11.176 11.7329 11.5776 11.8059 11.8957C11.8788 12.2139 11.9769 12.4671 12.1002 12.6556C12.2234 12.844 12.3653 12.976 12.5259 13.0517Z" fill=\'').concat(window.color?window.color:"white","' />\n </svg>")},h=function(){return'<svg class=\'skipbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M19.7236 9.43675L17.7953 11.3434L15.8658 9.43675M18.0311 10.8667C18.0661 10.5537 18.0841 10.2356 18.0841 9.91341C18.0841 5.17486 14.1978 1.3335 9.40386 1.3335C4.6099 1.3335 0.723633 5.17486 0.723633 9.91341C0.723633 14.652 4.6099 18.4933 9.40386 18.4933C12.1307 18.4933 14.5638 17.2505 16.1551 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M7.80584 13.0831V6.80067H6.82209C6.46523 7.20106 5.85762 7.53473 5.25 7.64912V8.66918C5.56828 8.64058 6.10838 8.52618 6.39772 8.39272V13.0831H7.80584Z" fill="white"/>\n <path d="M11.5334 6.6958C9.71052 6.6958 9.07397 8.23065 9.07397 9.94664C9.07397 11.6817 9.64301 13.1975 11.5044 13.1975C13.3948 13.1975 13.9445 11.634 13.9445 9.9085C13.9445 8.12579 13.308 6.6958 11.5334 6.6958ZM11.5334 7.78259C12.3628 7.78259 12.5171 8.69778 12.5171 9.91804C12.5171 11.1478 12.4014 12.1107 11.5237 12.1107C10.6268 12.1107 10.4917 11.0811 10.4917 9.92757C10.4917 8.57385 10.7232 7.78259 11.5334 7.78259Z" fill="white"/>\n </svg>'},s=function(){return'<svg class=\'icon icon-episodes\' width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1 11.7368C1 11.3299 1.32989 11 1.73684 11H16.2632C16.6701 11 17 11.3299 17 11.7368V21.2632C17 21.6701 16.6701 22 16.2632 22H1.73684C1.3299 22 1 21.6701 1 21.2632V11.7368Z" fill="white"/>\n <path d="M5 8H19.2632C19.6701 8 20 8.3299 20 8.73684V18" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M8 4H22.2632C22.6701 4 23 4.3299 23 4.73684V13" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},d=function(){return'<svg width="18" height="16" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M5 6.5H10M5 10H13M7.68375 16H14.2C15.8802 16 16.7202 16 17.362 15.673C17.9265 15.3854 18.3854 14.9265 18.673 14.362C19 13.7202 19 12.8802 19 11.2V5.8C19 4.11984 19 3.27976 18.673 2.63803C18.3854 2.07354 17.9265 1.6146 17.362 1.32698C16.7202 1 15.8802 1 14.2 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V18.3355C1 18.8684 1 19.1348 1.10923 19.2716C1.20422 19.3906 1.34827 19.4599 1.50054 19.4597C1.67563 19.4595 1.88367 19.2931 2.29976 18.9602L4.68521 17.0518C5.17252 16.662 5.41617 16.4671 5.68749 16.3285C5.9282 16.2055 6.18443 16.1156 6.44921 16.0613C6.74767 16 7.0597 16 7.68375 16Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},r=function(){return'<svg width="21" height="18" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.4541 15.8369V2H0.454102V15.8369H11.992L17.7874 18V15.8369H20.4541ZM2.4541 4H18.4541V13.8614H15.9182L15.9179 15L11.9664 13.8614H2.4541V4Z" fill="white"/>\n <rect x="3.4541" y="6" width="9" height="2" fill="white"/>\n <rect x="14.4541" y="6" width="3" height="2" fill="white"/>\n <rect x="8.4541" y="10" width="9" height="2" fill="white"/>\n <rect x="3.4541" y="10" width="3" height="2" fill="white"/>\n </svg>\n '},c=function(n){return'<svg className=\'icon-play-next\' width="16" height="16" viewBox="0 0 25 25" fill='.concat(n,' xmlns="http://www.w3.org/2000/svg">\n <path d="M14.8837 9.99984L0 0V20L14.8837 9.99984Z" fill=').concat(n,' />\n <rect x="18" width="2" height="20" fill=').concat(n," />\n </svg>")},v=function(){return'<svg width="13" height="13" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.273985 2.30391C-0.124672 1.74341 -0.0882695 0.933084 0.383092 0.418212C0.893733 -0.139565 1.72148 -0.13938 2.23191 0.418626L9.25 8.09082L16.2681 0.418626C16.7785 -0.13938 17.6063 -0.139565 18.1169 0.418212C18.5883 0.933084 18.6247 1.74341 18.226 2.30391L18.1173 2.43852L11.1987 10.0029L18.1169 17.5611C18.5883 18.0759 18.6247 18.8863 18.226 19.4468L18.1173 19.5814C17.6461 20.0965 16.9046 20.1362 16.3916 19.7006L16.2685 19.5818L9.25 11.9155L2.23153 19.5818L2.10835 19.7006C1.59542 20.1362 0.853882 20.0965 0.382714 19.5814L0.273985 19.4468C-0.124672 18.8863 -0.0882694 18.0759 0.383092 17.5611L7.30134 10.0029L0.382714 2.43852L0.273985 2.30391Z" fill="white"/>\n </svg>\n \n '},a=function(){return'<svg width="22" height="20" viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.01316 12.1667L0.25 10.5V15.5L3.01316 14.25V18H15.25V8H3.01316V12.1667ZM7.67057 10.7216C7.53806 10.6283 7.35547 10.7231 7.35547 10.8852V15.1146C7.35547 15.2766 7.53806 15.3714 7.67057 15.2781L10.6757 13.1634C10.7889 13.0838 10.7889 12.916 10.6757 12.8363L7.67057 10.7216Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.25 2H20.25H21.25V3V10H20.25V3H7.25V2ZM17.25 5H4.25V6H17.25V13H18.25V6V5H17.25Z" fill="white"/>\n </svg>\n '},g=function(){return'<svg width="13" height="13" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6169 0.418212C11.0883 0.933084 11.1247 1.74341 10.726 2.30391L10.6173 2.43852L3.69866 10.0029L10.6169 17.5611C11.0883 18.0759 11.1247 18.8863 10.726 19.4468L10.6173 19.5814C10.1461 20.0965 9.40458 20.1362 8.89165 19.7006L8.76847 19.5818L0 10.0039L8.76809 0.418626C9.27852 -0.13938 10.1063 -0.139565 10.6169 0.418212Z" fill="white"/>\n </svg>\n '},p=function(){return'<svg width="28" height="28" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28">\n <path d="M21 10L11 20L7 16" stroke="white" stroke-width="2" fill="none"/>\n </svg>'},L=function(){return'<svg version="1.0" xmlns="http://www.w3.org/2000/svg"\n width="17" height="17" viewBox="0 0 512.000000 512.000000"\n preserveAspectRatio="xMidYMid meet">\n \n <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"\n fill="white" stroke="none">\n <path d="M340 4674 c-46 -20 -77 -50 -103 -99 -22 -40 -22 -45 -25 -754 -3\n -813 -5 -788 72 -859 69 -64 158 -77 238 -36 17 9 232 177 478 374 492 394\n 490 392 490 499 0 60 -23 112 -72 158 -62 60 -863 695 -900 714 -45 23 -128\n 25 -178 3z"/>\n <path d="M2045 4673 c-164 -86 -166 -300 -3 -384 37 -19 73 -19 1382 -17\n l1344 3 44 30 c138 97 118 306 -34 370 -33 13 -189 15 -1370 15 -1195 -1\n -1336 -2 -1363 -17z"/>\n <path d="M2045 3393 c-164 -86 -166 -300 -3 -384 37 -19 73 -19 1382 -17\n l1344 3 44 30 c138 97 118 306 -34 370 -33 13 -189 15 -1370 15 -1195 -1\n -1336 -2 -1363 -17z"/>\n <path d="M340 2114 c-173 -75 -161 -342 18 -394 26 -8 692 -10 2224 -8 l2186\n 3 44 30 c138 97 118 306 -34 370 -33 13 -272 15 -2220 15 -1927 -1 -2187 -3\n -2218 -16z"/>\n <path d="M340 834 c-173 -75 -161 -342 18 -394 26 -8 692 -10 2224 -8 l2186 3\n 44 30 c138 97 118 306 -34 370 -33 13 -272 15 -2220 15 -1927 -1 -2187 -3\n -2218 -16z"/>\n </g>\n </svg>'},f=function(){return'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11.3206 14.3155C11.1375 14.0052 10.8796 13.7456 10.5704 13.5604C10.2613 13.3753 9.91067 13.2705 9.55061 13.2555C9.19055 13.2705 8.83996 13.3753 8.5308 13.5604C8.22163 13.7456 7.96373 14.0052 7.78061 14.3155C7.35864 15.014 7.1356 15.8145 7.1356 16.6305C7.1356 17.4466 7.35864 18.2471 7.78061 18.9455C7.96373 19.2559 8.22163 19.5155 8.5308 19.7007C8.83996 19.8858 9.19055 19.9906 9.55061 20.0055C9.91067 19.9906 10.2613 19.8858 10.5704 19.7007C10.8796 19.5155 11.1375 19.2559 11.3206 18.9455C11.7426 18.2471 11.9656 17.4466 11.9656 16.6305C11.9656 15.8145 11.7426 15.014 11.3206 14.3155V14.3155ZM9.55061 19.0355C8.77061 19.0355 8.11061 17.9355 8.11061 16.6255C8.11061 15.3155 8.77061 14.2155 9.55061 14.2155C10.3306 14.2155 10.9906 15.3155 10.9906 16.6255C10.9906 17.9355 10.3406 19.0355 9.55061 19.0355V19.0355ZM5.21061 20.0055V14.9055L4.73061 15.3855L4.05061 14.7055L5.35061 13.4055C5.41774 13.3382 5.50338 13.2923 5.59664 13.2737C5.68991 13.255 5.78661 13.2645 5.87446 13.301C5.96231 13.3374 6.03737 13.3991 6.09009 13.4783C6.14282 13.5574 6.17084 13.6504 6.17061 13.7455V20.0155L5.21061 20.0055V20.0055ZM21.4106 6.98555V19.5155C21.4089 19.6423 21.3577 19.7634 21.2681 19.853C21.1785 19.9427 21.0574 19.9938 20.9306 19.9955H14.6606V18.0655H19.4806V8.42555H7.91061V10.3555C7.91061 10.8855 7.55061 11.0755 7.11061 10.7855L2.93061 7.99555C2.78952 7.92442 2.68211 7.80061 2.63158 7.65091C2.58105 7.5012 2.59148 7.33762 2.66061 7.19555C2.71811 7.07805 2.81311 6.98305 2.93061 6.92555L7.11061 4.13555C7.55061 3.84555 7.91061 4.03555 7.91061 4.56555V6.49555H20.9206C21.05 6.49746 21.1735 6.54969 21.265 6.64118C21.3565 6.73266 21.4087 6.85618 21.4106 6.98555V6.98555Z" fill="white"/>\n </svg>'};export{g as B,r as C,s as E,n as M,d as N,c as P,t as R,i as S,p as T,C as a,w as b,h as c,e as d,v as e,f,L as g,o as h,a as i,l as j};
|
package/esm/index-4a0d34d8.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{g as s,e as n}from"./skin-ba2be5f8.js";import"@babel/runtime/helpers/toConsumableArray";function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}var u=l.getComponent("Component"),c=function(){r(p,u);var c,m,h=(c=p,m=a(),function(){var e,t=i(c);if(m){var r=i(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function p(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(r=h.call(this,t,o)).playerId=o.playerId,r.mute_state=t.muted()||!1,r.initialiseStructure(),r}return t(p,[{key:"createEl",value:function(){return l.dom.createEl("div",{className:"vjs-custom-big-mute vjs-control ".concat(this.mute_state?"":"hide"," tl")})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s(this.playerId);null!=this&&this.mute_state&&e.classList.toggle("hide"),n(e,"#vjs-icon-big-mute"),e.onclick=function(){var r=null==t?void 0:t.volume();e.classList.toggle("hide"),t.muted()&&t.muted(!1),t.volume(0==r?100:r)},t.on("volumechange",function(){var r=t.volume();t.muted()?(e.classList.toggle("hide"),t.volume(r)):r>0?e.classList.add("hide"):0==r&&e.classList.remove("hide")})}}]),p}();export{c as default};
|
package/esm/index-5d92eaa3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/classCallCheck";import e from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/get";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}var s={startTime:0,timeLive:3600},u=0,p=s.timeLive,c=i.getComponent("Button"),h=i.getComponent("Component"),d=i.getComponent("ProgressControl"),m=d.getComponent("SeekBar"),f=d.getComponent("PlayProgressBar"),v=d.getComponent("LoadProgressBar"),_=i.getComponent("MouseTimeDisplay");v.prototype.update=function(t){var e=this.player_.buffered(),r=this.player_.duration(),o=this.player_.bufferedEnd(),n=this.partEls_,a=function(t,e){var r=t/e||0;return 100*(r>=1?1:r)+"%"};0!==a(o,r)&&(this.el_.style.width=a(o,r));for(var i=0;i<e.length;i++){var l=e.start(i),s=e.end(i),u=n[i];u||(u=this.el_.appendChild(document.createElement("div")),n[i]=u),0!==a(l,o)&&(u.style.left=a(l,o)),0!==a(s-l,o)&&(u.style.width=a(s-l,o))}for(var p=n.length;p>e.length;p--)this.el_.removeChild(n[p-1]);n.length=e.length},m.prototype.update_=function(t,e){var r=this.player_.duration(),o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),r!==Number.POSITIVE_INFINITY&&this.el_.setAttribute("aria-valuetext","-".concat(i.formatTime(r-o,r))),this.bar.update(i.dom.getBoundingClientRect(this.el_),e)},m.prototype.handleMouseMove=function(t){var e=1-this.calculateDistance(t),r=this.player_.seekable().end(0)-e*p;r===this.player_.duration()&&(r-=.1),this.player_.currentTime(r),this.update()},f.prototype.update=function(t,e){var r=this,o=this.player_.duration();this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var n=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),a=i.formatTime(o-n,o);0!==e&&o!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(t,e,"-".concat(a))})},_.prototype.update=function(t,e){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var o=i.formatTime(p-e*p,p);r.el_.style.left="".concat(t.width*e,"px"),0!==e&&r.player_.duration()!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(t,e,"-".concat(o))})};var y=function(t){var e=this;t||(t=s),this.on("timeupdate",function(t){var r,o;(o=(r=e).seekable())&&o.length&&(o.end(0)-r.currentTime()<20?r.controlBar.liveButton.addClass("onair"):r.controlBar.liveButton.removeClass("onair"),r.duration(r.seekable().end(0)),u||(u=p=r.seekable().end(0)))}),this.on("pause",function(t){e.controlBar.liveButton.removeClass("onair")}),this.ready(function(){var r;r=e,i.mergeOptions(s,t),r.addClass("vjs-dvr-seekbar"),r.controlBar.addClass("vjs-dvr-control-bar"),r.controlBar.progressControl.seekBar.__proto__.__proto__.update=function(){if(this.el_){var t;t="VolumeBar"===this.name_?this.getPercent():1-(this.player_.duration()-this.player_.currentTime())/p;var e=this.bar;if(e){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0),t>1&&(t=1);var r=(100*t).toFixed(2)+"%",o=e.el().style;return 0!==t&&(this.vertical()?o.height=r:o.width=r),t}}},r.controlBar.progressControl&&r.controlBar.progressControl.addClass("vjs-dvr-progress-control"),r.controlBar.liveButton=r.controlBar.addChild("liveButton"),r.controlBar.el().insertBefore(r.controlBar.liveButton.el(),r.controlBar.progressControl.el())})},C=function(){o(p,c);var i,s,u=(i=p,s=l(),function(){var t,e=a(i);if(s){var r=a(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return n(this,t)});function p(e,r){var o;return t(this,p),(o=u.call(this,e,r)).el().innerHTML='<span class="liveCircle"></span><span class="liveText">LIVE</span>',e.paused()||o.addClass("onair"),o}return e(p,[{key:"buildCSSClass",value:function(){return"vjs-live-button ".concat(function(t,e,o,n){var i=r(a(1&n?t.prototype:t),e,o);return 2&n&&"function"==typeof i?function(t){return i.apply(o,t)}:i}(p,"buildCSSClass",this,3)([]))}},{key:"handleClick",value:function(t){var e=this.player_.seekable().end(0);this.player_.currentTime(e),this.player_.play()}}]),p}();h.registerComponent("LiveButton",C),(i.registerPlugin||i.plugin)("dvrSeekbar",y);export{y as default};
|
package/esm/index-bfcf213e.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,p as n,d as o}from"./skin-ba2be5f8.js";import{_ as i,b as l}from"./generic-3680ed36.js";import{s as a}from"./autoNextVideo-3c813539.js";import{e as r}from"./icons-699e8cf0.js";import s from"@babel/runtime/helpers/typeof";import d from"video.js";var c,u,m,v,p=[],f=!1,g=function(a,s){var d;if(f=!1,null!=s&&null!==(d=s.series)&&void 0!==d&&d.enable){var c;p=[];var u=l();null==u||u.map(function(t){var n;return(n=p).push.apply(n,e(t.episodes))}),null==s||null===(c=s.series)||void 0===c||c.cb}else{var m,v;p=(null==s||null===(m=s.relatedVideos)||void 0===m?void 0:m.content)||[],null==s||null===(v=s.relatedVideos)||void 0===v||v.cb}var g=t(a);g.on("timeupdate",function(){var e,t;if(!f){var n=Math.floor(g.currentTime()),o=g.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&i()<=(null===(t=p)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}});var y,A=p.filter(function(e,t){return t==i()});if((null==A?void 0:A.length)>0)if(null!==(y=document.getElementsByClassName("next-ep-preview"))&&void 0!==y&&y[0]){var x,w,E,b,C,N,B,L,j,k,P,O;(null===(x=document.getElementsByClassName("next-ep-preview"))||void 0===x?void 0:x[0]).style.visibility="hidden";var I=null===(w=document.getElementsByClassName("next-ep-title"))||void 0===w?void 0:w[0],M=null===(E=document.getElementsByClassName("next-ep-img"))||void 0===E?void 0:E[0],T=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],F=null===(C=A[0])||void 0===C?void 0:C.title;(null===(N=F)||void 0===N?void 0:N.length)>60&&(F=F.substr(0,60)+"..."),I.textContent="".concat(F),M.src=(null===(B=A[0])||void 0===B||null===(L=B.gist)||void 0===L||null===(j=L.imageGist)||void 0===j?void 0:j.r16x9)||(null==A||null===(k=A[0])||void 0===k?void 0:k.img)||(null===(P=window)||void 0===P||null===(O=P.customData)||void 0===O?void 0:O.fallbackImage),T.onclick=function(){return h(a)}}else{var X,R,D,G,S,V,H,_,Q=document.createElement("div");Q.className="next-ep-preview",Q.style.visibility="hidden",document.getElementById(a).append(Q);var U=document.createElement("div");U.className="next-heading-wrapper";var W=document.createElement("div");W.className="next-ep-header",W.textContent="Next up";var Y=document.createElement("div");Y.className="next-ep-close",Y.onclick=function(){Q.style.visibility="hidden",f=!0},Y.appendChild(n(r())),U.append(W),U.append(Y);var q=null===(X=A[0])||void 0===X?void 0:X.title,z=document.createElement("img");z.className="next-ep-img",z.src=(null===(R=A[0])||void 0===R||null===(D=R.gist)||void 0===D||null===(G=D.imageGist)||void 0===G?void 0:G.r16x9)||(null==A||null===(S=A[0])||void 0===S?void 0:S.img)||(null===(V=window)||void 0===V||null===(H=V.customData)||void 0===H?void 0:H.fallbackImage);var J=document.createElement("div");J.className="next-ep-title",(null===(_=q)||void 0===_?void 0:_.length)>60&&(q=q.substr(0,60)+"..."),J.textContent="".concat(q);var K=document.createElement("div");K.className="next-ep-content",K.append(z),K.append(J),K.onclick=o(function(){null==Q||Q.remove(),f=!0,h(a)},400),Q.append(U),Q.append(K)}},h=function(e,n){var o=t(e),l=Math.floor(o.currentTime());if(Math.floor(o.duration())!=l){o.pause(e);var r=i();a(r,e,p)}};function y(e,n){var o=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var l=document.createElement("div");l.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",l.append(a),o.el().appendChild(l),o.on("useractive",function(){l.classList.remove("vjs-fade")}),o.on("userinactive",function(){o.paused()||l.classList.add("vjs-fade")}),o.on("fullscreenchange",function(){o.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"})}}c={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},u=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},m=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},v=function e(t){return"HTML"!==t.nodeName&&"static"===m(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",function(e){var t,n,o,i,l,a,r,s;function d(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",d),s()}n=u({},c,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),t.appendChild(o),o.src=n[0].src,o.className="vjs-thumbnail",u(o.style,n[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",function(e){a=i.duration()}),i.on("loadedmetadata",function(e){a=i.duration()}),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,s,d,c,p,f,g,h,y;for(r in s=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=v(l.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),d=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,d-=v(l.el()).getBoundingClientRect().left+h,i=Math.floor((d-l.el().offsetLeft)/l.width()*a),n)i>r&&(s=Math.max(s,r));(c=n[s]).src&&o.src!=c.src&&(o.src=c.src),c.style&&o.style!=c.style&&u(o.style,c.style),d+(g=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=m(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(o,c.width||n[0].width)/2)>f?d-=d+g-f:d<g&&(d=g),t.style.left=d+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",d)}),s=function(e){t.style.left="-1000px"},l.on("mouseout",s),l.on("touchcancel",s),l.on("touchend",s),i.on("userinactive",s)});export{g as a,y as b};
|
package/esm/index-e48de850.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./index-bfcf213e.js";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{t as r,g as n}from"./skin-ba2be5f8.js";import i from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/helpers/slicedToArray";import{e as u}from"./generic-3680ed36.js";function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l="my-player";function c(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function p(){return(p=e(t.mark(function e(r){var n,i,u,o,s,l,c,p,d,m,f,b,g,v,h,x,y,w,k,E,j,N,A,T;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return i=e.sent,e.next=11,createImageBitmap(i);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=a(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,m=[],f=0;f<l;f++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,f*d,p,d,0,0,p,d),v=g.toDataURL("image/png"),m.push({uri:v,duration:r.duration}),r._tiles=m;return e.abrupt("return",m);case 20:for(e.prev=20,e.t0=e.catch(2),h=r.layout.split("x").map(Number),x=a(h,2),y=x[0],w=x[1],k=[],E=0;E<y*w;E++)k.push({uri:null===(j=window)||void 0===j||null===(N=j.app_data)||void 0===N||null===(A=N.appcmsMain)||void 0===A||null===(T=A.images)||void 0===T?void 0:T.placeholderCover,duration:r.duration});return e.abrupt("return",k);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function d(e,t){return m.apply(this,arguments)}function m(){return(m=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",c(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function f(e,t,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=n(l);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,s=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),r),c=t[s];c&&!c.loading&&(c.loading=!0,function(e){return p.apply(this,arguments)}(c).then(function(e){var t=e[c.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),c.loading=!1,c.src=t.uri}))}}function b(e){return g.apply(this,arguments)}function g(){return(g=e(t.mark(function e(n){var u,o,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={},n.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),n=a(r,2),o=n[0]*n[1],l=e.duration,c=0;c<o;c++){var p,d=Math.round((t*o+c)*l);u[d]=s(s({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},i(p,"left","-60px"),i(p,"border","1px solid transparent"),i(p,"borderRadius","4px"),p)})}}),o=Object.keys(u).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r(function(e){return f(e,u,o)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r(function(e){return f(e,u,o)},500))}),e.abrupt("return",u);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var v=function(){var r=e(t.mark(function e(r,n){var i,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return i=e.sent,e.next=5,i.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=a(t,2),n=r[0],i=r[1];n&&i&&(l[n.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function x(e,t){return y.apply(this,arguments)}function y(){return(y=e(t.mark(function e(r,i){var o,s,c,p,d,m,f,b,g,v,x,y,E,j,N,A,T,O,I,S,M,P,R,$,B,D,L,U,C,X,q,_,F,W,z,G,H,J,K,Q,V,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,me,fe;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=i,o=n(i),s=r.split("/"),c=s.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?s.slice(0,c+1).join("/"):new URL(r).origin),e.prev=5,e.next=8,fetch(r);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),y=(null==o?void 0:o.duration())||(null===(d=u())||void 0===d||null===(m=d.video)||void 0===m?void 0:m.runtime),E=(null==x||null===(f=x.querySelector("MPD > BaseURL"))||void 0===f?void 0:f.textContent)||p+"/",j=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<j.length)){e.next=72;break}if(("image"!==(A=j[N]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(O=A.getElementsByTagName("SegmentTemplate")[0],I=null===(T=O.getElementsByTagName("SegmentTimeline"))||void 0===T?void 0:T[0],!O||!I){e.next=48;break}if(P=I.getElementsByTagName("S"),R=parseInt(null===(S=P[0])||void 0===S?void 0:S.getAttribute("t")),$=parseInt(null===(M=P[0])||void 0===M?void 0:M.getAttribute("d")),B=A.getElementsByTagName("Representation")[0],D=B.getElementsByTagName("EssentialProperty")[0],L=D.getAttribute("value"),U=null==L?void 0:L.split("x"),C=a(U,2),X=C[0],q=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?$/_:$)/(X*q),W=B.getAttribute("id"),z=Math.round(y/F),G=Math.ceil(z/(X*q)),H=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(J=[],N=0;N<G;N++)Q="/"==(K=H)[0]?new URL(p).origin:p+"/",J.push({duration:F,layout:L,uri:Q+K.replace("$Time$",R+N*$).replace("$RepresentationID$",W)});return e.abrupt("return",J);case 46:e.next=69;break;case 48:if(V=A.getElementsByTagName("Representation")[0],Y=V.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=a(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ae=O.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=V.getAttribute("id"),se=Math.round(y/ue),le=Math.ceil(se/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],me=w(ce),N=0;N<le;N++)fe=me?k(me,N+pe):ce,de.push({duration:ue,layout:Z,uri:E+fe.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function w(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function E(e){return j.apply(this,arguments)}function j(){return(j=e(t.mark(function e(r){var i,a,u,o,s,l,c,p,m,f,g,h,y,w,k;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=n(r),l=s.currentSource(),c=l.src,c=null!==(i=c)&&void 0!==i&&i.includes("blob")?null==s||null===(a=s.getSource)||void 0===a?void 0:a.call(s):c,null===(u=c)||void 0===u||!u.includes("m3u8")){e.next=19;break}return e.next=6,d(c,r);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return m=(null==p?void 0:p[0])||null,f=m.uri,g=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,v(g,f);case 12:return h=e.sent,e.next=15,b(h);case 15:y=e.sent,s.thumbnails(y);case 17:e.next=28;break;case 19:if(null===(o=c)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,x(c,r);case 22:if(!((null==(w=e.sent)?void 0:w.length)>0)){e.next=28;break}return e.next=26,b(w);case 26:k=e.sent,s.thumbnails(k);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}export{E as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n={},o=function(o){n=o},r=function(o){var r;return(null===(r=n)||void 0===r?void 0:r[o])||""};export{r as g,o as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{i as n,e as i,j as l}from"./icons-699e8cf0.js";import{M as c,J as m}from"./generic-3680ed36.js";import{j as d,s as p,l as u}from"./skin-ba2be5f8.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-028eb0f5.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var h=s.getComponent("Component"),f=function(){r(g,h);var f,y,b=(f=g,y=v(),function(){var e,t=a(f);if(y){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function g(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(r=b.call(this,t,o)).playerId=o.playerId,r.seriesData=o.sres,r.streams=o.streams,r.currentVideoData=o.res,r.initialiseStructure(),r.loadCSS(),r}return t(g,[{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(n())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-b7cec0cf.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 o;null!==(o=r.classList)&&void 0!==o&&o.contains("hidden")?(d(),r.classList.remove("hidden"),t.classList.add("open"),p(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var a=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(a,"px"),o.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),o=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var n=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),p=s.dom.createEl("div",{className:"stream-tray"}),v=function(e){var r,o,a,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(n.classList.add("selected"),n.style.border="2px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),o=0;o<r.length;o++)r[o].style.border="none",r[o].classList.remove("selected");n.classList.add("selected"),n.style.border="2px solid #D2393B",c(t.playerId,t.streams[e].id).then(function(e){m(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var i=document.createElement("img");i.className="stream-thumbnail-image",i.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),n.append(i),s.dom.appendContent(p,n),s.dom.appendContent(d,p)},h=0;h<this.streams.length;h++)v(h);s.dom.appendContent(o,a),s.dom.appendContent(o,n),s.dom.appendContent(e,o),s.dom.appendContent(e,d),u(this.playerId,e)}}]),g}();export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{i as s,e as i,j as l}from"./icons-699e8cf0.js";import{M as c,J as m}from"./generic-3680ed36.js";import{j as d,g as p}from"./skin-ba2be5f8.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-028eb0f5.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}var h=n.getComponent("Component"),v=function(){r(b,h);var v,f,y=(v=b,f=u(),function(){var e,t=a(v);if(f){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function b(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,b),(r=y.call(this,t,o)).playerId=o.playerId,r.seriesData=o.sres,r.streams=o.streams,r.currentVideoData=o.res,r.initialiseStructure(),r.loadCSS(),r}return t(b,[{key:"createEl",value:function(){var e=n.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=n.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return n.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-1fb5149a.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=n.dom.createEl("div",{className:"stream-container hidden"});n.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(d(),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 o=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),r.style.overflow="hidden",n.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),o=n.dom.createEl("div",{className:"stream-selector-head"}),a=n.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var s=n.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=n.dom.createEl("div",{className:"stream-selector-content"}),u=n.dom.createEl("div",{className:"stream-tray"}),h=function(e){var r,o=n.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(o.classList.add("selected"),o.style.border="4px solid #D2393B"),o.onclick=function(){for(var r=n.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");o.classList.add("selected"),o.style.border="4px solid #D2393B",c(t.playerId,t.streams[e].id).then(function(e){m(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},o.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",o.append(a),n.dom.appendContent(u,o),n.dom.appendContent(d,u)},v=0;v<this.streams.length;v++)h(v);n.dom.appendContent(o,a),n.dom.appendContent(o,s),n.dom.appendContent(e,o),n.dom.appendContent(e,d),p(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")})}}]),b}();export{v as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-699e8cf0.js";import{M as s,h as a}from"./generic-3680ed36.js";import{f as d}from"./skin-ba2be5f8.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-028eb0f5.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var c=r.getComponent("Component"),m=function(){n(m,c);var s,a,d=(s=m,a=p(),function(){var e,t=i(s);if(a){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function m(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(n=d.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(m,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then(function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",function(){r.dom.removeClass(t,"nextepisode-hidden")}),t.addEventListener("mouseover",function(){r.dom.removeClass(t,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){r.dom.addClass(t,"nextepisode-hidden")}),t.addEventListener("mouseout",function(){r.dom.addClass(t,"nextepisode-hidden")})}}]),m}(),u=function(e,t){var n=v(e,t.video.gist.id),o=h(e[n],t.video.gist.id),i=f(e[n],o);x(i.nextEp)},v=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach(function(e,o){e.gist.id===t&&(n=o)}),n):null},x=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t;s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).then(function(e){a(e.response)})};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),c=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=c&&c.firstChild;)null==p||p.appendChild(c.firstChild)};export{m as default,u as initaliseFunctionality};
|
package/esm/playlist-eeffdf32.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-699e8cf0.js";import{M as c,a0 as d}from"./generic-3680ed36.js";import{a as p}from"./autoNextVideo-3c813539.js";import{j as m,g as u}from"./skin-ba2be5f8.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-028eb0f5.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-cdb41ade.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var y=a.getComponent("Component"),h=function(){n(g,y);var h,f,b=(h=g,f=v(),function(){var e,t=i(h);if(f){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return l(this,e)});function g(e){var o,n,l,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),(i=b.call(this,e,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=null==a||null===(o=a.playlist)||void 0===o?void 0:o.content,i.cb=(null==a||null===(n=a.playlist)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==a||null===(l=a.playlist)||void 0===l?void 0:l.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&p({playerId:i.playerId,content:i.videos,cb:i.cb}),i}return o(g,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.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=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(m(),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 o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),a.dom.appendContent(e,t),o.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var o=this,n=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var n,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(n=o.videos[t])||void 0===n?void 0:n.title)||"")}),m=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(o.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,m),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=o.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(o.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(p,i),u.onclick=function(e){e.stopPropagation(),d(t+1),c(o.playerId,o.videos[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})},s.onclick=function(t){var o,n,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(o=s.classList)&&void 0!==o&&o.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(n=s.classList)||void 0===n||n.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),u(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(o.playerId);if(e){var n=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px")}})}}]),g}();export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as l}from"./skin-ba2be5f8.js";var i=function(i){var n,o=l(i),e=[];if((null==o||null===(n=o.tech_)||void 0===n?void 0:n.vhs)||!1){var t,d,v=null==o||null===(t=o.tech_)||void 0===t||null===(d=t.vhs)||void 0===d?void 0:d.representations();(null==v?void 0:v.length)>0&&(e=null==v?void 0:v.sort(function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)}))}else{var u,h,r=null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h?void 0:h.getRepresentationsByType("video");(null==r?void 0:r.length)>0&&(e=null==r?void 0:r.sort(function(l,i){return i.height-l.height}))}return e};export{i as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import d from"@babel/runtime/helpers/getPrototypeOf";import l from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{g as r,p as c}from"./skin-ba2be5f8.js";import{d as u}from"./browser-de5f6a74.js";function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var m=s.getComponent("Component"),p=function(){o(f,m);var r,p,g=(r=f,p=h(),function(){var e,t=d(r);if(p){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function f(n){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,f),o=g.call(this,n,a),l(i(o),"masterRenditions",[]),l(i(o),"addCustomFont",function(e){var t=s.dom.createEl("div",{className:"font hideCustomFonts"}),n=s.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});s.dom.appendContent(t,n);var i=s.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",o.fontSizeOptions.map(function(e,t){var n=s.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",function(e){var t=e.target.id;o.changeFontSize(t)}),s.dom.appendContent(i,n)}),s.dom.appendContent(t,i),s.dom.appendContent(e,t)}),l(i(o),"resetRenditions",function(){e(document.getElementsByClassName("rendition")).map(function(e){s.dom.removeClass(e,"selected")})}),o.playerId=null==a?void 0:a.playerId,o.skin=null==a?void 0:a.skin,o.icon=null==a?void 0:a.icon,o.masterRenditions=[],o.fontSizeOptions=[10,12,14],o.createRenditions(a.renditions),window.height=null,o}return n(f,[{key:"toggleContentOnHover",value:function(e,t){var n=s.dom.$(".setting-icon",e);n.addEventListener("mouseover",function(){s.dom.removeClass(t,"resolution_hidden")}),t.addEventListener("mouseover",function(){s.dom.removeClass(t,"resolution_hidden")}),n.addEventListener("mouseout",function(){s.dom.addClass(t,"resolution_hidden")}),t.addEventListener("mouseout",function(){s.dom.addClass(t,"resolution_hidden")})}},{key:"changeFontSize",value:function(e){var t=s.dom.$(".renditions",this.contentEl()),n=s.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el(),i=s.dom.$(".setting-icon",this.el()),o=c(this.icon);if(i.append(o),"live"===this.skin){var a=document.createTextNode(" Settings");i.appendChild(a)}var d=s.dom.createEl("div",{className:"content resolution_hidden"}),l=s.dom.createEl("div",{innerHTML:"Quality",className:"title"}),r=s.dom.createEl("div",{className:"resolution"});s.dom.appendContent(r,l),this.toggleContentOnHover(n,d);var h=s.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map(function(e,n){var i,o,a=s.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes.BANDWIDTH))/1048576).toFixed(1),l="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");l="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var r=s.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});s.dom.appendContent(a,r),s.dom.appendContent(h,a),r.addEventListener("click",function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,v(t.playerId,e.target),s.dom.addClass(r,"selected"))})}),this.addAutoRendition("nondrm",h),"Safari"!=u()&&this.addDynamicSwitchIfAuto()):(e.map(function(e,n){var i=s.dom.createEl("div",{className:"relative"}),o=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(o,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=s.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});s.dom.appendContent(i,d),s.dom.appendContent(h,i),d.addEventListener("click",function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,v(t.playerId,e.target),s.dom.addClass(d,"selected"))})}),this.addAutoRendition("drm",h)),s.dom.appendContent(r,h),s.dom.appendContent(d,r),s.dom.appendContent(n,d)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null;e&&e.on("cuechange",function(){var t,n,o=e.activeCues[0];if(console.log((null==o||null===(t=o.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),o&&document.querySelector(".auto.selected")){var a,d,l,s,r,c,u,h;if(null!=o&&null!==(a=o.value)&&void 0!==a&&null!==(d=a.resolution)&&void 0!==d&&d.height&&i!==(null==o||null===(l=o.value)||void 0===l||null===(s=l.resolution)||void 0===s?void 0:s.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==o||null===(u=o.value)||void 0===u||null===(h=u.resolution)||void 0===h?void 0:h.height,"p");i=null==o||null===(r=o.value)||void 0===r||null===(c=r.resolution)||void 0===c?void 0:c.height}})}},{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"container"}),t=s.dom.createEl("div",{className:"setting-icon"});return s.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,o,a,d,l=null===(i=this.player_)||void 0===i||null===(o=i.tech_)||void 0===o?void 0:o.vhs.selectPlaylist().attributes.RESOLUTION.height,r=null===(a=this.player_)||void 0===a||null===(d=a.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=s.dom.createEl("div",{className:"relative"}),u=s.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:r,res:l});u.addEventListener("click",function(e){window.height!==e.target.res&&(n.resetRenditions(),s.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,v(n.playerId,null,!0))}),s.dom.appendContent(c,u),s.dom.appendContent(t,c)}else{var h=s.dom.createEl("div",{className:"relative"}),m=s.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",function(e){n.resetRenditions(),s.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,v(n.playerId,null,!0)}),s.dom.appendContent(h,m),s.dom.appendContent(t,h)}}}]),f}(),v=function(e,t,n){var i,o=r(e),a=null==t?void 0:t.bandwidth;if((null==o||null===(i=o.tech_)||void 0===i?void 0:i.vhs)||!1){o.tech_.vhs.representations().forEach(function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)}),o.handleTechPlaying_();var d=o.currentTime();o.currentTime(0),setTimeout(function(){o.currentTime(d)},100);var l=s.dom.$(".content");l&&s.dom.addClass(l,"resolution_hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var m,p,v,g;null==o||null===(m=o.dash)||void 0===m||null===(p=m.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==o||null===(v=o.dash)||void 0===v||null===(g=v.mediaPlayer)||void 0===g||g.setRepresentationForTypeByIndex("video",c,!0);var f=o.currentTime();o.currentTime(0),setTimeout(function(){o.currentTime(f)},100);var w=s.dom.$(".content");w&&s.dom.addClass(w,"resolution_hidden")}}};export{p as default,v as playSelectedResolution};
|
package/esm/series-e628566d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{a4 as d,K as p,M as u,h as v,J as m}from"./generic-3680ed36.js";import{E as f}from"./icons-699e8cf0.js";import{f as h}from"./skin-ba2be5f8.js";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-028eb0f5.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";var g=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var y,C=c.getComponent("Component"),w=function(){s(d,C);var e,l,c=(e=d,l=b(),function(){var i,t=o(e);if(l){var n=o(this).constructor;i=Reflect.construct(t,arguments,n)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,s),a(n(t),"seriesData",[]),t.seriesData=s.seriesData,y=s.playerId,j(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}]),d}();function L(){return(L=e(l.mark(function e(i,t,n,s){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:p(y),g(y),u(y,t).then(function(e){v(e.response),m(y)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function k(e,i,t,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;for(var a=e.episodes.map(function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")}).join("");null!=o&&o.firstChild;)o.removeChild(o.firstChild);for(var l=h(a);null!=l&&l.firstChild;)o.appendChild(l.firstChild);!function(e){d(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(s,r)});for(var g=function(i){c[i].addEventListener("click",function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach(function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))})}(i,p[i],p)}),u[i].addEventListener("click",function(){return function(e,i,t,n){return L.apply(this,arguments)}(i,f[i].id,t,p)}),e.episodes[i].id==m&&p[i].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function j(e,i){for(var t='<div class="hover-div"></div>\n '.concat(f(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=h(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{j as customSeasonList,k as handleSeasonChange,w as seriesModule};
|