@viewlift/player-backup 2.0.351-backup → 2.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/autoNextVideo-20e859e6.js +1 -0
- package/cjs/{autoNextVideo-b61ef51a.js → autoNextVideo-4484bfe2.js} +1 -1
- package/cjs/autoNextVideo-a6863387.js +1 -0
- package/cjs/autoNextVideo-b1e2e401.js +1 -0
- package/cjs/autoNextVideo-bb95ca91.js +1 -0
- package/cjs/browser-77c57718.js +1 -0
- package/cjs/bundle.css +413 -953
- package/cjs/caption-settings-34ca0188.js +1 -0
- package/cjs/{caption-settings-0d09a023.js → caption-settings-544fd444.js} +1 -1
- package/cjs/caption-settings-8301e454.js +1 -0
- package/cjs/captions-4465c0cf.js +1 -0
- package/cjs/captions-80f6eb66.js +1 -0
- package/cjs/features-2c74940a.js +1 -0
- package/cjs/features-4d2cdab9.js +1 -0
- package/cjs/features-59c7237e.js +1 -0
- package/cjs/features-75a6eda6.js +1 -0
- package/cjs/features-d9e42442.js +1 -0
- package/cjs/generic-0d09b7b6.js +1 -0
- package/cjs/generic-124edde3.js +1 -0
- package/cjs/generic-575ba973.js +1 -0
- package/cjs/generic-b9186e76.js +1 -0
- package/cjs/generic-ee6cb3e8.js +1 -0
- package/cjs/{index-58f88daa.js → index-0cb8083b.js} +1 -1
- package/cjs/index-164faacf.js +1 -0
- package/cjs/index-22349e69.js +1 -0
- package/cjs/index-3543baa5.js +1 -0
- package/cjs/index-84cce26a.js +1 -0
- package/cjs/{index-95592b91.js → index-96aad351.js} +1 -1
- package/cjs/index-a161f2a5.js +1 -0
- package/cjs/index-a61f9f05.js +1 -0
- package/cjs/index-b3ee1389.js +1 -0
- package/cjs/index-c2a0dc54.js +1 -0
- package/cjs/index-c2cf8d32.js +1 -0
- package/cjs/index-d2ade9be.js +1 -0
- package/cjs/{index-003f4563.js → index-f174f7e4.js} +1 -1
- package/cjs/index-f3db22a6.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-37e52f80.js +1 -0
- package/cjs/multicamv2-391677d8.js +1 -0
- package/cjs/multicamv2-3ea717fe.js +1 -0
- package/cjs/multicamv2-4ac35af7.js +1 -0
- package/cjs/{multicamv2-1d8f22bd.js → multicamv2-58240e3c.js} +1 -1
- package/cjs/{multicamv2-66c8a520.js → multicamv2-5a5fd8ba.js} +1 -1
- package/cjs/multicamv2-70762562.js +1 -0
- package/cjs/multicamv2-7172297d.js +1 -0
- package/cjs/multicamv2-d716f3bf.js +1 -0
- package/cjs/multicamv2-e078cad1.js +1 -0
- package/cjs/nextEpisodeButton-0a083fc8.js +1 -0
- package/cjs/nextEpisodeButton-14e0d641.js +1 -0
- package/cjs/{nextEpisodeButton-f2ec19c2.js → nextEpisodeButton-381f9550.js} +1 -1
- package/cjs/nextEpisodeButton-51babfd6.js +1 -0
- package/cjs/nextEpisodeButton-de159f7d.js +1 -0
- package/cjs/playlist-2e64c4e0.js +1 -0
- package/cjs/playlist-4f907336.js +1 -0
- package/cjs/playlist-ebbf614e.js +1 -0
- package/cjs/playlist-f3a79f49.js +1 -0
- package/cjs/playlist-f59b8707.js +1 -0
- package/cjs/{renditions-627bdfad.js → renditions-d28715a3.js} +1 -1
- package/cjs/resolution-948774b8.js +1 -0
- package/cjs/{resolution-3af2cf1b.js → resolution-dbd4c97b.js} +1 -1
- package/cjs/series-049e7062.js +1 -0
- package/cjs/series-36d9bd8c.js +1 -0
- package/cjs/series-7515df02.js +1 -0
- package/cjs/{series-93fdfc9e.js → series-b45c14ac.js} +1 -1
- package/cjs/series-d3db48b0.js +1 -0
- package/cjs/{series-v2-b67b1a33.js → series-v2-2105fd89.js} +1 -1
- package/cjs/series-v2-2c4bc935.js +1 -0
- package/cjs/series-v2-2c90319e.js +1 -0
- package/cjs/{series-v2-3530d560.js → series-v2-5f591643.js} +1 -1
- package/cjs/series-v2-73ce2001.js +1 -0
- package/cjs/series-v2-74b40be3.js +1 -0
- package/cjs/series-v2-81ca3bdb.js +1 -0
- package/cjs/series-v2-910436af.js +1 -0
- package/cjs/series-v2-9efb55f0.js +1 -0
- package/cjs/series-v2-b636184b.js +1 -0
- package/cjs/series-v2-f47444e8.js +1 -0
- package/cjs/settings-icon-7a7e7810.js +1 -0
- package/cjs/settings-icon-f7387d3f.js +1 -0
- package/cjs/{settings-icon-8bb0d3f0.js → settings-icon-f75ddcd4.js} +1 -1
- package/cjs/skin-00c13fb7.js +1 -0
- package/cjs/skin-0549b6c1.js +1 -0
- package/cjs/skin-07aa6ed9.js +1 -0
- package/cjs/skin-09ad7b11.js +1 -0
- package/{esm/skin-7c392524.js → cjs/skin-0b2674c0.js} +1 -1
- package/cjs/skin-0e1d9860.js +1 -0
- package/cjs/{skin-57bc5d49.js → skin-0e7714d5.js} +1 -1
- package/cjs/skin-14cfc5f9.js +1 -0
- package/cjs/skin-160a1e0d.js +1 -0
- package/cjs/skin-179d4a10.js +1 -0
- package/cjs/skin-3696c831.js +1 -0
- package/cjs/skin-36bd79ee.js +1 -0
- package/cjs/skin-3a643152.js +1 -0
- package/cjs/{skin-1ac5d660.js → skin-3e6492cd.js} +1 -1
- package/cjs/skin-42c7ecb1.js +1 -0
- package/cjs/skin-49aac6be.js +1 -0
- package/cjs/skin-49d2095c.js +1 -0
- package/cjs/skin-4b2bd296.js +1 -0
- package/cjs/{skin-7eab8810.js → skin-4f7a8f34.js} +1 -1
- package/cjs/skin-55e70f90.js +1 -0
- package/cjs/skin-5df50924.js +1 -0
- package/cjs/skin-63cd3771.js +1 -0
- package/cjs/skin-6e38d04b.js +1 -0
- package/cjs/skin-6e93679a.js +1 -0
- package/cjs/{skin-42c4ec6f.js → skin-73e09182.js} +1 -1
- package/cjs/skin-757345a6.js +1 -0
- package/cjs/skin-821fa239.js +1 -0
- package/cjs/skin-86fac85d.js +1 -0
- package/cjs/skin-92520302.js +1 -0
- package/cjs/skin-94081c42.js +1 -0
- package/cjs/skin-98e675b3.js +1 -0
- package/cjs/skin-9b1b4ebb.js +1 -0
- package/{esm/skin-a0327a5a.js → cjs/skin-a9f57f44.js} +1 -1
- package/cjs/skin-ab124109.js +1 -0
- package/cjs/skin-ac1ab4b6.js +1 -0
- package/cjs/skin-b7a60794.js +1 -0
- package/cjs/skin-ba8bab4c.js +1 -0
- package/cjs/skin-c348b669.js +1 -0
- package/cjs/skin-c5c6aa2f.js +1 -0
- package/cjs/skin-c79dfd38.js +1 -0
- package/cjs/skin-c97f0eea.js +1 -0
- package/cjs/skin-cd8d15bd.js +1 -0
- package/cjs/skin-d59521f5.js +1 -0
- package/cjs/skin-d8f52969.js +1 -0
- package/cjs/skin-da51cdf5.js +1 -0
- package/cjs/skin-e06ecec7.js +1 -0
- package/cjs/skin-eafac525.js +1 -0
- package/cjs/skin-f1b75fa4.js +1 -0
- package/cjs/skin-fc1e7e52.js +1 -0
- package/cjs/util-0700f7a8.js +1 -0
- package/cjs/util-58eb642b.js +1 -0
- package/cjs/util-8f98ab44.js +1 -0
- package/cjs/videoSelector-2dd6dcd2.js +1 -0
- package/cjs/videoSelector-8750e2d9.js +1 -0
- package/cjs/videoSelector-88f38fd8.js +1 -0
- package/cjs/videoSelector-9b4383fc.js +1 -0
- package/cjs/videoSelector-9cfb5ac1.js +1 -0
- package/cjs/videoSelector-b43bbdc0.js +1 -0
- package/cjs/videoSelector-b6e03076.js +1 -0
- package/cjs/videoSelector-c2f201ae.js +1 -0
- package/cjs/videoSelector-dd8f9f5a.js +1 -0
- package/cjs/videoSelector-f240a285.js +1 -0
- package/cjs/videoSelector-fb869bd6.js +1 -0
- package/cjs/videojs-dash5.es-072614bc.js +1 -0
- package/cjs/videojs-dash5.es-75637b78.js +1 -0
- package/cjs/videojs-dash5.es-8bc4e9b4.js +1 -0
- package/esm/autoNextVideo-0e191368.js +1 -0
- package/esm/autoNextVideo-30031d4d.js +1 -0
- package/esm/autoNextVideo-52137799.js +1 -0
- package/esm/autoNextVideo-a73988b8.js +1 -0
- package/esm/autoNextVideo-f6dc4d9f.js +1 -0
- package/esm/browser-d4613b36.js +1 -0
- package/esm/bundle.css +413 -953
- package/esm/{caption-settings-e1a53633.js → caption-settings-106547c2.js} +1 -1
- package/esm/caption-settings-2f3a51f7.js +1 -0
- package/esm/caption-settings-cb47408f.js +1 -0
- package/esm/captions-2b4caf69.js +1 -0
- package/esm/captions-6528f589.js +1 -0
- package/esm/cnbc-test.html +119 -0
- package/esm/components/auto-next-video/autoNextVideo.d.ts +0 -1
- package/esm/components/series-v2/series-v2.d.ts +0 -4
- package/esm/components/video-selector/videoSelector.d.ts +0 -5
- package/esm/components/video-selector_TEMP/videoSelector.d.ts +0 -4
- package/esm/core/captions.d.ts +0 -2
- package/esm/features-816fec29.js +1 -0
- package/esm/features-82917e98.js +1 -0
- package/esm/features-8b7b0c27.js +1 -0
- package/esm/features-93b7fd57.js +1 -0
- package/esm/features-c38dfb0c.js +1 -0
- package/esm/generic-64133bf6.js +1 -0
- package/esm/generic-8344606d.js +1 -0
- package/esm/generic-9e05e2df.js +1 -0
- package/esm/generic-aa51d117.js +1 -0
- package/esm/generic-b3c3a40b.js +1 -0
- package/esm/helpers/skin.d.ts +1 -1
- package/esm/{icons-262bef63.js → icons-699e8cf0.js} +1 -1
- package/esm/index-0b9cdc35.js +1 -0
- package/esm/index-0f069fa2.js +1 -0
- package/esm/index-1b1ab24b.js +1 -0
- package/esm/index-1ecd51a1.js +1 -0
- package/esm/index-4138a407.js +1 -0
- package/esm/index-53767d75.js +1 -0
- package/esm/index-5d92eaa3.js +1 -0
- package/esm/index-78f30ecd.js +1 -0
- package/esm/index-7f9c8eec.js +1 -0
- package/esm/index-882f3135.js +1 -0
- package/esm/{index-85c4eeac.js → index-903c9102.js} +1 -1
- package/esm/{index-b48a5d93.js → index-98a3c17e.js} +1 -1
- package/esm/index-e2eff229.js +1 -0
- package/esm/index-e418d70e.js +1 -0
- package/esm/index-fd0a3b1f.js +1 -0
- package/esm/index.d.ts +0 -18
- package/esm/index.js +1 -1
- package/esm/multicamv2-024f31c8.js +1 -0
- package/esm/multicamv2-24c7d272.js +1 -0
- package/esm/{multicamv2-4f74662c.js → multicamv2-38017415.js} +1 -1
- package/esm/multicamv2-406bc3de.js +1 -0
- package/esm/multicamv2-408a92a1.js +1 -0
- package/esm/multicamv2-49437845.js +1 -0
- package/esm/multicamv2-8d211282.js +1 -0
- package/esm/{multicamv2-9e3efadb.js → multicamv2-cc057851.js} +1 -1
- package/esm/multicamv2-cd20a34b.js +1 -0
- package/esm/multicamv2-dc7223f4.js +1 -0
- package/esm/nextEpisodeButton-00b25e47.js +1 -0
- package/esm/nextEpisodeButton-422a0dee.js +1 -0
- package/esm/nextEpisodeButton-475dea60.js +1 -0
- package/esm/nextEpisodeButton-5d07949e.js +1 -0
- package/esm/{nextEpisodeButton-3e35a0f1.js → nextEpisodeButton-cd12f4d9.js} +1 -1
- package/esm/playlist-21a8cb78.js +1 -0
- package/esm/{playlist-42c7068f.js → playlist-36a94502.js} +1 -1
- package/esm/playlist-69fc2bea.js +1 -0
- package/esm/playlist-ac18a51a.js +1 -0
- package/esm/playlist-c3a07912.js +1 -0
- package/esm/plugins/chromecast.d.ts +0 -2
- package/esm/{renditions-620d93b3.js → renditions-19f0b3a9.js} +1 -1
- package/esm/resolution-56c85eaf.js +1 -0
- package/esm/{resolution-2ee017b4.js → resolution-8cbda37b.js} +1 -1
- package/esm/{series-160fc0ca.js → series-3a866e2b.js} +1 -1
- package/esm/series-5fa2292e.js +1 -0
- package/esm/series-61f7b649.js +1 -0
- package/esm/series-d30abb68.js +1 -0
- package/esm/series-ea1a7c31.js +1 -0
- package/esm/series-v2-0bdea653.js +1 -0
- package/esm/series-v2-0fd07cc7.js +1 -0
- package/esm/series-v2-45e98202.js +1 -0
- package/esm/series-v2-527af959.js +1 -0
- package/esm/series-v2-566365e5.js +1 -0
- package/esm/{series-v2-f6d0f5ce.js → series-v2-6e9853f8.js} +1 -1
- package/esm/series-v2-8424b53a.js +1 -0
- package/esm/series-v2-854f39bd.js +1 -0
- package/esm/series-v2-88790381.js +1 -0
- package/esm/series-v2-8ab40c01.js +1 -0
- package/esm/series-v2-93acf14e.js +1 -0
- package/esm/settings-icon-0de53818.js +1 -0
- package/esm/{settings-icon-c65eb622.js → settings-icon-2e8d0bdf.js} +1 -1
- package/esm/settings-icon-d7dfe9a5.js +1 -0
- package/esm/skin-02526c6e.js +1 -0
- package/esm/skin-0b3a968b.js +1 -0
- package/esm/skin-10ebb508.js +1 -0
- package/esm/skin-12ab4ad8.js +1 -0
- package/esm/skin-13a1ba23.js +1 -0
- package/esm/skin-14d8e0c1.js +1 -0
- package/esm/skin-1a3524b1.js +1 -0
- package/esm/skin-2590ddbc.js +1 -0
- package/esm/skin-2595787f.js +1 -0
- package/esm/skin-259cded3.js +1 -0
- package/esm/skin-271fa63f.js +1 -0
- package/esm/skin-2c7f1eac.js +1 -0
- package/esm/skin-302d5d6b.js +1 -0
- package/esm/{skin-f2b54133.js → skin-3178a2cf.js} +1 -1
- package/esm/skin-37399353.js +1 -0
- package/esm/skin-390a9a8d.js +1 -0
- package/esm/skin-39370b18.js +1 -0
- package/esm/{skin-116c35d0.js → skin-3d204d96.js} +1 -1
- package/esm/skin-492e26b2.js +1 -0
- package/esm/skin-499ad160.js +1 -0
- package/esm/skin-4b9be959.js +1 -0
- package/esm/skin-4d643917.js +1 -0
- package/esm/skin-4f84b841.js +1 -0
- package/esm/skin-5ba78150.js +1 -0
- package/esm/skin-5c164c7e.js +1 -0
- package/esm/skin-657566d5.js +1 -0
- package/esm/skin-7f9e8fc1.js +1 -0
- package/esm/skin-99b2454f.js +1 -0
- package/esm/skin-9a077430.js +1 -0
- package/esm/skin-9aafbd0f.js +1 -0
- package/esm/skin-9bd6db1a.js +1 -0
- package/esm/skin-a5929341.js +1 -0
- package/esm/skin-ad96739a.js +1 -0
- package/esm/skin-aff772d7.js +1 -0
- package/esm/skin-b640d630.js +1 -0
- package/esm/skin-b8ce5df8.js +1 -0
- package/esm/skin-b9dc58df.js +1 -0
- package/esm/skin-beafef7f.js +1 -0
- package/esm/skin-c270d768.js +1 -0
- package/esm/skin-c6b4c796.js +1 -0
- package/esm/{skin-f5d7a540.js → skin-d48928ad.js} +1 -1
- package/esm/skin-dcd7768c.js +1 -0
- package/esm/skin-e5aa76de.js +1 -0
- package/esm/skin-e6b8b3e8.js +1 -0
- package/esm/skin-e89be703.js +1 -0
- package/esm/skin-ea5277f2.js +1 -0
- package/esm/skin-f1c932a5.js +1 -0
- package/esm/skin-f9727077.js +1 -0
- package/esm/skin-f9759186.js +1 -0
- package/esm/util-06cf5ddd.js +1 -0
- package/esm/util-9000529b.js +1 -0
- package/esm/util-f0cd0445.js +1 -0
- package/esm/utilities/beacon.d.ts +0 -1
- package/esm/videoSelector-35a6ab81.js +1 -0
- package/esm/videoSelector-53e02750.js +1 -0
- package/esm/videoSelector-5624224c.js +1 -0
- package/esm/videoSelector-71192c3f.js +1 -0
- package/esm/videoSelector-78fbdde8.js +1 -0
- package/esm/videoSelector-7bc15e01.js +1 -0
- package/esm/videoSelector-832e8ff1.js +1 -0
- package/esm/videoSelector-835f2fb0.js +1 -0
- package/esm/videoSelector-837225cb.js +1 -0
- package/esm/videoSelector-d6fd4eb9.js +1 -0
- package/esm/videoSelector-def99d5e.js +1 -0
- package/esm/videojs-dash5.es-1a1bf509.js +1 -0
- package/esm/videojs-dash5.es-600b6231.js +1 -0
- package/esm/videojs-dash5.es-e31d9fb5.js +1 -0
- package/package.json +25 -25
- package/cjs/caption-settings-67212c17.js +0 -1
- package/cjs/captions-4dfe293a.js +0 -1
- package/cjs/features-85cc0d0e.js +0 -1
- package/cjs/generic-37fccf7c.js +0 -1
- package/cjs/index-0df2452b.js +0 -1
- package/cjs/index-641241d9.js +0 -1
- package/cjs/playlist-c8698689.js +0 -1
- package/cjs/relatedVideosManager-0a220d05.js +0 -1
- package/cjs/series-v2-56531302.js +0 -1
- package/cjs/skin-070a81bf.js +0 -1
- package/cjs/skin-0908f28a.js +0 -1
- package/cjs/skin-33783b72.js +0 -1
- package/cjs/skin-5e1cf589.js +0 -1
- package/cjs/skin-66dce245.js +0 -1
- package/cjs/skin-7f60cfe9.js +0 -1
- package/cjs/skin-b3988dd7.js +0 -1
- package/cjs/skin-f0259f24.js +0 -1
- package/cjs/videoSelector-259674e8.js +0 -1
- package/cjs/videoSelector-b90fe564.js +0 -1
- package/cjs/videoSelector-d2938e5e.js +0 -1
- package/cjs/videojs-dash5.es-80bdd597.js +0 -1
- package/esm/autoNextVideo-88f2eb8a.js +0 -1
- package/esm/caption-settings-2e47813b.js +0 -1
- package/esm/captions-1f931e14.js +0 -1
- package/esm/components/chapters/bootstrap.d.ts +0 -2
- package/esm/components/chapters/events.d.ts +0 -15
- package/esm/components/chapters/index.d.ts +0 -14
- package/esm/components/chapters/markers.d.ts +0 -16
- package/esm/components/chapters/store.d.ts +0 -5
- package/esm/components/chapters/timelineMapper.d.ts +0 -35
- package/esm/components/subs-caps-button/subs-caps-button.d.ts +0 -2
- package/esm/features/scheduleWindow/index.d.ts +0 -4
- package/esm/features-48c7570e.js +0 -1
- package/esm/generic-89376c33.js +0 -1
- package/esm/helpers/accessibility.d.ts +0 -1
- package/esm/helpers/apiErrorTracker.d.ts +0 -1
- package/esm/helpers/drmErrorDetection.d.ts +0 -6
- package/esm/helpers/playerControlEvents.d.ts +0 -56
- package/esm/index-5d7fe297.js +0 -1
- package/esm/index-669ae4a1.js +0 -1
- package/esm/index-dffbf847.js +0 -1
- package/esm/relatedVideosManager-81661348.js +0 -1
- package/esm/series-v2-2b76e863.js +0 -1
- package/esm/series-v2-b5605328.js +0 -1
- package/esm/skin/cn_news/skin.d.ts +0 -1
- package/esm/skin-240a0d58.js +0 -1
- package/esm/skin-3653c5b3.js +0 -1
- package/esm/skin-6ba68c5f.js +0 -1
- package/esm/skin-8a9b5520.js +0 -1
- package/esm/skin-b4d23af8.js +0 -1
- package/esm/skin-c4d10b91.js +0 -1
- package/esm/skin-fd0c3eb0.js +0 -1
- package/esm/utilities/castCommands.d.ts +0 -12
- package/esm/utilities/relatedVideosManager.d.ts +0 -11
- package/esm/videoSelector-89c7f4d2.js +0 -1
- package/esm/videoSelector-a23d4a40.js +0 -1
- package/esm/videoSelector-a8a75506.js +0 -1
- package/esm/videojs-dash5.es-45c88e15.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
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"),r=require("axios"),o=require("./skin-c97f0eea.js"),a=require("./browser-77c57718.js"),l=require("md5"),s=require("js-cookie"),d=require("./captions-4465c0cf.js"),u=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=require("@babel/runtime/helpers/slicedToArray"),f=require("@viewlift/comscore/index.js"),p=require("@babel/runtime/helpers/classCallCheck"),m=require("@babel/runtime/helpers/createClass");function h(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function g(e,t){h("event",e,t)}var y={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 T(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 w(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?T(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):T(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var _={name:"@viewlift/player",version:"2.1.44",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/sse":"^0.0.1","broadcast-channel":"^7.3.0","@viewlift/comscore":"^1.0.18",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","jwt-decode":"^4.0.0","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=_.version;var I,b=function(){var e,t,n,i;return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.overrideEntitlementBaseUrl?(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":P.get()+"".concat(null==y?void 0:y.getVideoDetails)},E=function(e,t){var n,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];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})}):r({url:b(),params:w({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":_.version,"x-player-name":"videojs",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken},withCredentials:!0})},S=function(e,t){var n,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];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})}):r({url:P.get()+y.getLinearChannelDetails,params:w(w(w(w(w({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken}})},k=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,B();case 2:return i=e.sent,e.abrupt("return",r({url:P.get()+"".concat(null==y?void 0:y.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:w({},t),params:w({},(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)}}(),A=function(e,t){var n,i,o=window.contentType;return r({method:"GET",url:P.get()+"".concat(null==y?void 0:y.getVideoInfoV2,"/").concat(o,"/").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})},O=function(e){var t=e.videoId;return r({method:"GET",url:P.get()+"".concat(null==y?void 0:y.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},P=(I=null==y?void 0:y.apiBaseUrl,{set:function(e){e&&(I=e)},get:function(){return I}}),D=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},L=null;function C(){return{set:function(e){e&&(L=e)},get:function(){return L}}}var F,x,j,R,V,N,W,U=function(){var e=t(n.mark(function e(){var t,i,o;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=C().get(),i=P.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),M=null,B=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"))||!D(t)){e.next=6;break}return M||(M=U().then(function(e){var n,i,r=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,o=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),o&&C().set(o),r||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){M=null})),e.abrupt("return",M);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),H=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},q=(N=new Map,{set:function(e){var t,n=(null==e||null===(t=e.video)||void 0===t?void 0:t.id)||e||null;N.set(n,(N.get(n)||0)+1)},get:function(e){return N.get(e)},clear:function(){N.clear()}}),G=function(e){x=e},z=function(){return x},Q=function(){return F},Y=function(e){j=e},K=function(e){if(R){var t=R.get(e);Y(t+1)}},X=(W=0,{set:function(e){e>=0&&(W=e)},get:function(){return W}});function J(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 $(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?J(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):J(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Z,ee=(Z={},{setConfig:function(e){Z=$($({},Z),e)},getConfig:function(){return Z}});function te(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 ne(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?te(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var ie=0,re=null,oe=function(){var e,t,n,i,r,o,a,l=z();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.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==l?void 0:l.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(r=l.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function ae(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function le(){return re||window.sessionStorage.getItem("uid")}function se(){return de.apply(this,arguments)}function de(){return(de=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,B();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 ue(e){return e?String(e):""}window.initialise=function(e){window.sid=ae(),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,streamFailures(e),buffering(e),ads(e),ping(e)},window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearInterval(window.ttFirstFrameTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var t,n,i,r=o.getPlayer(),a=null!=r&&r.el_?Math.floor(r.currentTime()):0;window.cleanupTimers(),g(e,ne({pfm:window.platform,uid:le(),vid:oe(),videoPosition:a},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:e,videoPosition:a,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,t,n){e.one("play",tryCatch(function(){var i,r,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),g("PLAY",ne({pfm:window.platform,uid:le(),vid:oe(),videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(o=r.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",ne({"Video ID":oe(),watchTime:Math.floor(e.currentTime())},n))}))},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=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(function(){var 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.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var r,o,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&ie<4)ie++,g("BUFFERING",ne({pfm:window.platform,uid:le(),vid:oe(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0,window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,g("FIRST_FRAME",ne({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:le(),vid:oe()},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,r,o,a;g("AD_REQUEST",ne({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:le(),vid:oe(),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}),g("AD_IMPRESSION",ne({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:le(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:oe()},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.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)&&(ie=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(),r=0;r<i.length;r++){var o=i.start(r),a=i.end(r);if(ce(t,o,a)){var l=Math.round(n-a);if(isFinite(l))return l}}})()};var ce=function(e,t,n){return e>=t&&e<=n},ve=function(){var e,t=z(),n=(null==t?void 0:t.contentType)||"video";return(null==t||null===(e=t[n])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=t(n.mark(function e(t){var i,o,a,l,s,d,u,c,v,f,p,m,h,g,T,w,_,I,b,E,S;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return _=e.sent,I=H(_),b=null==I?void 0:I.site,E=null==I?void 0:I.siteId,e.t0=ne,e.t1=ne,e.t2=ne({aid:b,cid:E,pfm:window.platform},null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=le(),e.t5=oe(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(l=t.videoPosition)&&void 0!==l?l: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?ue(t.adPosition):"",e.next=26,se();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(s=t.ttFirstFrame)&&void 0!==s?s:null,e.t23=null!==(d=t.bitrate)&&void 0!==d?d:null,e.t24=null!==(u=t.resHeight)&&void 0!==u?u:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(f=ve())&&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==t?void 0:t.duration)&&{duration:t.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(m=p.customData)||void 0===m||null===(h=m.beacon)||void 0===h?void 0:h.params,e.t33=(0,e.t0)(e.t31,e.t32),S=[e.t33],r({url:(null===(g=window)||void 0===g||null===(T=g.customData)||void 0===T||null===(w=T.beacon)||void 0===w?void 0:w.url)||P.get()+y.getBeaconUrl,method:"post",headers:{Authorization:_},contentType:"application/x-www-form-urlencoded",dataType:"text",data:S}).catch(function(e){console.error(e)});case 44: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 fe=function(){var e=X.get();return e>=0?e+1:1},pe=function(){var e,t,n,i=Q(),r=z(),o=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=X.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===o});return l>=0?l+1:1};function me(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 he(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?me(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var ge=l,ye=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},Te=function(e){var t=we(e,"video.tags",[]),n=we(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},we=function(e,t,n){for(var i=0,r=(t=t.split(".")).length;i<r;i++){var o;e=null===(o=e)||void 0===o?void 0:o[t[i]]}return e||n},_e=function(){var e,t,n,i,r,a,l,d,u,c,v,f,p,m,h,g,y,T,w,_,I,b,E,S,k,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",O=arguments.length>1?arguments[1]:void 0,P=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.disableMacros)return A;var D=(null==P?void 0:P.siteName)||(null==P?void 0:P.site)||"",L=(null==P?void 0:P.contentType)||"video",C=(null==P||null===(n=P[L])||void 0===n?void 0:n.metadata)||(null==P||null===(i=P[L])||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.metadata),F=o.getPlayer(O);if(!A.includes("VIEWLIFT_"))return A;var x,j=window.getComputedStyle(document.getElementById(O),null),R=Math.trunc(j.getPropertyValue("height").slice(0,-2)),V=Math.trunc(j.getPropertyValue("width").slice(0,-2)),N="linearchannel"===L?null==P||null===(a=P.linearchannel)||void 0===a||null===(l=a.channels)||void 0===l||null===(d=l.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===d||null===(u=d.content)||void 0===u?void 0:u.id:we(P,"video.gist.id",""),W="linearchannel"===L?null==P||null===(c=P.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(f=v.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===f?void 0:f.title:we(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,M=null;"function"==typeof window.__gpp&&(null===(x=window)||void 0===x||x.__gpp("ping",function(e){U=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]}));var B=s.get("us_privacy")||s.get("usprivacy"),H=void 0!==B?B:"1YNN",q=null!==(p=null===(m=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===m?void 0:m.fwIdentifier)&&void 0!==p?p:null,G=he(he({},Ie(C)),{},{VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:R,VIEWLIFT_SIZE:ye(V,R),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:we(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:we(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:we(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==F||null===(g=F.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==F||null===(y=F.options_)||void 0===y?void 0:y.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:Te(P),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(we(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+we(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:s.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:we(null===(T=window)||void 0===T||null===(w=T.app_data)||void 0===w||null===(_=w.site)||void 0===_?void 0:_.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D||"golfchannel"==D?"":we(null===(I=window)||void 0===I||null===(b=I.app_data)||void 0===b||null===(E=b.site)||void 0===E?void 0:E.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:q?ge(q):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*we(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:we(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:we(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:we(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:pe(),VIEWLIFT_SEASON_NUMBER:fe(),VIEWLIFT_CONTENT_TAGS:Te(P),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(S=window)||void 0===S||null===(k=S.customData)||void 0===k?void 0:k.macros);for(var z in G){var Q=new RegExp(z,"g");A=A.replace(Q,G[z])}return A},Ie=function(e){var t,n,i,r,o,l,s,d,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var f=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,p=(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(l=o.subscription)||void 0===l?void 0:l.TVE)||!1;return f||p?(a.isMobile()?f?c=he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):p&&(c=he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):f?c=he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):p&&(c=he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),f?c=he(he({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):p&&(c=he(he({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=a.isMobile()?he(he({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):he(he({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=he(he({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=a.isMobile()?he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=he(he({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:we(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(u=d.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},be=function(e,t){var n,i,r,o,l,s,d,u,c,v,f,p,m,h=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[h])||void 0===n?void 0:n.drmEnabled,y=null==e||null===(i=e[h])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.videoAssets,T=null==e||null===(o=e[h])||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(s=e[h])||void 0===s||null===(d=s.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[h])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var _=(null==e||null===(f=e[h])||void 0===f||null===(p=f.streamingInfo)||void 0===p||null===(m=p.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!=T&&T.hls)return Se(T);if(g){var I=ke(y,t);return I.src=_e(I.src,t,e),I}if("Safari"!==a.detectBrowser()&&_)return Ee(y);if(w){var b=Se(y);return b.src=_e(b.src,t,e),b}if(null!=y&&y.mpeg){var E=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(y);return E.src=_e(E.src,t,e),E}return null},Ee=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},Se=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},ke=function(e,t){var n=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,l=e.widevine,s=e.playReady,d=a.detectBrowser();if(o.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 r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(r,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,r,o){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,t,n){console.log(e),e&&o(e),o(null,n)})}}}}}(r);return Ae(t),u}var c,v={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ae(t),v.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==s?void 0:s.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==s?void 0:s.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==n?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==s?void 0:s.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==s?void 0:s.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==s?void 0:s.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ae=function(e){var t=o.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==a.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Oe=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 r=document.createElement("div");r.className="error-container";var o=document.createElement("div");o.className="error-message",o.innerHTML="".concat(t),r.appendChild(o),i.append(r)}}},Pe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var De=!1,Le=function(e,t,n){var i=_e(t,e,n),r=o.getPlayer(e);if(t&&window.google){if("function"!=typeof r.ima&&"object"!==u(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,t){var n,i,r,a=o.getPlayer(e);if(null!==a.el_){De=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),De&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()},1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),a.one(d,function(){u&&a.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){var t=e.adsManager;t.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),t.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};var Ce,Fe=(Ce=!0,{enable:function(){Ce=!0},disable:function(){Ce=!1},get enabled(){return Ce}}),xe="ssai-breakStart",je="ssai-adImpression",Re="ssai-firstQuartile",Ve="ssai-midpoint",Ne="ssai-thirdQuartile",We="ssai-complete",Ue="ssai-breakEnd",Me={breakStart:xe,impression:je,firstQuartile:Re,midpoint:Ve,thirdQuartile:Ne,complete:We,breakEnd:Ue};function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=o.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var i=t.eventType,r=Me[i];r&&n.trigger(r,t)}function He(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 qe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?He(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):He(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Ge,ze=(Ge={},{get:function(){return Ge},set:function(e){Ge=e}});function Qe(e,t){var n,i,r,a,l,s,d,u,c,v,p,m,h,g,y,T,w,_,I,b,E,S=null==e?void 0:e.playerId,k=o.getPlayer(S);if(null!=e&&null!==(n=e.comscore)&&void 0!==n&&n.enable){var A=z(),O=(null==A||null===(i=A.video)||void 0===i?void 0:i.metadata)||[],P=(null==O?void 0:O.length)&&O.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=P)&&void 0!==r&&r.length){var D=P.map(function(e){return e.value});P=null==D?void 0:D.join(",")}f.destroyComscoreTag();var L,C,F,x=null===(a=window)||void 0===a?void 0:a.lcProgrammeDetails,j=Array.isArray(null==x?void 0:x.category)?null==x||null===(l=x.category)||void 0===l?void 0:l.join(","):(null==x?void 0:x.category)||null,R=qe(qe(qe({},null==A?void 0:A.video),null==A?void 0:A.linearchannel),{},{siteName:(null==e||null===(s=e.comscore)||void 0===s?void 0:s.applicationName)||(null==e||null===(d=e.comscore)||void 0===d||null===(u=d.metadata)||void 0===u?void 0:u.siteName)||(null==A?void 0:A.site)||null,programId:(null==x?void 0:x.videotmsid)||null,programTitle:(null==x?void 0:x.lcProgrammeName)||null,episodeId:(null==x?void 0:x.videotmsid)||null,seasonNumber:(null==A||null===(c=A.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==x||null===(p=x.seriesDetails)||void 0===p?void 0:p.season)||null,episodeNumber:(null==A||null===(m=A.video)||void 0===m||null===(h=m.series)||void 0===h?void 0:h.episodeNumber)||(null==x||null===(g=x.seriesDetails)||void 0===g?void 0:g.episode)||null,episodeTitle:(null==x?void 0:x.lcSubTitle)||null,isCompleteEpisode:!!(null!=A&&null!==(y=A.video)&&void 0!==y&&y.series||null!=x&&null!==(T=x.seriesDetails)&&void 0!==T&&T.episode),genre:P||j,comscoreConfig:{implementationId:(null==e||null===(w=e.comscore)||void 0===w?void 0:w.implementationId)||null,projectId:(null==e||null===(_=e.comscore)||void 0===_?void 0:_.projectId)||null}}),V=null==e||null===(I=e.comscore)||void 0===I||null===(b=I.metadata)||void 0===b?void 0:b.contentType;if(null!=R&&null!==(E=R.streamingInfo)&&void 0!==E&&E.isLiveStream?R.contentType="Live":R.contentType=V||"LongFormOnDemand",null==R||!R.network){var N,W=(null==R?void 0:R.metadata)||[],U=null==W||null===(N=W.find(function(e){return"network"===e.name}))||void 0===N?void 0:N.value;R.network=U||null}null!=R&&R.network&&null!=R&&R.genre&&(R.customGenre="".concat(R.network,"_").concat((null==R?void 0:R.programTitle)||(L=R,null!=L&&L.series?null==L||null===(F=L.series)||void 0===F?void 0:F.title:null==L||null===(C=L.gist)||void 0===C?void 0:C.title),"_").concat(R.genre)),null!=x&&x.airDate&&(R.publishDate=x.airDate),null!=R&&R.runtime&&"function"==typeof k.duration&&(R.runtime=1e3*Math.ceil(k.duration()));var M=f.formulateComscorePayload(R,k);console.log("comscoreOptions player data",M),f.createComscoreStreamingTag(qe({playerName:"Video.js"},M)),f.setComscorePlayerInstance(k)}}function Ye(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 Ke(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Ye(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ye(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Xe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Je(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Je(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var $e,Ze=function(){var e="";return{set:function(t){t&&(e=t)},get:function(){return e}}}(),et=($e=null,{set:function(e){$e=e},get position(){return $e}});function tt(e,t){return nt.apply(this,arguments)}function nt(){return(nt=t(n.mark(function e(t,i){var r,a,l,s,d,u,c,f,p,m,h,g,y,T,w,_,I,b;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o.getPlayer(t),l=be(i,t),s=l.src,d=(null==i?void 0:i.contentType)||"video",null==i||null===(r=i[d])||void 0===r||null===(a=r.streamingInfo)||void 0===a||a.isLiveStream,u=s.replace("/dash/","/session/").replace("/master/","/session/"),u=_e(u,t,i),c=rt(u),f=v(c,2),p=f[0],m=f[1],h=it(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach(function(e){var t=v(e,2),n=t[0],i=t[1];u.searchParams.set(n,i)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ke({adsParams:Ke({},p)},h))});case 14:return g=e.sent,e.next=17,g.json();case 17:return y=e.sent,T="https://"+new URL(u).hostname,w=y.trackingUrl,_=y.manifestUrl,I=T+w,b=T+_,Ze.set(I),console.log("%c TRACKING URL","background: #bdf369; color: #000",I),l.src=b,e.abrupt("return",l);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",l);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function it(e){var t;return Object.fromEntries(null==Object||null===(t=Object.entries(e))||void 0===t?void 0:t.map(function(e){var t=v(e,2),n=t[0],i=t[1];return[null==n?void 0:n.replace(/^aws\./,""),String(i)]}))||{}}function rt(e){var t={};if(!e.split("?")[1])return[{},{}];var n,i=new URL(e,window.location.origin),r=Xe((null==i?void 0:i.searchParams)||[]);try{for(r.s();!(n=r.n()).done;){var o=v(n.value,2),a=o[0],l=o[1];t[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},d={},u=0,c=Object.entries(t);u<c.length;u++){var f=v(c[u],2),p=f[0],m=f[1];if(p.startsWith("ads."))s[p.replace(/^ads\./,"")]=m;else d[p]=m}return[s,d]}var ot,at,lt,st=new Map;function dt(e,t){return ut.apply(this,arguments)}function ut(){return ut=t(n.mark(function e(i,r){var a,l,s,d,u,v,f,p,m,h,g,y,T,w,_,I,b,E,S,k,A,O,P,D,L;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,t,n,r,a,l){var s,d,u=o.getPlayer(i);if(!u.seeking()){var c=t.startTimeInSeconds;t.durationInSeconds,e<P&&O.clear(),P=e;var v=(null==t||null===(s=t.ads)||void 0===s||null===(d=s[r])||void 0===d?void 0:d.adId)||c;Math.floor(u.currentTime());var f,p=Xe(n);try{var m=function(){var n,o,s,d=f.value,c=d.eventType,p=d.beaconUrls,m=d.startTimeInSeconds,h=d.startTime,g=d.durationInSeconds,y=m||0,T=p,w=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(s=o.ads)||void 0===s?void 0:s.adEventHandler)||null,_="".concat(y,"_").concat(c),I=st.get("pod-".concat(a))||[];if(console.warn(e,y,"map:",c,"condition1:",e>=y,"map:",st),e>=y&&!I.includes(_)){I.push(_),st.set("pod-".concat(a),I);try{D(c,t,T,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,t)}if("breakEnd"==c){var b=et.position;et.set(null),setTimeout(function(){null!=b&&(u.currentTime(b),l())},500)}if("function"==typeof w)try{var E,S={eventType:c,startTimeInSeconds:m,startTime:h,durationInSeconds:g,ad:null==t||null===(E=t.ads)||void 0===E?void 0:E[r],adIndex:r};w({adsData:S}),Be(i,S)}catch(e){console.error("Error when calling ads callback:",e)}var k=ze.get();if(k&&0!==Object.keys(k).length){var A=k.formulateComscoreAdPayload,P=k.startComscoreAdTracking,L=k.finishComscoreAdTracking,C=k.endComscoreAdTracking,F="".concat(y,"_").concat(v,"_").concat(c);if(!O.has(F))if(O.set(F,!0),"impression"===c){var x,j=Ze.get();P(A(Ke(Ke({},null==t||null===(x=t.ads)||void 0===x?void 0:x[r]),{},{trackingUrl:j})))}else"complete"===c?L():"breakEnd"===c&&C()}}};for(p.s();!(f=p.n()).done;)m()}catch(e){p.e(e)}finally{p.f()}}},D=function(e,t,n,i){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",t),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",t),null==n||n.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(t){console.warn("Beacon failed:",e,t)})})},A=function(e){var t=Math.floor(e/60),n=Math.floor(e%60);return"".concat(t,":").concat(n.toString().padStart(2,"0"))},st.clear(),et.set(r),m=Ze.get(),(h=o.getPlayer(i)).one("loadeddata",function(){m&&k(m)}),g=new Map,y=new Map,T=-1,w=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,_=(null==h||null===(s=h.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,I=(null==h||null===(d=h.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,b=(null==h||null===(u=h.el())||void 0===u||null===(v=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,E=(null==h||null===(f=h.el())||void 0===f||null===(p=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,S=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==n?void 0:n.length))return c(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==n?void 0:n.length)>1?null==n?void 0:n[(null==n?void 0:n.length)-1]:null==n?void 0:n[0],s=null==l||null===(t=l.trackingEvents)||void 0===t?void 0:t.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var t;return null==e||null===(t=e.beaconUrls)||void 0===t?void 0:t.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return Ke(Ke({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},k=function(){var e=t(n.mark(function e(t){var a,l,s,d,u,v,f,p,m,h,k,O,P,D,C,F,x,j,R,V,N,W,U,M;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return V=function(e){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",V),0===e.button&&x()},R=function(e){},j=function(){var e,t=h.currentTime(),n=null,i=Xe(m);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(o+a));t>=o&&t<=l&&(n=l,g.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==n&&(console.log("Seeking to end of the ad pod:",n),setTimeout(function(){h.currentTime(n+2.2)},100))},x=function(){var e,t=h.currentTime(),n=null,i=Xe(m);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(o+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(t>s||t>o)&&!g.has(o)||t>=o&&t<=s)&&(n=o,g.set(o,!0),y.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==n&&(console.log("Seeking back to ad pod:",n),setTimeout(function(){h.currentTime(n+.4)},100))},u=!1,e.next=7,fetch(t);case 7:return v=e.sent,e.next=10,v.json();case 10:f=e.sent,p=f.avails,m=[],h=o.getPlayer(i),k=h.controlBar.progressControl,O=k.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,t){var n;0==t&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(n=e.ads)||void 0===n?void 0:n.length)>0&&(u=!0),m.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:S(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!u&&r&&(h.currentTime(r),j()),null!=m&&m.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),window.adsQueueList=m,"function"==typeof(F=(null===(P=window)||void 0===P||null===(D=P.customData)||void 0===D||null===(C=D.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&F(m)),console.log(m,"data"),m.forEach(function(e){var t=e.markerPositionInSeconds,n=e.ads,i=h.duration();if(!(t>i||Array.isArray(n)&&0==(null==n?void 0:n.length))){var r=t/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",O.appendChild(o)}}),h._timeUpdateHandler&&h.off("timeupdate",h._timeUpdateHandler),h._timeUpdateHandler=o.throttle(function(){var e=h.currentTime();if(e!==T){T=e;for(var t=!1,n=function(){var n=m[i],r=n.startTimeInSeconds,o=n.durationInSeconds,a=n.ads,l=r+o;if(e>=r-1.2&&e<=l+1.2){var s;e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(t=!0),e>l&&g.set(r,!0),Fe.disable(),w&&w.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),k.el().classList.add("hide-progress-bar");for(var d=e-r,u=0,v=0,f=0;f<a.length;f++){var p,h=null==a||null===(p=a[f])||void 0===p?void 0:p.durationInSeconds;if(d<u+h){v=f;break}u+=h}a[v];var T=Math.max(0,o-d),S=Math.round(T);N.style.display="block",M.textContent="".concat(v+1," of ").concat(a.length," • ").concat(A(S));var O=[];return null==a||a.forEach(function(e){var t=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});O.push.apply(O,c(t))}),(null==n||null===(s=n.podSlotImpressionBeacon)||void 0===s?void 0:s.length)>0&&O.push.apply(O,c(null==n?void 0:n.podSlotImpressionBeacon)),L(e,n,O,v,i,j),"break"}y.delete(r)},i=0;i<m.length;i++){if("break"===n())break}t||(N.style.display="none",k.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),w&&w.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),Fe.enable())}},1e3),h.on("timeupdate",h._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",function(e){Fe.enabled&&"ArrowRight"==e.key&&(x(),yn(i,10),e.stopPropagation())}),k.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",V))}),null===(s=document)||void 0===s||null===(d=s.querySelectorAll(".ssai-ad-container"))||void 0===d||d.forEach(function(e){return null==e?void 0:e.remove()}),(N=document.createElement("div")).className="ssai-ad-container",(W=document.createElement("div")).className="sponsored-adbox",(U=document.createElement("div")).className="sponsored-text",U.textContent="Sponsored Ad",W.append(U),(M=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",N.append(W),N.append(M),h.el().appendChild(N);case 44:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),O=new Map,P=-1;case 21:case"end":return e.stop()}},e)})),ut.apply(this,arguments)}function ct(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return vt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function ft(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 pt(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ft(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ft(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var mt={},ht=(null===(ot=window)||void 0===ot||null===(at=ot.location)||void 0===at||null===(lt=at.search)||void 0===lt?void 0:lt.includes("debug=true"))||!1,gt=null;function yt(e){return Tt.apply(this,arguments)}function Tt(){return Tt=t(n.mark(function e(i){var r,a,l,s,d,u,v,f,p,m,h,g,y,T,w,_,I,b,E,S,k,A,O,P,D,L,C;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,t,n,r,a){var l,s,d=o.getPlayer(i);if(!d.seeking()){var u=t.startTimeInSeconds;t.durationInSeconds;var c=(null==t||null===(l=t.ads)||void 0===l||null===(s=l[r])||void 0===s?void 0:s.adId)||u;Math.floor(d.currentTime());var v,f=ct(n);try{for(f.s();!(v=f.n()).done;){var p,m,h,g=v.value,y=g.eventType,T=g.beaconUrls,w=g.startTimeInSeconds,_=g.startTime,I=g.durationInSeconds,b=(g.eventId,w||u),E=T,S=(null===(p=window)||void 0===p||null===(m=p.customData)||void 0===m||null===(h=m.ads)||void 0===h?void 0:h.adEventHandler)||null,k="".concat(c,"_").concat(y),A="pod-".concat(u);P.has(A)||P.set(A,new Set);var O=P.get(A);if(ht&&console.warn(e,b,"map:",y,"condition1:",e>=b,"map:",P),e>=b&&e<=b+D&&!O.has(k)){O.add(k);try{L(y,t,E,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,t)}if("function"==typeof S)try{var C,F={eventType:y,startTimeInSeconds:w,startTime:_,durationInSeconds:I,ad:null==t||null===(C=t.ads)||void 0===C?void 0:C[r],adIndex:r};S({adsData:F}),Be(i,F)}catch(e){console.error("Error when calling ads callback:",e)}var x=ze.get();if(x&&0!==Object.keys(x).length){var j=x.formulateComscoreAdPayload,R=x.startComscoreAdTracking,V=x.finishComscoreAdTracking,N=x.endComscoreAdTracking;if("impression"===y){var W,U=Ze.get();R(j(pt(pt({},null==t||null===(W=t.ads)||void 0===W?void 0:W[r]),{},{trackingUrl:U})))}else"complete"===y?V():"breakEnd"===y&&N()}}}}catch(e){f.e(e)}finally{f.f()}}},L=function(e,t,n,i){var r,o,a;"breakEnd"===e&&(null===(r=mt)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(o=mt)||void 0===o?void 0:o.totalAds)&&(null==t||null===(a=t.ads)||void 0===a?void 0:a.length)>0||(ht&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",t),null==n||n.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(t){console.warn("Beacon failed:",e,t)})}))},h=function(){gt&&clearInterval(gt)},p=Ze.get(),(m=o.getPlayer(i)).one("loadeddata",function(){h(),gt=setInterval(function(){p&&!m.paused()&&O(p)},2e3)}),m.on("dispose",function(){h()}),g=new Map,y=new Map,T=-1,w=null,_=(null===(r=document)||void 0===r||null===(a=r.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,I=(null==m||null===(l=m.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,b=(null==m||null===(s=m.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,E=(null==m||null===(d=m.el())||void 0===d||null===(u=d.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,S=(null==m||null===(v=m.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,k=!1,A=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==n?void 0:n.length))return c(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==n?void 0:n.length)>1?null==n?void 0:n[(null==n?void 0:n.length)-1]:null==n?void 0:n[0],s=null==l||null===(t=l.trackingEvents)||void 0===t?void 0:t.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var t;return null==e||null===(t=e.beaconUrls)||void 0===t?void 0:t.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return pt(pt({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},O=function(){var e=t(n.mark(function e(t){var r,a,l,s,d,u,v,f,p,m,h,O;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=new URL(t),w&&s.searchParams.append("nextToken",w),e.next=4,fetch(s.toString(),{method:"GET"});case 4:return d=e.sent,e.next=7,d.json();case 7:u=e.sent,v=u.avails,f=u.nextToken||null,w=f,p=[],m=o.getPlayer(i),h=null==m||null===(r=m.controlBar)||void 0===r?void 0:r.progressControl,O=null==h||null===(a=h.seekBar)||void 0===a?void 0:a.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),v.map(function(e,t){p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),ht&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach(function(e){var t=e.markerPositionInSeconds,n=e.ads,i=m.duration();if(!(t>i||Array.isArray(n)&&0==(null==n?void 0:n.length))){var r=t/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",O.appendChild(o)}}),m._timeUpdateHandler&&m.off("timeupdate",null==m?void 0:m._timeUpdateHandler),m._timeUpdateHandler=o.throttle(function(){if(wn(i)){var e=null==m?void 0:m.currentTime();if(e!==T){T=e;for(var t=function(){var t=p[n],i=t.startTimeInSeconds,r=t.durationInSeconds,o=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var l;k=!!(e>=i&&e<=a&&Array.isArray(o)&&(null==o?void 0:o.length)>0),e>a&&g.set(i,!0),Fe.disable(),_&&_.classList.add("vjs-hidden"),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),h.el().classList.add("hide-progress-bar");for(var s=e-i,d=0,u=0,v=0;v<o.length;v++){var f,m=null==o||null===(f=o[v])||void 0===f?void 0:f.durationInSeconds;if(s<d+m){u=v;break}d+=m}setTimeout(function(){mt.totalAds=null==o?void 0:o.length,mt.currentAdIndex=u},1e3);var T=[];return null==o||o.forEach(function(e){var t=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});T.push.apply(T,c(t))}),(null==t||null===(l=t.podSlotImpressionBeacon)||void 0===l?void 0:l.length)>0&&T.push.apply(T,c(null==t?void 0:t.podSlotImpressionBeacon)),C(e,t,T,u),"break"}y.delete(i)},n=0;n<p.length;n++){if("break"===t())break}k||(mt={},h.el().classList.remove("hide-progress-bar"),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Fe.enable())}}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),P=new Map,D=2.5;case 22:case"end":return e.stop()}},e)})),Tt.apply(this,arguments)}var wt=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function _t(e){return JSON.stringify((e||[]).map(function(e){return{availId:e.availId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds,ads:(e.ads||[]).map(function(e){return{adId:e.adId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds}})}}))}var It=function(){function e(t,n,i,r){p(this,e),this.video_=r,this.ad_=t,this.skipOffset_=function(e){if(!e)return null;var t=new RegExp(wt.source,"g");t.lastIndex=0;var n=t.exec(e);if(!n)return null;var i=Number(n[1])||0,r=Number(n[2]),o=Number(n[3]),a=Number(n[6])||0;return r>59||o>59?null:a/1e3+o+60*r+3600*i}(null==t?void 0:t.skipOffset),this.adPosition_=n,this.totalAds_=i,this.isSkipped_=!1}return m(e,[{key:"isClientRendering",value:function(){return!1}},{key:"getDuration",value:function(){var e,t;return null!==(e=null===(t=this.ad_)||void 0===t?void 0:t.durationInSeconds)&&void 0!==e?e:0}},{key:"getRemainingTime",value:function(){var e,t,n,i,r,o;return(null!==(e=null===(t=this.ad_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==e?e:0)+(null!==(n=null===(i=this.ad_)||void 0===i?void 0:i.durationInSeconds)&&void 0!==n?n:0)-(null!==(r=null===(o=this.video_)||void 0===o?void 0:o.currentTime)&&void 0!==r?r:0)}},{key:"isSkippable",value:function(){return"number"==typeof this.skipOffset_}},{key:"getTimeUntilSkippable",value:function(){if("number"!=typeof this.skipOffset_)return this.getRemainingTime();var e=this.getRemainingTime()+this.skipOffset_-this.getDuration();return Math.max(e,0)}},{key:"canSkipNow",value:function(){return 0===this.getTimeUntilSkippable()}},{key:"skip",value:function(){this.isSkipped_=!0,this.video_&&(this.video_.currentTime+=this.getRemainingTime())}},{key:"isLinear",value:function(){return!0}},{key:"getSequenceLength",value:function(){return this.totalAds_||1}},{key:"getPositionInSequence",value:function(){return this.adPosition_||1}},{key:"getTitle",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adTitle)||""}},{key:"getVastAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.vastAdId)||""}},{key:"getAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adId)||""}},{key:"getCreativeAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.creativeId)||""}},{key:"getTimeOffset",value:function(){var e,t;return null!==(e=null===(t=this.ad_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==e?e:0}},{key:"release",value:function(){this.ad_=null,this.adPosition_=null,this.totalAds_=null}},{key:"isSkipped",value:function(){return this.isSkipped_}}]),e}(),bt="impression",Et="start",St="mute",kt="unmute",At="resume",Ot="pause",Pt="firstQuartile",Dt="midpoint",Lt="thirdQuartile",Ct="complete",Ft="skip",xt="breakStart",jt="breakEnd",Rt="skipStateChanged",Vt="ad_impression",Nt="ad_started",Wt="ad_muted",Ut="ad_volume_changed",Mt="ad_resumed",Bt="ad_paused",Ht="ad_first_quartile",qt="ad_midpoint",Gt="ad_third_quartile",zt="ad_complete",Qt="ad_stopped",Yt="ad_skipped",Kt="ad_skip_state_changed",Xt="ad_break_started",Jt="ad_break_ended",$t="ads_loaded",Zt="ad_cuepoints_changed";function en(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 tn(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?en(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):en(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function nn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return rn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var on="[Transmit]";function an(e){var t,n,i;if(null==e)return{avails:[],nextToken:null,dashAvailabilityStartTime:null};var r=null!==(t=e.dashAvailabilityStartTime)&&void 0!==t?t:null,o=null!==(n=e.nextToken)&&void 0!==n?n:null,a=[];if(Array.isArray(e.avails))a=e.avails;else if(Array.isArray(e)){var l,s,d,u,c=e[0];if(c&&Array.isArray(c.avails))a=c.avails,r=null!==(l=null!==(s=r)&&void 0!==s?s:c.dashAvailabilityStartTime)&&void 0!==l?l:null,o=null!==(d=null!==(u=o)&&void 0!==u?u:c.nextToken)&&void 0!==d?d:null;else a=e}else if(Array.isArray(null==e||null===(i=e.data)||void 0===i?void 0:i.avails)){var v,f,p,m;a=e.data.avails,o=null!==(v=null!==(f=o)&&void 0!==f?f:e.data.nextToken)&&void 0!==v?v:null,r=null!==(p=null!==(m=r)&&void 0!==m?m:e.data.dashAvailabilityStartTime)&&void 0!==p?p:null}else Array.isArray(null==e?void 0:e.data)&&(a=e.data);return{avails:a,nextToken:o,dashAvailabilityStartTime:r}}var ln=function(){function e(t,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};p(this,e),this.video_=t,this.player_=n,this.onEvent_="function"==typeof i?i:function(){},this.dashManifestUrl_=o.dashManifestUrl||null,this.config_=null,this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.pollIntervalMs_=2e3,this.pollId_=null,this.adBreaks_=[],this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null,this.eventsSent_=new Set,this.firedBeacons_=new Set,this.adBreakListenersAttached_=!1,this.globalListeners_=[],this.adListeners_=[],this.videoTimeupdate_=null,this.lastMutedForAd_=null,this.onDispose_=function(){return r.release()},this.apiTimelineAbsolute_=!1}var i,r,o;return m(e,[{key:"configure",value:function(e){this.config_=e}},{key:"addTrackingUrl",value:function(e){this.trackingUrl_=e||"",this.onEvent_({type:$t,loadTime:0})}},{key:"getCuePoints",value:function(){var e,t=new Map,n=nn(this.adBreaks_);try{for(n.s();!(e=n.n()).done;){var i,r=nn(e.value.ads||[]);try{for(r.s();!(i=r.n()).done;){var o=i.value,a=o.startTimeInSeconds,l=a+o.durationInSeconds;if(isFinite(a)&&isFinite(l)&&!(l<=a)){var s="".concat(a.toFixed(1),"|").concat(l.toFixed(1));t.has(s)||t.set(s,{start:a,end:l})}}}catch(e){r.e(e)}finally{r.f()}}}catch(e){n.e(e)}finally{n.f()}return Array.from(t.values()).sort(function(e,t){return e.start-t.start})}},{key:"onManifestUpdated",value:function(){this.trackingUrl_&&(this.requestTrackingInfo_(this.firstTrackingRequest_),this.firstTrackingRequest_=!1,this.ensurePolling_())}},{key:"stop",value:function(){this.onEnded_(),this.detachAllListeners_(),this.eventsSent_.clear(),this.firedBeacons_.clear(),this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.apiTimelineAbsolute_=!1,this.adBreaks_=[],this.adBreakListenersAttached_=!1,this.pollId_&&(clearInterval(this.pollId_),this.pollId_=null)}},{key:"release",value:function(){this.stop()}},{key:"ensurePolling_",value:function(){var e=this;this.pollId_||(this.pollId_=setInterval(function(){var t,n;e.trackingUrl_&&(null!==(t=e.player_)&&void 0!==t&&null!==(n=t.paused)&&void 0!==n&&n.call(t)||e.requestTrackingInfo_(!1))},this.pollIntervalMs_))}},{key:"requestTrackingInfo_",value:(o=t(n.mark(function e(t){var i,r,o,a,l,s,d,u,c,v,f,p,m,h,g,y,T;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,r=new Map,o=0,a=null;case 4:if(!(o<10)){e.next=25;break}return l=new URL(this.trackingUrl_),this.nextToken_&&l.searchParams.set("nextToken",this.nextToken_),e.next=9,fetch(l.toString(),{method:"GET"});case 9:return s=e.sent,e.next=12,s.json();case 12:d=e.sent,o++,(u=an(d)).dashAvailabilityStartTime&&!a&&(a=u.dashAvailabilityStartTime),c=nn(u.avails);try{for(c.s();!(v=c.n()).done;)f=v.value,p=(null==f?void 0:f.availId)||"".concat(null==f?void 0:f.startTimeInSeconds),r.set(p,f)}catch(e){c.e(e)}finally{c.f()}if((m=u.nextToken||null)&&m!==this.nextToken_){e.next=22;break}return this.nextToken_=m,e.abrupt("break",25);case 22:this.nextToken_=m,e.next=4;break;case 25:if(h=Array.from(r.values()),this.updateApiTimelineAbsoluteFlag_(h),g=(null==h||null===(i=h[0])||void 0===i?void 0:i.startTimeInSeconds)||0,this.apiTimelineAbsolute_){e.next=33;break}return e.next=31,this.resolveDashAvailabilityStartTime_(a,g);case 31:e.next=35;break;case 33:this.dashAvailabilityStartTimeResolved_=!0,this.dashAvailabilityStartTime_=0;case 35:h.length?(y=this.normalizeAvails_(h),_t(this.adBreaks_)!==_t(y)&&(this.adBreaks_=y,T=this.getCuePoints(),this.onEvent_({type:Zt,cuepoints:T}))):this.adBreaks_.length&&(this.onEvent_({type:Zt,cuepoints:[]}),this.onEnded_(),this.adBreaks_=[]),t&&this.setupAdBreakListeners_(),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(0),console.warn(on,"tracking info fetch failed",e.t0);case 42:case"end":return e.stop()}},e,this,[[0,39]])})),function(e){return o.apply(this,arguments)})},{key:"updateApiTimelineAbsoluteFlag_",value:function(e){this.apiTimelineAbsolute_=!1;var t,n=1e6,i=nn(e||[]);try{for(i.s();!(t=i.n()).done;){var r,o=t.value;if((null!==(r=null==o?void 0:o.startTimeInSeconds)&&void 0!==r?r:0)>n)return void(this.apiTimelineAbsolute_=!0);var a,l=nn((null==o?void 0:o.ads)||[]);try{for(l.s();!(a=l.n()).done;){var s,d=a.value;if((null!==(s=null==d?void 0:d.startTimeInSeconds)&&void 0!==s?s:0)>n)return void(this.apiTimelineAbsolute_=!0)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}}},{key:"normalizeAvails_",value:function(e){var t=this,n=this.apiTimelineAbsolute_?0:this.dashAvailabilityStartTime_||0;return e.map(function(e){var i=t.resolveAbsoluteStart_(e,n,null);return tn(tn({},e),{},{startTimeInSeconds:i,ads:(e.ads||[]).map(function(r){return tn(tn({},r),{},{startTimeInSeconds:t.resolveAbsoluteStart_(r,n,e,i)})})})})}},{key:"resolveAbsoluteStart_",value:function(e,t,n,i){var r=null==e?void 0:e.adProgramDateTime;if(r){var o=new Date(r).getTime()/1e3;if(isFinite(o)&&o>0)return o}return null!=n&&n.adProgramDateTime&&"number"==typeof i?i+((e.startTimeInSeconds||0)-(n.startTimeInSeconds||0)):(e.startTimeInSeconds||0)+t}},{key:"resolveDashAvailabilityStartTime_",value:(r=t(n.mark(function e(t,i){var r,o;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.dashAvailabilityStartTimeResolved_){e.next=2;break}return e.abrupt("return");case 2:if(!t){e.next=8;break}if(r=new Date(t).getTime()/1e3,!(isFinite(r)&&r>0)){e.next=8;break}return this.dashAvailabilityStartTime_=r,this.dashAvailabilityStartTimeResolved_=!0,e.abrupt("return");case 8:if(!(i>0)){e.next=13;break}return e.next=11,this.fetchDashAvailabilityStartTimeFromMpd_();case 11:(o=e.sent)>0&&(this.dashAvailabilityStartTime_=o,this.dashAvailabilityStartTimeResolved_=!0);case 13:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"fetchDashAvailabilityStartTimeFromMpd_",value:(i=t(n.mark(function e(){var t,i,r,o,a,l;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=this.dashManifestUrl_||this.getCurrentSourceUrl_())&&i.includes(".mpd")){e.next=4;break}return e.abrupt("return",0);case 4:return e.next=6,fetch(i);case 6:return r=e.sent,e.next=9,r.text();case 9:return o=e.sent,a=(new DOMParser).parseFromString(o,"application/xml"),l=null===(t=a.querySelector("MPD"))||void 0===t?void 0:t.getAttribute("availabilityStartTime"),e.abrupt("return",l?new Date(l).getTime()/1e3:0);case 15:return e.prev=15,e.t0=e.catch(0),console.warn(on,"MPD availabilityStartTime parse failed",e.t0),e.abrupt("return",0);case 19:case"end":return e.stop()}},e,this,[[0,15]])})),function(){return i.apply(this,arguments)})},{key:"getCurrentSourceUrl_",value:function(){try{var e,t,n,i,r=(null===(e=this.player_)||void 0===e||null===(t=e.currentSrc)||void 0===t?void 0:t.call(e))||(null===(n=this.player_)||void 0===n||null===(i=n.src)||void 0===i?void 0:i.call(n));return"string"==typeof r?r:(null==r?void 0:r.src)||""}catch(e){return""}}},{key:"setupAdBreakListeners_",value:function(){var e=this;if(!this.adBreakListenersAttached_){this.adBreakListenersAttached_=!0,this.onTimeupdate_();this.attachGlobalListener_("timeupdate",function(){return e.onTimeupdate_()}),this.attachGlobalListener_("dispose",this.onDispose_),this.video_&&(this.videoTimeupdate_=function(){return e.onTimeupdate_()},this.video_.addEventListener("timeupdate",this.videoTimeupdate_))}}},{key:"isHlsSource_",value:function(){var e,t,n=this.getCurrentSourceUrl_().toLowerCase(),i=((null===(e=this.player_)||void 0===e||null===(t=e.currentType)||void 0===t?void 0:t.call(e))||"").toLowerCase();return n.includes(".m3u8")||"application/x-mpegurl"===i||"application/vnd.apple.mpegurl"===i}},{key:"isDashSource_",value:function(){var e,t,n=this.getCurrentSourceUrl_().toLowerCase();return"application/dash+xml"===((null===(e=this.player_)||void 0===e||null===(t=e.currentType)||void 0===t?void 0:t.call(e))||"").toLowerCase()||n.includes(".mpd")}},{key:"getDashMediaPlayerTimelineSeconds_",value:function(){try{var e,t,n=null===(e=this.player_)||void 0===e||null===(t=e.dash)||void 0===t?void 0:t.mediaPlayer;if(!n||"function"!=typeof n.time)return null;var i=n.time();return"number"==typeof i&&isFinite(i)&&i>1e6?i:null}catch(e){return null}}},{key:"getCurrentTime_",value:function(){var e,t,n,i=null!==(e=null===(t=this.video_)||void 0===t?void 0:t.currentTime)&&void 0!==e?e:0,r=a.detectBrowser();if(this.isHlsSource_()){var o,l,s=i,d=null===(o=this.player_)||void 0===o||null===(l=o.seekable)||void 0===l?void 0:l.call(o);return d&&d.length>0&&(s=d.end(d.length-1)),Date.now()/1e3-(s-i)}if(this.isDashSource_()){var u,c,v,f=this.getDashMediaPlayerTimelineSeconds_();if(null!=f)return f;var p=null===(u=this.player_)||void 0===u||null===(c=u.seekable)||void 0===c?void 0:c.call(u),m="function"==typeof(null===(v=this.player_)||void 0===v?void 0:v.currentTime)?this.player_.currentTime():i;if(p&&p.length>0){var h=p.start(0);if(h>1e6&&h+m>1e6)return h+m}if(this.apiTimelineAbsolute_&&(this.dashAvailabilityStartTime_||0)>1e9)return(this.dashAvailabilityStartTime_||0)+m}return"Safari"===r?i:"function"==typeof(null===(n=this.player_)||void 0===n?void 0:n.currentTime)?this.player_.currentTime():i}},{key:"onTimeupdate_",value:function(){if(this.ad_||this.adBreaks_.length){var e=this.getCurrentTime_();if(this.ad_){var t,n;this.sendInProgressEvents_(e,this.transmitAd_);var i=this.ad_.getDuration(),r=(null!==(t=null===(n=this.transmitAd_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==t?t:0)+i,o=r-e;this.ad_.canSkipNow()&&o>0&&i>0&&this.sendTrackingEvent_(Rt),i>0&&e>=r&&this.onEnded_()}this.ad_||this.checkLinearAds_(e)}}},{key:"sendInProgressEvents_",value:function(e,t){if(t){var n=t.startTimeInSeconds+.25*t.durationInSeconds,i=t.startTimeInSeconds+.5*t.durationInSeconds,r=t.startTimeInSeconds+.75*t.durationInSeconds;e>=n&&!this.eventsSent_.has(Pt)&&(this.eventsSent_.add(Pt),this.sendTrackingEvent_(Pt)),e>=i&&!this.eventsSent_.has(Dt)&&(this.eventsSent_.add(Dt),this.sendTrackingEvent_(Dt)),e>=r&&!this.eventsSent_.has(Lt)&&(this.eventsSent_.add(Lt),this.sendTrackingEvent_(Lt))}}},{key:"flushPendingQuartiles_",value:function(){for(var e=0,t=[Pt,Dt,Lt];e<t.length;e++){var n=t[e];this.eventsSent_.has(n)||(this.eventsSent_.add(n),this.sendTrackingEvent_(n))}}},{key:"checkLinearAds_",value:function(e){var t,n=nn(this.adBreaks_);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(this.ad_)break;for(var r=i.ads||[],o=0;o<r.length;o++){var a=r[o],l=a.startTimeInSeconds,s=l+a.durationInSeconds;if(l<=e&&s>e){this.onEnded_(),this.transmitAdBreak_=i,this.transmitAd_=a,this.ad_=new It(a,o+1,r.length,this.video_),0===o&&this.sendTrackingEvent_(xt),this.setupCurrentAdListeners_();break}}}}catch(e){n.e(e)}finally{n.f()}}},{key:"onEnded_",value:function(){this.ad_&&this.transmitAd_&&(this.ad_.isSkipped()||this.flushPendingQuartiles_(),this.removeCurrentAdListeners_(this.ad_.isSkipped()),this.ad_.getPositionInSequence()===this.ad_.getSequenceLength()&&this.sendTrackingEvent_(jt),this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null)}},{key:"setupCurrentAdListeners_",value:function(){var e,t,n,i,r,o=this,a=!1;null!==(e=this.player_)&&void 0!==e&&null!==(t=e.paused)&&void 0!==t&&t.call(e)?a=!0:(this.sendTrackingEvent_(bt),this.sendTrackingEvent_(Et)),this.lastMutedForAd_=null!==(n=null===(i=this.player_)||void 0===i||null===(r=i.muted)||void 0===r?void 0:r.call(i))&&void 0!==n&&n,this.attachAdListener_("volumechange",function(){var e,t,n,i=null!==(e=null===(t=o.player_)||void 0===t||null===(n=t.muted)||void 0===n?void 0:n.call(t))&&void 0!==e&&e;i!==o.lastMutedForAd_&&(o.lastMutedForAd_=i,i?o.sendTrackingEvent_(St):o.sendTrackingEvent_(kt))}),this.attachAdListener_("play",function(){a?(o.sendTrackingEvent_(bt),o.sendTrackingEvent_(Et),a=!1):o.sendTrackingEvent_(At)}),this.attachAdListener_("pause",function(){o.sendTrackingEvent_(Ot)})}},{key:"removeCurrentAdListeners_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.sendTrackingEvent_(e?Ft:Ct),this.detachAdListeners_(),this.eventsSent_.clear()}},{key:"attachGlobalListener_",value:function(e,t){this.player_&&(this.player_.on(e,t),this.globalListeners_.push({event:e,handler:t}))}},{key:"attachAdListener_",value:function(e,t){this.player_&&(this.player_.on(e,t),this.adListeners_.push({event:e,handler:t}))}},{key:"detachAdListeners_",value:function(){var e,t=nn(this.adListeners_);try{for(t.s();!(e=t.n()).done;){var n,i,r=e.value,o=r.event,a=r.handler;null===(n=this.player_)||void 0===n||null===(i=n.off)||void 0===i||i.call(n,o,a)}}catch(e){t.e(e)}finally{t.f()}this.adListeners_=[]}},{key:"detachAllListeners_",value:function(){this.detachAdListeners_();var e,t=nn(this.globalListeners_);try{for(t.s();!(e=t.n()).done;){var n,i,r=e.value,o=r.event,a=r.handler;null===(n=this.player_)||void 0===n||null===(i=n.off)||void 0===i||i.call(n,o,a)}}catch(e){t.e(e)}finally{t.f()}this.globalListeners_=[],this.video_&&this.videoTimeupdate_&&(this.video_.removeEventListener("timeupdate",this.videoTimeupdate_),this.videoTimeupdate_=null)}},{key:"startComscoreForCurrentAd_",value:function(){try{var e=ze.get();if(!e||0===Object.keys(e).length)return;var t=e.formulateComscoreAdPayload,n=e.startComscoreAdTracking,i=Ze.get();n(t(tn(tn({},this.transmitAd_),{},{trackingUrl:i})))}catch(e){console.warn(on,"comscore start failed",e)}}},{key:"sendTrackingEvent_",value:function(e){var t,n=this;if(this.transmitAd_&&this.transmitAdBreak_){var i=(this.transmitAd_.trackingEvents||[]).find(function(t){return t.eventType===e});if(i||(i=(this.transmitAdBreak_.adBreakTrackingEvents||[]).find(function(t){return t.eventType===e})),i&&(null===(t=this.config_)||void 0===t||!t.disableTrackingEvents)){var r,o,a,l=(null===(r=this.transmitAd_)||void 0===r?void 0:r.adId)||(null===(o=this.transmitAdBreak_)||void 0===o?void 0:o.availId)||"unknown",s=nn(i.beaconUrls||[]);try{var d=function(){var t=a.value;if(!t)return"continue";var i="".concat(l,"|").concat(e,"|").concat(t);if(n.firedBeacons_.has(i))return"continue";n.firedBeacons_.add(i),fetch(t,{mode:"no-cors"}).catch(function(e){console.warn(on,"beacon failed",t,e)})};for(s.s();!(a=s.n()).done;)d()}catch(e){s.e(e)}finally{s.f()}}var u=ze.get(),c=u&&Object.keys(u).length?u:null;switch(e){case bt:this.onEvent_({type:Vt}),this.startComscoreForCurrentAd_();break;case Et:this.onEvent_({type:Nt,ad:this.ad_});break;case St:this.onEvent_({type:Wt});break;case kt:this.onEvent_({type:Ut});break;case At:this.onEvent_({type:Mt});break;case Ot:this.onEvent_({type:Bt});break;case Pt:this.onEvent_({type:Ht});break;case Dt:this.onEvent_({type:qt});break;case Lt:this.onEvent_({type:Gt});break;case Ct:this.onEvent_({type:zt}),this.onEvent_({type:Qt}),null!=c&&c.finishComscoreAdTracking&&c.finishComscoreAdTracking();break;case Ft:this.onEvent_({type:Yt}),this.onEvent_({type:Qt});break;case xt:this.onEvent_({type:Xt});break;case jt:this.onEvent_({type:Jt}),null!=c&&c.endComscoreAdTracking&&c.endComscoreAdTracking();break;case Rt:this.onEvent_({type:Kt})}}else console.warn(on,"sendTrackingEvent_ skipped — no active ad",{eventType:e})}}]),e}();function sn(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 dn(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?sn(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):sn(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var un={dash:"tracking/initialize/dash",hls:"tracking/initialize/hls"};function cn(e){if(null==e||!e.src)return null;var t=(e.type||"").toLowerCase(),n=String(e.src).toLowerCase();return"application/dash+xml"===t||n.includes(".mpd")?"dash":"application/x-mpegurl"===t||"application/vnd.apple.mpegurl"===t||n.includes(".m3u8")?"hls":null}function vn(e,t,n){return fn.apply(this,arguments)}function fn(){return(fn=t(n.mark(function e(t,i,r){var o,a,l,s,d,u,c,v,f,p,m;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=cn(t)){e.next=3;break}return e.abrupt("return",t);case 3:return a=_e(t.src,r,i),l=a.replace(o,un[o]),console.log("[Transmit] session init →",l),e.prev=6,e.next=9,fetch(l,{method:"GET",redirect:"follow"});case 9:return s=e.sent,e.next=12,s.json();case 12:if(d=e.sent,console.log("[Transmit] session response",d),u="dash"===o?null==d?void 0:d.dashUrl:null==d?void 0:d.hlsUrl,c=null==d?void 0:d.trackingUrl,u&&c){e.next=18;break}return e.abrupt("return",t);case 18:return v=new URL(l),f=v.hostname,p="https://".concat(f).concat(u),m="https://".concat(f).concat(c),Ze.set(m),console.log("[Transmit] session ready",{manifestUrl:p,trackingUrl:m}),e.abrupt("return",dn(dn({},t),{},{src:p}));case 26:return e.prev=26,e.t0=e.catch(6),console.warn("[Transmit] session init failed",e.t0),e.abrupt("return",t);case 30:case"end":return e.stop()}},e,null,[[6,26]])}))).apply(this,arguments)}var pn=null;function mn(e,t){var n;if(pn)return console.log("[Transmit] initializeTransmit skipped — manager already initialised"),pn;var i=Ze.get();if(!i)return console.warn("[Transmit] initializeTransmit skipped — no tracking URL"),null;var r=o.getPlayer(e);if(!r)return console.warn("[Transmit] initializeTransmit skipped — no player"),null;var a=(null===(n=r.el())||void 0===n?void 0:n.querySelector("video"))||null,l=function(e){try{var t="function"==typeof(null==e?void 0:e.currentSrc)&&e.currentSrc()||"function"==typeof(null==e?void 0:e.src)&&e.src()||"";if("application/dash+xml"===("function"==typeof(null==e?void 0:e.currentType)&&e.currentType()||"")||String(t).includes(".mpd"))return t}catch(e){}return null}(r);return(pn=new ln(a,r,function(e){var n,i;console.log("[Transmit] ad event",e);var r=null==t||null===(n=t.customData)||void 0===n||null===(i=n.ads)||void 0===i?void 0:i.adEventHandler;if("function"==typeof r)try{r(e)}catch(e){console.warn("[Transmit] adEventHandler threw",e)}},{dashManifestUrl:l})).configure({disableTrackingEvents:!1}),pn.addTrackingUrl(i),pn.onManifestUpdated(),pn}function hn(){pn&&(pn.release(),pn=null)}function gn(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 yn=function(e,t){var n=i(e),r=n.currentTime()+t;n.currentTime(r)},Tn=function(e,t){var n=i(e),r=n.currentTime(),o=r<=t?0:r-t;n.currentTime(o)},wn=function(e){return!!i.getPlayer("".concat(e))},_n=function(){var e=t(n.mark(function e(i,r){var a,l,s,d=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.length>2&&void 0!==d[2]&&d[2],e.next=3,B();case 3:return l=e.sent,s=o.getPlayer(i),e.abrupt("return",new Promise(function(e,o){S(r,l).then(function(){var o=t(n.mark(function t(o){var l,d,u,c,v,f,p,m,h,g,y;return n.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(hn(),f=null==o?void 0:o.data,window.sid=ae(),f.contentType="linearchannel",f.channelId=null==r?void 0:r.channelId,p=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c?void 0:c.adsConfig)||{},m=!(null==f||null===(v=f.linearchannel)||void 0===v||!v.isSSAIEnabled),h=m&&"MEDIA_TAILOR"==(null==p?void 0:p.vodAdSticherProvider),g=m&&"TRANSMIT"==(null==p?void 0:p.liveAdSticherProvider)&&!(null==p||!p.liveAdClientSideTracking),y=be(f,i),!h){t.next=17;break}return t.next=13,tt(i,f);case 13:y=t.sent,a=!0,t.next=22;break;case 17:if(!g){t.next=22;break}return t.next=20,vn(y,f,i);case 20:y=t.sent,a=!0;case 22:G(f),y&&a?(En(i,y),g?mn(i,{customData:window.customData||{ads:p}}):h&&yt(i),s.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:f})})):(ze.get()&&0!==Object.keys(ze.get()).length&&Qe({playerId:i,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:f}));case 24:case"end":return t.stop()}},t)}));return function(e){return o.apply(this,arguments)}}()).catch(function(e){o({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),In=function(){var e=t(n.mark(function e(i,r,a){var l,s,u,c,v,f,p;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return c=e.sent,console.log("load video"),(Q()||null)&&K(r),v=0,f=0,p=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(u=s.watchHistory)&&void 0!==u&&u.enable&&A(r,c).then(function(e){var t,n,i,r,o,a,l;(null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),v=(null==e||null===(o=e.data)||void 0===o?void 0:o.watchedTime)||null,(f=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(p=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)}).catch(function(e){var t,n,i,r;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.cb(e))}),e.abrupt("return",new Promise(function(e,a){E(r,c).then(function(){var r=t(n.mark(function t(r){var l,s,u,c,m,h,g,y,T,w,_,I,b,E,S,k,A,O,P,D,L,C,F,x,j,R,V,N,W,U,M,B,H,q,z,Q,Y,K,X,J,$;return n.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(k=null==r?void 0:r.data,A=(null==k?void 0:k.contentType)||"video",O=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c?void 0:c.adsConfig)||{},P=!(null==k||null===(m=k[A])||void 0===m||!m.isSSAIEnabled),D=P&&"MEDIA_TAILOR"==(null==O?void 0:O.vodAdSticherProvider),L=P&&"TRANSMIT"==(null==O?void 0:O.liveAdSticherProvider)&&!(null==O||!O.liveAdClientSideTracking),C=!(null==k||null===(h=k[A])||void 0===h||null===(g=h.streamingInfo)||void 0===g||!g.isLiveStream)||"linearchannel"===A,G(r.data),(F=(null==k||null===(y=k.ads)||void 0===y||null===(T=y.preRoll)||void 0===T||null===(w=T.adTags)||void 0===w||null===(_=w.web)||void 0===_?void 0:_.active)&&(null==k||null===(I=k.ads)||void 0===I||null===(b=I.preRoll)||void 0===b||null===(E=b.adTags)||void 0===E||null===(S=E.web)||void 0===S?void 0:S.url))&&Le(i,F,k),x=be(k,i),!D){t.next=17;break}return t.next=14,tt(i,k);case 14:x=t.sent,t.next=22;break;case 17:if(!L||!C){t.next=22;break}return hn(),t.next=21,vn(x,k,i);case 21:x=t.sent;case 22:x?(z=(null==k||null===(j=k.video)||void 0===j||null===(R=j.gist)||void 0===R?void 0:R.videoImageUrl)||(null==k||null===(V=k.video)||void 0===V||null===(N=V.gist)||void 0===N||null===(W=N.imageGist)||void 0===W?void 0:W.r16x9),(Q=o.getPlayer(i)).poster(z),En(i,x),L&&C?mn(i,{customData:window.customData||{ads:O}}):D&&dt(i,p),Q.on("loadstart",function(){C&&e({status:!0,msg:"Video Loaded",response:k})}),Q.on("loadeddata",function(){Pe(),e({status:!0,msg:"Video Loaded",response:k})}),Q.one("play",function(){!v||D||L&&C||f<95&&setTimeout(function(){Q.currentTime(v)},0)}),Q.one("error",function(){var e;a({status:!1,msg:(null==Q||null===(e=Q.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==k||null===(U=k.video)||void 0===U||null===(M=U.contentDetails)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0||(null==k||null===(H=k.video)||void 0===H||null===(q=H.closedCaptions)||void 0===q?void 0:q.length)>0?($=(null==k||null===(K=k.video)||void 0===K||null===(X=K.contentDetails)||void 0===X?void 0:X.closedCaptions)||(null==k||null===(J=k.video)||void 0===J?void 0:J.closedCaptions),Y=$.filter(function(e){return"VTT"===e.format}),d.addCaptions(i,Y)):d.removeCaptions(i)):(Oe(i,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 23:case"end":return t.stop()}},t)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){Sn(e,i,a,r)})}));case 11:case"end":return e.stop()}},e)}));return function(t,n,i){return e.apply(this,arguments)}}(),bn=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()},En=function(e,t){console.log("load video in core",t);var n=o.getPlayer(e);n&&n.src(t)},Sn=function(t,n,i,r){var o,a,l,s,d,u,c=null==t||null===(o=t.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==t?void 0:t.message);wn(n)&&Oe(n,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?gn(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):gn(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({status:!1,response:t,msg:"".concat(v)},r&&{videoId:r}))};exports.authenticateLC=_n,exports.baseUrlManager=P,exports.clearError=Pe,exports.comscoreInstanceManager=ze,exports.createIdxMapping=function(e){R=new Map,e.map(function(e,t){R.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;O({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),V=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 r=t.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){hn();var t=o.getPlayer(e),n=(ze.get()||{}).destroyComscoreTag;if(bn(),n&&n(),o.clearEventListeners(),window.onresize=null,t)t.dispose();else{var i=document.getElementById(e);i&&i.remove()}},exports.getCurrentSeries=Q,exports.getCurrentVideo=z,exports.getDecodedToken=H,exports.getEntitlementData=function(e,t,n,i){var o,a;return r({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,adbTempToken:null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=pe,exports.getLinearChannelDetails=S,exports.getSGAIEnabledSource=tt,exports.getSeasonNumber=fe,exports.getSeriesDetails=function(e,t){var n,i,o=H(t),a=(null==o?void 0:o.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})}):r({url:P.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=O,exports.getSeriesWatchMap=function(){return V},exports.getSource=be,exports.getSsaiEvents=function(e){var t=o.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var n=function(e,n){var i=function(e,t){return n(t)};return t.on(e,i),function(){return t.off(e,i)}};return{adBreakStart:function(e){return n(xe,e)},adImpression:function(e){return n(je,e)},adFirstQuartile:function(e){return n(Re,e)},adMidpoint:function(e){return n(Ve,e)},adThirdQuartile:function(e){return n(Ne,e)},adComplete:function(e){return n(We,e)},adBreakEnd:function(e){return n(Ue,e)}}},exports.getToken=B,exports.getTransmitEnabledSource=vn,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 r=n.split(".com")[1]||"";return{src:r?"".concat(t).concat(r):n,type:i}},exports.getUserId=le,exports.getVideoDetails=E,exports.getVideoIdx=function(){return j},exports.getVideoInfo=A,exports.handleError=Oe,exports.initialiseAdvertisement=Le,exports.initialiseComscoreStreamingTracking=Qe,exports.initialiseKeyboardEvents=function(e,t){var n,i,r,a=o.getPlayer(e),l=null==a||null===(n=a.controlBar)||void 0===n||null===(i=n.playToggle)||void 0===i?void 0:i.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(n){var i,r,o,d,u,c,v,f,p;if(Fe.enabled&&!n.metaKey&&!n.ctrlKey&&"input"!=n.target.localName&&"textarea"!=n.target.localName){var m=n.key,h=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(n.preventDefault(),null==s||s.focus()),m){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(i=document.querySelector(".vjs-fullscreen-control"))||void 0===i||i.click();break;case"ArrowLeft":h&&!1===t.liveui||Tn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(o=r.app_data)||void 0===o||null===(d=o.appcmsMain)||void 0===d||null===(u=d.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(p=f.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;h||yn(e,10)}}},!0)},exports.initializeTransmit=mn,exports.initiateErrorHandling=Sn,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=ee.getConfig();if(null==n||!n.disableBeacon){null!=t&&t.userId&&(re=t.userId);var i=o.getPlayer(e);window.initialise(i,null==t?void 0:t.analyticsCb),window.firstFrame(i,null==t?void 0:t.analyticsCb,null==t?void 0:t.analyticsEventParams),i.on("loadedmetadata",function(){window.endFirstFrame(i)})}}},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=wn,exports.isTokenExpired=D,exports.load=In,exports.loadVideo=En,exports.loadVideoInstantly=function(e,t,n){var i=o.getPlayer(e);return i.src(t),new Promise(function(e,t){var r=0;i.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){r=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.playerConfigManager=ee,exports.refreshTokenManager=C,exports.rewind=Tn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],h("js",new Date),h("config",e)},exports.saveWatchHistory=k,exports.seasonIdxManager=X,exports.setCurrentSeries=function(e){F=e},exports.setCurrentVideo=G,exports.setUserId=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},exports.setVideoIdx=Y,exports.setVideoIdxById=K,exports.setupAdvertisementMarkers=dt,exports.setupAdvertisementMarkersForLinear=yt,exports.skip=yn,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},exports.trackMap=st,exports.trackingUrlManager=Ze,exports.videoReplayTracker=q;
|
|
@@ -0,0 +1 @@
|
|
|
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("./skin-c97f0eea.js"),l=require("./browser-77c57718.js"),a=require("md5"),d=require("js-cookie"),u=require("./captions-80f6eb66.js"),s=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=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 f(e,n){p("event",e,n)}var g={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 h(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?h(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):h(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var y={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/comscore":"^1.0.5",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=y.version;var I,E=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":P.get()+"".concat(null==g?void 0:g.getVideoDetails)},T=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:E(),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":y.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})},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:P.get()+g.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,M();case 2:return o=e.sent,e.abrupt("return",r({url:P.get()+"".concat(null==g?void 0:g.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)}}(),S=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:P.get()+"".concat(null==g?void 0:g.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})},O=function(e){var n=e.videoId;return r({method:"GET",url:P.get()+"".concat(null==g?void 0:g.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},P=(I=null==g?void 0:g.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},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var k,C,F,R,j,V,x,N=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=L().get(),o=P.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)}}(),W=null,M=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!D(n)){e.next=6;break}return W||(W=N().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&&L().set(i),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){W=null})),e.abrupt("return",W);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),B=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},U=(V=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;V.set(t,(V.get(t)||0)+1)},get:function(e){return V.get(e)},clear:function(){V.clear()}}),H=function(e){C=e},G=function(){return C},q=function(){return k},Y=function(e){F=e},Q=function(e){if(R){var n=R.get(e);Y(n+1)}},z=(x=0,{set:function(e){e>=0&&(x=e)},get:function(){return x}});function K(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function X(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?K(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var J=0,$=function(){var e,n,t,o,r,i,l,a=G();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 Z(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function ee(){var e=window.sessionStorage.getItem("uid");return e||(e=Z(),window.sessionStorage.setItem("uid",e),e)}function ne(){return te.apply(this,arguments)}function te(){return(te=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,M();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(o=JSON.parse(atob(n.split(".")[1])))||!o.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==o?void 0:o.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function oe(e){return e?String(e):""}window.initialise=function(e){window.sid=Z(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,o,r,i=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,f(i?"FAILED_TO_START":"DROPPED_STREAM",X({pfm:window.platform,uid:ee(),vid:$(),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){e.one("play",tryCatch(function(){var t,o,r;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),f("PLAY",X({pfm:window.platform,uid:ee(),vid:$(),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:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":$(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=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")&&J<4)J++,f("BUFFERING",X({pfm:window.platform,uid:ee(),vid:$(),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,f("FIRST_FRAME",X({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ee(),vid:$()},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;f("AD_REQUEST",X({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ee(),vid:$(),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}),f("AD_IMPRESSION",X({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ee(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:$()},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)&&(J=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(re(n,i,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var re=function(e,n,t){return e>=n&&e<=t},ie=function(){var e,n=G(),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,m,p,f,h,w,y,I,E,T,b,_,S;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return E=e.sent,T=B(E),b=null==T?void 0:T.site,_=null==T?void 0:T.siteId,e.t0=X,e.t1=X,e.t2=X({aid:b,cid:_,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.t4=ee(),e.t5=$(),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?oe(n.adPosition):"",e.next=26,ne();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=ie())&&void 0!==m?m:null,e.t28=null!=b?b:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(h=f.beacon)||void 0===h?void 0:h.params,e.t33=(0,e.t0)(e.t31,e.t32),S=[e.t33],r({url:(null===(w=window)||void 0===w||null===(y=w.customData)||void 0===y||null===(I=y.beacon)||void 0===I?void 0:I.url)||P.get()+g.getBeaconUrl,method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:S}).catch(function(e){console.error(e)});case 44: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 le=function(){var e=z.get();return e>=0?e+1:1},ae=function(){var e,n,t,o=q(),r=G(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,l=z.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 de(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 ue(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?de(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):de(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var se=a,ce=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ve=function(e){var n=me(e,"video.tags",[]),t=me(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},me=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},pe=function(){var e,n,t,o,r,l,a,u,s,c,v,m,p,f,g,h,w,y,I,E,T,b,_,S,O,P=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",D=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return P;var L=(null==A?void 0:A.siteName)||(null==A?void 0:A.site)||"",k=(null==A?void 0:A.contentType)||"video",C=(null==A||null===(t=A[k])||void 0===t?void 0:t.metadata)||(null==A||null===(o=A[k])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.metadata),F=i.getPlayer(D);if(!P.includes("VIEWLIFT_"))return P;var R,j=window.getComputedStyle(document.getElementById(D),null),V=Math.trunc(j.getPropertyValue("height").slice(0,-2)),x=Math.trunc(j.getPropertyValue("width").slice(0,-2)),N="linearchannel"===k?null==A||null===(l=A.linearchannel)||void 0===l||null===(a=l.channels)||void 0===a||null===(u=a.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===u||null===(s=u.content)||void 0===s?void 0:s.id:me(A,"video.gist.id",""),W="linearchannel"===k?null==A||null===(c=A.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===m?void 0:m.title:me(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,B=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){M=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]}));var U=d.get("us_privacy")||d.get("usprivacy"),H=void 0!==U?U:"1YNN",G=null!==(p=null===(f=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===f?void 0:f.fwIdentifier)&&void 0!==p?p:null,q=ue(ue({},fe(C)),{},{VIEWLIFT_WIDTH:x,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ce(x,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===(g=window)||void 0===g?void 0:g.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:me(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:me(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:me(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==F||null===(h=F.options_)||void 0===h?void 0:h.autoplay)||1,VIEWLIFT_MUTE:(null==F||null===(w=F.options_)||void 0===w?void 0:w.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ve(A),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(me(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+me(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:d.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:me(null===(y=window)||void 0===y||null===(I=y.app_data)||void 0===I||null===(E=I.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L?"":me(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(_=b.site)||void 0===_?void 0:_.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?se(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*me(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:me(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:me(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:me(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ae(),VIEWLIFT_SEASON_NUMBER:le(),VIEWLIFT_CONTENT_TAGS:ve(A),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var Y in q){var Q=new RegExp(Y,"g");P=P.replace(Q,q[Y])}return P},fe=function(e){var n,t,o,r,i,a,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,c=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l.isMobile()?s?d=ue(ue({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=ue(ue({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=ue(ue({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=ue(ue({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=ue(ue({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):c&&(d=ue(ue({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),d=l.isMobile()?ue(ue({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ue(ue({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=ue(ue({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),d=l.isMobile()?ue(ue({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ue(ue({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d=ue(ue({},d),{},{VIEWLIFT_AFID:u.get("afid"),VIEWLIFT_NIELSEN_APP_ID:u.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:u.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:u.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:u.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},ge=function(e,n){var t,o,r,i,a,d,u,s,c,v,m,p,f,g=(null==e?void 0:e.contentType)||"video",h=null==e||null===(t=e[g])||void 0===t?void 0:t.drmEnabled,w=null==e||null===(o=e[g])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,y=null==e||null===(i=e[g])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,I=(null==e||null===(d=e[g])||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[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var E=(null==e||null===(m=e[g])||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!=y&&y.hls)return we(y);if(h){var T=ye(w,n);return T.src=pe(T.src,n,e),T}if("Safari"!==l.detectBrowser()&&E)return he(w);if(I){var b=we(w);return b.src=pe(b.src,n,e),b}if(null!=w&&w.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(w);return _.src=pe(_.src,n,e),_}return null},he=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},we=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},ye=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,d=e.playReady,u=l.detectBrowser();if(i.getPlayer(n),"Safari"===u){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var 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 Ie(n),s}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ie(n),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==d?void 0:d.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ie=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==l.detectBrowser()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ee=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)}}},Te=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var be=!1,_e=function(e,n,t){var o=pe(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_){be=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),be&&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 Se,Oe=(Se=!0,{enable:function(){Se=!0},disable:function(){Se=!1},get enabled(){return Se}}),Pe="ssai-breakStart",De="ssai-adImpression",Ae="ssai-firstQuartile",Le="ssai-midpoint",ke="ssai-thirdQuartile",Ce="ssai-complete",Fe="ssai-breakEnd",Re={breakStart:Pe,impression:De,firstQuartile:Ae,midpoint:Le,thirdQuartile:ke,complete:Ce,breakEnd:Fe};function je(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=Re[o];r&&t.trigger(r,n)}function Ve(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 xe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ve(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ne,We=(Ne={},{get:function(){return Ne},set:function(e){Ne=e}});function Me(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 Be(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Me(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function Ue(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 He(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)?He(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 He(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 Ge,qe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Ye=(Ge=null,{set:function(e){Ge=e},get position(){return Ge}});function Qe(e,n){return ze.apply(this,arguments)}function ze(){return(ze=n(t.mark(function e(n,o){var r,l,a,d,u,s,c,m,p,f,g,h,w,y,I,E,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),a=ge(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=pe(s,n,o),c=Xe(s),m=v(c,2),p=m[0],f=m[1],g=Ke(f)||{},s=new URL(s.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=v(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(Be({adsParams:Be({},p)},g))});case 14:return h=e.sent,e.next=17,h.json();case 17:return w=e.sent,y="https://"+new URL(s).hostname,I=w.trackingUrl,E=w.manifestUrl,T=y+I,b=y+E,qe.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 Ke(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=v(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function Xe(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=Ue((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=v(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 m=v(c[s],2),p=m[0],f=m[1];if(p.startsWith("ads."))d[p.replace(/^ads\./,"")]=f;else u[p]=f}return[d,u]}var Je,$e,Ze,en=new Map;function nn(e,n){return tn.apply(this,arguments)}function tn(){return tn=n(t.mark(function e(o,r){var l,a,d,u,s,v,m,p,f,g,h,w,y,I,E,T,b,_,S,O,P,D,A,L,k;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,r,l,a){var d,u,s=i.getPlayer(o);if(!s.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<A&&D.clear(),A=e;var v=(null==n||null===(d=n.ads)||void 0===d||null===(u=d[r])||void 0===u?void 0:u.adId)||c;Math.floor(s.currentTime());var m,p=Ue(t);try{var f=function(){var t,i,d,u=m.value,c=u.eventType,p=u.beaconUrls,f=u.startTimeInSeconds,g=u.startTime,h=u.durationInSeconds,w=f||0,y=p,I=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(d=i.ads)||void 0===d?void 0:d.adEventHandler)||null,E="".concat(w,"_").concat(c),T=en.get("pod-".concat(l))||[];if(console.warn(e,w,"map:",c,"condition1:",e>=w,"map:",en),e>=w&&!T.includes(E)){T.push(E),en.set("pod-".concat(l),T);try{L(c,n,y,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=Ye.position;Ye.set(null),setTimeout(function(){null!=b&&(s.currentTime(b),a())},500)}if("function"==typeof I)try{var _,S={eventType:c,startTimeInSeconds:f,startTime:g,durationInSeconds:h,ad:null==n||null===(_=n.ads)||void 0===_?void 0:_[r],adIndex:r};I({adsData:S}),je(o,S)}catch(e){console.error("Error when calling ads callback:",e)}var O=We.get();if(O&&0!==Object.keys(O).length){var P=O.formulateComscoreAdPayload,A=O.startComscoreAdTracking,k=O.finishComscoreAdTracking,C=O.endComscoreAdTracking,F="".concat(podStartTimeInSeconds,"_").concat(v,"_").concat(c);if(!D.has(F))if(D.set(F,!0),"impression"===c){var R,j=qe.get();A(P(Be(Be({},null==n||null===(R=n.ads)||void 0===R?void 0:R[r]),{},{trackingUrl:j})))}else"complete"===c?k():"breakEnd"===c&&C()}}};for(p.s();!(m=p.n()).done;)f()}catch(e){p.e(e)}finally{p.f()}}},L=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)})})},P=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},en.clear(),Ye.set(r),f=qe.get(),(g=i.getPlayer(o)).one("loadeddata",function(){f&&O(f)}),h=new Map,w=new Map,y=-1,I=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,E=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==g||null===(u=g.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,b=(null==g||null===(s=g.el())||void 0===s||null===(v=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,_=(null==g||null===(m=g.el())||void 0===m||null===(p=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,S=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 c(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 Be(Be({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&r.push(null==s?void 0:s[0])}return r},O=function(){var e=n(t.mark(function e(n){var l,a,d,u,s,v,m,p,f,g,O,D,A,L,C,F,R,j,V,x,N,W,M,B;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return x=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",x),0===e.button&&R()},V=function(e){},j=function(){var e,n=g.currentTime(),t=null,o=Ue(f);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,h.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(){g.currentTime(t+2.2)},100))},R=function(){var e,n=g.currentTime(),t=null,o=Ue(f);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)&&!h.has(i)||n>=i&&n<=d)&&(t=i,h.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(){g.currentTime(t+.4)},100))},s=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:m=e.sent,p=m.avails,f=[],g=i.getPlayer(o),O=g.controlBar.progressControl,D=O.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),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:S(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!s&&r&&(g.currentTime(r),j()),null!=f&&f.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),window.adsQueueList=f,"function"==typeof(F=(null===(A=window)||void 0===A||null===(L=A.customData)||void 0===L||null===(C=L.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&F(f)),console.log(f,"data"),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=g.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)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=i.throttle(function(){var e=g.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=f[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){var d;e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&h.set(r,!0),Oe.disable(),I&&I.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var u=e-r,s=0,v=0,m=0;m<l.length;m++){var p,g=null==l||null===(p=l[m])||void 0===p?void 0:p.durationInSeconds;if(u<s+g){v=m;break}s+=g}l[v];var y=Math.max(0,i-u),S=Math.round(y);N.style.display="block",B.textContent="".concat(v+1," of ").concat(l.length," • ").concat(P(S));var D=[];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)});D.push.apply(D,c(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&D.push.apply(D,c(null==t?void 0:t.podSlotImpressionBeacon)),k(e,t,D,v,o,j),"break"}w.delete(r)},o=0;o<f.length;o++){if("break"===t())break}n||(N.style.display="none",O.el().classList.remove("hide-progress-bar"),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),I&&I.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),Oe.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){Oe.enabled&&"ArrowRight"==e.key&&(R(),pn(o,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",V),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()}),(N=document.createElement("div")).className="ssai-ad-container",(W=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",W.append(M),(B=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",N.append(W),N.append(B),g.el().appendChild(N);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=new Map,A=-1;case 21:case"end":return e.stop()}},e)})),tn.apply(this,arguments)}function on(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 rn(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)?rn(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 rn(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 ln(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 an(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ln(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var dn={},un=(null===(Je=window)||void 0===Je||null===($e=Je.location)||void 0===$e||null===(Ze=$e.search)||void 0===Ze?void 0:Ze.includes("debug=true"))||!1,sn=null;function cn(e){return vn.apply(this,arguments)}function vn(){return vn=n(t.mark(function e(o){var r,l,a,d,u,s,v,m,p,f,g,h,w,y,I,E,T,b,_,S,O,P,D,A,L,k,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=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,m=on(t);try{for(m.s();!(v=m.n()).done;){var p,f,g,h=v.value,w=h.eventType,y=h.beaconUrls,I=h.startTimeInSeconds,E=h.startTime,T=h.durationInSeconds,b=(h.eventId,I||s),_=y,S=(null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(g=f.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(w),P="pod-".concat(s);A.has(P)||A.set(P,new Set);var D=A.get(P);if(un&&console.warn(e,b,"map:",w,"condition1:",e>=b,"map:",A),e>=b&&e<=b+L&&!D.has(O)){D.add(O);try{k(w,n,_,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,w,n)}if("function"==typeof S)try{var C,F={eventType:w,startTimeInSeconds:I,startTime:E,durationInSeconds:T,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[r],adIndex:r};S({adsData:F}),je(o,F)}catch(e){console.error("Error when calling ads callback:",e)}var R=We.get();if(R&&0!==Object.keys(R).length){var j=R.formulateComscoreAdPayload,V=R.startComscoreAdTracking,x=R.finishComscoreAdTracking,N=R.endComscoreAdTracking;if("impression"===w){var W,M=qe.get();V(j(an(an({},null==n||null===(W=n.ads)||void 0===W?void 0:W[r]),{},{trackingUrl:M})))}else"complete"===w?x():"breakEnd"===w&&N()}}}}catch(e){m.e(e)}finally{m.f()}}},k=function(e,n,t,o){var r,i,l;"breakEnd"===e&&(null===(r=dn)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(i=dn)||void 0===i?void 0:i.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(un&&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)})}))},g=function(){sn&&clearInterval(sn)},p=qe.get(),(f=i.getPlayer(o)).one("loadeddata",function(){g(),sn=setInterval(function(){p&&!f.paused()&&D(p)},2e3)}),f.on("dispose",function(){g()}),h=new Map,w=new Map,y=-1,I=null,E=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==f||null===(a=f.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==f||null===(d=f.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,_=(null==f||null===(u=f.el())||void 0===u||null===(s=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===s?void 0:s[0])||null,S=(null==f||null===(v=f.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=!1,P=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(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 an(an({},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,v,m,p,f;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,v=[],m=i.getPlayer(o),p=m.controlBar.progressControl,f=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){v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:P(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),un&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),null!=v&&v.length&&(window.adsQueueList=v),v.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",f.appendChild(i)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=i.throttle(function(){var e=m.currentTime();if(e!==y){y=e;for(var n=function(){var n=v[t],o=n.startTimeInSeconds,r=n.durationInSeconds,i=n.ads,l=o+r;if(e>=o-1.2&&e<=l+1.2){var a;O=!!(e>=o&&e<=l&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>l&&h.set(o,!0),Oe.disable(),E&&E.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.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 d=e-o,u=0,s=0,m=0;m<i.length;m++){var f,g=null==i||null===(f=i[m])||void 0===f?void 0:f.durationInSeconds;if(d<u+g){s=m;break}u+=g}setTimeout(function(){dn.totalAds=null==i?void 0:i.length,dn.currentAdIndex=s},1e3);var y=[];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)});y.push.apply(y,c(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&y.push.apply(y,c(null==n?void 0:n.podSlotImpressionBeacon)),C(e,n,y,s),"break"}w.delete(o)},t=0;t<v.length;t++){if("break"===n())break}O||(dn={},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")),E&&E.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Oe.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),A=new Map,L=2.5;case 22:case"end":return e.stop()}},e)})),vn.apply(this,arguments)}function mn(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 pn=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},fn=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},gn=function(e){return!!o.getPlayer("".concat(e))},hn=function(){var e=n(t.mark(function e(o,r){var l,a,d,u=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=u.length>2&&void 0!==u[2]&&u[2],e.next=3,M();case 3:return a=e.sent,d=i.getPlayer(o),e.abrupt("return",new Promise(function(e,i){b(r,a).then(function(){var i=n(t.mark(function n(i){var a,u,s,c,v,m,p,f;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==i?void 0:i.data,window.sid=Z(),m.contentType="linearchannel",m.channelId=null==r?void 0:r.channelId,p=(null==m||null===(a=m.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.appcmsMain)||void 0===c||null===(v=c.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,f=ge(m,o),!p){n.next=11;break}return n.next=9,Qe(o,m);case 9:f=n.sent,l=!0;case 11:H(m),f&&l?(In(o,f),p&&cn(o),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})})):e({status:!0,msg:"Feed authenticated",response:m});case 13: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)}}(),wn=function(){var e=n(t.mark(function e(o,r,l){var a,d,s,c,v,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return c=e.sent,(q()||null)&&Q(r),v=0,m=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(s=d.watchHistory)&&void 0!==s&&s.enable&&S(r,c).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)),v=(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){T(r,c).then(function(){var r=n(t.mark(function n(r){var a,d,s,c,f,g,h,w,y,I,E,T,b,_,S,O,P,D,A,L,k,C,F,R,j,V,x,N,W,M,B,U,G,q,Y,Q,z,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==r?void 0:r.data,P=(null==O?void 0:O.contentType)||"video",D=(null==O||null===(a=O[P])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(c=s.appcmsMain)||void 0===c||null===(f=c.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,A=(null==O||null===(g=O.video)||void 0===g||null===(h=g.streamingInfo)||void 0===h?void 0:h.isLiveStream)||!1,H(r.data),(L=(null==O||null===(w=O.ads)||void 0===w||null===(y=w.preRoll)||void 0===y||null===(I=y.adTags)||void 0===I||null===(E=I.web)||void 0===E?void 0:E.active)&&(null==O||null===(T=O.ads)||void 0===T||null===(b=T.preRoll)||void 0===b||null===(_=b.adTags)||void 0===_||null===(S=_.web)||void 0===S?void 0:S.url))&&_e(o,L,O),k=ge(O,o),!D){n.next=12;break}return n.next=11,Qe(o,O);case 11:k=n.sent;case 12:k?(U=(null==O||null===(C=O.video)||void 0===C||null===(F=C.gist)||void 0===F?void 0:F.videoImageUrl)||(null==O||null===(R=O.video)||void 0===R||null===(j=R.gist)||void 0===j||null===(V=j.imageGist)||void 0===V?void 0:V.r16x9),(G=i.getPlayer(o)).poster(U),In(o,k),D&&nn(o,p),G.on("loadstart",function(){A&&e({status:!0,msg:"Video Loaded",response:O})}),G.on("loadeddata",function(){Te(),e({status:!0,msg:"Video Loaded",response:O})}),G.one("play",function(){v&&!D&&m<95&&setTimeout(function(){G.currentTime(v)},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==O||null===(x=O.video)||void 0===x||null===(N=x.contentDetails)||void 0===N||null===(W=N.closedCaptions)||void 0===W?void 0:W.length)>0||(null==O||null===(M=O.video)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==O||null===(Y=O.video)||void 0===Y||null===(Q=Y.contentDetails)||void 0===Q?void 0:Q.closedCaptions)||(null==O||null===(z=O.video)||void 0===z?void 0:z.closedCaptions),q=K.filter(function(e){return"VTT"===e.format}),u.addCaptions(o,q)):u.removeCaptions(o)):(Ee(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){En(e,o,l,r)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),yn=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()},In=function(e,n){var t=i.getPlayer(e);t&&t.src(n)},En=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);gn(t)&&Ee(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?mn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):mn(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.authenticateLC=hn,exports.baseUrlManager=P,exports.clearError=Te,exports.comscoreInstanceManager=We,exports.createIdxMapping=function(e){R=new Map,e.map(function(e,n){R.set(e.id,n)})},exports.createSeriesWatchMap=function(e,n){var t=new Map;O({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),j=t}).catch(function(e){return console.log(e)})},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=i.getPlayer(e),t=(We.get()||{}).destroyComscoreTag;if(yn(),t&&t(),i.clearEventListeners(),window.onresize=null,n)n.dispose();else{var o=document.getElementById(e);o&&o.remove()}},exports.getCurrentSeries=q,exports.getCurrentVideo=G,exports.getDecodedToken=B,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=ae,exports.getLinearChannelDetails=b,exports.getSGAIEnabledSource=Qe,exports.getSeasonNumber=le,exports.getSeriesDetails=function(e,n){var t,o,i=B(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:P.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=O,exports.getSeriesWatchMap=function(){return j},exports.getSource=ge,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(Pe,e)},adImpression:function(e){return t(De,e)},adFirstQuartile:function(e){return t(Ae,e)},adMidpoint:function(e){return t(Le,e)},adThirdQuartile:function(e){return t(ke,e)},adComplete:function(e){return t(Ce,e)},adBreakEnd:function(e){return t(Fe,e)}}},exports.getToken=M,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=ee,exports.getVideoDetails=T,exports.getVideoIdx=function(){return F},exports.getVideoInfo=S,exports.handleError=Ee,exports.initialiseAdvertisement=_e,exports.initialiseComscoreStreamingTracking=function(e,n){var t,o,r,l,a,d,u,s,c,v,p,f,g,h,w,y,I=null==e?void 0:e.playerId,E=i.getPlayer(I);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var T=G(),b=(null==T||null===(o=T.video)||void 0===o?void 0:o.metadata)||[],_=(null==b?void 0:b.length)&&b.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=_)&&void 0!==r&&r.length){var S=_.map(function(e){return e.value});_=null==S?void 0:S.join(",")}m.destroyComscoreTag();var O,P,D,A=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,L=Array.isArray(null==A?void 0:A.category)?null==A||null===(a=A.category)||void 0===a?void 0:a.join(","):(null==A?void 0:A.category)||null,k=xe(xe(xe({},null==T?void 0:T.video),null==T?void 0:T.linearchannel),{},{programId:(null==A?void 0:A.videotmsid)||null,programTitle:(null==A?void 0:A.lcProgrammeName)||null,episodeId:(null==A?void 0:A.videotmsid)||null,seasonNumber:(null==T||null===(d=T.video)||void 0===d||null===(u=d.series)||void 0===u?void 0:u.seasonNumber)||(null==A||null===(s=A.seriesDetails)||void 0===s?void 0:s.season)||null,episodeNumber:(null==T||null===(c=T.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.episodeNumber)||(null==A||null===(p=A.seriesDetails)||void 0===p?void 0:p.episode)||null,episodeTitle:(null==A?void 0:A.lcSubTitle)||null,isCompleteEpisode:!!(null!=T&&null!==(f=T.video)&&void 0!==f&&f.series||null!=A&&null!==(g=A.seriesDetails)&&void 0!==g&&g.episode),genre:_||L,comscoreConfig:{implementationId:(null==e||null===(h=e.comscore)||void 0===h?void 0:h.implementationId)||null,projectId:(null==e||null===(w=e.comscore)||void 0===w?void 0:w.projectId)||null}});if(null!=k&&null!==(y=k.streamingInfo)&&void 0!==y&&y.isLiveStream?k.contentType="LIVE":k.contentType="LONG_FORM_ON_DEMAND",null==k||!k.network){var C,F=(null==k?void 0:k.metadata)||[],R=null==F||null===(C=F.find(function(e){return"network"===e.name}))||void 0===C?void 0:C.value;k.network=R||null}k.siteName=null==k?void 0:k.network,null!=k&&k.network&&null!=k&&k.genre&&(k.customGenre="".concat(k.network,"_").concat((null==k?void 0:k.programTitle)||(O=k,null!=O&&O.series?null==O||null===(D=O.series)||void 0===D?void 0:D.title:null==O||null===(P=O.gist)||void 0===P?void 0:P.title),"_").concat(k.genre)),null!=A&&A.airDate&&(k.publishDate=A.airDate),null!=k&&k.runtime&&(k.runtime=1e3*((null==k?void 0:k.runtime)||0));var j=m.formulateComscorePayload(k,E);console.log("comscoreOptions player data",j),m.createComscoreStreamingTag(xe({playerName:"Video.js"},j)),m.setComscorePlayerInstance(E)}},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,m,p;if(Oe.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==d||d.focus()),f){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||fn(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!==(m=v.appcmsMain)&&void 0!==m&&null!==(p=m.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;g||pn(e,10)}}},!0)},exports.initiateErrorHandling=En,exports.inititateBeacon=function(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=i.getPlayer(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}},exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=gn,exports.isTokenExpired=D,exports.load=wn,exports.loadVideo=In,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=L,exports.rewind=fn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],p("js",new Date),p("config",e)},exports.saveWatchHistory=_,exports.seasonIdxManager=z,exports.setCurrentSeries=function(e){k=e},exports.setCurrentVideo=H,exports.setVideoIdx=Y,exports.setVideoIdxById=Q,exports.setupAdvertisementMarkers=nn,exports.setupAdvertisementMarkersForLinear=cn,exports.skip=pn,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=en,exports.videoReplayTracker=U;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),u=require("video.js"),s=require("./skin-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),u=require("video.js"),s=require("./skin-c97f0eea.js");function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n=function(){return!!e})()}require("@babel/runtime/helpers/toConsumableArray");var a=u.getComponent("Component"),o=function(){r(m,a);var o,c,h=(o=m,c=n(),function(){var e,t=l(o);if(c){var r=l(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return i(this,e)});function m(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(r=h.call(this,t,i)).playerId=i.playerId,r.mute_state=t.muted()||!1,r.initialiseStructure(),r}return t(m,[{key:"createEl",value:function(){return u.dom.createEl("div",{className:"vjs-custom-big-mute vjs-control ".concat(this.mute_state?"":"hide"," tl")})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.getPlayer(this.playerId);null!=this&&this.mute_state&&e.classList.toggle("hide"),s.injectSVG(e,"#vjs-icon-big-mute"),e.onclick=function(){var r=null==t?void 0:t.volume();e.classList.toggle("hide"),t.muted()&&t.muted(!1),t.volume(0==r?100:r)},t.on("volumechange",function(){var r=t.volume();t.muted()?(e.classList.toggle("hide"),t.volume(r)):r>0?e.classList.add("hide"):0==r&&e.classList.remove("hide")})}}]),m}();exports.default=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("./index-3543baa5.js");var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),r=require("./skin-c97f0eea.js"),n=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/slicedToArray"),a=require("./generic-0d09b7b6.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 o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var s="my-player";function l(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function c(){return(c=e(t.mark(function e(r){var n,a,u,o,s,l,c,p,d,f,m,b,g,h,v,x,y,k,w,E,j,N,T,A;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return a=e.sent,e.next=11,createImageBitmap(a);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=i(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,f=[],m=0;m<l;m++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,m*d,p,d,0,0,p,d),h=g.toDataURL("image/png"),f.push({uri:h,duration:r.duration}),r._tiles=f;return e.abrupt("return",f);case 20:for(e.prev=20,e.t0=e.catch(2),v=r.layout.split("x").map(Number),x=i(v,2),y=x[0],k=x[1],w=[],E=0;E<y*k;E++)w.push({uri:null===(j=window)||void 0===j||null===(N=j.app_data)||void 0===N||null===(T=N.appcmsMain)||void 0===T||null===(A=T.images)||void 0===A?void 0:A.placeholderCover,duration:r.duration});return e.abrupt("return",w);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function p(e,t){return d.apply(this,arguments)}function d(){return(d=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",l(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function f(e,t,n){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=r.getPlayer(s);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,l=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),n),p=t[l];p&&!p.loading&&(p.loading=!0,function(e){return c.apply(this,arguments)}(p).then(function(e){var t=e[p.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),p.loading=!1,p.src=t.uri}))}}function m(e){return b.apply(this,arguments)}function b(){return(b=e(t.mark(function e(a){var u,s,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={},a.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),a=i(r,2),s=a[0]*a[1],l=e.duration,c=0;c<s;c++){var p,d=Math.round((t*s+c)*l);u[d]=o(o({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},n(p,"left","-60px"),n(p,"border","1px solid transparent"),n(p,"borderRadius","4px"),p)})}}),s=Object.keys(u).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r.throttle(function(e){return f(e,u,s)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r.throttle(function(e){return f(e,u,s)},500))}),e.abrupt("return",u);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var g=function(){var r=e(t.mark(function e(r,n){var a,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return a=e.sent,e.next=5,a.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=i(t,2),n=r[0],a=r[1];n&&a&&(l[n.trim().toLowerCase()]=a.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function v(e,t){return x.apply(this,arguments)}function x(){return(x=e(t.mark(function e(n,u){var o,l,c,p,d,f,m,b,g,v,x,w,E,j,N,T,A,O,I,S,P,M,R,q,$,B,D,L,C,U,X,_,F,W,z,G,V,H,J,K,Q,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,fe,me;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=u,o=r.getPlayer(u),l=n.split("/"),c=l.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?l.slice(0,c+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),w=(null==o?void 0:o.duration())||(null===(d=a.getCurrentVideo())||void 0===d||null===(f=d.video)||void 0===f?void 0:f.runtime),E=(null==x||null===(m=x.querySelector("MPD > BaseURL"))||void 0===m?void 0:m.textContent)||p+"/",j=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<j.length)){e.next=72;break}if(("image"!==(T=j[N]).getAttribute("contentType")||"image/png"!==T.getAttribute("mimeType"))&&"image/jpeg"!==T.getAttribute("mimeType")){e.next=69;break}if(O=T.getElementsByTagName("SegmentTemplate")[0],I=null===(A=O.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!O||!I){e.next=48;break}if(M=I.getElementsByTagName("S"),R=parseInt(null===(S=M[0])||void 0===S?void 0:S.getAttribute("t")),q=parseInt(null===(P=M[0])||void 0===P?void 0:P.getAttribute("d")),$=T.getElementsByTagName("Representation")[0],B=$.getElementsByTagName("EssentialProperty")[0],D=B.getAttribute("value"),L=null==D?void 0:D.split("x"),C=i(L,2),U=C[0],X=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?q/_:q)/(U*X),W=$.getAttribute("id"),z=Math.round(w/F),G=Math.ceil(z/(U*X)),V=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],N=0;N<G;N++)K="/"==(J=V)[0]?new URL(p).origin:p+"/",H.push({duration:F,layout:D,uri:K+J.replace("$Time$",R+N*q).replace("$RepresentationID$",W)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=T.getElementsByTagName("Representation")[0],Y=Q.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=i(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ae=O.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=Q.getAttribute("id"),se=Math.round(w/ue),le=Math.ceil(se/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],fe=y(ce),N=0;N<le;N++)me=fe?k(fe,N+pe):ce,de.push({duration:ue,layout:Z,uri:E+me.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function y(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function w(){return(w=e(t.mark(function e(n){var i,a,u,o,s,l,c,d,f,b,h,x,y,k,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r.getPlayer(n),l=s.currentSource(),c=l.src,c=null!==(i=c)&&void 0!==i&&i.includes("blob")?null==s||null===(a=s.getSource)||void 0===a?void 0:a.call(s):c,null===(u=c)||void 0===u||!u.includes("m3u8")){e.next=19;break}return e.next=6,p(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return f=(null==d?void 0:d[0])||null,b=f.uri,h=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,g(h,b);case 12:return x=e.sent,e.next=15,m(x);case 15:y=e.sent,s.thumbnails(y);case 17:e.next=28;break;case 19:if(null===(o=c)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,v(c,n);case 22:if(!((null==(k=e.sent)?void 0:k.length)>0)){e.next=28;break}return e.next=26,m(k);case 26:w=e.sent,s.thumbnails(w);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.initiateTrickplay=function(e){return w.apply(this,arguments)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t,n,i,a=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-c97f0eea.js"),r=require("./generic-575ba973.js"),o=require("./autoNextVideo-4484bfe2.js"),d=require("./icons-eb807ef0.js"),c=require("@babel/runtime/helpers/typeof"),s=require("video.js"),u=[],m=!1,v=null,p=!1,f=null,h=null,g=function(){null!=v&&(clearInterval(v),v=null),p=!1},x="next-ep-preview-player-thumb",y=function(e,t){if(e){var n,i,a,l,r;(null==(n=t)||null===(i=n.gist)||void 0===i||null===(a=i.imageGist)||void 0===a?void 0:a.r16x9)||(null==n?void 0:n.img)||null===(l=window)||void 0===l||null===(r=l.customData)||void 0===r||r.fallbackImage;var o=e.getElementsByClassName(x)[0];o||((o=document.createElement("div")).className=x,o.setAttribute("aria-hidden","true"),e.appendChild(o))}},C=function(e,t){if(e){var n=e.getElementsByClassName(x)[0];n&&(n.style.visibility=t?"visible":"hidden")}},E=function(){var e=document.createElement("div");e.className="next-heading-wrapper";var t=document.createElement("div");t.className="next-ep-header";var n=document.createElement("span");n.className="next-ep-header-text",n.textContent="UP NEXT CLIP in";var i=document.createElement("span");i.className="next-ep-duration",i.textContent="10",t.append(n,i);var a=document.createElement("div");return a.className="next-ep-close",a.appendChild(l.parseSvgString(d.crossIconSvg())),e.append(t),e.append(a),e},N=function(e,t,n,i){var a,r,o,d,c,s=null==e?void 0:e.title,u=(null==e||null===(a=e.gist)||void 0===a?void 0:a.description)||(null==e?void 0:e.description)||"",v=document.createElement("div");v.className="next-ep-content";var p=document.createElement("div");p.className="next-ep-thumb-wrap";var f=document.createElement("img");f.className="next-ep-img",f.alt="",f.src=(null==e||null===(r=e.gist)||void 0===r||null===(o=r.imageGist)||void 0===o?void 0:o.r16x9)||(null==e?void 0:e.img)||(null===(d=window)||void 0===d||null===(c=d.customData)||void 0===c?void 0:c.fallbackImage);var h=function(e){if(null==e||Number.isNaN(Number(e)))return"";var t=Math.floor(Number(e)),n=Math.floor(t/60),i=t%60;return"".concat(n,":").concat(String(i).padStart(2,"0"))}(null==e?void 0:e.runtime),x=document.createElement("div");x.className="next-ep-thumb-runtime",x.textContent=h,h||x.classList.add("next-ep-thumb-runtime--empty"),p.appendChild(f),p.appendChild(x);var y=document.createElement("div");y.className="next-ep-meta";var C=document.createElement("div");C.className="next-ep-title",C.textContent="".concat(s||"");var E=document.createElement("div");E.className="next-ep-desc",E.textContent=u||"",String(u||"").trim()||E.classList.add("next-ep-desc--empty");var N=document.createElement("div");N.className="next-ep-meta-row";var b=document.createElement("span");b.className="next-ep-badge";var A=function(e){if(null==e?void 0:e.isClip)return"CLIP"}(e);b.textContent=A,A||b.classList.add("next-ep-badge--empty");var L=document.createElement("span");L.className="next-ep-episode",L.textContent=function(e){if(!e||"string"!=typeof e)return"";var t=e.match(/^S(\d+)\s*E(\d+)$/i)||e.match(/^S(\d+)E(\d+)$/i);return t?"S".concat(t[1]," E").concat(Number(t[2])):e}(null==e?void 0:e.episodeDisplayAttribute)||"";var S=document.createElement("div");S.className="next-ep-meta-row-left",S.appendChild(b),S.appendChild(L);var I=document.createElement("img");I.className="next-ep-network-logo",I.alt="";var P=function(e){var t,n,i,a=null===(t=window)||void 0===t||null===(n=t.app_data)||void 0===n||null===(i=n.appcmsMain)||void 0===i?void 0:i.networks;if(e&&a)return a.find(function(t){if(t.identifier==e)return t}).badgeImage}(null==e?void 0:e.network);P?I.src=P:I.classList.add("next-ep-network-logo--empty"),N.appendChild(S),y.appendChild(C),y.appendChild(E),y.appendChild(N);var B=document.createElement("div");return B.className="next-ep-meta-with-logo",B.appendChild(y),B.appendChild(I),v.appendChild(p),v.appendChild(B),v.onclick=l.debounce(function(){g(),null==t||t.remove(),m=!0,w(n)},400),v},w=function(e,t){var n=l.getPlayer(e);if(n){var i=n.duration();if(Number.isFinite(i)&&!(i<=0)){n.pause(e);var a=r.getVideoIdx();o.switchToNext(a,e,u)}}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,i,a,l;for(i in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in a=t[i])a.hasOwnProperty(l)&&("object"===c(a[l])?n[l]=e(n[l],a[l]):n[l]=a[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},i=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",function(a){var l,r,o,d,c,s,u,m;function v(){document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",v),m()}r=t({},e,a),d=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),l.appendChild(o),o.src=r[0].src,o.className="vjs-thumbnail",t(o.style,r[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),s=d.duration(),d.on("durationchange",function(e){s=d.duration()}),d.on("loadedmetadata",function(e){s=d.duration()}),(c=d.controlBar.progressControl).el().appendChild(l),u=function(e){var a,d,u,m,v,p,f,h,g,x;for(d in u=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=i(c.el()).getBoundingClientRect()).width||x.right)+g,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),m=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,m-=i(c.el()).getBoundingClientRect().left+g,a=Math.floor((m-c.el().offsetLeft)/c.width()*s),r)a>d&&(u=Math.max(u,d));(v=r[u]).src&&o.src!=v.src&&(o.src=v.src),v.style&&o.style!=v.style&&t(o.style,v.style),m+(h=function(e,t){var i;return t?parseFloat(t):"auto"!==(i=n(e)("clip"))&&"inherit"!==i&&4===(i=i.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(i[1])-parseFloat(i[3]):0}(o,v.width||r[0].width)/2)>f?m-=m+h-f:m<h&&(m=h),l.style.left=m+"px"},c.on("mousemove",u),c.on("touchmove",u),c.on("pointerdown",function(e){document.addEventListener("pointermove",u),document.addEventListener("pointerup",v)}),m=function(e){l.style.left="-1000px"},c.on("mouseout",m),c.on("touchcancel",m),c.on("touchend",m),d.on("userinactive",m)}),exports.addNextEpPreview=function(e,t){var n;if(m=!1,null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var i;u=[];var o=r.getCurrentSeries();null==o||o.map(function(e){var t;return(t=u).push.apply(t,a(e.episodes))}),null==t||null===(i=t.series)||void 0===i||i.cb}else{var d,c;u=(null==t||null===(d=t.relatedVideos)||void 0===d?void 0:d.content)||[],null==t||null===(c=t.relatedVideos)||void 0===c||c.cb}var s=l.getPlayer(e);if(s){!function(e){e&&h&&(e.off("timeupdate",h),h=null)}(l.getPlayer(f)),g(),f=e,h=function(){var t,n;if(!m){var i=s.duration(),a=s.currentTime(),l=Number.isFinite(i)&&i>0?i-a:1/0,o=null===(t=document.getElementsByClassName("next-ep-preview"))||void 0===t?void 0:t[0],d=document.getElementById(e),c=r.getVideoIdx()<=(null===(n=u)||void 0===n?void 0:n.length)-1;if(l>1){if(null!=v||p){g();var f=null==o?void 0:o.querySelector(".next-ep-header .next-ep-duration");f&&(f.textContent="10")}return o&&(o.style.visibility="hidden"),void C(d,!1)}c?(o&&(o.style.visibility="visible"),C(d,!0),p||null!=v||(s.pause(e),p=!0,function(e){var t;if(null==v){var n=null===(t=document.getElementsByClassName("next-ep-preview"))||void 0===t?void 0:t[0],i=null==n?void 0:n.querySelector(".next-ep-header .next-ep-duration");if(i){var a=10;i.textContent="10",v=setInterval(function(){a--,i.textContent=String(a),0===a&&(clearInterval(v),v=null,p=!1,u.filter(function(e,t){return t==r.getVideoIdx()}),w(e))},1e3)}}}(e))):C(d,!1)}},s.on("timeupdate",h);var x,b=u.filter(function(e,t){return t==r.getVideoIdx()});if((null==b?void 0:b.length)>0)if(null!==(x=document.getElementsByClassName("next-ep-preview"))&&void 0!==x&&x[0]){var A,L,S=null===(A=document.getElementsByClassName("next-ep-preview"))||void 0===A?void 0:A[0];S.style.visibility="hidden",null===(L=S.querySelector(".next-ep-preview-inner"))||void 0===L||L.remove(),Array.from(S.children).forEach(function(e){e.classList.contains("next-ep-content")&&e.remove()});var I=S.querySelector(".next-heading-wrapper");if(I){var P=I.querySelector(".next-ep-header"),B=null==P?void 0:P.querySelector(".next-ep-duration");if(!B&&P){P.textContent="";var q=document.createElement("span");q.className="next-ep-header-text",q.textContent="UP NEXT CLIP in",(B=document.createElement("span")).className="next-ep-duration",B.textContent="10",P.append(q,B)}else B&&(B.textContent="10")}else I=E(),S.insertBefore(I,S.firstChild);S.appendChild(N(b[0],S,e));var k=document.getElementById(e);y(k,b[0]),C(k,!1);var j=S.querySelector(".next-ep-close");j&&(j.onclick=function(){g(),S.style.visibility="hidden",m=!0,C(k,!1)})}else{var T=document.createElement("div");T.className="next-ep-preview",T.style.visibility="hidden";var V=document.getElementById(e);V.append(T);var F=E();F.querySelector(".next-ep-close").onclick=function(){g(),T.style.visibility="hidden",m=!0,C(V,!1)},T.append(F);var O=N(b[0],T,e);T.append(O),y(V,b[0]),C(V,!1)}}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),i=null==t?void 0:t.tvProviderLogoUrl;if(i){var a=document.createElement("div");a.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(i),r.alt="Provider Image",a.append(r),n.el().appendChild(a),n.on("useractive",function(){a.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||a.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?a.style.top="3.2rem":a.style.top="1rem"})}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t,n,o,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-c97f0eea.js"),a=require("./generic-0d09b7b6.js"),r=require("./autoNextVideo-b1e2e401.js"),d=require("./icons-eb807ef0.js"),s=require("@babel/runtime/helpers/typeof"),u=require("video.js"),c=[],v=!1,m=function(e,t){var n=l.getPlayer(e),o=Math.floor(n.currentTime());if(Math.floor(n.duration())!=o){n.pause(e);var i=a.getVideoIdx();r.switchToNext(i,e,c)}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},o=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},u.registerPlugin("thumbnails",function(i){var l,a,r,d,s,u,c,v;function m(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",m),v()}a=t({},e,i),d=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),l.appendChild(r),r.src=a[0].src,r.className="vjs-thumbnail",t(r.style,a[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),u=d.duration(),d.on("durationchange",function(e){u=d.duration()}),d.on("loadedmetadata",function(e){u=d.duration()}),(s=d.controlBar.progressControl).el().appendChild(l),c=function(e){var i,d,c,v,m,p,f,g,h,y;for(d in c=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=o(s.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),v=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,v-=o(s.el()).getBoundingClientRect().left+h,i=Math.floor((v-s.el().offsetLeft)/s.width()*u),a)i>d&&(c=Math.max(c,d));(m=a[c]).src&&r.src!=m.src&&(r.src=m.src),m.style&&r.style!=m.style&&t(r.style,m.style),v+(g=function(e,t){var o;return t?parseFloat(t):"auto"!==(o=n(e)("clip"))&&"inherit"!==o&&4===(o=o.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(o[1])-parseFloat(o[3]):0}(r,m.width||a[0].width)/2)>f?v-=v+g-f:v<g&&(v=g),l.style.left=v+"px"},s.on("mousemove",c),s.on("touchmove",c),s.on("pointerdown",function(e){document.addEventListener("pointermove",c),document.addEventListener("pointerup",m)}),v=function(e){l.style.left="-1000px"},s.on("mouseout",v),s.on("touchcancel",v),s.on("touchend",v),d.on("userinactive",v)}),exports.addNextEpPreview=function(e,t){var n;if(v=!1,null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var o;c=[];var r=a.getCurrentSeries();null==r||r.map(function(e){var t;return(t=c).push.apply(t,i(e.episodes))}),null==t||null===(o=t.series)||void 0===o||o.cb}else{var s,u;c=(null==t||null===(s=t.relatedVideos)||void 0===s?void 0:s.content)||[],null==t||null===(u=t.relatedVideos)||void 0===u||u.cb}var p=l.getPlayer(e);p.on("timeupdate",function(){var e,t;if(!v){var n=Math.floor(p.currentTime()),o=p.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&a.getVideoIdx()<=(null===(t=c)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}});var f,g=c.filter(function(e,t){return t==a.getVideoIdx()});if((null==g?void 0:g.length)>0)if(null!==(f=document.getElementsByClassName("next-ep-preview"))&&void 0!==f&&f[0]){var h,y,x,A,w,E,C,b,N,B,L,P;(null===(h=document.getElementsByClassName("next-ep-preview"))||void 0===h?void 0:h[0]).style.visibility="hidden";var I=null===(y=document.getElementsByClassName("next-ep-title"))||void 0===y?void 0:y[0],j=null===(x=document.getElementsByClassName("next-ep-img"))||void 0===x?void 0:x[0],k=null===(A=document.getElementsByClassName("next-ep-content"))||void 0===A?void 0:A[0],T=null===(w=g[0])||void 0===w?void 0:w.title;(null===(E=T)||void 0===E?void 0:E.length)>60&&(T=T.substr(0,60)+"..."),I.textContent="".concat(T),j.src=(null===(C=g[0])||void 0===C||null===(b=C.gist)||void 0===b||null===(N=b.imageGist)||void 0===N?void 0:N.r16x9)||(null==g||null===(B=g[0])||void 0===B?void 0:B.img)||(null===(L=window)||void 0===L||null===(P=L.customData)||void 0===P?void 0:P.fallbackImage),k.onclick=function(){return m(e)}}else{var q,O,S,V,M,F,X,R,D=document.createElement("div");D.className="next-ep-preview",D.style.visibility="hidden",document.getElementById(e).append(D);var G=document.createElement("div");G.className="next-heading-wrapper";var H=document.createElement("div");H.className="next-ep-header",H.textContent="Next up";var Q=document.createElement("div");Q.className="next-ep-close",Q.onclick=function(){D.style.visibility="hidden",v=!0},Q.appendChild(l.parseSvgString(d.crossIconSvg())),G.append(H),G.append(Q);var U=null===(q=g[0])||void 0===q?void 0:q.title,W=document.createElement("img");W.className="next-ep-img",W.src=(null===(O=g[0])||void 0===O||null===(S=O.gist)||void 0===S||null===(V=S.imageGist)||void 0===V?void 0:V.r16x9)||(null==g||null===(M=g[0])||void 0===M?void 0:M.img)||(null===(F=window)||void 0===F||null===(X=F.customData)||void 0===X?void 0:X.fallbackImage);var Y=document.createElement("div");Y.className="next-ep-title",(null===(R=U)||void 0===R?void 0:R.length)>60&&(U=U.substr(0,60)+"..."),Y.textContent="".concat(U);var _=document.createElement("div");_.className="next-ep-content",_.append(W),_.append(Y),_.onclick=l.debounce(function(){null==D||D.remove(),v=!0,m(e)},400),D.append(G),D.append(_)}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),o=null==t?void 0:t.tvProviderLogoUrl;if(o){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(o),a.alt="Provider Image",i.append(a),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/get"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var l={startTime:0,timeLive:3600},u=0,c=l.timeLive,p=o.getComponent("Button"),h=o.getComponent("Component"),d=o.getComponent("ProgressControl"),v=d.getComponent("SeekBar"),m=d.getComponent("PlayProgressBar"),f=d.getComponent("LoadProgressBar"),_=o.getComponent("MouseTimeDisplay");f.prototype.update=function(e){var t=this.player_.buffered(),r=this.player_.duration(),n=this.player_.bufferedEnd(),a=this.partEls_,i=function(e,t){var r=e/t||0;return 100*(r>=1?1:r)+"%"};0!==i(n,r)&&(this.el_.style.width=i(n,r));for(var o=0;o<t.length;o++){var s=t.start(o),l=t.end(o),u=a[o];u||(u=this.el_.appendChild(document.createElement("div")),a[o]=u),0!==i(s,n)&&(u.style.left=i(s,n)),0!==i(l-s,n)&&(u.style.width=i(l-s,n))}for(var c=a.length;c>t.length;c--)this.el_.removeChild(a[c-1]);a.length=t.length},v.prototype.update_=function(e,t){var r=this.player_.duration(),n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),r!==Number.POSITIVE_INFINITY&&this.el_.setAttribute("aria-valuetext","-".concat(o.formatTime(r-n,r))),this.bar.update(o.dom.getBoundingClientRect(this.el_),t)},v.prototype.handleMouseMove=function(e){var t=1-this.calculateDistance(e),r=this.player_.seekable().end(0)-t*c;r===this.player_.duration()&&(r-=.1),this.player_.currentTime(r),this.update()},m.prototype.update=function(e,t){var r=this,n=this.player_.duration();this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var a=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),i=o.formatTime(n-a,n);0!==t&&n!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(i))})},_.prototype.update=function(e,t){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var n=o.formatTime(c-t*c,c);r.el_.style.left="".concat(e.width*t,"px"),0!==t&&r.player_.duration()!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(n))})};var y=function(e){var t=this;e||(e=l),this.on("timeupdate",function(e){var r,n;(n=(r=t).seekable())&&n.length&&(n.end(0)-r.currentTime()<20?r.controlBar.liveButton.addClass("onair"):r.controlBar.liveButton.removeClass("onair"),r.duration(r.seekable().end(0)),u||(u=c=r.seekable().end(0)))}),this.on("pause",function(e){t.controlBar.liveButton.removeClass("onair")}),this.ready(function(){var r;r=t,o.mergeOptions(l,e),r.addClass("vjs-dvr-seekbar"),r.controlBar.addClass("vjs-dvr-control-bar"),r.controlBar.progressControl.seekBar.__proto__.__proto__.update=function(){if(this.el_){var e;e="VolumeBar"===this.name_?this.getPercent():1-(this.player_.duration()-this.player_.currentTime())/c;var t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0),e>1&&(e=1);var r=(100*e).toFixed(2)+"%",n=t.el().style;return 0!==e&&(this.vertical()?n.height=r:n.width=r),e}}},r.controlBar.progressControl&&r.controlBar.progressControl.addClass("vjs-dvr-progress-control"),r.controlBar.liveButton=r.controlBar.addChild("liveButton"),r.controlBar.el().insertBefore(r.controlBar.liveButton.el(),r.controlBar.progressControl.el())})},C=function(){n(c,p);var o,l,u=(o=c,l=s(),function(){var e,t=i(o);if(l){var r=i(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function c(t,r){var n;return e(this,c),(n=u.call(this,t,r)).el().innerHTML='<span class="liveCircle"></span><span class="liveText">LIVE</span>',t.paused()||n.addClass("onair"),n}return t(c,[{key:"buildCSSClass",value:function(){return"vjs-live-button ".concat(function(e,t,n,a){var o=r(i(1&a?e.prototype:e),t,n);return 2&a&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(c,"buildCSSClass",this,3)([]))}},{key:"handleClick",value:function(e){var t=this.player_.seekable().end(0);this.player_.currentTime(t),this.player_.play()}}]),c}();h.registerComponent("LiveButton",C),(o.registerPlugin||o.plugin)("dvrSeekbar",y),exports.default=y;
|