@viewlift/player-backup 0.0.78 → 0.0.80
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-9173a784.js → autoNextVideo-43d57b78.js} +1 -1
- package/cjs/bundle.css +0 -299
- package/cjs/{caption-settings-90edccab.js → caption-settings-afd66b72.js} +1 -1
- package/cjs/{icons-d18d4df6.js → icons-8796e6cb.js} +1 -1
- package/cjs/index-e37a4e57.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-0c5780e5.js → keyboardShortcuts-e64d1995.js} +1 -1
- package/cjs/{multicam-b59e4616.js → multicam-8a2ea57e.js} +1 -1
- package/cjs/{multicamv2-da37d4fd.js → multicamv2-2b2c2e6d.js} +1 -1
- package/cjs/{mwebPotraitTray-b425fa75.js → mwebPotraitTray-741d55f6.js} +1 -1
- package/cjs/{nextEpisodeButton-e98eeb62.js → nextEpisodeButton-a5b71412.js} +1 -1
- package/cjs/{playlist-c7f02793.js → playlist-95c3eb6b.js} +1 -1
- package/cjs/{series-9aaf549d.js → series-3ab2c943.js} +1 -1
- package/cjs/series-9c237975.js +1 -0
- package/cjs/{series-v2-f7af82da.js → series-v2-ccd54766.js} +1 -1
- package/cjs/{settings-icon-e743c7ba.js → settings-icon-a101c168.js} +1 -1
- package/cjs/{skin-cd626eb2.js → skin-13f29d21.js} +1 -1
- package/cjs/{skin-84a6d1d0.js → skin-2a7fe9b5.js} +1 -1
- package/cjs/{skin-cfb672cc.js → skin-545f314a.js} +1 -1
- package/cjs/{skin-07764200.js → skin-f79a1a8a.js} +1 -1
- package/cjs/{videoSelector-677cc872.js → videoSelector-7ab0931c.js} +1 -1
- package/esm/{autoNextVideo-2617a3ca.js → autoNextVideo-7a7f8486.js} +1 -1
- package/esm/bundle.css +0 -299
- package/esm/{caption-settings-8e8cfe2a.js → caption-settings-0538ac5b.js} +1 -1
- package/esm/{icons-538a9479.js → icons-b1f3ba8f.js} +1 -1
- package/esm/index-d1e53a81.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-f1029cc5.js → keyboardShortcuts-af69a2a3.js} +1 -1
- package/esm/{multicam-abe071fe.js → multicam-38f506ea.js} +1 -1
- package/esm/{multicamv2-fea51a7b.js → multicamv2-188e3902.js} +1 -1
- package/esm/{mwebPotraitTray-b7b952bb.js → mwebPotraitTray-886128fa.js} +1 -1
- package/esm/{nextEpisodeButton-7b804a58.js → nextEpisodeButton-ece58967.js} +1 -1
- package/esm/{playlist-74aaa1d7.js → playlist-f23ed6b8.js} +1 -1
- package/esm/series-041152aa.js +1 -0
- package/esm/series-51e860d6.js +1 -0
- package/esm/{series-v2-c928505d.js → series-v2-9af82047.js} +1 -1
- package/esm/{settings-icon-e377d3b5.js → settings-icon-fb8be8f7.js} +1 -1
- package/esm/{skin-03b9cded.js → skin-3923b414.js} +1 -1
- package/esm/{skin-d2840350.js → skin-4c4fe244.js} +1 -1
- package/esm/{skin-eb114c19.js → skin-80eb1458.js} +1 -1
- package/esm/{skin-c2954d04.js → skin-c186c1f6.js} +1 -1
- package/esm/{videoSelector-859bbe8f.js → videoSelector-685ef141.js} +1 -1
- package/package.json +1 -1
- package/cjs/index-ca1947c4.js +0 -1
- package/esm/index-b3dc2a80.js +0 -1
- package/esm/series-4bd36f9c.js +0 -1
package/esm/index-b3dc2a80.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"axios";import n from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/regenerator";import i from"video.js";import"js-cookie";import r from"ua-parser-js";import a from"@babel/runtime/helpers/toConsumableArray";import l from"@babel/runtime/helpers/classCallCheck";import d from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import u from"@babel/runtime/helpers/inherits";import c from"@babel/runtime/helpers/possibleConstructorReturn";import v from"@babel/runtime/helpers/getPrototypeOf";var m={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status","beacon-msn-dev":"https://analytics-api.develop.monumentalsportsnetwork.com/player-beacon","beacon-msn-qa":"https://analytics-api.qa.monumentalsportsnetwork.com/player-beacon","beacon-msn-uat":"https://analytics-api.uat.monumentalsportsnetwork.com/player-beacon","beacon-msn-prod":"https://analytics-api.monumentalsportsnetwork.com/player-beacon","beacon-prod":"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",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"};function p(){window.dataLayer.push(arguments)}function f(e,t){p("event",e,t)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?w(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):w(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function g(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function y(){var e=window.sessionStorage.getItem("uid");return e||(e=g(),window.sessionStorage.setItem("uid",e),e)}function I(e){return e?String(e):""}window.initialise=function(e){var t,n,o;window.sid=g();var i=function(e){switch(e){case"prod":default:return m["beacon-prod"];case"msndev":return m["beacon-msn-dev"];case"msnqa":return m["beacon-msn-qa"];case"msnuat":return m["beacon-msn-uat"];case"monumental-network":return m["beacon-msn-prod"]}}((null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.url)||"prod");window.beaconUrl=i,window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,o,i,r=Math.floor(e.currentTime());f(r?"FAILED_TO_START":"DROPPED_STREAM",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),f("PLAY",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){if(t.el_){var n,o,i,r=e+.1;if(+r.toFixed(2)%5==0)f("BUFFERING",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return r}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,f("FIRST_FRAME",h({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.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 t,n,o,i,r,a;f("AD_REQUEST",h({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,adPosition:1}),f("AD_IMPRESSION",h({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),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 t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,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 t=e.currentTime(),n=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),a=o.end(i);if(E(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var E=function(e,t,n){return e>=t&&e<=n};function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function b(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?T(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):T(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window.fireEvent=function(e){var n,o,i,r,a,l,d=[h(h(h({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params),{},{uid:y(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:I(e.videoPosition),environment:window.environment,dp1:e.dp1||"",dp2:e.dp2||"",dp3:e.dp3||"",dp4:e.dp4||"",dp5:e.dp5||"",apos:!0===e.isAdEvent?I(e.videoPosition):"",apod:!0===e.isAdEvent?I(e.adPosition):"",profid:"",player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:"",ttfirstframe:I(e.ttFirstFrame),bitrate:I(e.bitrate),connectionspeed:"",resolutionheight:I(e.resHeight),resolutionwidth:I(e.resWidth),bufferhealth:I(e.bufferHealth)},(null==e?void 0:e.duration)&&{duration:e.duration}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a||null===(l=a.beacon)||void 0===l?void 0:l.params)];t({url:window.beaconUrl,method:"post",contentType:"application/x-www-form-urlencoded",dataType:"text",data:d}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var O=function(e,n){var o,i;return t({url:j(),params:b({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n},withCredentials:!0})},D=function(e,n,o){if("v1"==o){var i={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return t({url:A(),method:"POST",headers:{Authorization:n,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(i),withCredentials:!0})}if("v2"==o){var r=b({doneWatching:null==e?void 0:e.doneWatching,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime},(null==e?void 0:e.seriesId)&&{seriesId:e.seriesId});return t({url:F(),method:"POST",headers:{Authorization:n},data:r,params:b({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},S=function(e,n){var o,i,r=(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return t({method:"GET",url:k(e),params:{site:s},headers:{Authorization:n,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return t({method:"GET",url:R(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},P=function(e){var n,o;if("v1"==((null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return t({method:"GET",url:C(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return t({method:"GET",url:_(i),headers:{Authorization:e.token}})},_=function(e){return L()+"".concat(null==m?void 0:m.getSeriesWatchHistoryV2,"/").concat(e)},C=function(){return L()+"".concat(null==m?void 0:m.getSeriesWatchHistoryV1)},k=function(e){return L()+"".concat(null==m?void 0:m.getVideoInfoV1,"/").concat(e)},R=function(e,t){return L()+"".concat(null==m?void 0:m.getVideoInfoV2,"/").concat(t,"/").concat(e)},A=function(){return L()+"".concat(null==m?void 0:m.saveWatchHistoryV1)},F=function(){return L()+"".concat(null==m?void 0:m.saveWatchHistoryV2)},j=function(){return L()+"".concat(null==m?void 0:m.getVideoDetails)},L=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==m?void 0:m.apiBaseUrl)},V=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),i.appendChild(r),o.append(i)}},N=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var x=function(){var e,t;return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.onlyPlayReadyDRM||navigator.userAgent.indexOf("Edg")>-1?"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"};function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function W(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?B(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):B(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window._deviceInfo=r(navigator.userAgent);var H=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},M=function(e){var t=U(e,"video.tags",[]),n=U(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},U=function(e,t,n){for(var o=0,i=(t=t.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[t[o]]}return e||n},q=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},z=function(){var e,t,n,o,i,r,a,l,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,f=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,w=Te(m);if(!v.includes("VIEWLIFT_"))return v;var h=window.getComputedStyle(document.getElementById(m),null),g=Math.trunc(h.getPropertyValue("height").slice(0,-2)),y=Math.trunc(h.getPropertyValue("width").slice(0,-2)),I=U(p,"video.gist.id",""),E=W(W({},G(f)),{},{VIEWLIFT_WIDTH:y,VIEWLIFT_HEIGHT:g,VIEWLIFT_SIZE:H(y,g),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===(t=window)||void 0===t?void 0:t.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:U(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:U(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:U(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==w||null===(n=w.options_)||void 0===n?void 0:n.autoplay)||1,VIEWLIFT_MUTE:(null==w||null===(o=w.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:M(p),VIEWLIFT_MEDIA_ID:I,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(U(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:I,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+U(p,"video.gist.permalink","")),VIEWLIFT_COPPA:U(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(a=r.site)||void 0===a?void 0:a.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:U(null===(l=window)||void 0===l||null===(d=l.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*U(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:U(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:I,VIEWLIFT_CONTENT_TITLE:U(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:U(p,"video.series[0].gist.title",U(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:U(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:U(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:U(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var T in E){var b=new RegExp("\\b("+T+")\\b","g");v=v.replace(b,E[T])}return v},G=function(e){var t,n,o,i,r,a,l={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return q()?s?l=W(W({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(l=W(W({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?l=W(W({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(l=W(W({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?l=W(W({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(l=W(W({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=q()?W(W({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):W(W({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})};function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Y(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?K(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var J,X,$,Q,Z=function(e,t){var n,o,i,r,a,l,d,s,u=null==e||null===(n=e.video)||void 0===n?void 0:n.drmEnabled,c=null==e||null===(o=e.video)||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,v=(null==e||null===(r=e.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a||null===(l=a.videoAssets)||void 0===l?void 0:l.hls)||!1,m=(null==e||null===(d=e.video)||void 0===d||null===(s=d.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;if(u){var p=ne(c,t);return p.src=z(p.src,t,e),m&&(p=Y(Y({},p),{},{src:ee(Y(Y({},e.video),{},{src:"".concat(p.src)}))})),p}if(v){var f=te(c);return f.src=z(f.src,t,e),m&&(f=Y(Y({},f),{},{src:ee(Y(Y({},e.video),{},{src:"".concat(f.src)}))})),f}if(null!=c&&c.mpeg){var w=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(c);return w.src=z(w.src,t,e),w}return null},ee=function(e){var t=e.src;if(e.liveDetails.startOverTime){var n=e.liveDetails.startOverTime,o=e.gist.scheduleStartDate,i=e.gist.scheduleEndDate,r=new Date,a=0,l=r.getTime();a=l-o<1e3*n?l-o:1e3*n;var d=null;i<=l&&null!=i&&(d=new Date(i)),r.setMilliseconds(r.getMilliseconds()-a),t=t.includes("?")?i&&d?"".concat(e.src,"&start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"&start=").concat(r.toISOString()):i&&d?"".concat(e.src,"?start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"?start=").concat(r.toISOString())}return t},te=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},ne=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=x(),l=Te(t);if("Safari"===a){var d=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,o){console.log(e),e&&n(e),n(null,new Uint8Array(o))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,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,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);try{l.eme()}catch(e){}return d}if("Chrome"===a||"Firefox"===a){var s={src:o.url,type:"application/dash+xml",keySystemOptions:[]};return s.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),s}if("IE"===a){var u={src:r.url,type:"application/dash+xml",keySystemOptions:[]};return u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u}};var oe=function(e){X=e},ie=function(){return X},re=function(){return J},ae=function(){return $},le=function(e){$=e},de=function(e){Q=new Map,e.map((function(e,t){Q.set(e.id,t)}))},se=function(e){if(Q){var t=Q.get(e);le(t+1)}},ue=function(e,t){for(var n=Te(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id==t&&(i.mode="showing")}},ce=function(e,t){for(var n=Te(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id===t&&(i.mode="hidden")}},ve=function(e){var t,n=Te(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind})))||[]},me=function(e,t){var n=Te(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},pe=!1,fe=function(e,t,n){var o=z(t,e,n),i=Te(e);t&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,r=Te(e);if(null!==r.el_){pe=!0;var a={id:e,adTagUrl:"".concat(t,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),pe&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},we=function(e){i(e).play()},he=function(e){i(e).pause()},ge=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},ye=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Ie=function(e){return!!i.getPlayer("".concat(e))},Ee=function(e){return i(e).paused()},Te=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},be=function(e,t,n){var o,i,r;se(t);var a=0,l=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&S(t,n).then((function(e){var t,n,o,i,r,d;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),a=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,l=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedPercentage)||null})).catch((function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){O(t,n).then((function(t){var n,r,d,s,u,c,v,m,p,f,w=null==t?void 0:t.data,h=(null==w||null===(n=w.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;oe(t.data);var g=(null==w||null===(d=w.ads)||void 0===d||null===(s=d.preRoll)||void 0===s||null===(u=s.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==w||null===(v=w.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);g&&fe(e,g,w);var y=Z(w,e);if(y){var I,E,T,b,O,D,S,P,_,C,k,R=null==w||null===(I=w.video)||void 0===I||null===(E=I.gist)||void 0===E?void 0:E.videoImageUrl,A=Te(e);if(A.poster(R),Pe(e,y),A.on("loadstart",(function(){h&&o({status:!0,msg:"Video Loaded",response:w})})),A.on("loadeddata",(function(){N(),o({status:!0,msg:"Video Loaded",response:w})})),A.one("play",(function(){a&&l<95&&A.currentTime(a)})),A.one("error",(function(){var e;i({status:!1,msg:(null==A||null===(e=A.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==w||null===(T=w.video)||void 0===T||null===(b=T.contentDetails)||void 0===b||null===(O=b.closedCaptions)||void 0===O?void 0:O.length)>0||(null==w||null===(D=w.video)||void 0===D||null===(S=D.closedCaptions)||void 0===S?void 0:S.length)>0)P=((null==w||null===(_=w.video)||void 0===_||null===(C=_.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==w||null===(k=w.video)||void 0===k?void 0:k.closedCaptions)).filter((function(e){return"VTT"===e.format})),me(e,P);else!function(e){var t=Te(e);t.remoteTextTracks().tracks_.map((function(e){null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else V(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){_e(t,e,i)}))}))},Oe=function(e,t){var n=Te(e);return n.src(t),new Promise((function(e,t){n.on("loadedmetadata",(function(){e({status:!0,msg:"video loaded"})}))}))},De=function(e){var t=Te(e);if(Se(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},Se=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()},Pe=function(e,t){Te(e).src(t)},_e=function(e,t,n){var o,i,r,a,l,d,s=null==e||null===(o=e.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.errorCode,u=(null==e||null===(r=e.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorMessage)||(null==e?void 0:e.message);Ie(t)&&V(t,(null===(l=window)||void 0===l?void 0:l.customErrors)&&(null===(d=window)||void 0===d?void 0:d.customErrors[s])||"".concat(u)),n&&n({status:!1,response:e,msg:"".concat(u)})},Ce=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden");var t=document.getElementsByClassName("vjs-big-play-button")[0];t&&(t.style.display="none");var n=document.getElementsByClassName("vjs-fullscreen-control")[0];n&&(n.style.display="none")};function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Re(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ke(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ke(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var Ae,Fe,je=function(e,t){var n=Te(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,o,r,a,l,d=this.el(),s=i.dom.getPointerPosition(d,t).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(a=r.CastContext)||void 0===a||null===(l=a.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*s,v.seek()}}))};function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ve(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Le(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Le(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var Ne=[],xe=0,Be=null;function We(e,t,n){var o,i,r,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Fe=(null==t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";var l=null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.profileId,d=Math.floor(e.currentTime()),s=Math.floor(e.duration()),u=null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.xapiKey,c={};"v1"==Fe?c={videoId:Ae,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/s*100),siteOwner:t.siteOwner,userId:t.userId,xApiKey:u}:"v2"==Fe&&(c=Ve({videoId:Ae,watchedTime:Math.floor(e.currentTime()),watchedPercentage:a?100:Math.floor(d/s*100),doneWatching:a,profileId:l},Be&&{seriesId:Be})),D(c,t.token,Fe).then((function(e){})).catch((function(e){})),xe=d+n}var He=function(e,t,n){var o=Te(e);if(o)if(t>=0&&t<=100){var i=parseFloat(t)/100;o.volume(i),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Me=function(e){var t=Te(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var qe=function(t,n,o,i){var r,a,l=i.res,d=i.sres,s=Te(t),u=(null==l||null===(r=l.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;oe(l),s.on("loadstart",(function(){u&&o.resolve({status:!0,msg:"Video Loaded",response:l})})),s.on("loadeddata",(function(){var i;He(t,sessionStorage.getItem("volume")||"100");var r,a,s=ie();(N(),o.resolve(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Ue(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ue(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:l}:{response:l})),null!=n&&n.watchHistory&&null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.enable&&!n.isAnonymousUser)&&function(e,t,n){var o;null!=t&&t.series&&(Be=null==t?void 0:t.videoId),Ne=[],xe=0,Ae=n;var i=(null==t||null===(o=t.watchHistory)||void 0===o?void 0:o.interval)||30,r=Te(e);r&&(r.on("timeupdate",(function(){var e=Math.floor(r.currentTime());Ne.includes(xe)||(e==xe?(Ne.push(e),We(r,t,i)):e>xe&&(xe=e+i))})),r.on("ended",(function(){We(r,t,i,!0)})))}(t,n,null==s||null===(r=s.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id)})),s.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];s.trigger("subtitlechanged",t)})),s.on("subtitlechanged",(function(e,t){var n,o,i,r,a,l,d,s,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S,p=null===(l=window)||void 0===l||null===(d=l.cast)||void 0===d||null===(s=d.framework)||void 0===s||null===(u=s.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,w=p.getMediaSession(),h=w.media.tracks.filter((function(e){return"TEXT"==e.type}));f=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(f)}})),s.on("loadedmetadata",(function(){window.endFirstFrame(s)})),s.one("error",(function(){var e,n;V(t,(null==s||null===(e=s.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==s||null===(n=s.error())||void 0===n?void 0:n.message)||"Some error occured"})})),s.one("play",(function(){null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&s.currentTime(null==n?void 0:n.watchHistoryResumeTime)})),s.on("volumechange",(function(){var e=100*s.volume().toFixed(2);s.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},ze=function(e,t){var n=null==t?void 0:t.skin;"live"==n?import("./skin-eb114c19.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-c2954d04.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-03b9cded.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n&&import("./skin-d2840350.js").then((function(n){n.initialiseSkin(e,t)}))},Ge=function(e){return new Promise((function(t,n){if(Ke(e))n("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!1,o.src=e,document.head.appendChild(o),t()}}))},Ke=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},Ye=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)},Je=function(e,t,n){var o=Te(e);o?t>=0&&t<=o.duration()?(n({status:!0,msg:"Successfully seeked to timestamp : ".concat(t)}),o.currentTime(t)):n({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):n("Cannot find player with id: '".concat(e,"'"))},Xe=function(e,t){var n=Te(e);if(!n)return"Cannot find player with id: '".concat(e,"'");try{return n.playbackRate(t),"Playback speed set to ".concat(t,"x")}catch(e){return"Error: ".concat(e)}},$e=function(e,t){var n=Te(e);n?n.on("timeupdate",(function(){return t(n.currentTime())})):t("Cannot find player with id: '".concat(e,"'"))},Qe=function(e,t){var n=Te(e);n?n.on("ended",(function(){return t(!0)})):t("Cannot find player with id: '".concat(e,"'"))},Ze=function(e){var t=Te(e);return t?t.duration():"Cannot find player with id: '".concat(e,"'")},et=function(e){var t,n=Te(e),o=[];if((null==n||null===(t=n.tech_)||void 0===t?void 0:t.vhs)||!1){var i,r,a=null==n||null===(i=n.tech_)||void 0===i||null===(r=i.vhs)||void 0===r?void 0:r.representations();(null==a?void 0:a.length)>0&&(o=null==a?void 0:a.sort((function(e,t){return(null==e?void 0:e.height)==(null==t?void 0:t.height)?(null==t?void 0:t.bandwidth)-(null==e?void 0:e.bandwidth):(null==t?void 0:t.height)-(null==e?void 0:e.height)})))}else{var l,d,s=null==n||null===(l=n.dash)||void 0===l||null===(d=l.mediaPlayer)||void 0===d?void 0:d.getBitrateInfoListFor("video");(null==s?void 0:s.length)>0&&(o=null==s?void 0:s.sort((function(e,t){return t.height-e.height})))}return o};function tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return c(this,n)}}var nt=i.getComponent("Component"),ot=function(t){u(o,nt);var n=tt(o);function o(t){var r,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,o),r=n.call(this,t,d),e(s(r),"masterRenditions",[]),e(s(r),"addCustomFont",(function(e){var t=i.dom.createEl("div",{className:"font hideCustomFonts"}),n=i.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});i.dom.appendContent(t,n);var o=i.dom.createEl("div",{className:"font-options"});o.style.fontSize="12px",r.fontSizeOptions.map((function(e,t){var n=i.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;r.changeFontSize(t)})),i.dom.appendContent(o,n)})),i.dom.appendContent(t,o),i.dom.appendContent(e,t)})),e(s(r),"resetRenditions",(function(){a(document.getElementsByClassName("rendition")).map((function(e){i.dom.removeClass(e,"selected")}))})),r.playerId=null==d?void 0:d.playerId,r.skin=null==d?void 0:d.skin,r.icon=null==d?void 0:d.icon,r.masterRenditions=[],r.fontSizeOptions=[10,12,14],r.createRenditions(d.renditions),window.height=null,r}return d(o,[{key:"toggleContentOnHover",value:function(e,t){var n=i.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){i.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){i.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){i.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){i.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=i.dom.$(".renditions",this.contentEl()),n=i.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el();i.dom.$(".setting-icon",this.el()).innerHTML="".concat(this.icon," ").concat("live"===this.skin?"  Settings":""," ");var o=i.dom.createEl("div",{className:"content hidden"}),r=i.dom.createEl("div",{innerHTML:"Quality",className:"title"}),a=i.dom.createEl("div",{className:"resolution"});i.dom.appendContent(a,r),this.toggleContentOnHover(n,o);var l=i.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var o,r,a=i.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(r=e.playlist)||void 0===r?void 0:r.attributes.BANDWIDTH))/1048576).toFixed(1),s="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");s="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var u=i.dom.createEl("p",{innerHTML:s,className:"rendition",res:e.height,bandwidth:e.bandwidth});i.dom.appendContent(a,u),i.dom.appendContent(l,a),u.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,it(t.playerId,e.target),i.dom.addClass(u,"selected"))}))})),this.addAutoRendition("nondrm",l),"Safari"!=x()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var o=i.dom.createEl("div",{className:"relative"}),r=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(r,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=i.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});i.dom.appendContent(o,d),i.dom.appendContent(l,o),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,it(t.playerId,e.target),i.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",l)),i.dom.appendContent(a,l),i.dom.appendContent(o,a),i.dom.appendContent(n,o)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var o=null;e&&e.on("cuechange",(function(){var t,n,i=e.activeCues[0];if(console.log((null==i||null===(t=i.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),i&&document.querySelector(".auto.selected")){var r,a,l,d,s,u,c,v;if(null!=i&&null!==(r=i.value)&&void 0!==r&&null!==(a=r.resolution)&&void 0!==a&&a.height&&o!==(null==i||null===(l=i.value)||void 0===l||null===(d=l.resolution)||void 0===d?void 0:d.height))document.querySelector(".auto.selected").innerHTML="Auto ".concat(null==i||null===(c=i.value)||void 0===c||null===(v=c.resolution)||void 0===v?void 0:v.height,"p");o=null==i||null===(s=i.value)||void 0===s||null===(u=s.resolution)||void 0===u?void 0:u.height}}))}},{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"container"}),t=i.dom.createEl("div",{className:"setting-icon"});return i.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var o,r,a,l,d=null===(o=this.player_)||void 0===o||null===(r=o.tech_)||void 0===r?void 0:r.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(a=this.player_)||void 0===a||null===(l=a.tech_)||void 0===l?void 0:l.vhs.selectPlaylist().attributes.BANDWIDTH,u=i.dom.createEl("div",{className:"relative"}),c=i.dom.createEl("p",{innerHTML:"Auto ".concat(d,"p"),className:"rendition auto selected",bandwidth:s,res:d});c.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),i.dom.addClass(c,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,it(n.playerId,null,!0))})),i.dom.appendContent(u,c),i.dom.appendContent(t,u)}else{var v=i.dom.createEl("div",{className:"relative"}),m=i.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",(function(e){n.resetRenditions(),i.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,it(n.playerId,null,!0)})),i.dom.appendContent(v,m),i.dom.appendContent(t,v)}}}]),o}(),it=function(e,t,n){var o,r=Te(e),a=null==t?void 0:t.bandwidth;if((null==r||null===(o=r.tech_)||void 0===o?void 0:o.vhs)||!1){r.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)})),r.handleTechPlaying_();var l=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(l)}),100);var d=i.dom.$(".content");d&&i.dom.addClass(d,"hidden")}else{var s=null==t?void 0:t.qualityIndex;if(n){var u,c;null==r||null===(u=r.dash)||void 0===u||null===(c=u.mediaPlayer)||void 0===c||c.resetSettings()}else{var v,m,p,f;null==r||null===(v=r.dash)||void 0===v||null===(m=v.mediaPlayer)||void 0===m||m.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==r||null===(p=r.dash)||void 0===p||null===(f=p.mediaPlayer)||void 0===f||f.setQualityFor("video",s,!0);var w=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(w)}),100);var h=i.dom.$(".content");h&&i.dom.addClass(h,"hidden")}}},rt=Object.freeze({__proto__:null,playSelectedResolution:it,default:ot}),at=function(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]},lt=function(e){a(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},dt=function(){var e=a(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()}))};var st,ut=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ct=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),vt=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){Ge("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(i)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),Ge("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:ut,loadEMELibrary:ct});function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function pt(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?mt(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):mt(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var ft=function(t,r,a,l){var d,s,u,c,v,m,p,f,w,h,g,y,I,E,T,b=r.res,O=void 0===b?null:b,D=r.sres,S=void 0===D?null:D,P=(null===(d=window)||void 0===d||null===(s=d.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(v=c.getInstance())||void 0===v?void 0:v.S)||void 0,_=null!=a&&a.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==P&&"NOT_CONNECTED"!==P?["html5","chromecast"]:["chromecast","html5"]:["html5"],C=null==O||null===(m=O.video)||void 0===m||null===(p=m.gist)||void 0===p?void 0:p.videoImageUrl,k=(null==O||null===(f=O.video)||void 0===f||null===(w=f.liveDetails)||void 0===w?void 0:w.isDvrEnabled)||!1,R=function(e){var t,n={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(t=window)&&void 0!==t&&t.cast&&(n={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==x()&&(n=Re(Re({},n),{},{airPlay:{addButtonToControlBar:"default"==e.skin,buttonPositionIndex:-6}})),n}(a),A=(null==O||null===(h=O.video)||void 0===h||null===(g=h.streamingInfo)||void 0===g?void 0:g.isLiveStream)||!1,F=(null==a?void 0:a.drmLibrary)||!1,j=(T={controls:!0,playsinline:!0,fluid:!0,muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:("default"==a.skin||"defaultV2"==a.skin||"live"==(null==a?void 0:a.skin))&&{inline:!1},fullscreenToggle:"default"==a.skin||"defaultV2"==a.skin,audioTrackButton:!1,pictureInPictureToggle:(a.skin,!1)},liveui:k},e(T,"autoplay",null==a?void 0:a.autoplay),e(T,"normalizeAutoplay",null==a?void 0:a.autoplay),e(T,"html5",pt(pt({vhs:pt({limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==a||null===(y=a.customData)||void 0===y?void 0:y.overrideNative)&&{overrideNative:!0})},0==(null==a||null===(I=a.customData)||void 0===I?void 0:I.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(E=a.customData)||void 0===E?void 0:E.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(T,"poster",C),e(T,"techOrder",_),e(T,"chromecast",{requestCustomDataFn:function(e){var n=Te(t);console.log(n.textTracksJson_);var o=n.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,n){var o,i,r,a,l,d,s,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var p=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=p;var f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=f}var w=(null==e||null===(o=e.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=w;var h=null==e||null===(r=e.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.runtime;m.duration=h;var g=null==e||null===(l=e.video)||void 0===l||null===(d=l.gist)||void 0===d?void 0:d.title;m.mediaTitle=g;var y=null==e||null===(s=e.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=n,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(O,e,o)}}),e(T,"plugins",R),T),L=i(t,j,function(){var e=n(o.mark((function e(){var n,r,d,s,u,c,v,m,p,f,w,h,g,y,I,E,T,b,D,P,_,C,R,N,B;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A&&l.resolve(pt({status:!0,msg:"Player Initialised"},S?{seriesResponse:S,response:O}:{response:O})),window.initialise(L),window.firstFrame(L),"white"!==window.controlsColor&&Ye(window.controlsColor,L),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),T=null==O||null===(n=O.video)||void 0===n?void 0:n.drmEnabled,b=(null==O||null===(r=O.ads)||void 0===r||null===(d=r.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(u=s.web)||void 0===u?void 0:u.active)&&(null==O||null===(c=O.ads)||void 0===c||null===(v=c.preRoll)||void 0===v||null===(m=v.adTags)||void 0===m||null===(p=m.web)||void 0===p?void 0:p.url),D=null==O||null===(f=O.video)||void 0===f||null===(w=f.liveDetails)||void 0===w?void 0:w.startOverTime,!T&&!F){e.next=16;break}if("Safari"!==x()){e.next=14;break}return e.next=12,ct();case 12:e.next=16;break;case 14:return e.next=16,Promise.all([ct(),ut()]);case 16:k&&je(t,D),b&&fe(t,b,O),(P=Z(O,t))?Pe(t,P):(l.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:O}),V(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==O||null===(h=O.video)||void 0===h||null===(g=h.contentDetails)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0||(null==O||null===(I=O.video)||void 0===I||null===(E=I.closedCaptions)||void 0===E?void 0:E.length)>0)&&(B=(null==O||null===(C=O.video)||void 0===C||null===(R=C.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==O||null===(N=O.video)||void 0===N?void 0:N.closedCaptions),_=B.filter((function(e){return"VTT"===e.format})),me(t,_)),null!=a&&a.disableControls?Ce():ze(t,pt(pt(pt({},a),j),{},{liveVideo:A,isDvrEnabled:k,res:O,sres:S})),qe(t,pt(pt(pt({},a),j),{},{liveVideo:A}),l,{res:O,sres:S});case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function wt(){return{loadVideoInstantly:Oe,onTimeUpdate:$e,getVideoDuration:Ze,onVideoEnded:Qe,init:function(e){return new Promise((function(n,o){var i,r,a,l,d,s,u,c,v;if(!Ie(null==e?void 0:e.playerId)){var m=null==e?void 0:e.videoId,f=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1;window.videoId=m;var w=null==e?void 0:e.token;st=JSON.parse(atob(w.split(".")[1])),window.siteId=null===(r=st)||void 0===r?void 0:r.siteId,window.siteName=null===(a=st)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(l=st)||void 0===l||!l.anonymousId),e.siteOwner=(null===(d=st)||void 0===d?void 0:d.site)||null,e.userId=(null===(s=st)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=st)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",w);var h,g=null==e?void 0:e.playerId,y=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,I=null==e?void 0:e.airplay,E=null==e?void 0:e.apiBaseUrl,T=(null==e||null===(c=e.analytics)||void 0===c?void 0:c.gaId)||null,b=null==e?void 0:e.errors;b&&(window.customErrors=b),window.customData=null==e?void 0:e.customData,E&&(window.playerEntitlementUrl=E),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&("live"===(h=e.skin)||"carousel"===h||"V2"===h||"defaultV2"===h)||(e.skin="default"),Promise.resolve().then((function(){return vt})).then((function(e){e.importIMA()})),!y||null!=e&&e.series||Promise.resolve().then((function(){return vt})).then((function(e){e.importChromecast()})),I&&"Safari"==x()&&Promise.resolve().then((function(){return vt})).then((function(e){e.importAirplay()})),T&&Ge("https://www.googletagmanager.com/gtag/js?id=".concat(T)).then((function(){return e=T,window.dataLayer=window.dataLayer||[],p("js",new Date),void p("config",e);var e})).catch((function(e){}));var D,P=null===(v=document)||void 0===v?void 0:v.getElementById("".concat(g));if(P&&P.addEventListener("contextmenu",(function(e){return e.preventDefault()})),f)(function(e,n){var o=JSON.parse(atob(n.split(".")[1])),i=(null==o?void 0:o.site)||null;return o&&o.countryCode,t({url:L()+"/v3/content/series/".concat(e),params:{site:i},method:"GET",headers:{Authorization:n}})})(null==e||null===(D=e.series)||void 0===D?void 0:D.id,w).then((function(t){var i,r,a,l=t.data,d=t.data.seasons;J=d;var s=m||(null==d||null===(i=d[0])||void 0===i||null===(r=i.episodes)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.id);O(s,w).then((function(t){var i,r,a;window.contentType=null==t||null===(i=t.data)||void 0===i||null===(r=i.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.contentType,oe(t.data),ft(g,{res:null==t?void 0:t.data,sres:l},e,{resolve:n,reject:o})})).catch((function(e){_e(e,g,o)}))})).catch((function(e){_e(e,g,o)}));else O(m,w).then((function(t){var i,r,a,l;window.contentType=null==t||null===(i=t.data)||void 0===i||null===(r=i.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.contentType,oe(null==t?void 0:t.data);var d=null==t?void 0:t.data;null!=e&&e.watchHistory&&null!=e&&null!==(l=e.watchHistory)&&void 0!==l&&l.enable?S(m,w).then((function(t){var i,r,a,l,s,u;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l||l.cb(null==t?void 0:t.data)),e.watchHistoryResumeTime=(null==t||null===(s=t.data)||void 0===s?void 0:s.watchedTime)||null,e.watchedPercentage=(null==t||null===(u=t.data)||void 0===u?void 0:u.watchedPercentage)||null,ft(g,{res:d},e,{resolve:n,reject:o})})).catch((function(t){var i,r,a,l;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l||l.cb(t)),ft(g,{res:d},e,{resolve:n,reject:o})})):ft(g,{res:d},e,{resolve:n,reject:o})})).catch((function(e){_e(e,g,o)}))}}))},getRenditions:et,skip:ge,getPlayer:Te,play:we,pause:he,detectBrowser:x,rewind:ye,loadVideo:Pe,seekToTimeStamp:Je,isPlayerInitialised:Ie,load:be,dispose:De,enableCaptions:ue,disableCaptions:ce,getCaptions:ve,playSelectedResolution:it,getSource:Z,setVolume:He,getVolume:Me,disableControls:Ce,setPlaybackSpeed:Xe}}export{wt as V,et as a,ie as b,at as c,x as d,he as e,ve as f,Te as g,oe as h,P as i,dt as j,lt as k,be as l,le as m,Ee as n,Qe as o,we as p,ae as q,ye as r,ge as s,ce as t,ue as u,it as v,de as w,se as x,re as y,rt as z};
|
package/esm/series-4bd36f9c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import c from"@babel/runtime/regenerator";import l from"video.js";import{i as d,e as p,l as u,h as v,p as m}from"./index-b3dc2a80.js";import{s as f}from"./loader-580278fe.js";import{E as h}from"./icons-538a9479.js";import"video.js/dist/video-js.min.css";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=o(e);if(t){var s=o(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return r(this,i)}}var b,y=l.getComponent("Component"),L=function(e){s(o,y);var r=g(o);function o(e){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,o),i=r.call(this,e,s),a(n(i),"seriesData",[]),i.seriesData=s.seriesData,b=s.playerId;var c=i.el();return x(c,i.seriesData),i}return i(o,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}}]),o}();function w(){return(w=e(c.mark((function e(t,i,n,s){var r;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=sessionStorage.getItem("token"),p(b),f(b),u(b,i,r).then((function(e){v(e.response),m(b)}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;var a=e.episodes.map((function(e,t){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(t+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join(""),c=a;o.innerHTML=c,function(e){d(e).then((function(e){var t=e.data,i=document.querySelectorAll("#progress-div");i&&t.map((function(e,t){e&&e.watchedPercentage&&i[t]&&(i[t].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var l=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(s,r)}));for(var h=function(t){l[t].addEventListener("click",(function(){return function(e,t,i){var n=t.querySelector(".meta-details");t.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),i.forEach((function(t,n){n!==e&&(i[n].classList.remove("episode-active"),i[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(t,p[t],p)})),u[t].addEventListener("click",(function(){return function(e,t,i,n){return w.apply(this,arguments)}(t,f[t].id,i,p)})),e.episodes[t].id==m&&p[t].classList.add("highlight-active-eps")},g=0;g<l.length;g++)h(g)}function x(e,t){e.innerHTML='<div class="hover-div"></div>\n '.concat(h(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,t){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(t),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>')}export{x as customSeasonList,k as handleSeasonChange,L as seriesModule};
|