@viewlift/player-backup 2.0.245-backup → 2.0.247-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-31632a47.js → autoNextVideo-3e25079f.js} +1 -1
- package/cjs/autoNextVideo-3f809544.js +1 -0
- package/cjs/bundle.css +290 -290
- package/cjs/{features-afcf5f89.js → features-0573b575.js} +1 -1
- package/cjs/features-3075686f.js +1 -0
- package/cjs/generic-bd276b1c.js +1 -0
- package/cjs/{generic-e9e83eb5.js → generic-db870227.js} +1 -1
- package/cjs/{index-5caebf02.js → index-0846373f.js} +1 -1
- package/cjs/{index-421789c6.js → index-31665601.js} +1 -1
- package/cjs/{index-ffee11a7.js → index-3d298e2f.js} +1 -1
- package/cjs/index-88ede636.js +1 -0
- package/cjs/index-a56e6e97.js +1 -0
- package/cjs/index-e69c4d12.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-5fa7ed99.js → multicamv2-20f77ea3.js} +1 -1
- package/cjs/{multicamv2-e3f39fce.js → multicamv2-60804a5a.js} +1 -1
- package/cjs/multicamv2-618a3488.js +1 -0
- package/cjs/multicamv2-e98cd858.js +1 -0
- package/cjs/{nextEpisodeButton-462b4538.js → nextEpisodeButton-188b8505.js} +1 -1
- package/cjs/nextEpisodeButton-efaef124.js +1 -0
- package/cjs/playlist-288b36fb.js +1 -0
- package/cjs/{playlist-d00b3aa7.js → playlist-abe34c5f.js} +1 -1
- package/cjs/series-be5395f4.js +1 -0
- package/cjs/{series-f140d0cd.js → series-e3c1b68d.js} +1 -1
- package/cjs/series-v2-202c0bcd.js +1 -0
- package/cjs/{series-v2-eae86d9d.js → series-v2-992dd942.js} +1 -1
- package/cjs/{series-v2-4ce6a247.js → series-v2-b3d8e38a.js} +1 -1
- package/cjs/series-v2-f4d303b4.js +1 -0
- package/cjs/skin-01d1804e.js +1 -0
- package/cjs/{skin-b3e5715e.js → skin-10b1b9d6.js} +1 -1
- package/cjs/skin-16525261.js +1 -0
- package/cjs/skin-2aecc301.js +1 -0
- package/cjs/skin-344858a6.js +1 -0
- package/cjs/{skin-d9c9e78e.js → skin-44ef8cae.js} +1 -1
- package/cjs/{skin-20581d39.js → skin-5551ded0.js} +1 -1
- package/cjs/skin-73c905b7.js +1 -0
- package/cjs/skin-95761897.js +1 -0
- package/cjs/{skin-33ffc786.js → skin-95b88521.js} +1 -1
- package/cjs/skin-96f16826.js +1 -0
- package/cjs/skin-a5aaed13.js +1 -0
- package/cjs/{skin-57df04e3.js → skin-a5cf45e1.js} +1 -1
- package/cjs/{skin-bfadff7e.js → skin-a9bf21c4.js} +1 -1
- package/cjs/{skin-a567180e.js → skin-b8ede192.js} +1 -1
- package/cjs/skin-dc87da0a.js +1 -0
- package/cjs/{skin-41a39c9f.js → skin-df701f7f.js} +1 -1
- package/cjs/{skin-39094707.js → skin-e3457edf.js} +1 -1
- package/cjs/{util-23477a9d.js → util-7b5b2c77.js} +1 -1
- package/cjs/util-d9e258bf.js +1 -0
- package/cjs/{videoSelector-ba3317d4.js → videoSelector-2d53cc1d.js} +1 -1
- package/cjs/videoSelector-4ffd5a12.js +1 -0
- package/cjs/{videoSelector-b630eb37.js → videoSelector-62ab8ed2.js} +1 -1
- package/cjs/videoSelector-9ce46476.js +1 -0
- package/esm/apis/index.d.ts +4 -4
- package/esm/{autoNextVideo-7cd73368.js → autoNextVideo-9a0074f4.js} +1 -1
- package/esm/autoNextVideo-9b006590.js +1 -0
- package/esm/bundle.css +290 -290
- package/esm/{features-d25efa02.js → features-ac78c223.js} +1 -1
- package/esm/features-fa90046e.js +1 -0
- package/esm/generic-dbe94914.js +1 -0
- package/esm/{generic-0a938df9.js → generic-eed0af74.js} +1 -1
- package/esm/helpers/token.d.ts +1 -1
- package/esm/{index-f5a39854.js → index-14888a28.js} +1 -1
- package/esm/{index-249b9f3a.js → index-69be687b.js} +1 -1
- package/esm/{index-c9b25d09.js → index-9f525e66.js} +1 -1
- package/esm/index-b4fb7a5c.js +1 -0
- package/esm/index-be403bb6.js +1 -0
- package/esm/index-eae12758.js +1 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-61bd41c5.js → multicamv2-31675dca.js} +1 -1
- package/esm/multicamv2-c0b4abc7.js +1 -0
- package/esm/multicamv2-d0fe2c7f.js +1 -0
- package/esm/{multicamv2-d414c131.js → multicamv2-d89508e4.js} +1 -1
- package/esm/{nextEpisodeButton-05fb8271.js → nextEpisodeButton-3bf82897.js} +1 -1
- package/esm/nextEpisodeButton-698ce4c6.js +1 -0
- package/esm/{playlist-ee357a1d.js → playlist-0842f1ca.js} +1 -1
- package/esm/playlist-c809965d.js +1 -0
- package/esm/series-0ff36602.js +1 -0
- package/esm/{series-f0936cd2.js → series-91a0cd74.js} +1 -1
- package/esm/series-v2-3e4241a8.js +1 -0
- package/esm/series-v2-b66afeb3.js +1 -0
- package/esm/{series-v2-39fc995a.js → series-v2-d49ccbd1.js} +1 -1
- package/esm/{series-v2-dc219490.js → series-v2-f35a7d27.js} +1 -1
- package/esm/skin-07b609c0.js +1 -0
- package/esm/skin-0a0fe3ed.js +1 -0
- package/esm/skin-195c7758.js +1 -0
- package/esm/{skin-d7f61371.js → skin-287e5953.js} +1 -1
- package/esm/skin-28f45364.js +1 -0
- package/esm/{skin-4a563d57.js → skin-41a7f5fa.js} +1 -1
- package/esm/skin-51741347.js +1 -0
- package/esm/{skin-a2274798.js → skin-5b6fb562.js} +1 -1
- package/esm/{skin-55b70667.js → skin-5fc6f58c.js} +1 -1
- package/esm/{skin-ef4598fa.js → skin-6125d53d.js} +1 -1
- package/esm/skin-6ffc3b84.js +1 -0
- package/esm/{skin-69a9824b.js → skin-83b7a717.js} +1 -1
- package/esm/skin-9b185c6a.js +1 -0
- package/esm/{skin-6cb82250.js → skin-a51b0f57.js} +1 -1
- package/esm/{skin-cea752b9.js → skin-b92d8974.js} +1 -1
- package/esm/skin-ce2f84f3.js +1 -0
- package/esm/skin-ebf173d2.js +1 -0
- package/esm/{skin-79d3dc5f.js → skin-ff5872e2.js} +1 -1
- package/esm/{util-162dbf37.js → util-94c4875d.js} +1 -1
- package/esm/util-a4c82afd.js +1 -0
- package/esm/videoSelector-377bee87.js +1 -0
- package/esm/{videoSelector-2ffa4817.js → videoSelector-795f5619.js} +1 -1
- package/esm/{videoSelector-4bdec7cb.js → videoSelector-b784ee49.js} +1 -1
- package/esm/videoSelector-f2266ef1.js +1 -0
- package/package.json +3 -3
- package/cjs/autoNextVideo-7c491841.js +0 -1
- package/cjs/autoNextVideo-ff0d1de3.js +0 -1
- package/cjs/browser-77c57718.js +0 -1
- package/cjs/caption-settings-be714e97.js +0 -1
- package/cjs/captions-07bd3069.js +0 -1
- package/cjs/features-16937305.js +0 -1
- package/cjs/features-93cd6de4.js +0 -1
- package/cjs/generic-29417780.js +0 -1
- package/cjs/generic-f723dacd.js +0 -1
- package/cjs/icons-1a3febef.js +0 -1
- package/cjs/index-10d97ab9.js +0 -1
- package/cjs/index-4e9d8827.js +0 -1
- package/cjs/index-6bc2d039.js +0 -1
- package/cjs/index-ff85bd1e.js +0 -1
- package/cjs/multicamv2-25acee8c.js +0 -1
- package/cjs/multicamv2-49af2bae.js +0 -1
- package/cjs/multicamv2-6006b5a5.js +0 -1
- package/cjs/multicamv2-ec232dbd.js +0 -1
- package/cjs/nextEpisodeButton-05a96016.js +0 -1
- package/cjs/nextEpisodeButton-ee1f4e87.js +0 -1
- package/cjs/playlist-2889487d.js +0 -1
- package/cjs/playlist-8b12d044.js +0 -1
- package/cjs/renditions-fed22c12.js +0 -1
- package/cjs/resolution-e46c9615.js +0 -1
- package/cjs/series-4b9888dd.js +0 -1
- package/cjs/series-8bd07d22.js +0 -1
- package/cjs/series-v2-68886cd2.js +0 -1
- package/cjs/series-v2-719c957a.js +0 -1
- package/cjs/series-v2-7d183e67.js +0 -1
- package/cjs/series-v2-a532b003.js +0 -1
- package/cjs/series-v2-b7f70c84.js +0 -1
- package/cjs/settings-icon-70f8857a.js +0 -1
- package/cjs/skin-25191a17.js +0 -1
- package/cjs/skin-3544db58.js +0 -1
- package/cjs/skin-42117529.js +0 -1
- package/cjs/skin-585353b3.js +0 -1
- package/cjs/skin-7afabe4c.js +0 -1
- package/cjs/skin-7f58ba4c.js +0 -1
- package/cjs/skin-87c06e34.js +0 -1
- package/cjs/skin-91814213.js +0 -1
- package/cjs/skin-999521e6.js +0 -1
- package/cjs/skin-9bfe9316.js +0 -1
- package/cjs/skin-c1400489.js +0 -1
- package/cjs/skin-cf53c6f8.js +0 -1
- package/cjs/skin-df2070f9.js +0 -1
- package/cjs/skin-f0486679.js +0 -1
- package/cjs/util-ef2cd61e.js +0 -1
- package/cjs/videoSelector-239532a4.js +0 -1
- package/cjs/videoSelector-642f00ed.js +0 -1
- package/cjs/videoSelector-9b5a4625.js +0 -1
- package/cjs/videoSelector-f17b0749.js +0 -1
- package/cjs/videojs_contrib_dash-018c8bde.js +0 -1
- package/esm/autoNextVideo-3d6570ee.js +0 -1
- package/esm/autoNextVideo-d682e36c.js +0 -1
- package/esm/browser-d4613b36.js +0 -1
- package/esm/caption-settings-370d8b1e.js +0 -1
- package/esm/captions-b7fd8308.js +0 -1
- package/esm/features-20d7893f.js +0 -1
- package/esm/features-3fc61a30.js +0 -1
- package/esm/generic-715a7738.js +0 -1
- package/esm/generic-79a719c8.js +0 -1
- package/esm/icons-3bd3bd8f.js +0 -1
- package/esm/index-0ce0e085.js +0 -1
- package/esm/index-4a04166e.js +0 -1
- package/esm/index-a7fcd7f8.js +0 -1
- package/esm/index-d42cceca.js +0 -1
- package/esm/multicamv2-1297de0f.js +0 -1
- package/esm/multicamv2-2f2829fb.js +0 -1
- package/esm/multicamv2-bed3a0bc.js +0 -1
- package/esm/multicamv2-c6e6cb68.js +0 -1
- package/esm/nextEpisodeButton-38661562.js +0 -1
- package/esm/nextEpisodeButton-b348d4b4.js +0 -1
- package/esm/playlist-0c95a577.js +0 -1
- package/esm/playlist-c13c7244.js +0 -1
- package/esm/renditions-4c09c626.js +0 -1
- package/esm/resolution-920515d1.js +0 -1
- package/esm/series-090e7c85.js +0 -1
- package/esm/series-97434a7c.js +0 -1
- package/esm/series-v2-04e9add7.js +0 -1
- package/esm/series-v2-81f04cd5.js +0 -1
- package/esm/series-v2-8a8b6f0c.js +0 -1
- package/esm/series-v2-a1083c40.js +0 -1
- package/esm/series-v2-a8491399.js +0 -1
- package/esm/settings-icon-a98e5d8b.js +0 -1
- package/esm/skin-2a1e18f9.js +0 -1
- package/esm/skin-2f85dae8.js +0 -1
- package/esm/skin-3ae22d7d.js +0 -1
- package/esm/skin-55857acc.js +0 -1
- package/esm/skin-58b9263c.js +0 -1
- package/esm/skin-76430de3.js +0 -1
- package/esm/skin-8ceddbe1.js +0 -1
- package/esm/skin-a2bc9871.js +0 -1
- package/esm/skin-bff9e3fe.js +0 -1
- package/esm/skin-d555b116.js +0 -1
- package/esm/skin-d93bcc9b.js +0 -1
- package/esm/skin-ddd25096.js +0 -1
- package/esm/skin-e4b35c14.js +0 -1
- package/esm/skin-fdb749ad.js +0 -1
- package/esm/util-80257541.js +0 -1
- package/esm/videoSelector-1cf43fc8.js +0 -1
- package/esm/videoSelector-3ebdf49e.js +0 -1
- package/esm/videoSelector-47ad19c9.js +0 -1
- package/esm/videoSelector-c94910d2.js +0 -1
- package/esm/videojs_contrib_dash-f7d94714.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as n,f as t,R as i,Q as o,S as a}from"./generic-79a719c8.js";import{a as e}from"./util-80257541.js";import{g as c,h as s}from"./skin-58b9263c.js";var u,r=0,f=0,l=function(l){clearTimeout(r);var v=null==l?void 0:l.content;u=null==l?void 0:l.cb;var d=l.playerId;e(d,function(){var e=c(d);0!==(null==e?void 0:e.currentTime())&&((f=o())>v.length-1||(a(f+1),n(d,v[f].id).then(function(n){s(f,d),t(n.response),f++,h(n)}).catch(function(n){h(n),s(f,d),f++,r=setTimeout(function(){i(d)&&m(f,d,v)},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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as n,f as t,S as i,R as o,T as a}from"./generic-715a7738.js";import{a as e}from"./util-80257541.js";import{g as c,h as s}from"./skin-58b9263c.js";var u,r=0,f=0,l=function(l){clearTimeout(r);var v=null==l?void 0:l.content;u=null==l?void 0:l.cb;var d=l.playerId;e(d,function(){var e=c(d);0!==(null==e?void 0:e.currentTime())&&((f=o())>v.length-1||(a(f+1),n(d,v[f].id).then(function(n){s(f,d),t(n.response),f++,h(n)}).catch(function(n){h(n),s(f,d),f++,r=setTimeout(function(){i(d)&&m(f,d,v)},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-d4613b36.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},n=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};export{e as d,n 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,f as c}from"./icons-3bd3bd8f.js";import{g as l,d as s,e as d}from"./captions-b7fd8308.js";import{e as p,s as m,f as u,j as v}from"./skin-58b9263c.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-b7fd8308.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t}from"./skin-58b9263c.js";var e=function(e,n){var a,s,r;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(s=a[0])||void 0===s||null===(r=s.style)||void 0===r||r.setProperty("display","flex"));for(var i=t(e).textTracks(),l=0;l<i.length;l++){var o=i[l];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},n=function(e,n){for(var a=t(e).textTracks(),s=0;s<a.length;s++){var r=a[s];"subtitles"!==r.kind&&"captions"!==r.kind||r.id!==n||(r.mode="hidden")}},a=function(e){var n,a=t(e);return(null==a||null===(n=a.textTracks())||void 0===n?void 0:n.tracks_.filter(function(t){return"subtitles"==t.kind||"captions"===t.kind}))||[]},s=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 a=t(e);a.remoteTextTracks().tracks_.map(function(t){a.removeRemoteTextTrack(t)}),n.map(function(t){a.addRemoteTextTrack({src:t.url,srcLang:t.language,label:t.language})})};export{r as a,n as d,e,a as g,s as r};
|
package/esm/features-20d7893f.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{r as a,k as s}from"./generic-715a7738.js";import{g as c}from"./renditions-4c09c626.js";import{g as d,p as u}from"./skin-58b9263c.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-920515d1.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-b348d4b4.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-090e7c85.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-c94910d2.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-370d8b1e.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-a98e5d8b.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-0c95a577.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)})},w=function(e,t){import("./series-v2-a8491399.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)})},I=function(e,t){import("./multicamv2-c6e6cb68.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},L=function(e,t){import("./videoSelector-1cf43fc8.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},N=function(e,t){import("./series-v2-81f04cd5.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)})},_=function(e,t){import("./multicamv2-1297de0f.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)})};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,L as j,_ as k,O as l,N as m,P as n,k as o,w as p,I as q};
|
package/esm/features-3fc61a30.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{r as a,k as s}from"./generic-79a719c8.js";import{g as c}from"./renditions-4c09c626.js";import{g as d,p as u}from"./skin-58b9263c.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-920515d1.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-38661562.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-97434a7c.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-3ebdf49e.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-370d8b1e.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-a98e5d8b.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-c13c7244.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)})},w=function(e,t){import("./series-v2-04e9add7.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)})},I=function(e,t){import("./multicamv2-bed3a0bc.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},L=function(e,t){import("./videoSelector-47ad19c9.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},N=function(e,t){import("./series-v2-a1083c40.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)})},_=function(e,t){import("./multicamv2-2f2829fb.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)})};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,L as j,_ as k,O as l,N as m,P as n,k as o,w as p,I as q};
|
package/esm/generic-715a7738.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 o from"axios";import{g as r,c as a}from"./skin-58b9263c.js";import{i as l,d}from"./browser-d4613b36.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-b7fd8308.js";function m(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,n){m("event",e,n)}var w={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function I(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 g(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?I(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var E={name:"@viewlift/player",version:"2.0.38",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=E.version;var T,h=function(e,n){var t,i,r,a,l,d,u,s;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})}):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==w?void 0:w.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,n){var t,i,r,a;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})}):o({url:F.get()+w.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,n){var t,i,r=x(n),a=(null==r?void 0:r.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})}):o({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},b=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,M();case 2:return i=e.sent,e.abrupt("return",o({url:F.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=function(e,n){var t,i,r=window.contentType;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(r,"/").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})},O=function(e){var n=e.videoId;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(T=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),S=function(e,n,t,i){return o({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},withCredentials:!0})},P=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},R=null;function L(){return{set:function(e){e&&(R=e)},get:function(){return R}}}var W,V,A,C,N,j,B=function(){var e=n(t.mark(function e(){var n,i,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),i=F.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),U=null,M=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!P(n)){e.next=6;break}return U||(U=B().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&L().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){U=null})),e.abrupt("return",U);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),k=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},x=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){V=e},G=function(){return V},z=function(e){W=e},Y=function(){return W},X=function(){return A},q=function(e){A=e},J=function(){return N},K=function(e){C=new Map,e.map(function(e,n){C.set(e.id,n)})},Q=function(e){if(C){var n=C.get(e);q(n+1)}},Z=(j=0,{set:function(e){e>=0&&(j=e)},get:function(){return j}});function $(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 ee(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var ne=0,te=function(){var e,n,t,i,o,r,a,l=G();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)}))||void 0===t||null===(i=t.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return ae.apply(this,arguments)}function ae(){return(ae=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,M();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=ie(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n){e.one("play",tryCatch(function(){var t,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":te(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&ne<4)ne++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,i,o,r,a;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te(),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}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:te()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(ne=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(de(n,r,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var de=function(e,n,t){return e>=n&&e<=t};function ue(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var i,r,a,l,d,u,s,c,v,m,f,p,I,g,E,T,h,y,_,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return T=e.sent,h=x(T),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:y,cid:_,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=oe(),e.t5=te(),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=26,re();case 26: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!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==n?void 0:n.duration)&&{duration:n.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(I=window)||void 0===I||null===(g=I.customData)||void 0===g||null===(E=g.beacon)||void 0===E?void 0:E.url)||F.get()+w.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch(function(e){console.error(e)});case 42: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}}};var se=function(e,n){var t=new Map;O({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),N=t}).catch(function(e){return console.log(e)})},ce=function(){var e=Z.get();return e>=0?e+1:1},ve=function(){var e,n,t,i=Y(),o=G(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=Z.get(),l=null==i||null===(n=i[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return l>=0?l+1:1};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 fe(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}window._deviceInfo=s(navigator.userAgent);var pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},we=function(e){var n=Ie(e,"video.tags",[]),t=Ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Ie=function(e,n,t){for(var i=0,o=(n=n.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[n[i]]}return e||t},ge=function(){var e,n,t,i,o,a,l,d,s,c,v,m,f,p,w,I,g,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0,O=(null==D?void 0:D.siteName)||"",F=(null==D?void 0:D.contentType)||"video",S=(null==D||null===(e=D[F])||void 0===e?void 0:e.metadata)||(null==D||null===(n=D[F])||void 0===n||null===(t=n.gist)||void 0===t?void 0:t.metadata),P=r(b);if(!_.includes("VIEWLIFT_"))return _;var R,L=window.getComputedStyle(document.getElementById(b),null),W=Math.trunc(L.getPropertyValue("height").slice(0,-2)),V=Math.trunc(L.getPropertyValue("width").slice(0,-2)),A="linearchannel"===F?null==D||null===(i=D.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(a=o.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===a||null===(l=a.content)||void 0===l?void 0:l.id:Ie(D,"video.gist.id",""),C="linearchannel"===F?null==D||null===(d=D.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===c?void 0:c.title:Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,j=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){N=null==e?void 0:e.gppString,j=null==e?void 0:e.sectionList[0]}));var B=fe(fe({},Ee(S)),{},{VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:pe(V,W),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===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ie(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==P||null===(m=P.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==P||null===(f=P.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==O?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:we(D),VIEWLIFT_MEDIA_ID:A,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:A,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ie(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ie(null===(p=window)||void 0===p||null===(w=p.app_data)||void 0===w||null===(I=w.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:Ie(null===(g=window)||void 0===g||null===(E=g.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:A,VIEWLIFT_CONTENT_TITLE:C,VIEWLIFT_CONTENT_SERIES_TITLE:Ie(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ie(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ve(),VIEWLIFT_SEASON_NUMBER:ce(),VIEWLIFT_CONTENT_TAGS:we(D),VIEWLIFT_GPP_SID:j||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP"},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var U in B){var M=new RegExp(U,"g");_=_.replace(M,B[U])}return _},Ee=function(e){var n,t,i,o,r,a,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var s=(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,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l()?s?d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),d=l()?fe(fe({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):fe(fe({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),d=l()?fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d=fe(fe({},d),{},{VIEWLIFT_AFID:u.get("afid")})},Te=function(e,n){var t,i,o,r,a,l,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[w])||void 0===t?void 0:t.drmEnabled,g=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[w])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.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!=E&&E.hls)return ye(E);if(I){var y=_e(g,n);return y.src=ge(y.src,n,e),y}if("Safari"!==d()&&h)return he(g);if(T){var _=ye(g);return _.src=ge(_.src,n,e),_}if(null!=g&&g.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(g);return b.src=ge(b.src,n,e),b}return null},he=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ye=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=e.fairPlayCmaf||e.fairPlay,o=e.widevine,a=e.playReady,l=d();if(r(n),"Safari"===l){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,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,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(t);return be(n),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(be(n),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var be=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==d()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},De=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var o=t.split(".com")[1]||"";return{src:o?"".concat(n).concat(o):t,type:i}},Oe=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),o.appendChild(r),i.append(o)}}},Fe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,Pe=function(e,n,t){var i=ge(n,e,t),o=r(e);if(n&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,n){var t,i,o,a=r(e);if(null!==a.el_){Se=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Se&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,function(){s&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function Re(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 Le=function(e){i(e).play()},We=function(e){i(e).pause()},Ve=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},Ae=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},Ce=function(e){return!!i.getPlayer("".concat(e))},Ne=function(e){return i(e).paused()},je=function(){var e=n(t.mark(function e(n,i){var o,a,l,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,M();case 3:return a=e.sent,l=r(n),e.abrupt("return",new Promise(function(e,t){y(i,a).then(function(t){var r=null==t?void 0:t.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Te(r,n);H(r),a&&o?(xe(n,a),l.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Be=function(){var e=n(t.mark(function e(n,i,o){var a,l,d,u,s,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return u=e.sent,(Y()||null)&&Q(i),s=0,m=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&D(i,u).then(function(e){var n,t,i,o,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null}).catch(function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){h(i,u).then(function(i){var o,a,l,d,u,f,p,w,I,g,E=null==i?void 0:i.data,T=(null==E||null===(o=E.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;H(i.data);var h=(null==E||null===(l=E.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(u=d.adTags)||void 0===u||null===(f=u.web)||void 0===f?void 0:f.active)&&(null==E||null===(p=E.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(g=I.web)||void 0===g?void 0:g.url);h&&Pe(n,h,E);var y=Te(E,n);if(y){var _,b,D,O,F,S,P,R,L,W,V,A,C,N,j=(null==E||null===(_=E.video)||void 0===_||null===(b=_.gist)||void 0===b?void 0:b.videoImageUrl)||(null==E||null===(D=E.video)||void 0===D||null===(O=D.gist)||void 0===O||null===(F=O.imageGist)||void 0===F?void 0:F.r16x9),B=r(n);if(B.poster(j),xe(n,y),B.on("loadstart",function(){T&&e({status:!0,msg:"Video Loaded",response:E})}),B.on("loadeddata",function(){Fe(),e({status:!0,msg:"Video Loaded",response:E})}),B.one("play",function(){s&&m<95&&setTimeout(function(){B.currentTime(s)},0)}),B.one("error",function(){var e;t({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==E||null===(S=E.video)||void 0===S||null===(P=S.contentDetails)||void 0===P||null===(R=P.closedCaptions)||void 0===R?void 0:R.length)>0||(null==E||null===(L=E.video)||void 0===L||null===(W=L.closedCaptions)||void 0===W?void 0:W.length)>0)V=((null==E||null===(A=E.video)||void 0===A||null===(C=A.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==E||null===(N=E.video)||void 0===N?void 0:N.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(n,V);else v(n)}else Oe(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){He(e,n,t,i)})}));case 9:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),Ue=function(e,n,t){var i=r(e);return i.src(n),new Promise(function(e,n){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Me=function(e){var n=r(e);if(ke(),a(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},ke=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()},xe=function(e,n){var t=r(e);t&&t.src(n)},He=function(n,t,i,o){var r,a,l,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ce(t)&&Oe(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Re(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},o&&{videoId:o}))},Ge=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=n.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},ze=function(e){var n,t=r(e);return!t&&(null==t||null===(n=t.liveTracker)||void 0===n?void 0:n.atLiveEdge())};export{se as A,Z as B,z as C,Ue as D,Le as E,We as F,Ce as G,Be as H,je as I,Me as J,S as K,ze as L,F as M,k as N,L as O,P,f as Q,X as R,Ne as S,q as T,O as U,K as V,Q as W,ve as a,Y as b,ce as c,G as d,Te as e,H as f,oe as g,Fe as h,Oe as i,J as j,Ve as k,xe as l,ge as m,Ge as n,ue as o,Pe as p,De as q,Ae as r,b as s,x as t,h as u,D as v,He as w,M as x,y,_ as z};
|
package/esm/generic-79a719c8.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 o from"axios";import{g as r,c as a}from"./skin-58b9263c.js";import{i as l,d}from"./browser-d4613b36.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-b7fd8308.js";function m(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,n){m("event",e,n)}var w={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function I(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 g(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?I(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var E={name:"@viewlift/player",version:"2.0.38",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=E.version;var T,h=function(e,n){var t,i,r,a,l,d,u,s;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})}):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==w?void 0:w.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,n){var t,i,r,a;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})}):o({url:F.get()+w.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,n){var t,i,r=x(n),a=(null==r?void 0:r.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})}):o({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},b=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,M();case 2:return i=e.sent,e.abrupt("return",o({url:F.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=function(e,n){var t,i,r=window.contentType;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(r,"/").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})},O=function(e){var n=e.videoId;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(T=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),S=function(e,n,t,i){return o({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},withCredentials:!0})},P=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},R=null;function L(){return{set:function(e){e&&(R=e)},get:function(){return R}}}var V,W,A,C,N,j,B=function(){var e=n(t.mark(function e(){var n,i,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),i=F.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),U=null,M=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!P(n)){e.next=6;break}return U||(U=B().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&L().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){U=null})),e.abrupt("return",U);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),k=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},x=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){W=e},G=function(){return W},z=function(e){V=e},Y=function(){return V},X=function(){return A},q=function(e){A=e},J=function(){return N},K=function(e){C=new Map,e.map(function(e,n){C.set(e.id,n)})},Q=function(e){if(C){var n=C.get(e);q(n+1)}},Z=(j=0,{set:function(e){e>=0&&(j=e)},get:function(){return j}});function $(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 ee(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var ne=0,te=function(){var e,n,t,i,o,r,a,l=G();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)}))||void 0===t||null===(i=t.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return ae.apply(this,arguments)}function ae(){return(ae=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,M();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=ie(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n){e.one("play",tryCatch(function(){var t,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":te(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&ne<4)ne++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,i,o,r,a;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te(),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}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:te()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(ne=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(de(n,r,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var de=function(e,n,t){return e>=n&&e<=t};function ue(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var i,r,a,l,d,u,s,c,v,m,f,p,I,g,E,T,h,y,_,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return T=e.sent,h=x(T),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:y,cid:_,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=oe(),e.t5=te(),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=26,re();case 26: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!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==n?void 0:n.duration)&&{duration:n.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(I=window)||void 0===I||null===(g=I.customData)||void 0===g||null===(E=g.beacon)||void 0===E?void 0:E.url)||F.get()+w.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch(function(e){console.error(e)});case 42: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}}};var se=function(e,n){var t=new Map;O({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),N=t}).catch(function(e){return console.log(e)})},ce=function(){var e=Z.get();return e>=0?e+1:1},ve=function(){var e,n,t,i=Y(),o=G(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=Z.get(),l=null==i||null===(n=i[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return l>=0?l+1:1};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 fe(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}window._deviceInfo=s(navigator.userAgent);var pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},we=function(e){var n=Ie(e,"video.tags",[]),t=Ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Ie=function(e,n,t){for(var i=0,o=(n=n.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[n[i]]}return e||t},ge=function(){var e,n,t,i,o,a,l,d,s,c,v,m,f,p,w,I,g,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0,O=(null==D?void 0:D.siteName)||"",F=(null==D?void 0:D.contentType)||"video",S=(null==D||null===(e=D[F])||void 0===e?void 0:e.metadata)||(null==D||null===(n=D[F])||void 0===n||null===(t=n.gist)||void 0===t?void 0:t.metadata),P=r(b);if(!_.includes("VIEWLIFT_"))return _;var R,L=window.getComputedStyle(document.getElementById(b),null),V=Math.trunc(L.getPropertyValue("height").slice(0,-2)),W=Math.trunc(L.getPropertyValue("width").slice(0,-2)),A="linearchannel"===F?null==D||null===(i=D.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(a=o.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===a||null===(l=a.content)||void 0===l?void 0:l.id:Ie(D,"video.gist.id",""),C="linearchannel"===F?null==D||null===(d=D.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===c?void 0:c.title:Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,j=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){N=null==e?void 0:e.gppString,j=null==e?void 0:e.sectionList[0]}));var B=fe(fe({},Ee(S)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:pe(W,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===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ie(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==P||null===(m=P.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==P||null===(f=P.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==O?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:we(D),VIEWLIFT_MEDIA_ID:A,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:A,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ie(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ie(null===(p=window)||void 0===p||null===(w=p.app_data)||void 0===w||null===(I=w.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:Ie(null===(g=window)||void 0===g||null===(E=g.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:A,VIEWLIFT_CONTENT_TITLE:C,VIEWLIFT_CONTENT_SERIES_TITLE:Ie(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ie(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ve(),VIEWLIFT_SEASON_NUMBER:ce(),VIEWLIFT_CONTENT_TAGS:we(D),VIEWLIFT_GPP_SID:j||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP"},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var U in B){var M=new RegExp(U,"g");_=_.replace(M,B[U])}return _},Ee=function(e){var n,t,i,o,r,a,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var s=(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,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l()?s?d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),d=l()?fe(fe({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):fe(fe({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),d=l()?fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d=fe(fe({},d),{},{VIEWLIFT_AFID:u.get("afid")})},Te=function(e,n){var t,i,o,r,a,l,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[w])||void 0===t?void 0:t.drmEnabled,g=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[w])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.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!=E&&E.hls)return ye(E);if(I){var y=_e(g,n);return y.src=ge(y.src,n,e),y}if("Safari"!==d()&&h)return he(g);if(T){var _=ye(g);return _.src=ge(_.src,n,e),_}if(null!=g&&g.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(g);return b.src=ge(b.src,n,e),b}return null},he=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ye=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=e.fairPlayCmaf||e.fairPlay,o=e.widevine,a=e.playReady,l=d();if(r(n),"Safari"===l){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,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,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(t);return be(n),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(be(n),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var be=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==d()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},De=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var o=t.split(".com")[1]||"";return{src:o?"".concat(n).concat(o):t,type:i}},Oe=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),o.appendChild(r),i.append(o)}}},Fe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,Pe=function(e,n,t){var i=ge(n,e,t),o=r(e);if(n&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,n){var t,i,o,a=r(e);if(null!==a.el_){Se=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Se&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,function(){s&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function Re(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 Le=function(e){i(e).play()},Ve=function(e){i(e).pause()},We=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},Ae=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},Ce=function(e){return!!i.getPlayer("".concat(e))},Ne=function(e){return i(e).paused()},je=function(){var e=n(t.mark(function e(n,i){var o,a,l,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,M();case 3:return a=e.sent,l=r(n),e.abrupt("return",new Promise(function(e,t){y(i,a).then(function(t){var r=null==t?void 0:t.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Te(r,n);H(r),a&&o?(xe(n,a),l.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Be=function(){var e=n(t.mark(function e(n,i,o){var a,l,d,u,s,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return u=e.sent,(Y()||null)&&Q(i),s=0,m=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&D(i,u).then(function(e){var n,t,i,o,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null}).catch(function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){h(i,u).then(function(i){var o,a,l,d,u,f,p,w,I,g,E=null==i?void 0:i.data,T=(null==E||null===(o=E.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;H(i.data);var h=(null==E||null===(l=E.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(u=d.adTags)||void 0===u||null===(f=u.web)||void 0===f?void 0:f.active)&&(null==E||null===(p=E.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(g=I.web)||void 0===g?void 0:g.url);h&&Pe(n,h,E);var y=Te(E,n);if(y){var _,b,D,O,F,S,P,R,L,V,W,A,C,N,j=(null==E||null===(_=E.video)||void 0===_||null===(b=_.gist)||void 0===b?void 0:b.videoImageUrl)||(null==E||null===(D=E.video)||void 0===D||null===(O=D.gist)||void 0===O||null===(F=O.imageGist)||void 0===F?void 0:F.r16x9),B=r(n);if(B.poster(j),xe(n,y),B.on("loadstart",function(){T&&e({status:!0,msg:"Video Loaded",response:E})}),B.on("loadeddata",function(){Fe(),e({status:!0,msg:"Video Loaded",response:E})}),B.one("play",function(){s&&m<95&&setTimeout(function(){B.currentTime(s)},0)}),B.one("error",function(){var e;t({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==E||null===(S=E.video)||void 0===S||null===(P=S.contentDetails)||void 0===P||null===(R=P.closedCaptions)||void 0===R?void 0:R.length)>0||(null==E||null===(L=E.video)||void 0===L||null===(V=L.closedCaptions)||void 0===V?void 0:V.length)>0)W=((null==E||null===(A=E.video)||void 0===A||null===(C=A.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==E||null===(N=E.video)||void 0===N?void 0:N.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(n,W);else v(n)}else Oe(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){He(e,n,t,i)})}));case 9:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),Ue=function(e,n,t){var i=r(e);return i.src(n),new Promise(function(e,n){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Me=function(e){var n=r(e);if(ke(),a(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},ke=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()},xe=function(e,n){var t=r(e);t&&t.src(n)},He=function(n,t,i,o){var r,a,l,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ce(t)&&Oe(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Re(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},o&&{videoId:o}))},Ge=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=n.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{se as A,Z as B,z as C,Ue as D,Le as E,Ve as F,Ce as G,Be as H,je as I,Me as J,S as K,F as L,k as M,L as N,P as O,f as P,X as Q,Ne as R,q as S,O as T,K as U,Q as V,ve as a,Y as b,ce as c,G as d,Te as e,H as f,oe as g,Fe as h,Oe as i,J as j,We as k,xe as l,ge as m,Ge as n,ue as o,Pe as p,De as q,Ae as r,b as s,x as t,h as u,D as v,He as w,M as x,y,_ as z};
|
package/esm/icons-3bd3bd8f.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>'},f=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>'},L=function(){return'<svg width="16" height="16" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M8.99935 13.167C9.23546 13.167 9.43338 13.0871 9.5931 12.9274C9.75282 12.7677 9.83268 12.5698 9.83268 12.3337C9.83268 12.0975 9.75282 11.8996 9.5931 11.7399C9.43338 11.5802 9.23546 11.5003 8.99935 11.5003C8.76324 11.5003 8.56532 11.5802 8.4056 11.7399C8.24588 11.8996 8.16602 12.0975 8.16602 12.3337C8.16602 12.5698 8.24588 12.7677 8.4056 12.9274C8.56532 13.0871 8.76324 13.167 8.99935 13.167ZM8.16602 9.83366H9.83268V4.83366H8.16602V9.83366ZM8.99935 17.3337C7.84657 17.3337 6.76324 17.1149 5.74935 16.6774C4.73546 16.2399 3.85352 15.6462 3.10352 14.8962C2.35352 14.1462 1.75977 13.2642 1.32227 12.2503C0.884766 11.2364 0.666016 10.1531 0.666016 9.00033C0.666016 7.84755 0.884766 6.76421 1.32227 5.75033C1.75977 4.73644 2.35352 3.85449 3.10352 3.10449C3.85352 2.35449 4.73546 1.76074 5.74935 1.32324C6.76324 0.885742 7.84657 0.666992 8.99935 0.666992C10.1521 0.666992 11.2355 0.885742 12.2493 1.32324C13.2632 1.76074 14.1452 2.35449 14.8952 3.10449C15.6452 3.85449 16.2389 4.73644 16.6764 5.75033C17.1139 6.76421 17.3327 7.84755 17.3327 9.00033C17.3327 10.1531 17.1139 11.2364 16.6764 12.2503C16.2389 13.2642 15.6452 14.1462 14.8952 14.8962C14.1452 15.6462 13.2632 16.2399 12.2493 16.6774C11.2355 17.1149 10.1521 17.3337 8.99935 17.3337ZM8.99935 15.667C10.8605 15.667 12.4368 15.0212 13.7285 13.7295C15.0202 12.4378 15.666 10.8614 15.666 9.00033C15.666 7.13921 15.0202 5.56283 13.7285 4.27116C12.4368 2.97949 10.8605 2.33366 8.99935 2.33366C7.13824 2.33366 5.56185 2.97949 4.27018 4.27116C2.97852 5.56283 2.33268 7.13921 2.33268 9.00033C2.33268 10.8614 2.97852 12.4378 4.27018 13.7295C5.56185 15.0212 7.13824 15.667 8.99935 15.667Z" fill="white"/>\n </svg>'};export{g as B,r as C,s as E,L as I,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,f as e,v as f,o as g,a as h,l as i};
|
package/esm/index-0ce0e085.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,t as n}from"./skin-58b9263c.js";import{Q as r,b as i,d as o}from"./generic-79a719c8.js";import{s as a}from"./autoNextVideo-3d6570ee.js";import l from"@babel/runtime/helpers/typeof";import u from"video.js";import s from"@babel/runtime/helpers/asyncToGenerator";import c from"@babel/runtime/regenerator";import d from"@babel/runtime/helpers/defineProperty";import p from"@babel/runtime/helpers/slicedToArray";var m,v,f,g,h=[],b=function(n,o){var a;if(null!=o&&null!==(a=o.series)&&void 0!==a&&a.enable){var l;h=[];var u=i();null==u||u.map(function(t){var n;return(n=h).push.apply(n,e(t.episodes))}),null==o||null===(l=o.series)||void 0===l||l.cb}else{var s,c;h=(null==o||null===(s=o.relatedVideos)||void 0===s?void 0:s.content)||[],null==o||null===(c=o.relatedVideos)||void 0===c||c.cb}var d=t(n);d.on("timeupdate",function(){var e,t,n=Math.floor(d.currentTime()),i=d.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-n<=10&&r()<=(null===(t=h)||void 0===t?void 0:t.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")});var p,m=h.filter(function(e,t){return t==r()});if((null==m?void 0:m.length)>0)if(null!==(p=document.getElementsByClassName("next-ep-preview"))&&void 0!==p&&p[0]){var v,f,g,b,x,w,A,E,N,j,k,C;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var O=null===(f=document.getElementsByClassName("next-ep-title"))||void 0===f?void 0:f[0],T=null===(g=document.getElementsByClassName("next-ep-img"))||void 0===g?void 0:g[0],B=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],I=null===(x=m[0])||void 0===x?void 0:x.title;(null===(w=I)||void 0===w?void 0:w.length)>60&&(I=I.substr(0,60)+"..."),O.textContent="".concat(I),T.src=(null===(A=m[0])||void 0===A||null===(E=A.gist)||void 0===E||null===(N=E.imageGist)||void 0===N?void 0:N.r16x9)||(null==m||null===(j=m[0])||void 0===j?void 0:j.img)||(null===(k=window)||void 0===k||null===(C=k.customData)||void 0===C?void 0:C.fallbackImage),B.onclick=function(){return y(n)}}else{var L,S,M,P,R,D,$,X,U=document.createElement("div");U.className="next-ep-preview",U.style.visibility="hidden",document.getElementById(n).append(U);var F=document.createElement("div");F.className="next-ep-header",F.textContent="Next up";var _=null===(L=m[0])||void 0===L?void 0:L.title,q=document.createElement("img");q.className="next-ep-img",q.src=(null===(S=m[0])||void 0===S||null===(M=S.gist)||void 0===M||null===(P=M.imageGist)||void 0===P?void 0:P.r16x9)||(null==m||null===(R=m[0])||void 0===R?void 0:R.img)||(null===(D=window)||void 0===D||null===($=D.customData)||void 0===$?void 0:$.fallbackImage);var G=document.createElement("div");G.className="next-ep-title",(null===(X=_)||void 0===X?void 0:X.length)>60&&(_=_.substr(0,60)+"..."),G.textContent="".concat(_);var V=document.createElement("div");V.className="next-ep-content",V.append(q),V.append(G),V.onclick=function(){return y(n)},U.append(F),U.append(V)}},y=function(e,n){var i=t(e),o=Math.floor(i.currentTime());if(Math.floor(i.duration())!=o){i.pause(e);var l=r();a(l,e,h)}};function x(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 w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}m={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},v=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===l(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},f=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},g=function e(t){return"HTML"!==t.nodeName&&"static"===f(t)("position")?e(t.offsetParent):t},u.registerPlugin("thumbnails",function(e){var t,n,r,i,o,a,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=v({},m,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",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",v(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",function(e){a=i.duration()}),i.on("loadedmetadata",function(e){a=i.duration()}),(o=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,m,h,b;for(l in u=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((b=g(o.el()).getBoundingClientRect()).width||b.right)+h,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=g(o.el()).getBoundingClientRect().left+h,i=Math.floor((s-o.el().offsetLeft)/o.width()*a),n)i>l&&(u=Math.max(u,l));(c=n[u]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&v(r.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=f(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>p?s-=s+m-p:s<m&&(s=m),t.style.left=s+"px"},o.on("mousemove",l),o.on("touchmove",l),o.on("pointerdown",function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)}),u=function(e){t.style.left="-1000px"},o.on("mouseout",u),o.on("touchcancel",u),o.on("touchend",u),i.on("userinactive",u)});var A="my-player";function E(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function N(){return(N=s(c.mark(function e(t){var n,r,i,o,a,l,u,s,d,m,v,f,g,h,b,y,x,w,A,E,N,j,k,C;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,o=t.layout.split("x").map(Number),a=p(o,2),l=a[0],u=a[1],s=i.width/u,d=i.height/l,m=[],v=0;v<l;v++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=d,g.getContext("2d").drawImage(i,f*s,v*d,s,d,0,0,s,d),h=g.toDataURL("image/png"),m.push({uri:h,duration:t.duration}),t._tiles=m;return e.abrupt("return",m);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=p(b,2),x=y[0],w=y[1],A=[],E=0;E<x*w;E++)A.push({uri:null===(N=window)||void 0===N||null===(j=N.app_data)||void 0===j||null===(k=j.appcmsMain)||void 0===k||null===(C=k.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",A);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function j(e,t){return k.apply(this,arguments)}function k(){return(k=s(c.mark(function e(t,n){var r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return A=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",E(i));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 C(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),o=t(A);if(i&&o){var a=i.getBoundingClientRect(),l=(e.clientX-a.left)/a.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,o=t.length-1;for(;i<=o;){var a=Math.floor((i+o)/2),l=t[a];if(l===e)return l;l<e?i=a+1:o=a-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[o])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*o.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return N.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function O(e){return T.apply(this,arguments)}function T(){return(T=s(c.mark(function e(t){var r,i,o,a;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={},t.forEach(function(e,t){for(var n=e.layout.split("x").map(Number),i=p(n,2),o=i[0]*i[1],a=e.duration,l=0;l<o;l++){var u,s=Math.round((t*o+l)*a);r[s]=w(w({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},d(u,"left","-60px"),d(u,"border","1px solid transparent"),d(u,"borderRadius","4px"),u)})}}),i=Object.keys(r).map(Number).sort(function(e,t){return e-t}),null==(o=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||o.addEventListener("mousemove",n(function(e){return C(e,r,i)},500)),null==(a=document.querySelector(".vjs-progress-control.vjs-control"))||a.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",n(function(e){return C(e,r,i)},500))}),e.abrupt("return",r);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var B=function(){var e=s(c.mark(function e(t,n){var r,i,o,a;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach(function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach(function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach(function(e){var t=e.split("="),n=p(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o})}),a.push(r))}),e.abrupt("return",a);case 10:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function I(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function L(e,t){return S.apply(this,arguments)}function S(){return(S=s(c.mark(function e(n,r){var i,a,l,u,s,d,m,v,f,g,h,b,y,x,w,E,N,j,k,C,O,T,B,L,S,R,D,$,X,U,F,_,q,G,V,z,H,Q,W,Y,J,K,Z,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,de,pe,me,ve;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return A=r,i=t(r),a=n.split("/"),l=a.findIndex(function(e){return"dash"===e.toLowerCase()}),u=I(-1!==l?a.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return v=e.sent,e.next=11,v.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),b=(null==i?void 0:i.duration())||(null===(s=o())||void 0===s||null===(d=s.video)||void 0===d?void 0:d.runtime),y=(null==h||null===(m=h.querySelector("MPD > BaseURL"))||void 0===m?void 0:m.textContent)||u+"/",x=h.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(j=E.getElementsByTagName("SegmentTemplate")[0],k=null===(N=j.getElementsByTagName("SegmentTimeline"))||void 0===N?void 0:N[0],!j||!k){e.next=48;break}if(T=k.getElementsByTagName("S"),B=parseInt(null===(C=T[0])||void 0===C?void 0:C.getAttribute("t")),L=parseInt(null===(O=T[0])||void 0===O?void 0:O.getAttribute("d")),S=E.getElementsByTagName("Representation")[0],R=S.getElementsByTagName("EssentialProperty")[0],D=R.getAttribute("value"),$=null==D?void 0:D.split("x"),X=p($,2),U=X[0],F=X[1],!j){e.next=46;break}if(j.getAttribute("media"),_=j.getAttribute("timescale"),q=(_?L/_:L)/(U*F),G=S.getAttribute("id"),V=Math.round(b/q),z=Math.ceil(V/(U*F)),H=j.getAttribute("media"),parseInt(j.getAttribute("startNumber")),!isNaN(parseInt(z))){e.next=43;break}return e.abrupt("return");case 43:for(Q=[],w=0;w<z;w++)Y="/"==(W=H)[0]?new URL(u).origin:u+"/",Q.push({duration:q,layout:D,uri:Y+W.replace("$Time$",B+w*L).replace("$RepresentationID$",G)});return e.abrupt("return",Q);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=p(ee,2),ne=te[0],re=te[1],!j){e.next=69;break}if(j.getAttribute("media"),ie=j.getAttribute("duration"),oe=j.getAttribute("timescale"),ae=(oe?ie/oe:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/ae),se=Math.ceil(ue/(ne*re)),ce=j.getAttribute("media"),de=parseInt(j.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=M(ce),w=0;w<se;w++)ve=me?P(me,w+de):ce,pe.push({duration:ae,layout:Z,uri:y+ve.replace("$Number$",w+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:w++,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 M(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function P(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function R(e){return D.apply(this,arguments)}function D(){return(D=s(c.mark(function e(n){var r,i,o,a,l,u,s,d,p,m,v,f,g,h,b,y;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),s=u.currentSource(),d=s.src,d=null!==(r=d)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(o=i.player)||void 0===o?void 0:o.getSource():d,null===(a=d)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,j(d,n);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,v=m.uri,f=d.substring(0,d.lastIndexOf("/"))+"/",e.next=12,B(f,v);case 12:return g=e.sent,e.next=15,O(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=d)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,L(d,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,O(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var o=document.createElement("div");o.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",o.append(a),r.el().appendChild(o),r.on("useractive",function(){o.classList.remove("vjs-fade")}),r.on("userinactive",function(){r.paused()||o.classList.add("vjs-fade")}),r.on("fullscreenchange",function(){r.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"})}}export{b as a,$ as b,R as i};
|
package/esm/index-4a04166e.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m as p,n as m,o as y,p as h,q as g,t as b,u as w,v as k,w as O,x as j,y as S,z as T,A as I,B as E,C as P,D,E as x,F as A,G as C,H as R,I as L,J as N,K as M,L as _,M as V,N as U,O as B,P as H}from"./generic-79a719c8.js";import F from"@babel/runtime/helpers/defineProperty";import q from"@babel/runtime/helpers/asyncToGenerator";import G from"@babel/runtime/regenerator";import K from"video.js";import{o as z,g as J,a as W,s as Q,b as X}from"./util-80257541.js";import{g as Y,d as $,a as Z,e as ee}from"./captions-b7fd8308.js";import{g as ne}from"./renditions-4c09c626.js";import{playSelectedResolution as te}from"./resolution-920515d1.js";import{g as oe,t as re,p as ie,i as le,a as ae}from"./skin-58b9263c.js";import{d as se}from"./browser-d4613b36.js";import{s as ue}from"./localisation-0bf399a1.js";import ce from"@babel/runtime/helpers/typeof";import de from"@babel/runtime/helpers/toConsumableArray";import ve from"@babel/runtime/helpers/slicedToArray";import{I as fe}from"./icons-3bd3bd8f.js";var pe=function(e){return new Promise(function(n,t){if(me(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},me=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ye=function(e,n,t){var o=oe(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},he=function(e){var n=oe(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ge=function(){var e=q(G.mark(function e(n){var t,o,r,i,l;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=oe(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(K),e.finish(13);case 16:(l=K.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==se()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),be=function(e,n){var t=oe(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=K.dom.getPointerPosition(a,n).x;K.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var we=function(){var e=q(G.mark(function e(){return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),pe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ke=function(){var e=q(G.mark(function e(){return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){K.getPlugin("eme")||K.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=q(G.mark(function e(){var n;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(K),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),je=function(){var e=q(G.mark(function e(){return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=q(G.mark(function e(){return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs_contrib_dash-f7d94714.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),Te=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(K)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(K)})},loadAdsLibrary:we,loadEMELibrary:ke,loadMuxPlugin:Oe,loadDvrSeekbar:je,loadContribDash:Se});function Ie(e){return Ee.apply(this,arguments)}function Ee(){return(Ee=q(G.mark(function e(n){var t;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,we();case 3:t&&"Safari"==se()&&Promise.resolve().then(function(){return Te}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Pe(e,n){return De.apply(this,arguments)}function De(){return(De=q(G.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==se()?ke():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?Se():ke():"Safari"!=se()&&d?Se():null,ge(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ce=new Set,Re=null,Le=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=He(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=Ve(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=Ue(n),v["c3.cm.genreList"]=Me(n),v["c3.cm.genre"]=Ne(n),v["c3.cm.channel"]=_e(n);var p=qe(t(),n);return v=Ae(Ae({},v),p)},Ne=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Me=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},_e=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},Ve=function(e){return(null==e?void 0:e.contentType)||"null"},Ue=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Be=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},He=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Fe,qe=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Ge=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Ke=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ze=function(){var e=q(G.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=oe(n),"function"==typeof(v=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Ge(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Re&&Re!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),Ce.clear(),Re=d.currentSrc();var o=Ke(d.currentType()),i=r(),s=Le(i,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=Be(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){Ce.has(d.currentSrc())||(Ce.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){Ce.has(d.currentSrc())&&Ce.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==Ce||Ce.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Je=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-a2bc9871.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-55857acc.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-8ceddbe1.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-2a1e18f9.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-3ae22d7d.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&import("./skin-fdb749ad.js").then(function(t){t.initialiseSkin(e,n)})};function We(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Qe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?We(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):We(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Xe=[],Ye=0,$e=null;function Ze(e,n,t){var o,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),h=c?100:Math.floor(v/f*100),g={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=en(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return Qe(Qe({},e),{},F({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Fe});c<0?i.push(Qe(Qe({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=Qe(Qe(Qe({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(g={completed:c,watchedTime:y,watchedPercentage:h},d,n.siteOwner):(g=Qe(Qe({videoId:Fe,watchedTime:y,watchedPercentage:h,doneWatching:c,profileId:d},$e&&{seriesId:$e}),p&&{originalObjectId:p}),i(g).then(function(e){}).catch(function(e){})),Ye=v+t}function en(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function nn(e,n,t){var o=en(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var tn=!1,on=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!tn){var i=rn(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),tn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function rn(e,n,t){if(Array.isArray(e))return e.map(function(e){return rn(e,n,t)});if(null!==e&&"object"===ce(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=rn(e[r],n,t)}),o}return e}function ln(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 o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},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 i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function an(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function sn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function un(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?sn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):sn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var cn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=oe(e),y=(null==f?void 0:f.contentType)||"video",h=(null==f?void 0:f[y].drmEnabled)||!1,g=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadstart",function(){g?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(un({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=Y(e);if(null==l||l.map(function(n){return $(e,n.id)}),b&&"Safari"===se())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&ye(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=un(un({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&($e=null==n||null===(r=n.series)||void 0===r?void 0:r.id),Xe=[],Ye=0,Fe=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=oe(e);a&&(a.on("timeupdate",function(){var e=Math.floor(a.currentTime());Xe.includes(Ye)||(e==Ye?(Xe.push(e),Ze(a,n,l)):e>Ye&&(Ye=e+l))}),a.one("ended",function(){Ze(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,h,g,w,k,O=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),j=null==O?void 0:O.gist,S={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==O||null===(g=O.series)||void 0===g?void 0:g.title,video_stream_type:null!=O&&null!==(w=O.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:S})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),h=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){g&&on(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&g)?on(f,e):(c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var t,o,i,l=null===(t=r())||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id,a=d(),s=(null==a?void 0:a.get(l))||{t:0,p:0},u=s.t,c=s.p;u&&c<95&&setTimeout(function(){m.currentTime(u)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(g){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==ce(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=ln(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=ln(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;("Chrome"==se()||"Edge"==se()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1")?m.audioTracks().removeTrack(p):"main"==p.kind?p.enabled=!0:p.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};function dn(e,n){var t,o,r,i=oe(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o;if(fn.enabled&&"input"!=t.target.localName){var r=t.key,s=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(r)&&(t.preventDefault(),null==a||a.focus()),r){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":s&&!1===n.liveui||f(e,10);break;case"ArrowRight":s||v(e,10)}}},!0)}var vn,fn=(vn=!0,{enable:function(){vn=!0},disable:function(){vn=!1},get enabled(){return vn}});function pn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function mn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function yn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return hn(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)?hn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},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 i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function hn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var gn,bn=(gn="",{set:function(e){e&&(gn=e)},get:function(){return gn}});function wn(e,n){return kn.apply(this,arguments)}function kn(){return(kn=q(G.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,h,g;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return oe(n),o=l(t,n),r=o.src,i=r.replace("dash","session").replace("master","session"),i=p(i,n,{}),a=On(i),s=ve(a,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=ve(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.next=10,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:mn({},u)})});case 10:return d=e.sent,e.next=13,d.json();case 13:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,h=f+m,g=f+y,bn.set(h),console.log("%c TRACKING URL","background: #bdf369; color: #000",h),o.src=g,e.abrupt("return",o);case 23:case"end":return e.stop()}},e)}))).apply(this,arguments)}function On(e){var n={},t=e.split("?")[1];if(!t)return n;var o,r=yn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=ve(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=ve(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}function jn(e,n){return Sn.apply(this,arguments)}function Sn(){return Sn=q(G.mark(function e(n,t){var o,r,i,l,a,s,u,c;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:c=function(e,t,o,r,i,l){var c=l.redirectEl,d=l.redirectUrl,v=oe(n);if(!v.seeking()){var f=t.startTimeInSeconds,p=t.durationInSeconds,m=Math.floor(v.currentTime()),y=Math.floor(f+p);m>=f&&m<=y&&d?(c.style.display="block",a(c,d)):c.style.display="none";var h,g=yn(o);try{for(g.s();!(h=g.n()).done;){var b,w,k,O=h.value,j=O.eventType,S=O.beaconUrls,T=O.startTimeInSeconds,I=(O.startTime,O.durationInSeconds,T||0),E=S,P=(null===(b=window)||void 0===b||null===(w=b.customData)||void 0===w||null===(k=w.ads)||void 0===k||k.adEventHandler,"".concat(I,"_").concat(j)),D=s.get("pod-".concat(i))||[];if(console.warn(e,I,"map:",j,"condition1:",e>=I,"map:",s),e>=I&&!D.includes(P)){D.push(P),s.set("pod-".concat(i),D);try{u(j,t,E,v)}catch(e){console.error("Error when calling triggerAdBeacon:",e,j,t)}}}}catch(e){g.e(e)}finally{g.f()}}},u=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){navigator.sendBeacon(e)})},a=function(e,n){l&&e.removeEventListener("click",l),l=function(){return window.open(n,"_blank")},e.addEventListener("click",l)},i=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},o=bn.get(),oe(n).one("loadeddata",function(){o&&r(o)}),r=function(){var e=q(G.mark(function e(t){var o,r,l,a,u,d,v,f,p,m,y,h,g,b,w,k,O,j,S,T,I,E,P,D;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return O=function(e){document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",O),0===e.button&&w()},k=function(e){},w=function(){var e,n=f.currentTime(),t=null,o=yn(v);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!y.has(i)||n>=i&&n<=s)&&(t=i,y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){f.currentTime(t+.4)},100))},e.next=5,fetch(t);case 5:return a=e.sent,e.next=8,a.json();case 8:u=e.sent,d=u.avails,v=[],f=oe(n),p=f.controlBar.progressControl,m=p.seekBar.el(),d.map(function(e){var n,t;v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(n=e.adBreakTrackingEvents)||void 0===n||null===(t=n.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===t?void 0:t[0])||[]})}),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",m.appendChild(i)}}),y=new Map,h=-1,g=(null==f||null===(o=f.controlBar)||void 0===o?void 0:o.getChild("videoSelector"))||null,b=(null==f||null===(r=f.controlBar)||void 0===r?void 0:r.getChild("seriesV2"))||null,f.on("timeupdate",re(function(){var e=f.currentTime();if(e!==h){h=e;for(var n=!1,t=function(){var t=v[o],r=t.startTimeInSeconds,l=t.durationInSeconds,a=t.ads,u=r+l;if(e>=r-2.5&&e<=u+2.5){var d,f,m,h;e<=u&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>u&&y.set(r,!0),fn.disable(),g&&(g.el().style.pointerEvents="none",g.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),p.el().style.visibility="hidden";for(var w=e-r,k=0,O=0,S=0;S<a.length;S++){var T,I=null==a||null===(T=a[S])||void 0===T?void 0:T.durationInSeconds;if(w<k+I){O=S;break}k+=I}var E=a[O],x=w-k,A=Math.max(0,(null==E?void 0:E.durationInSeconds)-x),C=Math.round(A);j.style.display="block",P.textContent="".concat(O+1," of ").concat(a.length," • ").concat(i(C));var R=[];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)});R.push.apply(R,de(n))}),Array.isArray(a)&&0==(null==a?void 0:a.length)&&R.push(null==t?void 0:t.podSlotImpressionBeacon);var L=(null==E||null===(d=E.trackingEvents)||void 0===d||null===(f=d.filter(function(e){var n;return null===(n=["clickThrough"])||void 0===n?void 0:n.includes(e.eventType)}))||void 0===f||null===(m=f[0])||void 0===m||null===(h=m.beaconUrls)||void 0===h?void 0:h[0])||null;return c(e,t,R,0,o,{redirectEl:D,redirectUrl:L}),"break"}s.delete("pod-".concat(o))},o=0;o<v.length;o++){if("break"===t())break}n||(j.style.display="none",p.el().style.visibility="visible",g&&(g.el().style.pointerEvents="auto",g.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),fn.enable())}},1e3)),p.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",O))}),(j=document.createElement("div")).className="ssai-ad-container",(S=document.createElement("div")).className="sponsored-adbox",(T=document.createElement("div")).className="sponsored-text",T.textContent="Sponsored Ad",(I=document.createElement("div")).className="ad-info-icon",E=ie(fe()),I.appendChild(E),S.append(T),S.append(I),(P=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(D=document.createElement("div")).className="ad-visit-advertiser",D.textContent="Visit Advertiser",(null===(l=document.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])&&(D.style.right="8.6rem"),j.append(S),j.append(P),j.append(D),f.el().appendChild(j);case 49:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),s=new Map;case 10:case"end":return e.stop()}},e)})),Sn.apply(this,arguments)}function Tn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function In(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var En=function(e,n,t,o){var r,i,s,u,d,v,f,p,b,w,k,O,j,S,T,I,E,P,D,x,A,C,R,L,N,M,_,V,U,B,H,z,J,W,Q,X=n.res,Y=void 0===X?null:X,$=n.sres,ee=void 0===$?null:$,ne=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(r=Y)||void 0===r?void 0:r.contentType)||"video",re=le(null===(i=Y)||void 0===i||null===(s=i[te])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||le(null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),ie=(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.liveDetails)||void 0===k?void 0:k.isDvrEnabled)||!1,ae=(null===(O=Y)||void 0===O||null===(j=O[te])||void 0===j||null===(S=j.streamingInfo)||void 0===S?void 0:S.isLiveStream)||!1,ue=(null===(T=Y)||void 0===T||null===(I=T.ads)||void 0===I||null===(E=I.preRoll)||void 0===E||null===(P=E.adTags)||void 0===P||null===(D=P.web)||void 0===D?void 0:D.active)&&(null===(x=Y)||void 0===x||null===(A=x.ads)||void 0===A||null===(C=A.preRoll)||void 0===C||null===(R=C.adTags)||void 0===R||null===(L=R.web)||void 0===L?void 0:L.url);Y=In(In({},Y),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ce="MEDIA_TAILOR"==(null===(N=window)||void 0===N||null===(M=N.app_data)||void 0===M||null===(_=M.appcmsMain)||void 0===_||null===(V=_.adsConfig)||void 0===V?void 0:V.vodAdSticherProvider)||!1,de=(null==t?void 0:t.latency)||6,ve=(Q={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==t.skin,liveui:ie},F(Q,"autoplay",null==t?void 0:t.autoplay),F(Q,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!ue),F(Q,"loop",(null==t?void 0:t.loop)||!1),F(Q,"audioPosterMode",null==t?void 0:t.audioPosterMode),F(Q,"html5",In(In({dash:In(In(In({},!K.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(U=t.debugConfig)||void 0===U?void 0:U.enable)&&{debug:!0,logLevel:null!=t&&null!==(B=t.debugConfig)&&void 0!==B&&B.logLevel?null==t||null===(H=t.debugConfig)||void 0===H?void 0:H.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:de},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{useDefaultABRRules:!0,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:In(In({liveRangeSafeTimeDelta:de,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(z=t.customData)||void 0===z?void 0:z.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==se()},0==(null==t||null===(J=t.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(W=t.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),F(Q,"poster",re),F(Q,"techOrder",ne),F(Q,"chromecast",{requestCustomDataFn:function(n){var t=oe(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,h,g,b,w,k,O;p.isDrmEnabled=!0;var j=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,S=(null==j?void 0:j.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(h=y[0])||void 0===h||null===(g=h.options)||void 0===g?void 0:g.serverURL);p.licenseUrl=S;var T=(null==j?void 0:j.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(O=k.httpRequestHeaders)||void 0===O?void 0:O["X-AxDRM-Message"]);p.licenseToken=T}var I=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=I;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Y,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=oe(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=Y)||void 0===t||null===(o=t[te])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),Q);if(!K.getPlayers()[e]){K.log.level("debug");var fe=K(e,ve,function(){var n=q(G.mark(function n(){var r,i,s,u,d,v,f,p,b,w,k,O,j,S,T,I,E,P,D,x;return G.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(fe),console.log(K.VERSION),console.log(K.getPlugins()),n.next=5,Pe(t,Y);case 5:if(O=null===(r=Y)||void 0===r||null===(i=r[te])||void 0===i||null===(s=i.liveDetails)||void 0===s?void 0:s.startOverTime,ae&&o.resolve(In({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Y}:{response:Y})),y(e,null==t?void 0:t.analyticsCb),ze(e,t),/Android/i.test(navigator.userAgent)&&(K.options.vhs.overrideNative=!0),ie&&be(e,O),!ue||null!=t&&null!==(u=t.customData)&&void 0!==u&&u.disableAds||h(e,ue,Y),j=l(Y,e),console.log(j),null!=t&&t.nearestClusterUrl&&(j=g(j,t.nearestClusterUrl)),!ce){n.next=19;break}return n.next=18,wn(e,Y);case 18:j=n.sent;case 19:j?a(e,j):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:Y}),c(e,"Incompatible / Missing Source")),((null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.contentDetails)||void 0===f||null===(p=f.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.closedCaptions)||void 0===k?void 0:k.length)>0)&&(x=(null===(T=Y)||void 0===T||null===(I=T[te])||void 0===I||null===(E=I.contentDetails)||void 0===E?void 0:E.closedCaptions)||(null===(P=Y)||void 0===P||null===(D=P[te])||void 0===D?void 0:D.closedCaptions),S=x.filter(function(e){return"VTT"===e.format}),Z(e,S)),null!=t&&t.disableControls?m(e):Je(e,In(In(In({},t),ve),{},{liveVideo:ae,isDvrEnabled:ie,res:Y,sres:ee})),cn(e,In(In(In({},t),ve),{},{liveVideo:ae}),o,{res:Y,sres:ee});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Pn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Dn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function xn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Dn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var An,Cn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Rn(e);En(r,{res:i},e,{resolve:t,reject:o})},Rn=function(e){var n,t,o=null==e?void 0:e.streamingInfo,r=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,i=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,l=null==e?void 0:e.token,a=b(l),s=null==a?void 0:a.site;return xn(xn({id:null==Pn?void 0:Pn[s]},!i&&{directPlaybackUrl:null==r?void 0:r.url}),{},{video:{drmEnabled:i,streamingInfo:{videoAssets:{widevine:null==r?void 0:r.widevine,fairPlay:null==r?void 0:r.fairPlay,playReady:null==r?void 0:r.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Ln(e,n){return Nn.apply(this,arguments)}function Nn(){return(Nn=q(G.mark(function e(n,t){var o,r,i,l,a,u;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,j();case 6:u=e.sent,w(i,u).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,s(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,h,g=nn((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(g&&g.length)n.watchHistoryResumeTime=(null===(y=g[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(h=g[0])||void 0===h?void 0:h.watchedPercentage)||null;p.contentType="video",En(l,{res:p},n,{resolve:o,reject:r})}else k(i,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){En(l,{res:p},n,{resolve:o,reject:r})});else En(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Mn(e,n){return _n.apply(this,arguments)}function _n(){return(_n=q(G.mark(function e(n,t){var o,r,i,l,a;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,j();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,S(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,En(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Vn(e,n){return Un.apply(this,arguments)}function Un(){return(Un=q(G.mark(function e(n,t){var o,r,i,l,a,u,c;return G.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,j();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,E.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,T(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;P(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);I(c,l),w(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,s(e.data),En(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){O(e,a,i,videoId)})}).catch(function(e){O(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Bn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Hn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Bn(Object(t),!0).forEach(function(n){F(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Bn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Fn(){return{loadVideoInstantly:D,onTimeUpdate:z,getVideoDuration:J,onVideoEnded:W,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=q(G.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,h,g,b,k,j,S,T,I,E,P;return G.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!C(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,h=null==e?void 0:e.videoId,g=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=h,k=null==e?void 0:e.token,!V(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",k),U().set(null==e?void 0:e.refreshToken),k&&!B(k)){n.next=16;break}return o({status:!1,msg:"".concat(k?"Token is expired !":"Missing Authorization Token"),response:{token:k}}),n.abrupt("return");case 16:An=JSON.parse(atob(k.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=An)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=An)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=An)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=An)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,j=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,S=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,ue(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),_.set(e.apiBaseUrl),null!=e&&e.skin&&!ae(e.skin)||(e.skin="VL_ONE"),n.next=33,Ie(e);case 33:S&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(S)).then(function(){return H(S)}).catch(function(e){}),(I=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(j)))&&I.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(P={directPlaybackUrl:p,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?w(E,k).then(function(n){var r=(null==n?void 0:n.data)||{};En(j,{res:Hn(Hn({},r),P)},e,{resolve:t,reject:o})}).catch(function(e){O(e,j,o,E)}):En(j,{res:P},e,{resolve:t,reject:o})):b?Cn(e,{resolve:t,reject:o}):g?Vn(e,{resolve:t,reject:o}):y?Mn(e,{resolve:t,reject:o}):Ln(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ne,skip:v,getPlayer:oe,play:x,pause:A,detectBrowser:se,rewind:f,loadVideo:a,seekToTimeStamp:Q,isPlayerInitialised:C,load:R,authenticateLC:L,dispose:N,enableCaptions:ee,disableCaptions:$,getCaptions:Y,playSelectedResolution:te,getSource:l,setVolume:ye,getVolume:he,disableControls:m,setPlaybackSpeed:X,getEntitlementData:M}}export{Fn as V,dn as i,jn as s};
|
package/esm/index-a7fcd7f8.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,t as n}from"./skin-58b9263c.js";import{R as r,b as i,d as o}from"./generic-715a7738.js";import{s as a}from"./autoNextVideo-d682e36c.js";import l from"@babel/runtime/helpers/typeof";import u from"video.js";import s from"@babel/runtime/helpers/asyncToGenerator";import c from"@babel/runtime/regenerator";import d from"@babel/runtime/helpers/defineProperty";import p from"@babel/runtime/helpers/slicedToArray";var m,v,f,g,h=[],b=function(n,o){var a;if(null!=o&&null!==(a=o.series)&&void 0!==a&&a.enable){var l;h=[];var u=i();null==u||u.map(function(t){var n;return(n=h).push.apply(n,e(t.episodes))}),null==o||null===(l=o.series)||void 0===l||l.cb}else{var s,c;h=(null==o||null===(s=o.relatedVideos)||void 0===s?void 0:s.content)||[],null==o||null===(c=o.relatedVideos)||void 0===c||c.cb}var d=t(n);d.on("timeupdate",function(){var e,t,n=Math.floor(d.currentTime()),i=d.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-n<=10&&r()<=(null===(t=h)||void 0===t?void 0:t.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")});var p,m=h.filter(function(e,t){return t==r()});if((null==m?void 0:m.length)>0)if(null!==(p=document.getElementsByClassName("next-ep-preview"))&&void 0!==p&&p[0]){var v,f,g,b,x,w,A,E,N,j,k,C;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var O=null===(f=document.getElementsByClassName("next-ep-title"))||void 0===f?void 0:f[0],T=null===(g=document.getElementsByClassName("next-ep-img"))||void 0===g?void 0:g[0],B=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],I=null===(x=m[0])||void 0===x?void 0:x.title;(null===(w=I)||void 0===w?void 0:w.length)>60&&(I=I.substr(0,60)+"..."),O.textContent="".concat(I),T.src=(null===(A=m[0])||void 0===A||null===(E=A.gist)||void 0===E||null===(N=E.imageGist)||void 0===N?void 0:N.r16x9)||(null==m||null===(j=m[0])||void 0===j?void 0:j.img)||(null===(k=window)||void 0===k||null===(C=k.customData)||void 0===C?void 0:C.fallbackImage),B.onclick=function(){return y(n)}}else{var L,S,M,P,R,D,$,X,U=document.createElement("div");U.className="next-ep-preview",U.style.visibility="hidden",document.getElementById(n).append(U);var F=document.createElement("div");F.className="next-ep-header",F.textContent="Next up";var _=null===(L=m[0])||void 0===L?void 0:L.title,q=document.createElement("img");q.className="next-ep-img",q.src=(null===(S=m[0])||void 0===S||null===(M=S.gist)||void 0===M||null===(P=M.imageGist)||void 0===P?void 0:P.r16x9)||(null==m||null===(R=m[0])||void 0===R?void 0:R.img)||(null===(D=window)||void 0===D||null===($=D.customData)||void 0===$?void 0:$.fallbackImage);var G=document.createElement("div");G.className="next-ep-title",(null===(X=_)||void 0===X?void 0:X.length)>60&&(_=_.substr(0,60)+"..."),G.textContent="".concat(_);var V=document.createElement("div");V.className="next-ep-content",V.append(q),V.append(G),V.onclick=function(){return y(n)},U.append(F),U.append(V)}},y=function(e,n){var i=t(e),o=Math.floor(i.currentTime());if(Math.floor(i.duration())!=o){i.pause(e);var l=r();a(l,e,h)}};function x(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 w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}m={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},v=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===l(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},f=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},g=function e(t){return"HTML"!==t.nodeName&&"static"===f(t)("position")?e(t.offsetParent):t},u.registerPlugin("thumbnails",function(e){var t,n,r,i,o,a,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=v({},m,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",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",v(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",function(e){a=i.duration()}),i.on("loadedmetadata",function(e){a=i.duration()}),(o=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,m,h,b;for(l in u=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((b=g(o.el()).getBoundingClientRect()).width||b.right)+h,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=g(o.el()).getBoundingClientRect().left+h,i=Math.floor((s-o.el().offsetLeft)/o.width()*a),n)i>l&&(u=Math.max(u,l));(c=n[u]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&v(r.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=f(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>p?s-=s+m-p:s<m&&(s=m),t.style.left=s+"px"},o.on("mousemove",l),o.on("touchmove",l),o.on("pointerdown",function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)}),u=function(e){t.style.left="-1000px"},o.on("mouseout",u),o.on("touchcancel",u),o.on("touchend",u),i.on("userinactive",u)});var A="my-player";function E(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function N(){return(N=s(c.mark(function e(t){var n,r,i,o,a,l,u,s,d,m,v,f,g,h,b,y,x,w,A,E,N,j,k,C;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,o=t.layout.split("x").map(Number),a=p(o,2),l=a[0],u=a[1],s=i.width/u,d=i.height/l,m=[],v=0;v<l;v++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=d,g.getContext("2d").drawImage(i,f*s,v*d,s,d,0,0,s,d),h=g.toDataURL("image/png"),m.push({uri:h,duration:t.duration}),t._tiles=m;return e.abrupt("return",m);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=p(b,2),x=y[0],w=y[1],A=[],E=0;E<x*w;E++)A.push({uri:null===(N=window)||void 0===N||null===(j=N.app_data)||void 0===j||null===(k=j.appcmsMain)||void 0===k||null===(C=k.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",A);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function j(e,t){return k.apply(this,arguments)}function k(){return(k=s(c.mark(function e(t,n){var r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return A=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",E(i));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 C(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),o=t(A);if(i&&o){var a=i.getBoundingClientRect(),l=(e.clientX-a.left)/a.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,o=t.length-1;for(;i<=o;){var a=Math.floor((i+o)/2),l=t[a];if(l===e)return l;l<e?i=a+1:o=a-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[o])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*o.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return N.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function O(e){return T.apply(this,arguments)}function T(){return(T=s(c.mark(function e(t){var r,i,o,a;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={},t.forEach(function(e,t){for(var n=e.layout.split("x").map(Number),i=p(n,2),o=i[0]*i[1],a=e.duration,l=0;l<o;l++){var u,s=Math.round((t*o+l)*a);r[s]=w(w({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},d(u,"left","-60px"),d(u,"border","1px solid transparent"),d(u,"borderRadius","4px"),u)})}}),i=Object.keys(r).map(Number).sort(function(e,t){return e-t}),null==(o=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||o.addEventListener("mousemove",n(function(e){return C(e,r,i)},500)),null==(a=document.querySelector(".vjs-progress-control.vjs-control"))||a.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",n(function(e){return C(e,r,i)},500))}),e.abrupt("return",r);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var B=function(){var e=s(c.mark(function e(t,n){var r,i,o,a;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach(function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach(function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach(function(e){var t=e.split("="),n=p(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o})}),a.push(r))}),e.abrupt("return",a);case 10:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function I(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function L(e,t){return S.apply(this,arguments)}function S(){return(S=s(c.mark(function e(n,r){var i,a,l,u,s,d,m,v,f,g,h,b,y,x,w,E,N,j,k,C,O,T,B,L,S,R,D,$,X,U,F,_,q,G,V,z,H,W,Q,Y,J,K,Z,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,de,pe,me,ve;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return A=r,i=t(r),a=n.split("/"),l=a.findIndex(function(e){return"dash"===e.toLowerCase()}),u=I(-1!==l?a.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return v=e.sent,e.next=11,v.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),b=(null==i?void 0:i.duration())||(null===(s=o())||void 0===s||null===(d=s.video)||void 0===d?void 0:d.runtime),y=(null==h||null===(m=h.querySelector("MPD > BaseURL"))||void 0===m?void 0:m.textContent)||u+"/",x=h.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(j=E.getElementsByTagName("SegmentTemplate")[0],k=null===(N=j.getElementsByTagName("SegmentTimeline"))||void 0===N?void 0:N[0],!j||!k){e.next=48;break}if(T=k.getElementsByTagName("S"),B=parseInt(null===(C=T[0])||void 0===C?void 0:C.getAttribute("t")),L=parseInt(null===(O=T[0])||void 0===O?void 0:O.getAttribute("d")),S=E.getElementsByTagName("Representation")[0],R=S.getElementsByTagName("EssentialProperty")[0],D=R.getAttribute("value"),$=null==D?void 0:D.split("x"),X=p($,2),U=X[0],F=X[1],!j){e.next=46;break}if(j.getAttribute("media"),_=j.getAttribute("timescale"),q=(_?L/_:L)/(U*F),G=S.getAttribute("id"),V=Math.round(b/q),z=Math.ceil(V/(U*F)),H=j.getAttribute("media"),parseInt(j.getAttribute("startNumber")),!isNaN(parseInt(z))){e.next=43;break}return e.abrupt("return");case 43:for(W=[],w=0;w<z;w++)Y="/"==(Q=H)[0]?new URL(u).origin:u+"/",W.push({duration:q,layout:D,uri:Y+Q.replace("$Time$",B+w*L).replace("$RepresentationID$",G)});return e.abrupt("return",W);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=p(ee,2),ne=te[0],re=te[1],!j){e.next=69;break}if(j.getAttribute("media"),ie=j.getAttribute("duration"),oe=j.getAttribute("timescale"),ae=(oe?ie/oe:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/ae),se=Math.ceil(ue/(ne*re)),ce=j.getAttribute("media"),de=parseInt(j.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=M(ce),w=0;w<se;w++)ve=me?P(me,w+de):ce,pe.push({duration:ae,layout:Z,uri:y+ve.replace("$Number$",w+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:w++,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 M(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function P(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function R(e){return D.apply(this,arguments)}function D(){return(D=s(c.mark(function e(n){var r,i,o,a,l,u,s,d,p,m,v,f,g,h,b,y;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),s=u.currentSource(),d=s.src,d=null!==(r=d)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(o=i.player)||void 0===o?void 0:o.getSource():d,null===(a=d)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,j(d,n);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,v=m.uri,f=d.substring(0,d.lastIndexOf("/"))+"/",e.next=12,B(f,v);case 12:return g=e.sent,e.next=15,O(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=d)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,L(d,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,O(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var o=document.createElement("div");o.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",o.append(a),r.el().appendChild(o),r.on("useractive",function(){o.classList.remove("vjs-fade")}),r.on("userinactive",function(){r.paused()||o.classList.add("vjs-fade")}),r.on("fullscreenchange",function(){r.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"})}}export{b as a,$ as b,R as i};
|