@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
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r,t as l,c as a}from"./skin-4f84b841.js";import{i as d,d as u}from"./browser-d4613b36.js";import s from"md5";import c from"js-cookie";import{a as v,r as m}from"./captions-2b4caf69.js";import f from"@babel/runtime/helpers/typeof";import p from"@babel/runtime/helpers/toConsumableArray";import g from"@babel/runtime/helpers/slicedToArray";import{destroyComscoreTag as w,formulateComscorePayload as h,createComscoreStreamingTag as I,setComscorePlayerInstance as E}from"@viewlift/comscore/index.js";function y(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function T(e){window.dataLayer=window.dataLayer||[],y("js",new Date),y("config",e)}function b(e,n){y("event",e,n)}var _={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 S(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 O(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?S(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):S(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var D={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=D.version;var A,L=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":N.get()+"".concat(null==_?void 0:_.getVideoDetails)},P=function(e,n){var t,o,r,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})}):i({url:L(),params:O({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":D.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})},k=function(e,n){var t,o,r,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})}):i({url:N.get()+_.getLinearChannelDetails,params:O(O(O(O(O({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===(r=window)||void 0===r||null===(l=r.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}})},F=function(e,n){var t,o,r=$(n),l=(null==r?void 0:r.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})}):i({url:N.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},R=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,X();case 2:return o=e.sent,e.abrupt("return",i({url:N.get()+"".concat(null==_?void 0:_.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:O({},n),params:O({},(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)}}(),C=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:N.get()+"".concat(null==_?void 0:_.getVideoInfoV2,"/").concat(r,"/").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})},j=function(e){var n=e.videoId;return i({method:"GET",url:N.get()+"".concat(null==_?void 0:_.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},N=(A=null==_?void 0:_.apiBaseUrl,{set:function(e){e&&(A=e)},get:function(){return A}}),V=function(e,n,t,o){var r,l;return i({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===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},W=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},U=null;function B(){return{set:function(e){e&&(U=e)},get:function(){return U}}}var M,x,H,G,Y,Q,z,q=function(){var e=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=B().get(),o=N.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),K=null,X=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"))||!W(n)){e.next=6;break}return K||(K=q().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&B().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){K=null})),e.abrupt("return",K);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),J=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},$=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},Z=(Q=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;Q.set(t,(Q.get(t)||0)+1)},get:function(e){return Q.get(e)},clear:function(){Q.clear()}}),ee=function(e){x=e},ne=function(){return x},te=function(e){M=e},oe=function(){return M},ie=function(){return H},re=function(e){H=e},le=function(){return Y},ae=function(e){G=new Map,e.map(function(e,n){G.set(e.id,n)})},de=function(e){if(G){var n=G.get(e);re(n+1)}},ue=(z=0,{set:function(e){e>=0&&(z=e)},get:function(){return z}});function se(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 ce(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?se(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):se(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var ve=0,me=function(){var e,n,t,o,i,r,l,a=ne();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===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function fe(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function pe(){var e=window.sessionStorage.getItem("uid");return e||(e=fe(),window.sessionStorage.setItem("uid",e),e)}function ge(){return we.apply(this,arguments)}function we(){return(we=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,X();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 he(e){return e?String(e):""}window.initialise=function(e){window.sid=fe(),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,i,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,b(r?"FAILED_TO_START":"DROPPED_STREAM",ce({pfm:window.platform,uid:pe(),vid:me(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n){e.one("play",tryCatch(function(){var t,o,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),b("PLAY",ce({pfm:window.platform,uid:pe(),vid:me(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":me(),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 i,r,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")&&ve<4)ve++,b("BUFFERING",ce({pfm:window.platform,uid:pe(),vid:me(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.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,b("FIRST_FRAME",ce({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:pe(),vid:me()},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,i,r,l;b("AD_REQUEST",ce({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:pe(),vid:me(),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}),b("AD_IMPRESSION",ce({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:pe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:me()},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(ve=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(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(Ie(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var Ie=function(e,n,t){return e>=n&&e<=t},Ee=function(){var e,n=ne(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};function ye(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var o,r,l,a,d,u,s,c,v,m,f,p,g,w,h,I,E,y,T,b,S;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:return E=e.sent,y=$(E),T=null==y?void 0:y.site,b=null==y?void 0:y.siteId,e.t0=ce,e.t1=ce,e.t2=ce({aid:T,cid:b,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=pe(),e.t5=me(),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?he(n.adPosition):"",e.next=26,ge();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=Ee())&&void 0!==m?m:null,e.t28=null!=T?T: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===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t33=(0,e.t0)(e.t31,e.t32),S=[e.t33],i({url:(null===(w=window)||void 0===w||null===(h=w.customData)||void 0===h||null===(I=h.beacon)||void 0===I?void 0:I.url)||N.get()+_.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 Te=function(e,n){var t=new Map;j({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),Y=t}).catch(function(e){return console.log(e)})},be=function(){var e=ue.get();return e>=0?e+1:1},_e=function(){var e,n,t,o=oe(),i=ne(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=ue.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)===r});return a>=0?a+1:1};function Se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Oe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Se(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var De=s,Ae=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},Le=function(e){var n=Pe(e,"video.tags",[]),t=Pe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Pe=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},ke=function(){var e,n,t,o,i,l,a,d,u,s,v,m,f,p,g,w,h,I,E,y,T,b,_,S,O,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",A=arguments.length>1?arguments[1]:void 0,L=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return D;var P=(null==L?void 0:L.siteName)||(null==L?void 0:L.site)||"",k=(null==L?void 0:L.contentType)||"video",F=(null==L||null===(t=L[k])||void 0===t?void 0:t.metadata)||(null==L||null===(o=L[k])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.metadata),R=r(A);if(!D.includes("VIEWLIFT_"))return D;var C,j=window.getComputedStyle(document.getElementById(A),null),N=Math.trunc(j.getPropertyValue("height").slice(0,-2)),V=Math.trunc(j.getPropertyValue("width").slice(0,-2)),W="linearchannel"===k?null==L||null===(l=L.linearchannel)||void 0===l||null===(a=l.channels)||void 0===a||null===(d=a.find(function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)}))||void 0===d||null===(u=d.content)||void 0===u?void 0:u.id:Pe(L,"video.gist.id",""),U="linearchannel"===k?null==L||null===(s=L.linearchannel)||void 0===s||null===(v=s.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)}))||void 0===m?void 0:m.title:Pe(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),B=null,M=null;"function"==typeof window.__gpp&&(null===(C=window)||void 0===C||C.__gpp("ping",function(e){B=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]}));var x=c.get("us_privacy")||c.get("usprivacy"),H=void 0!==x?x:"1YNN",G=null!==(f=null===(p=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===p?void 0:p.fwIdentifier)&&void 0!==f?f:null,Y=Oe(Oe({},Fe(F)),{},{VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:N,VIEWLIFT_SIZE:Ae(V,N),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:Pe(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Pe(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Pe(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(w=R.options_)||void 0===w?void 0:w.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(h=R.options_)||void 0===h?void 0:h.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==P||"usanetwork"==P?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:Le(L),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Pe(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Pe(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:c.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Pe(null===(I=window)||void 0===I||null===(E=I.app_data)||void 0===E||null===(y=E.site)||void 0===y?void 0:y.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==P||"usanetwork"==P?"":Pe(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?De(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*Pe(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Pe(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:Pe(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Pe(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:_e(),VIEWLIFT_SEASON_NUMBER:be(),VIEWLIFT_CONTENT_TAGS:Le(L),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:B||"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 Q in Y){var z=new RegExp(Q,"g");D=D.replace(z,Y[Q])}return D},Fe=function(e){var n,t,o,i,r,l,a={},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===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||c?(d()?s?a=Oe(Oe({},a),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(a=Oe(Oe({},a),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?a=Oe(Oe({},a),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(a=Oe(Oe({},a),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?a=Oe(Oe({},a),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):c&&(a=Oe(Oe({},a),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),a=d()?Oe(Oe({},a),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):Oe(Oe({},a),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(a=Oe(Oe({},a),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),a=d()?Oe(Oe({},a),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):Oe(Oe({},a),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),a=Oe(Oe({},a),{},{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")||""})},Re=function(e,n){var t,o,i,r,l,a,d,s,c,v,m,f,p,g=(null==e?void 0:e.contentType)||"video",w=null==e||null===(t=e[g])||void 0===t?void 0:t.drmEnabled,h=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,I=null==e||null===(r=e[g])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,E=(null==e||null===(a=e[g])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.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 y=(null==e||null===(m=e[g])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=I&&I.hls)return je(I);if(w){var T=Ne(h,n);return T.src=ke(T.src,n,e),T}if("Safari"!==u()&&y)return Ce(h);if(E){var b=je(h);return b.src=ke(b.src,n,e),b}if(null!=h&&h.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(h);return _.src=ke(_.src,n,e),_}return null},Ce=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},je=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},Ne=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=u();if(r(n),"Safari"===d){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 i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,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,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(i);return Ve(n),s}var c,v={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ve(n),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==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(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==a?void 0:a.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==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ve=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==u()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},We=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 i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},Ue=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},Be=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Me=!1,xe=function(e,n,t){var o=ke(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima&&"object"!==f(i.ima))return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){Me=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Me&&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===(i=o.ads)||void 0===i?void 0:i.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)}};function He(e,n){var t,o,i,l=r(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===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,r,u,s,c,v,m,f;if(Ye.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||Wn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(u=r.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!==(f=m.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||Vn(e,10)}}},!0)}var Ge,Ye=(Ge=!0,{enable:function(){Ge=!0},disable:function(){Ge=!1},get enabled(){return Ge}}),Qe="ssai-breakStart",ze="ssai-adImpression",qe="ssai-firstQuartile",Ke="ssai-midpoint",Xe="ssai-thirdQuartile",Je="ssai-complete",$e="ssai-breakEnd",Ze={breakStart:Qe,impression:ze,firstQuartile:qe,midpoint:Ke,thirdQuartile:Xe,complete:Je,breakEnd:$e};function en(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=Ze[o];i&&t.trigger(i,n)}function nn(e){var n=r(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(Qe,e)},adImpression:function(e){return t(ze,e)},adFirstQuartile:function(e){return t(qe,e)},adMidpoint:function(e){return t(Ke,e)},adThirdQuartile:function(e){return t(Xe,e)},adComplete:function(e){return t(Je,e)},adBreakEnd:function(e){return t($e,e)}}}function tn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function on(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):tn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var rn,ln=(rn={},{get:function(){return rn},set:function(e){rn=e}});function an(e,n){var t,o,i,l,a,d,u,s,c,v,m,f,p,g,y,T,b=null==e?void 0:e.playerId,_=r(b);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var S=ne(),O=(null==S||null===(o=S.video)||void 0===o?void 0:o.metadata)||[],D=(null==O?void 0:O.length)&&O.filter(function(e){return"advertisingGenre"===e.name});if(null!==(i=D)&&void 0!==i&&i.length){var A=D.map(function(e){return e.value});D=null==A?void 0:A.join(",")}w();var L,P,k,F=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,R=Array.isArray(null==F?void 0:F.category)?null==F||null===(a=F.category)||void 0===a?void 0:a.join(","):(null==F?void 0:F.category)||null,C=on(on(on({},null==S?void 0:S.video),null==S?void 0:S.linearchannel),{},{programId:(null==F?void 0:F.videotmsid)||null,programTitle:(null==F?void 0:F.lcProgrammeName)||null,episodeId:(null==F?void 0:F.videotmsid)||null,seasonNumber:(null==S||null===(d=S.video)||void 0===d||null===(u=d.series)||void 0===u?void 0:u.seasonNumber)||(null==F||null===(s=F.seriesDetails)||void 0===s?void 0:s.season)||null,episodeNumber:(null==S||null===(c=S.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.episodeNumber)||(null==F||null===(m=F.seriesDetails)||void 0===m?void 0:m.episode)||null,episodeTitle:(null==F?void 0:F.lcSubTitle)||null,isCompleteEpisode:!!(null!=S&&null!==(f=S.video)&&void 0!==f&&f.series||null!=F&&null!==(p=F.seriesDetails)&&void 0!==p&&p.episode),genre:D||R,comscoreConfig:{implementationId:(null==e||null===(g=e.comscore)||void 0===g?void 0:g.implementationId)||null,projectId:(null==e||null===(y=e.comscore)||void 0===y?void 0:y.projectId)||null}});if(null!=C&&null!==(T=C.streamingInfo)&&void 0!==T&&T.isLiveStream?C.contentType="LIVE":C.contentType="LONG_FORM_ON_DEMAND",null==C||!C.network){var j,N=(null==C?void 0:C.metadata)||[],V=null==N||null===(j=N.find(function(e){return"network"===e.name}))||void 0===j?void 0:j.value;C.network=V||null}C.siteName=null==C?void 0:C.network,null!=C&&C.network&&null!=C&&C.genre&&(C.customGenre="".concat(C.network,"_").concat((null==C?void 0:C.programTitle)||(L=C,null!=L&&L.series?null==L||null===(k=L.series)||void 0===k?void 0:k.title:null==L||null===(P=L.gist)||void 0===P?void 0:P.title),"_").concat(C.genre)),null!=F&&F.airDate&&(C.publishDate=F.airDate),null!=C&&C.runtime&&(C.runtime=1e3*((null==C?void 0:C.runtime)||0));var W=h(C,_);console.log("comscoreOptions player data",W),I(on({playerName:"Video.js"},W)),E(_)}}function dn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function un(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?dn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):dn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function sn(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 cn(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)?cn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 r,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,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function cn(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 vn,mn=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),fn=(vn=null,{set:function(e){vn=e},get position(){return vn}});function pn(e,n){return gn.apply(this,arguments)}function gn(){return(gn=n(t.mark(function e(n,o){var i,l,a,d,u,s,c,v,m,f,p,w,h,I,E,y,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r(n),a=Re(o,n),d=a.src,u=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[u])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,s=d.replace("/dash/","/session/").replace("/master/","/session/"),s=ke(s,n,o),c=hn(s),v=g(c,2),m=v[0],f=v[1],p=wn(f)||{},s=new URL(s.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=g(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(un({adsParams:un({},m)},p))});case 14:return w=e.sent,e.next=17,w.json();case 17:return h=e.sent,I="https://"+new URL(s).hostname,E=h.trackingUrl,y=h.manifestUrl,T=I+E,b=I+y,mn.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 wn(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=g(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function hn(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=sn((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=g(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},u={},s=0,c=Object.entries(n);s<c.length;s++){var v=g(c[s],2),m=v[0],f=v[1];if(m.startsWith("ads."))d[m.replace(/^ads\./,"")]=f;else u[m]=f}return[d,u]}var In,En,yn,Tn=new Map;function bn(e,n){return _n.apply(this,arguments)}function _n(){return _n=n(t.mark(function e(o,i){var a,d,u,s,c,v,m,f,g,w,h,I,E,y,T,b,_,S,O,D,A,L,P,k,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,i,l,a){var d,u,s=r(o);if(!s.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<P&&L.clear(),P=e;var v=(null==n||null===(d=n.ads)||void 0===d||null===(u=d[i])||void 0===u?void 0:u.adId)||c;Math.floor(s.currentTime());var m,f=sn(t);try{var p=function(){var t,r,d,u=m.value,c=u.eventType,f=u.beaconUrls,p=u.startTimeInSeconds,g=u.startTime,w=u.durationInSeconds,h=p||0,I=f,E=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(d=r.ads)||void 0===d?void 0:d.adEventHandler)||null,y="".concat(h,"_").concat(c),T=Tn.get("pod-".concat(l))||[];if(console.warn(e,h,"map:",c,"condition1:",e>=h,"map:",Tn),e>=h&&!T.includes(y)){T.push(y),Tn.set("pod-".concat(l),T);try{k(c,n,I,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=fn.position;fn.set(null),setTimeout(function(){null!=b&&(s.currentTime(b),a())},500)}if("function"==typeof E)try{var _,S={eventType:c,startTimeInSeconds:p,startTime:g,durationInSeconds:w,ad:null==n||null===(_=n.ads)||void 0===_?void 0:_[i],adIndex:i};E({adsData:S}),en(o,S)}catch(e){console.error("Error when calling ads callback:",e)}var O=ln.get();if(O&&0!==Object.keys(O).length){var D=O.formulateComscoreAdPayload,A=O.startComscoreAdTracking,P=O.finishComscoreAdTracking,F=O.endComscoreAdTracking,R="".concat(podStartTimeInSeconds,"_").concat(v,"_").concat(c);if(!L.has(R))if(L.set(R,!0),"impression"===c){var C,j=mn.get();A(D(un(un({},null==n||null===(C=n.ads)||void 0===C?void 0:C[i]),{},{trackingUrl:j})))}else"complete"===c?P():"breakEnd"===c&&F()}}};for(f.s();!(m=f.n()).done;)p()}catch(e){f.e(e)}finally{f.f()}}},k=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Tn.clear(),fn.set(i),g=mn.get(),(w=r(o)).one("loadeddata",function(){g&&D(g)}),h=new Map,I=new Map,E=-1,y=(null===(a=document)||void 0===a||null===(d=a.getElementsByClassName("tvProviderImage"))||void 0===d?void 0:d[0])||null,T=(null==w||null===(u=w.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,b=(null==w||null===(s=w.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,_=(null==w||null===(c=w.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==w||null===(m=w.el())||void 0===m||null===(f=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,O=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return p(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.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 un(un({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&i.push(null==s?void 0:s[0])}return i},D=function(){var e=n(t.mark(function e(n){var a,d,u,s,c,v,m,f,g,w,D,L,P,k,R,C,j,N,V,W,U,B,M,x;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",W),0===e.button&&j()},V=function(e){},N=function(){var e,n=w.currentTime(),t=null,o=sn(g);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,h.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){w.currentTime(t+2.2)},100))},j=function(){var e,n=w.currentTime(),t=null,o=sn(g);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!h.has(r)||n>=r&&n<=d)&&(t=r,h.set(r,!0),I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){w.currentTime(t+.4)},100))},c=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:m=e.sent,f=m.avails,g=[],w=r(o),D=w.controlBar.progressControl,L=D.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),f.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(c=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!c&&i&&(w.currentTime(i),N()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g,"function"==typeof(C=(null===(P=window)||void 0===P||null===(k=P.customData)||void 0===k||null===(R=k.ads)||void 0===R?void 0:R.onAdBreaksLoaded)||null)&&C(g)),console.log(g,"data"),g.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=w.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",L.appendChild(r)}}),w._timeUpdateHandler&&w.off("timeupdate",w._timeUpdateHandler),w._timeUpdateHandler=l(function(){var e=w.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=g[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var d;e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&h.set(i,!0),Ye.disable(),y&&y.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")),D.el().classList.add("hide-progress-bar");for(var u=e-i,s=0,c=0,v=0;v<l.length;v++){var m,f=null==l||null===(m=l[v])||void 0===m?void 0:m.durationInSeconds;if(u<s+f){c=v;break}s+=f}l[c];var w=Math.max(0,r-u),E=Math.round(w);U.style.display="block",x.textContent="".concat(c+1," of ").concat(l.length," • ").concat(A(E));var O=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});O.push.apply(O,p(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&O.push.apply(O,p(null==t?void 0:t.podSlotImpressionBeacon)),F(e,t,O,c,o,N),"break"}I.delete(i)},o=0;o<g.length;o++){if("break"===t())break}n||(U.style.display="none",D.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")),y&&y.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Ye.enable())}},1e3),w.on("timeupdate",w._timeUpdateHandler),null===(d=document)||void 0===d||d.addEventListener("keydown",function(e){Ye.enabled&&"ArrowRight"==e.key&&(j(),Vn(o,10),e.stopPropagation())}),D.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",W))}),null===(u=document)||void 0===u||null===(s=u.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach(function(e){return null==e?void 0:e.remove()}),(U=document.createElement("div")).className="ssai-ad-container",(B=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",B.append(M),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",U.append(B),U.append(x),w.el().appendChild(U);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,P=-1;case 21:case"end":return e.stop()}},e)})),_n.apply(this,arguments)}function Sn(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 On(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)?On(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 r,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,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function On(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 Dn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function An(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Dn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Dn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ln={},Pn=(null===(In=window)||void 0===In||null===(En=In.location)||void 0===En||null===(yn=En.search)||void 0===yn?void 0:yn.includes("debug=true"))||!1,kn=null;function Fn(e){return Rn.apply(this,arguments)}function Rn(){return Rn=n(t.mark(function e(o){var i,a,d,u,s,c,v,m,f,g,w,h,I,E,y,T,b,_,S,O,D,A,L,P,k,F,R;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:R=function(e,n,t,i,l){var a,d,u=r(o);if(!u.seeking()){var s=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[i])||void 0===d?void 0:d.adId)||s;Math.floor(u.currentTime());var v,m=Sn(t);try{for(m.s();!(v=m.n()).done;){var f,p,g,w=v.value,h=w.eventType,I=w.beaconUrls,E=w.startTimeInSeconds,y=w.startTime,T=w.durationInSeconds,b=(w.eventId,E||s),_=I,S=(null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(h),D="pod-".concat(s);P.has(D)||P.set(D,new Set);var A=P.get(D);if(Pn&&console.warn(e,b,"map:",h,"condition1:",e>=b,"map:",P),e>=b&&e<=b+k&&!A.has(O)){A.add(O);try{F(h,n,_,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,h,n)}if("function"==typeof S)try{var L,R={eventType:h,startTimeInSeconds:E,startTime:y,durationInSeconds:T,ad:null==n||null===(L=n.ads)||void 0===L?void 0:L[i],adIndex:i};S({adsData:R}),en(o,R)}catch(e){console.error("Error when calling ads callback:",e)}var C=ln.get();if(C&&0!==Object.keys(C).length){var j=C.formulateComscoreAdPayload,N=C.startComscoreAdTracking,V=C.finishComscoreAdTracking,W=C.endComscoreAdTracking;if("impression"===h){var U,B=mn.get();N(j(An(An({},null==n||null===(U=n.ads)||void 0===U?void 0:U[i]),{},{trackingUrl:B})))}else"complete"===h?V():"breakEnd"===h&&W()}}}}catch(e){m.e(e)}finally{m.f()}}},F=function(e,n,t,o){var i,r,l;"breakEnd"===e&&(null===(i=Ln)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=Ln)||void 0===r?void 0:r.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(Pn&&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)})}))},w=function(){kn&&clearInterval(kn)},f=mn.get(),(g=r(o)).one("loadeddata",function(){w(),kn=setInterval(function(){f&&!g.paused()&&L(f)},2e3)}),g.on("dispose",function(){w()}),h=new Map,I=new Map,E=-1,y=null,T=(null===(i=document)||void 0===i||null===(a=i.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,b=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,_=(null==g||null===(u=g.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,S=(null==g||null===(s=g.el())||void 0===s||null===(c=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,O=(null==g||null===(v=g.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,D=!1,A=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return p(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.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]&&i.push(null==s?void 0:s[0])}return i},L=function(){var e=n(t.mark(function e(n){var i,a,d,u,s,c,v,m,f,g;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=new URL(n),y&&a.searchParams.append("nextToken",y),e.next=4,fetch(a.toString(),{method:"GET"});case 4:return d=e.sent,e.next=7,d.json();case 7:u=e.sent,s=u.avails,c=u.nextToken||null,y=c,v=[],m=r(o),f=m.controlBar.progressControl,g=f.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),s.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:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),Pn&&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 i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",g.appendChild(r)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=l(function(){var e=m.currentTime();if(e!==E){E=e;for(var n=function(){var n=v[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;D=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&h.set(o,!0),Ye.disable(),T&&T.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var d=e-o,u=0,s=0,c=0;c<r.length;c++){var m,g=null==r||null===(m=r[c])||void 0===m?void 0:m.durationInSeconds;if(d<u+g){s=c;break}u+=g}setTimeout(function(){Ln.totalAds=null==r?void 0:r.length,Ln.currentAdIndex=s},1e3);var w=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});w.push.apply(w,p(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&w.push.apply(w,p(null==n?void 0:n.podSlotImpressionBeacon)),R(e,n,w,s),"break"}I.delete(o)},t=0;t<v.length;t++){if("break"===n())break}D||(Ln={},f.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),Ye.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,k=2.5;case 22:case"end":return e.stop()}},e)})),Rn.apply(this,arguments)}function Cn(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 jn=function(e){o(e).play()},Nn=function(e){o(e).pause()},Vn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Wn=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Un=function(e){return!!o.getPlayer("".concat(e))},Bn=function(e){return o(e).paused()},Mn=function(){var e=n(t.mark(function e(o,i){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,X();case 3:return a=e.sent,d=r(o),e.abrupt("return",new Promise(function(e,r){k(i,a).then(function(){var r=n(t.mark(function n(r){var a,u,s,c,v,m,f,p;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==r?void 0:r.data,window.sid=fe(),m.contentType="linearchannel",m.channelId=null==i?void 0:i.channelId,f=(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,p=Re(m,o),!f){n.next=11;break}return n.next=9,pn(o,m);case 9:p=n.sent,l=!0;case 11:ee(m),p&&l?(Qn(o,p),f&&Fn(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 r.apply(this,arguments)}}()).catch(function(e){r({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)}}(),xn=function(){var e=n(t.mark(function e(o,i,l){var a,d,u,s,c,f,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:return s=e.sent,(oe()||null)&&de(i),c=0,f=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&C(i,s).then(function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(f=(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,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,l){P(i,s).then(function(){var i=n(t.mark(function n(i){var a,d,u,s,g,w,h,I,E,y,T,b,_,S,O,D,A,L,P,k,F,R,C,j,N,V,W,U,B,M,x,H,G,Y,Q,z,q,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(D=null==i?void 0:i.data,A=(null==D?void 0:D.contentType)||"video",L=(null==D||null===(a=D[A])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(s=u.appcmsMain)||void 0===s||null===(g=s.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,P=(null==D||null===(w=D.video)||void 0===w||null===(h=w.streamingInfo)||void 0===h?void 0:h.isLiveStream)||!1,ee(i.data),(k=(null==D||null===(I=D.ads)||void 0===I||null===(E=I.preRoll)||void 0===E||null===(y=E.adTags)||void 0===y||null===(T=y.web)||void 0===T?void 0:T.active)&&(null==D||null===(b=D.ads)||void 0===b||null===(_=b.preRoll)||void 0===_||null===(S=_.adTags)||void 0===S||null===(O=S.web)||void 0===O?void 0:O.url))&&xe(o,k,D),F=Re(D,o),!L){n.next=12;break}return n.next=11,pn(o,D);case 11:F=n.sent;case 12:F?(H=(null==D||null===(R=D.video)||void 0===R||null===(C=R.gist)||void 0===C?void 0:C.videoImageUrl)||(null==D||null===(j=D.video)||void 0===j||null===(N=j.gist)||void 0===N||null===(V=N.imageGist)||void 0===V?void 0:V.r16x9),(G=r(o)).poster(H),Qn(o,F),L&&bn(o,p),G.on("loadstart",function(){P&&e({status:!0,msg:"Video Loaded",response:D})}),G.on("loadeddata",function(){Be(),e({status:!0,msg:"Video Loaded",response:D})}),G.one("play",function(){c&&!L&&f<95&&setTimeout(function(){G.currentTime(c)},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==D||null===(W=D.video)||void 0===W||null===(U=W.contentDetails)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0||(null==D||null===(M=D.video)||void 0===M||null===(x=M.closedCaptions)||void 0===x?void 0:x.length)>0?(K=(null==D||null===(Q=D.video)||void 0===Q||null===(z=Q.contentDetails)||void 0===z?void 0:z.closedCaptions)||(null==D||null===(q=D.video)||void 0===q?void 0:q.closedCaptions),Y=K.filter(function(e){return"VTT"===e.format}),v(o,Y)):m(o)):(Ue(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 i.apply(this,arguments)}}()).catch(function(e){zn(e,o,l,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),Hn=function(e,n,t){var o=r(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Gn=function(e){var n=r(e),t=(ln.get()||{}).destroyComscoreTag;if(Yn(),t&&t(),a(),window.onresize=null,n)n.dispose();else{var o=document.getElementById(e);o&&o.remove()}},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()},Qn=function(e,n){var t=r(e);t&&t.src(n)},zn=function(n,t,o,i){var r,l,a,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.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);Un(t)&&Ue(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?Cn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Cn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},qn=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 i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{j as $,F as A,Te as B,ue as C,te as D,Hn as E,Vn as F,jn as G,Nn as H,Wn as I,Un as J,xn as K,Mn as L,Gn as M,V as N,nn as O,N as P,J as Q,B as R,W as S,T,Tn as U,He as V,ie as W,Bn as X,re as Y,Fn as Z,bn as _,_e as a,ae as a0,de as a1,oe as b,ln as c,be as d,ne as e,Re as f,pe as g,ee as h,an as i,Be as j,Ue as k,Qn as l,le as m,qn as n,ye as o,xe as p,We as q,pn as r,R as s,$ as t,P as u,Z as v,C as w,zn as x,X as y,k as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"video.js";import r from"axios";import{g as o,t as a,c as l}from"./skin-4f84b841.js";import{i as s,d}from"./browser-d4613b36.js";import u from"md5";import c from"js-cookie";import{a as v,r as f}from"./captions-2b4caf69.js";import m from"@babel/runtime/helpers/typeof";import p from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";import{destroyComscoreTag as g,formulateComscorePayload as y,createComscoreStreamingTag as w,setComscorePlayerInstance as T}from"@viewlift/comscore/index.js";import _ from"@babel/runtime/helpers/classCallCheck";import I from"@babel/runtime/helpers/createClass";function b(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function E(e){window.dataLayer=window.dataLayer||[],b("js",new Date),b("config",e)}function S(e,n){b("event",e,n)}var k={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 A(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function O(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?A(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var D={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=D.version;var L,P=function(){var e,n,t,i;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":W.get()+"".concat(null==k?void 0:k.getVideoDetails)},C=function(e,n){var t,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):r({url:P(),params:O({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":D.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})},F=function(e,n){var t,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):r({url:W.get()+k.getLinearChannelDetails,params:O(O(O(O(O({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken}})},j=function(e,n){var t,i,o=ee(n),a=(null==o?void 0:o.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})}):r({url:W.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},R=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:return i=e.sent,e.abrupt("return",r({url:W.get()+"".concat(null==k?void 0:k.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:O({},n),params:O({},(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)}}(),V=function(e,n){var t,i,o=window.contentType;return r({method:"GET",url:W.get()+"".concat(null==k?void 0:k.getVideoInfoV2,"/").concat(o,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},N=function(e){var n=e.videoId;return r({method:"GET",url:W.get()+"".concat(null==k?void 0:k.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},W=(L=null==k?void 0:k.apiBaseUrl,{set:function(e){e&&(L=e)},get:function(){return L}}),x=function(e,n,t,i){var o,a;return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.adbTempToken},withCredentials:!0})},U=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},B=null;function M(){return{set:function(e){e&&(B=e)},get:function(){return B}}}var H,G,q,Q,Y,z,K,X=function(){var e=n(t.mark(function e(){var n,i,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=M().get(),i=W.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),J=null,$=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!U(n)){e.next=6;break}return J||(J=X().then(function(e){var t,i,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,o=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),o&&M().set(o),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){J=null})),e.abrupt("return",J);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Z=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},ee=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},ne=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},te=(z=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;z.set(t,(z.get(t)||0)+1)},get:function(e){return z.get(e)},clear:function(){z.clear()}}),ie=function(e){G=e},re=function(){return G},oe=function(e){H=e},ae=function(){return H},le=function(){return q},se=function(e){q=e},de=function(){return Y},ue=function(e){Q=new Map,e.map(function(e,n){Q.set(e.id,n)})},ce=function(e){if(Q){var n=Q.get(e);se(n+1)}},ve=(K=0,{set:function(e){e>=0&&(K=e)},get:function(){return K}});function fe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function me(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var pe,he=(pe={},{setConfig:function(e){pe=me(me({},pe),e)},getConfig:function(){return pe}});function ge(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ye(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ge(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var we=0,Te=null,_e=function(){var e,n,t,i,r,o,a,l=re();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)}))||void 0===t||null===(i=t.content)||void 0===i?void 0:i.id:(null==l||null===(r=l.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function Ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function be(){return Te||window.sessionStorage.getItem("uid")}function Ee(){return Se.apply(this,arguments)}function Se(){return(Se=n(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(n.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ke(e){return e?String(e):""}window.initialise=function(e){window.sid=Ie(),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 n,t,i,r=o(),a=null!=r&&r.el_?Math.floor(r.currentTime()):0;window.cleanupTimers(),S(e,ye({pfm:window.platform,uid:be(),vid:_e(),videoPosition:a},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:e,videoPosition:a,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var i,r,o;window.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),S("PLAY",ye({pfm:window.platform,uid:be(),vid:_e(),videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(o=r.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",ye({"Video ID":_e(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()&&window.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var r,o,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&we<4)we++,S("BUFFERING",ye({pfm:window.platform,uid:be(),vid:_e(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0,window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,S("FIRST_FRAME",ye({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:be(),vid:_e()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,i,r,o,a;S("AD_REQUEST",ye({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:be(),vid:_e(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),S("AD_IMPRESSION",ye({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:be(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:_e()},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 n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(we=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),r=0;r<i.length;r++){var o=i.start(r),a=i.end(r);if(Ae(n,o,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var Ae=function(e,n,t){return e>=n&&e<=t},Oe=function(){var e,n=re(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};function De(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=he.getConfig();if(null==t||!t.disableBeacon){null!=n&&n.userId&&(Te=n.userId);var i=o(e);window.initialise(i,null==n?void 0:n.analyticsCb),window.firstFrame(i,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),i.on("loadedmetadata",function(){window.endFirstFrame(i)})}}}window.fireEvent=function(){var e=n(t.mark(function e(n){var i,o,a,l,s,d,u,c,v,f,m,p,h,g,y,w,T,_,I,b,E;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:return T=e.sent,_=ee(T),I=null==_?void 0:_.site,b=null==_?void 0:_.siteId,e.t0=ye,e.t1=ye,e.t2=ye({aid:I,cid:b,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=be(),e.t5=_e(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(l=n.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?ke(n.adPosition):"",e.next=26,Ee();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(s=n.ttFirstFrame)&&void 0!==s?s:null,e.t23=null!==(d=n.bitrate)&&void 0!==d?d:null,e.t24=null!==(u=n.resHeight)&&void 0!==u?u:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(f=Oe())&&void 0!==f?f:null,e.t28=null!=I?I:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(h=p.beacon)||void 0===h?void 0:h.params,e.t33=(0,e.t0)(e.t31,e.t32),E=[e.t33],r({url:(null===(g=window)||void 0===g||null===(y=g.customData)||void 0===y||null===(w=y.beacon)||void 0===w?void 0:w.url)||W.get()+k.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:E}).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(e,n){var t=new Map;N({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),Y=t}).catch(function(e){return console.log(e)})},Pe=function(){var e=ve.get();return e>=0?e+1:1},Ce=function(){var e,n,t,i=ae(),r=re(),o=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=ve.get(),l=null==i||null===(n=i[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===o});return l>=0?l+1:1};function Fe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function je(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Fe(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Re=u,Ve=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},Ne=function(e){var n=We(e,"video.tags",[]),t=We(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},We=function(e,n,t){for(var i=0,r=(n=n.split(".")).length;i<r;i++){var o;e=null===(o=e)||void 0===o?void 0:o[n[i]]}return e||t},xe=function(){var e,n,t,i,r,a,l,s,d,u,v,f,m,p,h,g,y,w,T,_,I,b,E,S,k,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",O=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return A;var L=(null==D?void 0:D.siteName)||(null==D?void 0:D.site)||"",P=(null==D?void 0:D.contentType)||"video",C=(null==D||null===(t=D[P])||void 0===t?void 0:t.metadata)||(null==D||null===(i=D[P])||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.metadata),F=o(O);if(!A.includes("VIEWLIFT_"))return A;var j,R=window.getComputedStyle(document.getElementById(O),null),V=Math.trunc(R.getPropertyValue("height").slice(0,-2)),N=Math.trunc(R.getPropertyValue("width").slice(0,-2)),W="linearchannel"===P?null==D||null===(a=D.linearchannel)||void 0===a||null===(l=a.channels)||void 0===l||null===(s=l.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===s||null===(d=s.content)||void 0===d?void 0:d.id:We(D,"video.gist.id",""),x="linearchannel"===P?null==D||null===(u=D.linearchannel)||void 0===u||null===(v=u.channels)||void 0===v||null===(f=v.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===f?void 0:f.title:We(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,B=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",function(e){U=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]}));var M=c.get("us_privacy")||c.get("usprivacy"),H=void 0!==M?M:"1YNN",G=null!==(m=null===(p=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===p?void 0:p.fwIdentifier)&&void 0!==m?m:null,q=je(je({},Ue(C)),{},{VIEWLIFT_WIDTH:N,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:Ve(N,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(h=window)||void 0===h?void 0:h.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:We(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:We(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:We(D,"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"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:Ne(D),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(We(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+We(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:c.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:We(null===(w=window)||void 0===w||null===(T=w.app_data)||void 0===T||null===(_=T.site)||void 0===_?void 0:_.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":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:G?Re(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*We(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:We(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:x,VIEWLIFT_CONTENT_SERIES_TITLE:We(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:We(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Ce(),VIEWLIFT_SEASON_NUMBER:Pe(),VIEWLIFT_CONTENT_TAGS:Ne(D),VIEWLIFT_GPP_SID:B||"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 Q in q){var Y=new RegExp(Q,"g");A=A.replace(Y,q[Q])}return A},Ue=function(e){var n,t,i,r,o,a,l,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===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i?void 0:i.SVOD)||!1,m=(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.subscription)||void 0===a?void 0:a.TVE)||!1;return f||m?(s()?f?c=je(je({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):m&&(c=je(je({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):f?c=je(je({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):m&&(c=je(je({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),f?c=je(je({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(s()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):m&&(c=je(je({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(s()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=s()?je(je({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):je(je({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=je(je({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(s()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=s()?je(je({},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")||""}):je(je({},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=je(je({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:We(null===(l=window)||void 0===l||null===(d=l.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,n){var t,i,r,o,a,l,s,u,c,v,f,m,p,h=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[h])||void 0===t?void 0:t.drmEnabled,y=null==e||null===(i=e[h])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.videoAssets,w=null==e||null===(o=e[h])||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[h])||void 0===l||null===(s=l.streamingInfo)||void 0===s||null===(u=s.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===(m=f.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=w&&w.hls)return He(w);if(g){var I=Ge(y,n);return I.src=xe(I.src,n,e),I}if("Safari"!==d()&&_)return Me(y);if(T){var b=He(y);return b.src=xe(b.src,n,e),b}if(null!=y&&y.mpeg){var E=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(y);return E.src=xe(E.src,n,e),E}return null},Me=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},He=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},Ge=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,s=d();if(o(n),"Safari"===s){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(r,function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,o){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,n,t){console.log(e),e&&o(e),o(null,t)})}}}}}(r);return qe(n),u}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(qe(n),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var qe=function(e){var n=o(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==d()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Qe=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:i}},Ye=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var i=document.getElementById(e);if(i){var r=document.createElement("div");r.className="error-container";var o=document.createElement("div");o.className="error-message",o.innerHTML="".concat(n),r.appendChild(o),i.append(r)}}},ze=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Ke=!1,Xe=function(e,n,t){var i=xe(n,e,t),r=o(e);if(n&&window.google){if("function"!=typeof r.ima&&"object"!==m(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,i,r,a=o(e);if(null!==a.el_){Ke=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Ke&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),a.one(d,function(){u&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function Je(e,n){var t,i,r,a=o(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(i=t.playToggle)||void 0===i?void 0:i.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var i,r,o,d,u,c,v,f,m;if(Ze.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==s||s.focus()),p){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(i=document.querySelector(".vjs-fullscreen-control"))||void 0===i||i.click();break;case"ArrowLeft":h&&!1===n.liveui||Mt(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(o=r.app_data)||void 0===o||null===(d=o.appcmsMain)||void 0===d||null===(u=d.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;h||Bt(e,10)}}},!0)}var $e,Ze=($e=!0,{enable:function(){$e=!0},disable:function(){$e=!1},get enabled(){return $e}}),en="ssai-breakStart",nn="ssai-adImpression",tn="ssai-firstQuartile",rn="ssai-midpoint",on="ssai-thirdQuartile",an="ssai-complete",ln="ssai-breakEnd",sn={breakStart:en,impression:nn,firstQuartile:tn,midpoint:rn,thirdQuartile:on,complete:an,breakEnd:ln};function dn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=o(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var i=n.eventType,r=sn[i];r&&t.trigger(r,n)}function un(e){var n=o(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var i=function(e,n){return t(n)};return n.on(e,i),function(){return n.off(e,i)}};return{adBreakStart:function(e){return t(en,e)},adImpression:function(e){return t(nn,e)},adFirstQuartile:function(e){return t(tn,e)},adMidpoint:function(e){return t(rn,e)},adThirdQuartile:function(e){return t(on,e)},adComplete:function(e){return t(an,e)},adBreakEnd:function(e){return t(ln,e)}}}function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function vn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):cn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var fn,mn=(fn={},{get:function(){return fn},set:function(e){fn=e}});function pn(e,n){var t,i,r,a,l,s,d,u,c,v,f,m,p,h,_,I,b,E,S,k,A,O=null==e?void 0:e.playerId,D=o(O);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var L=re(),P=(null==L||null===(i=L.video)||void 0===i?void 0:i.metadata)||[],C=(null==P?void 0:P.length)&&P.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=C)&&void 0!==r&&r.length){var F=C.map(function(e){return e.value});C=null==F?void 0:F.join(",")}g();var j,R,V,N=null===(a=window)||void 0===a?void 0:a.lcProgrammeDetails,W=Array.isArray(null==N?void 0:N.category)?null==N||null===(l=N.category)||void 0===l?void 0:l.join(","):(null==N?void 0:N.category)||null,x=vn(vn(vn({},null==L?void 0:L.video),null==L?void 0:L.linearchannel),{},{siteName:(null==e||null===(s=e.comscore)||void 0===s?void 0:s.applicationName)||(null==e||null===(d=e.comscore)||void 0===d||null===(u=d.metadata)||void 0===u?void 0:u.siteName)||(null==L?void 0:L.site)||null,programId:(null==N?void 0:N.videotmsid)||null,programTitle:(null==N?void 0:N.lcProgrammeName)||null,episodeId:(null==N?void 0:N.videotmsid)||null,seasonNumber:(null==L||null===(c=L.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==N||null===(f=N.seriesDetails)||void 0===f?void 0:f.season)||null,episodeNumber:(null==L||null===(m=L.video)||void 0===m||null===(p=m.series)||void 0===p?void 0:p.episodeNumber)||(null==N||null===(h=N.seriesDetails)||void 0===h?void 0:h.episode)||null,episodeTitle:(null==N?void 0:N.lcSubTitle)||null,isCompleteEpisode:!!(null!=L&&null!==(_=L.video)&&void 0!==_&&_.series||null!=N&&null!==(I=N.seriesDetails)&&void 0!==I&&I.episode),genre:C||W,comscoreConfig:{implementationId:(null==e||null===(b=e.comscore)||void 0===b?void 0:b.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),U=null==e||null===(S=e.comscore)||void 0===S||null===(k=S.metadata)||void 0===k?void 0:k.contentType;if(null!=x&&null!==(A=x.streamingInfo)&&void 0!==A&&A.isLiveStream?x.contentType="Live":x.contentType=U||"LongFormOnDemand",null==x||!x.network){var B,M=(null==x?void 0:x.metadata)||[],H=null==M||null===(B=M.find(function(e){return"network"===e.name}))||void 0===B?void 0:B.value;x.network=H||null}null!=x&&x.network&&null!=x&&x.genre&&(x.customGenre="".concat(x.network,"_").concat((null==x?void 0:x.programTitle)||(j=x,null!=j&&j.series?null==j||null===(V=j.series)||void 0===V?void 0:V.title:null==j||null===(R=j.gist)||void 0===R?void 0:R.title),"_").concat(x.genre)),null!=N&&N.airDate&&(x.publishDate=N.airDate),null!=x&&x.runtime&&"function"==typeof D.duration&&(x.runtime=1e3*Math.ceil(D.duration()));var G=y(x,D);console.log("comscoreOptions player data",G),w(vn({playerName:"Video.js"},G)),T(D)}}function hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function gn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):hn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function yn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return wn(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)?wn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function wn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var Tn,_n=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),In=(Tn=null,{set:function(e){Tn=e},get position(){return Tn}});function bn(e,n){return En.apply(this,arguments)}function En(){return(En=n(t.mark(function e(n,i){var r,a,l,s,d,u,c,v,f,m,p,g,y,w,T,_,I,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o(n),l=Be(i,n),s=l.src,d=(null==i?void 0:i.contentType)||"video",null==i||null===(r=i[d])||void 0===r||null===(a=r.streamingInfo)||void 0===a||a.isLiveStream,u=s.replace("/dash/","/session/").replace("/master/","/session/"),u=xe(u,n,i),c=kn(u),v=h(c,2),f=v[0],m=v[1],p=Sn(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach(function(e){var n=h(e,2),t=n[0],i=n[1];u.searchParams.set(t,i)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gn({adsParams:gn({},f)},p))});case 14:return g=e.sent,e.next=17,g.json();case 17:return y=e.sent,w="https://"+new URL(u).hostname,T=y.trackingUrl,_=y.manifestUrl,I=w+T,b=w+_,_n.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 Sn(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=h(e,2),t=n[0],i=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(i)]}))||{}}function kn(e){var n={};if(!e.split("?")[1])return[{},{}];var t,i=new URL(e,window.location.origin),r=yn((null==i?void 0:i.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),a=o[0],l=o[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},d={},u=0,c=Object.entries(n);u<c.length;u++){var v=h(c[u],2),f=v[0],m=v[1];if(f.startsWith("ads."))s[f.replace(/^ads\./,"")]=m;else d[f]=m}return[s,d]}var An,On,Dn,Ln=new Map;function Pn(e,n){return Cn.apply(this,arguments)}function Cn(){return Cn=n(t.mark(function e(i,r){var l,s,d,u,c,v,f,m,h,g,y,w,T,_,I,b,E,S,k,A,O,D,L,P,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,r,a,l){var s,d,u=o(i);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<L&&D.clear(),L=e;var v=(null==n||null===(s=n.ads)||void 0===s||null===(d=s[r])||void 0===d?void 0:d.adId)||c;Math.floor(u.currentTime());var f,m=yn(t);try{var p=function(){var t,o,s,d=f.value,c=d.eventType,m=d.beaconUrls,p=d.startTimeInSeconds,h=d.startTime,g=d.durationInSeconds,y=p||0,w=m,T=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(s=o.ads)||void 0===s?void 0:s.adEventHandler)||null,_="".concat(y,"_").concat(c),I=Ln.get("pod-".concat(a))||[];if(console.warn(e,y,"map:",c,"condition1:",e>=y,"map:",Ln),e>=y&&!I.includes(_)){I.push(_),Ln.set("pod-".concat(a),I);try{P(c,n,w,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=In.position;In.set(null),setTimeout(function(){null!=b&&(u.currentTime(b),l())},500)}if("function"==typeof T)try{var E,S={eventType:c,startTimeInSeconds:p,startTime:h,durationInSeconds:g,ad:null==n||null===(E=n.ads)||void 0===E?void 0:E[r],adIndex:r};T({adsData:S}),dn(i,S)}catch(e){console.error("Error when calling ads callback:",e)}var k=mn.get();if(k&&0!==Object.keys(k).length){var A=k.formulateComscoreAdPayload,O=k.startComscoreAdTracking,L=k.finishComscoreAdTracking,C=k.endComscoreAdTracking,F="".concat(y,"_").concat(v,"_").concat(c);if(!D.has(F))if(D.set(F,!0),"impression"===c){var j,R=_n.get();O(A(gn(gn({},null==n||null===(j=n.ads)||void 0===j?void 0:j[r]),{},{trackingUrl:R})))}else"complete"===c?L():"breakEnd"===c&&C()}}};for(m.s();!(f=m.n()).done;)p()}catch(e){m.e(e)}finally{m.f()}}},P=function(e,n,t,i){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},O=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Ln.clear(),In.set(r),h=_n.get(),(g=o(i)).one("loadeddata",function(){h&&A(h)}),y=new Map,w=new Map,T=-1,_=(null===(l=document)||void 0===l||null===(s=l.getElementsByClassName("tvProviderImage"))||void 0===s?void 0:s[0])||null,I=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,b=(null==g||null===(u=g.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,E=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==g||null===(f=g.el())||void 0===f||null===(m=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,k=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return p(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],s=null==l||null===(n=l.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return gn(gn({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},A=function(){var e=n(t.mark(function e(n){var l,s,d,u,c,v,f,m,h,g,A,D,L,P,F,j,R,V,N,W,x,U,B,M;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",W),0===e.button&&R()},N=function(e){},V=function(){var e,n=g.currentTime(),t=null,i=yn(h);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(o+a));n>=o&&n<=l&&(t=l,y.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){g.currentTime(t+2.2)},100))},R=function(){var e,n=g.currentTime(),t=null,i=yn(h);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(o+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>s||n>o)&&!y.has(o)||n>=o&&n<=s)&&(t=o,y.set(o,!0),w.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){g.currentTime(t+.4)},100))},c=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:f=e.sent,m=f.avails,h=[],g=o(i),A=g.controlBar.progressControl,D=A.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),m.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(c=!0),h.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:k(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!c&&r&&(g.currentTime(r),V()),null!=h&&h.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",h),window.adsQueueList=h,"function"==typeof(j=(null===(L=window)||void 0===L||null===(P=L.customData)||void 0===P||null===(F=P.ads)||void 0===F?void 0:F.onAdBreaksLoaded)||null)&&j(h)),console.log(h,"data"),h.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,i=g.duration();if(!(n>i||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",D.appendChild(o)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=a(function(){var e=g.currentTime();if(e!==T){T=e;for(var n=!1,t=function(){var t=h[i],r=t.startTimeInSeconds,o=t.durationInSeconds,a=t.ads,l=r+o;if(e>=r-1.2&&e<=l+1.2){var s;e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&y.set(r,!0),Ze.disable(),_&&_.classList.add("vjs-hidden"),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),A.el().classList.add("hide-progress-bar");for(var d=e-r,u=0,c=0,v=0;v<a.length;v++){var f,m=null==a||null===(f=a[v])||void 0===f?void 0:f.durationInSeconds;if(d<u+m){c=v;break}u+=m}a[c];var g=Math.max(0,o-d),T=Math.round(g);x.style.display="block",M.textContent="".concat(c+1," of ").concat(a.length," • ").concat(O(T));var k=[];return null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});k.push.apply(k,p(n))}),(null==t||null===(s=t.podSlotImpressionBeacon)||void 0===s?void 0:s.length)>0&&k.push.apply(k,p(null==t?void 0:t.podSlotImpressionBeacon)),C(e,t,k,c,i,V),"break"}w.delete(r)},i=0;i<h.length;i++){if("break"===t())break}n||(x.style.display="none",A.el().classList.remove("hide-progress-bar"),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Ze.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(s=document)||void 0===s||s.addEventListener("keydown",function(e){Ze.enabled&&"ArrowRight"==e.key&&(R(),Bt(i,10),e.stopPropagation())}),A.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",W))}),null===(d=document)||void 0===d||null===(u=d.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach(function(e){return null==e?void 0:e.remove()}),(x=document.createElement("div")).className="ssai-ad-container",(U=document.createElement("div")).className="sponsored-adbox",(B=document.createElement("div")).className="sponsored-text",B.textContent="Sponsored Ad",U.append(B),(M=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",x.append(U),x.append(M),g.el().appendChild(x);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=new Map,L=-1;case 21:case"end":return e.stop()}},e)})),Cn.apply(this,arguments)}function Fn(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 jn(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)?jn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function jn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}function Rn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Vn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Rn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Rn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Nn={},Wn=(null===(An=window)||void 0===An||null===(On=An.location)||void 0===On||null===(Dn=On.search)||void 0===Dn?void 0:Dn.includes("debug=true"))||!1,xn=null;function Un(e){return Bn.apply(this,arguments)}function Bn(){return Bn=n(t.mark(function e(i){var r,l,s,d,u,c,v,f,m,h,g,y,w,T,_,I,b,E,S,k,A,O,D,L,P,C,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,r,a){var l,s,d=o(i);if(!d.seeking()){var u=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(l=n.ads)||void 0===l||null===(s=l[r])||void 0===s?void 0:s.adId)||u;Math.floor(d.currentTime());var v,f=Fn(t);try{for(f.s();!(v=f.n()).done;){var m,p,h,g=v.value,y=g.eventType,w=g.beaconUrls,T=g.startTimeInSeconds,_=g.startTime,I=g.durationInSeconds,b=(g.eventId,T||u),E=w,S=(null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(h=p.ads)||void 0===h?void 0:h.adEventHandler)||null,k="".concat(c,"_").concat(y),A="pod-".concat(u);L.has(A)||L.set(A,new Set);var O=L.get(A);if(Wn&&console.warn(e,b,"map:",y,"condition1:",e>=b,"map:",L),e>=b&&e<=b+P&&!O.has(k)){O.add(k);try{C(y,n,E,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,n)}if("function"==typeof S)try{var D,F={eventType:y,startTimeInSeconds:T,startTime:_,durationInSeconds:I,ad:null==n||null===(D=n.ads)||void 0===D?void 0:D[r],adIndex:r};S({adsData:F}),dn(i,F)}catch(e){console.error("Error when calling ads callback:",e)}var j=mn.get();if(j&&0!==Object.keys(j).length){var R=j.formulateComscoreAdPayload,V=j.startComscoreAdTracking,N=j.finishComscoreAdTracking,W=j.endComscoreAdTracking;if("impression"===y){var x,U=_n.get();V(R(Vn(Vn({},null==n||null===(x=n.ads)||void 0===x?void 0:x[r]),{},{trackingUrl:U})))}else"complete"===y?N():"breakEnd"===y&&W()}}}}catch(e){f.e(e)}finally{f.f()}}},C=function(e,n,t,i){var r,o,a;"breakEnd"===e&&(null===(r=Nn)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(o=Nn)||void 0===o?void 0:o.totalAds)&&(null==n||null===(a=n.ads)||void 0===a?void 0:a.length)>0||(Wn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},g=function(){xn&&clearInterval(xn)},m=_n.get(),(h=o(i)).one("loadeddata",function(){g(),xn=setInterval(function(){m&&!h.paused()&&D(m)},2e3)}),h.on("dispose",function(){g()}),y=new Map,w=new Map,T=-1,_=null,I=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==h||null===(s=h.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,E=(null==h||null===(d=h.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==h||null===(u=h.el())||void 0===u||null===(c=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,k=(null==h||null===(v=h.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,A=!1,O=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return p(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],s=null==l||null===(n=l.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return Vn(Vn({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},D=function(){var e=n(t.mark(function e(n){var r,l,s,d,u,c,v,f,m,h,g,D;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=new URL(n),_&&d.searchParams.append("nextToken",_),e.next=4,fetch(d.toString(),{method:"GET"});case 4:return u=e.sent,e.next=7,u.json();case 7:c=e.sent,v=c.avails,f=c.nextToken||null,_=f,m=[],h=o(i),g=null==h||null===(r=h.controlBar)||void 0===r?void 0:r.progressControl,D=null==g||null===(l=g.seekBar)||void 0===l?void 0:l.el(),null===(s=document)||void 0===s||s.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),v.map(function(e,n){m.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),Wn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),null!=m&&m.length&&(window.adsQueueList=m),m.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,i=h.duration();if(!(n>i||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",D.appendChild(o)}}),h._timeUpdateHandler&&h.off("timeupdate",null==h?void 0:h._timeUpdateHandler),h._timeUpdateHandler=a(function(){if(Ht(i)){var e=null==h?void 0:h.currentTime();if(e!==T){T=e;for(var n=function(){var n=m[t],i=n.startTimeInSeconds,r=n.durationInSeconds,o=n.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var l;A=!!(e>=i&&e<=a&&Array.isArray(o)&&(null==o?void 0:o.length)>0),e>a&&y.set(i,!0),Ze.disable(),I&&I.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),k&&(k.style.pointerEvents="none",k.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),g.el().classList.add("hide-progress-bar");for(var s=e-i,d=0,u=0,c=0;c<o.length;c++){var v,f=null==o||null===(v=o[c])||void 0===v?void 0:v.durationInSeconds;if(s<d+f){u=c;break}d+=f}setTimeout(function(){Nn.totalAds=null==o?void 0:o.length,Nn.currentAdIndex=u},1e3);var h=[];return null==o||o.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});h.push.apply(h,p(n))}),(null==n||null===(l=n.podSlotImpressionBeacon)||void 0===l?void 0:l.length)>0&&h.push.apply(h,p(null==n?void 0:n.podSlotImpressionBeacon)),F(e,n,h,u),"break"}w.delete(i)},t=0;t<m.length;t++){if("break"===n())break}A||(Nn={},g.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),I&&I.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),k&&(k.style.pointerEvents="auto",k.classList.remove("vjs-hidden")),Ze.enable())}}},1e3),h.on("timeupdate",h._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,P=2.5;case 22:case"end":return e.stop()}},e)})),Bn.apply(this,arguments)}var Mn=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Hn(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 Gn=function(){function e(n,t,i,r){_(this,e),this.video_=r,this.ad_=n,this.skipOffset_=function(e){if(!e)return null;var n=new RegExp(Mn.source,"g");n.lastIndex=0;var t=n.exec(e);if(!t)return null;var i=Number(t[1])||0,r=Number(t[2]),o=Number(t[3]),a=Number(t[6])||0;return r>59||o>59?null:a/1e3+o+60*r+3600*i}(null==n?void 0:n.skipOffset),this.adPosition_=t,this.totalAds_=i,this.isSkipped_=!1}return I(e,[{key:"isClientRendering",value:function(){return!1}},{key:"getDuration",value:function(){var e,n;return null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.durationInSeconds)&&void 0!==e?e:0}},{key:"getRemainingTime",value:function(){var e,n,t,i,r,o;return(null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==e?e:0)+(null!==(t=null===(i=this.ad_)||void 0===i?void 0:i.durationInSeconds)&&void 0!==t?t:0)-(null!==(r=null===(o=this.video_)||void 0===o?void 0:o.currentTime)&&void 0!==r?r:0)}},{key:"isSkippable",value:function(){return"number"==typeof this.skipOffset_}},{key:"getTimeUntilSkippable",value:function(){if("number"!=typeof this.skipOffset_)return this.getRemainingTime();var e=this.getRemainingTime()+this.skipOffset_-this.getDuration();return Math.max(e,0)}},{key:"canSkipNow",value:function(){return 0===this.getTimeUntilSkippable()}},{key:"skip",value:function(){this.isSkipped_=!0,this.video_&&(this.video_.currentTime+=this.getRemainingTime())}},{key:"isLinear",value:function(){return!0}},{key:"getSequenceLength",value:function(){return this.totalAds_||1}},{key:"getPositionInSequence",value:function(){return this.adPosition_||1}},{key:"getTitle",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adTitle)||""}},{key:"getVastAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.vastAdId)||""}},{key:"getAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adId)||""}},{key:"getCreativeAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.creativeId)||""}},{key:"getTimeOffset",value:function(){var e,n;return null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==e?e:0}},{key:"release",value:function(){this.ad_=null,this.adPosition_=null,this.totalAds_=null}},{key:"isSkipped",value:function(){return this.isSkipped_}}]),e}(),qn="impression",Qn="start",Yn="mute",zn="unmute",Kn="resume",Xn="pause",Jn="firstQuartile",$n="midpoint",Zn="thirdQuartile",et="complete",nt="skip",tt="breakStart",it="breakEnd",rt="skipStateChanged",ot="ad_impression",at="ad_started",lt="ad_muted",st="ad_volume_changed",dt="ad_resumed",ut="ad_paused",ct="ad_first_quartile",vt="ad_midpoint",ft="ad_third_quartile",mt="ad_complete",pt="ad_stopped",ht="ad_skipped",gt="ad_skip_state_changed",yt="ad_break_started",wt="ad_break_ended",Tt="ads_loaded",_t="ad_cuepoints_changed";function It(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function bt(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?It(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):It(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Et(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 St(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)?St(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function St(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var kt="[Transmit]";function At(e){var n,t,i;if(null==e)return{avails:[],nextToken:null,dashAvailabilityStartTime:null};var r=null!==(n=e.dashAvailabilityStartTime)&&void 0!==n?n:null,o=null!==(t=e.nextToken)&&void 0!==t?t:null,a=[];if(Array.isArray(e.avails))a=e.avails;else if(Array.isArray(e)){var l,s,d,u,c=e[0];if(c&&Array.isArray(c.avails))a=c.avails,r=null!==(l=null!==(s=r)&&void 0!==s?s:c.dashAvailabilityStartTime)&&void 0!==l?l:null,o=null!==(d=null!==(u=o)&&void 0!==u?u:c.nextToken)&&void 0!==d?d:null;else a=e}else if(Array.isArray(null==e||null===(i=e.data)||void 0===i?void 0:i.avails)){var v,f,m,p;a=e.data.avails,o=null!==(v=null!==(f=o)&&void 0!==f?f:e.data.nextToken)&&void 0!==v?v:null,r=null!==(m=null!==(p=r)&&void 0!==p?p:e.data.dashAvailabilityStartTime)&&void 0!==m?m:null}else Array.isArray(null==e?void 0:e.data)&&(a=e.data);return{avails:a,nextToken:o,dashAvailabilityStartTime:r}}var Ot=function(){function e(n,t,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};_(this,e),this.video_=n,this.player_=t,this.onEvent_="function"==typeof i?i:function(){},this.dashManifestUrl_=o.dashManifestUrl||null,this.config_=null,this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.pollIntervalMs_=2e3,this.pollId_=null,this.adBreaks_=[],this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null,this.eventsSent_=new Set,this.firedBeacons_=new Set,this.adBreakListenersAttached_=!1,this.globalListeners_=[],this.adListeners_=[],this.videoTimeupdate_=null,this.lastMutedForAd_=null,this.onDispose_=function(){return r.release()},this.apiTimelineAbsolute_=!1}var i,r,o;return I(e,[{key:"configure",value:function(e){this.config_=e}},{key:"addTrackingUrl",value:function(e){this.trackingUrl_=e||"",this.onEvent_({type:Tt,loadTime:0})}},{key:"getCuePoints",value:function(){var e,n=new Map,t=Et(this.adBreaks_);try{for(t.s();!(e=t.n()).done;){var i,r=Et(e.value.ads||[]);try{for(r.s();!(i=r.n()).done;){var o=i.value,a=o.startTimeInSeconds,l=a+o.durationInSeconds;if(isFinite(a)&&isFinite(l)&&!(l<=a)){var s="".concat(a.toFixed(1),"|").concat(l.toFixed(1));n.has(s)||n.set(s,{start:a,end:l})}}}catch(e){r.e(e)}finally{r.f()}}}catch(e){t.e(e)}finally{t.f()}return Array.from(n.values()).sort(function(e,n){return e.start-n.start})}},{key:"onManifestUpdated",value:function(){this.trackingUrl_&&(this.requestTrackingInfo_(this.firstTrackingRequest_),this.firstTrackingRequest_=!1,this.ensurePolling_())}},{key:"stop",value:function(){this.onEnded_(),this.detachAllListeners_(),this.eventsSent_.clear(),this.firedBeacons_.clear(),this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.apiTimelineAbsolute_=!1,this.adBreaks_=[],this.adBreakListenersAttached_=!1,this.pollId_&&(clearInterval(this.pollId_),this.pollId_=null)}},{key:"release",value:function(){this.stop()}},{key:"ensurePolling_",value:function(){var e=this;this.pollId_||(this.pollId_=setInterval(function(){var n,t;e.trackingUrl_&&(null!==(n=e.player_)&&void 0!==n&&null!==(t=n.paused)&&void 0!==t&&t.call(n)||e.requestTrackingInfo_(!1))},this.pollIntervalMs_))}},{key:"requestTrackingInfo_",value:(o=n(t.mark(function e(n){var i,r,o,a,l,s,d,u,c,v,f,m,p,h,g,y,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,r=new Map,o=0,a=null;case 4:if(!(o<10)){e.next=25;break}return l=new URL(this.trackingUrl_),this.nextToken_&&l.searchParams.set("nextToken",this.nextToken_),e.next=9,fetch(l.toString(),{method:"GET"});case 9:return s=e.sent,e.next=12,s.json();case 12:d=e.sent,o++,(u=At(d)).dashAvailabilityStartTime&&!a&&(a=u.dashAvailabilityStartTime),c=Et(u.avails);try{for(c.s();!(v=c.n()).done;)f=v.value,m=(null==f?void 0:f.availId)||"".concat(null==f?void 0:f.startTimeInSeconds),r.set(m,f)}catch(e){c.e(e)}finally{c.f()}if((p=u.nextToken||null)&&p!==this.nextToken_){e.next=22;break}return this.nextToken_=p,e.abrupt("break",25);case 22:this.nextToken_=p,e.next=4;break;case 25:if(h=Array.from(r.values()),this.updateApiTimelineAbsoluteFlag_(h),g=(null==h||null===(i=h[0])||void 0===i?void 0:i.startTimeInSeconds)||0,this.apiTimelineAbsolute_){e.next=33;break}return e.next=31,this.resolveDashAvailabilityStartTime_(a,g);case 31:e.next=35;break;case 33:this.dashAvailabilityStartTimeResolved_=!0,this.dashAvailabilityStartTime_=0;case 35:h.length?(y=this.normalizeAvails_(h),Hn(this.adBreaks_)!==Hn(y)&&(this.adBreaks_=y,w=this.getCuePoints(),this.onEvent_({type:_t,cuepoints:w}))):this.adBreaks_.length&&(this.onEvent_({type:_t,cuepoints:[]}),this.onEnded_(),this.adBreaks_=[]),n&&this.setupAdBreakListeners_(),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(0),console.warn(kt,"tracking info fetch failed",e.t0);case 42:case"end":return e.stop()}},e,this,[[0,39]])})),function(e){return o.apply(this,arguments)})},{key:"updateApiTimelineAbsoluteFlag_",value:function(e){this.apiTimelineAbsolute_=!1;var n,t=1e6,i=Et(e||[]);try{for(i.s();!(n=i.n()).done;){var r,o=n.value;if((null!==(r=null==o?void 0:o.startTimeInSeconds)&&void 0!==r?r:0)>t)return void(this.apiTimelineAbsolute_=!0);var a,l=Et((null==o?void 0:o.ads)||[]);try{for(l.s();!(a=l.n()).done;){var s,d=a.value;if((null!==(s=null==d?void 0:d.startTimeInSeconds)&&void 0!==s?s:0)>t)return void(this.apiTimelineAbsolute_=!0)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}}},{key:"normalizeAvails_",value:function(e){var n=this,t=this.apiTimelineAbsolute_?0:this.dashAvailabilityStartTime_||0;return e.map(function(e){var i=n.resolveAbsoluteStart_(e,t,null);return bt(bt({},e),{},{startTimeInSeconds:i,ads:(e.ads||[]).map(function(r){return bt(bt({},r),{},{startTimeInSeconds:n.resolveAbsoluteStart_(r,t,e,i)})})})})}},{key:"resolveAbsoluteStart_",value:function(e,n,t,i){var r=null==e?void 0:e.adProgramDateTime;if(r){var o=new Date(r).getTime()/1e3;if(isFinite(o)&&o>0)return o}return null!=t&&t.adProgramDateTime&&"number"==typeof i?i+((e.startTimeInSeconds||0)-(t.startTimeInSeconds||0)):(e.startTimeInSeconds||0)+n}},{key:"resolveDashAvailabilityStartTime_",value:(r=n(t.mark(function e(n,i){var r,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.dashAvailabilityStartTimeResolved_){e.next=2;break}return e.abrupt("return");case 2:if(!n){e.next=8;break}if(r=new Date(n).getTime()/1e3,!(isFinite(r)&&r>0)){e.next=8;break}return this.dashAvailabilityStartTime_=r,this.dashAvailabilityStartTimeResolved_=!0,e.abrupt("return");case 8:if(!(i>0)){e.next=13;break}return e.next=11,this.fetchDashAvailabilityStartTimeFromMpd_();case 11:(o=e.sent)>0&&(this.dashAvailabilityStartTime_=o,this.dashAvailabilityStartTimeResolved_=!0);case 13:case"end":return e.stop()}},e,this)})),function(e,n){return r.apply(this,arguments)})},{key:"fetchDashAvailabilityStartTimeFromMpd_",value:(i=n(t.mark(function e(){var n,i,r,o,a,l;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=this.dashManifestUrl_||this.getCurrentSourceUrl_())&&i.includes(".mpd")){e.next=4;break}return e.abrupt("return",0);case 4:return e.next=6,fetch(i);case 6:return r=e.sent,e.next=9,r.text();case 9:return o=e.sent,a=(new DOMParser).parseFromString(o,"application/xml"),l=null===(n=a.querySelector("MPD"))||void 0===n?void 0:n.getAttribute("availabilityStartTime"),e.abrupt("return",l?new Date(l).getTime()/1e3:0);case 15:return e.prev=15,e.t0=e.catch(0),console.warn(kt,"MPD availabilityStartTime parse failed",e.t0),e.abrupt("return",0);case 19:case"end":return e.stop()}},e,this,[[0,15]])})),function(){return i.apply(this,arguments)})},{key:"getCurrentSourceUrl_",value:function(){try{var e,n,t,i,r=(null===(e=this.player_)||void 0===e||null===(n=e.currentSrc)||void 0===n?void 0:n.call(e))||(null===(t=this.player_)||void 0===t||null===(i=t.src)||void 0===i?void 0:i.call(t));return"string"==typeof r?r:(null==r?void 0:r.src)||""}catch(e){return""}}},{key:"setupAdBreakListeners_",value:function(){var e=this;if(!this.adBreakListenersAttached_){this.adBreakListenersAttached_=!0,this.onTimeupdate_();this.attachGlobalListener_("timeupdate",function(){return e.onTimeupdate_()}),this.attachGlobalListener_("dispose",this.onDispose_),this.video_&&(this.videoTimeupdate_=function(){return e.onTimeupdate_()},this.video_.addEventListener("timeupdate",this.videoTimeupdate_))}}},{key:"isHlsSource_",value:function(){var e,n,t=this.getCurrentSourceUrl_().toLowerCase(),i=((null===(e=this.player_)||void 0===e||null===(n=e.currentType)||void 0===n?void 0:n.call(e))||"").toLowerCase();return t.includes(".m3u8")||"application/x-mpegurl"===i||"application/vnd.apple.mpegurl"===i}},{key:"isDashSource_",value:function(){var e,n,t=this.getCurrentSourceUrl_().toLowerCase();return"application/dash+xml"===((null===(e=this.player_)||void 0===e||null===(n=e.currentType)||void 0===n?void 0:n.call(e))||"").toLowerCase()||t.includes(".mpd")}},{key:"getDashMediaPlayerTimelineSeconds_",value:function(){try{var e,n,t=null===(e=this.player_)||void 0===e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer;if(!t||"function"!=typeof t.time)return null;var i=t.time();return"number"==typeof i&&isFinite(i)&&i>1e6?i:null}catch(e){return null}}},{key:"getCurrentTime_",value:function(){var e,n,t,i=null!==(e=null===(n=this.video_)||void 0===n?void 0:n.currentTime)&&void 0!==e?e:0,r=d();if(this.isHlsSource_()){var o,a,l=i,s=null===(o=this.player_)||void 0===o||null===(a=o.seekable)||void 0===a?void 0:a.call(o);return s&&s.length>0&&(l=s.end(s.length-1)),Date.now()/1e3-(l-i)}if(this.isDashSource_()){var u,c,v,f=this.getDashMediaPlayerTimelineSeconds_();if(null!=f)return f;var m=null===(u=this.player_)||void 0===u||null===(c=u.seekable)||void 0===c?void 0:c.call(u),p="function"==typeof(null===(v=this.player_)||void 0===v?void 0:v.currentTime)?this.player_.currentTime():i;if(m&&m.length>0){var h=m.start(0);if(h>1e6&&h+p>1e6)return h+p}if(this.apiTimelineAbsolute_&&(this.dashAvailabilityStartTime_||0)>1e9)return(this.dashAvailabilityStartTime_||0)+p}return"Safari"===r?i:"function"==typeof(null===(t=this.player_)||void 0===t?void 0:t.currentTime)?this.player_.currentTime():i}},{key:"onTimeupdate_",value:function(){if(this.ad_||this.adBreaks_.length){var e=this.getCurrentTime_();if(this.ad_){var n,t;this.sendInProgressEvents_(e,this.transmitAd_);var i=this.ad_.getDuration(),r=(null!==(n=null===(t=this.transmitAd_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==n?n:0)+i,o=r-e;this.ad_.canSkipNow()&&o>0&&i>0&&this.sendTrackingEvent_(rt),i>0&&e>=r&&this.onEnded_()}this.ad_||this.checkLinearAds_(e)}}},{key:"sendInProgressEvents_",value:function(e,n){if(n){var t=n.startTimeInSeconds+.25*n.durationInSeconds,i=n.startTimeInSeconds+.5*n.durationInSeconds,r=n.startTimeInSeconds+.75*n.durationInSeconds;e>=t&&!this.eventsSent_.has(Jn)&&(this.eventsSent_.add(Jn),this.sendTrackingEvent_(Jn)),e>=i&&!this.eventsSent_.has($n)&&(this.eventsSent_.add($n),this.sendTrackingEvent_($n)),e>=r&&!this.eventsSent_.has(Zn)&&(this.eventsSent_.add(Zn),this.sendTrackingEvent_(Zn))}}},{key:"flushPendingQuartiles_",value:function(){for(var e=0,n=[Jn,$n,Zn];e<n.length;e++){var t=n[e];this.eventsSent_.has(t)||(this.eventsSent_.add(t),this.sendTrackingEvent_(t))}}},{key:"checkLinearAds_",value:function(e){var n,t=Et(this.adBreaks_);try{for(t.s();!(n=t.n()).done;){var i=n.value;if(this.ad_)break;for(var r=i.ads||[],o=0;o<r.length;o++){var a=r[o],l=a.startTimeInSeconds,s=l+a.durationInSeconds;if(l<=e&&s>e){this.onEnded_(),this.transmitAdBreak_=i,this.transmitAd_=a,this.ad_=new Gn(a,o+1,r.length,this.video_),0===o&&this.sendTrackingEvent_(tt),this.setupCurrentAdListeners_();break}}}}catch(e){t.e(e)}finally{t.f()}}},{key:"onEnded_",value:function(){this.ad_&&this.transmitAd_&&(this.ad_.isSkipped()||this.flushPendingQuartiles_(),this.removeCurrentAdListeners_(this.ad_.isSkipped()),this.ad_.getPositionInSequence()===this.ad_.getSequenceLength()&&this.sendTrackingEvent_(it),this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null)}},{key:"setupCurrentAdListeners_",value:function(){var e,n,t,i,r,o=this,a=!1;null!==(e=this.player_)&&void 0!==e&&null!==(n=e.paused)&&void 0!==n&&n.call(e)?a=!0:(this.sendTrackingEvent_(qn),this.sendTrackingEvent_(Qn)),this.lastMutedForAd_=null!==(t=null===(i=this.player_)||void 0===i||null===(r=i.muted)||void 0===r?void 0:r.call(i))&&void 0!==t&&t,this.attachAdListener_("volumechange",function(){var e,n,t,i=null!==(e=null===(n=o.player_)||void 0===n||null===(t=n.muted)||void 0===t?void 0:t.call(n))&&void 0!==e&&e;i!==o.lastMutedForAd_&&(o.lastMutedForAd_=i,i?o.sendTrackingEvent_(Yn):o.sendTrackingEvent_(zn))}),this.attachAdListener_("play",function(){a?(o.sendTrackingEvent_(qn),o.sendTrackingEvent_(Qn),a=!1):o.sendTrackingEvent_(Kn)}),this.attachAdListener_("pause",function(){o.sendTrackingEvent_(Xn)})}},{key:"removeCurrentAdListeners_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.sendTrackingEvent_(e?nt:et),this.detachAdListeners_(),this.eventsSent_.clear()}},{key:"attachGlobalListener_",value:function(e,n){this.player_&&(this.player_.on(e,n),this.globalListeners_.push({event:e,handler:n}))}},{key:"attachAdListener_",value:function(e,n){this.player_&&(this.player_.on(e,n),this.adListeners_.push({event:e,handler:n}))}},{key:"detachAdListeners_",value:function(){var e,n=Et(this.adListeners_);try{for(n.s();!(e=n.n()).done;){var t,i,r=e.value,o=r.event,a=r.handler;null===(t=this.player_)||void 0===t||null===(i=t.off)||void 0===i||i.call(t,o,a)}}catch(e){n.e(e)}finally{n.f()}this.adListeners_=[]}},{key:"detachAllListeners_",value:function(){this.detachAdListeners_();var e,n=Et(this.globalListeners_);try{for(n.s();!(e=n.n()).done;){var t,i,r=e.value,o=r.event,a=r.handler;null===(t=this.player_)||void 0===t||null===(i=t.off)||void 0===i||i.call(t,o,a)}}catch(e){n.e(e)}finally{n.f()}this.globalListeners_=[],this.video_&&this.videoTimeupdate_&&(this.video_.removeEventListener("timeupdate",this.videoTimeupdate_),this.videoTimeupdate_=null)}},{key:"startComscoreForCurrentAd_",value:function(){try{var e=mn.get();if(!e||0===Object.keys(e).length)return;var n=e.formulateComscoreAdPayload,t=e.startComscoreAdTracking,i=_n.get();t(n(bt(bt({},this.transmitAd_),{},{trackingUrl:i})))}catch(e){console.warn(kt,"comscore start failed",e)}}},{key:"sendTrackingEvent_",value:function(e){var n,t=this;if(this.transmitAd_&&this.transmitAdBreak_){var i=(this.transmitAd_.trackingEvents||[]).find(function(n){return n.eventType===e});if(i||(i=(this.transmitAdBreak_.adBreakTrackingEvents||[]).find(function(n){return n.eventType===e})),i&&(null===(n=this.config_)||void 0===n||!n.disableTrackingEvents)){var r,o,a,l=(null===(r=this.transmitAd_)||void 0===r?void 0:r.adId)||(null===(o=this.transmitAdBreak_)||void 0===o?void 0:o.availId)||"unknown",s=Et(i.beaconUrls||[]);try{var d=function(){var n=a.value;if(!n)return"continue";var i="".concat(l,"|").concat(e,"|").concat(n);if(t.firedBeacons_.has(i))return"continue";t.firedBeacons_.add(i),fetch(n,{mode:"no-cors"}).catch(function(e){console.warn(kt,"beacon failed",n,e)})};for(s.s();!(a=s.n()).done;)d()}catch(e){s.e(e)}finally{s.f()}}var u=mn.get(),c=u&&Object.keys(u).length?u:null;switch(e){case qn:this.onEvent_({type:ot}),this.startComscoreForCurrentAd_();break;case Qn:this.onEvent_({type:at,ad:this.ad_});break;case Yn:this.onEvent_({type:lt});break;case zn:this.onEvent_({type:st});break;case Kn:this.onEvent_({type:dt});break;case Xn:this.onEvent_({type:ut});break;case Jn:this.onEvent_({type:ct});break;case $n:this.onEvent_({type:vt});break;case Zn:this.onEvent_({type:ft});break;case et:this.onEvent_({type:mt}),this.onEvent_({type:pt}),null!=c&&c.finishComscoreAdTracking&&c.finishComscoreAdTracking();break;case nt:this.onEvent_({type:ht}),this.onEvent_({type:pt});break;case tt:this.onEvent_({type:yt});break;case it:this.onEvent_({type:wt}),null!=c&&c.endComscoreAdTracking&&c.endComscoreAdTracking();break;case rt:this.onEvent_({type:gt})}}else console.warn(kt,"sendTrackingEvent_ skipped — no active ad",{eventType:e})}}]),e}();function Dt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Lt(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Dt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Pt={dash:"tracking/initialize/dash",hls:"tracking/initialize/hls"};function Ct(e){if(null==e||!e.src)return null;var n=(e.type||"").toLowerCase(),t=String(e.src).toLowerCase();return"application/dash+xml"===n||t.includes(".mpd")?"dash":"application/x-mpegurl"===n||"application/vnd.apple.mpegurl"===n||t.includes(".m3u8")?"hls":null}function Ft(e,n,t){return jt.apply(this,arguments)}function jt(){return(jt=n(t.mark(function e(n,i,r){var o,a,l,s,d,u,c,v,f,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Ct(n)){e.next=3;break}return e.abrupt("return",n);case 3:return a=xe(n.src,r,i),l=a.replace(o,Pt[o]),console.log("[Transmit] session init →",l),e.prev=6,e.next=9,fetch(l,{method:"GET",redirect:"follow"});case 9:return s=e.sent,e.next=12,s.json();case 12:if(d=e.sent,console.log("[Transmit] session response",d),u="dash"===o?null==d?void 0:d.dashUrl:null==d?void 0:d.hlsUrl,c=null==d?void 0:d.trackingUrl,u&&c){e.next=18;break}return e.abrupt("return",n);case 18:return v=new URL(l),f=v.hostname,m="https://".concat(f).concat(u),p="https://".concat(f).concat(c),_n.set(p),console.log("[Transmit] session ready",{manifestUrl:m,trackingUrl:p}),e.abrupt("return",Lt(Lt({},n),{},{src:m}));case 26:return e.prev=26,e.t0=e.catch(6),console.warn("[Transmit] session init failed",e.t0),e.abrupt("return",n);case 30:case"end":return e.stop()}},e,null,[[6,26]])}))).apply(this,arguments)}var Rt=null;function Vt(e,n){var t;if(Rt)return console.log("[Transmit] initializeTransmit skipped — manager already initialised"),Rt;var i=_n.get();if(!i)return console.warn("[Transmit] initializeTransmit skipped — no tracking URL"),null;var r=o(e);if(!r)return console.warn("[Transmit] initializeTransmit skipped — no player"),null;var a=(null===(t=r.el())||void 0===t?void 0:t.querySelector("video"))||null,l=function(e){try{var n="function"==typeof(null==e?void 0:e.currentSrc)&&e.currentSrc()||"function"==typeof(null==e?void 0:e.src)&&e.src()||"";if("application/dash+xml"===("function"==typeof(null==e?void 0:e.currentType)&&e.currentType()||"")||String(n).includes(".mpd"))return n}catch(e){}return null}(r);return(Rt=new Ot(a,r,function(e){var t,i;console.log("[Transmit] ad event",e);var r=null==n||null===(t=n.customData)||void 0===t||null===(i=t.ads)||void 0===i?void 0:i.adEventHandler;if("function"==typeof r)try{r(e)}catch(e){console.warn("[Transmit] adEventHandler threw",e)}},{dashManifestUrl:l})).configure({disableTrackingEvents:!1}),Rt.addTrackingUrl(i),Rt.onManifestUpdated(),Rt}function Nt(){Rt&&(Rt.release(),Rt=null)}function Wt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var xt=function(e){i(e).play()},Ut=function(e){i(e).pause()},Bt=function(e,n){var t=i(e),r=t.currentTime()+n;t.currentTime(r)},Mt=function(e,n){var t=i(e),r=t.currentTime(),o=r<=n?0:r-n;t.currentTime(o)},Ht=function(e){return!!i.getPlayer("".concat(e))},Gt=function(e){return i(e).paused()},qt=function(){var e=n(t.mark(function e(i,r){var a,l,s,d=arguments;return t.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,$();case 3:return l=e.sent,s=o(i),e.abrupt("return",new Promise(function(e,o){F(r,l).then(function(){var o=n(t.mark(function n(o){var l,d,u,c,v,f,m,p,h,g,y;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(Nt(),f=null==o?void 0:o.data,window.sid=Ie(),f.contentType="linearchannel",f.channelId=null==r?void 0:r.channelId,m=(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)||{},p=!(null==f||null===(v=f.linearchannel)||void 0===v||!v.isSSAIEnabled),h=p&&"MEDIA_TAILOR"==(null==m?void 0:m.vodAdSticherProvider),g=p&&"TRANSMIT"==(null==m?void 0:m.liveAdSticherProvider)&&!(null==m||!m.liveAdClientSideTracking),y=Be(f,i),!h){n.next=17;break}return n.next=13,bn(i,f);case 13:y=n.sent,a=!0,n.next=22;break;case 17:if(!g){n.next=22;break}return n.next=20,Ft(y,f,i);case 20:y=n.sent,a=!0;case 22:ie(f),y&&a?(Xt(i,y),g?Vt(i,{customData:window.customData||{ads:m}}):h&&Un(i),s.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:f})})):(mn.get()&&0!==Object.keys(mn.get()).length&&pn({playerId:i,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:f}));case 24:case"end":return n.stop()}},n)}));return function(e){return o.apply(this,arguments)}}()).catch(function(e){o({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Qt=function(){var e=n(t.mark(function e(i,r,a){var l,s,d,u,c,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:return u=e.sent,console.log("load video"),(ae()||null)&&ce(r),c=0,m=0,p=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(d=s.watchHistory)&&void 0!==d&&d.enable&&V(r,u).then(function(e){var n,t,i,r,o,a,l;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),c=(null==e||null===(o=e.data)||void 0===o?void 0:o.watchedTime)||null,(m=(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 n,t,i,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.cb(e))}),e.abrupt("return",new Promise(function(e,a){C(r,u).then(function(){var r=n(t.mark(function n(r){var l,s,d,u,h,g,y,w,T,_,I,b,E,S,k,A,O,D,L,P,C,F,j,R,V,N,W,x,U,B,M,H,G,q,Q,Y,z,K,X,J,$;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(A=null==r?void 0:r.data,O=(null==A?void 0:A.contentType)||"video",D=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(u=d.appcmsMain)||void 0===u?void 0:u.adsConfig)||{},L=!(null==A||null===(h=A[O])||void 0===h||!h.isSSAIEnabled),P=L&&"MEDIA_TAILOR"==(null==D?void 0:D.vodAdSticherProvider),C=L&&"TRANSMIT"==(null==D?void 0:D.liveAdSticherProvider)&&!(null==D||!D.liveAdClientSideTracking),F=!(null==A||null===(g=A[O])||void 0===g||null===(y=g.streamingInfo)||void 0===y||!y.isLiveStream)||"linearchannel"===O,ie(r.data),(j=(null==A||null===(w=A.ads)||void 0===w||null===(T=w.preRoll)||void 0===T||null===(_=T.adTags)||void 0===_||null===(I=_.web)||void 0===I?void 0:I.active)&&(null==A||null===(b=A.ads)||void 0===b||null===(E=b.preRoll)||void 0===E||null===(S=E.adTags)||void 0===S||null===(k=S.web)||void 0===k?void 0:k.url))&&Xe(i,j,A),R=Be(A,i),!P){n.next=17;break}return n.next=14,bn(i,A);case 14:R=n.sent,n.next=22;break;case 17:if(!C||!F){n.next=22;break}return Nt(),n.next=21,Ft(R,A,i);case 21:R=n.sent;case 22:R?(Q=(null==A||null===(V=A.video)||void 0===V||null===(N=V.gist)||void 0===N?void 0:N.videoImageUrl)||(null==A||null===(W=A.video)||void 0===W||null===(x=W.gist)||void 0===x||null===(U=x.imageGist)||void 0===U?void 0:U.r16x9),(Y=o(i)).poster(Q),Xt(i,R),C&&F?Vt(i,{customData:window.customData||{ads:D}}):P&&Pn(i,p),Y.on("loadstart",function(){F&&e({status:!0,msg:"Video Loaded",response:A})}),Y.on("loadeddata",function(){ze(),e({status:!0,msg:"Video Loaded",response:A})}),Y.one("play",function(){!c||P||C&&F||m<95&&setTimeout(function(){Y.currentTime(c)},0)}),Y.one("error",function(){var e;a({status:!1,msg:(null==Y||null===(e=Y.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==A||null===(B=A.video)||void 0===B||null===(M=B.contentDetails)||void 0===M||null===(H=M.closedCaptions)||void 0===H?void 0:H.length)>0||(null==A||null===(G=A.video)||void 0===G||null===(q=G.closedCaptions)||void 0===q?void 0:q.length)>0?($=(null==A||null===(K=A.video)||void 0===K||null===(X=K.contentDetails)||void 0===X?void 0:X.closedCaptions)||(null==A||null===(J=A.video)||void 0===J?void 0:J.closedCaptions),z=$.filter(function(e){return"VTT"===e.format}),v(i,z)):f(i)):(Ye(i,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 23:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){Jt(e,i,a,r)})}));case 11:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),Yt=function(e,n,t){var i=o(e);return i.src(n),new Promise(function(e,n){var r=0;i.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){r=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},zt=function(e){Nt();var n=o(e),t=(mn.get()||{}).destroyComscoreTag;if(Kt(),t&&t(),l(),window.onresize=null,n)n.dispose();else{var i=document.getElementById(e);i&&i.remove()}},Kt=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()},Xt=function(e,n){console.log("load video in core",n);var t=o(e);t&&t.src(n)},Jt=function(n,t,i,r){var o,a,l,s,d,u,c=null==n||null===(o=n.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==n?void 0:n.message);Ht(t)&&Ye(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Wt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))},$t=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")};export{Gt as $,Jt as A,$ as B,F as C,j as D,Le as E,ve as F,oe as G,Yt as H,Bt as I,xt as J,Ut as K,Mt as L,Qt as M,qt as N,zt as O,x as P,un as Q,ne as R,W as S,he as T,Z as U,M as V,U as W,E as X,Ln as Y,Je as Z,le as _,Ce as a,se as a0,Vt as a1,Un as a2,Pn as a3,N as a4,ue as a5,ce as a6,ae as b,mn as c,Pe as d,re as e,Be as f,be as g,ie as h,pn as i,ze as j,Ye as k,Xt as l,de as m,$t as n,Ft as o,De as p,Xe as q,Qe as r,R as s,_n as t,bn as u,te as v,ee as w,Ht as x,C as y,V as z};
|