@viewlift/player-backup 2.0.259-backup → 2.0.261-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/bundle.css +1 -1
- package/cjs/index-eafb9077.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{skin-ed83fbaa.js → skin-066dceed.js} +1 -1
- package/esm/bundle.css +1 -1
- package/esm/index-3860a02a.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{skin-482bc56f.js → skin-5a424471.js} +1 -1
- package/package.json +1 -1
- package/cjs/autoNextVideo-1c6abafe.js +0 -1
- package/cjs/autoNextVideo-7423bae2.js +0 -1
- package/cjs/autoNextVideo-7c491841.js +0 -1
- package/cjs/autoNextVideo-cb31894f.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-258a9a64.js +0 -1
- package/cjs/features-25da73a6.js +0 -1
- package/cjs/features-93cd6de4.js +0 -1
- package/cjs/features-b6127bee.js +0 -1
- package/cjs/generic-29417780.js +0 -1
- package/cjs/generic-29d5b2ec.js +0 -1
- package/cjs/generic-743174bb.js +0 -1
- package/cjs/generic-939a3e97.js +0 -1
- package/cjs/generic-f723dacd.js +0 -1
- package/cjs/icons-1a3febef.js +0 -1
- package/cjs/index-04b27b15.js +0 -1
- package/cjs/index-10d97ab9.js +0 -1
- package/cjs/index-20de6bc7.js +0 -1
- package/cjs/index-2b05c277.js +0 -1
- package/cjs/index-4e9d8827.js +0 -1
- package/cjs/index-5b18b394.js +0 -1
- package/cjs/index-5c93e8c6.js +0 -1
- package/cjs/index-64db4d74.js +0 -1
- package/cjs/index-6593cb6f.js +0 -1
- package/cjs/index-67289ebc.js +0 -1
- package/cjs/index-67e8cb8e.js +0 -1
- package/cjs/index-6bc2d039.js +0 -1
- package/cjs/index-73a1b75f.js +0 -1
- package/cjs/index-8047cfe4.js +0 -1
- package/cjs/index-99c100ab.js +0 -1
- package/cjs/index-afff893e.js +0 -1
- package/cjs/index-c51fccda.js +0 -1
- package/cjs/index-e4393a77.js +0 -1
- package/cjs/index-e5d7c072.js +0 -1
- package/cjs/index-ff85bd1e.js +0 -1
- package/cjs/multicamv2-138af789.js +0 -1
- package/cjs/multicamv2-25acee8c.js +0 -1
- package/cjs/multicamv2-3f9ffd46.js +0 -1
- package/cjs/multicamv2-49af2bae.js +0 -1
- package/cjs/multicamv2-4a67a1c7.js +0 -1
- package/cjs/multicamv2-574b49ad.js +0 -1
- package/cjs/multicamv2-6006b5a5.js +0 -1
- package/cjs/multicamv2-92e2b919.js +0 -1
- package/cjs/multicamv2-ec232dbd.js +0 -1
- package/cjs/multicamv2-ee975960.js +0 -1
- package/cjs/nextEpisodeButton-05a96016.js +0 -1
- package/cjs/nextEpisodeButton-10a8c935.js +0 -1
- package/cjs/nextEpisodeButton-2ba4aa6f.js +0 -1
- package/cjs/nextEpisodeButton-6aebdc8a.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/playlist-9710ef70.js +0 -1
- package/cjs/playlist-a6c55be5.js +0 -1
- package/cjs/playlist-d6f8e3b6.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-602d1f2c.js +0 -1
- package/cjs/series-8bd07d22.js +0 -1
- package/cjs/series-ab2fb794.js +0 -1
- package/cjs/series-c3138dfb.js +0 -1
- package/cjs/series-v2-04bb2f24.js +0 -1
- package/cjs/series-v2-0fe2e1c3.js +0 -1
- package/cjs/series-v2-3578532c.js +0 -1
- package/cjs/series-v2-68886cd2.js +0 -1
- package/cjs/series-v2-693bc5cc.js +0 -1
- package/cjs/series-v2-719c957a.js +0 -1
- package/cjs/series-v2-7d183e67.js +0 -1
- package/cjs/series-v2-8694c212.js +0 -1
- package/cjs/series-v2-a532b003.js +0 -1
- package/cjs/series-v2-b7f70c84.js +0 -1
- package/cjs/series-v2-f67606dc.js +0 -1
- package/cjs/settings-icon-70f8857a.js +0 -1
- package/cjs/skin-02df14d4.js +0 -1
- package/cjs/skin-08a270c1.js +0 -1
- package/cjs/skin-14f83052.js +0 -1
- package/cjs/skin-25191a17.js +0 -1
- package/cjs/skin-29a5361a.js +0 -1
- package/cjs/skin-31d84d3e.js +0 -1
- package/cjs/skin-334830ee.js +0 -1
- package/cjs/skin-3481c5cb.js +0 -1
- package/cjs/skin-3544db58.js +0 -1
- package/cjs/skin-3d6f28e9.js +0 -1
- package/cjs/skin-42117529.js +0 -1
- package/cjs/skin-46d92899.js +0 -1
- package/cjs/skin-5493ce5f.js +0 -1
- package/cjs/skin-56e72a1b.js +0 -1
- package/cjs/skin-572a65a9.js +0 -1
- package/cjs/skin-585353b3.js +0 -1
- package/cjs/skin-5e4b3ad1.js +0 -1
- package/cjs/skin-6e922e32.js +0 -1
- package/cjs/skin-7afabe4c.js +0 -1
- package/cjs/skin-7afce973.js +0 -1
- package/cjs/skin-7e40bdaa.js +0 -1
- package/cjs/skin-7f58ba4c.js +0 -1
- package/cjs/skin-84cac674.js +0 -1
- package/cjs/skin-861125f0.js +0 -1
- package/cjs/skin-87c06e34.js +0 -1
- package/cjs/skin-91814213.js +0 -1
- package/cjs/skin-98b66c5d.js +0 -1
- package/cjs/skin-999521e6.js +0 -1
- package/cjs/skin-9bfe9316.js +0 -1
- package/cjs/skin-9d420b99.js +0 -1
- package/cjs/skin-ab226d57.js +0 -1
- package/cjs/skin-ae3ca001.js +0 -1
- package/cjs/skin-ae526505.js +0 -1
- package/cjs/skin-af838b06.js +0 -1
- package/cjs/skin-b671419f.js +0 -1
- package/cjs/skin-bac14ade.js +0 -1
- package/cjs/skin-bf73e43b.js +0 -1
- package/cjs/skin-c1400489.js +0 -1
- package/cjs/skin-c2d7c6d3.js +0 -1
- package/cjs/skin-cea29f97.js +0 -1
- package/cjs/skin-cf53c6f8.js +0 -1
- package/cjs/skin-cfa023f1.js +0 -1
- package/cjs/skin-d5a8b61b.js +0 -1
- package/cjs/skin-dbeec98f.js +0 -1
- package/cjs/skin-df2070f9.js +0 -1
- package/cjs/skin-eac05283.js +0 -1
- package/cjs/skin-f0486679.js +0 -1
- package/cjs/skin-f55aefe8.js +0 -1
- package/cjs/util-233dec09.js +0 -1
- package/cjs/util-4769ed5b.js +0 -1
- package/cjs/util-ef2cd61e.js +0 -1
- package/cjs/util-fbe3d806.js +0 -1
- package/cjs/videoSelector-239532a4.js +0 -1
- package/cjs/videoSelector-29fbaa66.js +0 -1
- package/cjs/videoSelector-2d51c4d2.js +0 -1
- package/cjs/videoSelector-642f00ed.js +0 -1
- package/cjs/videoSelector-9b5a4625.js +0 -1
- package/cjs/videoSelector-9d841083.js +0 -1
- package/cjs/videoSelector-a122278c.js +0 -1
- package/cjs/videoSelector-dcbb1d54.js +0 -1
- package/cjs/videoSelector-eddf015c.js +0 -1
- package/cjs/videoSelector-f17b0749.js +0 -1
- package/cjs/videojs-dash5.es-8bc4e9b4.js +0 -1
- package/cjs/videojs-dash5.es-f9629f7f.js +0 -1
- package/cjs/videojs_contrib_dash-018c8bde.js +0 -1
- package/esm/autoNextVideo-15f76d85.js +0 -1
- package/esm/autoNextVideo-281e802c.js +0 -1
- package/esm/autoNextVideo-3d6570ee.js +0 -1
- package/esm/autoNextVideo-d682e36c.js +0 -1
- package/esm/autoNextVideo-f6a502c9.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/features-ab6f492e.js +0 -1
- package/esm/features-c3e53ffd.js +0 -1
- package/esm/features-d7440f39.js +0 -1
- package/esm/generic-1697c09f.js +0 -1
- package/esm/generic-205dfe5c.js +0 -1
- package/esm/generic-2f9efcf1.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-02ed8ded.js +0 -1
- package/esm/index-0ce0e085.js +0 -1
- package/esm/index-0ffc31e8.js +0 -1
- package/esm/index-13b7c455.js +0 -1
- package/esm/index-1d1f438d.js +0 -1
- package/esm/index-403dd12e.js +0 -1
- package/esm/index-433697e2.js +0 -1
- package/esm/index-4a04166e.js +0 -1
- package/esm/index-62e1ef44.js +0 -1
- package/esm/index-7304e60f.js +0 -1
- package/esm/index-a3bbcba7.js +0 -1
- package/esm/index-a7fcd7f8.js +0 -1
- package/esm/index-b507b376.js +0 -1
- package/esm/index-c880c052.js +0 -1
- package/esm/index-cf927b34.js +0 -1
- package/esm/index-d42cceca.js +0 -1
- package/esm/index-e1345c4e.js +0 -1
- package/esm/index-e796a94f.js +0 -1
- package/esm/index-ebda7269.js +0 -1
- package/esm/index-f2d0aa7c.js +0 -1
- package/esm/multicamv2-051519e5.js +0 -1
- package/esm/multicamv2-1297de0f.js +0 -1
- package/esm/multicamv2-2f2829fb.js +0 -1
- package/esm/multicamv2-9166cf23.js +0 -1
- package/esm/multicamv2-a8db4d7f.js +0 -1
- package/esm/multicamv2-bed3a0bc.js +0 -1
- package/esm/multicamv2-c6e6cb68.js +0 -1
- package/esm/multicamv2-e247f9b6.js +0 -1
- package/esm/multicamv2-e85ff8d3.js +0 -1
- package/esm/multicamv2-f8c068cb.js +0 -1
- package/esm/nextEpisodeButton-2a75ce5c.js +0 -1
- package/esm/nextEpisodeButton-38661562.js +0 -1
- package/esm/nextEpisodeButton-a6ef9e2a.js +0 -1
- package/esm/nextEpisodeButton-b348d4b4.js +0 -1
- package/esm/nextEpisodeButton-e79ba9ea.js +0 -1
- package/esm/playlist-0c95a577.js +0 -1
- package/esm/playlist-3b568899.js +0 -1
- package/esm/playlist-78ea48cc.js +0 -1
- package/esm/playlist-b9595b14.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-9dcc32b9.js +0 -1
- package/esm/series-c0b5c787.js +0 -1
- package/esm/series-c73c97f1.js +0 -1
- package/esm/series-v2-04e9add7.js +0 -1
- package/esm/series-v2-10742435.js +0 -1
- package/esm/series-v2-1263db01.js +0 -1
- package/esm/series-v2-52212b58.js +0 -1
- package/esm/series-v2-647dcbf9.js +0 -1
- package/esm/series-v2-81f04cd5.js +0 -1
- package/esm/series-v2-8a8b6f0c.js +0 -1
- package/esm/series-v2-8e5ff7c1.js +0 -1
- package/esm/series-v2-a1083c40.js +0 -1
- package/esm/series-v2-a8491399.js +0 -1
- package/esm/series-v2-b5cece98.js +0 -1
- package/esm/settings-icon-a98e5d8b.js +0 -1
- package/esm/skin-017721f3.js +0 -1
- package/esm/skin-01da91f0.js +0 -1
- package/esm/skin-032174d9.js +0 -1
- package/esm/skin-066d481a.js +0 -1
- package/esm/skin-072ed58b.js +0 -1
- package/esm/skin-0ca780ee.js +0 -1
- package/esm/skin-0f0bb3f9.js +0 -1
- package/esm/skin-130e5b01.js +0 -1
- package/esm/skin-1629e49c.js +0 -1
- package/esm/skin-1a12c6ed.js +0 -1
- package/esm/skin-258904b8.js +0 -1
- package/esm/skin-2a1e18f9.js +0 -1
- package/esm/skin-2f85dae8.js +0 -1
- package/esm/skin-30567c73.js +0 -1
- package/esm/skin-35e4ade3.js +0 -1
- package/esm/skin-3628bdf0.js +0 -1
- package/esm/skin-3ae22d7d.js +0 -1
- package/esm/skin-3e6fd83b.js +0 -1
- package/esm/skin-4ad0fccc.js +0 -1
- package/esm/skin-4cc51263.js +0 -1
- package/esm/skin-508bd0e2.js +0 -1
- package/esm/skin-55857acc.js +0 -1
- package/esm/skin-58b9263c.js +0 -1
- package/esm/skin-5ca6263c.js +0 -1
- package/esm/skin-74d07b0b.js +0 -1
- package/esm/skin-76430de3.js +0 -1
- package/esm/skin-7c5ac76d.js +0 -1
- package/esm/skin-8ceddbe1.js +0 -1
- package/esm/skin-a2bc9871.js +0 -1
- package/esm/skin-b3e77849.js +0 -1
- package/esm/skin-b83f4022.js +0 -1
- package/esm/skin-b8e87cdb.js +0 -1
- package/esm/skin-bff9e3fe.js +0 -1
- package/esm/skin-c05be60d.js +0 -1
- package/esm/skin-c4422587.js +0 -1
- package/esm/skin-c906e1c0.js +0 -1
- package/esm/skin-cb4566f3.js +0 -1
- package/esm/skin-cc9878af.js +0 -1
- package/esm/skin-d555b116.js +0 -1
- package/esm/skin-d8ab9efc.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-e8919754.js +0 -1
- package/esm/skin-e9914c42.js +0 -1
- package/esm/skin-f5b2d1cc.js +0 -1
- package/esm/skin-f9988297.js +0 -1
- package/esm/skin-fdb749ad.js +0 -1
- package/esm/util-5b3b1f9c.js +0 -1
- package/esm/util-80257541.js +0 -1
- package/esm/util-90b9fbc3.js +0 -1
- package/esm/util-b1ec6897.js +0 -1
- package/esm/videoSelector-0c6d2d43.js +0 -1
- package/esm/videoSelector-1cf43fc8.js +0 -1
- package/esm/videoSelector-3c635dc2.js +0 -1
- package/esm/videoSelector-3ebdf49e.js +0 -1
- package/esm/videoSelector-47ad19c9.js +0 -1
- package/esm/videoSelector-9d611c93.js +0 -1
- package/esm/videoSelector-b8f21092.js +0 -1
- package/esm/videoSelector-c8e01367.js +0 -1
- package/esm/videoSelector-c94910d2.js +0 -1
- package/esm/videoSelector-cf7538bf.js +0 -1
- package/esm/videojs-dash5.es-600b6231.js +0 -1
- package/esm/videojs-dash5.es-bc6f319d.js +0 -1
- package/esm/videojs_contrib_dash-f7d94714.js +0 -1
package/cjs/features-25da73a6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-29d5b2ec.js"),s=require("./resolution-9c4872ec.js"),u=require("./skin-eeec7a85.js"),d=require("./localisation-56e0a999.js"),c=require("./player_instance-fcf6a8fb.js");function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addBigMuteButton=function(e,t){Promise.resolve().then(function(){return require("./index-7ae433c7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("MuteButton",n),o.addChild("MuteButton",g({playerId:e},t))})},exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-25cabfc0.js")}).then(function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.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(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=c.getPlayer(e).el(),r=0,n=c.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-4a67a1c7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-138af789.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-6aebdc8a.js")}).then(function(n){var o=n.default,l=c.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=c.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-a6c55be5.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-v2-50cbd77b.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=c.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-602d1f2c.js")}).then(function(n){var o=n.seriesModule,l=c.getPlayer(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]&&n.handleSeasonChange(t[e],e,l,r)})},u=0;u<a.length;u++)s(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-f67606dc.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-0fe2e1c3.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-a419af57.js")}).then(function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.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(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",n}return r(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)},exports.addStartFromBeginningButton=function(e,t){Promise.resolve().then(function(){return require("./start-begin-btn-5adfa5b7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",g({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_}));o.startFromBeginningButton=l})},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-eddf015c.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-dcbb1d54.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addWatchLiveButton=function(e,t){Promise.resolve().then(function(){return require("./watch-live-btn-1c5d2e69.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",g({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_})+1);o.watchLiveButton=l})};
|
package/cjs/features-93cd6de4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-f723dacd.js"),s=require("./renditions-fed22c12.js"),d=require("./skin-3544db58.js"),c=require("./localisation-56e0a999.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-be714e97.js")}).then(function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.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)})},exports.addDBClickFullScreen=function(e){var t=d.getPlayer(e).el(),r=0,n=d.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-49af2bae.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-6006b5a5.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-05a96016.js")}).then(function(n){var o=n.default,l=d.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=d.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-2889487d.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-e46c9615.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-4b9888dd.js")}).then(function(n){var o=n.seriesModule,l=d.getPlayer(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]&&n.handleSeasonChange(t[e],e,l,r)})},c=0;c<a.length;c++)s(c)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-b7f70c84.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-719c957a.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-70f8857a.js")}).then(function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.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)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(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)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-f17b0749.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-9b5a4625.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
|
package/cjs/features-b6127bee.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-743174bb.js"),s=require("./resolution-9c4872ec.js"),u=require("./skin-eeec7a85.js"),d=require("./localisation-56e0a999.js"),c=require("./player_instance-fcf6a8fb.js");function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addBigMuteButton=function(e,t){Promise.resolve().then(function(){return require("./index-7ae433c7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("MuteButton",n),o.addChild("MuteButton",g({playerId:e},t))})},exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-25cabfc0.js")}).then(function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.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(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=c.getPlayer(e).el(),r=0,n=c.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-574b49ad.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-3f9ffd46.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-2ba4aa6f.js")}).then(function(n){var o=n.default,l=c.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=c.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-9710ef70.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-v2-50cbd77b.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=c.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-c3138dfb.js")}).then(function(n){var o=n.seriesModule,l=c.getPlayer(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]&&n.handleSeasonChange(t[e],e,l,r)})},u=0;u<a.length;u++)s(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-04bb2f24.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-3578532c.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-a419af57.js")}).then(function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.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(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",n}return r(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)},exports.addStartFromBeginningButton=function(e,t){Promise.resolve().then(function(){return require("./start-begin-btn-5adfa5b7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",g({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_}));o.startFromBeginningButton=l})},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-9d841083.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-29fbaa66.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addWatchLiveButton=function(e,t){Promise.resolve().then(function(){return require("./watch-live-btn-1c5d2e69.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",g({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_})+1);o.watchLiveButton=l})};
|
package/cjs/generic-29417780.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("./skin-3544db58.js"),l=require("./browser-77c57718.js"),a=require("js-cookie"),d=require("ua-parser-js"),u=require("./captions-07bd3069.js");function s(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function c(e,t){s("event",e,t)}var v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function p(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?m(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var f={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=f.version;var w,g=function(e,t){var n,i,r,l,a,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(a=window)&&void 0!==a&&null!==(d=a.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":y.get()+"".concat(null==v?void 0:v.getVideoDetails),params:p({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":f.version},withCredentials:!0})},I=function(e,t){var n,i,r,l;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:y.get()+v.getLinearChannelDetails,params:p(p(p(p(p({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},E=function(){var e=t(n.mark(function e(t){var i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return i=e.sent,e.abrupt("return",o({url:y.get()+"".concat(null==v?void 0:v.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:p({},t),params:p({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),T=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},h=function(e){var t=e.videoId;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},y=(w=null==v?void 0:v.apiBaseUrl,{set:function(e){e&&(w=e)},get:function(){return w}}),_=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},b=null;function D(){return{set:function(e){e&&(b=e)},get:function(){return b}}}var O,F,P,S,R,L,V=function(){var e=t(n.mark(function e(){var t,i,r;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=D().get(),i=y.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});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)}}(),W=null,C=function(){var e=t(n.mark(function e(){var t;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!_(t)){e.next=6;break}return W||(W=V().then(function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&D().set(r),o||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){W=null})),e.abrupt("return",W);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),A=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){F=e},N=function(){return F},B=function(){return O},M=function(e){P=e},j=function(e){if(S){var t=S.get(e);M(t+1)}},U=(L=0,{set:function(e){e>=0&&(L=e)},get:function(){return L}});function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function H(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var G=0,Y=function(){var e,t,n,i,o,r,l,a=N();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function q(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function z(){var e=window.sessionStorage.getItem("uid");return e||(e=q(),window.sessionStorage.setItem("uid",e),e)}function X(){return J.apply(this,arguments)}function J(){return(J=t(n.mark(function e(){var t,i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.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 K(e){return e?String(e):""}window.initialise=function(e){window.sid=q(),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,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,c(r?"FAILED_TO_START":"DROPPED_STREAM",H({pfm:window.platform,uid:z(),vid:Y(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),c("PLAY",H({pfm:window.platform,uid:z(),vid:Y(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.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}),t&&t("started_video_playback",{"Video ID":Y(),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 t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&G<4)G++,c("BUFFERING",H({pfm:window.platform,uid:z(),vid:Y(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",H({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:z(),vid:Y()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.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 t,n,i,o,r,l;c("AD_REQUEST",H({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:z(),vid:Y(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.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}),c("AD_IMPRESSION",H({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:z(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Y()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.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 t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(G=0,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(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(Q(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var Q=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark(function e(t){var i,r,l,a,d,u,s,c,m,p,f,w,g,I,E,T,h,_,b,D;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return T=e.sent,h=A(T),_=null==h?void 0:h.site,b=null==h?void 0:h.siteId,e.t0=H,e.t1=H,e.t2=H({aid:_,cid:b,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=z(),e.t5=Y(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(a=t.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?K(t.adPosition):"",e.next=26,X();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(m=t.bufferHealth)&&void 0!==m?m: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==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(w=f.beacon)||void 0===w?void 0:w.params,e.t31=(0,e.t0)(e.t29,e.t30),D=[e.t31],o({url:(null===(g=window)||void 0===g||null===(I=g.customData)||void 0===I||null===(E=I.beacon)||void 0===E?void 0:E.url)||y.get()+v.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:D}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(t){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 Z=function(){var e=U.get();return e>=0?e+1:1},$=function(){var e,t,n,i=B(),o=N(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=U.get(),a=null==i||null===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function te(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}window._deviceInfo=d.UAParser(navigator.userAgent);var ne=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},ie=function(e){var t=oe(e,"video.tags",[]),n=oe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},oe=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},re=function(){var e,t,n,i,o,l,d,u,s,c,v,m,p,f,w,g,I,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",P=(null==D||null===(e=D[F])||void 0===e?void 0:e.metadata)||(null==D||null===(t=D[F])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),S=r.getPlayer(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)),C="linearchannel"===F?null==D||null===(i=D.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(l=o.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===l||null===(d=l.content)||void 0===d?void 0:d.id:oe(D,"video.gist.id",""),A="linearchannel"===F?null==D||null===(u=D.linearchannel)||void 0===u||null===(s=u.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:oe(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),x=null,N=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){x=null==e?void 0:e.gppString,N=null==e?void 0:e.sectionList[0]}));var B=te(te({},le(P)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ne(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:oe(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==S||null===(m=S.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==S||null===(p=S.options_)||void 0===p?void 0:p.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==O?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ie(D),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(oe(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+oe(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:oe(null===(f=window)||void 0===f||null===(w=f.app_data)||void 0===w||null===(g=w.site)||void 0===g?void 0:g.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:oe(null===(I=window)||void 0===I||null===(E=I.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*oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:A,VIEWLIFT_CONTENT_SERIES_TITLE:oe(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:oe(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:$(),VIEWLIFT_SEASON_NUMBER:Z(),VIEWLIFT_CONTENT_TAGS:ie(D),VIEWLIFT_GPP_SID:N||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:x||"VIEWLIFT_GPP"},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var M in B){var j=new RegExp(M,"g");_=_.replace(j,B[M])}return _},le=function(e){var t,n,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===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.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.isMobile()?s?d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),d=l.isMobile()?te(te({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):te(te({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),d=l.isMobile()?te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d=te(te({},d),{},{VIEWLIFT_AFID:u.get("afid")})},ae=function(e,t){var n,i,o,r,a,d,u,s,c,v,m,p,f,w=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,I=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===(d=e[w])||void 0===d||null===(u=d.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===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ue(E);if(g){var y=se(I,t);return y.src=re(y.src,t,e),y}if("Safari"!==l.detectBrowser()&&h)return de(I);if(T){var _=ue(I);return _.src=re(_.src,t,e),_}if(null!=I&&I.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return b.src=re(b.src,t,e),b}return null},de=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},ue=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},se=function(e,t){var n=e.fairPlayCmaf||e.fairPlay,o=e.widevine,a=e.playReady,d=l.detectBrowser();if(r.getPlayer(t),"Safari"===d){var u=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,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(n);return ce(t),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(ce(t),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 ce=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==l.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ve=function(e,t){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.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 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(t),o.appendChild(r),i.append(o)}}},me=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var pe=!1,fe=function(e,t,n){var i=re(t,e,n),o=r.getPlayer(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,l=r.getPlayer(e);if(null!==l.el_){pe=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),pe&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}var ge=function(e){return!!i.getPlayer("".concat(e))},Ie=function(){var e=t(n.mark(function e(t,i){var o,l,a,d=arguments;return n.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,C();case 3:return l=e.sent,a=r.getPlayer(t),e.abrupt("return",new Promise(function(e,n){I(i,l).then(function(n){var r=null==n?void 0:n.data;window.sid=q(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=ae(r,t);x(r),l&&o?(he(t,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){n({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Ee=function(){var e=t(n.mark(function e(t,i,o){var l,a,d,s,c,v;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return s=e.sent,(B()||null)&&j(i),c=0,v=0,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(d=a.watchHistory)&&void 0!==d&&d.enable&&T(i,s).then(function(e){var t,n,i,o,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,v=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,n){g(i,s).then(function(i){var o,l,a,d,s,m,p,f,w,g,I=null==i?void 0:i.data,E=(null==I||null===(o=I.video)||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;x(i.data);var T=(null==I||null===(a=I.ads)||void 0===a||null===(d=a.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(m=s.web)||void 0===m?void 0:m.active)&&(null==I||null===(p=I.ads)||void 0===p||null===(f=p.preRoll)||void 0===f||null===(w=f.adTags)||void 0===w||null===(g=w.web)||void 0===g?void 0:g.url);T&&fe(t,T,I);var h=ae(I,t);if(h){var y,_,b,D,O,F,P,S,R,L,V,W,C,A,N=(null==I||null===(y=I.video)||void 0===y||null===(_=y.gist)||void 0===_?void 0:_.videoImageUrl)||(null==I||null===(b=I.video)||void 0===b||null===(D=b.gist)||void 0===D||null===(O=D.imageGist)||void 0===O?void 0:O.r16x9),B=r.getPlayer(t);if(B.poster(N),he(t,h),B.on("loadstart",function(){E&&e({status:!0,msg:"Video Loaded",response:I})}),B.on("loadeddata",function(){me(),e({status:!0,msg:"Video Loaded",response:I})}),B.one("play",function(){c&&v<95&&setTimeout(function(){B.currentTime(c)},0)}),B.one("error",function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==I||null===(F=I.video)||void 0===F||null===(P=F.contentDetails)||void 0===P||null===(S=P.closedCaptions)||void 0===S?void 0:S.length)>0||(null==I||null===(R=I.video)||void 0===R||null===(L=R.closedCaptions)||void 0===L?void 0:L.length)>0)V=((null==I||null===(W=I.video)||void 0===W||null===(C=W.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==I||null===(A=I.video)||void 0===A?void 0:A.closedCaptions)).filter(function(e){return"VTT"===e.format}),u.addCaptions(t,V);else u.removeCaptions(t)}else ve(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){ye(e,t,n,i)})}));case 9:case"end":return e.stop()}},e)}));return function(t,n,i){return e.apply(this,arguments)}}(),Te=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()},he=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},ye=function(t,n,i,o){var r,l,a,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);ge(n)&&ve(n,(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(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?we(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):we(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.authenticateLC=Ie,exports.baseUrlManager=y,exports.clearError=me,exports.createIdxMapping=function(e){S=new Map,e.map(function(e,t){S.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;h({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),R=n}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=r.getPlayer(e);if(Te(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getCurrentSeries=B,exports.getCurrentVideo=N,exports.getDecodedToken=A,exports.getEntitlementData=function(e,t,n,i){return o({url:n,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:t},withCredentials:!0})},exports.getEpisodeNumber=$,exports.getLinearChannelDetails=I,exports.getSeasonNumber=Z,exports.getSeriesDetails=function(e,t){var n,i,r=A(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})}):o({url:y.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=h,exports.getSeriesWatchMap=function(){return R},exports.getSource=ae,exports.getToken=C,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=z,exports.getVideoDetails=g,exports.getVideoIdx=function(){return P},exports.getVideoInfo=T,exports.handleError=ve,exports.initialiseAdvertisement=fe,exports.initiateErrorHandling=ye,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=ge,exports.isTokenExpired=_,exports.load=Ee,exports.loadVideo=he,exports.loadVideoInstantly=function(e,t,n){var i=r.getPlayer(e);return i.src(t),new Promise(function(e,t){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=D,exports.replaceMacros=re,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],s("js",new Date),s("config",e)},exports.saveWatchHistory=E,exports.seasonIdxManager=U,exports.setCurrentSeries=function(e){O=e},exports.setCurrentVideo=x,exports.setVideoIdx=M,exports.setVideoIdxById=j,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
package/cjs/generic-29d5b2ec.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("axios"),i=require("./player_instance-fcf6a8fb.js"),l=require("md5"),a=require("js-cookie"),d=require("./currentVideoInfo-5802821b.js"),u=require("./captions-68e263dd.js"),s=require("@babel/runtime/helpers/typeof"),c=require("./skin-eeec7a85.js"),v=require("@babel/runtime/helpers/toConsumableArray"),f=require("@babel/runtime/helpers/slicedToArray"),m=require("@viewlift/comscore/index.js");function p(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function g(e,n){p("event",e,n)}var h={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 y(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 w(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?y(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):y(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var E={name:"@viewlift/player",version:"2.1.23",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/sse":"^0.0.3","@viewlift/comscore":"^1.0.9",axios:"^1.2.3",md5:"^2.3.0","broadcast-channel":"^7.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","jwt-decode":"^4.0.0","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=E.version;var I,T=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":A.get()+"".concat(null==h?void 0:h.getVideoDetails)},b=function(e,n){var t,o,i,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:T(),params:w({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":E.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},S=function(e,n){var t,o,i,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:A.get()+h.getLinearChannelDetails,params:w(w(w(w(w({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},(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===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},_=function(){var e=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:return o=e.sent,e.abrupt("return",r({url:A.get()+"".concat(null==h?void 0:h.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:w({},n),params:w({},(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)}}(),O=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:A.get()+"".concat(null==h?void 0:h.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},P=function(e){var n=e.videoId;return r({method:"GET",url:A.get()+"".concat(null==h?void 0:h.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},A=(I=null==h?void 0:h.apiBaseUrl,{set:function(e){e&&(I=e)},get:function(){return I}}),D=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},L=null;function k(){return{set:function(e){e&&(L=e)},get:function(){return L}}}var C=function(){var e=n(t.mark(function e(){var n,o,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=k().get(),o=A.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);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)}}(),R=null,F=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"))||!D(n)){e.next=6;break}return R||(R=C().then(function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&k().set(i),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){R=null})),e.abrupt("return",R);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),j=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function V(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 N(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?V(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var x=0,W=null,M=!1,U=function(){var e,n,t,o,r,i,l,a=d.getCurrentVideo();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.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==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(r=a.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function B(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function H(){return G.apply(this,arguments)}function G(){return(G=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:if(n=e.sent,o=j(n),!(r=null==o?void 0:o.userId)){e.next=9;break}return e.abrupt("return",r);case 9:return r=B(),window.sessionStorage.setItem("uid",r),e.abrupt("return",r);case 12:case"end":return e.stop()}},e)}))).apply(this,arguments)}function q(){return Q.apply(this,arguments)}function Q(){return(Q=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Y(e){return e?String(e):""}window.initialise=function(e){window.sid=B(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e),z(e),K(e)};var z=function(e){e.on("play",function(){"pause"!==W||e.scrubbing()||(W="play",g("RESUME",{pfm:window.platform,uid:H(),vid:U(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"RESUME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))}),e.on("pause",function(){setTimeout(function(){M||(W="pause",g("PAUSE",{pfm:window.platform,uid:H(),vid:U(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"PAUSE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))},50)})},K=function(e){if(e){var n=0,t=0,o=0,r=0;e.on("timeupdate",i),e.on("seeking",function(){if(M)return;M=!0,e.off("timeupdate",i),e.one("seeked",l)}),e.on("seeked",l)}function i(){n=t,t=Math.floor(e.currentTime()),n<t&&(r=n,n=t)}function l(){var n,t;o=Math.floor(e.currentTime());var l=Math.floor(o-r);if(0!==l&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")){var a=l>0?"SEEK_FORWARD":"SEEK_BACKWARD";g(a,{pfm:window.platform,uid:H(),vid:U(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:a,videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}r=Math.floor(e.currentTime()),setTimeout(function(){M=!1},50),e.on("timeupdate",i)}};window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,o,r,i=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,g(i?"FAILED_TO_START":"DROPPED_STREAM",N({pfm:window.platform,uid:H(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:n===i?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var o,r,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),W="play",g("PLAY",N({pfm:window.platform,uid:H(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(i=r.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",N({"Video ID":U(),watchTime:Math.floor(e.currentTime())},t))}))},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=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,o;if(n.el_){var r,i,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(o=t.className)&&void 0!==o&&o.includes("vjs-waiting")&&x<4)x++,g("BUFFERING",N({pfm:window.platform,uid:H(),vid:U(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,g("FIRST_FRAME",N({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:H(),vid:U()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.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 n,t,o,r,i,l;g("AD_REQUEST",N({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:H(),vid:U(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),g("AD_IMPRESSION",N({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:H(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:U()},null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.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)&&(x=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(),o=e.buffered(),r=0;r<o.length;r++){var i=o.start(r),l=o.end(r);if(X(n,i,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var X=function(e,n,t){return e>=n&&e<=t},J=function(){var e,n=d.getCurrentVideo(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=n(t.mark(function e(n){var o,i,l,a,d,u,s,c,v,f,m,p,g,y,w,E,I,T,b,S,_;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:return I=e.sent,T=j(I),b=null==T?void 0:T.site,S=null==T?void 0:T.siteId,e.t0=N,e.t1=N,e.t2=N({aid:b,cid:S,pfm:window.platform},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.params),e.t3={},e.next=12,H();case 12:return e.t4=e.sent,e.t5=U(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a: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?Y(n.adPosition):"",e.next=28,q();case 28:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(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=null!==(f=J())&&void 0!==f?f:null,e.t28=null!=b?b:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t33=(0,e.t0)(e.t31,e.t32),_=[e.t33],r({url:(null===(y=window)||void 0===y||null===(w=y.customData)||void 0===w||null===(E=w.beacon)||void 0===E?void 0:E.url)||A.get()+h.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:_}).catch(function(e){console.error(e)});case 46:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var $=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"},Z=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},ee=function(){var e=d.seasonIdxManager.get();return e>=0?e+1:1},ne=function(){var e,n,t,o=d.getCurrentSeries(),r=d.getCurrentVideo(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,l=d.seasonIdxManager.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===i});return a>=0?a+1:1};function te(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 oe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?te(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):te(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var re=l,ie=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},le=function(e){var n=ae(e,"video.tags",[]),t=ae(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},ae=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},de=function(){var n,t,o,r,l,d,u,s,c,v,f,m,p,g,h,y,w,E,I,T,b,S,_,O,P,A,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",L=arguments.length>1?arguments[1]:void 0,k=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return D;var C=(null==k?void 0:k.siteName)||(null==k?void 0:k.site)||"",R=(null==k?void 0:k.contentType)||"video",F=(null==k||null===(o=k[R])||void 0===o?void 0:o.metadata)||(null==k||null===(r=k[R])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),j=i.getPlayer(L);if(!D.includes("VIEWLIFT_"))return D;var V,N=window.getComputedStyle(document.getElementById(L),null),x=Math.trunc(N.getPropertyValue("height").slice(0,-2)),W=Math.trunc(N.getPropertyValue("width").slice(0,-2)),M="linearchannel"===R?null==k||null===(d=k.linearchannel)||void 0===d||null===(u=d.channels)||void 0===u||null===(s=u.find(function(e){return(null==e?void 0:e.id)===(null==k?void 0:k.channelId)}))||void 0===s||null===(c=s.content)||void 0===c?void 0:c.id:ae(k,"video.gist.id",""),U="linearchannel"===R?null==k||null===(v=k.linearchannel)||void 0===v||null===(f=v.channels)||void 0===f||null===(m=f.find(function(e){return(null==e?void 0:e.id)===(null==k?void 0:k.channelId)}))||void 0===m?void 0:m.title:ae(k,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),B=null,H=null;"function"==typeof window.__gpp&&(null===(V=window)||void 0===V||V.__gpp("ping",function(e){B=null==e?void 0:e.gppString,H=null==e?void 0:e.sectionList[0]}));var G=a.get("us_privacy")||a.get("usprivacy"),q=void 0!==G?G:"1YNN",Q=null!==(p=null===(g=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===g?void 0:g.fwIdentifier)&&void 0!==p?p:null,Y=oe(oe({},ue(F)),{},(O={VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:x,VIEWLIFT_SIZE:ie(W,x),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(h=window)||void 0===h?void 0:h.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ae(k,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ae(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ae(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==j||null===(y=j.options_)||void 0===y?void 0:y.autoplay)||1,VIEWLIFT_MUTE:(null==j||null===(w=j.options_)||void 0===w?void 0:w.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==C||"usanetwork"==C?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:le(k),VIEWLIFT_MEDIA_ID:M,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ae(k,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:M,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ae(k,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ae(null===(E=window)||void 0===E||null===(I=E.app_data)||void 0===I||null===(T=I.site)||void 0===T?void 0:T.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==C||"usanetwork"==C?"":ae(null===(b=window)||void 0===b||null===(S=b.app_data)||void 0===S||null===(_=S.site)||void 0===_?void 0:_.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:q,VIEWLIFT_TVE_PROVIDER:Q?re(Q):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*ae(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ae(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:M,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:ae(k,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ae(k,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ne(),VIEWLIFT_SEASON_NUMBER:ee(),VIEWLIFT_CONTENT_TAGS:le(k),VIEWLIFT_GPP_SID:H||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:B||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(O,"VIEWLIFT_LAT",""),e(O,"VIEWLIFT_APP_BUNDLE",""),e(O,"VIEWLIFT_ATT_CONSENT",""),O),null===(P=window)||void 0===P||null===(A=P.customData)||void 0===A?void 0:A.macros);for(var z in Y){var K=new RegExp(z,"g");D=D.replace(K,Y[z])}return D},ue=function(e){var n,t,o,r,i,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)}));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,s=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.subscription)||void 0===l?void 0:l.TVE)||!1;return u||s?(Z()?u?a=oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(a=oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?a=oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(a=oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?a=oe(oe({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):s&&(a=oe(oe({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=Z()?oe(oe({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):oe(oe({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=oe(oe({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=Z()?oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=oe(oe({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:d.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},se=function(e,n){var t,o,r,i,l,a,d,u,s,c,v,f,m,p=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,h=null==e||null===(o=e[p])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,y=null==e||null===(i=e[p])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(a=e[p])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[p])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[p])||void 0===v||null===(f=v.streamingInfo)||void 0===f||null===(m=f.videoAssets)||void 0===m?void 0:m.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return ve(y);if(g){var I=fe(h,n);return I.src=de(I.src,n,e),I}if("Safari"!==$()&&E)return ce(h);if(w){var T=ve(h);return T.src=de(T.src,n,e),T}if(null!=h&&h.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(h);return b.src=de(b.src,n,e),b}return null},ce=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ve=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},fe=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=$();if(i.getPlayer(n),"Safari"===d){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 r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&i(e),i(null,t)})}}}}}(r);return me(n),u}var s,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(me(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var me=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==$()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},pe=function(e,n){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},ge=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var he=!1,ye=function(e,n,t){var o=de(n,e,t),r=i.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima&&"object"!==s(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,l=i.getPlayer(e);if(null!==l.el_){he=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),he&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};var we,Ee=(we=!0,{enable:function(){we=!0},disable:function(){we=!1},get enabled(){return we}}),Ie="ssai-breakStart",Te="ssai-adImpression",be="ssai-firstQuartile",Se="ssai-midpoint",_e="ssai-thirdQuartile",Oe="ssai-complete",Pe="ssai-breakEnd",Ae={breakStart:Ie,impression:Te,firstQuartile:be,midpoint:Se,thirdQuartile:_e,complete:Oe,breakEnd:Pe};function De(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Ae[o];r&&t.trigger(r,n)}function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ke(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Le(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ce,Re=(Ce=null,{get:function(){return Ce},set:function(e){Ce=e}});function Fe(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 je(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Fe(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function Ve(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 Ne(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)?Ne(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 Ne(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 xe,We=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Me=(xe=null,{set:function(e){xe=e},get position(){return xe}});function Ue(e,n){return Be.apply(this,arguments)}function Be(){return(Be=n(t.mark(function e(n,o){var r,l,a,d,u,s,c,v,m,p,g,h,y,w,E,I,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),a=se(o,n),d=a.src,u=(null==o?void 0:o.contentType)||"video",null==o||null===(r=o[u])||void 0===r||null===(l=r.streamingInfo)||void 0===l||l.isLiveStream,s=d.replace("/dash/","/session/").replace("/master/","/session/"),s=de(s,n,o),c=Ge(s),v=f(c,2),m=v[0],p=v[1],g=He(p)||{},s=new URL(s.split("?")[0]),Object.keys(p).length>0&&Object.entries(p).forEach(function(e){var n=f(e,2),t=n[0],o=n[1];s.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je({adsParams:je({},m)},g))});case 14:return h=e.sent,e.next=17,h.json();case 17:return y=e.sent,w="https://"+new URL(s).hostname,E=y.trackingUrl,I=y.manifestUrl,T=w+E,b=w+I,We.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function He(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=f(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function Ge(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=Ve((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=f(t.value,2),l=i[0],a=i[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){r.e(e)}finally{r.f()}for(var d={},u={},s=0,c=Object.entries(n);s<c.length;s++){var v=f(c[s],2),m=v[0],p=v[1];if(m.startsWith("ads."))d[m.replace(/^ads\./,"")]=p;else u[m]=p}return[d,u]}var qe,Qe,Ye,ze,Ke=(qe=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),qe=Array.isArray(e)?v(e):qe},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",qe),v(qe)}}),Xe=new Map;function Je(e,n){return $e.apply(this,arguments)}function $e(){return $e=n(t.mark(function e(o,r){var l,a,d,u,s,f,m,p,g,h,y,w,E,I,T,b,S,_,O,P,A,D,L,k,C,R;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:R=function(e,n,t,r,l,a){var d,u,s=i.getPlayer(o);if(!s.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds;var v=(null==n||null===(d=n.ads)||void 0===d||null===(u=d[r])||void 0===u?void 0:u.adId)||c;e<k&&L.clear(),k=e,Math.floor(s.currentTime());var f,m=Ve(t);try{var p=function(){var t,i,l,d=f.value,u=d.eventType,m=d.beaconUrls,p=d.startTimeInSeconds,g=d.startTime,h=d.durationInSeconds,y=p||c,w=m,E=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(l=i.ads)||void 0===l?void 0:l.adEventHandler)||null,I="".concat(v,"_").concat(u),T="pod-".concat(c);Xe.has(T)||Xe.set(T,new Set);var b=Xe.get(T);if(console.warn(e,y,"map:",u,"condition1:",e>=y,"map:",Xe),e>=y&&e<=y+D){if(!b.has(I)){b.add(I);try{C(u,n,w,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,u,n)}if("breakEnd"==u){var S=Me.position;Me.set(null),setTimeout(function(){null!=S&&(s.currentTime(S),a())},500)}if("function"==typeof E)try{var _,O={eventType:u,startTimeInSeconds:p,startTime:g,durationInSeconds:h,ad:null==n||null===(_=n.ads)||void 0===_?void 0:_[r],pod:n,adIndex:r};E({adsData:O}),De(o,O)}catch(e){console.error("Error when calling ads callback:",e)}}var P=Re.get();if(P&&0!==Object.keys(P).length){var A=P.formulateComscoreAdPayload,k=P.startComscoreAdTracking,R=P.finishComscoreAdTracking,F=P.endComscoreAdTracking,j="".concat(y,"_").concat(v,"_").concat(u);if(!L.has(j))if(L.set(j,!0),"impression"===u){var V,N=We.get();k(A(je(je({},null==n||null===(V=n.ads)||void 0===V?void 0:V[r]),{},{trackingUrl:N})))}else"complete"===u?R():"breakEnd"===u&&F()}}};for(m.s();!(f=m.n()).done;)p()}catch(e){m.e(e)}finally{m.f()}}},C=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Xe.clear(),Me.set(r),g=We.get(),(h=i.getPlayer(o)).one("loadeddata",function(){g&&P(g)}),y=new Map,w=new Map,E=-1,I=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,T=(null==h||null===(d=h.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,b=(null==h||null===(u=h.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,S=(null==h||null===(s=h.el())||void 0===s||null===(f=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===f?void 0:f[0])||null,_=(null==h||null===(m=h.el())||void 0===m||null===(p=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,O=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return v(o);var r=[],i=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==i||null===(e=i.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),u=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!u&&l){var s=null==d?void 0:d.map(function(e){return je(je({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&r.push(null==s?void 0:s[0])}return r},P=function(){var e=n(t.mark(function e(n){var l,a,d,u,s,f,m,p,g,h,P,D,L,k,C,F,j,V,N,x,W,M,U,B;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return x=function(e){document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",x),0===e.button&&j()},N=function(e){},V=function(){var e,n=h.currentTime(),t=null,o=Ve(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},j=function(){var e,n=h.currentTime(),t=null,o=Ve(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,d=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>i)&&!y.has(i)||n>=i&&n<=d)&&(t=i,y.set(i,!0),w.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t-.4)},100))},s=!1,e.next=7,fetch(n);case 7:return f=e.sent,e.next=10,f.json();case 10:m=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",m),p=m.avails,g=[],h=i.getPlayer(o),P=h.controlBar.progressControl,D=P.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(s=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!s&&r&&(h.currentTime(r),V()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g,"function"==typeof(F=(null===(L=window)||void 0===L||null===(k=L.customData)||void 0===k||null===(C=k.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&(null==g?void 0:g.length)>0&&F(g)),console.log(g,"data"),g.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=h.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",D.appendChild(i)}}),h._timeUpdateHandler&&h.off("timeupdate",h._timeUpdateHandler),h._timeUpdateHandler=c.throttle(function(){var e=h.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=g[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-4&&e<=a+4){var d;e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&y.set(r,!0),Ee.disable(),I&&I.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),P.el().classList.add("hide-progress-bar");for(var u=e-r,s=0,c=0,f=0;f<l.length;f++){var m,p=null==l||null===(m=l[f])||void 0===m?void 0:m.durationInSeconds;if(u<s+p){c=f;break}s+=p}l[c];var h=Math.max(0,i-u),E=Math.round(h);W.style.display="block",B.textContent="".concat(c+1," of ").concat(l.length," • ").concat(A(E));var O=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});O.push.apply(O,v(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&O.push.apply(O,v(null==t?void 0:t.podSlotImpressionBeacon)),R(e,t,O,c,0,V),"break"}w.delete(r)},o=0;o<g.length;o++){if("break"===t())break}n||(W.style.display="none",P.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),I&&I.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),Ee.enable())}},1e3),h.on("timeupdate",h._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){Ee.enabled&&"ArrowRight"==e.key&&(j(),sn(o,10),e.stopPropagation())}),P.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",x))}),null===(d=document)||void 0===d||null===(u=d.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach(function(e){return null==e?void 0:e.remove()}),(W=document.createElement("div")).className="ssai-ad-container",(M=document.createElement("div")).className="sponsored-adbox",(U=document.createElement("div")).className="sponsored-text",U.textContent="Sponsored Ad",M.append(U),(B=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",W.append(M),W.append(B),h.el().appendChild(W);case 45:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=1.5,L=new Map,k=-1;case 21:case"end":return e.stop()}},e)})),$e.apply(this,arguments)}function Ze(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 en(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)?en(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 en(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 nn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function tn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):nn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var on={},rn=(null===(Qe=window)||void 0===Qe||null===(Ye=Qe.location)||void 0===Ye||null===(ze=Ye.search)||void 0===ze?void 0:ze.includes("debug=true"))||!1,ln=null;function an(e){return dn.apply(this,arguments)}function dn(){return dn=n(t.mark(function e(o){var r,l,a,d,u,s,f,m,p,g,h,y,w,E,I,T,b,S,_,O,P,A,D,L,k,C,R;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:R=function(e,n,t,r,l){var a,d,u=i.getPlayer(o);if(!u.seeking()){var s=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[r])||void 0===d?void 0:d.adId)||s;Math.floor(u.currentTime());var v,f=Ze(t);try{for(f.s();!(v=f.n()).done;){var m,p,g,h=v.value,y=h.eventType,w=h.beaconUrls,E=h.startTimeInSeconds,I=h.startTime,T=h.durationInSeconds,b=(h.eventId,E||s),S=w,_=(null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(g=p.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(y),P="pod-".concat(s);L.has(P)||L.set(P,new Set);var A=L.get(P);if(rn&&console.warn(e,b,"map:",y,"condition1:",e>=b,"map:",L),e>=b&&e<=b+k&&!A.has(O)){A.add(O);try{C(y,n,S,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,n)}if("function"==typeof _)try{var D,R={eventType:y,startTimeInSeconds:E,startTime:I,durationInSeconds:T,ad:null==n||null===(D=n.ads)||void 0===D?void 0:D[r],pod:n,adIndex:r};_({adsData:R}),De(o,R)}catch(e){console.error("Error when calling ads callback:",e)}var F=Re.get();if(F&&0!==Object.keys(F).length){var j=F.formulateComscoreAdPayload,V=F.startComscoreAdTracking,N=F.finishComscoreAdTracking,x=F.endComscoreAdTracking;if("impression"===y){var W,M=We.get();V(j(tn(tn({},null==n||null===(W=n.ads)||void 0===W?void 0:W[r]),{},{trackingUrl:M})))}else"complete"===y?N():"breakEnd"===y&&x()}}}}catch(e){f.e(e)}finally{f.f()}}},C=function(e,n,t,o){var r,i,l;"breakEnd"===e&&(null===(r=on)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(i=on)||void 0===i?void 0:i.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(rn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},h=function(){ln&&clearInterval(ln)},p=We.get(),(g=i.getPlayer(o)).one("loadeddata",function(){h(),ln=setInterval(function(){p&&!g.paused()&&D(p)},2e3)}),g.on("dispose",function(){h()}),y=new Map,w=new Map,E=-1,I=null,T=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==g||null===(a=g.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,S=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,_=(null==g||null===(u=g.el())||void 0===u||null===(s=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===s?void 0:s[0])||null,O=(null==g||null===(f=g.el())||void 0===f||null===(m=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,P=!1,A=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return v(o);var r=[],i=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==i||null===(e=i.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),u=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!u&&l){var s=null==d?void 0:d.map(function(e){return tn(tn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&r.push(null==s?void 0:s[0])}return r},D=function(){var e=n(t.mark(function e(n){var r,l,a,d,u,s,f,m,p,g,h,D,L,k;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),I&&l.searchParams.append("nextToken",I),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,u=d.avails,s=d.nextToken||null,I=s,f=[],m=i.getPlayer(o),p=m.controlBar.progressControl,g=p.seekBar.el(),null===(r=document)||void 0===r||r.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),u.map(function(e,n){f.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:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),rn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),null!=f&&f.length&&(window.adsQueueList=f,"function"==typeof(k=(null===(h=window)||void 0===h||null===(D=h.customData)||void 0===D||null===(L=D.ads)||void 0===L?void 0:L.onAdBreaksLoaded)||null)&&(null==f?void 0:f.length)>0&&k(f)),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.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",g.appendChild(i)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=c.throttle(function(){var e=m.currentTime();if(e!==E){E=e;for(var n=function(){var n=f[t],o=n.startTimeInSeconds,r=n.durationInSeconds,i=n.ads,l=o+r;if(e>=o-1.2&&e<=l+1.2){var a;P=!!(e>=o&&e<=l&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>l&&y.set(o,!0),Ee.disable(),T&&T.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),S&&(S.el().style.pointerEvents="none",S.el().classList.add("vjs-hidden")),p.el().classList.add("hide-progress-bar");for(var d=e-o,u=0,s=0,c=0;c<i.length;c++){var m,g=null==i||null===(m=i[c])||void 0===m?void 0:m.durationInSeconds;if(d<u+g){s=c;break}u+=g}setTimeout(function(){on.totalAds=null==i?void 0:i.length,on.currentAdIndex=s},1e3);var h=[];return null==i||i.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});h.push.apply(h,v(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&h.push.apply(h,v(null==n?void 0:n.podSlotImpressionBeacon)),R(e,n,h,s),"break"}w.delete(o)},t=0;t<f.length;t++){if("break"===n())break}P||(on={},p.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),S&&(S.el().style.pointerEvents="auto",S.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),Ee.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,k=2.5;case 22:case"end":return e.stop()}},e)})),dn.apply(this,arguments)}function un(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}var sn=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},cn=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},vn=function(e){return!!o.getPlayer("".concat(e))},fn=function(){var e=n(t.mark(function e(o,r){var l,a,u,s=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,F();case 3:return a=e.sent,u=i.getPlayer(o),e.abrupt("return",new Promise(function(e,i){var s=(null==r?void 0:r.programs)||[];null==r||delete r.programs,S(r,a).then(function(){var i=n(t.mark(function n(i){var a,c,v,f,m,p,g,h;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a=null==i?void 0:i.data,window.sid=B(),a.contentType="linearchannel",a.channelId=null==r?void 0:r.channelId,d.setCurrentVideo(a),d.setCurrentEpgPrograms(s),!l){n.next=16;break}if(g=(null==a||null===(c=a.linearchannel)||void 0===c?void 0:c.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(v=window)||void 0===v||null===(f=v.app_data)||void 0===f||null===(m=f.appcmsMain)||void 0===m||null===(p=m.adsConfig)||void 0===p?void 0:p.vodAdSticherProvider)||!1,h=se(a,o),!g){n.next=13;break}return n.next=12,Ue(o,a);case 12:h=n.sent;case 13:h&&(gn(o,h),g&&an(o),u.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:a})})),n.next=17;break;case 16:e({status:!0,msg:"Feed authenticated",response:a});case 17:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){i({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)}}(),mn=function(){var e=n(t.mark(function e(o,r,l){var a,s,c,v,f,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:return v=e.sent,(d.getCurrentSeries()||null)&&d.setVideoIdxById(r),f=0,m=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(c=s.watchHistory)&&void 0!==c&&c.enable&&O(r,v).then(function(e){var n,t,o,r,i,l,a;(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(null==e?void 0:e.data)),f=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(m=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).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))}),e.abrupt("return",new Promise(function(e,l){b(r,v).then(function(){var r=n(t.mark(function n(r){var a,s,c,v,g,h,y,w,E,I,T,b,S,_,O,P,A,D,L,k,C,R,F,j,V,N,x,W,M,U,B,H,G,q,Q,Y,z,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(P=null==r?void 0:r.data,A=(null==P?void 0:P.contentType)||"video",D=(null==P||null===(a=P[A])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(g=v.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,L=(null==P||null===(h=P.video)||void 0===h||null===(y=h.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,d.setCurrentVideo(r.data),(k=(null==P||null===(w=P.ads)||void 0===w||null===(E=w.preRoll)||void 0===E||null===(I=E.adTags)||void 0===I||null===(T=I.web)||void 0===T?void 0:T.active)&&(null==P||null===(b=P.ads)||void 0===b||null===(S=b.preRoll)||void 0===S||null===(_=S.adTags)||void 0===_||null===(O=_.web)||void 0===O?void 0:O.url))&&ye(o,k,P),C=se(P,o),!D){n.next=12;break}return n.next=11,Ue(o,P);case 11:C=n.sent;case 12:C?(H=(null==P||null===(R=P.video)||void 0===R||null===(F=R.gist)||void 0===F?void 0:F.videoImageUrl)||(null==P||null===(j=P.video)||void 0===j||null===(V=j.gist)||void 0===V||null===(N=V.imageGist)||void 0===N?void 0:N.r16x9),(G=i.getPlayer(o)).poster(H),gn(o,C),D&&Je(o,p),G.on("loadstart",function(){L&&e({status:!0,msg:"Video Loaded",response:P})}),G.on("loadeddata",function(){ge(),e({status:!0,msg:"Video Loaded",response:P})}),G.one("play",function(){f&&!D&&m<95&&setTimeout(function(){G.currentTime(f)},0)}),G.one("error",function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==P||null===(x=P.video)||void 0===x||null===(W=x.contentDetails)||void 0===W||null===(M=W.closedCaptions)||void 0===M?void 0:M.length)>0||(null==P||null===(U=P.video)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==P||null===(Q=P.video)||void 0===Q||null===(Y=Q.contentDetails)||void 0===Y?void 0:Y.closedCaptions)||(null==P||null===(z=P.video)||void 0===z?void 0:z.closedCaptions),q=K.filter(function(e){return"VTT"===e.format}),u.addCaptions(o,q)):u.removeCaptions(o)):(pe(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){hn(e,o,l,r)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),pn=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()},gn=function(e,n){var t=i.getPlayer(e);t&&t.src(n)},hn=function(n,t,o,r){var i,l,a,d,u,s,c=null==n||null===(i=n.response)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);vn(t)&&pe(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?un(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):un(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))};exports.adsQueuePointManager=Ke,exports.authenticateLC=fn,exports.baseUrlManager=A,exports.clearError=ge,exports.comscoreInstanceManager=Re,exports.createSeriesWatchMap=function(e,n){var t=new Map;P({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),d.setSeriesWatchMap(t)}).catch(function(e){return console.log(e)})},exports.detectBrowser=$,exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){var n=(Re.get()||{}).destroyComscoreTag,t=i.getPlayer(e);if(pn(),"function"==typeof n&&n(),c.clearEventListeners(),window.onresize=null,t)t.dispose();else{var o=document.getElementById(e);o&&o.remove()}},exports.getDecodedToken=j,exports.getEntitlementData=function(e,n,t,o){var i,l;return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=ne,exports.getLinearChannelDetails=S,exports.getSGAIEnabledSource=Ue,exports.getSeasonNumber=ee,exports.getSeriesDetails=function(e,n){var t,o,i=j(n),l=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):r({url:A.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=P,exports.getSource=se,exports.getSsaiEvents=function(e){var n=i.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Ie,e)},adImpression:function(e){return t(Te,e)},adFirstQuartile:function(e){return t(be,e)},adMidpoint:function(e){return t(Se,e)},adThirdQuartile:function(e){return t(_e,e)},adComplete:function(e){return t(Oe,e)},adBreakEnd:function(e){return t(Pe,e)}}},exports.getToken=F,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},exports.getUserId=H,exports.getVideoDetails=b,exports.getVideoInfo=O,exports.handleError=pe,exports.initialiseAdvertisement=ye,exports.initialiseComscoreStreamingTracking=function(e,n){var t,o,r,l,a,u,s,c,v,f,p,g,h,y,w,E,I=null==e?void 0:e.playerId,T=i.getPlayer(I);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var b=d.getCurrentVideo(),S=(null==b||null===(o=b.video)||void 0===o?void 0:o.metadata)||[],_=(null==S?void 0:S.length)&&S.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=_)&&void 0!==r&&r.length){var O=_.map(function(e){return e.value});_=null==O?void 0:O.join(",")}m.destroyComscoreTag();var P,A,D,L=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,k=Array.isArray(null==L?void 0:L.category)?null==L||null===(a=L.category)||void 0===a?void 0:a.join(","):(null==L?void 0:L.category)||null,C=ke(ke(ke({},null==b?void 0:b.video),null==b?void 0:b.linearchannel),{},{siteName:(null==b?void 0:b.site)||null,programId:(null==L?void 0:L.videotmsid)||null,programTitle:(null==L?void 0:L.lcProgrammeName)||null,episodeId:(null==L?void 0:L.videotmsid)||null,seasonNumber:(null==b||null===(u=b.video)||void 0===u||null===(s=u.series)||void 0===s?void 0:s.seasonNumber)||(null==L||null===(c=L.seriesDetails)||void 0===c?void 0:c.season)||null,episodeNumber:(null==b||null===(v=b.video)||void 0===v||null===(f=v.series)||void 0===f?void 0:f.episodeNumber)||(null==L||null===(p=L.seriesDetails)||void 0===p?void 0:p.episode)||null,episodeTitle:(null==L?void 0:L.lcSubTitle)||null,isCompleteEpisode:!!(null!=b&&null!==(g=b.video)&&void 0!==g&&g.series||null!=L&&null!==(h=L.seriesDetails)&&void 0!==h&&h.episode),genre:_||k,comscoreConfig:{implementationId:(null==e||null===(y=e.comscore)||void 0===y?void 0:y.implementationId)||null,projectId:(null==e||null===(w=e.comscore)||void 0===w?void 0:w.projectId)||null}});if(null!=C&&null!==(E=C.streamingInfo)&&void 0!==E&&E.isLiveStream?C.contentType="LIVE":C.contentType="LONG_FORM_ON_DEMAND",null==C||!C.network){var R,F=(null==C?void 0:C.metadata)||[],j=null==F||null===(R=F.find(function(e){return"network"===e.name}))||void 0===R?void 0:R.value;C.network=j||null}null!=C&&C.network&&null!=C&&C.genre&&(C.customGenre="".concat(C.network,"_").concat((null==C?void 0:C.programTitle)||(P=C,null!=P&&P.series?null==P||null===(D=P.series)||void 0===D?void 0:D.title:null==P||null===(A=P.gist)||void 0===A?void 0:A.title),"_").concat(C.genre)),null!=L&&L.airDate&&(C.publishDate=L.airDate),null!=C&&C.runtime&&(C.runtime=1e3*((null==C?void 0:C.runtime)||0));var V=m.formulateComscorePayload(C,T);console.log("comscoreOptions player data",V),m.createComscoreStreamingTag(ke({playerName:"Video.js"},V)),m.setComscorePlayerInstance(T)}},exports.initialiseKeyboardEvents=function(e,n){var t,o,r,l=i.getPlayer(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,i,u,s,c,v,f,m;if(Ee.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||cn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(u=i.appcmsMain)||void 0===u||null===(s=u.adsConfig)||void 0===s?void 0:s.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||sn(e,10)}}},!0)},exports.initiateErrorHandling=hn,exports.inititateBeacon=function(e,n,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var o=i.getPlayer(e);window.initialise(o,n),window.firstFrame(o,n,t),o.on("loadedmetadata",function(){window.endFirstFrame(o)})}},exports.isBehindLive=function(e){var n,t=i.getPlayer(e);return!(null!=t&&null!==(n=t.liveTracker)&&void 0!==n&&n.atLiveEdge())||null},exports.isMobile=Z,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=vn,exports.isTokenExpired=D,exports.load=mn,exports.loadVideo=gn,exports.loadVideoInstantly=function(e,n,t){var o=i.getPlayer(e);return o.src(n),new Promise(function(e,n){var r=0;o.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){r=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=k,exports.rewind=cn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],p("js",new Date),p("config",e)},exports.saveWatchHistory=_,exports.setupAdvertisementMarkers=Je,exports.setupAdvertisementMarkersForLinear=an,exports.skip=sn,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackMap=Xe;
|
package/cjs/generic-743174bb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("axios"),i=require("./player_instance-fcf6a8fb.js"),l=require("md5"),a=require("js-cookie"),d=require("./currentVideoInfo-5802821b.js"),u=require("./captions-68e263dd.js"),s=require("@babel/runtime/helpers/typeof"),c=require("./skin-eeec7a85.js"),v=require("@babel/runtime/helpers/toConsumableArray"),f=require("@babel/runtime/helpers/slicedToArray"),m=require("@viewlift/comscore/index.js");function p(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function g(e,n){p("event",e,n)}var h={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 y(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 w(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?y(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):y(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var E={name:"@viewlift/player",version:"2.1.23",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/sse":"^0.0.3","@viewlift/comscore":"^1.0.8",axios:"^1.2.3",md5:"^2.3.0","broadcast-channel":"^7.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","jwt-decode":"^4.0.0","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=E.version;var I,T=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":A.get()+"".concat(null==h?void 0:h.getVideoDetails)},b=function(e,n){var t,o,i,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:T(),params:w({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":E.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},S=function(e,n){var t,o,i,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:A.get()+h.getLinearChannelDetails,params:w(w(w(w(w({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},(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===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},_=function(){var e=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:return o=e.sent,e.abrupt("return",r({url:A.get()+"".concat(null==h?void 0:h.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:w({},n),params:w({},(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)}}(),O=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:A.get()+"".concat(null==h?void 0:h.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},P=function(e){var n=e.videoId;return r({method:"GET",url:A.get()+"".concat(null==h?void 0:h.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},A=(I=null==h?void 0:h.apiBaseUrl,{set:function(e){e&&(I=e)},get:function(){return I}}),D=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},L=null;function k(){return{set:function(e){e&&(L=e)},get:function(){return L}}}var C=function(){var e=n(t.mark(function e(){var n,o,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=k().get(),o=A.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);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)}}(),R=null,F=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"))||!D(n)){e.next=6;break}return R||(R=C().then(function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&k().set(i),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){R=null})),e.abrupt("return",R);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),j=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function V(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 N(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?V(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var x=0,W=null,M=!1,U=function(){var e,n,t,o,r,i,l,a=d.getCurrentVideo();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.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==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(r=a.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function B(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function H(){return G.apply(this,arguments)}function G(){return(G=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:if(n=e.sent,o=j(n),!(r=null==o?void 0:o.userId)){e.next=9;break}return e.abrupt("return",r);case 9:return r=B(),window.sessionStorage.setItem("uid",r),e.abrupt("return",r);case 12:case"end":return e.stop()}},e)}))).apply(this,arguments)}function q(){return Q.apply(this,arguments)}function Q(){return(Q=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Y(e){return e?String(e):""}window.initialise=function(e){window.sid=B(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e),z(e),K(e)};var z=function(e){e.on("play",function(){"pause"!==W||e.scrubbing()||(W="play",g("RESUME",{pfm:window.platform,uid:H(),vid:U(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"RESUME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))}),e.on("pause",function(){setTimeout(function(){M||(W="pause",g("PAUSE",{pfm:window.platform,uid:H(),vid:U(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"PAUSE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))},50)})},K=function(e){if(e){var n=0,t=0,o=0,r=0;e.on("timeupdate",i),e.on("seeking",function(){if(M)return;M=!0,e.off("timeupdate",i),e.one("seeked",l)}),e.on("seeked",l)}function i(){n=t,t=Math.floor(e.currentTime()),n<t&&(r=n,n=t)}function l(){var n,t;o=Math.floor(e.currentTime());var l=Math.floor(o-r);if(0!==l&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")){var a=l>0?"SEEK_FORWARD":"SEEK_BACKWARD";g(a,{pfm:window.platform,uid:H(),vid:U(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:a,videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}r=Math.floor(e.currentTime()),setTimeout(function(){M=!1},50),e.on("timeupdate",i)}};window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,o,r,i=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,g(i?"FAILED_TO_START":"DROPPED_STREAM",N({pfm:window.platform,uid:H(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:n===i?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var o,r,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),W="play",g("PLAY",N({pfm:window.platform,uid:H(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(i=r.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",N({"Video ID":U(),watchTime:Math.floor(e.currentTime())},t))}))},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=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,o;if(n.el_){var r,i,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(o=t.className)&&void 0!==o&&o.includes("vjs-waiting")&&x<4)x++,g("BUFFERING",N({pfm:window.platform,uid:H(),vid:U(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,g("FIRST_FRAME",N({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:H(),vid:U()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.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 n,t,o,r,i,l;g("AD_REQUEST",N({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:H(),vid:U(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),g("AD_IMPRESSION",N({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:H(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:U()},null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.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)&&(x=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(),o=e.buffered(),r=0;r<o.length;r++){var i=o.start(r),l=o.end(r);if(X(n,i,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var X=function(e,n,t){return e>=n&&e<=t},J=function(){var e,n=d.getCurrentVideo(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=n(t.mark(function e(n){var o,i,l,a,d,u,s,c,v,f,m,p,g,y,w,E,I,T,b,S,_;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:return I=e.sent,T=j(I),b=null==T?void 0:T.site,S=null==T?void 0:T.siteId,e.t0=N,e.t1=N,e.t2=N({aid:b,cid:S,pfm:window.platform},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.params),e.t3={},e.next=12,H();case 12:return e.t4=e.sent,e.t5=U(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a: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?Y(n.adPosition):"",e.next=28,q();case 28:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(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=null!==(f=J())&&void 0!==f?f:null,e.t28=null!=b?b:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t33=(0,e.t0)(e.t31,e.t32),_=[e.t33],r({url:(null===(y=window)||void 0===y||null===(w=y.customData)||void 0===w||null===(E=w.beacon)||void 0===E?void 0:E.url)||A.get()+h.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:_}).catch(function(e){console.error(e)});case 46:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var $=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"},Z=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},ee=function(){var e=d.seasonIdxManager.get();return e>=0?e+1:1},ne=function(){var e,n,t,o=d.getCurrentSeries(),r=d.getCurrentVideo(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,l=d.seasonIdxManager.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===i});return a>=0?a+1:1};function te(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 oe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?te(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):te(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var re=l,ie=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},le=function(e){var n=ae(e,"video.tags",[]),t=ae(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},ae=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},de=function(){var n,t,o,r,l,d,u,s,c,v,f,m,p,g,h,y,w,E,I,T,b,S,_,O,P,A,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",L=arguments.length>1?arguments[1]:void 0,k=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return D;var C=(null==k?void 0:k.siteName)||(null==k?void 0:k.site)||"",R=(null==k?void 0:k.contentType)||"video",F=(null==k||null===(o=k[R])||void 0===o?void 0:o.metadata)||(null==k||null===(r=k[R])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),j=i.getPlayer(L);if(!D.includes("VIEWLIFT_"))return D;var V,N=window.getComputedStyle(document.getElementById(L),null),x=Math.trunc(N.getPropertyValue("height").slice(0,-2)),W=Math.trunc(N.getPropertyValue("width").slice(0,-2)),M="linearchannel"===R?null==k||null===(d=k.linearchannel)||void 0===d||null===(u=d.channels)||void 0===u||null===(s=u.find(function(e){return(null==e?void 0:e.id)===(null==k?void 0:k.channelId)}))||void 0===s||null===(c=s.content)||void 0===c?void 0:c.id:ae(k,"video.gist.id",""),U="linearchannel"===R?null==k||null===(v=k.linearchannel)||void 0===v||null===(f=v.channels)||void 0===f||null===(m=f.find(function(e){return(null==e?void 0:e.id)===(null==k?void 0:k.channelId)}))||void 0===m?void 0:m.title:ae(k,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),B=null,H=null;"function"==typeof window.__gpp&&(null===(V=window)||void 0===V||V.__gpp("ping",function(e){B=null==e?void 0:e.gppString,H=null==e?void 0:e.sectionList[0]}));var G=a.get("us_privacy")||a.get("usprivacy"),q=void 0!==G?G:"1YNN",Q=null!==(p=null===(g=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===g?void 0:g.fwIdentifier)&&void 0!==p?p:null,Y=oe(oe({},ue(F)),{},(O={VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:x,VIEWLIFT_SIZE:ie(W,x),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(h=window)||void 0===h?void 0:h.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ae(k,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ae(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ae(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==j||null===(y=j.options_)||void 0===y?void 0:y.autoplay)||1,VIEWLIFT_MUTE:(null==j||null===(w=j.options_)||void 0===w?void 0:w.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==C||"usanetwork"==C?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:le(k),VIEWLIFT_MEDIA_ID:M,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ae(k,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:M,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ae(k,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ae(null===(E=window)||void 0===E||null===(I=E.app_data)||void 0===I||null===(T=I.site)||void 0===T?void 0:T.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==C||"usanetwork"==C?"":ae(null===(b=window)||void 0===b||null===(S=b.app_data)||void 0===S||null===(_=S.site)||void 0===_?void 0:_.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:q,VIEWLIFT_TVE_PROVIDER:Q?re(Q):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*ae(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ae(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:M,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:ae(k,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ae(k,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ne(),VIEWLIFT_SEASON_NUMBER:ee(),VIEWLIFT_CONTENT_TAGS:le(k),VIEWLIFT_GPP_SID:H||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:B||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(O,"VIEWLIFT_LAT",""),e(O,"VIEWLIFT_APP_BUNDLE",""),e(O,"VIEWLIFT_ATT_CONSENT",""),O),null===(P=window)||void 0===P||null===(A=P.customData)||void 0===A?void 0:A.macros);for(var z in Y){var K=new RegExp(z,"g");D=D.replace(K,Y[z])}return D},ue=function(e){var n,t,o,r,i,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)}));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,s=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.subscription)||void 0===l?void 0:l.TVE)||!1;return u||s?(Z()?u?a=oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(a=oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?a=oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(a=oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?a=oe(oe({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):s&&(a=oe(oe({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=Z()?oe(oe({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):oe(oe({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=oe(oe({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=Z()?oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):oe(oe({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=oe(oe({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:d.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},se=function(e,n){var t,o,r,i,l,a,d,u,s,c,v,f,m,p=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,h=null==e||null===(o=e[p])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,y=null==e||null===(i=e[p])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(a=e[p])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[p])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[p])||void 0===v||null===(f=v.streamingInfo)||void 0===f||null===(m=f.videoAssets)||void 0===m?void 0:m.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return ve(y);if(g){var I=fe(h,n);return I.src=de(I.src,n,e),I}if("Safari"!==$()&&E)return ce(h);if(w){var T=ve(h);return T.src=de(T.src,n,e),T}if(null!=h&&h.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(h);return b.src=de(b.src,n,e),b}return null},ce=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ve=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},fe=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=$();if(i.getPlayer(n),"Safari"===d){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 r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&i(e),i(null,t)})}}}}}(r);return me(n),u}var s,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(me(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var me=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==$()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},pe=function(e,n){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},ge=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var he=!1,ye=function(e,n,t){var o=de(n,e,t),r=i.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima&&"object"!==s(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,l=i.getPlayer(e);if(null!==l.el_){he=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),he&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};var we,Ee=(we=!0,{enable:function(){we=!0},disable:function(){we=!1},get enabled(){return we}}),Ie="ssai-breakStart",Te="ssai-adImpression",be="ssai-firstQuartile",Se="ssai-midpoint",_e="ssai-thirdQuartile",Oe="ssai-complete",Pe="ssai-breakEnd",Ae={breakStart:Ie,impression:Te,firstQuartile:be,midpoint:Se,thirdQuartile:_e,complete:Oe,breakEnd:Pe};function De(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Ae[o];r&&t.trigger(r,n)}function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ke(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Le(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ce,Re=(Ce=null,{get:function(){return Ce},set:function(e){Ce=e}});function Fe(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 je(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Fe(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function Ve(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 Ne(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)?Ne(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 Ne(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 xe,We=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Me=(xe=null,{set:function(e){xe=e},get position(){return xe}});function Ue(e,n){return Be.apply(this,arguments)}function Be(){return(Be=n(t.mark(function e(n,o){var r,l,a,d,u,s,c,v,m,p,g,h,y,w,E,I,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),a=se(o,n),d=a.src,u=(null==o?void 0:o.contentType)||"video",null==o||null===(r=o[u])||void 0===r||null===(l=r.streamingInfo)||void 0===l||l.isLiveStream,s=d.replace("/dash/","/session/").replace("/master/","/session/"),s=de(s,n,o),c=Ge(s),v=f(c,2),m=v[0],p=v[1],g=He(p)||{},s=new URL(s.split("?")[0]),Object.keys(p).length>0&&Object.entries(p).forEach(function(e){var n=f(e,2),t=n[0],o=n[1];s.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je({adsParams:je({},m)},g))});case 14:return h=e.sent,e.next=17,h.json();case 17:return y=e.sent,w="https://"+new URL(s).hostname,E=y.trackingUrl,I=y.manifestUrl,T=w+E,b=w+I,We.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function He(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=f(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function Ge(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=Ve((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=f(t.value,2),l=i[0],a=i[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){r.e(e)}finally{r.f()}for(var d={},u={},s=0,c=Object.entries(n);s<c.length;s++){var v=f(c[s],2),m=v[0],p=v[1];if(m.startsWith("ads."))d[m.replace(/^ads\./,"")]=p;else u[m]=p}return[d,u]}var qe,Qe,Ye,ze,Ke=(qe=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),qe=Array.isArray(e)?v(e):qe},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",qe),v(qe)}}),Xe=new Map;function Je(e,n){return $e.apply(this,arguments)}function $e(){return $e=n(t.mark(function e(o,r){var l,a,d,u,s,f,m,p,g,h,y,w,E,I,T,b,S,_,O,P,A,D,L,k,C,R;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:R=function(e,n,t,r,l,a){var d,u,s=i.getPlayer(o);if(!s.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds;var v=(null==n||null===(d=n.ads)||void 0===d||null===(u=d[r])||void 0===u?void 0:u.adId)||c;e<k&&L.clear(),k=e,Math.floor(s.currentTime());var f,m=Ve(t);try{var p=function(){var t,i,l,d=f.value,u=d.eventType,m=d.beaconUrls,p=d.startTimeInSeconds,g=d.startTime,h=d.durationInSeconds,y=p||c,w=m,E=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(l=i.ads)||void 0===l?void 0:l.adEventHandler)||null,I="".concat(v,"_").concat(u),T="pod-".concat(c);Xe.has(T)||Xe.set(T,new Set);var b=Xe.get(T);if(console.warn(e,y,"map:",u,"condition1:",e>=y,"map:",Xe),e>=y&&e<=y+D){if(!b.has(I)){b.add(I);try{C(u,n,w,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,u,n)}if("breakEnd"==u){var S=Me.position;Me.set(null),setTimeout(function(){null!=S&&(s.currentTime(S),a())},500)}if("function"==typeof E)try{var _,O={eventType:u,startTimeInSeconds:p,startTime:g,durationInSeconds:h,ad:null==n||null===(_=n.ads)||void 0===_?void 0:_[r],pod:n,adIndex:r};E({adsData:O}),De(o,O)}catch(e){console.error("Error when calling ads callback:",e)}}var P=Re.get();if(P&&0!==Object.keys(P).length){var A=P.formulateComscoreAdPayload,k=P.startComscoreAdTracking,R=P.finishComscoreAdTracking,F=P.endComscoreAdTracking,j="".concat(y,"_").concat(v,"_").concat(u);if(!L.has(j))if(L.set(j,!0),"impression"===u){var V,N=We.get();k(A(je(je({},null==n||null===(V=n.ads)||void 0===V?void 0:V[r]),{},{trackingUrl:N})))}else"complete"===u?R():"breakEnd"===u&&F()}}};for(m.s();!(f=m.n()).done;)p()}catch(e){m.e(e)}finally{m.f()}}},C=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Xe.clear(),Me.set(r),g=We.get(),(h=i.getPlayer(o)).one("loadeddata",function(){g&&P(g)}),y=new Map,w=new Map,E=-1,I=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,T=(null==h||null===(d=h.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,b=(null==h||null===(u=h.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,S=(null==h||null===(s=h.el())||void 0===s||null===(f=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===f?void 0:f[0])||null,_=(null==h||null===(m=h.el())||void 0===m||null===(p=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,O=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return v(o);var r=[],i=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==i||null===(e=i.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),u=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!u&&l){var s=null==d?void 0:d.map(function(e){return je(je({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&r.push(null==s?void 0:s[0])}return r},P=function(){var e=n(t.mark(function e(n){var l,a,d,u,s,f,m,p,g,h,P,D,L,k,C,F,j,V,N,x,W,M,U,B;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return x=function(e){document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",x),0===e.button&&j()},N=function(e){},V=function(){var e,n=h.currentTime(),t=null,o=Ve(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},j=function(){var e,n=h.currentTime(),t=null,o=Ve(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,d=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>i)&&!y.has(i)||n>=i&&n<=d)&&(t=i,y.set(i,!0),w.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t-.4)},100))},s=!1,e.next=7,fetch(n);case 7:return f=e.sent,e.next=10,f.json();case 10:m=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",m),p=m.avails,g=[],h=i.getPlayer(o),P=h.controlBar.progressControl,D=P.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(s=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!s&&r&&(h.currentTime(r),V()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g,"function"==typeof(F=(null===(L=window)||void 0===L||null===(k=L.customData)||void 0===k||null===(C=k.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&(null==g?void 0:g.length)>0&&F(g)),console.log(g,"data"),g.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=h.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",D.appendChild(i)}}),h._timeUpdateHandler&&h.off("timeupdate",h._timeUpdateHandler),h._timeUpdateHandler=c.throttle(function(){var e=h.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=g[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-4&&e<=a+4){var d;e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&y.set(r,!0),Ee.disable(),I&&I.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),P.el().classList.add("hide-progress-bar");for(var u=e-r,s=0,c=0,f=0;f<l.length;f++){var m,p=null==l||null===(m=l[f])||void 0===m?void 0:m.durationInSeconds;if(u<s+p){c=f;break}s+=p}l[c];var h=Math.max(0,i-u),E=Math.round(h);W.style.display="block",B.textContent="".concat(c+1," of ").concat(l.length," • ").concat(A(E));var O=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});O.push.apply(O,v(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&O.push.apply(O,v(null==t?void 0:t.podSlotImpressionBeacon)),R(e,t,O,c,0,V),"break"}w.delete(r)},o=0;o<g.length;o++){if("break"===t())break}n||(W.style.display="none",P.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),I&&I.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),Ee.enable())}},1e3),h.on("timeupdate",h._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){Ee.enabled&&"ArrowRight"==e.key&&(j(),sn(o,10),e.stopPropagation())}),P.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",x))}),null===(d=document)||void 0===d||null===(u=d.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach(function(e){return null==e?void 0:e.remove()}),(W=document.createElement("div")).className="ssai-ad-container",(M=document.createElement("div")).className="sponsored-adbox",(U=document.createElement("div")).className="sponsored-text",U.textContent="Sponsored Ad",M.append(U),(B=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",W.append(M),W.append(B),h.el().appendChild(W);case 45:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=1.5,L=new Map,k=-1;case 21:case"end":return e.stop()}},e)})),$e.apply(this,arguments)}function Ze(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 en(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)?en(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 en(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 nn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function tn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):nn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var on={},rn=(null===(Qe=window)||void 0===Qe||null===(Ye=Qe.location)||void 0===Ye||null===(ze=Ye.search)||void 0===ze?void 0:ze.includes("debug=true"))||!1,ln=null;function an(e){return dn.apply(this,arguments)}function dn(){return dn=n(t.mark(function e(o){var r,l,a,d,u,s,f,m,p,g,h,y,w,E,I,T,b,S,_,O,P,A,D,L,k,C,R;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:R=function(e,n,t,r,l){var a,d,u=i.getPlayer(o);if(!u.seeking()){var s=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[r])||void 0===d?void 0:d.adId)||s;Math.floor(u.currentTime());var v,f=Ze(t);try{for(f.s();!(v=f.n()).done;){var m,p,g,h=v.value,y=h.eventType,w=h.beaconUrls,E=h.startTimeInSeconds,I=h.startTime,T=h.durationInSeconds,b=(h.eventId,E||s),S=w,_=(null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(g=p.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(y),P="pod-".concat(s);L.has(P)||L.set(P,new Set);var A=L.get(P);if(rn&&console.warn(e,b,"map:",y,"condition1:",e>=b,"map:",L),e>=b&&e<=b+k&&!A.has(O)){A.add(O);try{C(y,n,S,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,n)}if("function"==typeof _)try{var D,R={eventType:y,startTimeInSeconds:E,startTime:I,durationInSeconds:T,ad:null==n||null===(D=n.ads)||void 0===D?void 0:D[r],pod:n,adIndex:r};_({adsData:R}),De(o,R)}catch(e){console.error("Error when calling ads callback:",e)}var F=Re.get();if(F&&0!==Object.keys(F).length){var j=F.formulateComscoreAdPayload,V=F.startComscoreAdTracking,N=F.finishComscoreAdTracking,x=F.endComscoreAdTracking;if("impression"===y){var W,M=We.get();V(j(tn(tn({},null==n||null===(W=n.ads)||void 0===W?void 0:W[r]),{},{trackingUrl:M})))}else"complete"===y?N():"breakEnd"===y&&x()}}}}catch(e){f.e(e)}finally{f.f()}}},C=function(e,n,t,o){var r,i,l;"breakEnd"===e&&(null===(r=on)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(i=on)||void 0===i?void 0:i.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(rn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},h=function(){ln&&clearInterval(ln)},p=We.get(),(g=i.getPlayer(o)).one("loadeddata",function(){h(),ln=setInterval(function(){p&&!g.paused()&&D(p)},2e3)}),g.on("dispose",function(){h()}),y=new Map,w=new Map,E=-1,I=null,T=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==g||null===(a=g.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,S=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,_=(null==g||null===(u=g.el())||void 0===u||null===(s=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===s?void 0:s[0])||null,O=(null==g||null===(f=g.el())||void 0===f||null===(m=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,P=!1,A=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return v(o);var r=[],i=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==i||null===(e=i.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),u=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!u&&l){var s=null==d?void 0:d.map(function(e){return tn(tn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&r.push(null==s?void 0:s[0])}return r},D=function(){var e=n(t.mark(function e(n){var r,l,a,d,u,s,f,m,p,g,h,D,L,k;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),I&&l.searchParams.append("nextToken",I),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,u=d.avails,s=d.nextToken||null,I=s,f=[],m=i.getPlayer(o),p=m.controlBar.progressControl,g=p.seekBar.el(),null===(r=document)||void 0===r||r.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),u.map(function(e,n){f.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:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),rn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),null!=f&&f.length&&(window.adsQueueList=f,"function"==typeof(k=(null===(h=window)||void 0===h||null===(D=h.customData)||void 0===D||null===(L=D.ads)||void 0===L?void 0:L.onAdBreaksLoaded)||null)&&(null==f?void 0:f.length)>0&&k(f)),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.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",g.appendChild(i)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=c.throttle(function(){var e=m.currentTime();if(e!==E){E=e;for(var n=function(){var n=f[t],o=n.startTimeInSeconds,r=n.durationInSeconds,i=n.ads,l=o+r;if(e>=o-1.2&&e<=l+1.2){var a;P=!!(e>=o&&e<=l&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>l&&y.set(o,!0),Ee.disable(),T&&T.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),S&&(S.el().style.pointerEvents="none",S.el().classList.add("vjs-hidden")),p.el().classList.add("hide-progress-bar");for(var d=e-o,u=0,s=0,c=0;c<i.length;c++){var m,g=null==i||null===(m=i[c])||void 0===m?void 0:m.durationInSeconds;if(d<u+g){s=c;break}u+=g}setTimeout(function(){on.totalAds=null==i?void 0:i.length,on.currentAdIndex=s},1e3);var h=[];return null==i||i.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});h.push.apply(h,v(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&h.push.apply(h,v(null==n?void 0:n.podSlotImpressionBeacon)),R(e,n,h,s),"break"}w.delete(o)},t=0;t<f.length;t++){if("break"===n())break}P||(on={},p.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),S&&(S.el().style.pointerEvents="auto",S.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),Ee.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,k=2.5;case 22:case"end":return e.stop()}},e)})),dn.apply(this,arguments)}function un(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}var sn=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},cn=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},vn=function(e){return!!o.getPlayer("".concat(e))},fn=function(){var e=n(t.mark(function e(o,r){var l,a,u,s=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,F();case 3:return a=e.sent,u=i.getPlayer(o),e.abrupt("return",new Promise(function(e,i){var s=(null==r?void 0:r.programs)||[];null==r||delete r.programs,S(r,a).then(function(){var i=n(t.mark(function n(i){var a,c,v,f,m,p,g,h;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a=null==i?void 0:i.data,window.sid=B(),a.contentType="linearchannel",a.channelId=null==r?void 0:r.channelId,d.setCurrentVideo(a),d.setCurrentEpgPrograms(s),!l){n.next=16;break}if(g=(null==a||null===(c=a.linearchannel)||void 0===c?void 0:c.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(v=window)||void 0===v||null===(f=v.app_data)||void 0===f||null===(m=f.appcmsMain)||void 0===m||null===(p=m.adsConfig)||void 0===p?void 0:p.vodAdSticherProvider)||!1,h=se(a,o),!g){n.next=13;break}return n.next=12,Ue(o,a);case 12:h=n.sent;case 13:h&&(gn(o,h),g&&an(o),u.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:a})})),n.next=17;break;case 16:e({status:!0,msg:"Feed authenticated",response:a});case 17:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){i({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)}}(),mn=function(){var e=n(t.mark(function e(o,r,l){var a,s,c,v,f,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:return v=e.sent,(d.getCurrentSeries()||null)&&d.setVideoIdxById(r),f=0,m=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(c=s.watchHistory)&&void 0!==c&&c.enable&&O(r,v).then(function(e){var n,t,o,r,i,l,a;(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(null==e?void 0:e.data)),f=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(m=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).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))}),e.abrupt("return",new Promise(function(e,l){b(r,v).then(function(){var r=n(t.mark(function n(r){var a,s,c,v,g,h,y,w,E,I,T,b,S,_,O,P,A,D,L,k,C,R,F,j,V,N,x,W,M,U,B,H,G,q,Q,Y,z,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(P=null==r?void 0:r.data,A=(null==P?void 0:P.contentType)||"video",D=(null==P||null===(a=P[A])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(g=v.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,L=(null==P||null===(h=P.video)||void 0===h||null===(y=h.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,d.setCurrentVideo(r.data),(k=(null==P||null===(w=P.ads)||void 0===w||null===(E=w.preRoll)||void 0===E||null===(I=E.adTags)||void 0===I||null===(T=I.web)||void 0===T?void 0:T.active)&&(null==P||null===(b=P.ads)||void 0===b||null===(S=b.preRoll)||void 0===S||null===(_=S.adTags)||void 0===_||null===(O=_.web)||void 0===O?void 0:O.url))&&ye(o,k,P),C=se(P,o),!D){n.next=12;break}return n.next=11,Ue(o,P);case 11:C=n.sent;case 12:C?(H=(null==P||null===(R=P.video)||void 0===R||null===(F=R.gist)||void 0===F?void 0:F.videoImageUrl)||(null==P||null===(j=P.video)||void 0===j||null===(V=j.gist)||void 0===V||null===(N=V.imageGist)||void 0===N?void 0:N.r16x9),(G=i.getPlayer(o)).poster(H),gn(o,C),D&&Je(o,p),G.on("loadstart",function(){L&&e({status:!0,msg:"Video Loaded",response:P})}),G.on("loadeddata",function(){ge(),e({status:!0,msg:"Video Loaded",response:P})}),G.one("play",function(){f&&!D&&m<95&&setTimeout(function(){G.currentTime(f)},0)}),G.one("error",function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==P||null===(x=P.video)||void 0===x||null===(W=x.contentDetails)||void 0===W||null===(M=W.closedCaptions)||void 0===M?void 0:M.length)>0||(null==P||null===(U=P.video)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==P||null===(Q=P.video)||void 0===Q||null===(Y=Q.contentDetails)||void 0===Y?void 0:Y.closedCaptions)||(null==P||null===(z=P.video)||void 0===z?void 0:z.closedCaptions),q=K.filter(function(e){return"VTT"===e.format}),u.addCaptions(o,q)):u.removeCaptions(o)):(pe(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){hn(e,o,l,r)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),pn=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()},gn=function(e,n){var t=i.getPlayer(e);t&&t.src(n)},hn=function(n,t,o,r){var i,l,a,d,u,s,c=null==n||null===(i=n.response)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);vn(t)&&pe(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?un(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):un(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))};exports.adsQueuePointManager=Ke,exports.authenticateLC=fn,exports.baseUrlManager=A,exports.clearError=ge,exports.comscoreInstanceManager=Re,exports.createSeriesWatchMap=function(e,n){var t=new Map;P({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),d.setSeriesWatchMap(t)}).catch(function(e){return console.log(e)})},exports.detectBrowser=$,exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){var n=(Re.get()||{}).destroyComscoreTag,t=i.getPlayer(e);if(pn(),"function"==typeof n&&n(),c.clearEventListeners(),window.onresize=null,t)t.dispose();else{var o=document.getElementById(e);o&&o.remove()}},exports.getDecodedToken=j,exports.getEntitlementData=function(e,n,t,o){var i,l;return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=ne,exports.getLinearChannelDetails=S,exports.getSGAIEnabledSource=Ue,exports.getSeasonNumber=ee,exports.getSeriesDetails=function(e,n){var t,o,i=j(n),l=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):r({url:A.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=P,exports.getSource=se,exports.getSsaiEvents=function(e){var n=i.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Ie,e)},adImpression:function(e){return t(Te,e)},adFirstQuartile:function(e){return t(be,e)},adMidpoint:function(e){return t(Se,e)},adThirdQuartile:function(e){return t(_e,e)},adComplete:function(e){return t(Oe,e)},adBreakEnd:function(e){return t(Pe,e)}}},exports.getToken=F,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},exports.getUserId=H,exports.getVideoDetails=b,exports.getVideoInfo=O,exports.handleError=pe,exports.initialiseAdvertisement=ye,exports.initialiseComscoreStreamingTracking=function(e,n){var t,o,r,l,a,u,s,c,v,f,p,g,h,y,w,E,I=null==e?void 0:e.playerId,T=i.getPlayer(I);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var b=d.getCurrentVideo(),S=(null==b||null===(o=b.video)||void 0===o?void 0:o.metadata)||[],_=(null==S?void 0:S.length)&&S.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=_)&&void 0!==r&&r.length){var O=_.map(function(e){return e.value});_=null==O?void 0:O.join(",")}m.destroyComscoreTag();var P,A,D,L=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,k=Array.isArray(null==L?void 0:L.category)?null==L||null===(a=L.category)||void 0===a?void 0:a.join(","):(null==L?void 0:L.category)||null,C=ke(ke(ke({},null==b?void 0:b.video),null==b?void 0:b.linearchannel),{},{siteName:(null==b?void 0:b.site)||null,programId:(null==L?void 0:L.videotmsid)||null,programTitle:(null==L?void 0:L.lcProgrammeName)||null,episodeId:(null==L?void 0:L.videotmsid)||null,seasonNumber:(null==b||null===(u=b.video)||void 0===u||null===(s=u.series)||void 0===s?void 0:s.seasonNumber)||(null==L||null===(c=L.seriesDetails)||void 0===c?void 0:c.season)||null,episodeNumber:(null==b||null===(v=b.video)||void 0===v||null===(f=v.series)||void 0===f?void 0:f.episodeNumber)||(null==L||null===(p=L.seriesDetails)||void 0===p?void 0:p.episode)||null,episodeTitle:(null==L?void 0:L.lcSubTitle)||null,isCompleteEpisode:!!(null!=b&&null!==(g=b.video)&&void 0!==g&&g.series||null!=L&&null!==(h=L.seriesDetails)&&void 0!==h&&h.episode),genre:_||k,comscoreConfig:{implementationId:(null==e||null===(y=e.comscore)||void 0===y?void 0:y.implementationId)||null,projectId:(null==e||null===(w=e.comscore)||void 0===w?void 0:w.projectId)||null}});if(null!=C&&null!==(E=C.streamingInfo)&&void 0!==E&&E.isLiveStream?C.contentType="LIVE":C.contentType="LONG_FORM_ON_DEMAND",null==C||!C.network){var R,F=(null==C?void 0:C.metadata)||[],j=null==F||null===(R=F.find(function(e){return"network"===e.name}))||void 0===R?void 0:R.value;C.network=j||null}null!=C&&C.network&&null!=C&&C.genre&&(C.customGenre="".concat(C.network,"_").concat((null==C?void 0:C.programTitle)||(P=C,null!=P&&P.series?null==P||null===(D=P.series)||void 0===D?void 0:D.title:null==P||null===(A=P.gist)||void 0===A?void 0:A.title),"_").concat(C.genre)),null!=L&&L.airDate&&(C.publishDate=L.airDate),null!=C&&C.runtime&&(C.runtime=1e3*((null==C?void 0:C.runtime)||0));var V=m.formulateComscorePayload(C,T);console.log("comscoreOptions player data",V),m.createComscoreStreamingTag(ke({playerName:"Video.js"},V)),m.setComscorePlayerInstance(T)}},exports.initialiseKeyboardEvents=function(e,n){var t,o,r,l=i.getPlayer(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,i,u,s,c,v,f,m;if(Ee.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||cn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(u=i.appcmsMain)||void 0===u||null===(s=u.adsConfig)||void 0===s?void 0:s.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||sn(e,10)}}},!0)},exports.initiateErrorHandling=hn,exports.inititateBeacon=function(e,n,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var o=i.getPlayer(e);window.initialise(o,n),window.firstFrame(o,n,t),o.on("loadedmetadata",function(){window.endFirstFrame(o)})}},exports.isBehindLive=function(e){var n,t=i.getPlayer(e);return!(null!=t&&null!==(n=t.liveTracker)&&void 0!==n&&n.atLiveEdge())||null},exports.isMobile=Z,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=vn,exports.isTokenExpired=D,exports.load=mn,exports.loadVideo=gn,exports.loadVideoInstantly=function(e,n,t){var o=i.getPlayer(e);return o.src(n),new Promise(function(e,n){var r=0;o.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){r=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=k,exports.rewind=cn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],p("js",new Date),p("config",e)},exports.saveWatchHistory=_,exports.setupAdvertisementMarkers=Je,exports.setupAdvertisementMarkersForLinear=an,exports.skip=sn,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackMap=Xe;
|